codeplane-darwin-x64-baseline 29.0.2 → 29.0.3
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.
- package/bin/codeplane +0 -0
- package/bin/runtime/tui/{_baseUniq-CrI-l4T--cb6yr85h.js → _baseUniq-9IXs6AhY-xerpsxzt.js} +1 -1
- package/bin/runtime/tui/{ar-CqzjnUvN-gaphv1km.js → ar-Bxa58vxZ-vt30m277.js} +1 -1
- package/bin/runtime/tui/{ar-CxO8Ew7O-stq9azvm.js → ar-CnXvFVLB-v0ce16jh.js} +1 -1
- package/bin/runtime/tui/{arc-Bt3WuS2u-gn91jh04.js → arc-D8LxKTdE-1faf5pds.js} +1 -1
- package/bin/runtime/tui/{architectureDiagram-Q4EWVU46-q_d4y-ss-be0rswpv.js → architectureDiagram-Q4EWVU46-DhlSOEKp-9ra6q39b.js} +1 -1
- package/bin/runtime/tui/{blockDiagram-DXYQGD6D-CuS4Kd7Z-mky2hrc6.js → blockDiagram-DXYQGD6D-DufDOzD4-86m5brwb.js} +1 -1
- package/bin/runtime/tui/{br-DRNVRO5v-1z50cx7x.js → br-Cg_ubWNg-px0kf2ge.js} +1 -1
- package/bin/runtime/tui/{br-DsEvYtyk-cee00zby.js → br-UxZZr_6Z-7ce7bqha.js} +1 -1
- package/bin/runtime/tui/{bs-CNNWsHRf-nk64sysf.js → bs-CK1F4XVi-p5tf3jap.js} +1 -1
- package/bin/runtime/tui/{bs-36LABFkb-kkpk3v7t.js → bs-CR3gfdfe-wacwd0jc.js} +1 -1
- package/bin/runtime/tui/{c4Diagram-AHTNJAMY-Dcnb_pkt-mrvvr6tn.js → c4Diagram-AHTNJAMY-BpBSKKdm-vjaa2kwd.js} +1 -1
- package/bin/runtime/tui/channel-BH1KxADU-2vmyx7px.js +1 -0
- package/bin/runtime/tui/{chunk-4BX2VUAB-CO-inVq2-3y8hh51f.js → chunk-4BX2VUAB-DzRqDDiV-hj8ysd51.js} +1 -1
- package/bin/runtime/tui/{chunk-4TB4RGXK-CsRL3WM2-7q9qn2jn.js → chunk-4TB4RGXK-BW6S0i1e-9tk67p28.js} +1 -1
- package/bin/runtime/tui/{chunk-55IACEB6-Rs_fhZZp-ajc25shr.js → chunk-55IACEB6-BTNwDbAG-vtxy5hh6.js} +1 -1
- package/bin/runtime/tui/{chunk-EDXVE4YY-DIx0q-SF-kxemqsve.js → chunk-EDXVE4YY-BeA4sIzu-gmfrgztm.js} +1 -1
- package/bin/runtime/tui/{chunk-FMBD7UC4-BRQ_JFcu-64dz1pwh.js → chunk-FMBD7UC4-HdZ8yap2-05xhm186.js} +1 -1
- package/bin/runtime/tui/{chunk-OYMX7WX6-Ebdl4euI-s0qw7xze.js → chunk-OYMX7WX6-CVrpIAjS-8qwa1145.js} +1 -1
- package/bin/runtime/tui/{chunk-QZHKN3VN-BZ_7uZiP-hegpq53e.js → chunk-QZHKN3VN-Bhl2DmvQ-k3d1zb9a.js} +1 -1
- package/bin/runtime/tui/{chunk-YZCP3GAM-CyC-R69k-ammnjh2q.js → chunk-YZCP3GAM-f0SI8KjW-4y4efwrt.js} +1 -1
- package/bin/runtime/tui/classDiagram-6PBFFD2Q-D5eOZCkq-8xtsn3zq.js +1 -0
- package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-D5eOZCkq-8xtsn3zq.js +1 -0
- package/bin/runtime/tui/clone-BY5Ry5jo-av7jy9rk.js +1 -0
- package/bin/runtime/tui/{cose-bilkent-S5V4N54A-BSqzVFHJ-ndganpdt.js → cose-bilkent-S5V4N54A-DztI3YbS-79h0hgr0.js} +1 -1
- package/bin/runtime/tui/{da-Dv2JcMt1-8z1jcrs9.js → da-DOYtD_G8-5dww5d4x.js} +1 -1
- package/bin/runtime/tui/{da-NvyeAxA--9hdewfz7.js → da-YTnuRZG0-x261hzz8.js} +1 -1
- package/bin/runtime/tui/{dagre-KV5264BT-wmeb1Sky-2scbqre4.js → dagre-KV5264BT-CsCIBozr-sbv6kkmb.js} +1 -1
- package/bin/runtime/tui/{de-DY3mU7Ij-2z85w2cp.js → de-BcaXLEoj-y91gcsqq.js} +1 -1
- package/bin/runtime/tui/{de-BNlSevTf-9mftpp8r.js → de-CRYeTAqP-esjn5byn.js} +1 -1
- package/bin/runtime/tui/{diagram-5BDNPKRD-DgbhXvjf-trnrmxh2.js → diagram-5BDNPKRD-BnJQb0Qd-5zts51wk.js} +1 -1
- package/bin/runtime/tui/{diagram-G4DWMVQ6-DDKAglg7-a3st1vsy.js → diagram-G4DWMVQ6-DU2ybhZC-qf511q6q.js} +1 -1
- package/bin/runtime/tui/{diagram-MMDJMWI5-DhQ3ZudD-5z1583af.js → diagram-MMDJMWI5-CIXWKCHN-np7de2dm.js} +1 -1
- package/bin/runtime/tui/{diagram-TYMM5635-CE9eB_OA-etbk2b18.js → diagram-TYMM5635-CFD6w4wd-eg5hvarv.js} +1 -1
- package/bin/runtime/tui/{dialog-connect-provider-ChAd3tkx-wkt47a09.js → dialog-connect-provider-F-H6E-u1-v8m7jwd3.js} +2 -2
- package/bin/runtime/tui/{dialog-edit-project-4li3-60L-n1ny92hh.js → dialog-edit-project-DnYO9h5P-16tpq25r.js} +1 -1
- package/bin/runtime/tui/{dialog-fork-HUFJLsLl-whnrscsd.js → dialog-fork-DkqMfckK-34pdz9cb.js} +1 -1
- package/bin/runtime/tui/{dialog-manage-models-BPdz_BVi-rg7r3jmy.js → dialog-manage-models-C06j2ljJ-gtkcw8k6.js} +1 -1
- package/bin/runtime/tui/{dialog-quick-switcher-B4nARhhS-4p2fqa1a.js → dialog-quick-switcher-FgaoDDD5-qw2cg5wd.js} +1 -1
- package/bin/runtime/tui/{dialog-select-directory-C2S4PKyb-35dhkrgj.js → dialog-select-directory-BndJRkQ2-zxaepfbg.js} +1 -1
- package/bin/runtime/tui/{dialog-select-file-CBCZ_oh7-3qqw6p4p.js → dialog-select-file-CCkyv6t8-y748dbns.js} +1 -1
- package/bin/runtime/tui/{dialog-select-mcp-DLcb7boE-9azwb1y0.js → dialog-select-mcp-D7JALLGs-2gmvh9dp.js} +1 -1
- package/bin/runtime/tui/{dialog-select-model-unpaid-C1K9s5Tf-76mjmy04.js → dialog-select-model-unpaid-lAY_GSBz-dj3m1e5j.js} +2 -2
- package/bin/runtime/tui/{dialog-select-provider-BdYHSwX5-djsed6vk.js → dialog-select-provider-WQnY_rEG-bg0xjarc.js} +1 -1
- package/bin/runtime/tui/{dialog-select-server-3yVZhthq-8d561mme.js → dialog-select-server-BORmhWyb-b5p1p4fj.js} +1 -1
- package/bin/runtime/tui/{erDiagram-SMLLAGMA-78ferStj-zeg12722.js → erDiagram-SMLLAGMA-BXGJaqTk-kxdqq7g0.js} +1 -1
- package/bin/runtime/tui/{es-DYZno4IE-9s5f26ft.js → es-B9MgIIlj-b3w9ewkm.js} +1 -1
- package/bin/runtime/tui/{es-COqIzy42-y387feee.js → es-qMJD8V0Q-ry5ftk3x.js} +1 -1
- package/bin/runtime/tui/{file-icon-DL1tnIVn-btnkq57j.js → file-icon-CCBAkhZM-2gwspqbt.js} +1 -1
- package/bin/runtime/tui/{flowDiagram-DWJPFMVM-BJnkSNTI-bkz0yvmb.js → flowDiagram-DWJPFMVM-jBWYmDZq-kxns0z2t.js} +1 -1
- package/bin/runtime/tui/{fr-DO0PId1D-jd7qzre9.js → fr-Dj4Yz5vL-q1h2970a.js} +1 -1
- package/bin/runtime/tui/{fr-x6kwqk76-z68bq2g0.js → fr-ai2o852z-33y4dv7s.js} +1 -1
- package/bin/runtime/tui/{ganttDiagram-T4ZO3ILL-9bPC_sV--fk3h9gvs.js → ganttDiagram-T4ZO3ILL-Cjy4eHKx-2bnk0han.js} +1 -1
- package/bin/runtime/tui/{ghostty-web-C03EVwAY-dkxmakah.js → ghostty-web-DSo6UQNq-57mw690t.js} +1 -1
- package/bin/runtime/tui/{gitGraphDiagram-UUTBAWPF-C1j0ViDT-70a2fg75.js → gitGraphDiagram-UUTBAWPF-LTxZLrKJ-pm74f51t.js} +1 -1
- package/bin/runtime/tui/{graph-CsJ0qy-d-n8n22e78.js → graph-BeepcjUl-whp2pvdr.js} +1 -1
- package/bin/runtime/tui/{home-BcGhMErc-t43x76pb.js → home-Da1fa31c-5zehmxd5.js} +1 -1
- package/bin/runtime/tui/{index-Cv0n48xp-b4159vb9.js → index-BZ-S0u9J-6n51v4eh.js} +7 -7
- package/bin/runtime/tui/{index-56anftkv.html → index-dpegttnb.html} +1 -1
- package/bin/runtime/tui/{infoDiagram-42DDH7IO-6JGpSA3j-ebkbfgae.js → infoDiagram-42DDH7IO-XvoVHnE2-46rfk35a.js} +1 -1
- package/bin/runtime/tui/{ishikawaDiagram-UXIWVN3A-C9hXCKVL-gren4tmc.js → ishikawaDiagram-UXIWVN3A-BmrEY8zx-jfpd80y7.js} +1 -1
- package/bin/runtime/tui/{ja-CMTL5Sk5-2spe3ns2.js → ja-B9yIMfiQ-xjg3egg6.js} +1 -1
- package/bin/runtime/tui/{ja-JMpy37Uc-fd6t6ybf.js → ja-C-OtBco_-3jwjqzne.js} +1 -1
- package/bin/runtime/tui/{journeyDiagram-VCZTEJTY-CqUPYSuq-vwzf5hj1.js → journeyDiagram-VCZTEJTY-BsfL6ECd-5fe6t13a.js} +1 -1
- package/bin/runtime/tui/{kanban-definition-6JOO6SKY-BrhXfjm6-z5rcd31g.js → kanban-definition-6JOO6SKY-D8vM58MK-pysad1yn.js} +1 -1
- package/bin/runtime/tui/{ko-DmYX4FPm-5k0y6pk7.js → ko-DeUlkpYJ-8st0gh48.js} +1 -1
- package/bin/runtime/tui/{ko-BLfVgRVC-ez7ecktc.js → ko-GpoSr9YU-5x00hv6q.js} +1 -1
- package/bin/runtime/tui/{layout-BG0LKOds-vn3zteb9.js → layout-yL4YLn5k-vwqkj8m9.js} +1 -1
- package/bin/runtime/tui/{linear-B6z_eVLs-wx54nkb0.js → linear-Dm7w2IjW-dybfqj3h.js} +1 -1
- package/bin/runtime/tui/{list-DxMrcrlT-j0131tw9.js → list-mHeqHLaV-01rzvm9r.js} +1 -1
- package/bin/runtime/tui/{mermaid.core-KG6fOqNp-887mrkp4.js → mermaid.core-BcWOJL0e-a90bbh87.js} +5 -5
- package/bin/runtime/tui/{min-BMFElxPI-637bny7p.js → min-GkEKOeHy-me46pcb4.js} +1 -1
- package/bin/runtime/tui/{mindmap-definition-QFDTVHPH-VQh5eOMn-3pqevvyv.js → mindmap-definition-QFDTVHPH-DH2CaRDU-znxvhw6e.js} +1 -1
- package/bin/runtime/tui/{no-DEYV6Uly-gqk2cq39.js → no-C6IGXxj9-h236ej6a.js} +1 -1
- package/bin/runtime/tui/{no-Bc9vtFhi-28r4cc9s.js → no-sRjzWGyH-h8h46hc3.js} +1 -1
- package/bin/runtime/tui/node-main.js +2 -2
- package/bin/runtime/tui/{notifications-BM6XMPEX-zpq3wp3j.js → notifications-BCVGYtyk-pa6d4ysp.js} +1 -1
- package/bin/runtime/tui/{pieDiagram-DEJITSTG-BcmoZ9uY-2vcbx7p5.js → pieDiagram-DEJITSTG-Dwv46uF3-yrdabbdq.js} +1 -1
- package/bin/runtime/tui/{pl-CLJMEI_F-fh7c7009.js → pl-BdAUsQg4-qhmx9kj0.js} +1 -1
- package/bin/runtime/tui/{pl-Br4VMmme-qfrdkkhc.js → pl-D9PWP3j8-za96w2v5.js} +1 -1
- package/bin/runtime/tui/{provider-icon-DUeYJhIN-nc326wqt.js → provider-icon-Ch41KuaD-gjqjjbjr.js} +1 -1
- package/bin/runtime/tui/{quadrantDiagram-34T5L4WZ-Bg0bMjwT-s6vbjywz.js → quadrantDiagram-34T5L4WZ-C3YfUpMa-zqkxth8y.js} +1 -1
- package/bin/runtime/tui/{requirementDiagram-MS252O5E-Cx9MsWFO-ea70xs6x.js → requirementDiagram-MS252O5E-DDpZOCJX-wf8qqzm5.js} +1 -1
- package/bin/runtime/tui/{ru-CQKaC407-2n8mdcpp.js → ru-BvNMwfrc-zbdx5mz9.js} +1 -1
- package/bin/runtime/tui/{ru-BHemVjOf-kkn3n5g0.js → ru-PgTv2NAk-jjrwmc2q.js} +1 -1
- package/bin/runtime/tui/{sankeyDiagram-XADWPNL6-wo-ZgkR_-83c4qt2m.js → sankeyDiagram-XADWPNL6-BmntA3TU-16764atv.js} +1 -1
- package/bin/runtime/tui/{sequenceDiagram-FGHM5R23-B9_gjbyG-jg210sc9.js → sequenceDiagram-FGHM5R23-BOT_DlH5-9f7tbqb4.js} +1 -1
- package/bin/runtime/tui/{session-VvtgZb33-hqsfwxa4.js → session-B7TyS2pp-hx2pbeh2.js} +6 -6
- package/bin/runtime/tui/{settings-BxVsg7tx-hvqrcws2.js → settings-D2q6jv_8-d5a26cmj.js} +1 -1
- package/bin/runtime/tui/{stateDiagram-FHFEXIEX-B6ee5r7B-z4k5p6aa.js → stateDiagram-FHFEXIEX-Za5R_jyp-9v22b6pq.js} +1 -1
- package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-BrCJd2LI-rvjbd1kk.js +1 -0
- package/bin/runtime/tui/{th-DiGw3usd-633crszg.js → th-BPTTGm6p-wg0qeygz.js} +1 -1
- package/bin/runtime/tui/{th-Bja74DRT-bjvgw0sp.js → th-D_11akW2-4kstyn2d.js} +1 -1
- package/bin/runtime/tui/{timeline-definition-GMOUNBTQ-C23LOyBF-y6s32cqs.js → timeline-definition-GMOUNBTQ-DC7fBu8f-9yyc4bbt.js} +1 -1
- package/bin/runtime/tui/{tr-CwGU-MHg-07wjmgsz.js → tr-BHxesFzI-42xpg237.js} +1 -1
- package/bin/runtime/tui/{tr-i4KWkJ3i-scpq03sz.js → tr-BlRsyU03-m97hgrvm.js} +1 -1
- package/bin/runtime/tui/{vennDiagram-DHZGUBPP-QTHAlouz-32bad2xh.js → vennDiagram-DHZGUBPP-BtanFrVi-jp0zhane.js} +1 -1
- package/bin/runtime/tui/{wardley-RL74JXVD-BkQiShQD-ed2hckad.js → wardley-RL74JXVD-B49gJluy-8hfag674.js} +1 -1
- package/bin/runtime/tui/{wardleyDiagram-NUSXRM2D-DpoVgYEi-8d1g06fw.js → wardleyDiagram-NUSXRM2D-D_Rywl2C-6e4ta96y.js} +1 -1
- package/bin/runtime/tui/{xychartDiagram-5P7HB3ND-DwAIgx2x-8h9d22ep.js → xychartDiagram-5P7HB3ND-Bjz9_ki6-px4fh6sb.js} +1 -1
- package/bin/runtime/tui/{zh-bOg8F16p-x2fsyy5j.js → zh-CMkkmie_-6hyczdtn.js} +1 -1
- package/bin/runtime/tui/{zh-DyyyQKUG-nfbxj5mv.js → zh-DcHmyx-m-kpk5cbgx.js} +1 -1
- package/bin/runtime/tui/{zht-BNARb445-kgavg6f5.js → zht-B2aVuJML-r734zysr.js} +1 -1
- package/bin/runtime/tui/{zht-CUj73aR3-wzstwhw1.js → zht-BC3GL0UB-bpxe0nw7.js} +1 -1
- package/package.json +1 -1
- package/bin/runtime/tui/channel-v1buZD1O-jmb8nrkc.js +0 -1
- package/bin/runtime/tui/classDiagram-6PBFFD2Q-CEtFAJQW-zp6ddmy2.js +0 -1
- package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-CEtFAJQW-zp6ddmy2.js +0 -1
- package/bin/runtime/tui/clone-DiQslg9f-mkfpy3ra.js +0 -1
- package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-CxzYjlRO-eq31tdxz.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-
|
|
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-BORmhWyb.js","assets/list-mHeqHLaV.js","assets/dialog-select-provider-WQnY_rEG.js","assets/provider-icon-Ch41KuaD.js","assets/dialog-connect-provider-F-H6E-u1.js","assets/dialog-select-directory-BndJRkQ2.js","assets/file-icon-CCBAkhZM.js","assets/settings-D2q6jv_8.js","assets/session-B7TyS2pp.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 Ge={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return i6(this.context.count)},getNextContextId(){return i6(this.context.count++)}};function i6(e){const t=String(e),n=t.length-1;return Ge.context.id+(n?String.fromCharCode(96+n):"")+t}function Ss(e){Ge.context=e}const U9=!1,xj=(e,t)=>e===t,wo=Symbol("solid-proxy"),H9=typeof Proxy=="function",Fd=Symbol("solid-track"),q0={equals:xj};let $d=null,B9=G9;const Gi=1,Ud=2,V9={owned:null,cleanups:null,context:null,owner:null},g1={};var ht=null;let Oe=null,Sj=null,qt=null,Rr=null,fr=null,pm=0;function Wn(e,t){const n=qt,r=ht,i=e.length===0,o=t===void 0?r:t,s=i?V9:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=i?e:()=>e(()=>ct(()=>ma(s)));ht=s,qt=null;try{return Si(a,!0)}finally{qt=n,ht=r}}function he(e,t){t=t?Object.assign({},q0,t):q0;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(Oe&&Oe.running&&Oe.sources.has(n)?i=i(n.tValue):i=i(n.value)),W9(n,i));return[q9.bind(n),r]}function Go(e,t,n){const r=xf(e,t,!0,Gi);iu(r)}function Me(e,t,n){const r=xf(e,t,!1,Gi);iu(r)}function oe(e,t,n){B9=Aj;const r=xf(e,t,!1,Gi),i=dl&&pt(dl);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),fr?fr.push(r):iu(r)}function U(e,t,n){n=n?Object.assign({},q0,n):q0;const r=xf(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,iu(r),q9.bind(r)}function _j(e){return e&&typeof e=="object"&&"then"in e}function ns(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=g1,l=null,c=!1,u=!1,d="initialValue"in o,h=typeof r=="function"&&U(r);const f=new Set,[p,m]=(o.storage||he)(o.initialValue),[g,v]=he(void 0),[y,w]=he(void 0,{equals:!1}),[k,x]=he(d?"ready":"unresolved");Ge.context&&(l=Ge.getNextContextId(),o.ssrLoadFrom==="initial"?a=o.initialValue:Ge.load&&Ge.has(l)&&(a=Ge.load(l)));function C(O,$,E,A){return s===O&&(s=null,A!==void 0&&(d=!0),(O===a||$===a)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(A,{value:$})),a=g1,Oe&&O&&c?(Oe.promises.delete(O),c=!1,Si(()=>{Oe.running=!0,S($,E)},!1)):S($,E)),$}function S(O,$){Si(()=>{$===void 0&&m(()=>O),x($!==void 0?"errored":d?"ready":"unresolved"),v($);for(const E of f.keys())E.decrement();f.clear()},!1)}function I(){const O=dl&&pt(dl),$=p(),E=g();if(E!==void 0&&!s)throw E;return qt&&!qt.user&&O&&Go(()=>{y(),s&&(O.resolved&&Oe&&c?Oe.promises.add(s):f.has(O)||(O.increment(),f.add(O)))}),$}function M(O=!0){if(O!==!1&&u)return;u=!1;const $=h?h():r;if(c=Oe&&Oe.running,$==null||$===!1){C(s,ct(p));return}Oe&&s&&Oe.promises.delete(s);let E;const A=a!==g1?a:ct(()=>{try{return i($,{value:p(),refetching:O})}catch(T){E=T}});if(E!==void 0){C(s,void 0,$0(E),$);return}else if(!_j(A))return C(s,A,void 0,$),A;return s=A,"v"in A?(A.s===1?C(s,A.v,void 0,$):C(s,void 0,$0(A.v),$),A):(u=!0,queueMicrotask(()=>u=!1),Si(()=>{x(d?"refreshing":"pending"),w()},!1),A.then(T=>C(A,T,void 0,$),T=>C(A,void 0,$0(T),$)))}Object.defineProperties(I,{state:{get:()=>k()},error:{get:()=>g()},loading:{get(){const O=k();return O==="pending"||O==="refreshing"}},latest:{get(){if(!d)return I();const O=g();if(O&&!s)throw O;return p()}}});let D=ht;return h?Go(()=>(D=ht,M(!1))):M(!1),[I,{refetch:O=>_s(D,()=>M(O)),mutate:m}]}function Qe(e){return Si(e,!1)}function ct(e){if(qt===null)return e();const t=qt;qt=null;try{return e()}finally{qt=t}}function wt(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=ct(()=>t(a,i,s));return i=a,l}}function en(e){oe(()=>ct(e))}function pe(e){return ht===null||(ht.cleanups===null?ht.cleanups=[e]:ht.cleanups.push(e)),e}function Cj(e,t){$d||($d=Symbol("error")),ht=xf(void 0,void 0,!0),ht.context={...ht.context,[$d]:[t]},Oe&&Oe.running&&Oe.sources.add(ht);try{return e()}catch(n){Sf(n)}finally{ht=ht.owner}}function Sy(){return qt}function ko(){return ht}function _s(e,t){const n=ht,r=qt;ht=e,qt=null;try{return Si(t,!0)}catch(i){Sf(i)}finally{ht=n,qt=r}}function Ij(e){if(Oe&&Oe.running)return e(),Oe.done;const t=qt,n=ht;return Promise.resolve().then(()=>{qt=t,ht=n;let r;return dl&&(r=Oe||(Oe={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),Si(e,!1),qt=ht=null,r?r.done:void 0})}const[vxe,o6]=he(!1);function $j(e){fr.push.apply(fr,e),e.length=0}function yt(e,t){const n=Symbol("context");return{id:n,Provider:Lj(n),defaultValue:e}}function pt(e){let t;return ht&&ht.context&&(t=ht.context[e.id])!==void 0?t:e.defaultValue}function El(e){const t=U(e),n=U(()=>_y(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let dl;function Tj(){return dl||(dl=yt())}function q9(){const e=Oe&&Oe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Gi)iu(this);else{const t=Rr;Rr=null,Si(()=>G0(this),!1),Rr=t}if(qt){const t=this.observers?this.observers.length:0;qt.sources?(qt.sources.push(this),qt.sourceSlots.push(t)):(qt.sources=[this],qt.sourceSlots=[t]),this.observers?(this.observers.push(qt),this.observerSlots.push(qt.sources.length-1)):(this.observers=[qt],this.observerSlots=[qt.sources.length-1])}return e&&Oe.sources.has(this)?this.tValue:this.value}function W9(e,t,n){let r=Oe&&Oe.running&&Oe.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Oe){const i=Oe.running;(i||!n&&Oe.sources.has(e))&&(Oe.sources.add(e),e.tValue=t),i||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Si(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],s=Oe&&Oe.running;s&&Oe.disposed.has(o)||((s?!o.tState:!o.state)&&(o.pure?Rr.push(o):fr.push(o),o.observers&&K9(o)),s?o.tState=Gi:o.state=Gi)}if(Rr.length>1e6)throw Rr=[],new Error},!1)}return t}function iu(e){if(!e.fn)return;ma(e);const t=pm;s6(e,Oe&&Oe.running&&Oe.sources.has(e)?e.tValue:e.value,t),Oe&&!Oe.running&&Oe.sources.has(e)&&queueMicrotask(()=>{Si(()=>{Oe&&(Oe.running=!0),qt=ht=e,s6(e,e.tValue,t),qt=ht=null},!1)})}function s6(e,t,n){let r;const i=ht,o=qt;qt=ht=e;try{r=e.fn(t)}catch(s){return e.pure&&(Oe&&Oe.running?(e.tState=Gi,e.tOwned&&e.tOwned.forEach(ma),e.tOwned=void 0):(e.state=Gi,e.owned&&e.owned.forEach(ma),e.owned=null)),e.updatedAt=n+1,Sf(s)}finally{qt=o,ht=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?W9(e,r,!0):Oe&&Oe.running&&e.pure?(Oe.sources.has(e)||(e.value=r),Oe.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function xf(e,t,n,r=Gi,i){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ht,context:ht?ht.context:null,pure:n};return Oe&&Oe.running&&(o.state=0,o.tState=r),ht===null||ht!==V9&&(Oe&&Oe.running&&ht.pure?ht.tOwned?ht.tOwned.push(o):ht.tOwned=[o]:ht.owned?ht.owned.push(o):ht.owned=[o]),o}function W0(e){const t=Oe&&Oe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Ud)return G0(e);if(e.suspense&&ct(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<pm);){if(t&&Oe.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(Oe.disposed.has(i))return}if((t?e.tState:e.state)===Gi)iu(e);else if((t?e.tState:e.state)===Ud){const i=Rr;Rr=null,Si(()=>G0(e,n[0]),!1),Rr=i}}}function Si(e,t){if(Rr)return e();let n=!1;t||(Rr=[]),fr?n=!0:fr=[],pm++;try{const r=e();return Ej(n),r}catch(r){n||(fr=null),Rr=null,Sf(r)}}function Ej(e){if(Rr&&(G9(Rr),Rr=null),e)return;let t;if(Oe){if(!Oe.promises.size&&!Oe.queue.size){const r=Oe.sources,i=Oe.disposed;fr.push.apply(fr,Oe.effects),t=Oe.resolve;for(const o of fr)"tState"in o&&(o.state=o.tState),delete o.tState;Oe=null,Si(()=>{for(const o of i)ma(o);for(const o of r){if(o.value=o.tValue,o.owned)for(let s=0,a=o.owned.length;s<a;s++)ma(o.owned[s]);o.tOwned&&(o.owned=o.tOwned),delete o.tValue,delete o.tOwned,o.tState=0}o6(!1)},!1)}else if(Oe.running){Oe.running=!1,Oe.effects.push.apply(Oe.effects,fr),fr=null,o6(!0);return}}const n=fr;fr=null,n.length&&Si(()=>B9(n),!1),t&&t()}function G9(e){for(let t=0;t<e.length;t++)W0(e[t])}function Aj(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:W0(r)}if(Ge.context){if(Ge.count){Ge.effects||(Ge.effects=[]),Ge.effects.push(...e.slice(0,n));return}Ss()}for(Ge.effects&&(Ge.done||!Ge.count)&&(e=[...Ge.effects,...e],n+=Ge.effects.length,delete Ge.effects),t=0;t<n;t++)W0(e[t])}function G0(e,t){const n=Oe&&Oe.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===Gi?i!==t&&(!i.updatedAt||i.updatedAt<pm)&&W0(i):o===Ud&&G0(i,t)}}}function K9(e){const t=Oe&&Oe.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Ud:r.state=Ud,r.pure?Rr.push(r):fr.push(r),r.observers&&K9(r))}}function ma(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--)ma(e.tOwned[t]);delete e.tOwned}if(Oe&&Oe.running&&e.pure)Z9(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)ma(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Oe&&Oe.running?e.tState=0:e.state=0}function Z9(e,t){if(t||(e.tState=0,Oe.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Z9(e.owned[n])}function $0(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function a6(e,t,n){try{for(const r of t)r(e)}catch(r){Sf(r,n&&n.owner||null)}}function Sf(e,t=ht){const n=$d&&t&&t.context&&t.context[$d],r=$0(e);if(!n)throw r;fr?fr.push({fn(){a6(r,n,t)},state:Gi}):a6(r,n,t)}function _y(e){if(typeof e=="function"&&!e.length)return _y(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=_y(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Lj(e,t){return function(r){let i;return Me(()=>i=ct(()=>(ht.context={...ht.context,[e]:r.value},El(()=>r.children))),void 0),i}}const Cy=Symbol("fallback");function K0(e){for(let t=0;t<e.length;t++)e[t]()}function Dj(e,t,n={}){let r=[],i=[],o=[],s=0,a=t.length>1?[]:null;return pe(()=>K0(o)),()=>{let l=e()||[],c=l.length,u,d;return l[Fd],ct(()=>{let f,p,m,g,v,y,w,k,x;if(c===0)s!==0&&(K0(o),o=[],r=[],i=[],s=0,a&&(a=[])),n.fallback&&(r=[Cy],i[0]=Wn(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]=Wn(h);s=c}else{for(m=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--)m[k]=i[w],g[k]=o[w],a&&(v[k]=a[w]);for(f=new Map,p=new Array(k+1),d=k;d>=y;d--)x=l[d],u=f.get(x),p[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?(m[d]=i[u],g[d]=o[u],a&&(v[d]=a[u]),d=p[d],f.set(x,d)):o[u]();for(d=y;d<c;d++)d in m?(i[d]=m[d],o[d]=g[d],a&&(a[d]=v[d],a[d](d))):i[d]=Wn(h);i=i.slice(0,s=c),r=l.slice(0)}return i});function h(f){if(o[d]=f,a){const[p,m]=he(d);return a[d]=m,t(l[d],p)}return t(l[d])}}}function Mj(e,t,n={}){let r=[],i=[],o=[],s=[],a=0,l;return pe(()=>K0(o)),()=>{const c=e()||[],u=c.length;return c[Fd],ct(()=>{if(u===0)return a!==0&&(K0(o),o=[],r=[],i=[],a=0,s=[]),n.fallback&&(r=[Cy],i[0]=Wn(h=>(o[0]=h,n.fallback())),a=1),i;for(r[0]===Cy&&(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]=Wn(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,p]=he(c[l]);return s[l]=p,t(f,l)}}}function b(e,t){return ct(()=>e(t||{}))}function wh(){return!0}const Iy={get(e,t,n){return t===wo?n:e.get(t)},has(e,t){return t===wo?!0:e.has(t)},set:wh,deleteProperty:wh,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:wh,deleteProperty:wh}},ownKeys(e){return e.keys()}};function v1(e){return(e=typeof e=="function"?e():e)?e:{}}function Oj(){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&&wo in a,e[s]=typeof a=="function"?(t=!0,U(a)):a}if(H9&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=v1(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in v1(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(v1(e[a])));return[...new Set(s)]}},Iy);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:Oj.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 ue(e,...t){const n=t.length;if(H9&&wo 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)}},Iy));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))}},Iy)),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 mm(e){let t,n;const r=i=>{const o=Ge.context;if(o){const[a,l]=he();Ge.count||(Ge.count=0),Ge.count++,(n||(n=e())).then(c=>{!Ge.done&&Ss(o),Ge.count--,l(()=>c.default),Ss()}),t=a}else if(!t){const[a]=ns(()=>(n||(n=e())).then(l=>l.default));t=a}let s;return U(()=>(s=t())?ct(()=>{if(!o||Ge.done)return s(i);const a=Ge.context;Ss(o);const l=s(i);return Ss(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}let Pj=0;function fn(){return Ge.context?Ge.getNextContextId():`cl-${Pj++}`}const Y9=e=>`Stale read from <${e}>.`;function Wt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(Dj(()=>e.each,e.children,t||void 0))}function yxe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(Mj(()=>e.each,e.children,t||void 0))}function fe(e){const t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(i,o)=>!i==!o});return U(()=>{const i=r();if(i){const o=e.children;return typeof o=="function"&&o.length>0?ct(()=>o(t?i:()=>{if(!ct(r))throw Y9("Show");return n()})):o}return e.fallback},void 0,void 0)}function Al(e){const t=El(()=>e.children),n=U(()=>{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=U(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:U(u,void 0,{equals:(h,f)=>!h==!f});o=()=>c()||(d()?[a,u,l]:void 0)}return o});return U(()=>{const r=n()();if(!r)return e.fallback;const[i,o,s]=r,a=s.children;return typeof a=="function"&&a.length>0?ct(()=>a(s.keyed?o():()=>{if(ct(n)()?.[0]!==i)throw Y9("Match");return o()})):a},void 0,void 0)}function Mn(e){return e}let Cc;function Rj(){Cc&&[...Cc].forEach(e=>e())}function X9(e){let t;Ge.context&&Ge.load&&(t=Ge.load(Ge.getContextId()));const[n,r]=he(t,void 0);return Cc||(Cc=new Set),Cc.add(r),pe(()=>Cc.delete(r)),U(()=>{let i;if(i=n()){const o=e.fallback;return typeof o=="function"&&o.length?ct(()=>o(i,()=>r())):o}return Cj(()=>e.children,r)},void 0,void 0)}const Nj=yt();function J9(e){let t=0,n,r,i,o,s;const[a,l]=he(!1),c=Tj(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=ko();if(Ge.context&&Ge.load){const p=Ge.getContextId();let m=Ge.load(p);if(m&&(typeof m!="object"||m.s!==1?i=m:Ge.gather(p)),i&&i!=="$$f"){const[g,v]=he(void 0,{equals:!1});o=g,i.then(()=>{if(Ge.done)return v();Ge.gather(p),Ss(r),v(),Ss()},y=>{s=y,v()})}}const h=pt(Nj);h&&(n=h.register(u.inFallback));let f;return pe(()=>f&&f()),b(c.Provider,{value:u,get children(){return U(()=>{if(s)throw s;if(r=Ge.context,o)return o(),o=void 0;r&&i==="$$f"&&Ss();const p=U(()=>e.children);return U(m=>{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,$j(u.effects),p();if(y)return f?m:Wn(w=>(f=w,r&&(Ss({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const zj=["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"],jj=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...zj]),Fj=new Set(["innerHTML","textContent","innerText","children"]),Uj=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Hj=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 Bj(e,t){const n=Hj[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Vj=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),qj=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"]),Wj={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Fe=e=>U(()=>e());function Gj(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 p=t[s];for(;a<u;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const l6="_$DX_DELEGATE";function Kj(e,t,n,r={}){let i;return Wn(o=>{i=o,t===document?e():F(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?()=>ct(()=>document.importNode(i||(i=o()),!0)):()=>(i||(i=o())).cloneNode(!0);return s.cloneNode=s,s}function mr(e,t=window.document){const n=t[l6]||(t[l6]=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,eF))}}function Je(e,t,n){Ll(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Zj(e,t,n,r){Ll(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Yj(e,t,n){Ll(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Ko(e,t){Ll(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Zo(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 Et(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]||(c6(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||(c6(e,a,!0),n[a]=l)}return n}function gm(e,t,n){if(!t)return n?Je(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 ii(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Wr(e,t={},n,r){const i={};return r||Me(()=>i.children=Hd(e,t.children,i.children)),Me(()=>typeof t.ref=="function"&&Sr(t.ref,e)),Me(()=>Xj(e,t,n,!0,i,!0)),i}function Sr(e,t,n){return ct(()=>e(t,n))}function F(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Hd(e,t,r,n);Me(i=>Hd(e,t(),i,n),r)}function Xj(e,t,n,r,i={},o=!1){t||(t={});for(const s in i)if(!(s in t)){if(s==="children")continue;i[s]=u6(e,s,null,i[s],n,o,t)}for(const s in t){if(s==="children")continue;const a=t[s];i[s]=u6(e,s,a,i[s],n,o,t)}}function Jj(e){let t,n;return!Ll()||!(t=Ge.registry.get(n=tF()))?e():(Ge.completed&&Ge.completed.add(t),Ge.registry.delete(n),t)}function Ll(e){return!!Ge.context&&!Ge.done&&(!e||e.isConnected)}function Qj(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function c6(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 u6(e,t,n,r,i,o,s){let a,l,c,u,d;if(t==="style")return gm(e,n,r);if(t==="classList")return Et(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=Vj.has(h);if(!f&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(h,p)}(f||n)&&(Zo(e,h,n,f),f&&mr([h]))}else if(t.slice(0,5)==="attr:")Je(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Yj(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Fj.has(t))||!i&&((u=Bj(t,e.tagName))||(l=jj.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),l=!0;else if(Ll(e))return n;t==="class"||t==="className"?Ko(e,n):a&&!l&&!c?e[Qj(t)]=n:e[u||t]=n}else{const h=i&&t.indexOf(":")>-1&&Wj[t.split(":")[0]];h?Zj(e,h,t,n):Je(e,Uj[t]||t,n)}return n}function eF(e){if(Ge.registry&&Ge.events&&Ge.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}}),Ge.registry&&!Ge.done&&(Ge.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 Hd(e,t,n,r,i){const o=Ll(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=ec(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=ec(e,n,r)}else{if(s==="function")return Me(()=>{let l=t();for(;typeof l=="function";)l=l();n=Hd(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if($y(l,t,n,i))return Me(()=>n=Hd(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=ec(e,n,r),a)return n}else c?n.length===0?d6(e,l,r):Gj(e,n,l):(n&&ec(e),d6(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=ec(e,n,r,t);ec(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function $y(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=$y(e,a,l)||i;else if(c==="function")if(r){for(;typeof a=="function";)a=a();i=$y(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 d6(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ec(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 tF(){return Ge.getNextContextId()}const Ty=!1,nF="http://www.w3.org/2000/svg";function Q9(e,t=!1,n=void 0){return t?document.createElementNS(nF,e):document.createElement(e,{is:n})}function js(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=ko();let o,s=!!Ge.context;return oe(()=>{s&&(ko().user=s=!1),o||(o=_s(i,()=>U(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=he(!1),u=()=>c(!0);Wn(d=>F(a,()=>l()?d():o(),null)),pe(u)}else{const l=Q9(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}),F(c,o),a.appendChild(l),e.ref&&e.ref(l),pe(()=>a.removeChild(l))}},void 0,{render:!s}),n}function rF(e,t){const n=U(e);return U(()=>{const r=n();switch(typeof r){case"function":return ct(()=>r(t));case"string":const i=qj.has(r),o=Ge.context?Jj():Q9(r,i,ct(()=>t.is));return Wr(o,t,i),o}})}function e_(e){const[,t]=ue(e,["component"]);return rF(()=>e.component,t)}const iF="modulepreload",oF=function(e){return"/"+e},f6={},j=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=oF(c),c in f6)return;f6[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":iF,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((f,p)=>{h.addEventListener("load",f),h.addEventListener("error",()=>p(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 yn(e){const t=yt();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=U(()=>{const s=r.ready;return s===void 0||(typeof s=="function"?s():s)});return b(fe,{get when(){return o()},get children(){return b(t.Provider,{value:r,get children(){return n.children}})}})},use(){const n=pt(t);if(!n)throw new Error(`${e.name} context must be used within a context provider`);return n},useOptional(){return pt(t)}}}const{use:bxe,provider:sF}=yn({name:"Data",init:e=>({get store(){return e.data},get directory(){return e.directory},navigateToSession:e.onNavigateToSession,sessionHref:e.onSessionHref,bashInteractive:e.bashInteractive})}),t_=yn({name:"FileComponent",init:e=>e.component}),aF=t_.provider,wxe=t_.use,n_=yt({});function kxe(e){return b(n_.Provider,{get value(){return{open:e.open}},get children(){return e.children}})}function lF(){return pt(n_)}const cF=e=>e!=null,r_=e=>e.filter(cF);function uF(e){return(...t)=>{for(const n of e)n&&n(...t)}}const me=e=>typeof e=="function"&&!e.length?e():e,Z0=e=>Array.isArray(e)?e:e?[e]:[];function dF(e,...t){return typeof e=="function"?e(...t):e}const U2=pe;function fF(e,t,n){if(Ge.context){const[r,i]=he(e,n);return en(()=>i(()=>t())),[r,i]}return he(t(),n)}function i_(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 zn(e,t,n,r){return e.addEventListener(t,n,r),U2(e.removeEventListener.bind(e,t,n,r))}function hF(e,t,n,r){const i=()=>{Z0(me(e)).forEach(o=>{o&&Z0(me(t)).forEach(s=>zn(o,s,n,r))})};typeof e=="function"?oe(i):Me(i)}const y1=Symbol("fallback");function h6(e){for(const t of e)t.dispose()}function pF(e,t,n,r={}){const i=new Map;return pe(()=>h6(i.values())),()=>{const s=e()||[];return s[Fd],ct(()=>{if(!s.length)return h6(i.values()),i.clear(),r.fallback?[Wn(d=>(i.set(y1,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),l=i.get(y1);if(!i.size||l){l?.dispose(),i.delete(y1);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){Wn(u=>{const[d,h]=he(a),f={setItem:h,dispose:u};if(n.length>1){const[p,m]=he(l);f.setIndex=m,f.mapped=n(d,p)}else f.mapped=n(d);i.set(c,f),s[l]=f.mapped})}}function mF(e){const{by:t}=e;return U(pF(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function gF(e,t=ko()){let n=0,r,i;return()=>(n++,pe(()=>{n--,queueMicrotask(()=>{!n&&i&&(i(),i=r=void 0)})}),i||Wn(o=>r=e(i=o),t),r)}function vF(e){const t=ko(),n=gF(e,t);return()=>Ge.context?Wn(e,t):n()}function H2(e,t=!1){const n=window.matchMedia(e),[r,i]=fF(t,()=>n.matches);return zn(n,"change",()=>i(n.matches)),r}function yF(e){return H2("(prefers-color-scheme: dark)",e)}yF.bind(void 0,!1);const bF=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function p6(e){const t={};let n;for(;n=bF.exec(e);)t[n[1]]=n[2];return t}function _r(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=p6(e)}else typeof t=="string"&&(t=p6(t));return{...e,...t}}function ut(...e){return uF(e)}function wF(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Ey(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kF(e){return typeof e=="number"}function gc(e){return Object.prototype.toString.call(e)==="[object String]"}function _f(e){return typeof e=="function"}function Nr(e){return t=>`${e()}-${t}`}function xF(){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 pe(()=>{r()}),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function jn(e,t){return e?e===t||e.contains(t):!1}function cd(e,t=!1){const{activeElement:n}=Gr(e);if(!n?.nodeName)return null;if(o_(n)&&n.contentDocument)return cd(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Gr(n).getElementById(r);if(i)return i}}return n}function B2(e){return Gr(e).defaultView||window}function Gr(e){return e?e.ownerDocument||e:document}function o_(e){return e.tagName==="IFRAME"}var vm=(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))(vm||{});function s_(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 V2(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Cf(){return V2(/^Mac/i)}function SF(){return V2(/^iPhone/i)}function _F(){return V2(/^iPad/i)||Cf()&&navigator.maxTouchPoints>1}function CF(){return SF()||_F()}function IF(){return Cf()||CF()}function a_(){return s_(/AppleWebKit/i)&&!$F()}function $F(){return s_(/Chrome/i)}function je(e,t){return t&&(_f(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Ct(e){return t=>{for(const n of e)je(t,n)}}function TF(e){return Cf()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function mn(e){if(e)if(EF())e.focus({preventScroll:!0});else{const t=AF(e);e.focus(),LF(t)}}var kh=null;function EF(){if(kh==null){kh=!1;try{document.createElement("div").focus({get preventScroll(){return kh=!0,!0}})}catch{}}return kh}function AF(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 LF(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var l_=["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'])"],DF=[...l_,'[tabindex]:not([tabindex="-1"]):not([disabled])'],q2=`${l_.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,MF=DF.join(':not([hidden]):not([tabindex="-1"]),');function c_(e,t){const r=Array.from(e.querySelectorAll(q2)).filter(m6);return t&&m6(e)&&r.unshift(e),r.forEach((i,o)=>{if(o_(i)&&i.contentDocument){const s=i.contentDocument.body,a=c_(s,!1);r.splice(o,1,...a)}}),r}function m6(e){return u_(e)&&!OF(e)}function u_(e){return e.matches(q2)&&W2(e)}function OF(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function W2(e,t){return e.nodeName!=="#comment"&&PF(e)&&RF(e,t)&&(!e.parentElement||W2(e.parentElement,e))}function PF(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 RF(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function d_(e,t,n){const r=t?.tabbable?MF:q2,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){return t?.from?.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&W2(o)&&(!t?.accept||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function g6(e){let t=e;for(;t&&!NF(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function NF(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zF(){}function f_(e){return[e.clientX,e.clientY]}function G2(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],p=(u-h)*(n-c)-(c-d)*(r-u);if(h<u){if(r>=h&&r<u){if(p===0)return!0;p>0&&(r===h?r>f&&(i=!i):i=!i)}}else if(u<h){if(r>u&&r<=h){if(p===0)return!0;p<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 ze(e,t){return ne(e,t)}var Uu=new Map,v6=new Set;function y6(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=Uu.get(n.target);r||(r=new Set,Uu.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Uu.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Uu.delete(n.target)),Uu.size===0)){for(const i of v6)i();v6.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?y6():document.addEventListener("DOMContentLoaded",y6));function Ay(e,t){const n=b6(e,t,"left"),r=b6(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 b6(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 jF(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let i=g6(e);for(;e&&i&&e!==n&&i!==n;)Ay(i,e),e=i,i=g6(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 ym={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"},Bd="data-kb-top-layer",h_,Ly=!1,Ds=[];function Vd(e){return Ds.findIndex(t=>t.node===e)}function FF(e){return Ds[Vd(e)]}function UF(e){return Ds[Ds.length-1].node===e}function p_(){return Ds.filter(e=>e.isPointerBlocking)}function HF(){return[...p_()].slice(-1)[0]}function K2(){return p_().length>0}function m_(e){const t=Vd(HF()?.node);return Vd(e)<t}function BF(e){Ds.push(e)}function VF(e){const t=Vd(e);t<0||Ds.splice(t,1)}function qF(){for(const{node:e}of Ds)e.style.pointerEvents=m_(e)?"none":"auto"}function WF(e){if(K2()&&!Ly){const t=Gr(e);h_=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Ly=!0}}function GF(e){if(K2())return;const t=Gr(e);t.body.style.pointerEvents=h_,t.body.style.length===0&&t.body.removeAttribute("style"),Ly=!1}var pi={layers:Ds,isTopMostLayer:UF,hasPointerBlockingLayer:K2,isBelowPointerBlockingLayer:m_,addLayer:BF,removeLayer:VF,indexOf:Vd,find:FF,assignPointerEventToLayers:qF,disableBodyPointerEvents:WF,restoreBodyPointerEvents:GF},b1="focusScope.autoFocusOnMount",w1="focusScope.autoFocusOnUnmount",w6={bubbles:!1,cancelable:!0},k6={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Ey(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Ey(this.stack,e),this.active()?.resume()}};function bm(e,t){const[n,r]=he(!1),i={pause(){r(!0)},resume(){r(!1)}};let o=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),l=()=>Gr(t()),c=()=>{const p=l().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,ym),p},u=()=>{const p=t();return p?c_(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const p=u();return p.length>0?p[0]:null},h=()=>{const p=u();return p.length>0?p[p.length-1]:null},f=()=>{const p=t();if(!p)return!1;const m=cd(p);return!m||jn(p,m)?!1:u_(m)};oe(()=>{const p=t();if(!p)return;k6.add(i);const m=cd(p);if(!jn(p,m)){const v=new CustomEvent(b1,w6);p.addEventListener(b1,s),p.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{mn(d()),cd(p)===m&&mn(p)},0)}pe(()=>{p.removeEventListener(b1,s),setTimeout(()=>{const v=new CustomEvent(w1,w6);f()&&v.preventDefault(),p.addEventListener(w1,a),p.dispatchEvent(v),v.defaultPrevented||mn(m??l().body),p.removeEventListener(w1,a),k6.remove(i)},0)})}),oe(()=>{const p=t();if(!p||!me(e.trapFocus)||n())return;const m=v=>{const y=v.target;y?.closest(`[${Bd}]`)||(jn(p,y)?o=y:mn(o))},g=v=>{const w=v.relatedTarget??cd(p);w?.closest(`[${Bd}]`)||jn(p,w)||mn(o)};l().addEventListener("focusin",m),l().addEventListener("focusout",g),pe(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",g)})}),oe(()=>{const p=t();if(!p||!me(e.trapFocus)||n())return;const m=c();p.insertAdjacentElement("afterbegin",m);const g=c();p.insertAdjacentElement("beforeend",g);function v(w){const k=d(),x=h();w.relatedTarget===k?mn(x):mn(k)}m.addEventListener("focusin",v),g.addEventListener("focusin",v);const y=new MutationObserver(w=>{for(const k of w)k.previousSibling===g&&(g.remove(),p.insertAdjacentElement("beforeend",g)),k.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});y.observe(p,{childList:!0,subtree:!1}),pe(()=>{m.removeEventListener("focusin",v),g.removeEventListener("focusin",v),m.remove(),g.remove(),y.disconnect()})})}var KF="data-live-announcer";function wm(e){oe(()=>{me(e.isDisabled)||pe(ZF(me(e.targets),me(e.root)))})}var Hu=new WeakMap,Di=[];function ZF(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const h of l.querySelectorAll(`[${KF}], [${Bd}]`))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=Hu.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Hu.set(l,c+1))};Di.length&&Di[Di.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 Di.push(a),()=>{s.disconnect();for(const l of r){const c=Hu.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),Hu.delete(l)):Hu.set(l,c-1)}a===Di[Di.length-1]?(Di.pop(),Di.length&&Di[Di.length-1].observe()):Di.splice(Di.indexOf(a),1)}}var x6="interactOutside.pointerDownOutside",S6="interactOutside.focusOutside";function YF(e,t){let n,r=zF;const i=()=>Gr(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(`[${Bd}]`)||!jn(i(),h)||jn(t(),h)?!1:!e.shouldExcludeElement?.(h)},c=d=>{function h(){const f=t(),p=d.target;if(!f||!p||!l(d))return;const m=Ct([o,a]);p.addEventListener(x6,m,{once:!0});const g=new CustomEvent(x6,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||TF(d)&&d.button===0}});p.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 p=Ct([s,a]);f.addEventListener(S6,p,{once:!0});const m=new CustomEvent(S6,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});f.dispatchEvent(m)};oe(()=>{me(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),pe(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}function XF(e){const t=n=>{n.key===vm.Escape&&e.onEscapeKeyDown?.(n)};oe(()=>{if(me(e.isDisabled))return;const n=e.ownerDocument?.()??Gr();n.addEventListener("keydown",t),pe(()=>{n.removeEventListener("keydown",t)})})}function qe(e){const[t,n]=ue(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return b(e_,ne(n,{get component(){return t.as}}))}var g_=yt();function JF(){return pt(g_)}function ou(e){let t;const n=JF(),[r,i]=ue(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?.()}};YF({shouldExcludeElement:d=>t?r.excludedElements?.some(h=>jn(h(),d))||[...o].some(h=>jn(h,d)):!1,onPointerDownOutside:d=>{!t||pi.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!pi.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),XF({ownerDocument:()=>Gr(t),onEscapeKeyDown:d=>{!t||!pi.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),en(()=>{if(!t)return;pi.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);pi.assignPointerEventToLayers(),pi.disableBodyPointerEvents(t),pe(()=>{t&&(pi.removeLayer(t),d?.(),pi.assignPointerEventToLayers(),pi.restoreBodyPointerEvents(t))})}),oe(wt([()=>t,()=>r.disableOutsidePointerEvents],([d,h])=>{if(!d)return;const f=pi.find(d);f&&f.isPointerBlocking!==h&&(f.isPointerBlocking=h,pi.assignPointerEventToLayers()),h&&pi.disableBodyPointerEvents(d),pe(()=>{pi.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:s};return b(g_.Provider,{value:u,get children(){return b(qe,ne({as:"div",ref(d){var h=ut(f=>t=f,r.ref);typeof h=="function"&&h(d)}},i))}})}function Dl(e){const[t,n]=he(e.defaultValue?.()),r=U(()=>e.value?.()!==void 0),i=U(()=>r()?e.value?.():t());return[i,s=>{ct(()=>{const a=dF(s,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function v_(e){const[t,n]=Dl(e);return[()=>t()??!1,n]}function QF(e){const[t,n]=Dl(e);return[()=>t()??[],n]}function Fs(e={}){const[t,n]=v_({value:()=>me(e.open),defaultValue:()=>!!me(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 If(e,t){const[n,r]=he(_6(t?.()));return oe(()=>{r(e()?.tagName.toLowerCase()||_6(t?.()))}),n}function _6(e){return gc(e)?e:void 0}var eU=Object.defineProperty,Cr=(e,t)=>{for(var n in t)eU(e,n,{get:t[n],enumerable:!0})},tU={};Cr(tU,{Button:()=>Z2,Root:()=>rs});var nU=["button","color","file","image","reset","submit"];function rU(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?nU.indexOf(e.type)!==-1:!1}function rs(e){let t;const n=ze({type:"button"},e),[r,i]=ue(n,["ref","type","disabled"]),o=If(()=>t,()=>"button"),s=U(()=>{const c=o();return c==null?!1:rU({tagName:c,type:r.type})}),a=U(()=>o()==="input"),l=U(()=>o()==="a"&&t?.getAttribute("href")!=null);return b(qe,ne({as:"button",ref(c){var u=ut(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return Fe(()=>!!(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 Fe(()=>!!(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 Z2=rs;function an(e){return t=>(e(t),()=>e(void 0))}var Ar=e=>typeof e=="function"?e():e,Dy=(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},xh=new Map,iU=e=>{oe(()=>{const t=Ar(e.style)??{},n=Ar(e.properties)??[],r={};for(const o in t)r[o]=e.element.style[o];const i=xh.get(e.key);i?i.activeCount++:xh.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);pe(()=>{const o=xh.get(e.key);if(o){if(o.activeCount!==1){o.activeCount--;return}xh.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?.()}})})},C6=iU,oU=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},sU=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},aU=(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]=oU(i,t),d=u-l-r*c;(c!==0||d!==0)&&sU(i,t)&&(o+=d,s+=c),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[o,s]},[I6,$6]=he([]),lU=e=>I6().indexOf(e)===I6().length-1,cU=e=>{const t=ne({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=fn();let r=[0,0],i=null,o=null;oe(()=>{Ar(t.enabled)&&($6(c=>[...c,n]),pe(()=>{$6(c=>c.filter(u=>u!==n))}))}),oe(()=>{if(!Ar(t.enabled)||!Ar(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(Ar(t.preventScrollbarShift)){const d={overflow:"hidden"},h=[];u>0&&(Ar(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,p=window.scrollX;C6({key:"prevent-scroll",element:c,style:d,properties:h,cleanup:()=>{Ar(t.restoreScrollPosition)&&u>0&&window.scrollTo(p,f)}})}else C6({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),oe(()=>{!lU(n)||!Ar(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),pe(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=T6(c),i=null,o=null},a=c=>{const u=c.target,d=Ar(t.element),h=uU(c),f=Math.abs(h[0])>Math.abs(h[1])?"x":"y",p=f==="x"?h[0]:h[1],m=E6(u,f,p,d);let g;d&&Dy(d,u)?g=!m:g=!0,g&&c.cancelable&&c.preventDefault()},l=c=>{const u=Ar(t.element),d=c.target;let h;if(c.touches.length===2)h=!Ar(t.allowPinchZoom);else{if(i==null||o===null){const f=T6(c).map((m,g)=>r[g]-m),p=Math.abs(f[0])>Math.abs(f[1])?"x":"y";i=p,o=p==="x"?f[0]:f[1]}if(d.type==="range")h=!1;else{const f=E6(d,i,o,u);u&&Dy(u,d)?h=!f:h=!0}}h&&c.cancelable&&c.preventDefault()}},uU=e=>[e.deltaX,e.deltaY],T6=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],E6=(e,t,n,r)=>{const i=r!==null&&Dy(r,e),[o,s]=aU(e,t,i?r:void 0);return!(n>0&&Math.abs(o)<=1||n<0&&Math.abs(s)<1)},dU=cU,km=dU,fU=e=>{const t=U(()=>{const s=Ar(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,i]=he(Ar(e.show)?"present":"hidden");let o="none";return oe(s=>{const a=Ar(e.show);return ct(()=>{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}),oe(()=>{const s=Ar(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),pe(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:i}},hU=fU,xo=hU,pU={};Cr(pU,{CloseButton:()=>b_,Content:()=>w_,Description:()=>k_,Dialog:()=>ca,Overlay:()=>x_,Portal:()=>S_,Root:()=>__,Title:()=>C_,Trigger:()=>I_,useDialogContext:()=>$a});var y_=yt();function $a(){const e=pt(y_);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function b_(e){const t=$a(),[n,r]=ue(e,["aria-label","onClick"]);return b(rs,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{je(o,n.onClick),t.close()}},r))}function w_(e){let t;const n=$a(),r=ze({id:n.generateId("content")},e),[i,o]=ue(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)),jn(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&a&&h.preventDefault())},d=h=>{i.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),mn(n.triggerRef())):(h.defaultPrevented||(s||mn(n.triggerRef()),h.preventDefault()),s=!1,a=!1)};return wm({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),km({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),bm({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),oe(()=>pe(n.registerContentId(o.id))),b(fe,{get when(){return n.contentPresent()},get children(){return b(ou,ne({ref(h){var f=ut(p=>{n.setContentRef(p),t=p},i.ref);typeof f=="function"&&f(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Fe(()=>!!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 k_(e){const t=$a(),n=ze({id:t.generateId("description")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerDescriptionId(r.id))),b(qe,ne({as:"p",get id(){return r.id}},i))}function x_(e){const t=$a(),[n,r]=ue(e,["ref","style","onPointerDown"]),i=o=>{je(o,n.onPointerDown),o.target===o.currentTarget&&o.preventDefault()};return b(fe,{get when(){return t.overlayPresent()},get children(){return b(qe,ne({as:"div",ref(o){var s=ut(t.setOverlayRef,n.ref);typeof s=="function"&&s(o)},get style(){return _r({"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 S_(e){const t=$a();return b(fe,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return b(js,e)}})}var A6={dismiss:"Dismiss"};function __(e){const t=`dialog-${fn()}`,n=ze({id:t,modal:!0,translations:A6},e),[r,i]=he(),[o,s]=he(),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),m=Fs({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),g=()=>n.forceMount||m.isOpen(),{present:v}=xo({show:g,element:()=>c()??null}),{present:y}=xo({show:g,element:()=>d()??null}),w={translations:()=>n.translations??A6,isOpen:m.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:m.close,toggle:m.toggle,setTriggerRef:p,generateId:Nr(()=>n.id),registerContentId:an(i),registerTitleId:an(s),registerDescriptionId:an(l)};return b(y_.Provider,{value:w,get children(){return n.children}})}function C_(e){const t=$a(),n=ze({id:t.generateId("title")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerTitleId(r.id))),b(qe,ne({as:"h2",get id(){return r.id}},i))}function I_(e){const t=$a(),[n,r]=ue(e,["ref","onClick"]);return b(rs,ne({ref(o){var s=ut(t.setTriggerRef,n.ref);typeof s=="function"&&s(o)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Fe(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:o=>{je(o,n.onClick),t.toggle()}},r))}var ca=Object.assign(__,{CloseButton:b_,Content:w_,Description:k_,Overlay:x_,Portal:S_,Title:C_,Trigger:I_}),mU=ee("<div data-component=dialog-stack>");const $_=yt();function gU(){const[e,t]=he(),n={current:void 0},r={value:!1};pe(()=>{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 oe(()=>{if(!e())return;zn(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=_s(a,()=>Wn(p=>{d=p;const[m,g]=he(!1);return h=g,b(ca,{modal:!0,get open(){return!m()},onOpenChange:v=>{v||i()},get children(){return b(ca.Portal,{get children(){return[b(ca.Overlay,{"data-component":"dialog-overlay",onClick:i}),Fe(()=>s())]}})}})}));!d||!h||t({id:u,node:f,dispose:d,owner:a,onClose:l,setClosing:h})}}}function vU(e){const t=gU();return b($_.Provider,{value:t,get children(){return[Fe(()=>e.children),(()=>{var n=mU();return F(n,()=>t.active?.node),n})()]}})}function To(){const e=pt($_),t=ko();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 T_={"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 yU(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 bU={locale:()=>"en",t:(e,t)=>{const n=T_[e]??String(e);return yU(n,t)}},E_=yt(bU);function wU(e){return b(E_.Provider,{get value(){return e.value},get children(){return e.children}})}function is(){return pt(E_)}function Y2(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ml=Y2();function A_(e){Ml=e}var Td={exec:()=>null};function Bt(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(Hr.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var kU=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Hr={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")},xU=/^(?:[ \t]*(?:\n|$))+/,SU=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_U=/^ {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+|$)/,CU=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,X2=/(?:[*+-]|\d{1,9}[.)])/,L_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,D_=Bt(L_).replace(/bull/g,X2).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(),IU=Bt(L_).replace(/bull/g,X2).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(),J2=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$U=/^[^\n]+/,Q2=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,TU=Bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q2).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),EU=Bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,X2).getRegex(),xm="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",ew=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,AU=Bt("^ {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",ew).replace("tag",xm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M_=Bt(J2).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",xm).getRegex(),LU=Bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",M_).getRegex(),tw={blockquote:LU,code:SU,def:TU,fences:_U,heading:CU,hr:$f,html:AU,lheading:D_,list:EU,newline:xU,paragraph:M_,table:Td,text:$U},L6=Bt("^ *([^\\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",xm).getRegex(),DU={...tw,lheading:IU,table:L6,paragraph:Bt(J2).replace("hr",$f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",L6).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",xm).getRegex()},MU={...tw,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ew).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:Td,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(J2).replace("hr",$f).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",D_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},OU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,PU=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,O_=/^( {2,}|\\)\n(?!\s*$)/,RU=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sm=/[\p{P}\p{S}]/u,nw=/[\s\p{P}\p{S}]/u,P_=/[^\s\p{P}\p{S}]/u,NU=Bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,nw).getRegex(),R_=/(?!~)[\p{P}\p{S}]/u,zU=/(?!~)[\s\p{P}\p{S}]/u,jU=/(?:[^\s\p{P}\p{S}]|~)/u,FU=Bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",kU?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),N_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,UU=Bt(N_,"u").replace(/punct/g,Sm).getRegex(),HU=Bt(N_,"u").replace(/punct/g,R_).getRegex(),z_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BU=Bt(z_,"gu").replace(/notPunctSpace/g,P_).replace(/punctSpace/g,nw).replace(/punct/g,Sm).getRegex(),VU=Bt(z_,"gu").replace(/notPunctSpace/g,jU).replace(/punctSpace/g,zU).replace(/punct/g,R_).getRegex(),qU=Bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P_).replace(/punctSpace/g,nw).replace(/punct/g,Sm).getRegex(),WU=Bt(/\\(punct)/,"gu").replace(/punct/g,Sm).getRegex(),GU=Bt(/^<(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(),KU=Bt(ew).replace("(?:-->|$)","-->").getRegex(),ZU=Bt("^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",KU).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,YU=Bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Y0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),j_=Bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Y0).replace("ref",Q2).getRegex(),F_=Bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q2).getRegex(),XU=Bt("reflink|nolink(?!\\()","g").replace("reflink",j_).replace("nolink",F_).getRegex(),D6=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rw={_backpedal:Td,anyPunctuation:WU,autolink:GU,blockSkip:FU,br:O_,code:PU,del:Td,emStrongLDelim:UU,emStrongRDelimAst:BU,emStrongRDelimUnd:qU,escape:OU,link:YU,nolink:F_,punctuation:NU,reflink:j_,reflinkSearch:XU,tag:ZU,text:RU,url:Td},JU={...rw,link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Y0).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y0).getRegex()},My={...rw,emStrongRDelimAst:VU,emStrongLDelim:HU,url:Bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",D6).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:Bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",D6).getRegex()},QU={...My,br:Bt(O_).replace("{2,}","*").getRegex(),text:Bt(My.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sh={normal:tw,gfm:DU,pedantic:MU},Bu={normal:rw,gfm:My,breaks:QU,pedantic:JU},eH={"&":"&","<":"<",">":">",'"':""","'":"'"},M6=e=>eH[e];function ws(e,t){if(t){if(Hr.escapeTest.test(e))return e.replace(Hr.escapeReplace,M6)}else if(Hr.escapeTestNoEncode.test(e))return e.replace(Hr.escapeReplaceNoEncode,M6);return e}function O6(e){try{e=encodeURI(e).replace(Hr.percentDecode,"%")}catch{return null}return e}function P6(e,t){let n=e.replace(Hr.findPipe,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Hr.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(Hr.slashPipe,"|");return r}function Vu(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 tH(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 R6(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 nH(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(`
|
|
@@ -2365,7 +2365,7 @@ $$`:`${e}$$`},zQ=e=>PQ(e)%2===0?e:NQ(e),jQ=e=>RQ(e)%2===1?`${e}$`:e,FQ=(e,t,n)=>
|
|
|
2365
2365
|
`).at(-1)?.trim()??"";return!new RegExp(`^[\\t ]{0,3}${r}{${i},}[\\t ]*$`).test(o)}function c7(e){return eee(e,{linkMode:"text-only"})}function bv(e,t){if(!t)return[{raw:e,src:e,mode:"full"}];const n=c7(e);if(tee(e))return[{raw:e,src:n,mode:"live"}];const r=Xt.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(!nee(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:c7(a),mode:"live"},{raw:s.raw,src:s.raw,mode:"live"}]:[{raw:s.raw,src:s.raw,mode:"live"}]}var ree={};Cr(ree,{CloseButton:()=>vT,Description:()=>yT,List:()=>wT,ProgressFill:()=>kT,ProgressTrack:()=>xT,Region:()=>ST,Root:()=>_T,Title:()=>CT,Toast:()=>Ns,toaster:()=>sl,useToastContext:()=>Rf});var gT=yt();function Rf(){const e=pt(gT);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function vT(e){const t=Rf(),[n,r]=ue(e,["aria-label","onClick"]);return b(rs,ne({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:o=>{je(o,n.onClick),t.close()}},r))}function yT(e){const t=Rf(),n=ze({id:t.generateId("description")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerDescriptionId(r.id))),b(qe,ne({as:"div",get id(){return r.id}},i))}var bT=yt();function Xw(){const e=pt(bT);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function wT(e){let t;const n=Xw(),[r,i]=ue(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),o=c=>{je(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{je(c,r.onFocusOut),jn(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{je(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},l=c=>{je(c,r.onPointerLeave),jn(t,Gr(t).activeElement)||n.resumeAllTimer()};return oe(wt([()=>t,()=>n.hotkey()],([c,u])=>{if(!c)return;const d=Gr(c),h=f=>{u.every(m=>f[m]||f.code===m)&&mn(c)};d.addEventListener("keydown",h),pe(()=>d.removeEventListener("keydown",h))})),oe(()=>{if(!n.pauseOnPageIdle())return;const c=B2(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),pe(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),b(qe,ne({as:"ol",ref(c){var u=ut(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(Wt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function kT(e){const t=Xw(),n=Rf(),[r,i]=ue(e,["style"]),[o,s]=he(100);let a=0;return oe(()=>{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)});pe(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(l)})}),b(qe,ne({as:"div",get style(){return _r({"--kb-toast-progress-fill-width":`${o()}%`},r.style)}},i))}function xT(e){return b(qe,ne({as:"div","aria-hidden":"true",role:"presentation"},e))}var[Jw,Nf]=et({toasts:[]});function iee(e){Nf("toasts",t=>[...t,e])}function oee(e){return Jw.toasts.find(t=>t.id===e)}function see(e,t){const n=Jw.toasts.findIndex(r=>r.id===e);n!==-1&&Nf("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function aee(e){Nf("toasts",t=>t.id===e,"dismiss",!0)}function lee(e){Nf("toasts",t=>t.filter(n=>n.id!==e))}function cee(){Nf("toasts",[])}var yl={toasts:()=>Jw.toasts,add:iee,get:oee,update:see,dismiss:aee,remove:lee,clear:cee},u7="{hotkey}",uee={close:"Close"},dee={notifications:e=>`Notifications (${e})`};function ST(e){const t=ze({id:`toast-region-${fn()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:dee},e),[n,r]=ue(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),i=U(()=>yl.toasts().filter(h=>h.region===n.regionId&&h.dismiss===!1).slice(0,n.limit)),[o,s]=he(!1),a=()=>i().length>0,l=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(u7)).replace(u7,l()),u=()=>({[Bd]: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:Nr(()=>r.id)};return b(bT.Provider,{value:d,get children(){return b(qe,ne({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return _r({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},u,r))}})}var fee="toast.swipeStart",hee="toast.swipeMove",pee="toast.swipeCancel",mee="toast.swipeEnd";function _T(e){const t=Xw(),n=ze({id:`toast-${fn()}`,priority:"high",translations:uee},e),[r,i]=ue(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[o,s]=he(!0),[a,l]=he(),[c,u]=he(),[d,h]=he(!0),[f,p]=he(),{present:m}=xo({show:o,element:()=>f()??null}),g=U(()=>r.duration||t.duration());let v,y=0,w=g(),k=null,x=null;const C=()=>{s(!1),h(!0)},S=()=>{yl.remove(r.toastId)},I=R=>{!R||r.persistent||(window.clearTimeout(v),y=new Date().getTime(),v=window.setTimeout(C,R))},M=()=>{I(w),r.onResume?.()},D=()=>{const R=new Date().getTime()-y;w=w-R,window.clearTimeout(v),r.onPause?.()},O=R=>{je(R,r.onKeyDown),R.key==="Escape"&&(r.onEscapeKeyDown?.(R),R.defaultPrevented||C())},$=R=>{je(R,r.onPointerDown),R.button===0&&(k={x:R.clientX,y:R.clientY})},E=R=>{if(je(R,r.onPointerMove),!k)return;const G=R.clientX-k.x,K=R.clientY-k.y,q=!!x,W=["left","right"].includes(t.swipeDirection()),N=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,V=W?N(0,G):0,J=W?0:N(0,K),ie=R.pointerType==="touch"?10:2,re={x:V,y:J},ve={originalEvent:R,delta:re};if(q){x=re,Zh(hee,r.onSwipeMove,ve);const{x:ce,y:ae}=re;R.currentTarget.setAttribute("data-swipe","move"),R.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${ce}px`),R.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${ae}px`)}else d7(re,t.swipeDirection(),ie)?(x=re,Zh(fee,r.onSwipeStart,ve),R.currentTarget.setAttribute("data-swipe","start"),R.target.setPointerCapture(R.pointerId)):(Math.abs(G)>ie||Math.abs(K)>ie)&&(k=null)},A=R=>{je(R,r.onPointerUp);const G=x,K=R.target;if(K.hasPointerCapture(R.pointerId)&&K.releasePointerCapture(R.pointerId),x=null,k=null,G){const q=R.currentTarget,W={originalEvent:R,delta:G};if(d7(G,t.swipeDirection(),t.swipeThreshold())){Zh(mee,r.onSwipeEnd,W);const{x:N,y:V}=G;R.currentTarget.setAttribute("data-swipe","end"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),R.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${N}px`),R.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${V}px`),C()}else Zh(pee,r.onSwipeCancel,W),R.currentTarget.setAttribute("data-swipe","cancel"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),R.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");q.addEventListener("click",N=>N.preventDefault(),{once:!0})}};en(()=>{t.toasts().find(R=>R.id===r.toastId&&R.update)&&h(!1)}),oe(wt(()=>t.isPaused(),R=>{R?D():M()},{defer:!0})),oe(wt([o,g],([R,G])=>{R&&!t.isPaused()&&I(G)})),oe(wt(()=>yl.get(r.toastId)?.dismiss,R=>R&&C())),oe(wt(()=>m(),R=>!R&&S()));const T={translations:()=>r.translations,close:C,duration:g,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:Nr(()=>i.id),registerTitleId:an(l),registerDescriptionId:an(u)};return b(fe,{get when(){return m()},get children(){return b(gT.Provider,{value:T,get children(){return b(qe,ne({as:"li",ref(R){var G=ut(p,r.ref);typeof G=="function"&&G(R)},role:"status",tabIndex:0,get style(){return _r({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:O,onPointerDown:$,onPointerMove:E,onPointerUp:A},i))}})}})}function d7(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 Zh(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 CT(e){const t=Rf(),n=ze({id:t.generateId("title")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerTitleId(r.id))),b(qe,ne({as:"div",get id(){return r.id}},i))}var gee=0;function IT(e,t){const n=gee++;return yl.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function Cb(e,t){yl.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function vee(e,t,n){const r=IT(i=>t({get toastId(){return i.toastId},state:"pending"}),n);return(_f(e)?e():e).then(i=>Cb(r,o=>t({get toastId(){return o.toastId},state:"fulfilled",data:i}))).catch(i=>Cb(r,o=>t({get toastId(){return o.toastId},state:"rejected",error:i}))),r}function yee(e){return yl.dismiss(e),e}function bee(){yl.clear()}var sl={show:IT,update:Cb,promise:vee,dismiss:yee,clear:bee},Ns=Object.assign(_T,{CloseButton:vT,Description:yT,List:wT,ProgressFill:kT,ProgressTrack:xT,Region:ST,Title:CT,toaster:sl});const wee=[["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"}]],kee=[["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"}]],xee=[["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"}]],See=[["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"}]],_ee=[["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"}]],Cee=[["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"}]],f7=[["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"}]],h7=[["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"}]],Iee=[["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"}]],$ee=[["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"}]],p7=[["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"}]],Tee=[["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"}]],m7=[["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"}]],Eee=[["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"}]],g7=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],v7=[["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"}]],Aee=[["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"}]],y7=[["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"}]],Lee=[["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"}]],Dee=[["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"}]],Mee=[["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"}]],Oee=[["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"}]],Pee=[["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"}]],Ree=[["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"}]],Nee=[["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"}]],zee=[["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"}]],jee=[["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"}]],Fee=[["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"}]],Uee=[["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"}]],Hee=[["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"}]],Bee=[["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"}]],b7=[["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"}]],Vee=[["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"}]],qee=[["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"}]],wv=[["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"}]],Wee=[["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"}]],w7=[["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"}]],k7=[["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"}]],Gee=[["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"}]],Kee=[["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"}]],Zee=[["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"}]],Yee=[["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"}]],Xee=[["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"}]],Jee=[["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"}]],Qee=[["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"}]],ete=[["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"}]],x7=[["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"}]],tte=[["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"}]],nte=[["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"}]],rte=[["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"}]],kv=[["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"}]],xv=[["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"}]],Sv=[["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"}]],ite=[["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"}]],ote=[["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"}]],ste=[["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"}]],ate=[["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"}]],lte=[["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"}]],cte=[["path",{d:"M20 12L4 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],ute=[["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"}]],dte=[["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"}]],S7=[["path",{d:"M12 4V20M20 12H4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],_7=[["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"}]],fte=[["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"}]],hte=[["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"}]],pte=[["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"}]],mte=[["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"}]],gte=[["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"}]],vte=[["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"}]],yte=[["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"}]],bte=[["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"}]],C7=[["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"}]],wte=[["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"}]],I7=[["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"}]],kte=[["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"}]],xte=[["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"}]],$7=[["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"}]],Ste=[["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"}]],T7=[["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"}]],Fxe=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var _te=ee('<div data-component=icon><svg data-slot=icon-svg fill=none viewBox="0 0 24 24"aria-hidden=true>');const Cte={"align-right":Ste,sparkle:I7,globe:Jee,"arrow-up":$ee,"arrow-left":f7,"arrow-right":h7,archive:xee,"bubble-5":m7,prompt:Aee,brain:Tee,fork:Yee,"bullet-list":ite,"check-small":T7,"chevron-down":_ee,"chevron-left":f7,"chevron-right":h7,"chevron-grabber-vertical":p7,"chevron-double-right":Iee,"circle-x":v7,close:g7,"close-small":g7,checklist:y7,console:Nee,ssh:wee,terminal:$7,"terminal-active":$7,review:k7,"review-active":k7,expand:Wee,collapse:Ree,code:Pee,"code-lines":Mee,"circle-ban-sign":v7,"edit-small-2":wv,eye:w7,enter:hte,folder:Gee,"file-tree":x7,"file-tree-active":x7,"magnifying-glass":pte,"plus-small":S7,plus:S7,screenshot:Eee,"new-session":wv,"new-session-active":wv,"pencil-line":dte,mcp:ate,glasses:w7,"magnifying-glass-menu":mte,"window-cursor":Uee,task:y7,stop:xte,status:_7,"status-active":_7,sidebar:C7,"sidebar-active":C7,"layout-left":xv,"layout-left-partial":xv,"layout-left-full":xv,"layout-right":Sv,"layout-right-partial":Sv,"layout-right-full":Sv,"square-arrow-top-right":kte,"open-file":ste,"speech-bubble":m7,comment:zee,"folder-add-left":Kee,home:tte,bell:ute,github:Xee,discord:Bee,"layout-bottom":kv,"layout-bottom-partial":kv,"layout-bottom-full":kv,"dot-grid":Vee,"circle-check":Lee,copy:jee,check:T7,photo:nte,share:yte,shield:bte,download:b7,menu:lte,server:gte,branch:Zee,edit:qee,help:ete,"settings-gear":vte,dash:cte,"cloud-upload":Dee,trash:Hee,sliders:wte,keyboard:rte,selector:p7,"arrow-down-to-line":b7,warning:kee,reset:fte,link:ote,providers:Fee,models:I7,"arrow-undo-down":Cee,name:Qee,"code-square":Oee,"data-transfer":See};function Gt(e){const[t,n]=ue(e,["name","size","class","classList"]),r=U(()=>Ite(Cte[t.name]));return(()=>{var i=_te(),o=i.firstChild;return Wr(o,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}},get innerHTML(){return r()}},n),!0,!1),Me(()=>Je(i,"data-size",t.size||"normal")),i})()}const Ite=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+=` ${$te(i)}="${Tte(String(o))}"`}t+=" />"}return t},$te=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},Tte=e=>e.replace(/[&"<]/g,t=>t==="&"?"&":t==='"'?""":"<");function oi(e){const[t,n]=ue(e,["variant","size","iconSize","class","classList"]);return b(Z2,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(Gt,{get name(){return e.icon},get size(){return t.iconSize??(t.size==="large"?"normal":"small")}})}}))}var Ete=ee("<div data-slot=toast-icon>"),Ate=ee("<div data-slot=toast-content>"),Lte=ee("<div data-slot=toast-actions>"),Dte=ee("<button data-slot=toast-action>");function Mte(e){return b(js,{get children(){return b(Ns.Region,ne({"data-component":"toast-region"},e,{get children(){return b(Ns.List,{"data-slot":"toast-list"})}}))}})}function Ote(e){return b(Ns,ne({"data-component":"toast",get classList(){return{...e.classList,[e.class??""]:!!e.class}}},e))}function Pte(e){return(()=>{var t=Ete();return F(t,b(Gt,{get name(){return e.name}})),t})()}function Rte(e){return(()=>{var t=Ate();return Wr(t,e,!1,!1),t})()}function Nte(e){return b(Ns.Title,ne({"data-slot":"toast-title"},e))}function zte(e){return b(Ns.Description,ne({"data-slot":"toast-description"},e))}function jte(e){return(()=>{var t=Lte();return Wr(t,e,!1,!1),t})()}function Fte(e){const t=is();return b(Ns.CloseButton,ne({"data-slot":"toast-close-button",as:oi,icon:"close",variant:"ghost",get"aria-label"(){return t.t("ui.common.dismiss")}},e))}function Ute(e){return b(Ns.ProgressTrack,ne({"data-slot":"toast-progress-track"},e))}function Hte(e){return b(Ns.ProgressFill,ne({"data-slot":"toast-progress-fill"},e))}const ra=Object.assign(Ote,{Region:Mte,Icon:Pte,Content:Rte,Title:Nte,Description:zte,Actions:jte,CloseButton:Fte,ProgressTrack:Ute,ProgressFill:Hte});function E7(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 A7=new Map;function Ot(e){const t=typeof e=="string"?{description:e}:e,n={...t,title:E7(t.title),description:E7(t.description)};if(n.id){const i=A7.get(n.id);i!==void 0&&sl.dismiss(i)}const r=sl.show(i=>b(ra,{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(fe,{get when(){return n.icon},get children(){return b(ra.Icon,{get name(){return n.icon}})}}),b(ra.Content,{get children(){return[b(fe,{get when(){return n.title},get children(){return b(ra.Title,{get children(){return n.title}})}}),b(fe,{get when(){return n.description},get children(){return b(ra.Description,{get children(){return n.description}})}}),b(fe,{get when(){return n.actions?.length},get children(){return b(ra.Actions,{get children(){return n.actions.map(o=>(()=>{var s=Dte();return s.$$click=()=>{typeof o.onClick=="function"&&o.onClick(),sl.dismiss(i.toastId)},F(s,()=>o.label),s})())}})}})]}}),b(ra.CloseButton,{})]}}));return n.id&&A7.set(n.id,r),r}mr(["click"]);async function Qw(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 Bte=ee("<div data-component=markdown>");const Vte=200,aa=new Map;typeof window<"u"&&Ep.isSupported&&Ep.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 qte={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"]},Ib={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 Wte(e){return Ep.isSupported?Ep.sanitize(e,qte):""}function $T(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function L7(e){return $T(e).replace(/\r\n?/g,`
|
|
2366
2366
|
`).replace(/\n/g,"<br>")}const Ba=new Map,Gte=200;function _v(e){const t=$T(e).replace(/\r\n?/g,`
|
|
2367
2367
|
`);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===`
|
|
2368
|
-
`){i(),n+="<br>",o++;continue}if(s===" "||s===" "){i(),n+=s,o++;continue}r+=s,o++}return i(),n}function Kte(e){if(e.length<32)return _v(e);const t=yi(e);if(!t)return _v(e);const n=Ba.get(t);if(n!==void 0)return Ba.delete(t),Ba.set(t,n),n;const r=_v(e);if(Ba.set(t,r),Ba.size>Gte){const i=Ba.keys().next().value;i!==void 0&&Ba.delete(i)}return r}const Zte=/^https?:\/\/[^\s<>()`"']+$/;let Yh,Yte=0;function Xte(e){const t=e.trim().replace(/[),.;!?]+$/,"");if(Zte.test(t))try{return new URL(t).toString()}catch{return}}function Jte(){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 Qte(){return Yh||(Yh=j(()=>import("./mermaid.core-KG6fOqNp.js").then(e=>e.bC),[]).then(e=>(e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:Jte()?"dark":"default",themeVariables:{background:"transparent",fontFamily:"var(--font-family-sans)"}}),e.default)),Yh)}function ene(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 tne(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 nne="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",TT=`@?(?:(?:\\.{1,2}\\/|\\/)?(?:[\\w.$+@ -]+\\/)+[\\w.$+@ -]+\\.[A-Za-z0-9]{1,16}|[\\w.@+-]+\\.(?:${nne}))`,D7=new RegExp(`(^|[\\s([{"'])(${TT})(?::(\\d+)(?:-(\\d+))?)?`,"g"),rne=new RegExp(`^(${TT})(?::(\\d+)(?:-(\\d+))?)?$`);function e4(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 ET(e){return e.startsWith("@")?e.slice(1):e}function ine(e){const t=e.trim().match(rne);if(t?.[1])return{raw:e.trim(),path:ET(t[1]),index:0,end:e.trim().length,selection:e4(t[2],t[3])}}function one(e){const t=[];D7.lastIndex=0;let n;for(;n=D7.exec(e);){const r=n[1]??"",i=n[2];if(!i)continue;const o=n[0].slice(r.length);t.push({raw:o,path:ET(i),index:n.index+r.length,end:n.index+n[0].length,selection:e4(n[3],n[4])})}return t}function $b(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 M7(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($b(Ib.copy,"copy-icon")),t.appendChild($b(Ib.check,"check-icon")),t}function N0(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 sne(e,t){t&&(e.dataset.fileReferenceLineStart=String(t.startLine),t.endLine&&(e.dataset.fileReferenceLineEnd=String(t.endLine)))}function ane(e){const t=e.dataset.fileReferenceLineStart;if(t)return e4(t,e.dataset.fileReferenceLineEnd)}function AT(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,sne(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($b(Ib.copy,"copy-icon")),r.appendChild(i),r.appendChild(o),r}function lne(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(M7(t));return}const i=Array.from(n.querySelectorAll('[data-slot="markdown-copy-button"]')).filter(o=>o instanceof HTMLButtonElement);if(i.length===0){n.appendChild(M7(t));return}for(const o of i.slice(1))o.remove()}function cne(e){const t=Array.from(e.querySelectorAll(":not(pre) > code"));for(const n of t){const r=Xte(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 une(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=ine(r.textContent??"");i&&r.replaceWith(AT(i,r.textContent??i.raw,t))}}function dne(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=one(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(AT(c,c.raw,t)),l=c.end;l<o.data.length&&a.appendChild(document.createTextNode(o.data.slice(l))),o.replaceWith(a)}}function fne(e){const t=Array.from(e.querySelectorAll("pre")).filter(n=>n instanceof HTMLPreElement&&tne(n));for(const n of t){const r=n.parentElement,i=n.querySelector("code"),o=yi(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 hne(e,t){const n=Array.from(e.querySelectorAll("pre"));for(const r of n)lne(r,t);fne(e),cne(e),une(e,t),dne(e,t)}function pne(e){const t=i=>{const o=i.target;if(!(o instanceof Element))return;const s=o.closest('[data-component="markdown-block"][data-block-type="tabs"] [data-slot="tabs-tab"]');if(!(s instanceof HTMLButtonElement))return;const a=s.closest('[data-component="markdown-block"][data-block-type="tabs"]');if(!(a instanceof HTMLElement))return;const l=s.dataset.tabsIndex;l!==void 0&&O7(a,l)},n=i=>{const o=i.target;if(!(o instanceof HTMLButtonElement)||o.dataset.slot!=="tabs-tab")return;const s=o.closest('[data-component="markdown-block"][data-block-type="tabs"]');if(!(s instanceof HTMLElement))return;const a=Array.from(s.querySelectorAll('[data-slot="tabs-tab"]')),l=a.indexOf(o);if(l<0)return;let c=l;if(i.key==="ArrowRight"||i.key==="ArrowDown")c=(l+1)%a.length;else if(i.key==="ArrowLeft"||i.key==="ArrowUp")c=(l-1+a.length)%a.length;else if(i.key==="Home")c=0;else if(i.key==="End")c=a.length-1;else return;i.preventDefault();const u=a[c];if(!u)return;const d=u.dataset.tabsIndex;d!==void 0&&(O7(s,d),u.focus())};e.addEventListener("click",t),e.addEventListener("keydown",n),P7(e);const r=new MutationObserver(()=>P7(e));return r.observe(e,{childList:!0,subtree:!0}),()=>{e.removeEventListener("click",t),e.removeEventListener("keydown",n),r.disconnect(),mne(e)}}function O7(e,t){const n=e.querySelectorAll('[data-slot="tabs-tab"]'),r=e.querySelectorAll('[data-slot="tabs-panel"]');n.forEach(i=>{const o=i.dataset.tabsIndex===t;i.setAttribute("aria-selected",o?"true":"false"),i.setAttribute("tabindex",o?"0":"-1")}),r.forEach(i=>{i.dataset.tabsIndex===t?i.removeAttribute("hidden"):i.setAttribute("hidden","")})}const Tb=new WeakMap;function P7(e){const t=e.querySelectorAll('[data-component="markdown-block"][data-block-type="plot"]:not([data-plot-hydrated="true"])');for(const n of Array.from(t)){const r=yne(n);r&&(n.dataset.plotHydrated="true",Tb.set(n,r))}}function mne(e){const t=e.querySelectorAll('[data-component="markdown-block"][data-block-type="plot"][data-plot-hydrated="true"]');for(const n of Array.from(t)){const r=Tb.get(n);r&&(r(),Tb.delete(n)),n.removeAttribute("data-plot-hydrated")}}function gne(e){return!(typeof e!="string"||e.length>200||!/^[a-zA-Z0-9_+\-*/%^().,\s]+$/.test(e)||/\b(?:return|function|class|new|var|let|const|=>|\bthis\b|prototype|constructor|window|document|globalThis|process|require|import|eval|with|yield|async|await)\b/.test(e))}function vne(e){if(!gne(e))return null;const t=e.replace(/\^/g,"**");try{const n=`const { sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log2, log10, sqrt, cbrt, abs, sign, floor, ceil, round, pow, min, max, hypot, PI, E } = Math; const pi = Math.PI, e = Math.E; try { const __r = (${t}); return Number.isFinite(__r) ? __r : NaN; } catch { return NaN; }`;return new Function("x",n)}catch{return null}}function R7(e,t=8){if(!Number.isFinite(e)||e<=0)return 1;const n=e/t,r=Math.pow(10,Math.floor(Math.log10(n))),i=n/r;let o=1;return i>=5?o=5:i>=2?o=2:i>=1&&(o=1),o*r}function Xh(e){if(!Number.isFinite(e))return"";if(Math.abs(e)<1e-9)return"0";const t=Math.abs(e);return t>=1e3||t<.01?e.toExponential(1).replace(/(\.\d*?)0+e/,"$1e").replace(/\.e/,"e"):parseFloat(e.toPrecision(4)).toString()}function Va(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function yne(e){const t=e.dataset.plotConfig;if(!t)return;let n;try{n=JSON.parse(t)}catch{return}const r=e.querySelector("svg"),i=e.querySelector('[data-slot="plot-tooltip"]');if(!r||!i)return;let o=[...n.xRange],s=[...n.yRange];const a=n.series.map(V=>V.kind==="fn"&&V.expr?vne(V.expr):null),l=640,c=400,u=56,d=16,h=n.title?36:16,f=36,p=l-u-d,m=c-h-f,g=V=>u+(V-o[0])/(o[1]-o[0])*p,v=V=>h+(1-(V-s[0])/(s[1]-s[0]))*m,y=V=>o[0]+(V-u)/p*(o[1]-o[0]),w=r.querySelector('[data-slot="plot-grid-layer"]'),k=r.querySelector('[data-slot="plot-axes"]'),x=r.querySelector('[data-slot="plot-series-layer"]'),C=r.querySelector('[data-slot="plot-crosshair"][data-axis="x"]'),S=r.querySelector('[data-slot="plot-crosshair"][data-axis="y"]'),I=r.querySelector('[data-slot="plot-cursor-dot"]'),M=e.querySelector('[data-slot="plot-reset"]');if(!w||!k||!x)return;const D=()=>{const V=R7(o[1]-o[0]),J=R7(s[1]-s[0]),ie=[];for(let tt=Math.ceil(o[0]/V)*V;tt<=o[1]+V/2;tt+=V)ie.push(Number(tt.toFixed(10)));const re=[];for(let tt=Math.ceil(s[0]/J)*J;tt<=s[1]+J/2;tt+=J)re.push(Number(tt.toFixed(10)));const ve=[];if(n.grid){for(const tt of ie){const jt=g(tt).toFixed(2);ve.push(`<line data-slot="plot-grid" x1="${jt}" y1="${h}" x2="${jt}" y2="${h+m}" />`)}for(const tt of re){const jt=v(tt).toFixed(2);ve.push(`<line data-slot="plot-grid" x1="${u}" y1="${jt}" x2="${u+p}" y2="${jt}" />`)}}w.innerHTML=ve.join("");const ce=o[0]<=0&&o[1]>=0?g(0):null,ae=s[0]<=0&&s[1]>=0?v(0):null,Ce=ae??h+m,_e=ce??u,We=[];We.push(`<line data-slot="plot-axis" data-axis="x" x1="${u}" y1="${Ce.toFixed(2)}" x2="${u+p}" y2="${Ce.toFixed(2)}" />`,`<line data-slot="plot-axis" data-axis="y" x1="${_e.toFixed(2)}" y1="${h}" x2="${_e.toFixed(2)}" y2="${h+m}" />`);const _t=u-6,st=h+m+14;for(const tt of ie){if(Math.abs(tt)<1e-12)continue;const jt=g(tt).toFixed(2);We.push(`<text data-slot="plot-tick" data-axis="x" x="${jt}" y="${st.toFixed(2)}">${Va(Xh(tt))}</text>`)}for(const tt of re){if(Math.abs(tt)<1e-12)continue;const jt=v(tt).toFixed(2);We.push(`<text data-slot="plot-tick" data-axis="y" x="${_t.toFixed(2)}" y="${(Number(jt)+3).toFixed(2)}">${Va(Xh(tt))}</text>`)}ce!==null&&ae!==null&&We.push(`<text data-slot="plot-tick" data-axis="origin" x="${_t.toFixed(2)}" y="${st.toFixed(2)}">0</text>`),k.innerHTML=We.join("");const bt=600,Jt=tt=>Math.max(s[0]-(s[1]-s[0]),Math.min(s[1]+(s[1]-s[0]),tt)),Kt=[];n.series.forEach((tt,jt)=>{const sr=a[jt];if(tt.kind==="fn"&&sr){let Pt="M",vr="";for(let $n=0;$n<=bt;$n++){const di=o[0]+$n/bt*(o[1]-o[0]);let ar;try{ar=sr(di)}catch{ar=NaN}if(!Number.isFinite(ar)){Pt="M";continue}vr+=`${Pt}${g(di).toFixed(2)} ${v(Jt(ar)).toFixed(2)} `,Pt="L"}const wn=tt.dashed?' stroke-dasharray="6 4"':"";Kt.push(`<path data-slot="plot-series" data-series-kind="fn" data-series-index="${jt}" d="${vr.trim()}" stroke="${Va(tt.color)}" stroke-width="${tt.width}"${wn} fill="none" />`)}else if(tt.kind==="line"&&tt.data&&tt.data.length>0){const Pt=tt.data.map(([wn,$n],di)=>`${di===0?"M":"L"}${g(wn).toFixed(2)} ${v($n).toFixed(2)}`).join(" "),vr=tt.dashed?' stroke-dasharray="6 4"':"";Kt.push(`<path data-slot="plot-series" data-series-kind="line" data-series-index="${jt}" d="${Pt}" stroke="${Va(tt.color)}" stroke-width="${tt.width}"${vr} fill="none" />`)}else if(tt.kind==="points"&&tt.data&&tt.data.length>0){const Pt=tt.data.map(([vr,wn])=>`<circle cx="${g(vr).toFixed(2)}" cy="${v(wn).toFixed(2)}" r="3.5" fill="${Va(tt.color)}" stroke="var(--surface-base, #fff)" stroke-width="1" />`).join("");Kt.push(`<g data-slot="plot-series" data-series-kind="points" data-series-index="${jt}">${Pt}</g>`)}}),x.innerHTML=Kt.join("")};D();const O=(V,J)=>{const ie=r.createSVGPoint();ie.x=V,ie.y=J;const re=r.getScreenCTM();if(!re)return{x:0,y:0};const ve=ie.matrixTransform(re.inverse());return{x:ve.x,y:ve.y}},$=(V,J)=>V>=u&&V<=u+p&&J>=h&&J<=h+m,E=(V,J,ie)=>{if(!C||!S||!I)return;C.setAttribute("x1",String(V)),C.setAttribute("x2",String(V)),C.setAttribute("y1",String(h)),C.setAttribute("y2",String(h+m)),C.style.visibility="visible";let re=null,ve=null;for(let st=0;st<n.series.length;st++){const bt=n.series[st];if(bt.kind!=="fn")continue;const Jt=a[st];if(!Jt)continue;const Kt=Jt(ie);if(Number.isFinite(Kt)&&Kt>=s[0]&&Kt<=s[1]){re=v(Kt),ve=bt.color;break}}re!=null&&ve?(I.setAttribute("cx",String(V)),I.setAttribute("cy",String(re)),I.setAttribute("fill",ve),I.style.visibility="visible",S.setAttribute("x1",String(u)),S.setAttribute("x2",String(u+p)),S.setAttribute("y1",String(re)),S.setAttribute("y2",String(re)),S.style.visibility="visible"):(I.style.visibility="hidden",S.style.visibility="hidden");const ce=[`<div data-slot="plot-tooltip-x">x = ${Xh(ie)}</div>`];for(let st=0;st<n.series.length;st++){const bt=n.series[st];if(bt.kind!=="fn")continue;const Jt=a[st];if(!Jt)continue;const Kt=Jt(ie);if(!Number.isFinite(Kt))continue;const tt=bt.label??bt.expr??"y";ce.push(`<div data-slot="plot-tooltip-row"><span data-slot="plot-tooltip-dot" style="background:${Va(bt.color)}"></span><span>${Va(tt)} = ${Xh(Kt)}</span></div>`)}i.innerHTML=ce.join(""),i.hidden=!1;const ae=e.getBoundingClientRect(),Ce=r.getBoundingClientRect(),_e=Ce.width/l,We=Ce.left-ae.left+V*_e+12,_t=Ce.top-ae.top+(re??h+m/2)*_e-8;i.style.left=`${Math.min(We,ae.width-180)}px`,i.style.top=`${Math.max(8,_t)}px`},A=()=>{C&&(C.style.visibility="hidden"),S&&(S.style.visibility="hidden"),I&&(I.style.visibility="hidden"),i.hidden=!0};let T=null;const R=V=>{if(V.button!==0)return;const{x:J,y:ie}=O(V.clientX,V.clientY);if($(J,ie)){T={startClientX:V.clientX,startClientY:V.clientY,startXRange:[...o],startYRange:[...s]};try{r.setPointerCapture(V.pointerId)}catch{}r.style.cursor="grabbing"}},G=V=>{if(!T){const{x:_e,y:We}=O(V.clientX,V.clientY);if(!$(_e,We)){A();return}E(_e,We,y(_e));return}const J=r.getScreenCTM();if(!J)return;const ie=(o[1]-o[0])/p,re=(s[1]-s[0])/m,ve=(V.clientX-T.startClientX)/J.a,ce=(V.clientY-T.startClientY)/J.d,ae=-ve*ie,Ce=ce*re;o=[T.startXRange[0]+ae,T.startXRange[1]+ae],s=[T.startYRange[0]+Ce,T.startYRange[1]+Ce],D()},K=V=>{if(T){try{r.releasePointerCapture(V.pointerId)}catch{}T=null,r.style.cursor="crosshair"}},q=V=>{if(!V.ctrlKey&&!V.metaKey)return;const{x:J,y:ie}=O(V.clientX,V.clientY);if(!$(J,ie))return;V.preventDefault();let re;if(V.deltaMode===1)re=Math.pow(1.05,Math.sign(V.deltaY)*Math.min(Math.abs(V.deltaY),4));else{const ae=Math.exp(V.deltaY*.0035);re=Math.max(.85,Math.min(1.18,ae))}const ve=y(J),ce=s[0]+(1-(ie-h)/m)*(s[1]-s[0]);o=[ve-(ve-o[0])*re,ve+(o[1]-ve)*re],s=[ce-(ce-s[0])*re,ce+(s[1]-ce)*re],D(),E(J,ie,y(J))},W=()=>{A()},N=()=>{o=[...n.xRange],s=[...n.yRange],D()};return r.addEventListener("pointerdown",R),r.addEventListener("pointermove",G),r.addEventListener("pointerup",K),r.addEventListener("pointerleave",W),r.addEventListener("wheel",q,{passive:!1}),M&&M.addEventListener("click",N),()=>{r.removeEventListener("pointerdown",R),r.removeEventListener("pointermove",G),r.removeEventListener("pointerup",K),r.removeEventListener("pointerleave",W),r.removeEventListener("wheel",q),M&&M.removeEventListener("click",N)}}function bne(e,t){const n=new Map,r=s=>{const a=t(),l=s.getAttribute("data-copied")==="true";N0(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 Qw(u))return;const d=t();Ot({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedCode}),N0(l,d,!0);const h=n.get(l);h&&clearTimeout(h);const f=setTimeout(()=>N0(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 wne(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 Qw(u)))return;const d=t();Ot({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,ane(a)))};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)}function kne(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&&Qte().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}-${Yte++}`,a).then(l=>{if(i.dataset.mermaidHash!==o)return;const c=ene(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 Cv(e,t){if(aa.delete(e),aa.set(e,t),aa.size<=Vte)return;const n=aa.keys().next().value;n&&aa.delete(n)}function Jh(e){return e&&BJ(e)}function LT(e){const[t,n]=ue(e,["text","cacheKey","streaming","class","classList"]),r=aX(),i=is(),o=lF(),[s,a]=he(),l=U(()=>{const g=Jh(t.text);if(!g)return"";const v=t.cacheKey??yi(g);if(!v)return;const y=bv(g,t.streaming??!1),w=[];for(let k=0;k<y.length;k++){const x=y[k],C=yi(x.raw);if(!C)return;const S=`${v}:${k}:${x.mode}`,I=aa.get(S);if(!I||I.hash!==C)return;Cv(S,I),w.push(I.html)}return w.join("")}),c=U(()=>{if(!t.streaming)return;const g=Jh(t.text);if(!g)return;const v=t.cacheKey??yi(g);if(!v)return;const y=bv(g,!0);if(y.length===0)return;const w=[];let k=!1;for(let x=0;x<y.length;x++){const C=y[x],S=yi(C.raw);if(!S)return;const I=`${v}:${x}:${C.mode}`,M=aa.get(I);if(M&&M.hash===S){w.push(M.html);continue}w.push(Kte(C.src)),k=!0}return k?w.join(""):void 0}),[u]=ns(()=>l()!==void 0?null:{text:Jh(t.text),key:t.cacheKey,streaming:t.streaming??!1},async g=>{if(g===null||!g.text)return"";const v=g.key??yi(g.text);return Promise.all(bv(g.text,g.streaming).map(async(y,w)=>{const k=yi(y.raw),x=v?`${v}:${w}:${y.mode}`:k;if(x&&k){const I=aa.get(x);if(I&&I.hash===k)return Cv(x,I),I.html}const C=await Promise.resolve(r.parse(y.src)),S=Wte(C);return x&&k&&Cv(x,{hash:k,html:S}),S})).then(y=>y.join("")).catch(()=>L7(g.text))},{initialValue:L7(Jh(t.text))});let d,h,f,p,m;return oe(()=>{const g=s(),v=l(),y=c(),w=u.latest??u(),k=t.text?v??w??y??"":"";if(!g)return;if(!k){p!==""&&(g.innerHTML="",p="");return}const x=i.t("ui.message.copyCode");if(k===p&&x===m)return;const C={copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:x,copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")};p=k,m=x;const S=document.createElement("div");S.innerHTML=k,hne(S,C),FJ(g,S,{childrenOnly:!0,onBeforeElUpdated:(I,M)=>{if(I instanceof HTMLElement&&M instanceof HTMLElement){if(I.getAttribute("data-component")==="markdown-block"&&M.getAttribute("data-component")==="markdown-block"&&I.dataset.blockHash&&I.dataset.blockHash===M.dataset.blockHash||I.getAttribute("data-component")==="mermaid-preview"&&M.getAttribute("data-component")==="mermaid-preview"&&I.dataset.mermaidHash===M.dataset.mermaidHash&&I.dataset.mermaidRendered===I.dataset.mermaidHash)return!1;I.getAttribute("data-component")==="markdown-code"&&M.getAttribute("data-component")==="markdown-code"&&I.dataset.mermaid==="true"&&I.dataset.mermaidHash===M.dataset.mermaidHash&&I.dataset.mermaidState&&(M.dataset.mermaidState=I.dataset.mermaidState)}return I instanceof HTMLButtonElement&&M instanceof HTMLButtonElement&&I.getAttribute("data-slot")==="markdown-copy-button"&&M.getAttribute("data-slot")==="markdown-copy-button"&&I.getAttribute("data-copied")==="true"&&N0(M,C,!0),!I.isEqualNode(M)}}),kne(g),d||(d=bne(g,()=>({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=wne(g,()=>({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)),f||(f=pne(g))}),pe(()=>{d&&d(),h&&h(),f&&f()}),(()=>{var g=Bte();return Sr(a,g),Wr(g,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n),!1,!1),g})()}var xne=ee('<div class="flex min-h-40 items-center justify-center px-6 py-4 text-center text-text-weak">'),Sne=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">'),_ne=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">'),Cne=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><audio class="w-full max-w-xl"controls preload=metadata><source>'),Ine=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>'),$ne=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">'),Tne=ee('<div class="flex flex-col gap-4 px-6 py-4">'),Ene=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">'),Ane=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>'),Lne=ee('<div class="mt-3 text-12-regular text-text-weak">'),Dne=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>'),Vm=ee('<div class="flex flex-col">'),Mne=ee('<div class="px-6 py-6 text-text-weak">'),One=ee('<th class="border border-border-weak-base px-3 py-2 text-left text-12-semibold text-text-strong whitespace-nowrap">'),Pne=ee("<tr class=even:bg-background-stronger>"),Rne=ee('<td class="border border-border-weak-base px-3 py-1.5 align-top whitespace-pre-wrap">'),Nne=ee('<div class="px-6 py-4 max-w-3xl mx-auto">'),zne=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">'),jne=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]">'),Fne=ee('<div class="text-13-regular text-text-weak">'),Une=ee('<span class=text-syntax-property>"<!>"'),Hne=ee("<div><span class=text-syntax-keyword>null"),Bne=ee('<div><span class=text-syntax-string>"<!>"'),Vne=ee("<div><span class=text-syntax-keyword>"),qne=ee("<details class=cursor-pointer><summary><span class=text-text-weak>[ <!> ]"),Wne=ee("<details class=cursor-pointer><summary><span class=text-text-weak>"),Gne=ee("<div><span class=text-text-weak>");const Iv=new Set(["image","audio","video","pdf"]);function N7(e){return e.current!==void 0?e.current:e.after??e.before}function z7(e){const t=is(),n=()=>e.media,r=U(()=>{const k=n();if(!(!k||k.mode==="off"))return YX(k.path)}),i=U(()=>{const k=n();return!k||k.mode==="off"||r()?!1:XX(k.current)}),o=()=>e.media?.onLoad?.(),s=U(()=>{const k=n(),x=r();return!k||!x?!1:k.deleted?!0:x==="svg"||k.current!==void 0?!1:!dv(k.after)&&dv(k.before)}),a=U(()=>{const k=n(),x=r();if(!(!k||!Iv.has(x)))return uv(N7(k),x)}),l=U(()=>{const k=n(),x=r();if(!(!k||!Iv.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]=ns(l,async k=>k.readFile(k.path).then(x=>{const C=uv(x,k.kind);return C?{key:k.key,src:C,mime:k.kind==="audio"||k.kind==="video"?Kw(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=U(()=>{const k=l(),x=c();if(!(!k||!x||x.key!==k.key))return x}),d=U(()=>{const k=u();return a()??(k&&"src"in k?k.src:void 0)}),h=U(()=>a()?"ready":l()?c.loading?"loading":u()?.error?"error":d()?"ready":"idle":"idle"),f=U(()=>{const k=u();return k&&"mime"in k?k.mime:void 0}),p=U(()=>{const k=n();if(!(!k||r()!=="svg"))return QX(k.current)}),m=U(()=>{const k=n();if(!(!k||r()!=="svg"))return uv(k.current,"svg")}),g=U(()=>{const k=n();if(!(!k||r()!=="svg")&&p()===void 0&&dv(k.current))return[k.path,k.current]});oe(wt(g,k=>{k&&n()?.onError?.({kind:"svg"})},{defer:!0}));const v=U(()=>{const k=n(),x=r();if(k&&!(x!=="table"&&x!=="html"&&x!=="markdown"&&x!=="json"))return eJ(N7(k))}),y=k=>{const x=`ui.fileMedia.kind.${k}`;return t.t(x)},w=k=>(()=>{var x=xne();return F(x,k),x})();return b(Al,{get children(){return[b(Mn,{get when(){return r()==="image"||r()==="audio"||r()==="video"||r()==="pdf"},get children(){return b(fe,{get when(){return d()},keyed:!0,get fallback(){const k=n(),x=r();if(!k||!x||!Iv.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=_ne(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",k),Me(()=>Je(S,"alt",n()?.path)),C})():x==="audio"?(()=>{var C=Cne(),S=C.firstChild,I=S.firstChild;return S.addEventListener("loadedmetadata",o),Je(I,"src",k),Me(()=>Je(I,"type",f())),C})():x==="video"?(()=>{var C=Ine(),S=C.firstChild,I=S.firstChild;return S.addEventListener("loadedmetadata",o),Je(I,"src",k),Me(()=>Je(I,"type",f())),C})():x==="pdf"?(()=>{var C=$ne(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",k),Me(()=>Je(S,"title",n()?.path??"pdf")),C})():e.fallback()}})}}),b(Mn,{get when(){return r()==="svg"},get children(){return p()===void 0&&m()==null?e.fallback():(()=>{var k=Tne();return F(k,b(fe,{get when(){return p()!==void 0},get children(){return e.fallback()}}),null),F(k,b(fe,{get when(){return m()},keyed:!0,children:x=>(()=>{var C=Ene(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",x),Me(()=>Je(S,"alt",n()?.path)),C})()}),null),k})()}}),b(Mn,{get when(){return r()==="table"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Kne,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="markdown"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Zne,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="html"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Yne,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="json"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Xne,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return i()},get children(){var k=Sne(),x=k.firstChild,C=x.nextSibling;return F(x,()=>n()?.path?.split("/").pop()??t.t("ui.fileMedia.binary.title")),F(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(Mn,{when:!0,get children(){return e.fallback()}})]}})}function qm(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=Ane(),r=n.firstChild,i=r.nextSibling,o=i.firstChild,s=o.nextSibling;return F(r,()=>e.label),o.$$click=()=>e.onChange("preview"),F(o,()=>e.previewLabel),s.$$click=()=>e.onChange("source"),F(s,()=>e.sourceLabel),Me(a=>{var l=t("preview"),c=t("source");return l!==a.e&&Ko(o,a.e=l),c!==a.t&&Ko(s,a.t=c),a},{e:void 0,t:void 0}),n})()}function Kne(e){const t=is(),[n,r]=he("preview"),i=U(()=>{const s=rJ(e.path,e.text);return nJ(e.text,s)}),o=U(()=>i().headers.length===0&&i().rows.length===0);return oe(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var s=Vm();return F(s,b(qm,{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),F(s,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){return b(fe,{get when(){return!o()},get fallback(){return(()=>{var a=Mne();return F(a,()=>t.t("ui.fileMedia.table.empty")),a})()},get children(){var a=Dne(),l=a.firstChild,c=l.firstChild,u=c.firstChild,d=c.nextSibling;return F(u,b(Wt,{get each(){return i().headers},children:(h,f)=>(()=>{var p=One();return F(p,()=>h||`#${f()+1}`),p})()})),F(d,b(Wt,{get each(){return i().rows},children:h=>(()=>{var f=Pne();return F(f,b(Wt,{get each(){return i().headers},children:(p,m)=>(()=>{var g=Rne();return F(g,()=>h[m()]??""),g})()})),f})()})),F(a,b(fe,{get when(){return i().truncated},get children(){var h=Lne();return F(h,()=>t.t("ui.fileMedia.table.truncated")),h}}),null),a}})}}),null),s})()}function Zne(e){const t=is(),[n,r]=he("preview");return oe(()=>{e.text,requestAnimationFrame(e.onReady)}),(()=>{var i=Vm();return F(i,b(qm,{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),F(i,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=Nne();return F(o,b(LT,{get text(){return e.text}})),o}}),null),i})()}function Yne(e){const t=is(),[n,r]=he("preview");return(()=>{var i=Vm();return F(i,b(qm,{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),F(i,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=zne(),s=o.firstChild;return Zo(s,"load",e.onReady),Me(()=>Je(s,"srcdoc",e.text)),o}}),null),i})()}function Xne(e){const t=is(),[n,r]=he("preview"),i=U(()=>{try{return{ok:!0,value:JSON.parse(Jne(e.text))}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}});return oe(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var o=Vm();return F(o,b(qm,{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),F(o,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var s=jne();return F(s,b(fe,{get when(){return i().ok},get fallback(){return(()=>{var a=Fne();return F(a,()=>t.t("ui.fileMedia.json.invalid",{message:i().ok?"":i().message})),a})()},get children(){return b(Eb,{get value(){return i().value},depth:0})}})),s}}),null),o})()}function Jne(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(^|[^:])\/\/.*$/gm,"$1").replace(/,\s*([\]}])/g,"$1")}function Eb(e){const t=()=>" ".repeat(e.depth),n=()=>e.name!==void 0?(()=>{var r=Une(),i=r.firstChild,o=i.nextSibling;return o.nextSibling,F(r,()=>e.name,o),r})():null;if(e.value===null)return(()=>{var r=Hne(),i=r.firstChild;return F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),r})();if(typeof e.value=="string")return(()=>{var r=Bne(),i=r.firstChild,o=i.firstChild,s=o.nextSibling;return s.nextSibling,F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),F(i,()=>e.value,s),r})();if(typeof e.value=="number"||typeof e.value=="boolean")return(()=>{var r=Vne(),i=r.firstChild;return F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),F(i,()=>String(e.value)),r})();if(Array.isArray(e.value))return(()=>{var r=qne(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling;return a.nextSibling,F(i,t,o),F(i,n,o),F(i,()=>e.name!==void 0?": ":"",o),F(o,()=>e.value.length,a),F(r,b(Wt,{get each(){return e.value},children:l=>b(Eb,{value:l,get depth(){return e.depth+1}})}),null),Me(()=>r.open=e.depth<2),r})();if(typeof e.value=="object"){const r=Object.entries(e.value);return(()=>{var i=Wne(),o=i.firstChild,s=o.firstChild;return F(o,t,s),F(o,n,s),F(o,()=>e.name!==void 0?": ":"",s),F(s,()=>`{ ${r.length} }`),F(i,b(Wt,{each:r,children:([a,l])=>b(Eb,{name:a,value:l,get depth(){return e.depth+1}})}),null),Me(()=>i.open=e.depth<2),i})()}return(()=>{var r=Gne(),i=r.firstChild;return F(r,t,i),F(i,()=>String(e.value)),r})()}mr(["click"]);var Qne=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 ere(e){const t=is();return b(js,{get children(){var n=Qne(),r=n.firstChild,i=r.nextSibling,o=i.nextSibling,s=o.firstChild,a=s.nextSibling,l=o.nextSibling;n.$$pointerdown=u=>u.stopPropagation(),F(n,b(Gt,{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"?Sr(c,r):e.setInput=r,F(i,(()=>{var u=Fe(()=>!!e.count());return()=>u()?`${e.index()+1}/${e.count()}`:"0/0"})()),Zo(s,"click",e.onPrev,!0),F(s,b(Gt,{name:"chevron-down",size:"small",class:"rotate-180"})),Zo(a,"click",e.onNext,!0),F(a,b(Gt,{name:"chevron-down",size:"small"})),Zo(l,"click",e.onClose,!0),F(l,b(Gt,{name:"close-small",size:"small"})),Me(u=>{var d=`${e.pos().top}px`,h=`${e.pos().right}px`,f=t.t("ui.fileSearch.placeholder"),p=e.count()===0,m=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&&ii(n,"top",u.e=d),h!==u.t&&ii(n,"right",u.t=h),f!==u.a&&Je(r,"placeholder",u.a=f),p!==u.o&&(s.disabled=u.o=p),m!==u.i&&Je(s,"aria-label",u.i=m),g!==u.n&&(a.disabled=u.n=g),v!==u.s&&Je(a,"aria-label",u.s=v),y!==u.h&&Je(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}),Me(()=>r.value=e.query()),n}})}mr(["pointerdown","input","keydown","click"]);var tre=ee('<div data-component=file class="relative outline-none"tabindex=0><div></div><div class="pointer-events-none absolute inset-0 z-0">');const nre=5e5,rre={...Bw,lineHeight:24,fileGap:0},DT=["mode","media","class","classList","annotations","selectedLines","commentedLines","search","onLineSelected","onLineSelectionEnd","onLineNumberSelectionEnd","onRendered","preloadedDiff"],ire=["file",...DT],ore=["fileDiff","before","after",...DT];function sre(e){let t,n,r,i,o,s,a,l=!1,c=null,u=!1;const d=xX(),h=TX(),[f,p]=he(0),m=()=>SX(n),g=()=>Q$(n),v=kX({wrapper:()=>t,overlay:()=>r,getRoot:m}),y=()=>{i===void 0&&(i=requestAnimationFrame(()=>{i=void 0;const I=u;e.updateSelection(I),u&&(u=!1,e.onLineSelectionEnd(c))}))},w=()=>{o===void 0&&(o=requestAnimationFrame(()=>{o=void 0;const I=e.buildDragSelection();I&&e.setSelectedLines(I)}))},k=I=>{if(!e.enableLineSelection()||I.button!==0)return;const M=e.lineFromMouseEvent(I);if(M.numberColumn){h.begin(!0,M.line);return}M.line!==void 0&&(h.begin(!1,M.line),s=M.line,a=M.line,l=!1,e.onDragStart(M))},x=I=>{if(!e.enableLineSelection())return;const M=e.lineFromMouseEvent(I);if(!h.track(I.buttons,M.line)&&s!==void 0){if((I.buttons&1)===0){s=void 0,a=void 0,l=!1,e.onDragReset(),h.finish();return}M.line!==void 0&&(a=M.line,l=!0,e.onDragMove(M),w())}},C=()=>{if(e.enableLineSelection()&&h.finish()!=="numbers"&&s!==void 0){if(!l){u=!1;const I=e.buildClickSelection();I&&e.setSelectedLines(I),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 I=window.getSelection();!I||I.isCollapsed||y()};return en(()=>{pe(_X(g))}),oe(()=>{f();const I=e.commentedLines();requestAnimationFrame(()=>{const M=m();M&&e.markCommented(M,I)})}),oe(()=>{e.setSelectedLines(e.selectedLines()??null)}),oe(()=>{e.enableLineSelection()&&(zn(n,"mousedown",k),zn(n,"mousemove",x),zn(window,"mouseup",C),zn(document,"selectionchange",S))}),pe(()=>{Od(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(I){t=I},get container(){return n},set container(I){n=I},get overlay(){return r},set overlay(I){r=I},get dragStart(){return s},get dragEnd(){return a},get lastSelection(){return c},set lastSelection(I){c=I},ready:d,bridge:h,rendered:f,setRendered:p,getRoot:m,getHost:g,find:v,scheduleSelectionUpdate:y}}function MT(e,t){return sre({enableLineSelection:e.enableLineSelection,selectedLines:e.selectedLines,commentedLines:()=>e.commentedLines()??[],onLineSelectionEnd:e.onLineSelectionEnd,...t})}function OT(e){oe(()=>{const t=e.search();if(!t)return;const n={focus:()=>e.find.focus()};t.register(n),pe(()=>t.register(null))})}function PT(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 RT(e){oe(()=>{e.viewer.rendered();const t=e.current();t&&(t.setLineAnnotations(e.annotations()),t.rerender(),requestAnimationFrame(()=>e.viewer.find.refresh({reset:!0})))})}function NT(e){CX({state:e.viewer.ready,container:e.viewer.container,getRoot:e.viewer.getRoot,isReady:e.isReady,settleFrames:e.settleFrames,onReady:e.onReady})}function zT(e){Od(e.viewer.ready),e.current?.cleanUp();const t=e.create();e.assign(t),e.viewer.container.innerHTML="",e.draw(t),kb(e.viewer.getHost()),e.viewer.setRendered(n=>n+1),e.onReady()}function are(e){const t=jT(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 jT(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function lre(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=jT(o)??document;return n&&r===s||(i(),n=new L$,r=s,n.setup(s,s instanceof Document?void 0:o)),n},cleanup:i}}function cre(e){let t;return{get:()=>{if(t)return t.virtualizer;const r=e();if(!r)return;const i=OX(r);if(i)return t=i,i.virtualizer},cleanup:()=>{t?.release(),t=void 0}}}function ure(e){if(!e.dataset.line)return;const t=parseInt(e.dataset.line,10);if(!Number.isNaN(t))return t}function FT(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 dre(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 fre(e){const t=Hm(e);if(t)return q$(t)}function UT(e){return(()=>{var t=tre(),n=t.firstChild,r=n.nextSibling;return Zo(t,"focus",e.viewer.find.onFocus),Zo(t,"pointerdown",e.viewer.find.onPointerDown,!0),Sr(i=>e.viewer.wrapper=i,t),F(t,b(fe,{get when(){return e.viewer.find.open()},get children(){return b(ere,{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),Sr(i=>e.viewer.container=i,n),Sr(i=>e.viewer.overlay=i,r),Me(i=>{var o=e.mode,s=uX,a={...e.classList,[e.class??""]:!!e.class};return o!==i.e&&Je(t,"data-mode",i.e=o),i.t=gm(t,s,i.t),i.a=Et(t,a,i.a),i},{e:void 0,t:void 0,a:void 0}),t})()}function hre(e){let t,n;const[r,i]=ue(e,ire),o=()=>{const v=r.file.contents;return typeof v=="string"?v:Array.isArray(v)?v.join(`
|
|
2368
|
+
`){i(),n+="<br>",o++;continue}if(s===" "||s===" "){i(),n+=s,o++;continue}r+=s,o++}return i(),n}function Kte(e){if(e.length<32)return _v(e);const t=yi(e);if(!t)return _v(e);const n=Ba.get(t);if(n!==void 0)return Ba.delete(t),Ba.set(t,n),n;const r=_v(e);if(Ba.set(t,r),Ba.size>Gte){const i=Ba.keys().next().value;i!==void 0&&Ba.delete(i)}return r}const Zte=/^https?:\/\/[^\s<>()`"']+$/;let Yh,Yte=0;function Xte(e){const t=e.trim().replace(/[),.;!?]+$/,"");if(Zte.test(t))try{return new URL(t).toString()}catch{return}}function Jte(){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 Qte(){return Yh||(Yh=j(()=>import("./mermaid.core-BcWOJL0e.js").then(e=>e.bC),[]).then(e=>(e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:Jte()?"dark":"default",themeVariables:{background:"transparent",fontFamily:"var(--font-family-sans)"}}),e.default)),Yh)}function ene(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 tne(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 nne="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",TT=`@?(?:(?:\\.{1,2}\\/|\\/)?(?:[\\w.$+@ -]+\\/)+[\\w.$+@ -]+\\.[A-Za-z0-9]{1,16}|[\\w.@+-]+\\.(?:${nne}))`,D7=new RegExp(`(^|[\\s([{"'])(${TT})(?::(\\d+)(?:-(\\d+))?)?`,"g"),rne=new RegExp(`^(${TT})(?::(\\d+)(?:-(\\d+))?)?$`);function e4(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 ET(e){return e.startsWith("@")?e.slice(1):e}function ine(e){const t=e.trim().match(rne);if(t?.[1])return{raw:e.trim(),path:ET(t[1]),index:0,end:e.trim().length,selection:e4(t[2],t[3])}}function one(e){const t=[];D7.lastIndex=0;let n;for(;n=D7.exec(e);){const r=n[1]??"",i=n[2];if(!i)continue;const o=n[0].slice(r.length);t.push({raw:o,path:ET(i),index:n.index+r.length,end:n.index+n[0].length,selection:e4(n[3],n[4])})}return t}function $b(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 M7(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($b(Ib.copy,"copy-icon")),t.appendChild($b(Ib.check,"check-icon")),t}function N0(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 sne(e,t){t&&(e.dataset.fileReferenceLineStart=String(t.startLine),t.endLine&&(e.dataset.fileReferenceLineEnd=String(t.endLine)))}function ane(e){const t=e.dataset.fileReferenceLineStart;if(t)return e4(t,e.dataset.fileReferenceLineEnd)}function AT(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,sne(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($b(Ib.copy,"copy-icon")),r.appendChild(i),r.appendChild(o),r}function lne(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(M7(t));return}const i=Array.from(n.querySelectorAll('[data-slot="markdown-copy-button"]')).filter(o=>o instanceof HTMLButtonElement);if(i.length===0){n.appendChild(M7(t));return}for(const o of i.slice(1))o.remove()}function cne(e){const t=Array.from(e.querySelectorAll(":not(pre) > code"));for(const n of t){const r=Xte(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 une(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=ine(r.textContent??"");i&&r.replaceWith(AT(i,r.textContent??i.raw,t))}}function dne(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=one(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(AT(c,c.raw,t)),l=c.end;l<o.data.length&&a.appendChild(document.createTextNode(o.data.slice(l))),o.replaceWith(a)}}function fne(e){const t=Array.from(e.querySelectorAll("pre")).filter(n=>n instanceof HTMLPreElement&&tne(n));for(const n of t){const r=n.parentElement,i=n.querySelector("code"),o=yi(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 hne(e,t){const n=Array.from(e.querySelectorAll("pre"));for(const r of n)lne(r,t);fne(e),cne(e),une(e,t),dne(e,t)}function pne(e){const t=i=>{const o=i.target;if(!(o instanceof Element))return;const s=o.closest('[data-component="markdown-block"][data-block-type="tabs"] [data-slot="tabs-tab"]');if(!(s instanceof HTMLButtonElement))return;const a=s.closest('[data-component="markdown-block"][data-block-type="tabs"]');if(!(a instanceof HTMLElement))return;const l=s.dataset.tabsIndex;l!==void 0&&O7(a,l)},n=i=>{const o=i.target;if(!(o instanceof HTMLButtonElement)||o.dataset.slot!=="tabs-tab")return;const s=o.closest('[data-component="markdown-block"][data-block-type="tabs"]');if(!(s instanceof HTMLElement))return;const a=Array.from(s.querySelectorAll('[data-slot="tabs-tab"]')),l=a.indexOf(o);if(l<0)return;let c=l;if(i.key==="ArrowRight"||i.key==="ArrowDown")c=(l+1)%a.length;else if(i.key==="ArrowLeft"||i.key==="ArrowUp")c=(l-1+a.length)%a.length;else if(i.key==="Home")c=0;else if(i.key==="End")c=a.length-1;else return;i.preventDefault();const u=a[c];if(!u)return;const d=u.dataset.tabsIndex;d!==void 0&&(O7(s,d),u.focus())};e.addEventListener("click",t),e.addEventListener("keydown",n),P7(e);const r=new MutationObserver(()=>P7(e));return r.observe(e,{childList:!0,subtree:!0}),()=>{e.removeEventListener("click",t),e.removeEventListener("keydown",n),r.disconnect(),mne(e)}}function O7(e,t){const n=e.querySelectorAll('[data-slot="tabs-tab"]'),r=e.querySelectorAll('[data-slot="tabs-panel"]');n.forEach(i=>{const o=i.dataset.tabsIndex===t;i.setAttribute("aria-selected",o?"true":"false"),i.setAttribute("tabindex",o?"0":"-1")}),r.forEach(i=>{i.dataset.tabsIndex===t?i.removeAttribute("hidden"):i.setAttribute("hidden","")})}const Tb=new WeakMap;function P7(e){const t=e.querySelectorAll('[data-component="markdown-block"][data-block-type="plot"]:not([data-plot-hydrated="true"])');for(const n of Array.from(t)){const r=yne(n);r&&(n.dataset.plotHydrated="true",Tb.set(n,r))}}function mne(e){const t=e.querySelectorAll('[data-component="markdown-block"][data-block-type="plot"][data-plot-hydrated="true"]');for(const n of Array.from(t)){const r=Tb.get(n);r&&(r(),Tb.delete(n)),n.removeAttribute("data-plot-hydrated")}}function gne(e){return!(typeof e!="string"||e.length>200||!/^[a-zA-Z0-9_+\-*/%^().,\s]+$/.test(e)||/\b(?:return|function|class|new|var|let|const|=>|\bthis\b|prototype|constructor|window|document|globalThis|process|require|import|eval|with|yield|async|await)\b/.test(e))}function vne(e){if(!gne(e))return null;const t=e.replace(/\^/g,"**");try{const n=`const { sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log2, log10, sqrt, cbrt, abs, sign, floor, ceil, round, pow, min, max, hypot, PI, E } = Math; const pi = Math.PI, e = Math.E; try { const __r = (${t}); return Number.isFinite(__r) ? __r : NaN; } catch { return NaN; }`;return new Function("x",n)}catch{return null}}function R7(e,t=8){if(!Number.isFinite(e)||e<=0)return 1;const n=e/t,r=Math.pow(10,Math.floor(Math.log10(n))),i=n/r;let o=1;return i>=5?o=5:i>=2?o=2:i>=1&&(o=1),o*r}function Xh(e){if(!Number.isFinite(e))return"";if(Math.abs(e)<1e-9)return"0";const t=Math.abs(e);return t>=1e3||t<.01?e.toExponential(1).replace(/(\.\d*?)0+e/,"$1e").replace(/\.e/,"e"):parseFloat(e.toPrecision(4)).toString()}function Va(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function yne(e){const t=e.dataset.plotConfig;if(!t)return;let n;try{n=JSON.parse(t)}catch{return}const r=e.querySelector("svg"),i=e.querySelector('[data-slot="plot-tooltip"]');if(!r||!i)return;let o=[...n.xRange],s=[...n.yRange];const a=n.series.map(V=>V.kind==="fn"&&V.expr?vne(V.expr):null),l=640,c=400,u=56,d=16,h=n.title?36:16,f=36,p=l-u-d,m=c-h-f,g=V=>u+(V-o[0])/(o[1]-o[0])*p,v=V=>h+(1-(V-s[0])/(s[1]-s[0]))*m,y=V=>o[0]+(V-u)/p*(o[1]-o[0]),w=r.querySelector('[data-slot="plot-grid-layer"]'),k=r.querySelector('[data-slot="plot-axes"]'),x=r.querySelector('[data-slot="plot-series-layer"]'),C=r.querySelector('[data-slot="plot-crosshair"][data-axis="x"]'),S=r.querySelector('[data-slot="plot-crosshair"][data-axis="y"]'),I=r.querySelector('[data-slot="plot-cursor-dot"]'),M=e.querySelector('[data-slot="plot-reset"]');if(!w||!k||!x)return;const D=()=>{const V=R7(o[1]-o[0]),J=R7(s[1]-s[0]),ie=[];for(let tt=Math.ceil(o[0]/V)*V;tt<=o[1]+V/2;tt+=V)ie.push(Number(tt.toFixed(10)));const re=[];for(let tt=Math.ceil(s[0]/J)*J;tt<=s[1]+J/2;tt+=J)re.push(Number(tt.toFixed(10)));const ve=[];if(n.grid){for(const tt of ie){const jt=g(tt).toFixed(2);ve.push(`<line data-slot="plot-grid" x1="${jt}" y1="${h}" x2="${jt}" y2="${h+m}" />`)}for(const tt of re){const jt=v(tt).toFixed(2);ve.push(`<line data-slot="plot-grid" x1="${u}" y1="${jt}" x2="${u+p}" y2="${jt}" />`)}}w.innerHTML=ve.join("");const ce=o[0]<=0&&o[1]>=0?g(0):null,ae=s[0]<=0&&s[1]>=0?v(0):null,Ce=ae??h+m,_e=ce??u,We=[];We.push(`<line data-slot="plot-axis" data-axis="x" x1="${u}" y1="${Ce.toFixed(2)}" x2="${u+p}" y2="${Ce.toFixed(2)}" />`,`<line data-slot="plot-axis" data-axis="y" x1="${_e.toFixed(2)}" y1="${h}" x2="${_e.toFixed(2)}" y2="${h+m}" />`);const _t=u-6,st=h+m+14;for(const tt of ie){if(Math.abs(tt)<1e-12)continue;const jt=g(tt).toFixed(2);We.push(`<text data-slot="plot-tick" data-axis="x" x="${jt}" y="${st.toFixed(2)}">${Va(Xh(tt))}</text>`)}for(const tt of re){if(Math.abs(tt)<1e-12)continue;const jt=v(tt).toFixed(2);We.push(`<text data-slot="plot-tick" data-axis="y" x="${_t.toFixed(2)}" y="${(Number(jt)+3).toFixed(2)}">${Va(Xh(tt))}</text>`)}ce!==null&&ae!==null&&We.push(`<text data-slot="plot-tick" data-axis="origin" x="${_t.toFixed(2)}" y="${st.toFixed(2)}">0</text>`),k.innerHTML=We.join("");const bt=600,Jt=tt=>Math.max(s[0]-(s[1]-s[0]),Math.min(s[1]+(s[1]-s[0]),tt)),Kt=[];n.series.forEach((tt,jt)=>{const sr=a[jt];if(tt.kind==="fn"&&sr){let Pt="M",vr="";for(let $n=0;$n<=bt;$n++){const di=o[0]+$n/bt*(o[1]-o[0]);let ar;try{ar=sr(di)}catch{ar=NaN}if(!Number.isFinite(ar)){Pt="M";continue}vr+=`${Pt}${g(di).toFixed(2)} ${v(Jt(ar)).toFixed(2)} `,Pt="L"}const wn=tt.dashed?' stroke-dasharray="6 4"':"";Kt.push(`<path data-slot="plot-series" data-series-kind="fn" data-series-index="${jt}" d="${vr.trim()}" stroke="${Va(tt.color)}" stroke-width="${tt.width}"${wn} fill="none" />`)}else if(tt.kind==="line"&&tt.data&&tt.data.length>0){const Pt=tt.data.map(([wn,$n],di)=>`${di===0?"M":"L"}${g(wn).toFixed(2)} ${v($n).toFixed(2)}`).join(" "),vr=tt.dashed?' stroke-dasharray="6 4"':"";Kt.push(`<path data-slot="plot-series" data-series-kind="line" data-series-index="${jt}" d="${Pt}" stroke="${Va(tt.color)}" stroke-width="${tt.width}"${vr} fill="none" />`)}else if(tt.kind==="points"&&tt.data&&tt.data.length>0){const Pt=tt.data.map(([vr,wn])=>`<circle cx="${g(vr).toFixed(2)}" cy="${v(wn).toFixed(2)}" r="3.5" fill="${Va(tt.color)}" stroke="var(--surface-base, #fff)" stroke-width="1" />`).join("");Kt.push(`<g data-slot="plot-series" data-series-kind="points" data-series-index="${jt}">${Pt}</g>`)}}),x.innerHTML=Kt.join("")};D();const O=(V,J)=>{const ie=r.createSVGPoint();ie.x=V,ie.y=J;const re=r.getScreenCTM();if(!re)return{x:0,y:0};const ve=ie.matrixTransform(re.inverse());return{x:ve.x,y:ve.y}},$=(V,J)=>V>=u&&V<=u+p&&J>=h&&J<=h+m,E=(V,J,ie)=>{if(!C||!S||!I)return;C.setAttribute("x1",String(V)),C.setAttribute("x2",String(V)),C.setAttribute("y1",String(h)),C.setAttribute("y2",String(h+m)),C.style.visibility="visible";let re=null,ve=null;for(let st=0;st<n.series.length;st++){const bt=n.series[st];if(bt.kind!=="fn")continue;const Jt=a[st];if(!Jt)continue;const Kt=Jt(ie);if(Number.isFinite(Kt)&&Kt>=s[0]&&Kt<=s[1]){re=v(Kt),ve=bt.color;break}}re!=null&&ve?(I.setAttribute("cx",String(V)),I.setAttribute("cy",String(re)),I.setAttribute("fill",ve),I.style.visibility="visible",S.setAttribute("x1",String(u)),S.setAttribute("x2",String(u+p)),S.setAttribute("y1",String(re)),S.setAttribute("y2",String(re)),S.style.visibility="visible"):(I.style.visibility="hidden",S.style.visibility="hidden");const ce=[`<div data-slot="plot-tooltip-x">x = ${Xh(ie)}</div>`];for(let st=0;st<n.series.length;st++){const bt=n.series[st];if(bt.kind!=="fn")continue;const Jt=a[st];if(!Jt)continue;const Kt=Jt(ie);if(!Number.isFinite(Kt))continue;const tt=bt.label??bt.expr??"y";ce.push(`<div data-slot="plot-tooltip-row"><span data-slot="plot-tooltip-dot" style="background:${Va(bt.color)}"></span><span>${Va(tt)} = ${Xh(Kt)}</span></div>`)}i.innerHTML=ce.join(""),i.hidden=!1;const ae=e.getBoundingClientRect(),Ce=r.getBoundingClientRect(),_e=Ce.width/l,We=Ce.left-ae.left+V*_e+12,_t=Ce.top-ae.top+(re??h+m/2)*_e-8;i.style.left=`${Math.min(We,ae.width-180)}px`,i.style.top=`${Math.max(8,_t)}px`},A=()=>{C&&(C.style.visibility="hidden"),S&&(S.style.visibility="hidden"),I&&(I.style.visibility="hidden"),i.hidden=!0};let T=null;const R=V=>{if(V.button!==0)return;const{x:J,y:ie}=O(V.clientX,V.clientY);if($(J,ie)){T={startClientX:V.clientX,startClientY:V.clientY,startXRange:[...o],startYRange:[...s]};try{r.setPointerCapture(V.pointerId)}catch{}r.style.cursor="grabbing"}},G=V=>{if(!T){const{x:_e,y:We}=O(V.clientX,V.clientY);if(!$(_e,We)){A();return}E(_e,We,y(_e));return}const J=r.getScreenCTM();if(!J)return;const ie=(o[1]-o[0])/p,re=(s[1]-s[0])/m,ve=(V.clientX-T.startClientX)/J.a,ce=(V.clientY-T.startClientY)/J.d,ae=-ve*ie,Ce=ce*re;o=[T.startXRange[0]+ae,T.startXRange[1]+ae],s=[T.startYRange[0]+Ce,T.startYRange[1]+Ce],D()},K=V=>{if(T){try{r.releasePointerCapture(V.pointerId)}catch{}T=null,r.style.cursor="crosshair"}},q=V=>{if(!V.ctrlKey&&!V.metaKey)return;const{x:J,y:ie}=O(V.clientX,V.clientY);if(!$(J,ie))return;V.preventDefault();let re;if(V.deltaMode===1)re=Math.pow(1.05,Math.sign(V.deltaY)*Math.min(Math.abs(V.deltaY),4));else{const ae=Math.exp(V.deltaY*.0035);re=Math.max(.85,Math.min(1.18,ae))}const ve=y(J),ce=s[0]+(1-(ie-h)/m)*(s[1]-s[0]);o=[ve-(ve-o[0])*re,ve+(o[1]-ve)*re],s=[ce-(ce-s[0])*re,ce+(s[1]-ce)*re],D(),E(J,ie,y(J))},W=()=>{A()},N=()=>{o=[...n.xRange],s=[...n.yRange],D()};return r.addEventListener("pointerdown",R),r.addEventListener("pointermove",G),r.addEventListener("pointerup",K),r.addEventListener("pointerleave",W),r.addEventListener("wheel",q,{passive:!1}),M&&M.addEventListener("click",N),()=>{r.removeEventListener("pointerdown",R),r.removeEventListener("pointermove",G),r.removeEventListener("pointerup",K),r.removeEventListener("pointerleave",W),r.removeEventListener("wheel",q),M&&M.removeEventListener("click",N)}}function bne(e,t){const n=new Map,r=s=>{const a=t(),l=s.getAttribute("data-copied")==="true";N0(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 Qw(u))return;const d=t();Ot({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedCode}),N0(l,d,!0);const h=n.get(l);h&&clearTimeout(h);const f=setTimeout(()=>N0(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 wne(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 Qw(u)))return;const d=t();Ot({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,ane(a)))};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)}function kne(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&&Qte().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}-${Yte++}`,a).then(l=>{if(i.dataset.mermaidHash!==o)return;const c=ene(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 Cv(e,t){if(aa.delete(e),aa.set(e,t),aa.size<=Vte)return;const n=aa.keys().next().value;n&&aa.delete(n)}function Jh(e){return e&&BJ(e)}function LT(e){const[t,n]=ue(e,["text","cacheKey","streaming","class","classList"]),r=aX(),i=is(),o=lF(),[s,a]=he(),l=U(()=>{const g=Jh(t.text);if(!g)return"";const v=t.cacheKey??yi(g);if(!v)return;const y=bv(g,t.streaming??!1),w=[];for(let k=0;k<y.length;k++){const x=y[k],C=yi(x.raw);if(!C)return;const S=`${v}:${k}:${x.mode}`,I=aa.get(S);if(!I||I.hash!==C)return;Cv(S,I),w.push(I.html)}return w.join("")}),c=U(()=>{if(!t.streaming)return;const g=Jh(t.text);if(!g)return;const v=t.cacheKey??yi(g);if(!v)return;const y=bv(g,!0);if(y.length===0)return;const w=[];let k=!1;for(let x=0;x<y.length;x++){const C=y[x],S=yi(C.raw);if(!S)return;const I=`${v}:${x}:${C.mode}`,M=aa.get(I);if(M&&M.hash===S){w.push(M.html);continue}w.push(Kte(C.src)),k=!0}return k?w.join(""):void 0}),[u]=ns(()=>l()!==void 0?null:{text:Jh(t.text),key:t.cacheKey,streaming:t.streaming??!1},async g=>{if(g===null||!g.text)return"";const v=g.key??yi(g.text);return Promise.all(bv(g.text,g.streaming).map(async(y,w)=>{const k=yi(y.raw),x=v?`${v}:${w}:${y.mode}`:k;if(x&&k){const I=aa.get(x);if(I&&I.hash===k)return Cv(x,I),I.html}const C=await Promise.resolve(r.parse(y.src)),S=Wte(C);return x&&k&&Cv(x,{hash:k,html:S}),S})).then(y=>y.join("")).catch(()=>L7(g.text))},{initialValue:L7(Jh(t.text))});let d,h,f,p,m;return oe(()=>{const g=s(),v=l(),y=c(),w=u.latest??u(),k=t.text?v??w??y??"":"";if(!g)return;if(!k){p!==""&&(g.innerHTML="",p="");return}const x=i.t("ui.message.copyCode");if(k===p&&x===m)return;const C={copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:x,copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")};p=k,m=x;const S=document.createElement("div");S.innerHTML=k,hne(S,C),FJ(g,S,{childrenOnly:!0,onBeforeElUpdated:(I,M)=>{if(I instanceof HTMLElement&&M instanceof HTMLElement){if(I.getAttribute("data-component")==="markdown-block"&&M.getAttribute("data-component")==="markdown-block"&&I.dataset.blockHash&&I.dataset.blockHash===M.dataset.blockHash||I.getAttribute("data-component")==="mermaid-preview"&&M.getAttribute("data-component")==="mermaid-preview"&&I.dataset.mermaidHash===M.dataset.mermaidHash&&I.dataset.mermaidRendered===I.dataset.mermaidHash)return!1;I.getAttribute("data-component")==="markdown-code"&&M.getAttribute("data-component")==="markdown-code"&&I.dataset.mermaid==="true"&&I.dataset.mermaidHash===M.dataset.mermaidHash&&I.dataset.mermaidState&&(M.dataset.mermaidState=I.dataset.mermaidState)}return I instanceof HTMLButtonElement&&M instanceof HTMLButtonElement&&I.getAttribute("data-slot")==="markdown-copy-button"&&M.getAttribute("data-slot")==="markdown-copy-button"&&I.getAttribute("data-copied")==="true"&&N0(M,C,!0),!I.isEqualNode(M)}}),kne(g),d||(d=bne(g,()=>({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=wne(g,()=>({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)),f||(f=pne(g))}),pe(()=>{d&&d(),h&&h(),f&&f()}),(()=>{var g=Bte();return Sr(a,g),Wr(g,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n),!1,!1),g})()}var xne=ee('<div class="flex min-h-40 items-center justify-center px-6 py-4 text-center text-text-weak">'),Sne=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">'),_ne=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">'),Cne=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><audio class="w-full max-w-xl"controls preload=metadata><source>'),Ine=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>'),$ne=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">'),Tne=ee('<div class="flex flex-col gap-4 px-6 py-4">'),Ene=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">'),Ane=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>'),Lne=ee('<div class="mt-3 text-12-regular text-text-weak">'),Dne=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>'),Vm=ee('<div class="flex flex-col">'),Mne=ee('<div class="px-6 py-6 text-text-weak">'),One=ee('<th class="border border-border-weak-base px-3 py-2 text-left text-12-semibold text-text-strong whitespace-nowrap">'),Pne=ee("<tr class=even:bg-background-stronger>"),Rne=ee('<td class="border border-border-weak-base px-3 py-1.5 align-top whitespace-pre-wrap">'),Nne=ee('<div class="px-6 py-4 max-w-3xl mx-auto">'),zne=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">'),jne=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]">'),Fne=ee('<div class="text-13-regular text-text-weak">'),Une=ee('<span class=text-syntax-property>"<!>"'),Hne=ee("<div><span class=text-syntax-keyword>null"),Bne=ee('<div><span class=text-syntax-string>"<!>"'),Vne=ee("<div><span class=text-syntax-keyword>"),qne=ee("<details class=cursor-pointer><summary><span class=text-text-weak>[ <!> ]"),Wne=ee("<details class=cursor-pointer><summary><span class=text-text-weak>"),Gne=ee("<div><span class=text-text-weak>");const Iv=new Set(["image","audio","video","pdf"]);function N7(e){return e.current!==void 0?e.current:e.after??e.before}function z7(e){const t=is(),n=()=>e.media,r=U(()=>{const k=n();if(!(!k||k.mode==="off"))return YX(k.path)}),i=U(()=>{const k=n();return!k||k.mode==="off"||r()?!1:XX(k.current)}),o=()=>e.media?.onLoad?.(),s=U(()=>{const k=n(),x=r();return!k||!x?!1:k.deleted?!0:x==="svg"||k.current!==void 0?!1:!dv(k.after)&&dv(k.before)}),a=U(()=>{const k=n(),x=r();if(!(!k||!Iv.has(x)))return uv(N7(k),x)}),l=U(()=>{const k=n(),x=r();if(!(!k||!Iv.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]=ns(l,async k=>k.readFile(k.path).then(x=>{const C=uv(x,k.kind);return C?{key:k.key,src:C,mime:k.kind==="audio"||k.kind==="video"?Kw(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=U(()=>{const k=l(),x=c();if(!(!k||!x||x.key!==k.key))return x}),d=U(()=>{const k=u();return a()??(k&&"src"in k?k.src:void 0)}),h=U(()=>a()?"ready":l()?c.loading?"loading":u()?.error?"error":d()?"ready":"idle":"idle"),f=U(()=>{const k=u();return k&&"mime"in k?k.mime:void 0}),p=U(()=>{const k=n();if(!(!k||r()!=="svg"))return QX(k.current)}),m=U(()=>{const k=n();if(!(!k||r()!=="svg"))return uv(k.current,"svg")}),g=U(()=>{const k=n();if(!(!k||r()!=="svg")&&p()===void 0&&dv(k.current))return[k.path,k.current]});oe(wt(g,k=>{k&&n()?.onError?.({kind:"svg"})},{defer:!0}));const v=U(()=>{const k=n(),x=r();if(k&&!(x!=="table"&&x!=="html"&&x!=="markdown"&&x!=="json"))return eJ(N7(k))}),y=k=>{const x=`ui.fileMedia.kind.${k}`;return t.t(x)},w=k=>(()=>{var x=xne();return F(x,k),x})();return b(Al,{get children(){return[b(Mn,{get when(){return r()==="image"||r()==="audio"||r()==="video"||r()==="pdf"},get children(){return b(fe,{get when(){return d()},keyed:!0,get fallback(){const k=n(),x=r();if(!k||!x||!Iv.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=_ne(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",k),Me(()=>Je(S,"alt",n()?.path)),C})():x==="audio"?(()=>{var C=Cne(),S=C.firstChild,I=S.firstChild;return S.addEventListener("loadedmetadata",o),Je(I,"src",k),Me(()=>Je(I,"type",f())),C})():x==="video"?(()=>{var C=Ine(),S=C.firstChild,I=S.firstChild;return S.addEventListener("loadedmetadata",o),Je(I,"src",k),Me(()=>Je(I,"type",f())),C})():x==="pdf"?(()=>{var C=$ne(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",k),Me(()=>Je(S,"title",n()?.path??"pdf")),C})():e.fallback()}})}}),b(Mn,{get when(){return r()==="svg"},get children(){return p()===void 0&&m()==null?e.fallback():(()=>{var k=Tne();return F(k,b(fe,{get when(){return p()!==void 0},get children(){return e.fallback()}}),null),F(k,b(fe,{get when(){return m()},keyed:!0,children:x=>(()=>{var C=Ene(),S=C.firstChild;return S.addEventListener("load",o),Je(S,"src",x),Me(()=>Je(S,"alt",n()?.path)),C})()}),null),k})()}}),b(Mn,{get when(){return r()==="table"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Kne,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="markdown"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Zne,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="html"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Yne,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return r()==="json"},get children(){return b(fe,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Xne,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Mn,{get when(){return i()},get children(){var k=Sne(),x=k.firstChild,C=x.nextSibling;return F(x,()=>n()?.path?.split("/").pop()??t.t("ui.fileMedia.binary.title")),F(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(Mn,{when:!0,get children(){return e.fallback()}})]}})}function qm(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=Ane(),r=n.firstChild,i=r.nextSibling,o=i.firstChild,s=o.nextSibling;return F(r,()=>e.label),o.$$click=()=>e.onChange("preview"),F(o,()=>e.previewLabel),s.$$click=()=>e.onChange("source"),F(s,()=>e.sourceLabel),Me(a=>{var l=t("preview"),c=t("source");return l!==a.e&&Ko(o,a.e=l),c!==a.t&&Ko(s,a.t=c),a},{e:void 0,t:void 0}),n})()}function Kne(e){const t=is(),[n,r]=he("preview"),i=U(()=>{const s=rJ(e.path,e.text);return nJ(e.text,s)}),o=U(()=>i().headers.length===0&&i().rows.length===0);return oe(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var s=Vm();return F(s,b(qm,{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),F(s,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){return b(fe,{get when(){return!o()},get fallback(){return(()=>{var a=Mne();return F(a,()=>t.t("ui.fileMedia.table.empty")),a})()},get children(){var a=Dne(),l=a.firstChild,c=l.firstChild,u=c.firstChild,d=c.nextSibling;return F(u,b(Wt,{get each(){return i().headers},children:(h,f)=>(()=>{var p=One();return F(p,()=>h||`#${f()+1}`),p})()})),F(d,b(Wt,{get each(){return i().rows},children:h=>(()=>{var f=Pne();return F(f,b(Wt,{get each(){return i().headers},children:(p,m)=>(()=>{var g=Rne();return F(g,()=>h[m()]??""),g})()})),f})()})),F(a,b(fe,{get when(){return i().truncated},get children(){var h=Lne();return F(h,()=>t.t("ui.fileMedia.table.truncated")),h}}),null),a}})}}),null),s})()}function Zne(e){const t=is(),[n,r]=he("preview");return oe(()=>{e.text,requestAnimationFrame(e.onReady)}),(()=>{var i=Vm();return F(i,b(qm,{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),F(i,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=Nne();return F(o,b(LT,{get text(){return e.text}})),o}}),null),i})()}function Yne(e){const t=is(),[n,r]=he("preview");return(()=>{var i=Vm();return F(i,b(qm,{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),F(i,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=zne(),s=o.firstChild;return Zo(s,"load",e.onReady),Me(()=>Je(s,"srcdoc",e.text)),o}}),null),i})()}function Xne(e){const t=is(),[n,r]=he("preview"),i=U(()=>{try{return{ok:!0,value:JSON.parse(Jne(e.text))}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}});return oe(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var o=Vm();return F(o,b(qm,{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),F(o,b(fe,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var s=jne();return F(s,b(fe,{get when(){return i().ok},get fallback(){return(()=>{var a=Fne();return F(a,()=>t.t("ui.fileMedia.json.invalid",{message:i().ok?"":i().message})),a})()},get children(){return b(Eb,{get value(){return i().value},depth:0})}})),s}}),null),o})()}function Jne(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(^|[^:])\/\/.*$/gm,"$1").replace(/,\s*([\]}])/g,"$1")}function Eb(e){const t=()=>" ".repeat(e.depth),n=()=>e.name!==void 0?(()=>{var r=Une(),i=r.firstChild,o=i.nextSibling;return o.nextSibling,F(r,()=>e.name,o),r})():null;if(e.value===null)return(()=>{var r=Hne(),i=r.firstChild;return F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),r})();if(typeof e.value=="string")return(()=>{var r=Bne(),i=r.firstChild,o=i.firstChild,s=o.nextSibling;return s.nextSibling,F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),F(i,()=>e.value,s),r})();if(typeof e.value=="number"||typeof e.value=="boolean")return(()=>{var r=Vne(),i=r.firstChild;return F(r,t,i),F(r,n,i),F(r,()=>e.name!==void 0?": ":"",i),F(i,()=>String(e.value)),r})();if(Array.isArray(e.value))return(()=>{var r=qne(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling;return a.nextSibling,F(i,t,o),F(i,n,o),F(i,()=>e.name!==void 0?": ":"",o),F(o,()=>e.value.length,a),F(r,b(Wt,{get each(){return e.value},children:l=>b(Eb,{value:l,get depth(){return e.depth+1}})}),null),Me(()=>r.open=e.depth<2),r})();if(typeof e.value=="object"){const r=Object.entries(e.value);return(()=>{var i=Wne(),o=i.firstChild,s=o.firstChild;return F(o,t,s),F(o,n,s),F(o,()=>e.name!==void 0?": ":"",s),F(s,()=>`{ ${r.length} }`),F(i,b(Wt,{each:r,children:([a,l])=>b(Eb,{name:a,value:l,get depth(){return e.depth+1}})}),null),Me(()=>i.open=e.depth<2),i})()}return(()=>{var r=Gne(),i=r.firstChild;return F(r,t,i),F(i,()=>String(e.value)),r})()}mr(["click"]);var Qne=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 ere(e){const t=is();return b(js,{get children(){var n=Qne(),r=n.firstChild,i=r.nextSibling,o=i.nextSibling,s=o.firstChild,a=s.nextSibling,l=o.nextSibling;n.$$pointerdown=u=>u.stopPropagation(),F(n,b(Gt,{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"?Sr(c,r):e.setInput=r,F(i,(()=>{var u=Fe(()=>!!e.count());return()=>u()?`${e.index()+1}/${e.count()}`:"0/0"})()),Zo(s,"click",e.onPrev,!0),F(s,b(Gt,{name:"chevron-down",size:"small",class:"rotate-180"})),Zo(a,"click",e.onNext,!0),F(a,b(Gt,{name:"chevron-down",size:"small"})),Zo(l,"click",e.onClose,!0),F(l,b(Gt,{name:"close-small",size:"small"})),Me(u=>{var d=`${e.pos().top}px`,h=`${e.pos().right}px`,f=t.t("ui.fileSearch.placeholder"),p=e.count()===0,m=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&&ii(n,"top",u.e=d),h!==u.t&&ii(n,"right",u.t=h),f!==u.a&&Je(r,"placeholder",u.a=f),p!==u.o&&(s.disabled=u.o=p),m!==u.i&&Je(s,"aria-label",u.i=m),g!==u.n&&(a.disabled=u.n=g),v!==u.s&&Je(a,"aria-label",u.s=v),y!==u.h&&Je(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}),Me(()=>r.value=e.query()),n}})}mr(["pointerdown","input","keydown","click"]);var tre=ee('<div data-component=file class="relative outline-none"tabindex=0><div></div><div class="pointer-events-none absolute inset-0 z-0">');const nre=5e5,rre={...Bw,lineHeight:24,fileGap:0},DT=["mode","media","class","classList","annotations","selectedLines","commentedLines","search","onLineSelected","onLineSelectionEnd","onLineNumberSelectionEnd","onRendered","preloadedDiff"],ire=["file",...DT],ore=["fileDiff","before","after",...DT];function sre(e){let t,n,r,i,o,s,a,l=!1,c=null,u=!1;const d=xX(),h=TX(),[f,p]=he(0),m=()=>SX(n),g=()=>Q$(n),v=kX({wrapper:()=>t,overlay:()=>r,getRoot:m}),y=()=>{i===void 0&&(i=requestAnimationFrame(()=>{i=void 0;const I=u;e.updateSelection(I),u&&(u=!1,e.onLineSelectionEnd(c))}))},w=()=>{o===void 0&&(o=requestAnimationFrame(()=>{o=void 0;const I=e.buildDragSelection();I&&e.setSelectedLines(I)}))},k=I=>{if(!e.enableLineSelection()||I.button!==0)return;const M=e.lineFromMouseEvent(I);if(M.numberColumn){h.begin(!0,M.line);return}M.line!==void 0&&(h.begin(!1,M.line),s=M.line,a=M.line,l=!1,e.onDragStart(M))},x=I=>{if(!e.enableLineSelection())return;const M=e.lineFromMouseEvent(I);if(!h.track(I.buttons,M.line)&&s!==void 0){if((I.buttons&1)===0){s=void 0,a=void 0,l=!1,e.onDragReset(),h.finish();return}M.line!==void 0&&(a=M.line,l=!0,e.onDragMove(M),w())}},C=()=>{if(e.enableLineSelection()&&h.finish()!=="numbers"&&s!==void 0){if(!l){u=!1;const I=e.buildClickSelection();I&&e.setSelectedLines(I),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 I=window.getSelection();!I||I.isCollapsed||y()};return en(()=>{pe(_X(g))}),oe(()=>{f();const I=e.commentedLines();requestAnimationFrame(()=>{const M=m();M&&e.markCommented(M,I)})}),oe(()=>{e.setSelectedLines(e.selectedLines()??null)}),oe(()=>{e.enableLineSelection()&&(zn(n,"mousedown",k),zn(n,"mousemove",x),zn(window,"mouseup",C),zn(document,"selectionchange",S))}),pe(()=>{Od(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(I){t=I},get container(){return n},set container(I){n=I},get overlay(){return r},set overlay(I){r=I},get dragStart(){return s},get dragEnd(){return a},get lastSelection(){return c},set lastSelection(I){c=I},ready:d,bridge:h,rendered:f,setRendered:p,getRoot:m,getHost:g,find:v,scheduleSelectionUpdate:y}}function MT(e,t){return sre({enableLineSelection:e.enableLineSelection,selectedLines:e.selectedLines,commentedLines:()=>e.commentedLines()??[],onLineSelectionEnd:e.onLineSelectionEnd,...t})}function OT(e){oe(()=>{const t=e.search();if(!t)return;const n={focus:()=>e.find.focus()};t.register(n),pe(()=>t.register(null))})}function PT(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 RT(e){oe(()=>{e.viewer.rendered();const t=e.current();t&&(t.setLineAnnotations(e.annotations()),t.rerender(),requestAnimationFrame(()=>e.viewer.find.refresh({reset:!0})))})}function NT(e){CX({state:e.viewer.ready,container:e.viewer.container,getRoot:e.viewer.getRoot,isReady:e.isReady,settleFrames:e.settleFrames,onReady:e.onReady})}function zT(e){Od(e.viewer.ready),e.current?.cleanUp();const t=e.create();e.assign(t),e.viewer.container.innerHTML="",e.draw(t),kb(e.viewer.getHost()),e.viewer.setRendered(n=>n+1),e.onReady()}function are(e){const t=jT(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 jT(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function lre(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=jT(o)??document;return n&&r===s||(i(),n=new L$,r=s,n.setup(s,s instanceof Document?void 0:o)),n},cleanup:i}}function cre(e){let t;return{get:()=>{if(t)return t.virtualizer;const r=e();if(!r)return;const i=OX(r);if(i)return t=i,i.virtualizer},cleanup:()=>{t?.release(),t=void 0}}}function ure(e){if(!e.dataset.line)return;const t=parseInt(e.dataset.line,10);if(!Number.isNaN(t))return t}function FT(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 dre(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 fre(e){const t=Hm(e);if(t)return q$(t)}function UT(e){return(()=>{var t=tre(),n=t.firstChild,r=n.nextSibling;return Zo(t,"focus",e.viewer.find.onFocus),Zo(t,"pointerdown",e.viewer.find.onPointerDown,!0),Sr(i=>e.viewer.wrapper=i,t),F(t,b(fe,{get when(){return e.viewer.find.open()},get children(){return b(ere,{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),Sr(i=>e.viewer.container=i,n),Sr(i=>e.viewer.overlay=i,r),Me(i=>{var o=e.mode,s=uX,a={...e.classList,[e.class??""]:!!e.class};return o!==i.e&&Je(t,"data-mode",i.e=o),i.t=gm(t,s,i.t),i.a=Et(t,a,i.a),i},{e:void 0,t:void 0,a:void 0}),t})()}function hre(e){let t,n;const[r,i]=ue(e,ire),o=()=>{const v=r.file.contents;return typeof v=="string"?v:Array.isArray(v)?v.join(`
|
|
2369
2369
|
`):v==null?"":String(v)},s=()=>{const v=o(),y=v.split(`
|
|
2370
2370
|
`).length-(v.endsWith(`
|
|
2371
2371
|
`)?1:0);return Math.max(1,y)},a=U(()=>{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=U(()=>a()>nre),c=lre(()=>n.wrapper,l),u=v=>FT(v,ure),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=MT({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=tT({root:y,lineForNode:EX,sideForNode:AX,preserveTextSelection:v});w&&(h(w.range),!(!v||!w.text)&&eT(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:fX});const p=PT({viewer:n,onLineSelected:v=>r.onLineSelected?.(v),onLineSelectionEnd:v=>r.onLineSelectionEnd?.(v),onLineNumberSelectionEnd:v=>r.onLineNumberSelectionEnd?.(v)}),m=U(()=>({...V$("unified"),...i,...p})),g=()=>{NT({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 OT({search:()=>r.search,find:n.find}),oe(()=>{const v=m(),y=xb("unified"),w=l(),k=c.get();zT({viewer:n,current:t,create:()=>w&&k?new uY(v,k,rre,y):new C$(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})}),RT({viewer:n,current:()=>t,annotations:()=>r.annotations??[]}),pe(()=>{t?.cleanUp(),t=void 0,c.cleanup()}),b(UT,{mode:"text",viewer:n,get class(){return r.class},get classList(){return r.classList}})}function pre(e){let t,n,r,i;const[o,s]=ue(e,ore),a=H2("(max-width: 640px)"),l=v=>FT(v,P3,dre),c=(v,y)=>{const w=t;if(!w)return;const k=A3(i.getRoot(),v);if(k===void 0){i.lastSelection=v;return}i.lastSelection=k,w.setSelectedLines(k),eT(y?.root,y?.text)};i=MT({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=tT({root:y,lineForNode:P3,sideForNode:fre,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:dX});const d=cre(()=>i.container),h=U(()=>{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},p=PT({viewer:i,normalize:v=>A3(i.getRoot(),v),onLineSelected:v=>o.onLineSelected?.(v),onLineSelectionEnd:v=>o.onLineSelectionEnd?.(v),onLineNumberSelectionEnd:v=>o.onLineNumberSelectionEnd?.(v)}),m=U(()=>{const v={...V$(e.diffStyle),...s,...p},y=h()?{...v,...f}:v;return a()?{...y,disableLineNumbers:!0}:y}),g=v=>{NT({viewer:i,isReady:y=>y.querySelector("[data-line]")!=null,settleFrames:1,onReady:()=>{v?.(),c(i.lastSelection),i.find.refresh({reset:!0}),o.onRendered?.()}})};return OT({search:()=>o.search,find:i.find}),oe(()=>{const v=m(),y=h()?xb("unified"):xb(e.diffStyle),w=d.get(),k=typeof o.before?.contents=="string"?o.before.contents:"",x=typeof o.after?.contents=="string"?o.after.contents:"",C=are(i);pe(C);const S=I=>h()?C3(I):C3(I,I.length);zT({viewer:i,current:t,create:()=>w?new pY(v,w,LX,y):new T$(v,y),assign:I=>{t=I},draw:I=>{if(o.fileDiff){I.render({fileDiff:o.fileDiff,lineAnnotations:[],containerWrapper:i.container});return}!o.before||!o.after||I.render({oldFile:{...o.before,contents:k,cacheKey:S(k)},newFile:{...o.after,contents:x,cacheKey:S(x)},lineAnnotations:[],containerWrapper:i.container})},onReady:()=>g(C)})}),RT({viewer:i,current:()=>t,annotations:()=>o.annotations??[]}),pe(()=>{t?.cleanUp(),t=void 0,d.cleanup(),n=void 0,r=void 0}),b(UT,{mode:"diff",viewer:i,get class(){return o.class},get classList(){return o.classList}})}function mre(e){return e.mode==="text"?b(z7,{get media(){return e.media},fallback:()=>hre(e)}):b(z7,{get media(){return e.media},fallback:()=>pre(e)})}mr(["pointerdown"]);const gre=()=>null;var vre=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)">'),yre=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)">'),bre=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 Uxe=e=>(()=>{var t=vre();return Me(n=>Et(t,{[e.class??""]:!!e.class},n)),t})(),HT=e=>(()=>{var t=yre(),n=e.ref;return typeof n=="function"?Sr(n,t):e.ref=t,Me(r=>Et(t,{[e.class??""]:!!e.class},r)),t})(),wre=e=>(()=>{var t=bre();return Me(n=>Et(t,{[e.class??""]:!!e.class},n)),t})(),kre="OC-2",xre="oc-2",Sre={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"}},_re={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"}},Cre={name:kre,id:xre,light:Sre,dark:_re},BT="codeplane-color-scheme",gd="oc-2",j7=Cre;function Ire(){if(typeof localStorage!="object")return null;try{return localStorage.getItem(BT)}catch{return null}}function $re(e){if(typeof localStorage=="object")try{localStorage.setItem(BT,e)}catch{}}function Qh(){return typeof window!="object"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function F7(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=gd}function Tre(){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:Ere,provider:Are}=yn({name:"Theme",init:e=>{e.defaultTheme;const t=Ire()??"system",n=t==="system"?Qh():t,[r,i]=et({themes:{[gd]:j7},themeId:gd,colorScheme:t,mode:n,previewThemeId:null,previewScheme:null});en(()=>{Tre();const a=window.matchMedia("(prefers-color-scheme: dark)");zn(a,"change",()=>{r.colorScheme==="system"&&i("mode",Qh())}),F7(r.mode),e.onThemeApplied?.(j7,r.mode)}),oe(()=>{const a=r.previewScheme?r.previewScheme==="system"?Qh():r.previewScheme:r.mode;F7(a)});const o=a=>{i("colorScheme",a),$re(a),i("mode",a==="system"?Qh():a)},s=()=>{};return{themeId:()=>r.themeId,colorScheme:()=>r.colorScheme,mode:()=>r.mode,ids:()=>[gd],name:a=>a===gd?"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)}}}}),Lre=yt(),Dre=["title","meta"],U7=[],H7=["name","http-equiv","content","charset","media"].concat(["property"]),B7=(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 Mre(){if(!Ge.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(Dre.indexOf(n.tag)!==-1){const o=n.tag==="title"?U7:H7,s=B7(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,Wr(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,Wr(i,n.props),i.parentNode!=document.head&&document.head.appendChild(i),-1},removeTag(n,r){const i=n.tag==="title"?U7:H7,o=B7(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 Ore=e=>{const t=Mre();return b(Lre.Provider,{value:t,get children(){return e.children}})};function VT(){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 Ab;function t4(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ab=window.history.state._depth}t4();function Pre(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Rre(e,t){let n=!1;return()=>{const r=Ab;t4();const i=r==null?null:Ab-r;if(n){n=!1;return}i&&t(i)?(n=!0,window.history.go(-i)):e()}}const Nre=/^(?:[a-z0-9]+:)?\/\//i,zre=/^\/+|(\/)\/+$/g,qT="http://sr";function al(e,t=!1){const n=e.replace(zre,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function z0(e,t,n){if(Nre.test(t))return;const r=al(e),i=n&&al(n);let o="";return!i||t.startsWith("/")?o=r:i.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+i:o=i,(o||"/")+al(t,!o)}function jre(e,t){if(e==null)throw new Error(t);return e}function Fre(e,t){return al(e).replace(/\/*(\*.*)?$/g,"")+al(t)}function WT(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 Ure(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],p=f[0]===":",m=p?l[h]:l[h].toLowerCase(),g=p?f.slice(1):f.toLowerCase();if(p&&$v(m,d(g)))u.params[g]=m;else if(p||!$v(m,g))return null;u.path+=`/${m}`}if(i){const h=c?l.slice(-c).join("/"):"";if($v(h,d(i)))u.params[i]=h;else return null}return u}}function $v(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 Hre(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 GT(e){const t=new Map,n=ko();return new Proxy({},{get(r,i){return t.has(i)||_s(n,()=>t.set(i,U(()=>e()[i]))),t.get(i)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,i){return i in e()}})}function Bre(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 KT(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 KT(r).reduce((o,s)=>[...o,...i.map(a=>a+s)],[])}const Vre=100,ZT=yt(),n4=yt(),fu=()=>jre(pt(ZT),"<A> and 'use' router primitives can be only used inside a Route."),qre=()=>pt(n4)||fu().base,Wre=e=>{const t=qre();return U(()=>t.resolvePath(e()))},Gre=e=>{const t=fu();return U(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Eo=()=>fu().navigatorFactory(),Ao=()=>fu().location,Kre=()=>fu().isRouting,ui=()=>fu().params,Hxe=()=>{const e=Ao(),t=Eo(),n=(r,i)=>{const o=ct(()=>Bre(e.search,r)+e.hash);t(o,{scroll:!1,resolve:!1,...i})};return[e.query,n]};function Zre(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 YT(e.path).reduce((c,u)=>{for(const d of KT(u)){const h=Fre(t,d);let f=a?h:h.split("/*",1)[0];f=f.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...l,originalPath:u,pattern:f,matcher:Ure(f,!a,e.matchFilters)})}return c},[])}function Yre(e,t=0){return{routes:e,score:Hre(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 YT(e){return Array.isArray(e)?e:[e]}function XT(e,t="",n=[],r=[]){const i=YT(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=Zre(a,t);for(const c of l){n.push(c);const u=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!u)XT(a.children,c.pattern,n,r);else{const d=Yre([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((o,s)=>s.score-o.score)}function Tv(e,t){for(let n=0,r=e.length;n<r;n++){const i=e[n].matcher(t);if(i)return i}return[]}function Xre(e,t,n){const r=new URL(qT),i=U(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=U(()=>i().pathname),s=U(()=>i().search,!0),a=U(()=>i().hash),l=()=>"",c=wt(s,()=>WT(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):GT(c)}}let Ja;function Jre(){return Ja}function Qre(e,t,n,r={}){const{signal:[i,o],utils:s={}}=e,a=s.parsePath||(A=>A),l=s.renderPath||(A=>A),c=s.beforeLeave||VT(),u=z0("",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]=he(!1);let f;const p=(A,T)=>{T.value===m()&&T.state===v()||(f===void 0&&h(!0),Ja=A,f=T,Ij(()=>{f===T&&(g(f.value),y(f.state),Rj(),x[1](R=>R.filter(G=>G.pending)))}).finally(()=>{f===T&&Qe(()=>{Ja=void 0,A==="navigate"&&$(f),h(!1),f=void 0})}))},[m,g]=he(i().value),[v,y]=he(i().state),w=Xre(m,v,s.queryWrapper),k=[],x=he([]),C=U(()=>typeof r.transformUrl=="function"?Tv(t(),r.transformUrl(w.pathname)):Tv(t(),w.pathname)),S=()=>{const A=C(),T={};for(let R=0;R<A.length;R++)Object.assign(T,A[R].params);return T},I=s.paramsWrapper?s.paramsWrapper(S,t):GT(S),M={pattern:u,path:()=>u,outlet:()=>null,resolvePath(A){return z0(u,A)}};return Me(wt(i,A=>p("native",A),{defer:!0})),{base:M,location:w,params:I,isRouting:d,renderPath:l,parsePath:a,navigatorFactory:O,matches:C,beforeLeave:c,preloadRoute:E,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:x};function D(A,T,R){ct(()=>{if(typeof T=="number"){T&&(s.go?s.go(T):console.warn("Router integration does not support relative routing"));return}const G=!T||T[0]==="?",{replace:K,resolve:q,scroll:W,state:N}={replace:!1,resolve:!G,scroll:!0,...R},V=q?A.resolvePath(T):z0(G&&w.pathname||"",T);if(V===void 0)throw new Error(`Path '${T}' is not a routable path`);if(k.length>=Vre)throw new Error("Too many redirects");const J=m();(V!==J||N!==v())&&(Ty||c.confirm(V,R)&&(k.push({value:J,replace:K,scroll:W,state:v()}),p("navigate",{value:V,state:N})))})}function O(A){return A=A||pt(n4)||M,(T,R)=>D(A,T,R)}function $(A){const T=k[0];T&&(o({...A,replace:T.replace,scroll:T.scroll}),k.length=0)}function E(A,T){const R=Tv(t(),A.pathname),G=Ja;Ja="preload";for(let K in R){const{route:q,params:W}=R[K];q.component&&q.component.preload&&q.component.preload();const{preload:N}=q;T&&N&&_s(n(),()=>N({params:W,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:WT(A),state:null,key:""},intent:"preload"}))}Ja=G}}function eie(e,t,n,r){const{base:i,location:o,params:s}=e,{pattern:a,component:l,preload:c}=r().route,u=U(()=>r().path);l&&l.preload&&l.preload();const d=c?c({params:s,location:o,intent:Ja||"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 z0(i.path(),f,u())}}}const tie=e=>t=>{const{base:n}=t,r=El(()=>t.children),i=U(()=>XT(r(),t.base||""));let o;const s=Qre(e,i,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),b(ZT.Provider,{value:s,get children(){return b(nie,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[Fe(()=>(o=ko())&&null),b(rie,{routerState:s,get branches(){return i()}})]}})}})};function nie(e){const t=e.routerState.location,n=e.routerState.params,r=U(()=>e.preload&&ct(()=>{e.preload({params:n,location:t,intent:Jre()||"initial"})}));return b(fe,{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 rie(e){const t=[];let n;const r=U(wt(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](),Wn(f=>{t[c]=f,l[c]=eie(e.routerState,l[c-1]||e.routerState.base,V7(()=>r()[c+1]),()=>{const p=e.routerState.matches();return p[c]??p[0]})}))}return t.splice(i.length).forEach(c=>c()),s&&a?s:(n=l[0],l)}));return V7(()=>r()&&n)()}const V7=e=>()=>b(fe,{get when(){return e()},keyed:!0,children:t=>b(n4.Provider,{value:t,get children(){return t.outlet()}})}),jr=e=>{const t=El(()=>e.children);return ne(e,{get children(){return t()}})};function iie([e,t],n,r){return[e,r?i=>t(r(i)):t]}function oie(e){let t=!1;const n=i=>typeof i=="string"?{value:i}:i,r=iie(he(n(e.get()),{equals:(i,o)=>i.value===o.value&&i.state===o.state}),void 0,i=>(!t&&e.set(i),Ge.registry&&!Ge.done&&(Ge.done=!0),i));return e.init&&pe(e.init((i=e.get())=>{t=!0,r[1](n(i)),t=!1})),tie({signal:r,create:e.create,utils:e.utils})}function sie(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function aie(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const lie=new Map;function cie(e=!0,t=!1,n="/_server",r){return i=>{const o=i.base.path(),s=i.navigatorFactory(i.base);let a,l;function c(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function u(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const g=m.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(m){const g=u(m);if(!g)return;const[v,y]=g,w=i.parsePath(y.pathname+y.search+y.hash),k=v.getAttribute("state");m.preventDefault(),s(w,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:k?JSON.parse(k):void 0})}function h(m){const g=u(m);if(!g)return;const[v,y]=g;r&&(y.pathname=r(y.pathname)),i.preloadRoute(y,v.getAttribute("preload")!=="false")}function f(m){clearTimeout(a);const g=u(m);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 p(m){if(m.defaultPrevented)return;let g=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!g)return;if(!g.startsWith("https://action/")){const y=new URL(g,qT);if(g=i.parsePath(y.pathname+y.search),!g.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=lie.get(g);if(v){m.preventDefault();const y=new FormData(m.target,m.submitter);v.call({r:i,f:m.target},m.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}mr(["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",p),pe(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",f),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",p)})}}function uie(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=VT();return oie({get:t,set({value:r,replace:i,scroll:o,state:s}){i?window.history.replaceState(Pre(s),"",r):window.history.pushState(s,"",r),aie(decodeURIComponent(window.location.hash.slice(1)),o),t4()},init:r=>sie(window,"popstate",Rre(r,i=>{if(i)return!n.confirm(i);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:cie(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var die=ee("<a>");function Wc(e){e=ne({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=ue(e,["href","state","class","activeClass","inactiveClass","end"]),n=Wre(()=>e.href),r=Gre(n),i=Ao(),o=U(()=>{const s=n();if(s===void 0)return[!1,!1];const a=al(s.split(/[?#]/,1)[0]).toLowerCase(),l=decodeURI(al(i.pathname).toLowerCase());return[e.end?a===l:l.startsWith(a+"/")||l===a,a===l]});return(()=>{var s=die();return Wr(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 hu(e){const t=Eo(),n=Ao(),{href:r,state:i}=e,o=typeof r=="function"?r({navigate:t,location:n}):r;return t(o,{replace:!0,state:i}),null}var Nl=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(){}},fie=class extends Nl{#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"}},r4=new fie,hie={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},pie=class{#t=hie;#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)}},nl=new pie;function mie(e){setTimeout(e,0)}var gie=typeof window>"u"||"Deno"in globalThis;function ur(){}function vie(e,t){return typeof e=="function"?e(t):e}function Lb(e){return typeof e=="number"&&e>=0&&e!==1/0}function JT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ha(e,t){return typeof e=="function"?e(t):e}function zi(e,t){return typeof e=="function"?e(t):e}function q7(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==i4(s,t.options))return!1}else if(!ef(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 W7(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(bl(t.options.mutationKey)!==bl(o))return!1}else if(!ef(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function i4(e,t){return(t?.queryKeyHashFn||bl)(e)}function bl(e){return JSON.stringify(e,(t,n)=>Db(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ef(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ef(e[n],t[n])):!1}var yie=Object.prototype.hasOwnProperty;function o4(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=G7(e)&&G7(t);if(!r&&!(Db(e)&&Db(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:yie.call(e,d))&&c++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){l[d]=f;continue}const p=o4(h,f,n+1);l[d]=p,p===h&&c++}return o===a&&c===o?e:l}function tf(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 G7(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Db(e){if(!K7(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!K7(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function K7(e){return Object.prototype.toString.call(e)==="[object Object]"}function bie(e){return new Promise(t=>{nl.setTimeout(t,e)})}function Mb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?o4(e,t):t}function wie(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function kie(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zl=Symbol();function QT(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===zl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function eE(e,t){return typeof e=="function"?e(...t):!!e}function xie(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 Ap=(()=>{let e=()=>gie;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ob(){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 Sie(e){let t;if(e.then(n=>(t=n,n),ur)?.catch(ur),t!==void 0)return{data:t}}function _ie(e){return e}function Cie(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),i=e.getQueryCache(),o=e.getDefaultOptions().hydrate?.deserializeData??_ie,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 p=h?Sie(h):void 0,m=c.data===void 0?p?.data:c.data,g=m===void 0?m:o(m);let v=i.get(u);const y=v?.state.status==="pending",w=v?.state.fetchStatus==="fetching";if(v){const k=p&&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(ur)})}var Iie=mie;function $ie(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Iie;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 tr=$ie(),Tie=class extends Nl{#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}},Lp=new Tie;function Eie(e){return Math.min(1e3*2**e,3e4)}function tE(e){return(e??"online")==="online"?Lp.isOnline():!0}var Pb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function nE(e){let t=!1,n=0,r;const i=Ob(),o=()=>i.status!=="pending",s=m=>{if(!o()){const g=new Pb(m);h(g),e.onCancel?.(g)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>r4.isFocused()&&(e.networkMode==="always"||Lp.isOnline())&&e.canRun(),u=()=>tE(e.networkMode)&&e.canRun(),d=m=>{o()||(r?.(),i.resolve(m))},h=m=>{o()||(r?.(),i.reject(m))},f=()=>new Promise(m=>{r=g=>{(o()||c())&&m(g)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),p=()=>{if(o())return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{if(o())return;const y=e.retry??(Ap.isServer()?0:3),w=e.retryDelay??Eie,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),bie(k).then(()=>c()?void 0:f()).then(()=>{t?h(v):p()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():f().then(p),i)}}var rE=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lb(this.gcTime)&&(this.#t=nl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ap.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t&&(nl.clearTimeout(this.#t),this.#t=void 0)}},Aie=class extends rE{#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=Y7(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=Y7(this.options);t.data!==void 0&&(this.setState(Z7(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Mb(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(ur).catch(ur):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=>zi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zl||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ha(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:!JT(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=QT(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=nE({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:a=>{a instanceof Pb&&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 Pb){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,...iE(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Z7(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),tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function iE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Z7(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Y7(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 oE=class extends Nl{constructor(e,t){super(),this.options=t,this.#t=e,this.#a=null,this.#s=Ob(),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;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),X7(this.#e,this.options)?this.#m():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rb(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rb(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 zi(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&&!tf(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&J7(this.#e,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#e!==n||zi(this.options.enabled,this.#e)!==zi(t.enabled,this.#e)||ha(this.options.staleTime,this.#e)!==ha(t.staleTime,this.#e))&&this.#g();const i=this.#v();r&&(this.#e!==n||zi(this.options.enabled,this.#e)!==zi(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 Die(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.#p.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.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#m(e){this.#x();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ur)),t}#g(){this.#w();const e=ha(this.options.staleTime,this.#e);if(Ap.isServer()||this.#i.isStale||!Lb(e))return;const n=JT(this.#i.dataUpdatedAt,e)+1;this.#u=nl.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,!(Ap.isServer()||zi(this.options.enabled,this.#e)===!1||!Lb(this.#c)||this.#c===0)&&(this.#d=nl.setInterval(()=>{(this.options.refetchIntervalInBackground||r4.isFocused())&&this.#m()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#w(){this.#u&&(nl.clearTimeout(this.#u),this.#u=void 0)}#k(){this.#d&&(nl.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 I=this.hasListeners(),M=!I&&X7(e,t),D=I&&J7(e,n,t,r);(M||D)&&(u={...u,...iE(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:m}=u;h=u.data;let g=!1;if(t.placeholderData!==void 0&&h===void 0&&m==="pending"){let I;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(I=i.data,g=!0):I=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,I!==void 0&&(m="success",h=Mb(i?.data,I,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=Mb(i?.data,h,t),this.#f=h,this.#a=null}catch(I){this.#a=I}this.#a&&(f=this.#a,h=this.#f,p=Date.now(),m="error");const v=u.fetchStatus==="fetching",y=m==="pending",w=m==="error",k=y&&v,x=h!==void 0,S={status:m,fetchStatus:u.fetchStatus,isPending:y,isSuccess:m==="success",isError:w,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:p,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:s4(e,t),refetch:this.refetch,promise:this.#s,isEnabled:zi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=S.data!==void 0,M=S.status==="error"&&!I,D=E=>{M?E.reject(S.error):I&&E.resolve(S.data)},O=()=>{const E=this.#s=S.promise=Ob();D(E)},$=this.#s;switch($.status){case"pending":e.queryHash===n.queryHash&&D($);break;case"fulfilled":(M||S.data!==$.value)&&O();break;case"rejected":(!M||S.error!==$.reason)&&O();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),tf(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.#p.size)return!0;const o=new Set(i??this.#p);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){tr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Lie(e,t){return zi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function X7(e,t){return Lie(e,t)||e.state.data!==void 0&&Rb(e,t,t.refetchOnMount)}function Rb(e,t,n){if(zi(t.enabled,e)!==!1&&ha(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&s4(e,t)}return!1}function J7(e,t,n,r){return(e!==t||zi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&s4(e,n)}function s4(e,t){return zi(t.enabled,e)!==!1&&e.isStaleByTime(ha(t.staleTime,e))}function Die(e,t){return!tf(e.getCurrentResult(),t)}function Q7(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=p=>{xie(p,()=>t.signal,()=>u=!0)},h=QT(t.options,t.fetchOptions),f=async(p,m,g)=>{if(u)return Promise.reject();if(m==null&&p.pages.length)return Promise.resolve(p);const y=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:m,direction:g?"backward":"forward",meta:t.options.meta};return d(C),C})(),w=await h(y),{maxPages:k}=t.options,x=g?kie:wie;return{pages:x(p.pages,w,k),pageParams:x(p.pageParams,m,k)}};if(i&&o.length){const p=i==="backward",m=p?Mie:e8,g={pages:o,pageParams:s},v=m(r,g);a=await f(g,v,p)}else{const p=e??o.length;do{const m=l===0?s[0]??r.initialPageParam:e8(r,a);if(l>0&&m==null)break;a=await f(a,m),l++}while(l<p)}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 e8(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 Mie(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Oie=class extends rE{#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||sE(),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=nE({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),tr.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function sE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pie=class extends Nl{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 Oie({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=e0(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=e0(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=e0(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=e0(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.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=>W7(t,n))}findAll(e={}){return this.getAll().filter(t=>W7(e,t))}notify(e){tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return tr.batch(()=>Promise.all(e.map(t=>t.continue().catch(ur))))}};function e0(e){return e.options.scope?.id}var Rie=class extends Nl{#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),tf(this.options,n)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&bl(n.mutationKey)!==bl(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??sE();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){tr.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 t8(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function Nie(e,t,n){const r=e.slice(0);return r[t]=n,r}var zie=class extends Nl{#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,tr.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||!tf(u,h)});!l&&!c||(l&&(this.#f=r,this.#r=i),this.#e=o,this.hasListeners()&&(l&&(t8(n,i).forEach(u=>{u.destroy()}),t8(i,n).forEach(u=>{u.subscribe(d=>{this.#c(u,d)})})),this.#p()))})}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=o4(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 oE(this.#t,i);n.push({defaultedQueryOptions:i,observer:s})}),n}#c(e,t){const n=this.#r.indexOf(e);n!==-1&&(this.#e=Nie(this.#e,n,t),this.#p())}#p(){if(this.hasListeners()){const e=this.#o,t=this.#h(this.#e,this.#f),n=this.#u(t,this.#i?.combine);e!==n&&tr.batch(()=>{this.listeners.forEach(r=>{r(this.#e)})})}}},jie=class extends Nl{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,i=t.queryHash??i4(r,t);let o=this.get(i);return o||(o=new Aie({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(){tr.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=>q7(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>q7(e,n)):t}notify(e){tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Fie=class{#t;#e;#n;#i;#r;#o;#s;#a;constructor(t={}){this.#t=t.queryCache||new jie,this.#e=t.mutationCache||new Pie,this.#n=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=r4.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=Lp.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(ha(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=vie(n,s);if(a!==void 0)return this.#t.build(this,i).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return tr.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;tr.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#t;return tr.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},i=tr.batch(()=>this.#t.findAll(t).map(o=>o.cancel(r)));return Promise.all(i).then(ur).catch(ur)}invalidateQueries(t,n={}){return tr.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=tr.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(ur)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(ur)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#t.build(this,n);return r.isStaleByTime(ha(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ur).catch(ur)}fetchInfiniteQuery(t){return t.behavior=Q7(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ur).catch(ur)}ensureInfiniteQueryData(t){return t.behavior=Q7(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Lp.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(bl(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#i.values()],r={};return n.forEach(i=>{ef(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,n){this.#r.set(bl(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],r={};return n.forEach(i=>{ef(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=i4(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===zl&&(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()}},aE=yt(void 0),pu=e=>{if(e)return e;const t=pt(aE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t()},Uie=e=>(Me(t=>(t?.(),e.client.mount(),e.client.unmount.bind(e.client))),pe(()=>e.client.unmount()),b(aE.Provider,{value:()=>e.client,get children(){return e.children}})),lE=yt(()=>!1),cE=()=>pt(lE);lE.Provider;function Hie(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=$t(i,{key:n})(e.data);return{...t,data:o}}var Bie=(e,t)=>t;function Vie(e,t,n){const r=U(()=>pu(n?.())),i=cE(),o=U(()=>{const k=r().defaultQueryOptions(e());return k._optimisticResults=i()?"isRestoring":"optimistic",k.structuralSharing=!1,k}),s=o(),[a,l]=he(new t(r(),o()));let c=a().getOptimisticResult(o());const[u,d]=et(c),h=()=>a().subscribe(x=>{c=x,queueMicrotask(()=>{m&&y()})});function f(k){const x=a().options,C=x.reconcile;d(S=>Hie(S,k,C===void 0?!1:C,x.queryHash))}function p(){return[()=>u,k=>{const x=ki(u);if(typeof k=="function"&&(k=k(x)),k?.hydrationData){const{hydrationData:C,...S}=k;k=S}f(k)}]}let m=null,g=null;const[v,{refetch:y}]=ns(()=>{const k=a();return new Promise((x,C)=>{if(g=x,!m&&!i()&&(m=h()),k.updateResult(),c.isError&&!c.isFetching&&!i()&&eE(k.options.throwOnError,[c.error,k.getCurrentQuery()]))return f(c),C(c.error);if(!c.isLoading)return g=null,x(Bie(k.getCurrentQuery(),c));f(c)})},{storage:p,get deferStream(){return e().deferStream},onHydrated(k,x){if(x.value&&"hydrationData"in x.value&&Cie(r(),{queries:[{...x.value.hydrationData}]}),m)return;const C={...s};(s.staleTime||!s.initialData)&&x.value&&(C.refetchOnMount=!1),a().setOptions(C),f(a().getOptimisticResult(C)),m=h()}});Go(wt(r,k=>{m&&m();const x=new t(k,o());m=h(),l(x)},{defer:!0})),Go(wt(i,k=>{!k&&!Ty&&y()},{defer:!0})),pe(()=>{m&&(m(),m=null),g&&!Ty&&(g(c),g=null)}),Go(wt([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 ka(e,t){return Vie(U(()=>e()),oE,t)}function Pd(e,t){const n=U(()=>pu(t?.())),r=new Rie(n(),e()),i=(l,c)=>{r.mutate(l,c).catch(ur)},[o,s]=et({...r.getCurrentResult(),mutate:i,mutateAsync:r.getCurrentResult().mutate});Go(()=>{r.setOptions(e())}),Go(wt(()=>o.status,()=>{if(o.isError&&eE(r.options.throwOnError,[o.error]))throw o.error}));const a=r.subscribe(l=>{s({...l,mutate:i,mutateAsync:l.mutate})});return pe(a),o}function qxe(e,t){const n=U(()=>pu(t?.())),r=cE(),i=U(()=>e().queries.map(g=>ne(n().defaultQueryOptions(g),{get _optimisticResults(){return r()?"isRestoring":"optimistic"}}))),o=new zie(n(),i(),e().combine?{combine:e().combine}:void 0),[s,a]=et(o.getOptimisticResult(i(),e().combine)[1]());Me(wt(()=>e().queries.length,()=>a(o.getOptimisticResult(i(),e().combine)[1]())));const l=U(wt(()=>s.length,()=>s.map(g=>ns(()=>new Promise(y=>{g.isFetching&&g.isLoading||y(ki(g.data))})))));Qe(()=>{const g=l();for(let v=0;v<g.length;v++){const y=g[v];y[1].mutate(()=>ki(s[v].data)),y[1].refetch()}});let c=[];const u=()=>o.subscribe(g=>{c.push(()=>{Qe(()=>{const v=l();for(let y=0;y<v.length;y++){const w=v[y],k={...ki(g[y])};a(y,ki(k)),w[1].mutate(()=>ki(s[y].data)),w[1].refetch()}})}),queueMicrotask(()=>{const v=c.pop();v&&v(),c=[]})});let d=ur;Go(g=>(g?.(),d=r()?ur:u(),()=>queueMicrotask(d))),pe(d),en(()=>{o.setQueries(i(),e().combine?{combine:e().combine}:void 0)}),Go(()=>{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))),[p,m]=et(f());return Me(()=>m(f())),p}var qie=class extends Fie{constructor(e={}){super(e)}};var Wxe=ka;const mu=(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}}},ir=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)}}}},Oc=e=>e,uE=e=>()=>e,dE=uE(void 0),Wie=dE,Nb=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},zb=new WeakSet;function Gie(e){return typeof e=="number"}function Kie(e){return typeof e=="function"}function Zie(e){return typeof e=="object"&&e!==null||Kie(e)}const Hs=ir(2,(e,t)=>Zie(e)&&t in e),Ea="~effect/interfaces/Hash",So=e=>{switch(typeof e){case"number":return a4(e);case"bigint":return xr(e.toString(10));case"boolean":return xr(String(e));case"symbol":return xr(String(e));case"string":return xr(e);case"undefined":return xr("undefined");case"function":case"object":{if(e===null)return xr("null");if(e instanceof Date)return xr(e.toISOString());if(e instanceof RegExp)return xr(e.toString());{if(zb.has(e))return jb(e);if(Av.has(e))return Av.get(e);const t=eoe(e,()=>Yie(e)?e[Ea]():typeof e=="function"?jb(e):Array.isArray(e)||ArrayBuffer.isView(e)?hE(e):e instanceof Map?Jie(e):e instanceof Set?Qie(e):fE(e));return Av.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`)}},jb=e=>(Ev.has(e)||Ev.set(e,a4(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),Ev.get(e)),Gc=ir(2,(e,t)=>e*53^t),Wm=e=>e&3221225471|e>>>1&1073741824,Yie=e=>Hs(e,Ea),a4=e=>{if(e!==e)return xr("NaN");if(e===1/0)return xr("Infinity");if(e===-1/0)return xr("-Infinity");let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Wm(t)},xr=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Wm(t)},Xie=(e,t)=>{let n=12289;for(const r of t)n^=Gc(So(r),So(e[r]));return Wm(n)},fE=e=>Xie(e,Nb(e)),l4=(e,t)=>n=>{let r=e;for(const i of n)r^=t(i);return Wm(r)},hE=l4(6151,So),Jie=l4(xr("Map"),([e,t])=>Gc(So(e),So(t))),Qie=l4(xr("Set"),So),Ev=new WeakMap,Av=new WeakMap,Lv=new WeakSet;function eoe(e,t){if(Lv.has(e))return xr("[Circular]");Lv.add(e);const n=t();return Lv.delete(e),n}const Aa="~effect/interfaces/Equal";function wl(){return arguments.length===1?e=>kl(e,arguments[0]):kl(arguments[0],arguments[1])}function kl(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"||zb.has(e)||zb.has(t)?!1:roe(e,t,noe)}function toe(e,t,n){const r=Dv.has(e),i=Mv.has(t);if(r&&i)return!0;if(r||i)return!1;Dv.add(e),Mv.add(t);const o=n();return Dv.delete(e),Mv.delete(t),o}const Dv=new WeakSet,Mv=new WeakSet;function noe(e,t){if(So(e)!==So(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=n8(e),r=n8(t);if(n!==r)return!1;const i=n&&r;return typeof e=="function"&&!i?!1:toe(e,t,()=>i?e[Aa](t):Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:ioe(e,t):ArrayBuffer.isView(e)?!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength?!1:ooe(e,t):e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:loe(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:uoe(e,t):soe(e,t))}function roe(e,t,n){let r=t0.get(e);if(!r)r=new WeakMap,t0.set(e,r);else if(r.has(t))return r.get(t);const i=n(e,t);r.set(t,i);let o=t0.get(t);return o||(o=new WeakMap,t0.set(t,o)),o.set(e,i),i}const t0=new WeakMap;function ioe(e,t){for(let n=0;n<e.length;n++)if(!kl(e[n],t[n]))return!1;return!0}function ooe(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 soe(e,t){const n=Nb(e),r=Nb(t);if(n.size!==r.size)return!1;for(const i of n)if(!r.has(i)||!kl(e[i],t[i]))return!1;return!0}function aoe(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 loe=aoe(kl,kl);function coe(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 uoe=coe(kl),n8=e=>Hs(e,Aa),doe=()=>wl,foe=e=>e.length>0,pE=Symbol.for("~effect/Redactable");function hoe(e){return e[pE](globalThis[j0]?.context??poe)}const j0="~effect/Fiber/currentFiber",poe={"~effect/Context":{},mapUnsafe:new Map,pipe(){return mu(this,arguments)}};function gu(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 r8;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(`,
|
|
@@ -2379,7 +2379,7 @@ ${o(u)}}`;return s(c,h)}return String(c)}return l(e,0)}const r8="[Circular]";fun
|
|
|
2379
2379
|
`);n.splice(1,3),t.stack=n.join(`
|
|
2380
2380
|
`)}return t},Woe=(e,t)=>{if(e.mutable)return t(e.mapUnsafe),e;const n=new Map(e.mapUnsafe);return t(n),Xm(n)},jl=Roe,Mp="~effect/time/Duration",Goe=BigInt(0),CE=BigInt(1e3),Koe=BigInt(1e6),Zoe=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Yoe=e=>{switch(typeof e){case"number":return d8(e);case"bigint":return u8(e);case"string":{const t=Zoe.exec(e);if(!t)break;const[n,r,i]=t,o=Number(r);switch(i){case"nano":case"nanos":return u8(BigInt(r));case"micro":case"micros":return ise(BigInt(r));case"milli":case"millis":return d8(o);case"second":case"seconds":return ose(o);case"minute":case"minutes":return sse(o);case"hour":case"hours":return ase(o);case"day":case"days":return lse(o);case"week":case"weeks":return cse(o)}break}case"object":{if(e===null)break;if(Mp in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(Gie)?l8(e):Number.isNaN(e[0])||Number.isNaN(e[1])?tse:e[0]===-1/0||e[1]===-1/0?rse:e[0]===1/0||e[1]===1/0?nse:si(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 si(n);let r=BigInt(n)*Koe;return t.microseconds&&(r+=BigInt(t.microseconds)*CE),t.nanoseconds&&(r+=BigInt(t.nanoseconds)),si(r)}}return l8(e)},l8=e=>{throw new Error(`Invalid Input: ${e}`)},c8={_tag:"Millis",millis:0},Xoe={_tag:"Infinity"},Joe={_tag:"NegativeInfinity"},Qoe={[Mp]:Mp,[Ea](){return fE(this.value)},[Aa](e){return ese(e)&&pse(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"}}},[Gm](){return this.toJSON()},pipe(){return mu(this,arguments)}},si=e=>{const t=Object.create(Qoe);return typeof e=="number"?isNaN(e)||e===0||Object.is(e,-0)?t.value=c8: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?Xoe:Joe:e===Goe?t.value=c8:t.value={_tag:"Nanos",nanos:e},t},ese=e=>Hs(e,Mp),tse=si(0),nse=si(1/0),rse=si(-1/0),u8=e=>si(e),ise=e=>si(e*CE),d8=e=>si(e),ose=e=>si(e*1e3),sse=e=>si(e*6e4),ase=e=>si(e*36e5),lse=e=>si(e*864e5),cse=e=>si(e*6048e5),use=e=>dse(e,{onMillis:Oc,onNanos:t=>Number(t)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),f8=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))}},dse=ir(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)()}}),fse=ir(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(f8(e),t.value.nanos):n.onNanos(e.value.nanos,f8(t))),hse=(e,t)=>fse(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r,onInfinity:(n,r)=>n.value._tag===r.value._tag}),pse=ir(2,(e,t)=>hse(e,t)),IE=jl("effect/Scheduler",{defaultValue:()=>new gse}),$E="setImmediate"in globalThis?e=>{const t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{const t=setTimeout(e,0);return()=>clearTimeout(t)};class mse{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 gse{executionMode;setImmediate;constructor(t="async",n=$E){this.executionMode=t,this.setImmediate=n}shouldYield(t){return t.currentOpCount>=t.maxOpsBeforeYield}makeDispatcher(){return new vse(this.setImmediate)}}class vse{tasks=new mse;running=void 0;setImmediate;constructor(t=$E){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 yse=jl("effect/Scheduler/MaxOpsBeforeYield",{defaultValue:()=>2048}),bse=jl("effect/Scheduler/PreventSchedulerYield",{defaultValue:()=>!1}),wse="effect/Tracer/ParentSpan",kse="effect/Tracer",xse="effect/observability/Metric/FiberRuntimeMetricsKey",Sse=jl("effect/References/CurrentStackFrame",{defaultValue:dE}),_se=jl("effect/References/CurrentLogLevel",{defaultValue:()=>"Info"}),Cse=jl("effect/References/MinimumLogLevel",{defaultValue:()=>"Info"}),Ise="dev";class $se extends bE{fiberId;constructor(t,n=u4){super("Interrupt",n,"Interrupted"),this.fiberId=t}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:"Interrupt",fiberId:this.fiberId}}[Aa](t){return wE(t)&&this.fiberId===t.fiberId&&this.annotations===t.annotations}[Ea](){return Gc(xr(`${this._tag}:${this.fiberId}`))(jb(this.annotations))}}const Tse=e=>new Zm([new $se(e)]),Ese=e=>e.reasons.some(wE),Ase=ir(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;const n=new Zm(Ooe(e.reasons,t.reasons));return wl(e,n)?e:n}),Lse=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},Dse=e=>{const t=Lse(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")},h8=`~effect/Fiber/${Ise}`,Mse={_A:Oc,_E:Oc},Ose={id:0};class TE{constructor(t,n=!0){this[h8]=Mse,this.setContext(t),this.id=++Ose.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}[h8];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 Voe(this.context,t)}addObserver(t){return this._exit?(t(this._exit),Wie):(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=Tse(t);this.currentStackFrame&&(r=Fb(r,SE(f4,this.currentStackFrame))),n&&(r=Fb(r,n)),this._interruptedCause=this._interruptedCause?Ase(this._interruptedCause,r):r,this.interruptible&&this.evaluate(Op(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!==Qa){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[j0];globalThis[j0]=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=Sl(EE,()=>s)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[ai](this),o!==this.currentLoopCount)return Qa;if(i===Qa){const s=this._yielded;return nf in s?(this._yielded=void 0,s):Qa}}}catch(s){return Hs(i,ai)?this.runLoop(Dp(s)):Dp(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{globalThis[j0]=n}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[xl]&&n[xl](this);if(r)return r[t]=r,r;if(n[t])return n}}yieldWith(t){return this._yielded=t,Qa}children(){return this._children??=new Set}pipe(){return mu(this,arguments)}setContext(t){this.context=t;const n=this.getRef(IE);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=t.mapUnsafe.get(wse),this.currentLogLevel=this.getRef(_se),this.minimumLogLevel=this.getRef(Cse),this.currentStackFrame=t.mapUnsafe.get(Sse.key),this.maxOpsBeforeYield=this.getRef(yse),this.currentPreventYield=this.getRef(bse),this.runtimeMetrics=t.mapUnsafe.get(xse);const r=t.mapUnsafe.get(kse);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag==="Span"?this.currentSpan:void 0}}const Pse=e=>{if(!e.currentStackFrame)return;const t=new Map;return t.set(f4.key,e.currentStackFrame),Xm(t)},Rse=e=>h4(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(zf(r))}return o(),Rd(()=>i?.())}),p8=e=>cl(t=>{const n=Pse(t);for(const r of e)r.interruptUnsafe(t.id,n);return qse(Rse(e))}),zf=Zc,Op=Ym,Rd=Bs({op:"Sync",[ai](e){const t=this[rn](),n=e.getCont(ts);return n?n[ts](t,e):e.yieldWith(Zc(t))}}),Nse=Bs({op:"Suspend",[ai](e){return this[rn]()}}),zse=Bs({op:"Yield",[ai](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(p4)},this[rn]??0),e.yieldWith(()=>{t=!0})}}),EE=zse(0),jse=e=>Dp(e),Fse=zf(void 0),Use=e=>AE(function(t,n){gE(()=>e(n)).then(r=>t(zf(r)),r=>t(jse(r)))},e.length!==0),AE=Bs({op:"Async",single:!1,[ai](e){const t=gE(()=>this[rn][0].bind(e.currentScheduler));let n=!1,r=!1;const i=this[rn][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(Hse(()=>(n=!0,i?.abort(),o??p4))),Qa)}}),Hse=Bs({op:"AsyncFinalizer",[xl](e){e.interruptible&&(e.interruptible=!1,e._stack.push(m4))},[ll](e,t){return Ese(e)?Sl(this[rn](),()=>Op(e)):Op(e)}}),h4=e=>AE(e,e.length>=2),Bse=(...e)=>Nse(()=>Vse(e.length===1?e[0]():e[1].call(e[0].self))),Vse=Bs({op:"Iterator",single:!1,[ts](e,t){const n=this[rn][0];for(;;){const r=n.next(e);if(r.done)return zf(r.value);const i=r.value.asEffect();if(Zse(i)){if(i._tag==="Failure")return i}else return t._stack.push(this),i;e=i.value}},[ai](e){return this[ts](this[rn][1],e)}}),qse=e=>Sl(e,t=>p4),Wse=(e,t)=>cl(n=>h4(r=>{let i=!1;const o=new Set,s=l=>{i=!0,r(o.size===0?l:Sl(eae(p8(o)),()=>l))};let a=0;for(const l of e){if(i)break;const c=a++,u=nae(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 p8(o)})),Gse=ir(e=>xoe(e[1]),(e,t,n)=>Wse([e,t],n)),Sl=ir(2,(e,t)=>{const n=Object.create(Kse);return n[rn]=e,n[ts]=t.length!==1?r=>t(r):t,n}),Kse=d4({op:"OnSuccess",[ai](e){return e._stack.push(this),this[rn]}}),Zse=e=>nf in e,p4=Zc(void 0),Yse=ir(2,(e,t)=>Gse(e,Sl(fae(t.duration),t.orElse))),Xse=Bs({op:"OnExit",single:!1,[ai](e){return e._stack.push(this),this[rn][0]},[xl](e){e.interruptible&&this[rn][2]!==!0&&(e._stack.push(m4),e.interruptible=!1)},[ts](e,t,n){n??=Zc(e);const r=this[rn][1](n);return r?Sl(r,i=>n):n},[ll](e,t,n){n??=Ym(e);const r=this[rn][1](n);return r?Sl(r,i=>n):n}}),Jse=ir(2,Xse),Qse=ir(2,(e,t)=>Jse(e,n=>t)),eae=e=>cl(t=>(t.interruptible&&(t.interruptible=!1,t._stack.push(m4)),e)),tae=Bs({op:"SetInterruptible",[xl](e){if(e.interruptible=this[rn],e._interruptedCause&&e.interruptible)return()=>Op(e._interruptedCause)}}),m4=tae(!0),nae=(e,t,n=!1,r=!1,i=!1)=>{const o=i==="inherit"?e.interruptible:!i,s=new TE(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},rae=e=>(t,n)=>{const r=new TE(n?.scheduler?Hoe(e,IE,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},iae=e=>{const t=rae(e);return(n,r)=>{const i=t(n,r);return new Promise(o=>{i.addObserver(s=>o(s))})}},oae=e=>{const t=iae(e);return(n,r)=>t(n,r).then(i=>{if(i._tag==="Failure")throw Dse(i.cause);return i.value})},sae=oae(Foe()),aae=jl("effect/Clock",{defaultValue:()=>new cae}),lae=2**31-1;class cae{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=Rd(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return uae()}currentTimeNanos=Rd(()=>this.currentTimeNanosUnsafe());sleep(t){const n=use(t);return n<=0?EE:h4(r=>{if(n>lae)return;const i=setTimeout(()=>r(Fse),n);return Rd(()=>clearTimeout(i))})}}const m8=(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))})(),uae=(function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return m8;const t=m8()-e.bigint();return()=>t+e.bigint()})(),dae=e=>cl(t=>e(t.getRef(aae))),fae=e=>dae(t=>t.sleep(Yoe(e))),hae=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;hae&&process.stdout.isTTY;const pae=Use,mae=zf,gae=Rd,vae=Bse,yae=Yse,bae=Qse,wae=sae,LE=e=>e!=null&&(e=Object.getPrototypeOf(e),e===Array.prototype||e===Object.prototype);function DE(e,t,n){for(const[r,i]of Object.entries(t)){const o=`${n}.${r}`;e[o]=i,LE(i)&&DE(e,i,o)}}function ME(e){const t={...e};for(const[n,r]of Object.entries(e))LE(r)&&DE(t,r,n);return t}const kae=(e,t)=>{if(t)for(const[n,r]of Object.entries(t))e=e.replace(new RegExp(`{{\\s*${n}\\s*}}`,"g"),r);return e},xae=(e=>e);function Sae(e,t=xae){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 OE=["en","zh","zht","ko","de","es","fr","da","ja","pl","ru","ar","no","br","th","bs","tr"],_ae={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"},Cae=[{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 PE(e){if(!e)return;const t=e.toLowerCase().replaceAll("_","-"),n=OE.find(r=>r===t);return n||Cae.find(r=>r.match(t))?.locale}function Iae(e,t="en"){return PE(e)??t}function $ae(e,t="en"){for(const n of e){const r=PE(n);if(r)return r}return t}function Tae(e,t="en"){if(!e)return t;const n=e.languages?.length?e.languages:[e.language];return $ae(n,t)}const{use:Xi,provider:Eae}=yn({name:"Platform",init:e=>e.value});function Aae(e,t={}){const n=t.storage||globalThis.localStorage,r=t.name||`storage-${fn()}`;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]($t(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(ct(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(ct(()=>e[0]));t.sync?.[1](r,d),n.setItem(r,d,i),c=!1},a]}const Lae="default.dat",g8="codeplane.global.dat",Dae="codeplane.",RE=new Map,Mae=500,NE=8*1024*1024,Xo=new Map,Pp={bytes:0};function vu(e){const t=Xo.get(e);t&&(Pp.bytes-=t.bytes,Xo.delete(e))}function Oae(){for(;;){if(Xo.size<=Mae&&Pp.bytes<=NE)return;const e=Xo.keys().next().value;if(!e)return;vu(e)}}function of(e,t){const n=t.length*2;if(n>NE){vu(e);return}const r=Xo.get(e);r&&(Pp.bytes-=r.bytes),Xo.delete(e),Xo.set(e,{value:t,bytes:n}),Pp.bytes+=n,Oae()}function zE(e){const t=Xo.get(e);if(t)return Xo.delete(e),Xo.set(e,t),t.value}function Pc(e){return RE.get(e)===!0}function da(e){RE.set(e,!0)}function Bb(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 Pae(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(Dae)||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),vu(s.key);try{return e.setItem(t,n),of(t,n),!0}catch(a){if(!Bb(a))throw a}}return!1}function jE(e,t,n){try{return e.setItem(t,n),of(t,n),!0}catch(i){if(!Bb(i))throw i}try{return e.removeItem(t),vu(t),e.setItem(t,n),of(t,n),!0}catch(i){if(!Bb(i))throw i}return Pae(e,t,n)}function Rae(e){return JSON.parse(JSON.stringify(e))}function v8(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function FE(e,t){if(t===void 0)return e;if(t===null)return t;if(Array.isArray(e))return Array.isArray(t)?t:e;if(v8(e)){if(!v8(t))return e;const n={...e};for(const r of Object.keys(t))r in e?n[r]=FE(e[r],t[r]):n[r]=t[r];return n}return t}function Nae(e){try{return JSON.parse(e)}catch{return}}function n0(e,t,n){const r=Nae(t);if(r===void 0)return;const i=n?n(r):r,o=FE(e,i);return JSON.stringify(o)}function UE(e){return typeof e=="string"?e:e.key}function Nv(e){return typeof e=="string"?!1:e.legacy===!0}function Rp(e,t){const n=(e.slice(0,18)||t).replace(/[^a-zA-Z0-9._-]/g,"-"),r=yi(e)??"0";return`${n}.${r}`}function zae(e){return`codeplane.server.${Rp(UE(e),"server")}.dat`}function r0(e){return`codeplane.workspace.${Rp(e,"workspace")}.dat`}function y8(e,t){return`codeplane.server.workspace.${Rp(UE(e),"server")}.${Rp(t,"workspace")}.dat`}function zv(e,t){return t?e:[]}function jv(e,t){return e?t:[]}function HE(e){const t=`${e}:`,n=`prefix:${e}`,r=i=>t+i;return{getItem:i=>{const o=r(i),s=zE(o);if(Pc(n))return s??null;const a=(()=>{try{return localStorage.getItem(o)}catch{return da(n),null}})();return a===null?s??null:(of(o,a),a)},setItem:(i,o)=>{const s=r(i);if(!Pc(n)){try{if(jE(localStorage,s,o))return}catch{da(n);return}da(n)}},removeItem:i=>{const o=r(i);if(vu(o),!Pc(n))try{localStorage.removeItem(o)}catch{da(n)}}}}function Vb(){const e="direct";return{getItem:t=>{const n=zE(t);if(Pc(e))return n??null;const r=(()=>{try{return localStorage.getItem(t)}catch{return da(e),null}})();return r===null?n??null:(of(t,r),r)},setItem:(t,n)=>{if(!Pc(e)){try{if(jE(localStorage,t,n))return}catch{da(e);return}da(e)}},removeItem:t=>{if(vu(t),!Pc(e))try{localStorage.removeItem(t)}catch{da(e)}}}}const On={global(e,t){return{storage:g8,key:e,legacy:t}},server(e,t,n){const r=Nv(e);return{storage:zae(e),key:t,legacy:zv(n,r),legacyTargets:jv(r,[{storage:g8,key:t}])}},workspace(e,t,n){return{storage:r0(e),key:`workspace:${t}`,legacy:n}},serverWorkspace(e,t,n,r){const i=Nv(e);return{storage:y8(e,t),key:`workspace:${n}`,legacy:zv(r,i),legacyTargets:jv(i,[{storage:r0(t),key:`workspace:${n}`}])}},session(e,t,n,r){return{storage:r0(e),key:`session:${t}:${n}`,legacy:r}},serverSession(e,t,n,r,i){const o=Nv(e);return{storage:y8(e,t),key:`session:${n}:${r}`,legacy:zv(i,o),legacyTargets:jv(o,[{storage:r0(t),key:`session:${n}:${r}`}])}},scoped(e,t,n,r){return t?On.session(e,t,n,r):On.workspace(e,n,r)},serverScoped(e,t,n,r,i){return n?On.serverSession(e,t,n,r,i):On.serverWorkspace(e,t,r,i)}};function Np(e,t){if(!!t?.storage)return t.storage?.(e.storage)?.removeItem(e.key);if(!e.storage){Vb().removeItem(e.key);return}HE(e.storage).removeItem(e.key)}function pr(e,t){const n=Xi(),r=typeof e=="string"?{key:e}:e,i=Rae(t[0]),o=r.legacy??[],s=!!n.storage,a=v=>s?n.storage?.(v):v?HE(v):Vb(),l=a(r.storage),c=s?r.storage?n.storage?.(Lae):n.storage?.():Vb(),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=n0(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 I=S.storage.getItem(S.key);if(I===null)continue;const M=n0(i,I,r.migrate);if(M===void 0){S.storage.removeItem(S.key);continue}return w.setItem(x,M),S.storage.removeItem(S.key),M}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=n0(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=n0(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,p]=Aae(t,{name:r.key,storage:d}),m=p instanceof Promise;if(!m)return[h,f,p,Object.assign(()=>!0,{promise:void 0})];const[g]=ns(()=>p,async v=>(v instanceof Promise&&await v,!0),{initialValue:!m});return[h,f,p,Object.assign(()=>g.loading?!1:g.latest===!0,{promise:p})]}const BE={"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:
|
|
2381
2381
|
{{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}}:
|
|
2382
|
-
{{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."};function jae(e){return`oc_locale=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax`}const Fae=OE,Uae=_ae,Hae={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"},sf=ME({...BE,...T_}),qb=new Map([["en",sf]]),Tr=(e,t)=>Promise.all([e,t]).then(([n,r])=>({...sf,...ME({...n.dict,...r.dict})})),Bae={zh:()=>Tr(j(()=>import("./zh-DyyyQKUG.js"),[]),j(()=>import("./zh-bOg8F16p.js"),[])),zht:()=>Tr(j(()=>import("./zht-CUj73aR3.js"),[]),j(()=>import("./zht-BNARb445.js"),[])),ko:()=>Tr(j(()=>import("./ko-BLfVgRVC.js"),[]),j(()=>import("./ko-DmYX4FPm.js"),[])),de:()=>Tr(j(()=>import("./de-BNlSevTf.js"),[]),j(()=>import("./de-DY3mU7Ij.js"),[])),es:()=>Tr(j(()=>import("./es-DYZno4IE.js"),[]),j(()=>import("./es-COqIzy42.js"),[])),fr:()=>Tr(j(()=>import("./fr-x6kwqk76.js"),[]),j(()=>import("./fr-DO0PId1D.js"),[])),da:()=>Tr(j(()=>import("./da-NvyeAxA-.js"),[]),j(()=>import("./da-Dv2JcMt1.js"),[])),ja:()=>Tr(j(()=>import("./ja-JMpy37Uc.js"),[]),j(()=>import("./ja-CMTL5Sk5.js"),[])),pl:()=>Tr(j(()=>import("./pl-CLJMEI_F.js"),[]),j(()=>import("./pl-Br4VMmme.js"),[])),ru:()=>Tr(j(()=>import("./ru-CQKaC407.js"),[]),j(()=>import("./ru-BHemVjOf.js"),[])),ar:()=>Tr(j(()=>import("./ar-CxO8Ew7O.js"),[]),j(()=>import("./ar-CqzjnUvN.js"),[])),no:()=>Tr(j(()=>import("./no-DEYV6Uly.js"),[]),j(()=>import("./no-Bc9vtFhi.js"),[])),br:()=>Tr(j(()=>import("./br-DsEvYtyk.js"),[]),j(()=>import("./br-DRNVRO5v.js"),[])),th:()=>Tr(j(()=>import("./th-DiGw3usd.js"),[]),j(()=>import("./th-Bja74DRT.js"),[])),bs:()=>Tr(j(()=>import("./bs-36LABFkb.js"),[]),j(()=>import("./bs-CNNWsHRf.js"),[])),tr:()=>Tr(j(()=>import("./tr-CwGU-MHg.js"),[]),j(()=>import("./tr-i4KWkJ3i.js"),[]))};function VE(e){const t=qb.get(e);if(t)return Promise.resolve(t);if(e==="en")return Promise.resolve(sf);const n=Bae[e];return n().then(r=>(qb.set(e,r),r))}function qE(){return Tae(typeof navigator=="object"?navigator:void 0)}function Wb(e){return Iae(e)}function WE(){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:Wb(n.locale)}catch{return}}const b8=WE()??qE();b8!=="en"&&VE(b8);const{use:Rt,provider:Vae}=yn({name:"Language",init:e=>{const t=e.locale??WE()??qE(),[n,r,i,o]=pr(On.global("language",["language.v1"]),et({locale:t})),s=U(()=>Wb(n.locale)),a=U(()=>Uae[s()]),[l]=ns(s,VE,{initialValue:qb.get(t)??sf}),c=Sae(()=>l()??sf,kae),u=d=>c(Hae[d]);return oe(()=>{typeof document=="object"&&(document.documentElement.lang=s(),document.cookie=jae(s()))}),{ready:o,locale:s,intl:a,locales:Fae,label:u,t:c,setLocale(d){r("locale",Wb(d))}}}}),Gxe="System Mono",Kxe="System Sans",Zxe="JetBrainsMono Nerd Font Mono",g4='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',qae='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+g4,Wae='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, '+g4,Gae='"JetBrainsMono Nerd Font Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+g4,Kae=qae,Zae=Wae,Yae=Gae;function v4(e){return e??""}function Xae(e){return/^[\w-]+$/.test(e)?e:`"${e.replaceAll("\\","\\\\").replaceAll('"','\\"')}"`}function y4(e,t){const n=e?.trim()??"";return n?`${Xae(n)}, ${t}`:t}function Yxe(e){return v4(e)}function Xxe(e){return v4(e)}function Jae(e){return y4(e,Kae)}function Qae(e){return y4(e,Zae)}function Jxe(e){return v4(e)}function Qxe(e){return y4(e,Yae)}const Ut={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 Zt(e,t){return U(()=>e()??t)}function w8(e,t){return e==="short"||e==="full"||e==="off"?e:t===!0?"full":t===!1?"off":Ut.general.reasoningDisplay}const{use:yu,provider:ele}=yn({name:"Settings",init:()=>{const[e,t,n,r]=pr("settings.v3",et(Ut));return oe(()=>{if(typeof document>"u")return;const i=document.documentElement;i.style.setProperty("--font-family-mono",Jae(e.appearance?.mono)),i.style.setProperty("--font-family-sans",Qae(e.appearance?.sans))}),{ready:r,get current(){return e},general:{autoSave:Zt(()=>e.general?.autoSave,Ut.general.autoSave),setAutoSave(i){t("general","autoSave",i)},releaseNotes:Zt(()=>e.general?.releaseNotes,Ut.general.releaseNotes),setReleaseNotes(i){t("general","releaseNotes",i)},followup:Zt(()=>e.general?.followup==="queue"||e.general?.followup==="steer"?e.general.followup:void 0,Ut.general.followup),setFollowup(i){t("general","followup",i)},showFileTree:Zt(()=>e.general?.showFileTree,Ut.general.showFileTree),setShowFileTree(i){t("general","showFileTree",i)},showNavigation:Zt(()=>e.general?.showNavigation,Ut.general.showNavigation),setShowNavigation(i){t("general","showNavigation",i)},showSearch:Zt(()=>e.general?.showSearch,Ut.general.showSearch),setShowSearch(i){t("general","showSearch",i)},showStatus:Zt(()=>e.general?.showStatus,Ut.general.showStatus),setShowStatus(i){t("general","showStatus",i)},showTerminal:Zt(()=>e.general?.showTerminal,Ut.general.showTerminal),setShowTerminal(i){t("general","showTerminal",i)},showReasoningSummaries:Zt(()=>w8(e.general?.reasoningDisplay,e.general?.showReasoningSummaries)!=="off",Ut.general.showReasoningSummaries),setShowReasoningSummaries(i){t("general","showReasoningSummaries",i),t("general","reasoningDisplay",i?"full":"off")},reasoningDisplay:Zt(()=>w8(e.general?.reasoningDisplay,e.general?.showReasoningSummaries),Ut.general.reasoningDisplay),setReasoningDisplay(i){t("general","reasoningDisplay",i),t("general","showReasoningSummaries",i!=="off")},shellToolPartsExpanded:Zt(()=>e.general?.shellToolPartsExpanded,Ut.general.shellToolPartsExpanded),setShellToolPartsExpanded(i){t("general","shellToolPartsExpanded",i)},editToolPartsExpanded:Zt(()=>e.general?.editToolPartsExpanded,Ut.general.editToolPartsExpanded),setEditToolPartsExpanded(i){t("general","editToolPartsExpanded",i)},showSessionProgressBar:Zt(()=>e.general?.showSessionProgressBar,Ut.general.showSessionProgressBar),setShowSessionProgressBar(i){t("general","showSessionProgressBar",i)},browserUse:Zt(()=>e.general?.browserUse,Ut.general.browserUse),setBrowserUse(i){t("general","browserUse",i)},computerUse:Zt(()=>e.general?.computerUse,Ut.general.computerUse),setComputerUse(i){t("general","computerUse",i)},debugLogging:Zt(()=>e.general?.debugLogging,Ut.general.debugLogging),setDebugLogging(i){t("general","debugLogging",i)}},appearance:{fontSize:Zt(()=>e.appearance?.fontSize,Ut.appearance.fontSize),setFontSize(i){t("appearance","fontSize",i)},font:Zt(()=>e.appearance?.mono,Ut.appearance.mono),setFont(i){t("appearance","mono",i.trim()?i:"")},uiFont:Zt(()=>e.appearance?.sans,Ut.appearance.sans),setUIFont(i){t("appearance","sans",i.trim()?i:"")},terminalFont:Zt(()=>e.appearance?.terminal,Ut.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",$t({}))}},permissions:{autoApprove:Zt(()=>e.permissions?.autoApprove,Ut.permissions.autoApprove),setAutoApprove(i){t("permissions","autoApprove",i)}},notifications:{agent:Zt(()=>e.notifications?.agent,Ut.notifications.agent),setAgent(i){t("notifications","agent",i)},permissions:Zt(()=>e.notifications?.permissions,Ut.notifications.permissions),setPermissions(i){t("notifications","permissions",i)},errors:Zt(()=>e.notifications?.errors,Ut.notifications.errors),setErrors(i){t("notifications","errors",i)}},sounds:{agentEnabled:Zt(()=>e.sounds?.agentEnabled,Ut.sounds.agentEnabled),setAgentEnabled(i){t("sounds","agentEnabled",i)},agent:Zt(()=>e.sounds?.agent,Ut.sounds.agent),setAgent(i){t("sounds","agent",i)},permissionsEnabled:Zt(()=>e.sounds?.permissionsEnabled,Ut.sounds.permissionsEnabled),setPermissionsEnabled(i){t("sounds","permissionsEnabled",i)},permissions:Zt(()=>e.sounds?.permissions,Ut.sounds.permissions),setPermissions(i){t("sounds","permissions",i)},errorsEnabled:Zt(()=>e.sounds?.errorsEnabled,Ut.sounds.errorsEnabled),setErrorsEnabled(i){t("sounds","errorsEnabled",i)},errors:Zt(()=>e.sounds?.errors,Ut.sounds.errors),setErrors(i){t("sounds","errors",i)}}}}}),tle=({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??(m=>new Promise(g=>setTimeout(g,m)));return{stream:async function*(){let m=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 I="";const M=()=>{try{S.cancel()}catch{}};v.addEventListener("abort",M);try{for(;;){const{done:D,value:O}=await S.read();if(D)break;I+=O,I=I.replace(/\r\n/g,`
|
|
2382
|
+
{{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."};function jae(e){return`oc_locale=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax`}const Fae=OE,Uae=_ae,Hae={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"},sf=ME({...BE,...T_}),qb=new Map([["en",sf]]),Tr=(e,t)=>Promise.all([e,t]).then(([n,r])=>({...sf,...ME({...n.dict,...r.dict})})),Bae={zh:()=>Tr(j(()=>import("./zh-DcHmyx-m.js"),[]),j(()=>import("./zh-CMkkmie_.js"),[])),zht:()=>Tr(j(()=>import("./zht-BC3GL0UB.js"),[]),j(()=>import("./zht-B2aVuJML.js"),[])),ko:()=>Tr(j(()=>import("./ko-GpoSr9YU.js"),[]),j(()=>import("./ko-DeUlkpYJ.js"),[])),de:()=>Tr(j(()=>import("./de-CRYeTAqP.js"),[]),j(()=>import("./de-BcaXLEoj.js"),[])),es:()=>Tr(j(()=>import("./es-B9MgIIlj.js"),[]),j(()=>import("./es-qMJD8V0Q.js"),[])),fr:()=>Tr(j(()=>import("./fr-ai2o852z.js"),[]),j(()=>import("./fr-Dj4Yz5vL.js"),[])),da:()=>Tr(j(()=>import("./da-YTnuRZG0.js"),[]),j(()=>import("./da-DOYtD_G8.js"),[])),ja:()=>Tr(j(()=>import("./ja-C-OtBco_.js"),[]),j(()=>import("./ja-B9yIMfiQ.js"),[])),pl:()=>Tr(j(()=>import("./pl-BdAUsQg4.js"),[]),j(()=>import("./pl-D9PWP3j8.js"),[])),ru:()=>Tr(j(()=>import("./ru-BvNMwfrc.js"),[]),j(()=>import("./ru-PgTv2NAk.js"),[])),ar:()=>Tr(j(()=>import("./ar-CnXvFVLB.js"),[]),j(()=>import("./ar-Bxa58vxZ.js"),[])),no:()=>Tr(j(()=>import("./no-C6IGXxj9.js"),[]),j(()=>import("./no-sRjzWGyH.js"),[])),br:()=>Tr(j(()=>import("./br-UxZZr_6Z.js"),[]),j(()=>import("./br-Cg_ubWNg.js"),[])),th:()=>Tr(j(()=>import("./th-BPTTGm6p.js"),[]),j(()=>import("./th-D_11akW2.js"),[])),bs:()=>Tr(j(()=>import("./bs-CR3gfdfe.js"),[]),j(()=>import("./bs-CK1F4XVi.js"),[])),tr:()=>Tr(j(()=>import("./tr-BHxesFzI.js"),[]),j(()=>import("./tr-BlRsyU03.js"),[]))};function VE(e){const t=qb.get(e);if(t)return Promise.resolve(t);if(e==="en")return Promise.resolve(sf);const n=Bae[e];return n().then(r=>(qb.set(e,r),r))}function qE(){return Tae(typeof navigator=="object"?navigator:void 0)}function Wb(e){return Iae(e)}function WE(){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:Wb(n.locale)}catch{return}}const b8=WE()??qE();b8!=="en"&&VE(b8);const{use:Rt,provider:Vae}=yn({name:"Language",init:e=>{const t=e.locale??WE()??qE(),[n,r,i,o]=pr(On.global("language",["language.v1"]),et({locale:t})),s=U(()=>Wb(n.locale)),a=U(()=>Uae[s()]),[l]=ns(s,VE,{initialValue:qb.get(t)??sf}),c=Sae(()=>l()??sf,kae),u=d=>c(Hae[d]);return oe(()=>{typeof document=="object"&&(document.documentElement.lang=s(),document.cookie=jae(s()))}),{ready:o,locale:s,intl:a,locales:Fae,label:u,t:c,setLocale(d){r("locale",Wb(d))}}}}),Gxe="System Mono",Kxe="System Sans",Zxe="JetBrainsMono Nerd Font Mono",g4='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',qae='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+g4,Wae='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, '+g4,Gae='"JetBrainsMono Nerd Font Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+g4,Kae=qae,Zae=Wae,Yae=Gae;function v4(e){return e??""}function Xae(e){return/^[\w-]+$/.test(e)?e:`"${e.replaceAll("\\","\\\\").replaceAll('"','\\"')}"`}function y4(e,t){const n=e?.trim()??"";return n?`${Xae(n)}, ${t}`:t}function Yxe(e){return v4(e)}function Xxe(e){return v4(e)}function Jae(e){return y4(e,Kae)}function Qae(e){return y4(e,Zae)}function Jxe(e){return v4(e)}function Qxe(e){return y4(e,Yae)}const Ut={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 Zt(e,t){return U(()=>e()??t)}function w8(e,t){return e==="short"||e==="full"||e==="off"?e:t===!0?"full":t===!1?"off":Ut.general.reasoningDisplay}const{use:yu,provider:ele}=yn({name:"Settings",init:()=>{const[e,t,n,r]=pr("settings.v3",et(Ut));return oe(()=>{if(typeof document>"u")return;const i=document.documentElement;i.style.setProperty("--font-family-mono",Jae(e.appearance?.mono)),i.style.setProperty("--font-family-sans",Qae(e.appearance?.sans))}),{ready:r,get current(){return e},general:{autoSave:Zt(()=>e.general?.autoSave,Ut.general.autoSave),setAutoSave(i){t("general","autoSave",i)},releaseNotes:Zt(()=>e.general?.releaseNotes,Ut.general.releaseNotes),setReleaseNotes(i){t("general","releaseNotes",i)},followup:Zt(()=>e.general?.followup==="queue"||e.general?.followup==="steer"?e.general.followup:void 0,Ut.general.followup),setFollowup(i){t("general","followup",i)},showFileTree:Zt(()=>e.general?.showFileTree,Ut.general.showFileTree),setShowFileTree(i){t("general","showFileTree",i)},showNavigation:Zt(()=>e.general?.showNavigation,Ut.general.showNavigation),setShowNavigation(i){t("general","showNavigation",i)},showSearch:Zt(()=>e.general?.showSearch,Ut.general.showSearch),setShowSearch(i){t("general","showSearch",i)},showStatus:Zt(()=>e.general?.showStatus,Ut.general.showStatus),setShowStatus(i){t("general","showStatus",i)},showTerminal:Zt(()=>e.general?.showTerminal,Ut.general.showTerminal),setShowTerminal(i){t("general","showTerminal",i)},showReasoningSummaries:Zt(()=>w8(e.general?.reasoningDisplay,e.general?.showReasoningSummaries)!=="off",Ut.general.showReasoningSummaries),setShowReasoningSummaries(i){t("general","showReasoningSummaries",i),t("general","reasoningDisplay",i?"full":"off")},reasoningDisplay:Zt(()=>w8(e.general?.reasoningDisplay,e.general?.showReasoningSummaries),Ut.general.reasoningDisplay),setReasoningDisplay(i){t("general","reasoningDisplay",i),t("general","showReasoningSummaries",i!=="off")},shellToolPartsExpanded:Zt(()=>e.general?.shellToolPartsExpanded,Ut.general.shellToolPartsExpanded),setShellToolPartsExpanded(i){t("general","shellToolPartsExpanded",i)},editToolPartsExpanded:Zt(()=>e.general?.editToolPartsExpanded,Ut.general.editToolPartsExpanded),setEditToolPartsExpanded(i){t("general","editToolPartsExpanded",i)},showSessionProgressBar:Zt(()=>e.general?.showSessionProgressBar,Ut.general.showSessionProgressBar),setShowSessionProgressBar(i){t("general","showSessionProgressBar",i)},browserUse:Zt(()=>e.general?.browserUse,Ut.general.browserUse),setBrowserUse(i){t("general","browserUse",i)},computerUse:Zt(()=>e.general?.computerUse,Ut.general.computerUse),setComputerUse(i){t("general","computerUse",i)},debugLogging:Zt(()=>e.general?.debugLogging,Ut.general.debugLogging),setDebugLogging(i){t("general","debugLogging",i)}},appearance:{fontSize:Zt(()=>e.appearance?.fontSize,Ut.appearance.fontSize),setFontSize(i){t("appearance","fontSize",i)},font:Zt(()=>e.appearance?.mono,Ut.appearance.mono),setFont(i){t("appearance","mono",i.trim()?i:"")},uiFont:Zt(()=>e.appearance?.sans,Ut.appearance.sans),setUIFont(i){t("appearance","sans",i.trim()?i:"")},terminalFont:Zt(()=>e.appearance?.terminal,Ut.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",$t({}))}},permissions:{autoApprove:Zt(()=>e.permissions?.autoApprove,Ut.permissions.autoApprove),setAutoApprove(i){t("permissions","autoApprove",i)}},notifications:{agent:Zt(()=>e.notifications?.agent,Ut.notifications.agent),setAgent(i){t("notifications","agent",i)},permissions:Zt(()=>e.notifications?.permissions,Ut.notifications.permissions),setPermissions(i){t("notifications","permissions",i)},errors:Zt(()=>e.notifications?.errors,Ut.notifications.errors),setErrors(i){t("notifications","errors",i)}},sounds:{agentEnabled:Zt(()=>e.sounds?.agentEnabled,Ut.sounds.agentEnabled),setAgentEnabled(i){t("sounds","agentEnabled",i)},agent:Zt(()=>e.sounds?.agent,Ut.sounds.agent),setAgent(i){t("sounds","agent",i)},permissionsEnabled:Zt(()=>e.sounds?.permissionsEnabled,Ut.sounds.permissionsEnabled),setPermissionsEnabled(i){t("sounds","permissionsEnabled",i)},permissions:Zt(()=>e.sounds?.permissions,Ut.sounds.permissions),setPermissions(i){t("sounds","permissions",i)},errorsEnabled:Zt(()=>e.sounds?.errorsEnabled,Ut.sounds.errorsEnabled),setErrorsEnabled(i){t("sounds","errorsEnabled",i)},errors:Zt(()=>e.sounds?.errors,Ut.sounds.errors),setErrors(i){t("sounds","errors",i)}}}}}),tle=({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??(m=>new Promise(g=>setTimeout(g,m)));return{stream:async function*(){let m=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 I="";const M=()=>{try{S.cancel()}catch{}};v.addEventListener("abort",M);try{for(;;){const{done:D,value:O}=await S.read();if(D)break;I+=O,I=I.replace(/\r\n/g,`
|
|
2383
2383
|
`).replace(/\r/g,`
|
|
2384
2384
|
`);const $=I.split(`
|
|
2385
2385
|
|
|
@@ -2441,10 +2441,10 @@ ${G}`;g(G);const W=c.file[G];if(!R?.force&&W?.loaded)return Promise.resolve();co
|
|
|
2441
2441
|
${t}
|
|
2442
2442
|
${n}`,zve=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!==Nve))}},YS=e=>{if(e)return{...e,model:e.model?{...e.model}:void 0}},{use:h3e,provider:jve}=yn({name:"Local",init:()=>{const e=ui(),t=wu(),n=wg(),r=eh(),i=z1e(),o=U(()=>e.id||void 0),s=U(()=>n.data.agent.filter(E=>E.mode!=="subagent"&&!E.hidden)),a=U(()=>new Set(r.connected().map(E=>E.id))),[l,c]=pr({...On.serverWorkspace(t.scope,t.directory,"model-selection",["model-selection.v1"]),migrate:zve},et({session:{}})),[u,d]=et({current:s()[0]?.name,draft:void 0,last:void 0}),h=E=>!!r.all().find(T=>T.id===E.providerID)?.models[E.modelID]&&a().has(E.providerID),f=(...E)=>{for(const A of E){const T=A();if(T&&h(T))return T}},p=E=>{const A=s();if(A.length!==0)return A.find(T=>T.name===E)??A[0]};oe(()=>{const E=s();if(E.length===0){u.current!==void 0&&d("current",void 0);return}E.some(A=>A.name===u.current)||d("current",E[0]?.name)});const m=U(()=>{const E=o();return E?l.session[E]??dc.get(b0(t.scope.key,t.directory,E)):u.draft});oe(()=>{const E=o();if(!E)return;const A=b0(t.scope.key,t.directory,E),T=dc.get(A);if(T){if(l.session[E]!==void 0){dc.delete(A);return}c("session",E,YS(T)),dc.delete(A)}});const g=()=>{if(!n.data.config.model)return;const[E,A]=n.data.config.model.split("/"),T={providerID:E,modelID:A};if(h(T))return T},v=()=>{for(const E of i.recent.list())if(h(E))return E},y=()=>{const E=r.default();for(const A of r.connected()){const T=E[A.id];if(T){const K={providerID:A.id,modelID:T};if(h(K))return K}const R=Object.values(A.models)[0];if(!R)continue;const G={providerID:A.id,modelID:R.id};if(h(G))return G}},w=U(()=>g()??v()??y()),k={list:s,current(){return p(m()?.agent??u.current)},set(E){const A=p(E);if(!A){d("current",void 0);return}Qe(()=>{d("current",A.name),d("last",{type:"agent",agent:A.name,model:A.model,variant:A.variant??null});const T=m(),R={agent:A.name,model:A.model??T?.model,variant:A.variant??T?.variant},G=o();if(G){c("session",G,R);return}d("draft",R)})},move(E){const A=s();if(A.length===0){d("current",void 0);return}let T=A.findIndex(G=>G.name===k.current()?.name)+E;T<0&&(T=A.length-1),T>=A.length&&(T=0);const R=A[T];R&&k.set(R.name)}},x=()=>{const E=f(()=>m()?.model,()=>k.current()?.model,w);if(E)return i.find(E)},C=()=>{const E=k.current(),A=x();if(!(!E||!A))return Ove({agent:{model:E.model,variant:E.variant},model:{providerID:A.provider.id,modelID:A.id,variants:A.variants}})},S=()=>m()?.variant,I=()=>{const E=x();return{agent:k.current()?.name,model:E?{providerID:E.provider.id,modelID:E.id}:void 0,variant:S()}},M=E=>{const A={...m()??{agent:k.current()?.name},...E},T=o();if(T){c("session",T,A);return}d("draft",A)},D=U(()=>i.recent.list().map(i.find).filter(Boolean)),O={ready:i.ready,current:x,recent:D,list:i.list,cycle(E){const A=D(),T=x();if(!T)return;const R=A.findIndex(q=>q?.provider.id===T.provider.id&&q?.id===T.id);if(R===-1)return;let G=R+E;G<0&&(G=A.length-1),G>=A.length&&(G=0);const K=A[G];K&&O.set({providerID:K.provider.id,modelID:K.id})},set(E,A){Qe(()=>{d("last",{type:"model",agent:k.current()?.name,model:E??null,variant:S()}),M({model:E}),E&&(i.setVisibility(E,!0),A?.recent&&i.recent.push(E))})},visible(E){return i.visible(E)},setVisibility(E,A){i.setVisibility(E,A)},variant:{configured:C,selected:S,current(){return Pve({variants:this.list(),selected:this.selected(),configured:this.configured()})},list(){const E=x();return E?.variants?Object.keys(E.variants):[]},set(E){Qe(()=>{const A=x();d("last",{type:"variant",agent:k.current()?.name,model:A?{providerID:A.provider.id,modelID:A.id}:null,variant:E??null}),M({variant:E??null})})},cycle(){const E=this.list();E.length!==0&&this.set(Rve({variants:E,selected:this.selected(),configured:this.configured()}))}}};return{slug:U(()=>mt(t.directory)),model:O,agent:k,session:{reset(){d("draft",void 0)},promote(E,A){const T=YS(I());if(T){if(E===t.directory){c("session",A,T),d("draft",void 0);return}dc.set(b0(t.scope.key,E,A),T),d("draft",void 0)}},restore(E){const A=o();A&&E.sessionID===A&&l.session[A]===void 0&&(dc.has(b0(t.scope.key,t.directory,A))||c("session",A,{agent:E.agent,model:E.model,variant:E.model.variant??null}))}}}}});function Fve(e,t,n){return e?.type==="busy"||e?.type==="retry"?"running":t?"failed":n?"completed":"queued"}function Uve(e){return e.stillEnabled?e.phase==="completed"||e.phase==="failed":!0}function Hve(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 Bve(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 Vve=e=>{const t=wg(),n=VO(),r=U(()=>t.data.session_status[e.sessionId]),i=U(()=>t.data.message[e.sessionId]??[]),o=U(()=>Hve(i())),s=U(()=>i().filter(d=>d.role==="user").length),a=U(()=>{const d=i();return d[d.length-1]?.role==="assistant"}),l=U(()=>Bve(i(),t.data.part)),c=U(()=>{const d=i();for(let h=d.length-1;h>=0;h--){const f=d[h];if(f?.role!=="user")continue;const p=f.time?.created;return typeof p=="number"?new Date(p).toISOString():new Date().toISOString()}return new Date().toISOString()}),u=U(()=>Fve(r(),l(),a()));return oe(wt([u,o,s,c],([d,h,f,p])=>{W8({type:"codeplane:task",taskId:e.sessionId,phase:d,queueDepth:0,currentMessage:h,progress:null,startedAt:p,turns:f})})),pe(()=>{const d=u();Uve({stillEnabled:n.enabled(e.sessionId),phase:d})&&W8({type:"codeplane:task",taskId:e.sessionId,phase:d==="failed"?"failed":"completed",queueDepth:0,currentMessage:o(),progress:1,startedAt:c(),turns:s()})}),null},qve=()=>{const e=VO();return b(Wt,{get each(){return e.enabledSessionIds()},children:t=>b(Vve,{sessionId:t})})};function Wve(e){const t=Ao(),n=Eo(),r=ui(),i=wg(),o=Qi(),s=U(()=>mt(e.directory)),a=U(()=>t.pathname.startsWith(`/cron/worktree/${s()}`)?`/cron/worktree/${s()}`:`/${s()}`),l=U(()=>{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 oe(()=>{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/${mt(c)}${t.pathname.slice(u.length)}${t.search}${t.hash}`,{replace:!0});return}const d=t.pathname.slice(s().length+1);n(`/${mt(c)}${d}${t.search}${t.hash}`,{replace:!0})}),ns(()=>r.id,c=>i.session.sync(c)),b(sF,{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(jve,{get children(){return[b(qve,{}),Fe(()=>e.children)]}})}})}function yR(e){const t=ui(),n=Rt(),r=Eo();let i="";const o=U(()=>t.dir?Dr(t.dir)??"":"");return oe(()=>{const s=t.dir;if(s){if(o()){i="";return}i!==s&&(i=s,Ot({variant:"error",title:n.t("common.requestFailed"),description:n.t("directory.error.invalidUrl")}),r("/",{replace:!0}))}}),b(fe,{get when(){return o()},keyed:!0,children:s=>b(o0e,{directory:()=>s,get children(){return b(mpe,{get children(){return b(Wve,{directory:s,get children(){return e.children}})}})}})})}var Gve=ee("<div>");function Kve(e){const[t,n]=ue(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 p=Math.min(t.max,Math.max(t.min,l));t.onResize(p)},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=Gve();return Wr(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 Zve=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Yve=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Xve(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Zve.has(n)}const t=e.split("-")[0];return Yve.has(t)}function Jve(e){return Xve(e)?"rtl":"ltr"}function bR(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Jve(e)}}var D2=bR(),Sd=new Set;function XS(){D2=bR();for(const e of Sd)e(D2)}function Qve(){const[e,t]=he(D2),n=U(()=>e());return en(()=>{Sd.size===0&&window.addEventListener("languagechange",XS),Sd.add(t),pe(()=>{Sd.delete(t),Sd.size===0&&window.removeEventListener("languagechange",XS)})}),{locale:()=>n().locale,direction:()=>n().direction}}var eye=yt();function Do(){const e=Qve();return pt(eye)||e}var cy=new Map;function wR(e){const{locale:t}=Do(),n=U(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return U(()=>{const r=n();let i;return cy.has(r)&&(i=cy.get(r)),i||(i=new Intl.Collator(t(),e),cy.set(r,i)),i})}const tye=["top","right","bottom","left"],_a=Math.min,bi=Math.max,im=Math.round,w0=Math.floor,Jo=e=>({x:e,y:e}),nye={left:"right",right:"left",bottom:"top",top:"bottom"};function M2(e,t,n){return bi(e,_a(t,n))}function ql(e,t){return typeof e=="function"?e(t):e}function Ca(e){return e.split("-")[0]}function Iu(e){return e.split("-")[1]}function kR(e){return e==="x"?"y":"x"}function w5(e){return e==="y"?"height":"width"}function $s(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function k5(e){return kR($s(e))}function rye(e,t,n){n===void 0&&(n=!1);const r=Iu(e),i=k5(e),o=w5(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=om(s)),[s,om(s)]}function iye(e){const t=om(e);return[O2(e),t,O2(t)]}function O2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const JS=["left","right"],QS=["right","left"],oye=["top","bottom"],sye=["bottom","top"];function aye(e,t,n){switch(e){case"top":case"bottom":return n?t?QS:JS:t?JS:QS;case"left":case"right":return t?oye:sye;default:return[]}}function lye(e,t,n,r){const i=Iu(e);let o=aye(Ca(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(O2)))),o}function om(e){const t=Ca(e);return nye[t]+e.slice(t.length)}function cye(e){return{top:0,right:0,bottom:0,left:0,...e}}function xR(e){return typeof e!="number"?cye(e):{top:e,right:e,bottom:e,left:e}}function sm(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 e9(e,t,n){let{reference:r,floating:i}=e;const o=$s(t),s=k5(t),a=w5(s),l=Ca(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(Iu(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 uye(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}=ql(t,e),p=xR(f),g=a[h?d==="floating"?"reference":"floating":d],v=sm(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=sm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-x.top+p.top)/k.y,bottom:(x.bottom-v.bottom+p.bottom)/k.y,left:(v.left-x.left+p.left)/k.x,right:(x.right-v.right+p.right)/k.x}}const dye=50,fye=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:uye},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}=e9(c,r,l),h=r,f=0;const p={};for(let m=0;m<o.length;m++){const g=o[m];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:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=w??u,d=k??d,p[v]={...p[v],...x},C&&f<dye&&(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}=e9(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:p}},hye=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}=ql(e,t)||{};if(c==null)return{};const d=xR(u),h={x:n,y:r},f=k5(i),p=w5(f),m=await s.getDimensions(c),g=f==="y",v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",k=o.reference[p]+o.reference[f]-h[f]-o.floating[p],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[p]);const I=k/2-x/2,M=S/2-m[p]/2-1,D=_a(d[v],M),O=_a(d[y],M),$=D,E=S-m[p]-O,A=S/2-m[p]/2+I,T=M2($,A,E),R=!l.arrow&&Iu(i)!=null&&A!==T&&o.reference[p]/2-(A<$?D:O)-m[p]/2<0,G=R?A<$?A-$:A-E:0;return{[f]:h[f]+G,data:{[f]:T,centerOffset:A-T-G,...R&&{alignmentOffset:G}},reset:R}}}),pye=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:p="none",flipAlignment:m=!0,...g}=ql(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=Ca(i),y=$s(a),w=Ca(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(w||!m?[om(a)]:iye(a)),C=p!=="none";!h&&C&&x.push(...lye(a,m,p,k));const S=[a,...x],I=await l.detectOverflow(t,g),M=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&M.push(I[v]),d){const A=rye(i,s,k);M.push(I[A[0]],I[A[1]])}if(D=[...D,{placement:i,overflows:M}],!M.every(A=>A<=0)){var O,$;const A=(((O=o.flip)==null?void 0:O.index)||0)+1,T=S[A];if(T&&(!(d==="alignment"?y!==$s(T):!1)||D.every(K=>$s(K.placement)===y?K.overflows[0]>0:!0)))return{data:{index:A,overflows:D},reset:{placement:T}};let R=($=D.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:$.placement;if(!R)switch(f){case"bestFit":{var E;const G=(E=D.filter(K=>{if(C){const q=$s(K.placement);return q===y||q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(q=>q>0).reduce((q,W)=>q+W,0)]).sort((K,q)=>K[1]-q[1])[0])==null?void 0:E[0];G&&(R=G);break}case"initialPlacement":R=a;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function t9(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function n9(e){return tye.some(t=>e[t]>=0)}const mye=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ql(e,t);switch(i){case"referenceHidden":{const s=await r.detectOverflow(t,{...o,elementContext:"reference"}),a=t9(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:n9(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...o,altBoundary:!0}),a=t9(s,n.floating);return{data:{escapedOffsets:a,escaped:n9(a)}}}default:return{}}}}},gye=new Set(["left","top"]);async function vye(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Ca(n),a=Iu(n),l=$s(n)==="y",c=gye.has(s)?-1:1,u=o&&l?-1:1,d=ql(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const yye=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 vye(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}}}}},bye=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}=ql(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),h=$s(Ca(i)),f=kR(h);let p=u[f],m=u[h];if(s){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=p+d[v],k=p-d[y];p=M2(w,p,k)}if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=m+d[v],k=m-d[y];m=M2(w,m,k)}const g=l.fn({...t,[f]:p,[h]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:s,[h]:a}}}}}},wye=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}=ql(e,t),u=await s.detectOverflow(t,c),d=Ca(i),h=Iu(i),f=$s(i)==="y",{width:p,height:m}=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=m-u.top-u.bottom,w=p-u.left-u.right,k=_a(m-u[g],y),x=_a(p-u[v],w),C=!t.middlewareData.shift;let S=k,I=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=y),C&&!h){const D=bi(u.left,0),O=bi(u.right,0),$=bi(u.top,0),E=bi(u.bottom,0);f?I=p-2*(D!==0||O!==0?D+O:bi(u.left,u.right)):S=m-2*($!==0||E!==0?$+E:bi(u.top,u.bottom))}await l({...t,availableWidth:I,availableHeight:S});const M=await s.getDimensions(a.floating);return p!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Ig(){return typeof window<"u"}function $u(e){return SR(e)?(e.nodeName||"").toLowerCase():"#document"}function Ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ls(e){var t;return(t=(SR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SR(e){return Ig()?e instanceof Node||e instanceof Ii(e).Node:!1}function Io(e){return Ig()?e instanceof Element||e instanceof Ii(e).Element:!1}function Vs(e){return Ig()?e instanceof HTMLElement||e instanceof Ii(e).HTMLElement:!1}function r9(e){return!Ig()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ii(e).ShadowRoot}function nh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$o(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function kye(e){return/^(table|td|th)$/.test($u(e))}function $g(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const xye=/transform|translate|scale|rotate|perspective|filter/,Sye=/paint|layout|strict|content/,Ga=e=>!!e&&e!=="none";let uy;function x5(e){const t=Io(e)?$o(e):e;return Ga(t.transform)||Ga(t.translate)||Ga(t.scale)||Ga(t.rotate)||Ga(t.perspective)||!S5()&&(Ga(t.backdropFilter)||Ga(t.filter))||xye.test(t.willChange||"")||Sye.test(t.contain||"")}function _ye(e){let t=Ia(e);for(;Vs(t)&&!ru(t);){if(x5(t))return t;if($g(t))return null;t=Ia(t)}return null}function S5(){return uy==null&&(uy=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),uy}function ru(e){return/^(html|body|#document)$/.test($u(e))}function $o(e){return Ii(e).getComputedStyle(e)}function Tg(e){return Io(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ia(e){if($u(e)==="html")return e;const t=e.assignedSlot||e.parentNode||r9(e)&&e.host||ls(e);return r9(t)?t.host:t}function _R(e){const t=Ia(e);return ru(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vs(t)&&nh(t)?t:_R(t)}function yf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=_R(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Ii(i);if(o){const a=P2(s);return t.concat(s,s.visualViewport||[],nh(i)?i:[],a&&n?yf(a):[])}else return t.concat(i,yf(i,[],n))}function P2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CR(e){const t=$o(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Vs(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=im(n)!==o||im(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function _5(e){return Io(e)?e:e.contextElement}function Fc(e){const t=_5(e);if(!Vs(t))return Jo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=CR(t);let s=(o?im(n.width):n.width)/r,a=(o?im(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Cye=Jo(0);function IR(e){const t=Ii(e);return!S5()||!t.visualViewport?Cye:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iye(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ii(e)?!1:t}function Tl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=_5(e);let s=Jo(1);t&&(r?Io(r)&&(s=Fc(r)):s=Fc(e));const a=Iye(o,n,r)?IR(o):Jo(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=Ii(o),f=r&&Io(r)?Ii(r):r;let p=h,m=P2(p);for(;m&&r&&f!==p;){const g=Fc(m),v=m.getBoundingClientRect(),y=$o(m),w=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,k=v.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=k,p=Ii(m),m=P2(p)}}return sm({width:u,height:d,x:l,y:c})}function Eg(e,t){const n=Tg(e).scrollLeft;return t?t.left+n:Tl(ls(e)).left+n}function $R(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Eg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function $ye(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=ls(r),a=t?$g(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Jo(1);const u=Jo(0),d=Vs(r);if((d||!d&&!o)&&(($u(r)!=="body"||nh(s))&&(l=Tg(r)),d)){const f=Tl(r);c=Fc(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=s&&!d&&!o?$R(s,l):Jo(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 Tye(e){return Array.from(e.getClientRects())}function Eye(e){const t=ls(e),n=Tg(e),r=e.ownerDocument.body,i=bi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=bi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Eg(e);const a=-n.scrollTop;return $o(r).direction==="rtl"&&(s+=bi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}const i9=25;function Aye(e,t){const n=Ii(e),r=ls(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=S5();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Eg(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,p=Math.abs(r.clientWidth-d.clientWidth-f);p<=i9&&(o-=p)}else c<=i9&&(o+=c);return{width:o,height:s,x:a,y:l}}function Lye(e,t){const n=Tl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Vs(e)?Fc(e):Jo(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 o9(e,t,n){let r;if(t==="viewport")r=Aye(e,n);else if(t==="document")r=Eye(ls(e));else if(Io(t))r=Lye(t,n);else{const i=IR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return sm(r)}function TR(e,t){const n=Ia(e);return n===t||!Io(n)||ru(n)?!1:$o(n).position==="fixed"||TR(n,t)}function Dye(e,t){const n=t.get(e);if(n)return n;let r=yf(e,[],!1).filter(a=>Io(a)&&$u(a)!=="body"),i=null;const o=$o(e).position==="fixed";let s=o?Ia(e):e;for(;Io(s)&&!ru(s);){const a=$o(s),l=x5(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||nh(s)&&!l&&TR(e,s))?r=r.filter(u=>u!==s):i=a,s=Ia(s)}return t.set(e,r),r}function Mye(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?$g(t)?[]:Dye(t,this._c):[].concat(n),r],a=o9(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=o9(t,s[h],i);l=bi(f.top,l),c=_a(f.right,c),u=_a(f.bottom,u),d=bi(f.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Oye(e){const{width:t,height:n}=CR(e);return{width:t,height:n}}function Pye(e,t,n){const r=Vs(t),i=ls(t),o=n==="fixed",s=Tl(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Jo(0);function c(){l.x=Eg(i)}if(r||!r&&!o)if(($u(t)!=="body"||nh(i))&&(a=Tg(t)),r){const f=Tl(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?$R(i,a):Jo(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 dy(e){return $o(e).position==="static"}function s9(e,t){if(!Vs(e)||$o(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ls(e)===n&&(n=n.ownerDocument.body),n}function ER(e,t){const n=Ii(e);if($g(e))return n;if(!Vs(e)){let i=Ia(e);for(;i&&!ru(i);){if(Io(i)&&!dy(i))return i;i=Ia(i)}return n}let r=s9(e,t);for(;r&&kye(r)&&dy(r);)r=s9(r,t);return r&&ru(r)&&dy(r)&&!x5(r)?n:r||_ye(e)||n}const Rye=async function(e){const t=this.getOffsetParent||ER,n=this.getDimensions,r=await n(e.floating);return{reference:Pye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nye(e){return $o(e).direction==="rtl"}const AR={convertOffsetParentRelativeRectToViewportRelativeRect:$ye,getDocumentElement:ls,getClippingRect:Mye,getOffsetParent:ER,getElementRects:Rye,getClientRects:Tye,getDimensions:Oye,getScale:Fc,isElement:Io,isRTL:Nye};function LR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zye(e,t){let n=null,r;const i=ls(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 p=w0(d),m=w0(i.clientWidth-(u+h)),g=w0(i.clientHeight-(d+f)),v=w0(u),w={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:bi(0,_a(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&&!LR(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 jye(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=_5(e),u=i||o?[...c?yf(c):[],...t?yf(t):[]]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=c&&a?zye(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 p,m=l?Tl(e):null;l&&g();function g(){const v=Tl(e);m&&!LR(m,v)&&n(),m=v,p=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(p)}}const Fye=yye,Uye=bye,Hye=pye,Bye=wye,Vye=mye,qye=hye,Wye=(e,t,n)=>{const r=new Map,i={platform:AR,...n},o={...i.platform,_c:r};return fye(e,t,{...i,platform:o})};var Gye=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>'),C5=yt();function I5(){const e=pt(C5);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var R2=30,a9=R2/2,Kye={top:180,right:-90,bottom:0,left:90};function Ai(e){const t=I5(),n=ze({size:R2},e),[r,i]=ue(n,["ref","style","size"]),o=()=>t.currentPlacement().split("-")[0],s=Zye(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*(R2/r.size),d=()=>`rotate(${Kye[o()]} ${a9} ${a9}) translate(0 2)`;return b(qe,ne({as:"div",ref(h){var f=ut(t.setArrowRef,r.ref);typeof f=="function"&&f(h)},"aria-hidden":"true",get style(){return _r({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=Gye(),f=h.firstChild,p=f.firstChild;return p.nextSibling,Me(()=>Je(f,"transform",d())),h}}))}function Zye(e){const[t,n]=he();return oe(()=>{const r=e();r&&n(B2(r).getComputedStyle(r))}),t}function Yye(e){const t=I5(),[n,r]=ue(e,["ref","style"]);return b(qe,ne({as:"div",ref(i){var o=ut(t.setPositionerRef,n.ref);typeof o=="function"&&o(i)},"data-popper-positioner":"",get style(){return _r({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function l9(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 Xye(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?l9(r):e?e.getBoundingClientRect():l9()}}}function Jye(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Qye={top:"bottom",right:"left",bottom:"top",left:"right"};function ebe(e,t){const[n,r]=e.split("-"),i=Qye[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 tbe(e){const t=ze({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]=he(),[i,o]=he(),[s,a]=he(t.placement),l=()=>Xye(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Do();async function u(){const h=l(),f=n(),p=i();if(!h||!f)return;const m=(p?.clientHeight||0)/2,g=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;f.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();const v=[Fye(({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(Jye))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(Hye({padding:t.overflowPadding,fallbackPlacements:C}))}(t.slide||t.overlap)&&v.push(Uye({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(Bye({padding:t.overflowPadding,apply({availableWidth:C,availableHeight:S,rects:I}){const M=Math.round(I.reference.width);C=Math.floor(C),S=Math.floor(S),f.style.setProperty("--kb-popper-anchor-width",`${M}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=`${M}px`),t.fitViewport&&(f.style.maxWidth=`${C}px`,f.style.maxHeight=`${S}px`)}})),t.hideWhenDetached&&v.push(Vye({padding:t.detachedPadding})),p&&v.push(qye({element:p,padding:t.arrowPadding}));const y=await Wye(h,f,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...AR,isRTL:()=>c()==="rtl"}});if(a(y.placement),t.onCurrentPlacementChange?.(y.placement),!f)return;f.style.setProperty("--kb-popper-content-transform-origin",ebe(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}),p&&y.middlewareData.arrow){const{x:C,y:S}=y.middlewareData.arrow,I=y.placement.split("-")[0];Object.assign(p.style,{left:C!=null?`${C}px`:"",top:S!=null?`${S}px`:"",[I]:"100%"})}}oe(()=>{const h=l(),f=n();if(!h||!f)return;const p=jye(h,f,u,{elementResize:typeof ResizeObserver=="function"});pe(p)}),oe(()=>{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(C5.Provider,{value:d,get children(){return t.children}})}var cs=Object.assign(tbe,{Arrow:Ai,Context:C5,usePopperContext:I5,Positioner:Yye}),nbe={};Cr(nbe,{Arrow:()=>Ai,Content:()=>MR,Portal:()=>OR,Root:()=>PR,Tooltip:()=>_d,Trigger:()=>RR,useTooltipContext:()=>Ag});var DR=yt();function Ag(){const e=pt(DR);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function MR(e){const t=Ag(),n=ze({id:t.generateId("content")},e),[r,i]=ue(n,["ref","style"]);return oe(()=>pe(t.registerContentId(i.id))),b(fe,{get when(){return t.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(o){var s=ut(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return _r({"--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 OR(e){const t=Ag();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}function rbe(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 Ka={},ibe=0,fc=!1,vs,od,hc;function PR(e){const t=`tooltip-${fn()}`,n=`${++ibe}`,r=ze({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[i,o]=ue(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(o.placement),m=Fs({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:A=>i.onOpenChange?.(A)}),{present:g}=xo({show:()=>i.forceMount||m.isOpen(),element:()=>d()??null}),v=()=>{Ka[n]=w},y=()=>{for(const A in Ka)A!==n&&(Ka[A](!0),delete Ka[A])},w=(A=!1)=>{A||i.closeDelay&&i.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},i.closeDelay)),window.clearTimeout(vs),vs=void 0,i.skipDelayDuration&&i.skipDelayDuration>=0&&(hc=window.setTimeout(()=>{window.clearTimeout(hc),hc=void 0},i.skipDelayDuration)),fc&&(window.clearTimeout(od),od=window.setTimeout(()=>{delete Ka[n],od=void 0,fc=!1},i.closeDelay))},k=()=>{clearTimeout(s),s=void 0,y(),v(),fc=!0,m.open(),window.clearTimeout(vs),vs=void 0,window.clearTimeout(od),od=void 0,window.clearTimeout(hc),hc=void 0},x=()=>{y(),v(),!m.isOpen()&&!vs&&!fc?vs=window.setTimeout(()=>{vs=void 0,fc=!0,k()},i.openDelay):m.isOpen()||k()},C=(A=!1)=>{!A&&i.openDelay&&i.openDelay>0&&!s&&!hc?x():k()},S=()=>{window.clearTimeout(vs),vs=void 0,fc=!1},I=()=>{window.clearTimeout(s),s=void 0},M=A=>jn(c(),A)||jn(d(),A),D=A=>{const T=c(),R=d();if(!(!T||!R))return rbe(A,T,R)},O=A=>{const T=A.target;if(M(T)){I();return}if(!i.ignoreSafeArea){const R=D(f());if(R&&G2(f_(A),R)){I();return}}s||w()};oe(()=>{if(!m.isOpen())return;const A=Gr();A.addEventListener("pointermove",O,!0),pe(()=>{A.removeEventListener("pointermove",O,!0)})}),oe(()=>{const A=c();if(!A||!m.isOpen())return;const T=G=>{const K=G.target;jn(K,A)&&w(!0)},R=B2();R.addEventListener("scroll",T,{capture:!0}),pe(()=>{R.removeEventListener("scroll",T,{capture:!0})})}),pe(()=>{clearTimeout(s),Ka[n]&&delete Ka[n]});const E={dataset:U(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>i.disabled??!1,triggerOnFocusOnly:()=>i.triggerOnFocusOnly??!1,contentId:a,contentPresent:g,openTooltip:C,hideTooltip:w,cancelOpening:S,generateId:Nr(()=>r.id),registerContentId:an(l),isTargetOnTooltip:M,setTriggerRef:u,setContentRef:h};return b(DR.Provider,{value:E,get children(){return b(cs,ne({anchorRef:c,contentRef:d,onCurrentPlacementChange:p},o))}})}function RR(e){let t;const n=Ag(),[r,i]=ue(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=>{je(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,c())},h=v=>{je(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?u():n.cancelOpening())},f=v=>{je(v,r.onPointerDown),o=!0,Gr(t).addEventListener("pointerup",l,{once:!0})},p=v=>{je(v,r.onClick),s=!1,a=!1,u(!0)},m=v=>{je(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||o)&&(a=!0,c())},g=v=>{je(v,r.onBlur);const y=v.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,u(!0))};return pe(()=>{Gr(t).removeEventListener("pointerup",l)}),b(qe,ne({as:"button",ref(v){var y=ut(w=>{n.setTriggerRef(w),t=w},r.ref);typeof y=="function"&&y(v)},get"aria-describedby"(){return Fe(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:h,onPointerDown:f,onClick:p,onFocus:m,onBlur:g},()=>n.dataset(),i))}var _d=Object.assign(PR,{Arrow:Ai,Content:MR,Portal:OR,Trigger:RR}),obe=ee("<div data-slot=tooltip-keybind><span></span><span data-slot=tooltip-keybind-key>");function c9(e){const[t,n]=ue(e,["title","keybind"]);return b(In,ne(n,{get value(){return(()=>{var r=obe(),i=r.firstChild,o=i.nextSibling;return F(i,()=>t.title),F(o,()=>t.keybind),r})()}}))}function In(e){let t;const[n,r]=et({open:!1,block:!1,expand:!1}),[i,o]=ue(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()};oe(()=>{if(!t)return;c();const f=new MutationObserver(c);f.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-expanded","data-expanded"]}),pe(()=>f.disconnect())});let h=!1;return b(Al,{get children(){return[b(Mn,{get when(){return i.inactive},get children(){return i.children}}),b(Mn,{when:!0,get children(){return b(_d,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(_d.Trigger,{ref(f){var p=t;typeof p=="function"?p(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(_d.Portal,{get children(){return b(_d.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 NR(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],i=l=>{if(l==null)return"";const c=e.getKey??"key",u=gc(c)?l[c]:c(l);return u!=null?String(u):""},o=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",u=gc(c)?l[c]:c(l);return u!=null?String(u):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(gc(c)?l[c]:c(l))??!1},a=l=>{if(l!=null)return gc(e.getSectionChildren)?l[e.getSectionChildren]:e.getSectionChildren?.(l)};for(const l of e.dataSource){if(gc(l)||kF(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=NR({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 sbe(e,t=[]){return U(()=>{const n=NR({dataSource:me(e.dataSource),getKey:me(e.getKey),getTextValue:me(e.getTextValue),getDisabled:me(e.getDisabled),getSectionChildren:me(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var Bo=class zR extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof zR?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function abe(e){const[t,n]=Dl(e);return[()=>t()??new Bo,n]}function jR(e){return IF()?e.altKey:e.ctrlKey}function _c(e){return Cf()?e.metaKey:e.ctrlKey}function u9(e){return new Bo(e)}function FR(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function lbe(e){const t=ze({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=he(!1),[i,o]=he(),s=U(()=>{const m=me(t.selectedKeys);return m!=null?u9(m):m}),a=U(()=>{const m=me(t.defaultSelectedKeys);return m!=null?u9(m):new Bo}),[l,c]=abe({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[u,d]=he(me(t.selectionBehavior)),h=()=>me(t.selectionMode),f=()=>me(t.disallowEmptySelection)??!1,p=m=>{(me(t.allowDuplicateSelectionEvents)||!FR(m,l()))&&c(m)};return oe(()=>{const m=l();me(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),oe(()=>{d(me(t.selectionBehavior)??"toggle")}),{selectionMode:h,disallowEmptySelection:f,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:o,selectedKeys:l,setSelectedKeys:p}}function UR(e){const[t,n]=he(""),[r,i]=he(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(me(e.isDisabled))return;const a=me(e.keyboardDelegate),l=me(e.selectionManager);if(!a.getKeyForSearch)return;const c=cbe(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&&ube(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 cbe(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function ube(e){return e.split("").every(t=>t===e[0])}function HR(e,t,n){const i=ne({selectOnFocus:()=>me(e.selectionManager).selectionBehavior()==="replace"},e),o=()=>n?.()??t(),{direction:s}=Do();let a={top:0,left:0};hF(()=>me(i.isVirtualized)?void 0:o(),"scroll",()=>{const g=o();g&&(a={top:g.scrollTop,left:g.scrollLeft})});const{typeSelectHandlers:l}=UR({isDisabled:()=>me(i.disallowTypeAhead),keyboardDelegate:()=>me(i.keyboardDelegate),selectionManager:()=>me(i.selectionManager)}),c=()=>me(i.orientation)??"vertical",u=g=>{je(g,l.onKeyDown),g.altKey&&g.key==="Tab"&&g.preventDefault();const v=t();if(!v?.contains(g.target))return;const y=me(i.selectionManager),w=me(i.selectOnFocus),k=I=>{I!=null&&(y.setFocusedKey(I),g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(I):w&&!jR(g)&&y.replaceSelection(I))},x=me(i.keyboardDelegate),C=me(i.shouldFocusWrap),S=y.focusedKey();switch(g.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){g.preventDefault();let I;S!=null?I=x.getKeyBelow(S):I=x.getFirstKey?.(),I==null&&C&&(I=x.getFirstKey?.(S)),k(I)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){g.preventDefault();let I;S!=null?I=x.getKeyAbove(S):I=x.getLastKey?.(),I==null&&C&&(I=x.getLastKey?.(S)),k(I)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){g.preventDefault();const I=s()==="rtl";let M;S!=null?M=x.getKeyLeftOf(S):M=I?x.getFirstKey?.():x.getLastKey?.(),k(M)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){g.preventDefault();const I=s()==="rtl";let M;S!=null?M=x.getKeyRightOf(S):M=I?x.getLastKey?.():x.getFirstKey?.(),k(M)}break}case"Home":if(x.getFirstKey){g.preventDefault();const I=x.getFirstKey(S,_c(g));I!=null&&(y.setFocusedKey(I),_c(g)&&g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(I):w&&y.replaceSelection(I))}break;case"End":if(x.getLastKey){g.preventDefault();const I=x.getLastKey(S,_c(g));I!=null&&(y.setFocusedKey(I),_c(g)&&g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(I):w&&y.replaceSelection(I))}break;case"PageDown":if(x.getKeyPageBelow&&S!=null){g.preventDefault();const I=x.getKeyPageBelow(S);k(I)}break;case"PageUp":if(x.getKeyPageAbove&&S!=null){g.preventDefault();const I=x.getKeyPageAbove(S);k(I)}break;case"a":_c(g)&&y.selectionMode()==="multiple"&&me(i.disallowSelectAll)!==!0&&(g.preventDefault(),y.selectAll());break;case"Escape":g.defaultPrevented||(g.preventDefault(),me(i.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!me(i.allowsTabNavigation)){if(g.shiftKey)v.focus();else{const I=d_(v,{tabbable:!0});let M,D;do D=I.lastChild(),D&&(M=D);while(D);M&&!M.contains(document.activeElement)&&mn(M)}break}}},d=g=>{const v=me(i.selectionManager),y=me(i.keyboardDelegate),w=me(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(!me(i.isVirtualized)){const k=o();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const x=k.querySelector(`[data-key="${v.focusedKey()}"]`);x&&(mn(x),Ay(k,x))}}}},h=g=>{const v=me(i.selectionManager);g.currentTarget.contains(g.relatedTarget)||v.setFocused(!1)},f=g=>{o()===g.target&&g.preventDefault()},p=()=>{const g=me(i.autoFocus);if(!g)return;const v=me(i.selectionManager),y=me(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&&!me(i.shouldUseVirtualFocus)&&mn(x)};return en(()=>{i.deferAutoFocus?setTimeout(p,0):p()}),oe(wt([o,()=>me(i.isVirtualized),()=>me(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&&Ay(v,k)}})),{tabIndex:U(()=>{if(!me(i.shouldUseVirtualFocus))return me(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:f,onFocusIn:d,onFocusOut:h}}function Lg(e,t){const n=()=>me(e.selectionManager),r=()=>me(e.key),i=()=>me(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"||_c(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>me(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&&!me(e.shouldSelectOnPressUp)&&o(y))},d=y=>{l()&&y.pointerType==="mouse"&&y.button===0&&me(e.shouldSelectOnPressUp)&&me(e.allowsDifferentPressOrigin)&&o(y)},h=y=>{l()&&(me(e.shouldSelectOnPressUp)&&!me(e.allowsDifferentPressOrigin)||c!=="mouse")&&o(y)},f=y=>{!l()||!["Enter"," "].includes(y.key)||(jR(y)?n().toggleSelection(r()):o(y))},p=y=>{a()&&y.preventDefault()},m=y=>{const w=t();i()||a()||!w||y.target===w&&n().setFocusedKey(r())},g=U(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=U(()=>me(e.virtualized)?void 0:r());return oe(wt([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([y,w,k,x,C])=>{y&&w===x&&C&&!k&&document.activeElement!==y&&(e.focus?e.focus():mn(y))})),{isSelected:s,isDisabled:a,allowsSelection:l,tabIndex:g,dataKey:v,onPointerDown:u,onPointerUp:d,onClick:h,onKeyDown:f,onMouseDown:p,onFocus:m}}var dbe=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 Bo(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 Bo(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 Bo([t],t,t):new Bo;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Bo;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 Bo)}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}},d9=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 Dg(e){const t=lbe(e),r=sbe({dataSource:()=>me(e.dataSource),getKey:()=>me(e.getKey),getTextValue:()=>me(e.getTextValue),getDisabled:()=>me(e.getDisabled),getSectionChildren:()=>me(e.getSectionChildren),factory:o=>e.filter?new d9(e.filter(o)):new d9(o)},[()=>e.filter]),i=new dbe(r,t);return Go(()=>{const o=t.focusedKey();o!=null&&!r().getItem(o)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var BR=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 VR(e,t,n){const r=wR({usage:"search",sensitivity:"base"}),i=U(()=>{const o=me(e.keyboardDelegate);return o||new BR(e.collection,t,r)});return HR({selectionManager:()=>me(e.selectionManager),keyboardDelegate:i,autoFocus:()=>me(e.autoFocus),deferAutoFocus:()=>me(e.deferAutoFocus),shouldFocusWrap:()=>me(e.shouldFocusWrap),disallowEmptySelection:()=>me(e.disallowEmptySelection),selectOnFocus:()=>me(e.selectOnFocus),disallowTypeAhead:()=>me(e.disallowTypeAhead),shouldUseVirtualFocus:()=>me(e.shouldUseVirtualFocus),allowsTabNavigation:()=>me(e.allowsTabNavigation),isVirtualized:()=>me(e.isVirtualized),scrollToKey:o=>me(e.scrollToKey)?.(o),orientation:()=>me(e.orientation)},t,n)}var qR=yt();function WR(){return pt(qR)}function fbe(){const e=WR();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function GR(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function hbe(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&&GR(i,n))return r+1}return 0}function pbe(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:GR(a,l)?(r>o&&(n=!0),-1):(r<o&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function KR(e,t){const n=pbe(e);e!==n&&t(n)}function mbe(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 Gr(r).body}function gbe(e,t){oe(()=>{const n=setTimeout(()=>{KR(e(),t)});pe(()=>clearTimeout(n))})}function vbe(e,t){if(typeof IntersectionObserver!="function"){gbe(e,t);return}let n=[];oe(()=>{const r=()=>{const s=!!n.length;n=e(),s&&KR(e(),t)},i=mbe(e()),o=new IntersectionObserver(r,{root:i});for(const s of e()){const a=s.ref();a&&o.observe(a)}pe(()=>o.disconnect())})}function ZR(e={}){const[t,n]=QF({value:()=>me(e.items),onChange:o=>e.onItemsChange?.(o)});vbe(t,n);const r=o=>(n(s=>{const a=hbe(s,o);return wF(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(qR.Provider,{value:{registerItem:r},get children(){return o.children}})}}function YR(e){const t=fbe(),n=ze({shouldRegisterItem:!0},e);oe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());pe(r)})}function XR(e={}){const[t,n]=v_({value:()=>me(e.isSelected),defaultValue:()=>!!me(e.defaultIsSelected),onChange:o=>e.onSelectedChange?.(o)});return{isSelected:t,setIsSelected:o=>{!me(e.isReadOnly)&&!me(e.isDisabled)&&n(o)},toggle:()=>{!me(e.isReadOnly)&&!me(e.isDisabled)&&n(!t())}}}var ybe=yt();function Mg(){return pt(ybe)}var bbe=yt();function JR(){return pt(bbe)}var QR=yt();function eN(){return pt(QR)}function us(){const e=eN();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var tN=yt();function $5(){const e=pt(tN);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var nN=yt();function eo(){const e=pt(nN);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function T5(e){let t;const n=eo(),r=us(),i=ze({id:n.generateId(`item-${fn()}`)},e),[o,s]=ue(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=he(),[c,u]=he(),[d,h]=he(),f=()=>r.listState().selectionManager(),p=()=>s.id,m=()=>f().focusedKey()===p(),g=()=>{o.onSelect?.(),o.closeOnSelect&&setTimeout(()=>{r.close(!0)})};YR({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:o.textValue??d()?.textContent??t?.textContent??"",disabled:o.disabled??!1})});const v=Lg({key:p,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>o.disabled},()=>t),y=M=>{je(M,o.onPointerMove),M.pointerType==="mouse"&&(o.disabled?r.onItemLeave(M):(r.onItemEnter(M),M.defaultPrevented||(mn(M.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},w=M=>{je(M,o.onPointerLeave),M.pointerType==="mouse"&&r.onItemLeave(M)},k=M=>{je(M,o.onPointerUp),!o.disabled&&M.button===0&&g()},x=M=>{if(je(M,o.onKeyDown),!M.repeat&&!o.disabled)switch(M.key){case"Enter":case" ":g();break}},C=U(()=>{if(o.indeterminate)return"mixed";if(o.checked!=null)return o.checked}),S=U(()=>({"data-indeterminate":o.indeterminate?"":void 0,"data-checked":o.checked&&!o.indeterminate?"":void 0,"data-disabled":o.disabled?"":void 0,"data-highlighted":m()?"":void 0})),I={isChecked:()=>o.checked,dataset:S,setLabelRef:h,generateId:Nr(()=>s.id),registerLabel:an(l),registerDescription:an(u)};return b(tN.Provider,{value:I,get children(){return b(qe,ne({as:"div",ref(M){var D=ut(O=>t=O,o.ref);typeof D=="function"&&D(M)},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 Ct([o.onPointerDown,v.onPointerDown])},get onPointerUp(){return Ct([k,v.onPointerUp])},get onClick(){return Ct([o.onClick,v.onClick])},get onKeyDown(){return Ct([x,v.onKeyDown])},get onMouseDown(){return Ct([o.onMouseDown,v.onMouseDown])},get onFocus(){return Ct([o.onFocus,v.onFocus])},onPointerMove:y,onPointerLeave:w},S,s))}})}function Og(e){const t=ze({closeOnSelect:!1},e),[n,r]=ue(t,["checked","defaultChecked","onChange","onSelect"]),i=XR({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return b(T5,ne({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{n.onSelect?.(),i.toggle()}},r))}var bf={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>bf.next(e==="ltr"?"rtl":"ltr",t)},f9={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function rN(e){const t=eo(),n=us(),r=Mg(),{direction:i}=Do(),o=ze({id:t.generateId("trigger")},e),[s,a]=ue(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=If(()=>n.triggerRef(),()=>"button"),u=U(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);oe(wt(()=>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=>{je(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},f=v=>{je(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},p=v=>{if(je(v,s.onKeyDown),!s.disabled){if(u())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case f9.first(t.orientation()):v.stopPropagation(),v.preventDefault(),jF(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(l);break;case f9.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case bf.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case bf.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{je(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},g=v=>{je(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return oe(()=>pe(n.registerTriggerId(s.id))),b(rs,ne({ref(v){var y=ut(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 Fe(()=>!!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:m,onClick:f,onKeyDown:p,onFocus:g,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function iN(e){let t;const n=eo(),r=us(),i=Mg(),o=JR(),{direction:s}=Do(),a=ze({id:n.generateId(`content-${fn()}`)},e),[l,c]=ue(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=VR({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);bm({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{i===void 0&&l.onOpenAutoFocus?.(w)},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const f=w=>{if(jn(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),i!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case bf.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case bf.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},p=w=>{l.onEscapeKeyDown?.(w),i?.setAutoFocusMenu(!1),r.close(!0)},m=w=>{l.onFocusOutside?.(w),n.isModal()&&w.preventDefault()},g=w=>{je(w,l.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=w=>{if(je(w,l.onPointerMove),w.pointerType!=="mouse")return;const k=w.target,x=u!==w.clientX;jn(w.currentTarget,k)&&x&&(r.setPointerDir(w.clientX>u?"right":"left"),u=w.clientX)};oe(()=>pe(r.registerContentId(l.id))),pe(()=>r.setContentRef(void 0));const y={ref:ut(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:Ct([l.onKeyDown,h.onKeyDown,f]),onMouseDown:Ct([l.onMouseDown,h.onMouseDown]),onFocusIn:Ct([l.onFocusIn,h.onFocusIn]),onFocusOut:Ct([l.onFocusOut,h.onFocusOut]),onPointerEnter:g,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return b(fe,{get when(){return r.contentPresent()},get children(){return b(fe,{get when(){return o===void 0||r.parentMenuContext()!=null},get fallback(){return b(qe,ne({as:"div"},()=>r.dataset(),y,c))},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({get disableOutsidePointerEvents(){return Fe(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return _r({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:p,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function oN(e){let t;const n=eo(),r=us(),[i,o]=ue(e,["ref"]);return km({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),b(iN,ne({ref(s){var a=ut(l=>{t=l},i.ref);typeof a=="function"&&a(s)}},o))}var sN=yt();function wbe(){const e=pt(sN);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function rh(e){const t=eo(),n=ze({id:t.generateId(`group-${fn()}`)},e),[r,i]=he(),o={generateId:Nr(()=>n.id),registerLabelId:an(i)};return b(sN.Provider,{value:o,get children(){return b(qe,ne({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function Pg(e){const t=wbe(),n=ze({id:t.generateId("label")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerLabelId(r.id))),b(qe,ne({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function Rg(e){const t=us(),n=ze({children:"▼"},e);return b(qe,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Ng(e){return b(T5,ne({role:"menuitem",closeOnSelect:!0},e))}function zg(e){const t=$5(),n=ze({id:t.generateId("description")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerDescription(r.id))),b(qe,ne({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function jg(e){const t=$5(),n=ze({id:t.generateId("indicator")},e),[r,i]=ue(n,["forceMount"]);return b(fe,{get when(){return r.forceMount||t.isChecked()},get children(){return b(qe,ne({as:"div"},()=>t.dataset(),i))}})}function Fg(e){const t=$5(),n=ze({id:t.generateId("label")},e),[r,i]=ue(n,["ref","id"]);return oe(()=>pe(t.registerLabel(r.id))),b(qe,ne({as:"div",ref(o){var s=ut(t.setLabelRef,r.ref);typeof s=="function"&&s(o)},get id(){return r.id}},()=>t.dataset(),i))}function Ug(e){const t=us();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}var aN=yt();function kbe(){const e=pt(aN);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Hg(e){const n=eo().generateId(`radiogroup-${fn()}`),r=ze({id:n},e),[i,o]=ue(r,["value","defaultValue","onChange","disabled"]),[s,a]=Dl({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(aN.Provider,{value:l,get children(){return b(rh,o)}})}function Bg(e){const t=kbe(),n=ze({closeOnSelect:!1},e),[r,i]=ue(n,["value","onSelect"]);return b(T5,ne({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},i))}function xbe(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 Sbe(e,t){return t?G2([e.clientX,e.clientY],t):!1}function lN(e){const t=eo(),n=WR(),r=eN(),i=Mg(),o=JR(),s=ze({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=ue(s,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[h,f]=he(),[p,m]=he(),[g,v]=he(),[y,w]=he(),[k,x]=he(!0),[C,S]=he(l.placement),[I,M]=he([]),[D,O]=he([]),{DomCollectionProvider:$}=ZR({items:D,onItemsChange:O}),E=Fs({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:ae=>a.onOpenChange?.(ae)}),{present:A}=xo({show:()=>t.forceMount()||E.isOpen(),element:()=>y()??null}),T=Dg({selectionMode:"none",dataSource:D}),R=ae=>{x(ae),E.open()},G=(ae=!1)=>{E.close(),ae&&r&&r.close(!0)},K=ae=>{x(ae),E.toggle()},q=()=>{const ae=y();ae&&(mn(ae),T.selectionManager().setFocused(!0),T.selectionManager().setFocusedKey(void 0))},W=()=>{o!=null?setTimeout(()=>q()):q()},N=ae=>{M(_e=>[..._e,ae]);const Ce=r?.registerNestedMenu(ae);return()=>{M(_e=>Ey(_e,ae)),Ce?.()}},V=ae=>d===u?.side&&Sbe(ae,u?.area),J=ae=>{V(ae)&&ae.preventDefault()},ie=ae=>{V(ae)||W()},re=ae=>{V(ae)&&ae.preventDefault()};wm({isDisabled:()=>!(r==null&&E.isOpen()&&t.isModal()),targets:()=>[y(),...I()].filter(Boolean)}),oe(()=>{const ae=y();if(!ae||!r)return;const Ce=r.registerNestedMenu(ae);pe(()=>{Ce()})}),oe(()=>{r===void 0&&i?.registerMenu(t.value(),[y(),...I()])}),oe(()=>{r!==void 0||i===void 0||(i.value()===t.value()?(g()?.focus(),i.autoFocusMenu()&&R(!0)):G())}),oe(()=>{r!==void 0||i===void 0||E.isOpen()&&i.setValue(t.value())}),pe(()=>{r===void 0&&i?.unregisterMenu(t.value())});const ce={dataset:U(()=>({"data-expanded":E.isOpen()?"":void 0,"data-closed":E.isOpen()?void 0:""})),isOpen:E.isOpen,contentPresent:A,nestedMenus:I,currentPlacement:C,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>T,parentMenuContext:()=>r,triggerRef:g,contentRef:y,triggerId:h,contentId:p,setTriggerRef:v,setContentRef:w,open:R,close:G,toggle:K,focusContent:W,onItemEnter:J,onItemLeave:ie,onTriggerLeave:re,setPointerDir:ae=>d=ae,setPointerGraceTimeoutId:ae=>c=ae,setPointerGraceIntent:ae=>u=ae,registerNestedMenu:N,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:an(f),registerContentId:an(m)};return b($,{get children(){return b(QR.Provider,{value:ce,get children(){return b(fe,{when:o===void 0,get fallback(){return l.children},get children(){return b(cs,ne({anchorRef:g,contentRef:y,onCurrentPlacementChange:S},l))}})}})}})}function Vg(e){const{direction:t}=Do();return b(lN,ne({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var _be={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function qg(e){const t=us(),n=eo(),[r,i]=ue(e,["onFocusOutside","onKeyDown"]),{direction:o}=Do();return b(iN,ne({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{r.onFocusOutside?.(u);const d=u.target;jn(t.triggerRef(),d)||t.close()},onKeyDown:u=>{je(u,r.onKeyDown);const d=jn(u.currentTarget,u.target),h=_be.close(o(),n.orientation()).includes(u.key),f=t.parentMenuContext()!=null;d&&h&&f&&(t.close(),mn(t.triggerRef()))}},i))}var h9=["Enter"," "],Cbe={open:(e,t)=>e==="ltr"?[...h9,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...h9,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Wg(e){let t;const n=eo(),r=us(),i=ze({id:n.generateId(`sub-trigger-${fn()}`)},e),[o,s]=ue(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}=Do(),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(),p=Lg({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>o.disabled},()=>t),m=w=>{je(w,o.onClick),!r.isOpen()&&!o.disabled&&r.open(!0)},g=w=>{if(je(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)),mn(w.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(u()))}},v=w=>{if(je(w,o.onPointerLeave),w.pointerType!=="mouse")return;l();const k=r.parentMenuContext(),x=r.contentRef();if(x){k?.setPointerGraceIntent({area:xbe(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=>{je(w,o.onKeyDown),!w.repeat&&(o.disabled||Cbe.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 oe(()=>{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});pe(w)}),oe(wt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),w=>{pe(()=>{window.clearTimeout(w),r.parentMenuContext()?.setPointerGraceIntent(null)})})),oe(()=>pe(r.registerTriggerId(o.id))),pe(()=>{l()}),b(qe,ne({as:"div",ref(w){var k=ut(x=>{r.setTriggerRef(x),t=x},o.ref);typeof k=="function"&&k(w)},get id(){return o.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return Fe(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return o.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return f()?"":void 0},get"data-disabled"(){return o.disabled?"":void 0},get onPointerDown(){return Ct([o.onPointerDown,p.onPointerDown])},get onPointerUp(){return Ct([o.onPointerUp,p.onPointerUp])},get onClick(){return Ct([m,p.onClick])},get onKeyDown(){return Ct([y,p.onKeyDown])},get onMouseDown(){return Ct([o.onMouseDown,p.onMouseDown])},get onFocus(){return Ct([o.onFocus,p.onFocus])},onPointerMove:g,onPointerLeave:v},()=>r.dataset(),s))}function cN(e){const t=Mg(),n=`menu-${fn()}`,r=ze({id:n,modal:!0},e),[i,o]=ue(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Fs({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:Nr(()=>i.id),value:()=>i.value,orientation:()=>i.orientation??t?.orientation()??"horizontal"};return b(nN.Provider,{value:a,get children(){return b(lN,ne({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},o))}})}var Ibe={};Cr(Ibe,{Root:()=>Tu,Separator:()=>$be});function Tu(e){let t;const n=ze({orientation:"horizontal"},e),[r,i]=ue(n,["ref","orientation"]),o=If(()=>t,()=>"hr");return b(qe,ne({as:"hr",ref(s){var a=ut(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 $be=Tu,Tbe={};Cr(Tbe,{Arrow:()=>Ai,CheckboxItem:()=>Og,Content:()=>uN,DropdownMenu:()=>Zn,Group:()=>rh,GroupLabel:()=>Pg,Icon:()=>Rg,Item:()=>Ng,ItemDescription:()=>zg,ItemIndicator:()=>jg,ItemLabel:()=>Fg,Portal:()=>Ug,RadioGroup:()=>Hg,RadioItem:()=>Bg,Root:()=>dN,Separator:()=>Tu,Sub:()=>Vg,SubContent:()=>qg,SubTrigger:()=>Wg,Trigger:()=>rN});function uN(e){const t=eo(),n=us(),[r,i]=ue(e,["onCloseAutoFocus","onInteractOutside"]);let o=!1;return b(oN,ne({onCloseAutoFocus:l=>{r.onCloseAutoFocus?.(l),o||mn(n.triggerRef()),o=!1,l.preventDefault()},onInteractOutside:l=>{r.onInteractOutside?.(l),(!t.isModal()||l.detail.isContextMenu)&&(o=!0)}},i))}function dN(e){const t=`dropdownmenu-${fn()}`,n=ze({id:t},e);return b(cN,n)}var Zn=Object.assign(dN,{Arrow:Ai,CheckboxItem:Og,Content:uN,Group:rh,GroupLabel:Pg,Icon:Rg,Item:Ng,ItemDescription:zg,ItemIndicator:jg,ItemLabel:Fg,Portal:Ug,RadioGroup:Hg,RadioItem:Bg,Separator:Tu,Sub:Vg,SubContent:qg,SubTrigger:Wg,Trigger:rN});function Ebe(e){return b(Zn,ne(e,{"data-component":"dropdown-menu"}))}function Abe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.Trigger,ne(n,{"data-slot":"dropdown-menu-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Lbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.Icon,ne(n,{"data-slot":"dropdown-menu-icon",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Dbe(e){return b(Zn.Portal,e)}function Mbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.Content,ne(n,{"data-component":"dropdown-menu-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Obe(e){const[t,n]=ue(e,["class","classList"]);return b(Zn.Arrow,ne(n,{"data-slot":"dropdown-menu-arrow",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function Pbe(e){const[t,n]=ue(e,["class","classList"]);return b(Zn.Separator,ne(n,{"data-slot":"dropdown-menu-separator",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function Rbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.Group,ne(n,{"data-slot":"dropdown-menu-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Nbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.GroupLabel,ne(n,{"data-slot":"dropdown-menu-group-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function zbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.Item,ne(n,{"data-slot":"dropdown-menu-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function jbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.ItemLabel,ne(n,{"data-slot":"dropdown-menu-item-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Fbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.ItemDescription,ne(n,{"data-slot":"dropdown-menu-item-description",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Ube(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.ItemIndicator,ne(n,{"data-slot":"dropdown-menu-item-indicator",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Hbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.RadioGroup,ne(n,{"data-slot":"dropdown-menu-radio-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Bbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.RadioItem,ne(n,{"data-slot":"dropdown-menu-radio-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Vbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.CheckboxItem,ne(n,{"data-slot":"dropdown-menu-checkbox-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function qbe(e){return b(Zn.Sub,e)}function Wbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.SubTrigger,ne(n,{"data-slot":"dropdown-menu-sub-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Gbe(e){const[t,n]=ue(e,["class","classList","children"]);return b(Zn.SubContent,ne(n,{"data-component":"dropdown-menu-sub-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const un=Object.assign(Ebe,{Trigger:Abe,Icon:Lbe,Portal:Dbe,Content:Mbe,Arrow:Obe,Separator:Pbe,Group:Rbe,GroupLabel:Nbe,Item:zbe,ItemLabel:jbe,ItemDescription:Fbe,ItemIndicator:Ube,RadioGroup:Hbe,RadioItem:Bbe,CheckboxItem:Vbe,Sub:qbe,SubTrigger:Wbe,SubContent:Gbe});var Kbe=ee("<div>"),Gg=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}}}},Uc=e=>{let t=new Gg(e.getBoundingClientRect());const{transform:n}=getComputedStyle(e);return n&&(t=Zbe(t,n)),t},Zbe=(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 Gg({...e,x:e.x-n,y:e.y-r})},mo=()=>({x:0,y:0}),E5=(e,t)=>e.x===t.x&&e.y===t.y,fy=(e,t)=>new Gg({...e,x:e.x+t.x,y:e.y+t.y}),Ybe=(e,t)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),Xbe=(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},hy=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,fN=(e,t,n)=>{const r=e.transformed.center,i={distance:1/0,droppable:null};for(const o of t){const s=Ybe(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},Jbe=(e,t,n)=>{const r=e.transformed,i={ratio:0,droppable:null};for(const o of t){const s=Xbe(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},hN=yt(),pN=e=>{const t=ne({collisionDetector:Jbe},e),[n,r]=et({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,R)=>{A.substring(0,A.length-1),ct(()=>n[A][T])&&r(A,T,"transformers",R.id,R)},o=(A,T,R)=>{A.substring(0,A.length-1),ct(()=>n[A][T])&&ct(()=>n[A][T].transformers[R])&&r(A,T,"transformers",R,void 0)},s=({id:A,node:T,layout:R,data:G})=>{const K=n.draggables[A],q={id:A,node:T,layout:R,data:G,_pendingCleanup:!1};let W;if(!K)Object.defineProperties(q,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{if(n.active.overlay)return mo();const N=Object.values(n.draggables[A].transformers);return N.sort((V,J)=>V.order-J.order),N.reduce((V,J)=>J.callback(V),mo())}},transformed:{enumerable:!0,configurable:!0,get:()=>fy(n.draggables[A].layout,n.draggables[A].transform)}});else if(n.active.draggableId===A&&!n.active.overlay){const N={x:K.layout.x-R.x,y:K.layout.y-R.y},V="addDraggable-existing-offset",J=K.transformers[V],ie=J?J.callback(N):N;W={id:V,order:100,callback:re=>({x:re.x+ie.x,y:re.y+ie.y})},O(()=>o("draggables",A,V))}Qe(()=>{r("draggables",A,q),W&&i("draggables",A,W)}),n.active.draggable&&k()},a=A=>{ct(()=>n.draggables[A])&&(r("draggables",A,"_pendingCleanup",!0),queueMicrotask(()=>l(A)))},l=A=>{if(n.draggables[A]?._pendingCleanup){const T=n.active.draggableId===A;Qe(()=>{T&&r("active","draggableId",null),r("draggables",A,void 0)})}},c=({id:A,node:T,layout:R,data:G})=>{const K=n.droppables[A],q={id:A,node:T,layout:R,data:G,_pendingCleanup:!1};K||Object.defineProperties(q,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{const W=Object.values(n.droppables[A].transformers);return W.sort((N,V)=>N.order-V.order),W.reduce((N,V)=>V.callback(N),mo())}},transformed:{enumerable:!0,configurable:!0,get:()=>fy(n.droppables[A].layout,n.droppables[A].transform)}}),r("droppables",A,q),n.active.draggable&&k()},u=A=>{ct(()=>n.droppables[A])&&(r("droppables",A,"_pendingCleanup",!0),queueMicrotask(()=>d(A)))},d=A=>{if(n.droppables[A]?._pendingCleanup){const T=n.active.droppableId===A;Qe(()=>{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(!ct(()=>n.sensors[A]))return;const T=n.active.sensorId===A;Qe(()=>{T&&r("active","sensorId",null),r("sensors",A,void 0)})},p=({node:A,layout:T})=>{const R=n.active.overlay,G={node:A,layout:T};R||Object.defineProperties(G,{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((q,W)=>q.order-W.order),K.reduce((q,W)=>W.callback(q),mo())}},transformed:{enumerable:!0,configurable:!0,get:()=>n.active.overlay?fy(n.active.overlay.layout,n.active.overlay.transform):new Gg({x:0,y:0,width:0,height:0})}}),r("active","overlay",G)},m=()=>r("active","overlay",null),g=(A,T)=>{Qe(()=>{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 R={};for(const K of Object.values(n.sensors))if(K)for(const[q,W]of Object.entries(K.activators))R[q]??=[],R[q].push({sensor:K,activator:W});const G={};for(const K in R){let q=K;T&&(q=`on${K}`),G[q]=W=>{for(const{activator:N}of R[K]){if(n.active.sensor)break;N(W,A)}}}return G},k=()=>{let A=!1;const T=Object.values(n.draggables),R=Object.values(n.droppables),G=n.active.overlay;return Qe(()=>{const K=new WeakMap;for(const q of T)if(q){const W=q.layout;K.has(q.node)||K.set(q.node,Uc(q.node));const N=K.get(q.node);hy(W,N)||(r("draggables",q.id,"layout",N),A=!0)}for(const q of R)if(q){const W=q.layout;K.has(q.node)||K.set(q.node,Uc(q.node));const N=K.get(q.node);hy(W,N)||(r("droppables",q.id,"layout",N),A=!0)}if(G){const q=G.layout,W=Uc(G.node);hy(q,W)||(r("active","overlay","layout",W),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}),R=T?T.id:null;n.active.droppableId!==R&&r("active","droppableId",R)}},C=A=>{const T={id:"sensorMove",order:0,callback:R=>n.active.sensor?{x:R.x+n.active.sensor.coordinates.delta.x,y:R.y+n.active.sensor.coordinates.delta.y}:R};k(),Qe(()=>{r("active","draggableId",A),i("draggables",A,T)}),x()},S=()=>{const A=ct(()=>n.active.draggableId);Qe(()=>{A!==null&&o("draggables",A,"sensorMove"),r("active",["draggableId","droppableId"],null)}),k()},I=A=>{oe(()=>{const T=n.active.draggable;T&&ct(()=>A({draggable:T}))})},M=A=>{oe(()=>{const T=n.active.draggable;if(T){const R=ct(()=>n.active.overlay);Object.values(R?R.transform:T.transform),ct(()=>A({draggable:T,overlay:R}))}})},D=A=>{oe(()=>{const T=n.active.draggable,R=n.active.droppable;T&&ct(()=>A({draggable:T,droppable:R,overlay:n.active.overlay}))})},O=A=>{oe(({previousDraggable:T,previousDroppable:R,previousOverlay:G})=>{const K=n.active.draggable,q=K?n.active.droppable:null,W=K?n.active.overlay:null;return!K&&T&&ct(()=>A({draggable:T,droppable:R,overlay:G})),{previousDraggable:K,previousDroppable:q,previousOverlay:W}},{previousDraggable:null,previousDroppable:null,previousOverlay:null})};M(()=>x()),t.onDragStart&&I(t.onDragStart),t.onDragMove&&M(t.onDragMove),t.onDragOver&&D(t.onDragOver),t.onDragEnd&&O(t.onDragEnd);const E=[n,{addTransformer:i,removeTransformer:o,addDraggable:s,removeDraggable:a,addDroppable:c,removeDroppable:u,addSensor:h,removeSensor:f,setOverlay:p,clearOverlay:m,recomputeLayouts:k,detectCollisions:x,draggableActivators:w,sensorStart:g,sensorMove:v,sensorEnd:y,dragStart:C,dragEnd:S,onDragStart:I,onDragMove:M,onDragOver:D,onDragEnd:O}];return b(hN.Provider,{value:E,get children(){return t.children}})},Wl=()=>pt(hN)||null,Qbe=(e="pointer-sensor")=>{const[t,{addSensor:n,removeSensor:r,sensorStart:i,sensorMove:o,sensorEnd:s,dragStart:a,dragEnd:l}]=Wl(),c=250,u=10;en(()=>{n({id:e,activators:{pointerdown:m}})}),pe(()=>{r(e)});const d=()=>t.active.sensorId===e,h={x:0,y:0};let f=null,p=null;const m=(x,C)=>{x.button===0&&(document.addEventListener("pointermove",y),document.addEventListener("pointerup",w),p=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(p),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()}},mN=e=>(Qbe(),Fe(()=>e.children)),Kg=e=>({transform:`translate3d(${e.x}px, ${e.y}px, 0)`}),e2e=(e,t={})=>{const[n,{addDraggable:r,removeDraggable:i,draggableActivators:o}]=Wl(),[s,a]=he(null);en(()=>{const d=s();d&&r({id:e,node:d,layout:Uc(d),data:t})}),pe(()=>i(e));const l=()=>n.active.draggableId===e,c=()=>n.draggables[e]?.transform||mo();return Object.defineProperties((d,h)=>{const f=h?h():{};oe(()=>{const p=s(),m=o(e);if(p)for(const g in m)p.addEventListener(g,m[g]);pe(()=>{if(p)for(const g in m)p.removeEventListener(g,m[g])})}),a(d),f.skipTransform||oe(()=>{const p=c();if(E5(p,mo()))d.style.removeProperty("transform");else{const m=Kg(c());d.style.setProperty("transform",m.transform??null)}})},{ref:{enumerable:!0,value:a},isActiveDraggable:{enumerable:!0,get:l},dragActivators:{enumerable:!0,get:()=>o(e,!0)},transform:{enumerable:!0,get:c}})},t2e=(e,t={})=>{const[n,{addDroppable:r,removeDroppable:i}]=Wl(),[o,s]=he(null);en(()=>{const u=o();u&&r({id:e,node:u,layout:Uc(u),data:t})}),pe(()=>i(e));const a=()=>n.active.droppableId===e,l=()=>n.droppables[e]?.transform||mo();return Object.defineProperties((u,d)=>{const h=d?d():{};s(u),h.skipTransform||oe(()=>{const f=l();if(E5(f,mo()))u.style.removeProperty("transform");else{const p=Kg(l());u.style.setProperty("transform",p.transform??null)}})},{ref:{enumerable:!0,value:s},isActiveDroppable:{enumerable:!0,get:a},transform:{enumerable:!0,get:l}})},gN=e=>{const[t,{onDragStart:n,onDragEnd:r,setOverlay:i,clearOverlay:o}]=Wl();let s;n(({draggable:l})=>{i({node:l.node,layout:l.layout}),queueMicrotask(()=>{if(s){const c=Uc(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`,...Kg(l.transform),...e.style}};return b(js,{get mount(){return document.body},get children(){return b(fe,{get when(){return t.active.draggable},get children(){var l=Kbe(),c=s;return typeof c=="function"?Sr(c,l):s=l,F(l,(()=>{var u=Fe(()=>typeof e.children=="function");return()=>u()?e.children(t.active.draggable):e.children})()),Me(u=>{var d=e.class,h=a();return d!==u.e&&Ko(l,u.e=d),u.t=gm(l,h,u.t),u},{e:void 0,t:void 0}),l}})}})},n2e=(e,t,n)=>{const r=e.slice();return r.splice(n,0,...r.splice(t,1)),r},vN=yt(),yN=e=>{const[t]=Wl(),[n,r]=et({initialIds:[],sortedIds:[]}),i=a=>a>=0&&a<n.initialIds.length;oe(()=>{r("initialIds",[...e.ids]),r("sortedIds",[...e.ids])}),oe(()=>{t.active.draggableId&&t.active.droppableId?ct(()=>{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=n2e(n.sortedIds,a,l);r("sortedIds",c)}}):r("sortedIds",[...e.ids])});const s=[n,{}];return b(vN.Provider,{value:s,get children(){return e.children}})},r2e=()=>pt(vN)||null,i2e=(e,t)=>n=>{e(n),t(n)},bN=(e,t={})=>{const[n,{addTransformer:r,removeTransformer:i}]=Wl(),[o]=r2e(),s=e2e(e,t),a=t2e(e,t),l=i2e(s.ref,a.ref),c=()=>o.initialIds.indexOf(e),u=()=>o.sortedIds.indexOf(e),d=g=>n.droppables[g]?.layout||null,h=()=>{const g=mo(),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}}};en(()=>r("droppables",e,f)),pe(()=>i("droppables",e,f.id));const p=()=>(e===n.active.draggableId&&!n.active.overlay?n.draggables[e]?.transform:n.droppables[e]?.transform)||mo();return Object.defineProperties(g=>{s(g,()=>({skipTransform:!0})),a(g,()=>({skipTransform:!0})),oe(()=>{const v=p();if(E5(v,mo()))g.style.removeProperty("transform");else{const y=Kg(p());g.style.setProperty("transform",y.transform??null)}})},{ref:{enumerable:!0,value:l},transform:{enumerable:!0,get:p},isActiveDraggable:{enumerable:!0,get:()=>s.isActiveDraggable},dragActivators:{enumerable:!0,get:()=>s.dragActivators},isActiveDroppable:{enumerable:!0,get:()=>a.isActiveDroppable}})};function o2e(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=p=>{if(!e.enabled())return;const m=e.el();if(!m)return;const g=m.getBoundingClientRect(),v=p.clientX,y=p.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 p=e.el();if(!p||t.locs.length<2)return 0;const m=p.getBoundingClientRect(),g=t.locs[t.locs.length-1];if(!g)return 0;const v=t.locs[0]??g;if(v.x<m.left||v.x>m.right||v.y<m.top||v.y>m.bottom||t.last&&g.x===t.last.x&&g.y===t.last.y)return 0;if(m.right-g.x<=o)return t.last=g,n;const y={x:m.right,y:m.top-i},w={x:m.right,y:m.bottom+i},k=(M,D)=>(D.y-M.y)/(D.x-M.x),x=k(g,y),C=k(g,w),S=k(v,y),I=k(v,w);return x<S&&C>I?(t.last=g,n):(t.last=void 0,0)},u=p=>{s(),e.onActivate(p)},d=p=>{if(!p||e.active()===p)return;if(!e.active()){u(p);return}const m=c();if(m===0){u(p);return}s(),t.pending=p,t.timer=window.setTimeout(()=>{t.timer=void 0,t.pending===p&&(t.pending=void 0,e.enabled()&&e.active()&&t.over===p&&e.onActivate(p))},m)};return{move:l,enter:(p,m)=>{e.enabled()&&(t.over=p,l(m),d(p))},leave:p=>{t.over===p&&(t.over=void 0),t.pending===p&&s()},activate:u,request:d,cancel:s,reset:a}}let N2;const s2e=e=>{N2=e},wN=e=>{if(window.focus(),!!e){if(N2)return N2(e);console.warn("notification-click: navigate function not set, falling back to window.location.assign"),window.location.assign(e)}};function a2e(e){return e.desktop===!0&&e.enabled}function l2e(e){return!(e.desktopNativeNotificationEnabled||e.currentSessionTarget||e.childSessionTarget)}const sd=(e,t="default")=>`${t}
|
|
2443
2443
|
${e.replace(/[\\/]+$/,"")}`,pc=new Map,mc=new Map;function c2e(){const e={resolve:n=>{}};return{promise:new Promise(n=>{e.resolve=n}),resolve:e.resolve}}const k0={get(e,t){return pc.get(sd(e,t))},pending(e,t){const n=sd(e,t),r=pc.get(n);r&&r.status!=="pending"||pc.set(n,{status:"pending"})},ready(e,t){const n=sd(e,t),r={status:"ready"};pc.set(n,r);const i=mc.get(n);i&&(mc.delete(n),i.resolve(r))},failed(e,t,n){const r=sd(e,n),i={status:"failed",message:t};pc.set(r,i);const o=mc.get(r);o&&(mc.delete(r),o.resolve(i))},wait(e,t){const n=sd(e,t),r=pc.get(n);if(r&&r.status!=="pending")return Promise.resolve(r);const i=mc.get(n);if(i)return i.promise;const o=c2e();return mc.set(n,o),o.promise}},u2e=40,wf={session:new Map,terminal:new Map},Zg=(e,t)=>`${e}
|
|
2444
|
-
${t}`,kN=(e,t,n)=>{for(e.delete(t),e.set(t,n);e.size>u2e;){const r=e.keys().next().value;if(r===void 0)return;e.delete(r)}},d2e=(e,t,n)=>{const r=Zg(e,t),i=wf.session.get(r)??{prompt:"",files:{}};kN(wf.session,r,{...i,...n})},m3e=(e,t)=>wf.session.get(Zg(e,t)),g3e=(e,t,n)=>{kN(wf.terminal,Zg(e,t),n)},v3e=(e,t)=>wf.terminal.get(Zg(e,t)),f2e=e=>typeof e!="object"||e===null?!1:"draggable"in e,am=e=>{if(!f2e(e))return;const t=e.draggable;if(t)return typeof t.id=="string"?t.id:void 0},h2e=(e,t)=>({id:e,order:100,callback:n=>t==="x"?{...n,x:0}:{...n,y:0}}),xN=(e,t)=>()=>{const n=Wl();if(!n)return null;const[,{onDragStart:r,onDragEnd:i,addTransformer:o,removeTransformer:s}]=n,a=h2e(t,e),l=Wn(c=>(r(u=>{const d=am(u);d&&o("draggables",d,a)}),i(u=>{const d=am(u);d&&s("draggables",d,a.id)}),c));return pe(l),null},SN=xN("x","constrain-x-axis"),y3e=xN("y","constrain-y-axis");var p2e=ee('<div><div class="text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70"></div><div>'),m2e=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 py=5e3,g2e=(e,t=0)=>{if(!(e===void 0||Number.isNaN(e)))return`${e.toFixed(t)}ms`},ad=e=>{if(!(e===void 0||Number.isNaN(e)))return`${Math.round(e)}`},p9=e=>{if(e===void 0||Number.isNaN(e))return;const t=e/1024/1024;return`${t>=1024?t.toFixed(0):t.toFixed(1)}MB`},ys=(e,t,n=!1)=>e===void 0||Number.isNaN(e)?!1:n?e<t:e>t,my=e=>e.includes("/session");function bs(e){return b(In,{get value(){return e.tip},placement:"top",get children(){var t=p2e(),n=t.firstChild,r=n.nextSibling;return F(n,()=>e.label),F(r,()=>e.value),Me(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=Et(t,o,i.e),i.t=Et(r,s,i.t),i},{e:void 0,t:void 0}),t}})}function v2e(){const e=Rt(),t=Ao(),n=Kre(),[r,i]=et({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 m=s();return m===void 0?o():`${Math.round(m*100)}%`},l=()=>r.long.count===void 0?o():`${ad(r.long.block)??o()}/${r.long.count}`,c=()=>r.nav.pending?"...":ad(r.nav.dur)??o();let u="",d=0,h=!1,f=0,p=0;return oe(()=>{const m=n(),g=`${t.pathname}${t.search}`;if(!h){h=!0,u=g;return}if(m){if(f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),f=0,p=0,d!==0)return;d=performance.now(),my(u)&&i("nav",{dur:void 0,pending:!0});return}if(d===0){u=g;return}const v=d,y=u;d=0,u=g,(my(y)||my(g))&&(f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),f=requestAnimationFrame(()=>{f=0,p=requestAnimationFrame(()=>{p=0,i("nav",{dur:performance.now()-v,pending:!1})})}))}),en(()=>{const m=[],g=[],v=[],y=new Map;let w=!1,k,x=0,C=0,S=0;const I=(q,W,N)=>{for(;q[0]&&N-q[0].at>W;)q.shift()},M=q=>{I(g,py,q);const W=g.reduce((J,ie)=>J+ie.dur,0),N=g.reduce((J,ie)=>Math.max(J,ie.dur),0),V=g.filter(J=>J.dur>32).length;Qe(()=>{i("fps",W>0?g.length*1e3/W:void 0),i("gap",N>0?N:void 0),i("jank",V)})},D=(q=performance.now())=>{if(!w)return;I(v,py,q);const W=v.reduce((V,J)=>V+Math.max(0,J.dur-50),0),N=v.reduce((V,J)=>Math.max(V,J.dur),0);i("long",{block:W,count:v.length,max:N})},O=(q=performance.now())=>{for(const[V,J]of y)q-J.at>py&&y.delete(V);let W=0,N=0;for(const V of y.values())W=Math.max(W,V.delay),N=Math.max(N,V.dur);Qe(()=>{i("delay",W>0?W:void 0),i("inp",N>0?N:void 0)})},$=()=>{const q=performance.memory;q&&i("heap",{limit:q.jsHeapSizeLimit,used:q.usedJSHeapSize})},E=()=>{g.length=0,v.length=0,y.clear(),C=0,S=0,Qe(()=>{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=(q,W,N)=>{if(typeof PerformanceObserver>"u"||!(PerformanceObserver.supportedEntryTypes??[]).includes(q))return!1;const V=new PerformanceObserver(J=>N(J.getEntries()));try{return V.observe(W),m.push(V),!0}catch{return V.disconnect(),!1}};A("layout-shift",{buffered:!0,type:"layout-shift"},q=>{const W=q.reduce((N,V)=>{const J=V;return J.hadRecentInput?N:N+J.value},0);W!==0&&i("cls",N=>(N??0)+W)})&&i("cls",0),A("longtask",{buffered:!0,type:"longtask"},q=>{const W=performance.now();v.push(...q.map(N=>({at:N.startTime,dur:N.duration}))),D(W)})&&(w=!0,i("long",{block:0,count:0,max:0})),A("event",{buffered:!0,durationThreshold:16,type:"event"},q=>{for(const W of q){const N=W;if(N.duration<16)continue;const V=N.interactionId&&N.interactionId>0?N.interactionId:`${N.name}:${Math.round(N.startTime)}`,J=y.get(V),ie=Math.max(0,(N.processingStart??N.startTime)-N.startTime);if(y.set(V,{at:N.startTime,delay:Math.max(J?.delay??0,ie),dur:Math.max(J?.dur??0,N.duration)}),y.size<=200)continue;const re=y.keys().next().value;re!==void 0&&y.delete(re)}O()});const T=q=>{if(document.visibilityState!=="visible"){x=0;return}if(C===0){C=q,x=requestAnimationFrame(T);return}g.push({at:q,dur:q-C}),C=q,q-S>=250&&(S=q,M(q)),x=requestAnimationFrame(T)},R=()=>{x!==0&&cancelAnimationFrame(x),x=0,k!==void 0&&(clearInterval(k),k=void 0)},G=()=>{document.visibilityState==="visible"&&(k===void 0&&(k=window.setInterval(()=>{D(),O(),$()},1e3)),x===0&&(x=requestAnimationFrame(T)))},K=()=>{if(document.visibilityState!=="visible"){R();return}E(),G()};$(),G(),zn(document,"visibilitychange",K),pe(()=>{f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),R();for(const q of m)q.disconnect()})}),(()=>{var m=m2e(),g=m.firstChild;return F(g,b(bs,{get label(){return e.t("debugBar.nav.label")},get tip(){return e.t("debugBar.nav.tip")},get value(){return c()},get bad(){return ys(r.nav.dur,400)},get dim(){return Fe(()=>r.nav.dur===void 0)()&&!r.nav.pending}}),null),F(g,b(bs,{get label(){return e.t("debugBar.fps.label")},get tip(){return e.t("debugBar.fps.tip")},get value(){return Fe(()=>r.fps===void 0)()?o():`${Math.round(r.fps)}`},get bad(){return ys(r.fps,50,!0)},get dim(){return r.fps===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.frame.label")},get tip(){return e.t("debugBar.frame.tip")},get value(){return ad(r.gap)??o()},get bad(){return ys(r.gap,50)},get dim(){return r.gap===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.jank.label")},get tip(){return e.t("debugBar.jank.tip")},get value(){return Fe(()=>r.jank===void 0)()?o():`${r.jank}`},get bad(){return ys(r.jank,8)},get dim(){return r.jank===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.long.label")},get tip(){return e.t("debugBar.long.tip",{max:g2e(r.long.max)??o()})},get value(){return l()},get bad(){return ys(r.long.block,200)},get dim(){return r.long.count===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.delay.label")},get tip(){return e.t("debugBar.delay.tip")},get value(){return ad(r.delay)??o()},get bad(){return ys(r.delay,100)},get dim(){return r.delay===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.inp.label")},get tip(){return e.t("debugBar.inp.tip")},get value(){return ad(r.inp)??o()},get bad(){return ys(r.inp,200)},get dim(){return r.inp===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.cls.label")},get tip(){return e.t("debugBar.cls.tip")},get value(){return Fe(()=>r.cls===void 0)()?o():r.cls.toFixed(2)},get bad(){return ys(r.cls,.1)},get dim(){return r.cls===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.mem.label")},get tip(){return Fe(()=>r.heap.used===void 0)()?e.t("debugBar.mem.tipUnavailable"):e.t("debugBar.mem.tip",{used:p9(r.heap.used)??o(),limit:p9(r.heap.limit)??o()})},get value(){return a()},get bad(){return ys(s(),.8)},get dim(){return r.heap.used===void 0},wide:!0}),null),Me(()=>Je(m,"aria-label",e.t("debugBar.ariaLabel"))),m})()}const y2e="__cp-mobile-close-button",m9="__cpMobileBackEmbedded",b2e=()=>typeof navigator!="object"||!navigator.userAgent?!1:/Codeplane\/Mobile/.test(navigator.userAgent),w2e=()=>{try{const e=window.mobileApp;if(e&&typeof e.close=="function"){e.close();return}}catch{}try{window.webkit?.messageHandlers?.close?.postMessage(null)}catch{}};function k2e(e){const[t,n]=ue(e,["visible","label","class","classList"]),r=U(()=>typeof t.visible=="boolean"?t.visible:b2e());return en(()=>{!r()||typeof window>"u"||(window[m9]=!0)}),pe(()=>{typeof window>"u"||delete window[m9]}),b(fe,{get when(){return r()},get children(){return b(In,{placement:"bottom",get value(){return t.label??"Back"},get children(){return b(Qt,ne(n,{id:y2e,variant:"ghost",icon:"chevron-left",get"aria-label"(){return t.label??"Back"},get class(){return t.class},get classList(){return t.classList},onClick:()=>w2e()}))}})}})}const A5=100;function x2e(e,t,n=A5){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}:S2e(e,t,n)}function S2e(e,t,n=A5){const r=e.stack.slice(0,e.index+1).concat(t),i=_2e(r,r.length-1,n);return{...e,...i,action:void 0}}function _2e(e,t,n=A5){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 C2e(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 I2e(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 $2e={};Cr($2e,{Anchor:()=>CN,Arrow:()=>Ai,CloseButton:()=>IN,Content:()=>$N,Description:()=>TN,Popover:()=>Cd,Portal:()=>EN,Root:()=>AN,Title:()=>LN,Trigger:()=>DN,usePopoverContext:()=>Ma});var _N=yt();function Ma(){const e=pt(_N);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function CN(e){const t=Ma(),[n,r]=ue(e,["ref"]);return b(qe,ne({as:"div",ref(i){var o=ut(t.setDefaultAnchorRef,n.ref);typeof o=="function"&&o(i)}},()=>t.dataset(),r))}function IN(e){const t=Ma(),[n,r]=ue(e,["aria-label","onClick"]);return b(rs,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{je(o,n.onClick),t.close()}},()=>t.dataset(),r))}function $N(e){let t;const n=Ma(),r=ze({id:n.generateId("content")},e),[i,o]=ue(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||mn(n.triggerRef())):(f.defaultPrevented||(a||mn(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)),jn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l&&f.preventDefault())};return wm({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),km({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),bm({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),oe(()=>pe(n.registerContentId(o.id))),b(fe,{get when(){return n.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(f){var p=ut(m=>{n.setContentRef(m),t=m},i.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Fe(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return _r({"--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 TN(e){const t=Ma(),n=ze({id:t.generateId("description")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerDescriptionId(r.id))),b(qe,ne({as:"p",get id(){return r.id}},()=>t.dataset(),i))}function EN(e){const t=Ma();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}var g9={dismiss:"Dismiss"};function AN(e){const t=`popover-${fn()}`,n=ze({id:t,modal:!1,translations:g9},e),[r,i]=ue(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[o,s]=he(),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(),v=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:C=>r.onOpenChange?.(C)}),y=()=>r.anchorRef?.()??o()??a(),{present:w}=xo({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),k=U(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),x={translations:()=>r.translations??g9,dataset:k,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??x.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:f,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:l,setContentRef:u,close:v.close,toggle:v.toggle,generateId:Nr(()=>r.id),registerContentId:an(h),registerTitleId:an(p),registerDescriptionId:an(g)};return b(_N.Provider,{value:x,get children(){return b(cs,ne({anchorRef:y,contentRef:c},i))}})}function LN(e){const t=Ma(),n=ze({id:t.generateId("title")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerTitleId(r.id))),b(qe,ne({as:"h2",get id(){return r.id}},()=>t.dataset(),i))}function DN(e){const t=Ma(),[n,r]=ue(e,["ref","onClick","onPointerDown"]);return b(rs,ne({ref(s){var a=ut(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Fe(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{je(s,n.onPointerDown),s.preventDefault()},onClick:s=>{je(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Cd=Object.assign(AN,{Anchor:CN,Arrow:Ai,CloseButton:IN,Content:$N,Description:TN,Portal:EN,Title:LN,Trigger:DN}),Yg=["id","name","validationState","required","disabled","readOnly"];function Xg(e){const t=`form-control-${fn()}`,n=ze({id:t},e),[r,i]=he(),[o,s]=he(),[a,l]=he(),[c,u]=he(),d=(m,g,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&g!=null?m:void 0].filter(Boolean).join(" ")||void 0},h=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,f=U(()=>({"data-valid":me(n.validationState)==="valid"?"":void 0,"data-invalid":me(n.validationState)==="invalid"?"":void 0,"data-required":me(n.required)?"":void 0,"data-disabled":me(n.disabled)?"":void 0,"data-readonly":me(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>me(n.name)??me(n.id),dataset:f,validationState:()=>me(n.validationState),isRequired:()=>me(n.required),isDisabled:()=>me(n.disabled),isReadOnly:()=>me(n.readOnly),labelId:r,fieldId:o,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:h,generateId:Nr(()=>me(n.id)),registerLabel:an(i),registerField:an(s),registerDescription:an(l),registerErrorMessage:an(u)}}}var ih=yt();function Li(){const e=pt(ih);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Oa(e){const t=Li(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescription(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}var L5=["id","aria-label","aria-labelledby","aria-describedby"];function D5(e){const t=Li(),n=ze({id:t.generateId("field")},e);return oe(()=>pe(t.registerField(me(n.id)))),{fieldProps:{id:()=>me(n.id),ariaLabel:()=>me(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(me(n.id),me(n["aria-label"]),me(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(me(n["aria-describedby"]))}}}function oh(e){let t;const n=Li(),r=ze({id:n.generateId("label")},e),[i,o]=ue(r,["ref"]),s=If(()=>t,()=>"label");return oe(()=>pe(n.registerLabel(o.id))),b(qe,ne({as:"label",ref(a){var l=ut(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return Fe(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),o))}function sh(e,t){oe(wt(e,n=>{if(n==null)return;const r=T2e(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),pe(()=>{r.removeEventListener("reset",t)}))}))}function T2e(e){return E2e(e)?e.form:e.closest("form")}function E2e(e){return e.matches("textarea, input, select, button")}function Pa(e){const t=Li(),n=ze({id:t.generateId("error-message")},e),[r,i]=ue(n,["forceMount"]),o=()=>t.validationState()==="invalid";return oe(()=>{o()&&pe(t.registerErrorMessage(i.id))}),b(fe,{get when(){return r.forceMount||o()},get children(){return b(qe,ne({as:"div"},()=>t.dataset(),i))}})}var A2e={};Cr(A2e,{Control:()=>ON,Description:()=>PN,ErrorMessage:()=>RN,Input:()=>NN,Label:()=>zN,Root:()=>jN,Switch:()=>ia,Thumb:()=>FN,useSwitchContext:()=>Gl});var MN=yt();function Gl(){const e=pt(MN);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function ON(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("control")},e),[i,o]=ue(r,["onClick","onKeyDown"]);return b(qe,ne({as:"div",onClick:l=>{je(l,i.onClick),n.toggle(),n.inputRef()?.focus()},onKeyDown:l=>{je(l,i.onKeyDown),l.key===vm.Space&&(n.toggle(),n.inputRef()?.focus())}},()=>t.dataset(),()=>n.dataset(),o))}function PN(e){const t=Gl();return b(Oa,ne(()=>t.dataset(),e))}function RN(e){const t=Gl();return b(Pa,ne(()=>t.dataset(),e))}function NN(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("input")},e),[i,o,s]=ue(r,["ref","style","onChange","onFocus","onBlur"],L5),{fieldProps:a}=D5(o);return b(qe,ne({as:"input",ref(d){var h=ut(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 _r({...ym},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=>{je(d,i.onChange),d.stopPropagation();const h=d.target;n.setIsChecked(h.checked),h.checked=n.checked()},onFocus:d=>{je(d,i.onFocus),n.setIsFocused(!0)},onBlur:d=>{je(d,i.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function zN(e){const t=Gl();return b(oh,ne(()=>t.dataset(),e))}function jN(e){let t;const n=`switch-${fn()}`,r=ze({value:"on",id:n},e),[i,o,s]=ue(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],Yg),[a,l]=he(),[c,u]=he(!1),{formControlContext:d}=Xg(o),h=XR({isSelected:()=>i.checked,defaultIsSelected:()=>i.defaultChecked,onSelectedChange:g=>i.onChange?.(g),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});sh(()=>t,()=>h.setIsSelected(i.defaultChecked??!1));const f=g=>{je(g,i.onPointerDown),c()&&g.preventDefault()},p=U(()=>({"data-checked":h.isSelected()?"":void 0})),m={value:()=>i.value,dataset:p,checked:()=>h.isSelected(),inputRef:a,generateId:Nr(()=>me(o.id)),toggle:()=>h.toggle(),setIsChecked:g=>h.setIsSelected(g),setIsFocused:u,setInputRef:l};return b(ih.Provider,{value:d,get children(){return b(MN.Provider,{value:m,get children(){return b(qe,ne({as:"div",ref(g){var v=ut(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"group",get id(){return me(o.id)},onPointerDown:f},()=>d.dataset(),p,s,{get children(){return b(L2e,{state:m,get children(){return i.children}})}}))}})}})}function L2e(e){const t=El(()=>{const n=e.children;return _f(n)?n(e.state):n});return Fe(t)}function FN(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("thumb")},e);return b(qe,ne({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var ia=Object.assign(jN,{Control:ON,Description:PN,ErrorMessage:RN,Input:NN,Label:zN,Thumb:FN});function D2e(e){const[t,n]=ue(e,["children","class","hideLabel","description"]);return b(ia,ne(n,{get class(){return t.class},"data-component":"switch",get children(){return[b(ia.Input,{"data-slot":"switch-input"}),b(fe,{get when(){return t.children},get children(){return b(ia.Label,{"data-slot":"switch-label",get classList(){return{"sr-only":t.hideLabel}},get children(){return t.children}})}}),b(fe,{get when(){return t.description},get children(){return b(ia.Description,{"data-slot":"switch-description",get children(){return t.description}})}}),b(ia.ErrorMessage,{"data-slot":"switch-error"}),b(ia.Control,{"data-slot":"switch-control",get children(){return b(ia.Thumb,{"data-slot":"switch-thumb"})}})]}}))}var M2e=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 O2e(e,t){const n=new ResizeObserver(e);return pe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function M5(e,t,n){const r=new WeakMap,{observe:i,unobserve:o}=O2e(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);oe(s=>{const a=r_(Z0(me(e)));return i_(a,s,i,o),a},[])}var P2e={};Cr(P2e,{Content:()=>HN,Indicator:()=>BN,List:()=>VN,Root:()=>qN,Tabs:()=>lh,Trigger:()=>WN,useTabsContext:()=>ah});var UN=yt();function ah(){const e=pt(UN);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function HN(e){const[t,n]=he(),r=ah(),[i,o]=ue(e,["ref","id","value","forceMount"]),[s,a]=he(0),l=()=>i.id??r.generateContentId(i.value),c=()=>r.listState().selectedKey()===i.value,{present:u}=xo({show:()=>i.forceMount||c(),element:()=>t()??null});return oe(wt([()=>t(),()=>u()],([d,h])=>{if(d==null||!h)return;const f=()=>{const m=d_(d,{tabbable:!0});a(m.nextNode()?void 0:0)};f();const p=new MutationObserver(f);p.observe(d,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),pe(()=>{p.disconnect()})})),oe(wt([()=>i.value,l],([d,h])=>{r.contentIdsMap().set(d,h)})),b(fe,{get when(){return u()},get children(){return b(qe,ne({as:"div",ref(d){var h=ut(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 BN(e){const t=ah(),[n,r]=ue(e,["style"]),[i,o]=he({width:void 0,height:void 0}),{direction:s}=Do(),a=()=>{const h=t.selectedTab();if(h==null)return;const f={transform:void 0,width:void 0,height:void 0},p=s()==="rtl"?-1*(h.offsetParent?.offsetWidth-h.offsetWidth-h.offsetLeft):h.offsetLeft;f.transform=t.orientation()==="vertical"?`translateY(${h.offsetTop}px)`:`translateX(${p}px)`,t.orientation()==="horizontal"?f.width=`${h.offsetWidth}px`:f.height=`${h.offsetHeight}px`,o(f)};en(()=>{queueMicrotask(()=>{a()})}),oe(wt([t.selectedTab,t.orientation,s],()=>{a()},{defer:!0}));const[l,c]=he(!1);let u=null,d=null;return M5(t.selectedTab,(h,f)=>{if(d!==f){d=f;return}c(!0),u&&clearTimeout(u),u=setTimeout(()=>{u=null,c(!1)},1),a()}),b(qe,ne({as:"div",role:"presentation",get style(){return _r(i(),n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return l()}},r))}function VN(e){let t;const n=ah(),[r,i]=ue(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:o}=Do(),s=new M2e(()=>n.listState().collection(),o,n.orientation),a=HR({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return oe(()=>{if(t==null)return;const l=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);l!=null&&n.setSelectedTab(l)}),b(qe,ne({as:"div",ref(l){var c=ut(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 Ct([r.onKeyDown,a.onKeyDown])},get onMouseDown(){return Ct([r.onMouseDown,a.onMouseDown])},get onFocusIn(){return Ct([r.onFocusIn,a.onFocusIn])},get onFocusOut(){return Ct([r.onFocusOut,a.onFocusOut])}},i))}function R2e(e){const[t,n]=Dl({value:()=>me(e.selectedKey),defaultValue:()=>me(e.defaultSelectedKey),onChange:c=>e.onSelectionChange?.(c)}),r=U(()=>{const c=t();return c!=null?[c]:[]}),[,i]=ue(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}=Dg(o),l=U(()=>{const c=t();return c!=null?s().getItem(c):void 0});return{collection:s,selectionManager:a,selectedKey:t,setSelectedKey:n,selectedItem:l}}function qN(e){const t=`tabs-${fn()}`,n=ze({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,i]=ue(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[o,s]=he([]),[a,l]=he(),{DomCollectionProvider:c}=ZR({items:o,onItemsChange:s}),u=R2e({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:m=>r.onChange?.(String(m)),dataSource:o});let d=u.selectedKey();oe(wt([()=>u.selectionManager(),()=>u.collection(),()=>u.selectedKey()],([m,g,v])=>{let y=v;if(m.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&&m.setSelectedKeys([y])}(m.focusedKey()==null||!m.isFocused()&&y!==d)&&m.setFocusedKey(y),d=y}));const h=new Map,f=new Map,p={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>h,contentIdsMap:()=>f,listState:()=>u,selectedTab:a,setSelectedTab:l,generateTriggerId:m=>`${i.id}-trigger-${m}`,generateContentId:m=>`${i.id}-content-${m}`};return b(c,{get children(){return b(UN.Provider,{value:p,get children(){return b(qe,ne({as:"div",get"data-orientation"(){return p.orientation()}},i))}})}})}function WN(e){let t;const n=ah(),r=ze({type:"button"},e),[i,o]=ue(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);YR({getItem:()=>({ref:()=>t,type:"item",key:i.value,textValue:"",disabled:l()})});const u=Lg({key:()=>i.value,selectionManager:()=>n.listState().selectionManager(),disabled:l},()=>t),d=h=>{a_()&&mn(h.currentTarget)};return oe(wt([()=>i.value,s],([h,f])=>{n.triggerIdsMap().set(h,f)})),b(qe,ne({as:"button",ref(h){var f=ut(p=>t=p,i.ref);typeof f=="function"&&f(h)},get id(){return s()},role:"tab",get tabIndex(){return Fe(()=>!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 Fe(()=>!!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 Ct([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return Ct([i.onPointerUp,u.onPointerUp])},get onClick(){return Ct([i.onClick,u.onClick,d])},get onKeyDown(){return Ct([i.onKeyDown,u.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,u.onMouseDown])},get onFocus(){return Ct([i.onFocus,u.onFocus])}},o))}var lh=Object.assign(qN,{Content:HN,Indicator:BN,List:VN,Trigger:WN}),N2e=ee("<div data-slot=tabs-trigger-wrapper>"),z2e=ee("<div data-slot=tabs-trigger-close-button>"),j2e=ee("<div data-slot=tabs-section-title>");function F2e(e){const[t,n]=ue(e,["class","classList","variant","orientation"]);return b(lh,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 U2e(e){const[t,n]=ue(e,["class","classList"]);return b(lh.List,ne(n,{"data-slot":"tabs-list",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function H2e(e){const[t,n]=ue(e,["class","classList","classes","children","closeButton","hideCloseButton","onMiddleClick"]);return(()=>{var r=N2e();return r.addEventListener("auxclick",i=>{i.button===1&&t.onMiddleClick&&(i.preventDefault(),t.onMiddleClick())}),r.$$mousedown=i=>{i.button===1&&t.onMiddleClick&&i.preventDefault()},F(r,b(lh.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),F(r,b(fe,{get when(){return t.closeButton},keyed:!0,children:i=>(()=>{var o=z2e();return F(o,i),Me(()=>Je(o,"data-hidden",t.hideCloseButton)),o})()}),null),Me(i=>{var o=e.value,s={...t.classList,[t.class??""]:!!t.class};return o!==i.e&&Je(r,"data-value",i.e=o),i.t=Et(r,s,i.t),i},{e:void 0,t:void 0}),r})()}function B2e(e){const[t,n]=ue(e,["class","classList","children"]);return b(lh.Content,ne(n,{"data-slot":"tabs-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const V2e=e=>(()=>{var t=j2e();return F(t,()=>e.children),t})(),Ro=Object.assign(F2e,{List:U2e,Trigger:H2e,Content:B2e,SectionTitle:V2e});mr(["mousedown"]);var q2e=ee("<span class=text-text-invert-weak>v"),W2e=ee('<span class="flex items-center gap-2"><span>'),G2e=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>'),K2e=ee("<span>v"),Z2e=ee('<div class="flex flex-row gap-3"><span>'),Y2e=ee("<span class=text-text-weak>"),X2e=ee("<span class=text-text-weaker>"),J2e=ee("<span class=text-text-weak>••••••••"),Q2e=ee("<div>");function ewe(e){const t=Rt(),[n,r]=he(!1);let i,o;const s=U(()=>jp(e.conn)),a=()=>{const u=i?i.scrollWidth>i.clientWidth:!1,d=o?o.scrollWidth>o.clientWidth:!1;r(u||d)};oe(()=>{s(),e.conn.http.url,e.status?.version,queueMicrotask(a)}),en(()=>{typeof ResizeObserver=="function"&&(M5([i,o],a),a())});const l=()=>(()=>{var u=W2e(),d=u.firstChild;return F(d,()=>jp(e.conn,!0)),F(u,b(fe,{get when(){return e.status?.version},get children(){var h=q2e();return h.firstChild,F(h,()=>e.status?.version,null),h}}),null),u})(),c=El(()=>e.badge);return b(In,{class:"flex-1 min-w-0",get value(){return l()},contentStyle:{"max-width":"none","white-space":"nowrap"},placement:"top-start",get inactive(){return Fe(()=>!n())()&&!e.conn.displayName},get children(){var u=G2e(),d=u.firstChild,h=d.firstChild,f=h.firstChild,p=i;return typeof p=="function"?Sr(p,f):i=f,F(f,s),F(h,b(fe,{get when(){return c()},keyed:!0,get fallback(){return b(fe,{get when(){return e.status?.version},get children(){var m=K2e();m.firstChild;var g=o;return typeof g=="function"?Sr(g,m):o=m,F(m,()=>e.status?.version,null),Me(()=>Ko(m,`${e.versionClass??"text-text-weak text-14-regular truncate"} min-w-0`)),m}})},children:m=>m}),null),F(d,b(fe,{get when(){return Fe(()=>!!(e.showCredentials&&e.conn.type==="http"))()&&e.conn},keyed:!0,children:m=>(()=>{var g=Z2e(),v=g.firstChild;return F(v,(()=>{var y=Fe(()=>!!m.http.username);return()=>y()?(()=>{var w=Y2e();return F(w,()=>m.http.username),w})():(()=>{var w=X2e();return F(w,()=>t.t("server.row.noUsername")),w})()})()),F(g,(()=>{var y=Fe(()=>!!m.http.password);return()=>y()&&J2e()})(),null),g})()}),null),F(u,()=>e.children,null),Me(m=>{var g=e.class,v=!!e.dimmed,y=`${e.nameClass??"truncate"} min-w-0`;return g!==m.e&&Ko(u,m.e=g),v!==m.t&&u.classList.toggle("opacity-50",m.t=v),y!==m.a&&Ko(f,m.a=y),m},{e:void 0,t:void 0,a:void 0}),u}})}function twe(e){return(()=>{var t=Q2e();return Me(n=>Et(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 nwe=ee('<code class="bg-surface-raised-base px-1.5 py-0.5 rounded-sm text-text-base">'),x0=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">'),rwe=ee('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),iwe=ee("<div class=flex-1>"),owe=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">'),swe=ee('<span class="text-11-regular text-text-base bg-surface-base px-1.5 py-0.5 rounded-sm">'),gy=ee('<div class="text-14-regular text-text-base text-center my-auto">'),awe=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>'),lwe=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">'),cwe=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 uwe=1e4,dwe=(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:Fe(()=>n.map(r=>t.includes(r)?(()=>{var i=nwe();return F(i,r),i})():r))},fwe=e=>{if(!e.startsWith("file://"))return e;const t=e.split("/").at(-1);return t?decodeURIComponent(t):e},hwe=(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(gn.key(o)===t)return-1;if(gn.key(s)===t)return 1;const a=i(n[gn.key(o)])-i(n[gn.key(s)]);return a!==0?a:(r.get(o)??0)-(r.get(s)??0)})},pwe=(e,t)=>{const n=w4(),[r,i]=et({});return oe(()=>{if(!t()){i($t({}));return}const o=e();let s=!1;const a=async()=>{const c={};await Promise.all(o.map(async u=>{c[gn.key(u)]=await n(u.http)})),!s&&i($t(c))};a();const l=setInterval(()=>void a(),uwe);pe(()=>{s=!0,clearInterval(l)})}),r},mwe=e=>{const[t,n]=et({url:void 0,tick:0});return oe(()=>{t.tick;let r=!1;const i=e?.();if(!i){n("url",void 0),pe(()=>{r=!0});return}if(i instanceof Promise){i.then(o=>{if(r)return;const s=o?zp(o):void 0;n("url",s??o??void 0)}),pe(()=>{r=!0});return}n("url",zp(i)??i),pe(()=>{r=!0})}),{key:()=>{const r=t.url;if(r)return gn.key({type:"http",http:{url:r}})},refresh:()=>n("tick",r=>r+1)}},gwe=()=>{const e=l5(),t=jO(),n=or(),r=Qi(),i=Rt(),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 Pd(()=>({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=>{Ot({variant:"error",title:i.t("common.requestFailed"),description:c instanceof Error?c.message:String(c)})}}))};function vwe(e){const t=l5(),n=or(),r=gr(),i=Xi(),o=To(),s=Rt(),a=Eo(),l=jO(),c=Qi(),u=U(()=>t?.data??n.data),d=W=>t?t.set("mcp",W):n.set("mcp",W),h=W=>t?t.set("mcp_ready",W):n.set("mcp_ready",W),f=W=>t?t.set("lsp",W):n.set("lsp",W),p=W=>t?t.set("lsp_ready",W):n.set("lsp_ready",W),m=()=>l?.client??c.client,[g,v]=et({lspDone:!1,lspLoading:!1,mcpDone:!1,mcpLoading:!1}),y=W=>{Ot({variant:"error",title:s.t("common.requestFailed"),description:W instanceof Error?W.message:String(W)})};oe(()=>{if(!e.shown())return;const W=u();!W.mcp_ready&&!g.mcpDone&&!g.mcpLoading&&(v("mcpLoading",!0),m().mcp.status().then(N=>{d(N.data??{}),h(!0)}).catch(N=>{v("mcpDone",!0),y(N)}).finally(()=>{v("mcpLoading",!1)})),!W.lsp_ready&&!g.lspDone&&!g.lspLoading&&(v("lspLoading",!0),m().lsp.status().then(N=>{f(N.data??[]),p(!0)}).catch(N=>{v("lspDone",!0),y(N)}).finally(()=>{v("lspLoading",!1)}))});let w=0,k=!1;pe(()=>{k=!0,w+=1});const x=U(()=>{const W=r.current,N=r.list;return W?N.every(V=>gn.key(V)!==gn.key(W))?[W,...N]:[W,...N.filter(V=>gn.key(V)!==gn.key(W))]:N}),C=U(()=>!!i.desktop),S=U(()=>C()||!t),I=pwe(x,()=>e.shown()&&C()),M=U(()=>hwe(x(),r.key,I)),D=gwe(),$=mwe(()=>i.getDefaultServer?.()),E=W=>i.serverManager?.instances.find(N=>N.key===W),A=U(()=>Object.keys(u().mcp??{}).sort((W,N)=>W.localeCompare(N))),T=W=>u().mcp?.[W]?.status,R=U(()=>u().lsp??[]),G=U(()=>(u().config.plugin??[]).map(W=>typeof W=="string"?W:W[0])),K=U(()=>dwe(s.t("dialog.plugins.empty"),["codeplane.jsonc","config/plugins"])),q=U(()=>S()?"servers":"mcp");return(()=>{var W=rwe();return F(W,b(Ro,{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 q()},get defaultValue(){return q()},variant:"alt",get children(){return[b(Ro.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 pt-2 pb-0 gap-4 h-10",get children(){return[b(fe,{get when(){return S()},get children(){return b(Ro.Trigger,{value:"servers","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.servers")}})}}),b(fe,{get when(){return u()},get children(){return[b(Ro.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.mcp")}}),b(Ro.Trigger,{value:"lsp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.lsp")}}),b(Ro.Trigger,{value:"plugins","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.plugins")}})]}})]}}),b(fe,{get when(){return S()},get children(){return b(Ro.Content,{value:"servers",get children(){var N=x0(),V=N.firstChild;return F(V,b(Wt,{get each(){return M()},children:J=>{const ie=gn.key(J),re=()=>I[ie]?.healthy===!1;return(()=>{var ve=owe();return ve.$$click=()=>{if(re())return;const ce=E(ie);if(ce){i.serverManager?.open(ce.id);return}a("/"),queueMicrotask(()=>r.setActive(ie))},F(ve,b(twe,{get health(){return I[ie]}}),null),F(ve,b(ewe,{conn:J,get dimmed(){return re()},get status(){return I[ie]},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(fe,{get when(){return ie===$.key()},get children(){var ce=swe();return F(ce,()=>s.t("common.default")),ce}})},get children(){return[iwe(),b(fe,{get when(){return Fe(()=>!!r.current)()&&ie===gn.key(r.current)},get children(){return b(Gt,{name:"check",size:"small",class:"text-icon-weak shrink-0"})}})]}}),null),Me(ce=>{var ae={"hover:bg-surface-raised-base-hover":!re(),"cursor-not-allowed":re()},Ce=re();return ce.e=Et(ve,ae,ce.e),Ce!==ce.t&&Je(ve,"aria-disabled",ce.t=Ce),ce},{e:void 0,t:void 0}),ve})()}}),null),F(V,b(Qt,{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;j(()=>import("./dialog-select-server-3yVZhthq.js"),__vite__mapDeps([97,98])).then(ie=>{k||w!==J||o.show(()=>b(ie.DialogSelectServer,{}),$.refresh)})},get children(){return s.t("status.popover.action.manageServers")}}),null),N}})}}),b(fe,{get when(){return u()},get children(){return[b(Ro.Content,{value:"mcp",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return A().length>0},get fallback(){return(()=>{var J=gy();return F(J,()=>s.t("dialog.mcp.empty")),J})()},get children(){return b(Wt,{get each(){return A()},children:J=>{const ie=()=>T(J),re=()=>ie()==="connected";return(()=>{var ve=awe(),ce=ve.firstChild,ae=ce.nextSibling,Ce=ae.nextSibling;return ve.$$click=()=>{D.isPending||D.mutate(J)},F(ae,J),Ce.$$click=_e=>_e.stopPropagation(),F(Ce,b(D2e,{get checked(){return re()},get disabled(){return Fe(()=>!!D.isPending)()&&D.variables===J},onChange:()=>{D.isPending||D.mutate(J)}})),Me(_e=>{var We=D.isPending&&D.variables===J,_t={"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":ie()==="connected","bg-icon-critical-base":ie()==="failed","bg-border-weak-base":ie()==="disabled","bg-icon-warning-base":ie()==="needs_auth"||ie()==="needs_client_registration"};return We!==_e.e&&(ve.disabled=_e.e=We),_e.t=Et(ce,_t,_e.t),_e},{e:void 0,t:void 0}),ve})()}})}})),N}}),b(Ro.Content,{value:"lsp",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return R().length>0},get fallback(){return(()=>{var J=gy();return F(J,()=>s.t("dialog.lsp.empty")),J})()},get children(){return b(Wt,{get each(){return R()},children:J=>(()=>{var ie=lwe(),re=ie.firstChild,ve=re.nextSibling;return F(ve,()=>J.name||J.id),Me(ce=>Et(re,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":J.status==="connected","bg-icon-critical-base":J.status==="error"},ce)),ie})()})}})),N}}),b(Ro.Content,{value:"plugins",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return G().length>0},get fallback(){return(()=>{var J=gy();return F(J,K),J})()},get children(){return b(Wt,{get each(){return G()},children:J=>(()=>{var ie=cwe(),re=ie.firstChild,ve=re.nextSibling;return Je(ve,"title",J),F(ve,()=>fwe(J)),ie})()})}})),N}})]}})]}})),W})()}mr(["click"]);var ywe=ee('<div class="relative size-4"><div class="badge-mask-tight size-4 flex items-center justify-center"></div><div>'),bwe=ee("<div data-slot=popover-body>");function wwe(){const e=Rt(),t=gr(),n=l5(),r=or(),[i,o]=he(!1),s=U(()=>n?.data??r.data),a=U(()=>t.healthy()===!1||s().mcp_ready),l=U(()=>{const c=t.healthy()===!0,d=Object.values(s().mcp??{}).some(h=>h.status!=="connected"&&h.status!=="disabled");return c&&!d});return b(Cd,{get open(){return i()},onOpenChange:o,gutter:4,placement:"bottom-end",shift:-168,modal:!1,get children(){return[b(Cd.Trigger,{as:Qt,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=ywe(),u=c.firstChild,d=u.nextSibling;return F(u,b(Gt,{get name(){return i()?"status-active":"status"},size:"small"})),Me(h=>Et(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(Cd.Portal,{get children(){return b(Cd.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=bwe();return F(c,b(fe,{get when(){return i()},get children(){return b(vwe,{shown:i})}})),c}})}})]}})}var kwe=ee('<div class="flex items-center shrink-0 w-8"><div class=transition-opacity>'),xwe=ee('<div class="titlebar-cluster flex items-center gap-0.5 rounded-lg p-0.5">'),Swe=ee('<div class="flex items-center gap-1 shrink-0"data-no-window-drag>'),_we=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 Cwe(){const e=Hl(),t=tA(),n=Rt(),r=Xi();yu();const i=Eo(),o=Ao(),s=ui(),[a,l]=et({stack:[],index:0,action:void 0}),c=()=>`${o.pathname}${o.search}${o.hash}`,u=U(()=>o.pathname==="/"||o.pathname==="/notifications"),d=U(()=>!s.dir||s.id?!1:o.pathname.replace(/\/+$/,"").split("/").at(-1)==="session");oe(()=>{const S=c();ct(()=>{const I=x2e(a,S);I!==a&&l(I)})});const h=U(()=>a.index>0),f=U(()=>a.index<a.stack.length-1),p=U(()=>e.projects.list().length>0),m=U(()=>!0),g=U(()=>r.desktop&&r.os==="macos"),v=typeof window<"u"?window.codeplaneDesktop?.window:void 0,[y,w]=he(!!v?.state?.fullscreen);if(v?.onStateChange){const S=v.onStateChange(I=>w(!!I.fullscreen));pe(()=>S())}const k=U(()=>g()&&!y()),x=()=>{const S=C2e(a);S&&(l(S.state),i(S.to))},C=()=>{const S=I2e(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=_we(),I=S.firstChild,M=I.firstChild,D=M.firstChild,O=D.nextSibling,$=O.firstChild,E=$.firstChild,A=E.firstChild,T=I.nextSibling,R=T.nextSibling,G=R.firstChild;return F(D,b(oi,{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()}})),F(O,b(fe,{get when(){return!u()},get children(){return b(c9,{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(Qt,{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-expanded"(){return e.sidebar.opened()},get children(){return b(Gt,{size:"small",get name(){return e.sidebar.opened()?"sidebar-active":"sidebar"}})}})}})}}),$),F($,b(fe,{get when(){return s.dir},get children(){var K=kwe(),q=K.firstChild;return F(q,b(c9,{placement:"bottom",get title(){return n.t("command.session.new")},get keybind(){return t.keybind("session.new")},openDelay:2e3,get children(){return b(Qt,{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}})}})),Me(W=>{var N=e.sidebar.opened()?"true":void 0,V={"opacity-100 duration-120 ease-out":!e.sidebar.opened(),"opacity-0 duration-120 ease-in delay-0 pointer-events-none":e.sidebar.opened()};return N!==W.e&&Je(K,"aria-hidden",W.e=N),W.t=Et(q,V,W.t),W},{e:void 0,t:void 0}),K}}),E),F(E,b(fe,{get when(){return r.desktop||p()&&m()},get children(){var K=xwe();return F(K,b(fe,{get when(){return r.desktop},get children(){return b(In,{placement:"bottom",get value(){return n.t("command.server.switch")},openDelay:2e3,get children(){return b(Qt,{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),F(K,b(fe,{get when(){return Fe(()=>!!p())()&&m()},get children(){return[b(In,{placement:"bottom",get value(){return n.t("common.goBack")},openDelay:2e3,get children(){return b(Qt,{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(In,{placement:"bottom",get value(){return n.t("common.goForward")},openDelay:2e3,get children(){return b(Qt,{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),F(E,()=>null,null),Et(R,{"flex items-center min-w-0 justify-end":!0,"pr-2":!0}),F(R,b(k2e,{class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md mr-1"}),G),F(R,b(fe,{get when(){return r.desktop},get children(){var K=Swe();return F(K,b(wwe,{})),K}}),null),Me(K=>{var q=!!r.desktop,W=!r.desktop,N=g()?"macos":void 0,V=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()},ie={"-translate-x-[40px]":e.sidebar.opened()&&!!s.dir,"duration-180 ease-out":!e.sidebar.opened(),"duration-180 ease-in":e.sidebar.opened()};return q!==K.e&&S.classList.toggle("h-11",K.e=q),W!==K.t&&S.classList.toggle("h-10",K.t=W),N!==K.a&&Je(S,"data-desktop-titlebar",K.a=N),V!==K.o&&Je(S,"data-platform-desktop",K.o=V),K.i=Et(I,J,K.i),K.n=Et(E,ie,K.n),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),S})()}function GN(e){return e.match(/^\[Cron\]\s*(.+)$/)?.[1]?.trim()}function O5(e){return e?!!e.cronRunID||!!GN(e.title):!1}function Iwe(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=>$l(l,a.directory))).filter(a=>!n.has(a.id)).map(a=>({session:a,taskName:GN(a.title)})).filter(a=>O5(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 Ve=Sa;function Jg(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 $we=(e,t)=>$l(t,e.directory),Twe=(e,t)=>!t||!e.projectID||e.projectID===t,Ewe=(e,t,n)=>Twe(e,n)&&t.some(r=>$we(e,r))&&!e.parentID&&!e.time?.archived&&!O5(e),KN=(e,t)=>{const n=[t,e.path.directory].filter(r=>!!r).filter((r,i,o)=>o.findIndex(s=>Sa(s)===Sa(r))===i);return(e.session??[]).filter(r=>Ewe(r,n,e.project))},kf=(e,t,n)=>KN(e,n).sort(Jg(t)),Awe=(e,t,n)=>(e??[]).filter(r=>r.parentID===t&&!r.time?.archived).sort(Jg(n)),ZN=(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(Jg(t))),n},YN=e=>(e??[]).filter(t=>!t.parentID&&!t.time?.archived).length,XN=e=>e.loadedRootCount<e.total&&e.visible<e.total;function Lwe(e){if(!e.project)return[];if(!e.workspacesEnabled)return[e.currentDirectory||e.project.worktree];const t=e.currentDirectory?Ve(e.currentDirectory):void 0,n=Ve(e.project.worktree);return e.workspaces.filter(r=>{const i=Ve(r);return(e.expanded?.[r]??e.expanded?.[i]??i===n)||i===t})}const v9=(e,t)=>e.flatMap(n=>KN(n)).sort(Jg(t))[0];function Dwe(e,t=()=>!0){return Object.values(e??{}).some(n=>n?.some(t))}const P5=e=>e.name||dr(e.worktree),vy=(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},S0=(e,t,n)=>{const r=Ve(e),i=new Map;for(const s of t){const a=Ve(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=Ve(s);if(a===r)continue;const l=i.get(a);l&&(o.push(l),i.delete(a))}return[...o,...i.values()]},Mwe="codeplane:deep-link",JN=e=>{if(e.startsWith("codeplane://")&&!(typeof URL.canParse=="function"&&!URL.canParse(e)))try{return new URL(e)}catch{return}},Owe=e=>{const t=JN(e);if(!t||t.hostname!=="open-project")return;const n=t.searchParams.get("directory");if(n)return n},Pwe=e=>{const t=JN(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}},Rwe=e=>e.map(Owe).filter(t=>!!t),Nwe=e=>e.map(Pwe).filter(t=>!!t),zwe=e=>{const t=e.__CODEPLANE__?.deepLinks??[];return t.length===0?[]:(e.__CODEPLANE__&&(e.__CODEPLANE__.deepLinks=[]),t)};var jwe=ee("<input data-component=inline-input>");function Fwe(e){const[t,n]=ue(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=jwe();return Wr(i,ne({get class(){return t.class},get style(){return r()}},n),!1,!1),i})()}var Uwe=ee("<span>");function Hwe(){const[e,t]=et({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;pe(()=>{u!==void 0&&cancelAnimationFrame(u)});const d=()=>c.editing??n(c.id),h=()=>c.stopPropagation??!1,f=()=>c.openOnDblClick??!0,p=g=>{h()&&g.stopPropagation()},m=g=>{f()&&(p(g),i(c.id,c.value()))};return b(fe,{get when(){return d()},get fallback(){return(()=>{var g=Uwe();return g.$$touchstart=p,g.$$click=p,g.$$mousedown=p,g.$$pointerdown=p,g.$$dblclick=m,F(g,()=>c.value()),Me(()=>Ko(g,c.displayClass??c.class)),g})()},get children(){return b(Fwe,{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:p,onClick:p,onDblClick:p,onMouseDown:p,onMouseUp:p,onTouchStart:p})}})}}}mr(["dblclick","pointerdown","mousedown","click","touchstart"]);var Bwe={};Cr(Bwe,{Collapsible:()=>Qg,Content:()=>ez,Root:()=>tz,Trigger:()=>nz,useCollapsibleContext:()=>R5});var QN=yt();function R5(){const e=pt(QN);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function ez(e){const[t,n]=he(),r=R5(),i=ze({id:r.generateId("content")},e),[o,s]=ue(i,["ref","id","style"]),{present:a}=xo({show:r.shouldMount,element:()=>t()??null}),[l,c]=he(0),[u,d]=he(0);let f=r.isOpen()||a();return en(()=>{const p=requestAnimationFrame(()=>{f=!1});pe(()=>{cancelAnimationFrame(p)})}),oe(wt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),f||(t().style.transitionDuration="",t().style.animationName="")})),oe(wt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>pe(r.registerContentId(o.id))),b(fe,{get when(){return a()},get children(){return b(qe,ne({as:"div",ref(p){var m=ut(n,o.ref);typeof m=="function"&&m(p)},get id(){return o.id},get style(){return _r({"--kb-collapsible-content-height":l()?`${l()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>r.dataset(),s))}})}function tz(e){const t=`collapsible-${fn()}`,n=ze({id:t},e),[r,i]=ue(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=he(),a=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:u=>r.onOpenChange?.(u)}),l=U(()=>({"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:Nr(()=>i.id),registerContentId:an(s)};return b(QN.Provider,{value:c,get children(){return b(qe,ne({as:"div"},l,i))}})}function nz(e){const t=R5(),[n,r]=ue(e,["onClick"]);return b(rs,ne({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Fe(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:o=>{je(o,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Qg=Object.assign(tz,{Content:ez,Trigger:nz}),Vwe=ee("<div data-slot=collapsible-arrow><span data-slot=collapsible-arrow-icon>");function qwe(e){const[t,n]=ue(e,["class","classList","variant"]);return b(Qg,ne({"data-component":"collapsible",get"data-variant"(){return t.variant||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n))}function Wwe(e){return b(Qg.Trigger,ne({"data-slot":"collapsible-trigger"},e))}function Gwe(e){return b(Qg.Content,ne({"data-slot":"collapsible-content"},e))}function Kwe(e){return(()=>{var t=Vwe(),n=t.firstChild;return Wr(t,e||{},!1,!0),F(n,b(Gt,{name:"chevron-down",size:"small"})),t})()}const yy=Object.assign(qwe,{Arrow:Kwe,Trigger:Wwe,Content:Gwe});var Zwe=ee("<svg>"),Ywe=ee("<svg><rect width=3 height=3 rx=1></svg>",!1,!0,!1);const Xwe=new Set([1,2,4,7,8,11,13,14]),Jwe=new Set([0,3,12,15]),Qwe=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:Xwe.has(t),corner:Jwe.has(t)}));function e1(e){return(()=>{var t=Zwe();return Wr(t,ne(e,{viewBox:"0 0 15 15","data-component":"spinner",get classList(){return{...e.classList,[e.class??""]:!!e.class}},fill:"currentColor"}),!0,!0),F(t,b(Wt,{each:Qwe,children:n=>(()=>{var r=Ywe();return Me(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&&Je(r,"x",i.e=o),s!==i.t&&Je(r,"y",i.t=s),a!==i.a&&ii(r,"opacity",i.a=a),l!==i.o&&ii(r,"animation",i.o=l),c!==i.i&&ii(r,"animation-fill-mode",i.i=c),u!==i.n&&ii(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 e4e=ee("<div>"),t4e=ee("<img data-slot=avatar-image>");const y9=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function n4e(e){return e?y9?y9.segment(e)[Symbol.iterator]().next().value?.segment??Array.from(e)[0]??"":Array.from(e)[0]??"":""}function r4e(e){const[t,n]=ue(e,["fallback","src","background","foreground","size","class","classList","style"]),r=t.src;return(()=>{var i=e4e();return Wr(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),F(i,b(fe,{when:r,keyed:!0,get fallback(){return n4e(t.fallback)},children:o=>(()=>{var s=t4e();return Je(s,"src",o),Je(s,"draggable",!1),s})()})),i})()}const b9={ask:"var(--icon-agent-ask-base)",build:"var(--icon-agent-build-base)",docs:"var(--icon-agent-docs-base)",plan:"var(--icon-agent-plan-base)"},w9=["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 i4e(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)>>>0;return w9[t%w9.length]}function o4e(e,t){return t||(b9[e]??b9[e.toLowerCase()]??i4e(e.toLowerCase()))}function s4e(e,t){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(!(r.role!=="user"||!r.agent))return o4e(r.agent,t.find(i=>i.name===r.agent)?.color)}}const a4e=/^(New session|Child session) - \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function rz(e){return e&&(e.match(a4e)?.[1]??e)}function iz(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 l4e(e,t,n,r){return iz(e,t,n,r)}function b3e(e,t,n,r){return iz(e,t,n,r)}const c4e=e=>e.type==="text"&&!e.synthetic&&!e.ignored,u4e=e=>e.role==="user",d4e=e=>e.role==="assistant",_0=(e,t)=>t?e.time.created!==t.time.created?e.time.created>t.time.created:e.id>t.id:!0;function f4e(e){if(!e.messages)return e.working?{loading:!1,thinking:!0}:{loading:!0};let t,n,r;for(const o of e.messages)u4e(o)&&_0(o,t)&&(t=o);for(const o of e.messages)if(d4e(o)){if(!t){_0(o,n)&&(n=o);continue}o.parentID===t.id&&_0(o,n)&&(n=o),o.time.created>=t.time.created&&_0(o,r)&&(r=o)}n=n??r;const i=t?(e.parts[t.id]??[]).filter(c4e).map(o=>o.text).join(`
|
|
2444
|
+
${t}`,kN=(e,t,n)=>{for(e.delete(t),e.set(t,n);e.size>u2e;){const r=e.keys().next().value;if(r===void 0)return;e.delete(r)}},d2e=(e,t,n)=>{const r=Zg(e,t),i=wf.session.get(r)??{prompt:"",files:{}};kN(wf.session,r,{...i,...n})},m3e=(e,t)=>wf.session.get(Zg(e,t)),g3e=(e,t,n)=>{kN(wf.terminal,Zg(e,t),n)},v3e=(e,t)=>wf.terminal.get(Zg(e,t)),f2e=e=>typeof e!="object"||e===null?!1:"draggable"in e,am=e=>{if(!f2e(e))return;const t=e.draggable;if(t)return typeof t.id=="string"?t.id:void 0},h2e=(e,t)=>({id:e,order:100,callback:n=>t==="x"?{...n,x:0}:{...n,y:0}}),xN=(e,t)=>()=>{const n=Wl();if(!n)return null;const[,{onDragStart:r,onDragEnd:i,addTransformer:o,removeTransformer:s}]=n,a=h2e(t,e),l=Wn(c=>(r(u=>{const d=am(u);d&&o("draggables",d,a)}),i(u=>{const d=am(u);d&&s("draggables",d,a.id)}),c));return pe(l),null},SN=xN("x","constrain-x-axis"),y3e=xN("y","constrain-y-axis");var p2e=ee('<div><div class="text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70"></div><div>'),m2e=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 py=5e3,g2e=(e,t=0)=>{if(!(e===void 0||Number.isNaN(e)))return`${e.toFixed(t)}ms`},ad=e=>{if(!(e===void 0||Number.isNaN(e)))return`${Math.round(e)}`},p9=e=>{if(e===void 0||Number.isNaN(e))return;const t=e/1024/1024;return`${t>=1024?t.toFixed(0):t.toFixed(1)}MB`},ys=(e,t,n=!1)=>e===void 0||Number.isNaN(e)?!1:n?e<t:e>t,my=e=>e.includes("/session");function bs(e){return b(In,{get value(){return e.tip},placement:"top",get children(){var t=p2e(),n=t.firstChild,r=n.nextSibling;return F(n,()=>e.label),F(r,()=>e.value),Me(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=Et(t,o,i.e),i.t=Et(r,s,i.t),i},{e:void 0,t:void 0}),t}})}function v2e(){const e=Rt(),t=Ao(),n=Kre(),[r,i]=et({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 m=s();return m===void 0?o():`${Math.round(m*100)}%`},l=()=>r.long.count===void 0?o():`${ad(r.long.block)??o()}/${r.long.count}`,c=()=>r.nav.pending?"...":ad(r.nav.dur)??o();let u="",d=0,h=!1,f=0,p=0;return oe(()=>{const m=n(),g=`${t.pathname}${t.search}`;if(!h){h=!0,u=g;return}if(m){if(f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),f=0,p=0,d!==0)return;d=performance.now(),my(u)&&i("nav",{dur:void 0,pending:!0});return}if(d===0){u=g;return}const v=d,y=u;d=0,u=g,(my(y)||my(g))&&(f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),f=requestAnimationFrame(()=>{f=0,p=requestAnimationFrame(()=>{p=0,i("nav",{dur:performance.now()-v,pending:!1})})}))}),en(()=>{const m=[],g=[],v=[],y=new Map;let w=!1,k,x=0,C=0,S=0;const I=(q,W,N)=>{for(;q[0]&&N-q[0].at>W;)q.shift()},M=q=>{I(g,py,q);const W=g.reduce((J,ie)=>J+ie.dur,0),N=g.reduce((J,ie)=>Math.max(J,ie.dur),0),V=g.filter(J=>J.dur>32).length;Qe(()=>{i("fps",W>0?g.length*1e3/W:void 0),i("gap",N>0?N:void 0),i("jank",V)})},D=(q=performance.now())=>{if(!w)return;I(v,py,q);const W=v.reduce((V,J)=>V+Math.max(0,J.dur-50),0),N=v.reduce((V,J)=>Math.max(V,J.dur),0);i("long",{block:W,count:v.length,max:N})},O=(q=performance.now())=>{for(const[V,J]of y)q-J.at>py&&y.delete(V);let W=0,N=0;for(const V of y.values())W=Math.max(W,V.delay),N=Math.max(N,V.dur);Qe(()=>{i("delay",W>0?W:void 0),i("inp",N>0?N:void 0)})},$=()=>{const q=performance.memory;q&&i("heap",{limit:q.jsHeapSizeLimit,used:q.usedJSHeapSize})},E=()=>{g.length=0,v.length=0,y.clear(),C=0,S=0,Qe(()=>{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=(q,W,N)=>{if(typeof PerformanceObserver>"u"||!(PerformanceObserver.supportedEntryTypes??[]).includes(q))return!1;const V=new PerformanceObserver(J=>N(J.getEntries()));try{return V.observe(W),m.push(V),!0}catch{return V.disconnect(),!1}};A("layout-shift",{buffered:!0,type:"layout-shift"},q=>{const W=q.reduce((N,V)=>{const J=V;return J.hadRecentInput?N:N+J.value},0);W!==0&&i("cls",N=>(N??0)+W)})&&i("cls",0),A("longtask",{buffered:!0,type:"longtask"},q=>{const W=performance.now();v.push(...q.map(N=>({at:N.startTime,dur:N.duration}))),D(W)})&&(w=!0,i("long",{block:0,count:0,max:0})),A("event",{buffered:!0,durationThreshold:16,type:"event"},q=>{for(const W of q){const N=W;if(N.duration<16)continue;const V=N.interactionId&&N.interactionId>0?N.interactionId:`${N.name}:${Math.round(N.startTime)}`,J=y.get(V),ie=Math.max(0,(N.processingStart??N.startTime)-N.startTime);if(y.set(V,{at:N.startTime,delay:Math.max(J?.delay??0,ie),dur:Math.max(J?.dur??0,N.duration)}),y.size<=200)continue;const re=y.keys().next().value;re!==void 0&&y.delete(re)}O()});const T=q=>{if(document.visibilityState!=="visible"){x=0;return}if(C===0){C=q,x=requestAnimationFrame(T);return}g.push({at:q,dur:q-C}),C=q,q-S>=250&&(S=q,M(q)),x=requestAnimationFrame(T)},R=()=>{x!==0&&cancelAnimationFrame(x),x=0,k!==void 0&&(clearInterval(k),k=void 0)},G=()=>{document.visibilityState==="visible"&&(k===void 0&&(k=window.setInterval(()=>{D(),O(),$()},1e3)),x===0&&(x=requestAnimationFrame(T)))},K=()=>{if(document.visibilityState!=="visible"){R();return}E(),G()};$(),G(),zn(document,"visibilitychange",K),pe(()=>{f!==0&&cancelAnimationFrame(f),p!==0&&cancelAnimationFrame(p),R();for(const q of m)q.disconnect()})}),(()=>{var m=m2e(),g=m.firstChild;return F(g,b(bs,{get label(){return e.t("debugBar.nav.label")},get tip(){return e.t("debugBar.nav.tip")},get value(){return c()},get bad(){return ys(r.nav.dur,400)},get dim(){return Fe(()=>r.nav.dur===void 0)()&&!r.nav.pending}}),null),F(g,b(bs,{get label(){return e.t("debugBar.fps.label")},get tip(){return e.t("debugBar.fps.tip")},get value(){return Fe(()=>r.fps===void 0)()?o():`${Math.round(r.fps)}`},get bad(){return ys(r.fps,50,!0)},get dim(){return r.fps===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.frame.label")},get tip(){return e.t("debugBar.frame.tip")},get value(){return ad(r.gap)??o()},get bad(){return ys(r.gap,50)},get dim(){return r.gap===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.jank.label")},get tip(){return e.t("debugBar.jank.tip")},get value(){return Fe(()=>r.jank===void 0)()?o():`${r.jank}`},get bad(){return ys(r.jank,8)},get dim(){return r.jank===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.long.label")},get tip(){return e.t("debugBar.long.tip",{max:g2e(r.long.max)??o()})},get value(){return l()},get bad(){return ys(r.long.block,200)},get dim(){return r.long.count===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.delay.label")},get tip(){return e.t("debugBar.delay.tip")},get value(){return ad(r.delay)??o()},get bad(){return ys(r.delay,100)},get dim(){return r.delay===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.inp.label")},get tip(){return e.t("debugBar.inp.tip")},get value(){return ad(r.inp)??o()},get bad(){return ys(r.inp,200)},get dim(){return r.inp===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.cls.label")},get tip(){return e.t("debugBar.cls.tip")},get value(){return Fe(()=>r.cls===void 0)()?o():r.cls.toFixed(2)},get bad(){return ys(r.cls,.1)},get dim(){return r.cls===void 0}}),null),F(g,b(bs,{get label(){return e.t("debugBar.mem.label")},get tip(){return Fe(()=>r.heap.used===void 0)()?e.t("debugBar.mem.tipUnavailable"):e.t("debugBar.mem.tip",{used:p9(r.heap.used)??o(),limit:p9(r.heap.limit)??o()})},get value(){return a()},get bad(){return ys(s(),.8)},get dim(){return r.heap.used===void 0},wide:!0}),null),Me(()=>Je(m,"aria-label",e.t("debugBar.ariaLabel"))),m})()}const y2e="__cp-mobile-close-button",m9="__cpMobileBackEmbedded",b2e=()=>typeof navigator!="object"||!navigator.userAgent?!1:/Codeplane\/Mobile/.test(navigator.userAgent),w2e=()=>{try{const e=window.mobileApp;if(e&&typeof e.close=="function"){e.close();return}}catch{}try{window.webkit?.messageHandlers?.close?.postMessage(null)}catch{}};function k2e(e){const[t,n]=ue(e,["visible","label","class","classList"]),r=U(()=>typeof t.visible=="boolean"?t.visible:b2e());return en(()=>{!r()||typeof window>"u"||(window[m9]=!0)}),pe(()=>{typeof window>"u"||delete window[m9]}),b(fe,{get when(){return r()},get children(){return b(In,{placement:"bottom",get value(){return t.label??"Back"},get children(){return b(Qt,ne(n,{id:y2e,variant:"ghost",icon:"chevron-left",get"aria-label"(){return t.label??"Back"},get class(){return t.class},get classList(){return t.classList},onClick:()=>w2e()}))}})}})}const A5=100;function x2e(e,t,n=A5){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}:S2e(e,t,n)}function S2e(e,t,n=A5){const r=e.stack.slice(0,e.index+1).concat(t),i=_2e(r,r.length-1,n);return{...e,...i,action:void 0}}function _2e(e,t,n=A5){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 C2e(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 I2e(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 $2e={};Cr($2e,{Anchor:()=>CN,Arrow:()=>Ai,CloseButton:()=>IN,Content:()=>$N,Description:()=>TN,Popover:()=>Cd,Portal:()=>EN,Root:()=>AN,Title:()=>LN,Trigger:()=>DN,usePopoverContext:()=>Ma});var _N=yt();function Ma(){const e=pt(_N);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function CN(e){const t=Ma(),[n,r]=ue(e,["ref"]);return b(qe,ne({as:"div",ref(i){var o=ut(t.setDefaultAnchorRef,n.ref);typeof o=="function"&&o(i)}},()=>t.dataset(),r))}function IN(e){const t=Ma(),[n,r]=ue(e,["aria-label","onClick"]);return b(rs,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{je(o,n.onClick),t.close()}},()=>t.dataset(),r))}function $N(e){let t;const n=Ma(),r=ze({id:n.generateId("content")},e),[i,o]=ue(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||mn(n.triggerRef())):(f.defaultPrevented||(a||mn(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)),jn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l&&f.preventDefault())};return wm({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),km({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),bm({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),oe(()=>pe(n.registerContentId(o.id))),b(fe,{get when(){return n.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(f){var p=ut(m=>{n.setContentRef(m),t=m},i.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Fe(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return _r({"--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 TN(e){const t=Ma(),n=ze({id:t.generateId("description")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerDescriptionId(r.id))),b(qe,ne({as:"p",get id(){return r.id}},()=>t.dataset(),i))}function EN(e){const t=Ma();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}var g9={dismiss:"Dismiss"};function AN(e){const t=`popover-${fn()}`,n=ze({id:t,modal:!1,translations:g9},e),[r,i]=ue(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[o,s]=he(),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(),v=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:C=>r.onOpenChange?.(C)}),y=()=>r.anchorRef?.()??o()??a(),{present:w}=xo({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),k=U(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),x={translations:()=>r.translations??g9,dataset:k,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??x.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:f,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:l,setContentRef:u,close:v.close,toggle:v.toggle,generateId:Nr(()=>r.id),registerContentId:an(h),registerTitleId:an(p),registerDescriptionId:an(g)};return b(_N.Provider,{value:x,get children(){return b(cs,ne({anchorRef:y,contentRef:c},i))}})}function LN(e){const t=Ma(),n=ze({id:t.generateId("title")},e),[r,i]=ue(n,["id"]);return oe(()=>pe(t.registerTitleId(r.id))),b(qe,ne({as:"h2",get id(){return r.id}},()=>t.dataset(),i))}function DN(e){const t=Ma(),[n,r]=ue(e,["ref","onClick","onPointerDown"]);return b(rs,ne({ref(s){var a=ut(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Fe(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{je(s,n.onPointerDown),s.preventDefault()},onClick:s=>{je(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Cd=Object.assign(AN,{Anchor:CN,Arrow:Ai,CloseButton:IN,Content:$N,Description:TN,Portal:EN,Title:LN,Trigger:DN}),Yg=["id","name","validationState","required","disabled","readOnly"];function Xg(e){const t=`form-control-${fn()}`,n=ze({id:t},e),[r,i]=he(),[o,s]=he(),[a,l]=he(),[c,u]=he(),d=(m,g,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&g!=null?m:void 0].filter(Boolean).join(" ")||void 0},h=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,f=U(()=>({"data-valid":me(n.validationState)==="valid"?"":void 0,"data-invalid":me(n.validationState)==="invalid"?"":void 0,"data-required":me(n.required)?"":void 0,"data-disabled":me(n.disabled)?"":void 0,"data-readonly":me(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>me(n.name)??me(n.id),dataset:f,validationState:()=>me(n.validationState),isRequired:()=>me(n.required),isDisabled:()=>me(n.disabled),isReadOnly:()=>me(n.readOnly),labelId:r,fieldId:o,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:h,generateId:Nr(()=>me(n.id)),registerLabel:an(i),registerField:an(s),registerDescription:an(l),registerErrorMessage:an(u)}}}var ih=yt();function Li(){const e=pt(ih);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Oa(e){const t=Li(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescription(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}var L5=["id","aria-label","aria-labelledby","aria-describedby"];function D5(e){const t=Li(),n=ze({id:t.generateId("field")},e);return oe(()=>pe(t.registerField(me(n.id)))),{fieldProps:{id:()=>me(n.id),ariaLabel:()=>me(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(me(n.id),me(n["aria-label"]),me(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(me(n["aria-describedby"]))}}}function oh(e){let t;const n=Li(),r=ze({id:n.generateId("label")},e),[i,o]=ue(r,["ref"]),s=If(()=>t,()=>"label");return oe(()=>pe(n.registerLabel(o.id))),b(qe,ne({as:"label",ref(a){var l=ut(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return Fe(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),o))}function sh(e,t){oe(wt(e,n=>{if(n==null)return;const r=T2e(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),pe(()=>{r.removeEventListener("reset",t)}))}))}function T2e(e){return E2e(e)?e.form:e.closest("form")}function E2e(e){return e.matches("textarea, input, select, button")}function Pa(e){const t=Li(),n=ze({id:t.generateId("error-message")},e),[r,i]=ue(n,["forceMount"]),o=()=>t.validationState()==="invalid";return oe(()=>{o()&&pe(t.registerErrorMessage(i.id))}),b(fe,{get when(){return r.forceMount||o()},get children(){return b(qe,ne({as:"div"},()=>t.dataset(),i))}})}var A2e={};Cr(A2e,{Control:()=>ON,Description:()=>PN,ErrorMessage:()=>RN,Input:()=>NN,Label:()=>zN,Root:()=>jN,Switch:()=>ia,Thumb:()=>FN,useSwitchContext:()=>Gl});var MN=yt();function Gl(){const e=pt(MN);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function ON(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("control")},e),[i,o]=ue(r,["onClick","onKeyDown"]);return b(qe,ne({as:"div",onClick:l=>{je(l,i.onClick),n.toggle(),n.inputRef()?.focus()},onKeyDown:l=>{je(l,i.onKeyDown),l.key===vm.Space&&(n.toggle(),n.inputRef()?.focus())}},()=>t.dataset(),()=>n.dataset(),o))}function PN(e){const t=Gl();return b(Oa,ne(()=>t.dataset(),e))}function RN(e){const t=Gl();return b(Pa,ne(()=>t.dataset(),e))}function NN(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("input")},e),[i,o,s]=ue(r,["ref","style","onChange","onFocus","onBlur"],L5),{fieldProps:a}=D5(o);return b(qe,ne({as:"input",ref(d){var h=ut(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 _r({...ym},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=>{je(d,i.onChange),d.stopPropagation();const h=d.target;n.setIsChecked(h.checked),h.checked=n.checked()},onFocus:d=>{je(d,i.onFocus),n.setIsFocused(!0)},onBlur:d=>{je(d,i.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function zN(e){const t=Gl();return b(oh,ne(()=>t.dataset(),e))}function jN(e){let t;const n=`switch-${fn()}`,r=ze({value:"on",id:n},e),[i,o,s]=ue(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],Yg),[a,l]=he(),[c,u]=he(!1),{formControlContext:d}=Xg(o),h=XR({isSelected:()=>i.checked,defaultIsSelected:()=>i.defaultChecked,onSelectedChange:g=>i.onChange?.(g),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});sh(()=>t,()=>h.setIsSelected(i.defaultChecked??!1));const f=g=>{je(g,i.onPointerDown),c()&&g.preventDefault()},p=U(()=>({"data-checked":h.isSelected()?"":void 0})),m={value:()=>i.value,dataset:p,checked:()=>h.isSelected(),inputRef:a,generateId:Nr(()=>me(o.id)),toggle:()=>h.toggle(),setIsChecked:g=>h.setIsSelected(g),setIsFocused:u,setInputRef:l};return b(ih.Provider,{value:d,get children(){return b(MN.Provider,{value:m,get children(){return b(qe,ne({as:"div",ref(g){var v=ut(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"group",get id(){return me(o.id)},onPointerDown:f},()=>d.dataset(),p,s,{get children(){return b(L2e,{state:m,get children(){return i.children}})}}))}})}})}function L2e(e){const t=El(()=>{const n=e.children;return _f(n)?n(e.state):n});return Fe(t)}function FN(e){const t=Li(),n=Gl(),r=ze({id:n.generateId("thumb")},e);return b(qe,ne({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var ia=Object.assign(jN,{Control:ON,Description:PN,ErrorMessage:RN,Input:NN,Label:zN,Thumb:FN});function D2e(e){const[t,n]=ue(e,["children","class","hideLabel","description"]);return b(ia,ne(n,{get class(){return t.class},"data-component":"switch",get children(){return[b(ia.Input,{"data-slot":"switch-input"}),b(fe,{get when(){return t.children},get children(){return b(ia.Label,{"data-slot":"switch-label",get classList(){return{"sr-only":t.hideLabel}},get children(){return t.children}})}}),b(fe,{get when(){return t.description},get children(){return b(ia.Description,{"data-slot":"switch-description",get children(){return t.description}})}}),b(ia.ErrorMessage,{"data-slot":"switch-error"}),b(ia.Control,{"data-slot":"switch-control",get children(){return b(ia.Thumb,{"data-slot":"switch-thumb"})}})]}}))}var M2e=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 O2e(e,t){const n=new ResizeObserver(e);return pe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function M5(e,t,n){const r=new WeakMap,{observe:i,unobserve:o}=O2e(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);oe(s=>{const a=r_(Z0(me(e)));return i_(a,s,i,o),a},[])}var P2e={};Cr(P2e,{Content:()=>HN,Indicator:()=>BN,List:()=>VN,Root:()=>qN,Tabs:()=>lh,Trigger:()=>WN,useTabsContext:()=>ah});var UN=yt();function ah(){const e=pt(UN);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function HN(e){const[t,n]=he(),r=ah(),[i,o]=ue(e,["ref","id","value","forceMount"]),[s,a]=he(0),l=()=>i.id??r.generateContentId(i.value),c=()=>r.listState().selectedKey()===i.value,{present:u}=xo({show:()=>i.forceMount||c(),element:()=>t()??null});return oe(wt([()=>t(),()=>u()],([d,h])=>{if(d==null||!h)return;const f=()=>{const m=d_(d,{tabbable:!0});a(m.nextNode()?void 0:0)};f();const p=new MutationObserver(f);p.observe(d,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),pe(()=>{p.disconnect()})})),oe(wt([()=>i.value,l],([d,h])=>{r.contentIdsMap().set(d,h)})),b(fe,{get when(){return u()},get children(){return b(qe,ne({as:"div",ref(d){var h=ut(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 BN(e){const t=ah(),[n,r]=ue(e,["style"]),[i,o]=he({width:void 0,height:void 0}),{direction:s}=Do(),a=()=>{const h=t.selectedTab();if(h==null)return;const f={transform:void 0,width:void 0,height:void 0},p=s()==="rtl"?-1*(h.offsetParent?.offsetWidth-h.offsetWidth-h.offsetLeft):h.offsetLeft;f.transform=t.orientation()==="vertical"?`translateY(${h.offsetTop}px)`:`translateX(${p}px)`,t.orientation()==="horizontal"?f.width=`${h.offsetWidth}px`:f.height=`${h.offsetHeight}px`,o(f)};en(()=>{queueMicrotask(()=>{a()})}),oe(wt([t.selectedTab,t.orientation,s],()=>{a()},{defer:!0}));const[l,c]=he(!1);let u=null,d=null;return M5(t.selectedTab,(h,f)=>{if(d!==f){d=f;return}c(!0),u&&clearTimeout(u),u=setTimeout(()=>{u=null,c(!1)},1),a()}),b(qe,ne({as:"div",role:"presentation",get style(){return _r(i(),n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return l()}},r))}function VN(e){let t;const n=ah(),[r,i]=ue(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:o}=Do(),s=new M2e(()=>n.listState().collection(),o,n.orientation),a=HR({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return oe(()=>{if(t==null)return;const l=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);l!=null&&n.setSelectedTab(l)}),b(qe,ne({as:"div",ref(l){var c=ut(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 Ct([r.onKeyDown,a.onKeyDown])},get onMouseDown(){return Ct([r.onMouseDown,a.onMouseDown])},get onFocusIn(){return Ct([r.onFocusIn,a.onFocusIn])},get onFocusOut(){return Ct([r.onFocusOut,a.onFocusOut])}},i))}function R2e(e){const[t,n]=Dl({value:()=>me(e.selectedKey),defaultValue:()=>me(e.defaultSelectedKey),onChange:c=>e.onSelectionChange?.(c)}),r=U(()=>{const c=t();return c!=null?[c]:[]}),[,i]=ue(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}=Dg(o),l=U(()=>{const c=t();return c!=null?s().getItem(c):void 0});return{collection:s,selectionManager:a,selectedKey:t,setSelectedKey:n,selectedItem:l}}function qN(e){const t=`tabs-${fn()}`,n=ze({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,i]=ue(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[o,s]=he([]),[a,l]=he(),{DomCollectionProvider:c}=ZR({items:o,onItemsChange:s}),u=R2e({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:m=>r.onChange?.(String(m)),dataSource:o});let d=u.selectedKey();oe(wt([()=>u.selectionManager(),()=>u.collection(),()=>u.selectedKey()],([m,g,v])=>{let y=v;if(m.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&&m.setSelectedKeys([y])}(m.focusedKey()==null||!m.isFocused()&&y!==d)&&m.setFocusedKey(y),d=y}));const h=new Map,f=new Map,p={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>h,contentIdsMap:()=>f,listState:()=>u,selectedTab:a,setSelectedTab:l,generateTriggerId:m=>`${i.id}-trigger-${m}`,generateContentId:m=>`${i.id}-content-${m}`};return b(c,{get children(){return b(UN.Provider,{value:p,get children(){return b(qe,ne({as:"div",get"data-orientation"(){return p.orientation()}},i))}})}})}function WN(e){let t;const n=ah(),r=ze({type:"button"},e),[i,o]=ue(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);YR({getItem:()=>({ref:()=>t,type:"item",key:i.value,textValue:"",disabled:l()})});const u=Lg({key:()=>i.value,selectionManager:()=>n.listState().selectionManager(),disabled:l},()=>t),d=h=>{a_()&&mn(h.currentTarget)};return oe(wt([()=>i.value,s],([h,f])=>{n.triggerIdsMap().set(h,f)})),b(qe,ne({as:"button",ref(h){var f=ut(p=>t=p,i.ref);typeof f=="function"&&f(h)},get id(){return s()},role:"tab",get tabIndex(){return Fe(()=>!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 Fe(()=>!!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 Ct([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return Ct([i.onPointerUp,u.onPointerUp])},get onClick(){return Ct([i.onClick,u.onClick,d])},get onKeyDown(){return Ct([i.onKeyDown,u.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,u.onMouseDown])},get onFocus(){return Ct([i.onFocus,u.onFocus])}},o))}var lh=Object.assign(qN,{Content:HN,Indicator:BN,List:VN,Trigger:WN}),N2e=ee("<div data-slot=tabs-trigger-wrapper>"),z2e=ee("<div data-slot=tabs-trigger-close-button>"),j2e=ee("<div data-slot=tabs-section-title>");function F2e(e){const[t,n]=ue(e,["class","classList","variant","orientation"]);return b(lh,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 U2e(e){const[t,n]=ue(e,["class","classList"]);return b(lh.List,ne(n,{"data-slot":"tabs-list",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function H2e(e){const[t,n]=ue(e,["class","classList","classes","children","closeButton","hideCloseButton","onMiddleClick"]);return(()=>{var r=N2e();return r.addEventListener("auxclick",i=>{i.button===1&&t.onMiddleClick&&(i.preventDefault(),t.onMiddleClick())}),r.$$mousedown=i=>{i.button===1&&t.onMiddleClick&&i.preventDefault()},F(r,b(lh.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),F(r,b(fe,{get when(){return t.closeButton},keyed:!0,children:i=>(()=>{var o=z2e();return F(o,i),Me(()=>Je(o,"data-hidden",t.hideCloseButton)),o})()}),null),Me(i=>{var o=e.value,s={...t.classList,[t.class??""]:!!t.class};return o!==i.e&&Je(r,"data-value",i.e=o),i.t=Et(r,s,i.t),i},{e:void 0,t:void 0}),r})()}function B2e(e){const[t,n]=ue(e,["class","classList","children"]);return b(lh.Content,ne(n,{"data-slot":"tabs-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const V2e=e=>(()=>{var t=j2e();return F(t,()=>e.children),t})(),Ro=Object.assign(F2e,{List:U2e,Trigger:H2e,Content:B2e,SectionTitle:V2e});mr(["mousedown"]);var q2e=ee("<span class=text-text-invert-weak>v"),W2e=ee('<span class="flex items-center gap-2"><span>'),G2e=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>'),K2e=ee("<span>v"),Z2e=ee('<div class="flex flex-row gap-3"><span>'),Y2e=ee("<span class=text-text-weak>"),X2e=ee("<span class=text-text-weaker>"),J2e=ee("<span class=text-text-weak>••••••••"),Q2e=ee("<div>");function ewe(e){const t=Rt(),[n,r]=he(!1);let i,o;const s=U(()=>jp(e.conn)),a=()=>{const u=i?i.scrollWidth>i.clientWidth:!1,d=o?o.scrollWidth>o.clientWidth:!1;r(u||d)};oe(()=>{s(),e.conn.http.url,e.status?.version,queueMicrotask(a)}),en(()=>{typeof ResizeObserver=="function"&&(M5([i,o],a),a())});const l=()=>(()=>{var u=W2e(),d=u.firstChild;return F(d,()=>jp(e.conn,!0)),F(u,b(fe,{get when(){return e.status?.version},get children(){var h=q2e();return h.firstChild,F(h,()=>e.status?.version,null),h}}),null),u})(),c=El(()=>e.badge);return b(In,{class:"flex-1 min-w-0",get value(){return l()},contentStyle:{"max-width":"none","white-space":"nowrap"},placement:"top-start",get inactive(){return Fe(()=>!n())()&&!e.conn.displayName},get children(){var u=G2e(),d=u.firstChild,h=d.firstChild,f=h.firstChild,p=i;return typeof p=="function"?Sr(p,f):i=f,F(f,s),F(h,b(fe,{get when(){return c()},keyed:!0,get fallback(){return b(fe,{get when(){return e.status?.version},get children(){var m=K2e();m.firstChild;var g=o;return typeof g=="function"?Sr(g,m):o=m,F(m,()=>e.status?.version,null),Me(()=>Ko(m,`${e.versionClass??"text-text-weak text-14-regular truncate"} min-w-0`)),m}})},children:m=>m}),null),F(d,b(fe,{get when(){return Fe(()=>!!(e.showCredentials&&e.conn.type==="http"))()&&e.conn},keyed:!0,children:m=>(()=>{var g=Z2e(),v=g.firstChild;return F(v,(()=>{var y=Fe(()=>!!m.http.username);return()=>y()?(()=>{var w=Y2e();return F(w,()=>m.http.username),w})():(()=>{var w=X2e();return F(w,()=>t.t("server.row.noUsername")),w})()})()),F(g,(()=>{var y=Fe(()=>!!m.http.password);return()=>y()&&J2e()})(),null),g})()}),null),F(u,()=>e.children,null),Me(m=>{var g=e.class,v=!!e.dimmed,y=`${e.nameClass??"truncate"} min-w-0`;return g!==m.e&&Ko(u,m.e=g),v!==m.t&&u.classList.toggle("opacity-50",m.t=v),y!==m.a&&Ko(f,m.a=y),m},{e:void 0,t:void 0,a:void 0}),u}})}function twe(e){return(()=>{var t=Q2e();return Me(n=>Et(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 nwe=ee('<code class="bg-surface-raised-base px-1.5 py-0.5 rounded-sm text-text-base">'),x0=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">'),rwe=ee('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),iwe=ee("<div class=flex-1>"),owe=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">'),swe=ee('<span class="text-11-regular text-text-base bg-surface-base px-1.5 py-0.5 rounded-sm">'),gy=ee('<div class="text-14-regular text-text-base text-center my-auto">'),awe=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>'),lwe=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">'),cwe=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 uwe=1e4,dwe=(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:Fe(()=>n.map(r=>t.includes(r)?(()=>{var i=nwe();return F(i,r),i})():r))},fwe=e=>{if(!e.startsWith("file://"))return e;const t=e.split("/").at(-1);return t?decodeURIComponent(t):e},hwe=(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(gn.key(o)===t)return-1;if(gn.key(s)===t)return 1;const a=i(n[gn.key(o)])-i(n[gn.key(s)]);return a!==0?a:(r.get(o)??0)-(r.get(s)??0)})},pwe=(e,t)=>{const n=w4(),[r,i]=et({});return oe(()=>{if(!t()){i($t({}));return}const o=e();let s=!1;const a=async()=>{const c={};await Promise.all(o.map(async u=>{c[gn.key(u)]=await n(u.http)})),!s&&i($t(c))};a();const l=setInterval(()=>void a(),uwe);pe(()=>{s=!0,clearInterval(l)})}),r},mwe=e=>{const[t,n]=et({url:void 0,tick:0});return oe(()=>{t.tick;let r=!1;const i=e?.();if(!i){n("url",void 0),pe(()=>{r=!0});return}if(i instanceof Promise){i.then(o=>{if(r)return;const s=o?zp(o):void 0;n("url",s??o??void 0)}),pe(()=>{r=!0});return}n("url",zp(i)??i),pe(()=>{r=!0})}),{key:()=>{const r=t.url;if(r)return gn.key({type:"http",http:{url:r}})},refresh:()=>n("tick",r=>r+1)}},gwe=()=>{const e=l5(),t=jO(),n=or(),r=Qi(),i=Rt(),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 Pd(()=>({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=>{Ot({variant:"error",title:i.t("common.requestFailed"),description:c instanceof Error?c.message:String(c)})}}))};function vwe(e){const t=l5(),n=or(),r=gr(),i=Xi(),o=To(),s=Rt(),a=Eo(),l=jO(),c=Qi(),u=U(()=>t?.data??n.data),d=W=>t?t.set("mcp",W):n.set("mcp",W),h=W=>t?t.set("mcp_ready",W):n.set("mcp_ready",W),f=W=>t?t.set("lsp",W):n.set("lsp",W),p=W=>t?t.set("lsp_ready",W):n.set("lsp_ready",W),m=()=>l?.client??c.client,[g,v]=et({lspDone:!1,lspLoading:!1,mcpDone:!1,mcpLoading:!1}),y=W=>{Ot({variant:"error",title:s.t("common.requestFailed"),description:W instanceof Error?W.message:String(W)})};oe(()=>{if(!e.shown())return;const W=u();!W.mcp_ready&&!g.mcpDone&&!g.mcpLoading&&(v("mcpLoading",!0),m().mcp.status().then(N=>{d(N.data??{}),h(!0)}).catch(N=>{v("mcpDone",!0),y(N)}).finally(()=>{v("mcpLoading",!1)})),!W.lsp_ready&&!g.lspDone&&!g.lspLoading&&(v("lspLoading",!0),m().lsp.status().then(N=>{f(N.data??[]),p(!0)}).catch(N=>{v("lspDone",!0),y(N)}).finally(()=>{v("lspLoading",!1)}))});let w=0,k=!1;pe(()=>{k=!0,w+=1});const x=U(()=>{const W=r.current,N=r.list;return W?N.every(V=>gn.key(V)!==gn.key(W))?[W,...N]:[W,...N.filter(V=>gn.key(V)!==gn.key(W))]:N}),C=U(()=>!!i.desktop),S=U(()=>C()||!t),I=pwe(x,()=>e.shown()&&C()),M=U(()=>hwe(x(),r.key,I)),D=gwe(),$=mwe(()=>i.getDefaultServer?.()),E=W=>i.serverManager?.instances.find(N=>N.key===W),A=U(()=>Object.keys(u().mcp??{}).sort((W,N)=>W.localeCompare(N))),T=W=>u().mcp?.[W]?.status,R=U(()=>u().lsp??[]),G=U(()=>(u().config.plugin??[]).map(W=>typeof W=="string"?W:W[0])),K=U(()=>dwe(s.t("dialog.plugins.empty"),["codeplane.jsonc","config/plugins"])),q=U(()=>S()?"servers":"mcp");return(()=>{var W=rwe();return F(W,b(Ro,{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 q()},get defaultValue(){return q()},variant:"alt",get children(){return[b(Ro.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 pt-2 pb-0 gap-4 h-10",get children(){return[b(fe,{get when(){return S()},get children(){return b(Ro.Trigger,{value:"servers","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.servers")}})}}),b(fe,{get when(){return u()},get children(){return[b(Ro.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.mcp")}}),b(Ro.Trigger,{value:"lsp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.lsp")}}),b(Ro.Trigger,{value:"plugins","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.plugins")}})]}})]}}),b(fe,{get when(){return S()},get children(){return b(Ro.Content,{value:"servers",get children(){var N=x0(),V=N.firstChild;return F(V,b(Wt,{get each(){return M()},children:J=>{const ie=gn.key(J),re=()=>I[ie]?.healthy===!1;return(()=>{var ve=owe();return ve.$$click=()=>{if(re())return;const ce=E(ie);if(ce){i.serverManager?.open(ce.id);return}a("/"),queueMicrotask(()=>r.setActive(ie))},F(ve,b(twe,{get health(){return I[ie]}}),null),F(ve,b(ewe,{conn:J,get dimmed(){return re()},get status(){return I[ie]},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(fe,{get when(){return ie===$.key()},get children(){var ce=swe();return F(ce,()=>s.t("common.default")),ce}})},get children(){return[iwe(),b(fe,{get when(){return Fe(()=>!!r.current)()&&ie===gn.key(r.current)},get children(){return b(Gt,{name:"check",size:"small",class:"text-icon-weak shrink-0"})}})]}}),null),Me(ce=>{var ae={"hover:bg-surface-raised-base-hover":!re(),"cursor-not-allowed":re()},Ce=re();return ce.e=Et(ve,ae,ce.e),Ce!==ce.t&&Je(ve,"aria-disabled",ce.t=Ce),ce},{e:void 0,t:void 0}),ve})()}}),null),F(V,b(Qt,{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;j(()=>import("./dialog-select-server-BORmhWyb.js"),__vite__mapDeps([97,98])).then(ie=>{k||w!==J||o.show(()=>b(ie.DialogSelectServer,{}),$.refresh)})},get children(){return s.t("status.popover.action.manageServers")}}),null),N}})}}),b(fe,{get when(){return u()},get children(){return[b(Ro.Content,{value:"mcp",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return A().length>0},get fallback(){return(()=>{var J=gy();return F(J,()=>s.t("dialog.mcp.empty")),J})()},get children(){return b(Wt,{get each(){return A()},children:J=>{const ie=()=>T(J),re=()=>ie()==="connected";return(()=>{var ve=awe(),ce=ve.firstChild,ae=ce.nextSibling,Ce=ae.nextSibling;return ve.$$click=()=>{D.isPending||D.mutate(J)},F(ae,J),Ce.$$click=_e=>_e.stopPropagation(),F(Ce,b(D2e,{get checked(){return re()},get disabled(){return Fe(()=>!!D.isPending)()&&D.variables===J},onChange:()=>{D.isPending||D.mutate(J)}})),Me(_e=>{var We=D.isPending&&D.variables===J,_t={"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":ie()==="connected","bg-icon-critical-base":ie()==="failed","bg-border-weak-base":ie()==="disabled","bg-icon-warning-base":ie()==="needs_auth"||ie()==="needs_client_registration"};return We!==_e.e&&(ve.disabled=_e.e=We),_e.t=Et(ce,_t,_e.t),_e},{e:void 0,t:void 0}),ve})()}})}})),N}}),b(Ro.Content,{value:"lsp",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return R().length>0},get fallback(){return(()=>{var J=gy();return F(J,()=>s.t("dialog.lsp.empty")),J})()},get children(){return b(Wt,{get each(){return R()},children:J=>(()=>{var ie=lwe(),re=ie.firstChild,ve=re.nextSibling;return F(ve,()=>J.name||J.id),Me(ce=>Et(re,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":J.status==="connected","bg-icon-critical-base":J.status==="error"},ce)),ie})()})}})),N}}),b(Ro.Content,{value:"plugins",get children(){var N=x0(),V=N.firstChild;return F(V,b(fe,{get when(){return G().length>0},get fallback(){return(()=>{var J=gy();return F(J,K),J})()},get children(){return b(Wt,{get each(){return G()},children:J=>(()=>{var ie=cwe(),re=ie.firstChild,ve=re.nextSibling;return Je(ve,"title",J),F(ve,()=>fwe(J)),ie})()})}})),N}})]}})]}})),W})()}mr(["click"]);var ywe=ee('<div class="relative size-4"><div class="badge-mask-tight size-4 flex items-center justify-center"></div><div>'),bwe=ee("<div data-slot=popover-body>");function wwe(){const e=Rt(),t=gr(),n=l5(),r=or(),[i,o]=he(!1),s=U(()=>n?.data??r.data),a=U(()=>t.healthy()===!1||s().mcp_ready),l=U(()=>{const c=t.healthy()===!0,d=Object.values(s().mcp??{}).some(h=>h.status!=="connected"&&h.status!=="disabled");return c&&!d});return b(Cd,{get open(){return i()},onOpenChange:o,gutter:4,placement:"bottom-end",shift:-168,modal:!1,get children(){return[b(Cd.Trigger,{as:Qt,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=ywe(),u=c.firstChild,d=u.nextSibling;return F(u,b(Gt,{get name(){return i()?"status-active":"status"},size:"small"})),Me(h=>Et(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(Cd.Portal,{get children(){return b(Cd.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=bwe();return F(c,b(fe,{get when(){return i()},get children(){return b(vwe,{shown:i})}})),c}})}})]}})}var kwe=ee('<div class="flex items-center shrink-0 w-8"><div class=transition-opacity>'),xwe=ee('<div class="titlebar-cluster flex items-center gap-0.5 rounded-lg p-0.5">'),Swe=ee('<div class="flex items-center gap-1 shrink-0"data-no-window-drag>'),_we=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 Cwe(){const e=Hl(),t=tA(),n=Rt(),r=Xi();yu();const i=Eo(),o=Ao(),s=ui(),[a,l]=et({stack:[],index:0,action:void 0}),c=()=>`${o.pathname}${o.search}${o.hash}`,u=U(()=>o.pathname==="/"||o.pathname==="/notifications"),d=U(()=>!s.dir||s.id?!1:o.pathname.replace(/\/+$/,"").split("/").at(-1)==="session");oe(()=>{const S=c();ct(()=>{const I=x2e(a,S);I!==a&&l(I)})});const h=U(()=>a.index>0),f=U(()=>a.index<a.stack.length-1),p=U(()=>e.projects.list().length>0),m=U(()=>!0),g=U(()=>r.desktop&&r.os==="macos"),v=typeof window<"u"?window.codeplaneDesktop?.window:void 0,[y,w]=he(!!v?.state?.fullscreen);if(v?.onStateChange){const S=v.onStateChange(I=>w(!!I.fullscreen));pe(()=>S())}const k=U(()=>g()&&!y()),x=()=>{const S=C2e(a);S&&(l(S.state),i(S.to))},C=()=>{const S=I2e(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=_we(),I=S.firstChild,M=I.firstChild,D=M.firstChild,O=D.nextSibling,$=O.firstChild,E=$.firstChild,A=E.firstChild,T=I.nextSibling,R=T.nextSibling,G=R.firstChild;return F(D,b(oi,{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()}})),F(O,b(fe,{get when(){return!u()},get children(){return b(c9,{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(Qt,{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-expanded"(){return e.sidebar.opened()},get children(){return b(Gt,{size:"small",get name(){return e.sidebar.opened()?"sidebar-active":"sidebar"}})}})}})}}),$),F($,b(fe,{get when(){return s.dir},get children(){var K=kwe(),q=K.firstChild;return F(q,b(c9,{placement:"bottom",get title(){return n.t("command.session.new")},get keybind(){return t.keybind("session.new")},openDelay:2e3,get children(){return b(Qt,{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}})}})),Me(W=>{var N=e.sidebar.opened()?"true":void 0,V={"opacity-100 duration-120 ease-out":!e.sidebar.opened(),"opacity-0 duration-120 ease-in delay-0 pointer-events-none":e.sidebar.opened()};return N!==W.e&&Je(K,"aria-hidden",W.e=N),W.t=Et(q,V,W.t),W},{e:void 0,t:void 0}),K}}),E),F(E,b(fe,{get when(){return r.desktop||p()&&m()},get children(){var K=xwe();return F(K,b(fe,{get when(){return r.desktop},get children(){return b(In,{placement:"bottom",get value(){return n.t("command.server.switch")},openDelay:2e3,get children(){return b(Qt,{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),F(K,b(fe,{get when(){return Fe(()=>!!p())()&&m()},get children(){return[b(In,{placement:"bottom",get value(){return n.t("common.goBack")},openDelay:2e3,get children(){return b(Qt,{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(In,{placement:"bottom",get value(){return n.t("common.goForward")},openDelay:2e3,get children(){return b(Qt,{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),F(E,()=>null,null),Et(R,{"flex items-center min-w-0 justify-end":!0,"pr-2":!0}),F(R,b(k2e,{class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md mr-1"}),G),F(R,b(fe,{get when(){return r.desktop},get children(){var K=Swe();return F(K,b(wwe,{})),K}}),null),Me(K=>{var q=!!r.desktop,W=!r.desktop,N=g()?"macos":void 0,V=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()},ie={"-translate-x-[40px]":e.sidebar.opened()&&!!s.dir,"duration-180 ease-out":!e.sidebar.opened(),"duration-180 ease-in":e.sidebar.opened()};return q!==K.e&&S.classList.toggle("h-11",K.e=q),W!==K.t&&S.classList.toggle("h-10",K.t=W),N!==K.a&&Je(S,"data-desktop-titlebar",K.a=N),V!==K.o&&Je(S,"data-platform-desktop",K.o=V),K.i=Et(I,J,K.i),K.n=Et(E,ie,K.n),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),S})()}function GN(e){return e.match(/^\[Cron\]\s*(.+)$/)?.[1]?.trim()}function O5(e){return e?!!e.cronRunID||!!GN(e.title):!1}function Iwe(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=>$l(l,a.directory))).filter(a=>!n.has(a.id)).map(a=>({session:a,taskName:GN(a.title)})).filter(a=>O5(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 Ve=Sa;function Jg(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 $we=(e,t)=>$l(t,e.directory),Twe=(e,t)=>!t||!e.projectID||e.projectID===t,Ewe=(e,t,n)=>Twe(e,n)&&t.some(r=>$we(e,r))&&!e.parentID&&!e.time?.archived&&!O5(e),KN=(e,t)=>{const n=[t,e.path.directory].filter(r=>!!r).filter((r,i,o)=>o.findIndex(s=>Sa(s)===Sa(r))===i);return(e.session??[]).filter(r=>Ewe(r,n,e.project))},kf=(e,t,n)=>KN(e,n).sort(Jg(t)),Awe=(e,t,n)=>(e??[]).filter(r=>r.parentID===t&&!r.time?.archived).sort(Jg(n)),ZN=(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(Jg(t))),n},YN=e=>(e??[]).filter(t=>!t.parentID&&!t.time?.archived).length,XN=e=>e.loadedRootCount<e.total&&e.visible<e.total;function Lwe(e){if(!e.project)return[];if(!e.workspacesEnabled)return[e.currentDirectory||e.project.worktree];const t=e.currentDirectory?Ve(e.currentDirectory):void 0,n=Ve(e.project.worktree);return e.workspaces.filter(r=>{const i=Ve(r);return(e.expanded?.[r]??e.expanded?.[i]??i===n)||i===t})}const v9=(e,t)=>e.flatMap(n=>KN(n)).sort(Jg(t))[0];function Dwe(e,t=()=>!0){return Object.values(e??{}).some(n=>n?.some(t))}const P5=e=>e.name||dr(e.worktree),vy=(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},S0=(e,t,n)=>{const r=Ve(e),i=new Map;for(const s of t){const a=Ve(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=Ve(s);if(a===r)continue;const l=i.get(a);l&&(o.push(l),i.delete(a))}return[...o,...i.values()]},Mwe="codeplane:deep-link",JN=e=>{if(e.startsWith("codeplane://")&&!(typeof URL.canParse=="function"&&!URL.canParse(e)))try{return new URL(e)}catch{return}},Owe=e=>{const t=JN(e);if(!t||t.hostname!=="open-project")return;const n=t.searchParams.get("directory");if(n)return n},Pwe=e=>{const t=JN(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}},Rwe=e=>e.map(Owe).filter(t=>!!t),Nwe=e=>e.map(Pwe).filter(t=>!!t),zwe=e=>{const t=e.__CODEPLANE__?.deepLinks??[];return t.length===0?[]:(e.__CODEPLANE__&&(e.__CODEPLANE__.deepLinks=[]),t)};var jwe=ee("<input data-component=inline-input>");function Fwe(e){const[t,n]=ue(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=jwe();return Wr(i,ne({get class(){return t.class},get style(){return r()}},n),!1,!1),i})()}var Uwe=ee("<span>");function Hwe(){const[e,t]=et({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;pe(()=>{u!==void 0&&cancelAnimationFrame(u)});const d=()=>c.editing??n(c.id),h=()=>c.stopPropagation??!1,f=()=>c.openOnDblClick??!0,p=g=>{h()&&g.stopPropagation()},m=g=>{f()&&(p(g),i(c.id,c.value()))};return b(fe,{get when(){return d()},get fallback(){return(()=>{var g=Uwe();return g.$$touchstart=p,g.$$click=p,g.$$mousedown=p,g.$$pointerdown=p,g.$$dblclick=m,F(g,()=>c.value()),Me(()=>Ko(g,c.displayClass??c.class)),g})()},get children(){return b(Fwe,{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:p,onClick:p,onDblClick:p,onMouseDown:p,onMouseUp:p,onTouchStart:p})}})}}}mr(["dblclick","pointerdown","mousedown","click","touchstart"]);var Bwe={};Cr(Bwe,{Collapsible:()=>Qg,Content:()=>ez,Root:()=>tz,Trigger:()=>nz,useCollapsibleContext:()=>R5});var QN=yt();function R5(){const e=pt(QN);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function ez(e){const[t,n]=he(),r=R5(),i=ze({id:r.generateId("content")},e),[o,s]=ue(i,["ref","id","style"]),{present:a}=xo({show:r.shouldMount,element:()=>t()??null}),[l,c]=he(0),[u,d]=he(0);let f=r.isOpen()||a();return en(()=>{const p=requestAnimationFrame(()=>{f=!1});pe(()=>{cancelAnimationFrame(p)})}),oe(wt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),f||(t().style.transitionDuration="",t().style.animationName="")})),oe(wt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>pe(r.registerContentId(o.id))),b(fe,{get when(){return a()},get children(){return b(qe,ne({as:"div",ref(p){var m=ut(n,o.ref);typeof m=="function"&&m(p)},get id(){return o.id},get style(){return _r({"--kb-collapsible-content-height":l()?`${l()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>r.dataset(),s))}})}function tz(e){const t=`collapsible-${fn()}`,n=ze({id:t},e),[r,i]=ue(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=he(),a=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:u=>r.onOpenChange?.(u)}),l=U(()=>({"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:Nr(()=>i.id),registerContentId:an(s)};return b(QN.Provider,{value:c,get children(){return b(qe,ne({as:"div"},l,i))}})}function nz(e){const t=R5(),[n,r]=ue(e,["onClick"]);return b(rs,ne({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Fe(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:o=>{je(o,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Qg=Object.assign(tz,{Content:ez,Trigger:nz}),Vwe=ee("<div data-slot=collapsible-arrow><span data-slot=collapsible-arrow-icon>");function qwe(e){const[t,n]=ue(e,["class","classList","variant"]);return b(Qg,ne({"data-component":"collapsible",get"data-variant"(){return t.variant||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n))}function Wwe(e){return b(Qg.Trigger,ne({"data-slot":"collapsible-trigger"},e))}function Gwe(e){return b(Qg.Content,ne({"data-slot":"collapsible-content"},e))}function Kwe(e){return(()=>{var t=Vwe(),n=t.firstChild;return Wr(t,e||{},!1,!0),F(n,b(Gt,{name:"chevron-down",size:"small"})),t})()}const yy=Object.assign(qwe,{Arrow:Kwe,Trigger:Wwe,Content:Gwe});var Zwe=ee("<svg>"),Ywe=ee("<svg><rect width=3 height=3 rx=1></svg>",!1,!0,!1);const Xwe=new Set([1,2,4,7,8,11,13,14]),Jwe=new Set([0,3,12,15]),Qwe=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:Xwe.has(t),corner:Jwe.has(t)}));function e1(e){return(()=>{var t=Zwe();return Wr(t,ne(e,{viewBox:"0 0 15 15","data-component":"spinner",get classList(){return{...e.classList,[e.class??""]:!!e.class}},fill:"currentColor"}),!0,!0),F(t,b(Wt,{each:Qwe,children:n=>(()=>{var r=Ywe();return Me(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&&Je(r,"x",i.e=o),s!==i.t&&Je(r,"y",i.t=s),a!==i.a&&ii(r,"opacity",i.a=a),l!==i.o&&ii(r,"animation",i.o=l),c!==i.i&&ii(r,"animation-fill-mode",i.i=c),u!==i.n&&ii(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 e4e=ee("<div>"),t4e=ee("<img data-slot=avatar-image>");const y9=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function n4e(e){return e?y9?y9.segment(e)[Symbol.iterator]().next().value?.segment??Array.from(e)[0]??"":Array.from(e)[0]??"":""}function r4e(e){const[t,n]=ue(e,["fallback","src","background","foreground","size","class","classList","style"]),r=t.src;return(()=>{var i=e4e();return Wr(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),F(i,b(fe,{when:r,keyed:!0,get fallback(){return n4e(t.fallback)},children:o=>(()=>{var s=t4e();return Je(s,"src",o),Je(s,"draggable",!1),s})()})),i})()}const b9={ask:"var(--icon-agent-ask-base)",build:"var(--icon-agent-build-base)",docs:"var(--icon-agent-docs-base)",plan:"var(--icon-agent-plan-base)"},w9=["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 i4e(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)>>>0;return w9[t%w9.length]}function o4e(e,t){return t||(b9[e]??b9[e.toLowerCase()]??i4e(e.toLowerCase()))}function s4e(e,t){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(!(r.role!=="user"||!r.agent))return o4e(r.agent,t.find(i=>i.name===r.agent)?.color)}}const a4e=/^(New session|Child session) - \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function rz(e){return e&&(e.match(a4e)?.[1]??e)}function iz(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 l4e(e,t,n,r){return iz(e,t,n,r)}function b3e(e,t,n,r){return iz(e,t,n,r)}const c4e=e=>e.type==="text"&&!e.synthetic&&!e.ignored,u4e=e=>e.role==="user",d4e=e=>e.role==="assistant",_0=(e,t)=>t?e.time.created!==t.time.created?e.time.created>t.time.created:e.id>t.id:!0;function f4e(e){if(!e.messages)return e.working?{loading:!1,thinking:!0}:{loading:!0};let t,n,r;for(const o of e.messages)u4e(o)&&_0(o,t)&&(t=o);for(const o of e.messages)if(d4e(o)){if(!t){_0(o,n)&&(n=o);continue}o.parentID===t.id&&_0(o,n)&&(n=o),o.time.created>=t.time.created&&_0(o,r)&&(r=o)}n=n??r;const i=t?(e.parts[t.id]??[]).filter(c4e).map(o=>o.text).join(`
|
|
2445
2445
|
`).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 h4e(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 p4e(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 m4e(e){return e?.override}var g4e=ee("<div>"),v4e=ee('<div><div class="size-full rounded overflow-clip">'),y4e=ee('<div class="size-1.5 rounded-full bg-surface-warning-strong">'),b4e=ee('<div class="size-1.5 rounded-full bg-text-diff-delete-base">'),w4e=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),k4e=ee('<div class="relative size-[15px] flex items-center justify-center">'),oz=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),x4e=ee('<span class="text-14-medium text-text-strong min-w-0 flex-1 truncate">'),S4e=ee('<div class="flex items-center gap-1.5 text-12-regular text-text-invert-base min-w-0">'),_4e=ee('<div class="w-72 flex flex-col gap-1.5"><div class="text-12-medium text-text-invert-strong truncate">'),k9=ee('<div class="text-12-regular text-text-invert-base">'),C4e=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>'),I4e=ee('<span class="shrink-0 opacity-60">·'),$4e=ee("<span>"),T4e=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">'),E4e=ee('<div class="shrink-0 overflow-hidden transition-[width,opacity]">'),A4e=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 [&: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">'),L4e=ee('<div class="shrink-0 w-4"aria-hidden=true>'),D4e=ee("<div class=w-full>"),M4e=ee('<span class="text-14-regular text-text-strong min-w-0 flex-1 truncate">'),O4e=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 [&:has(:focus-visible)]:bg-surface-raised-base-hover has-[.active]:bg-surface-base-active">'),P4e=ee('<div class="flex flex-col gap-1">'),R4e=ee('<div class="h-8 w-full rounded-md bg-surface-raised-base opacity-60 animate-pulse">');const sz=e=>{const t=or(),n=th(),r=b5(),i=U(()=>[e.project.worktree,...e.project.sandboxes??[]]),o=U(()=>i().reduce((u,d)=>u+n.project.unseenCount(d),0)),s=U(()=>i().some(u=>n.project.unseenHasError(u))),a=U(()=>i().some(u=>{const[d]=t.peek(u,{bootstrap:!1});return Dwe(d.permission,h=>!r.autoResponds(h,u))})),l=U(()=>e.notify&&(a()||o()>0)),c=U(()=>e.project.name||dr(e.project.worktree));return(()=>{var u=v4e(),d=u.firstChild;return F(d,b(r4e,ne({get fallback(){return c()},get src(){return m4e(e.project.icon)}},()=>_pe(e.project.icon?.color,e.project.worktree||c()),{class:"size-full rounded",get classList(){return{"badge-mask":l()}}}))),F(u,b(fe,{get when(){return l()},get children(){var h=g4e();return Me(f=>Et(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),Me(()=>Ko(u,`relative size-8 shrink-0 rounded ${e.class??""}`)),u})()},N4e=e=>{const t=U(()=>e.isWorking()||e.hasPermissions()||e.hasError()||e.unseenCount()>0);return b(Wc,{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=oz();return F(n,b(fe,{get when(){return t()},get children(){var r=k4e();return F(r,b(e1,{class:"absolute inset-0 size-[15px]",get style(){return{opacity:e.isWorking()?1:0,transition:"opacity 120ms linear"}}}),null),F(r,b(fe,{get when(){return!e.isWorking()},get children(){return b(Al,{get children(){return[b(Mn,{get when(){return e.hasPermissions()},get children(){return y4e()}}),b(Mn,{get when(){return e.hasError()},get children(){return b4e()}}),b(Mn,{get when(){return e.unseenCount()>0},get children(){return w4e()}})]}})}}),null),r}})),Me(r=>{var i=e.tint()??"var(--icon-interactive-base)",o=!t();return i!==r.e&&ii(n,"color",r.e=i),o!==r.t&&Je(n,"aria-hidden",r.t=o),r},{e:void 0,t:void 0}),n})(),(()=>{var n=x4e();return F(n,()=>e.title()),n})()]}})},lm=e=>{const t=Hl(),n=Rt(),r=th(),i=b5(),o=or(),s=eh(),a=U(()=>rz(e.session.title)??n.t("command.session.new")),l=U(()=>r.session.unseenCount(e.session.id)),c=U(()=>r.session.unseenHasError(e.session.id)),[u]=o.peek(e.session.directory,{bootstrap:!1}),d=U(()=>!!l4e(u.session,u.permission,e.session.id,M=>!i.autoResponds(M,e.session.directory))),h=U(()=>{if(d())return!1;const M=(u.message[e.session.id]??[]).findLast(O=>O.role==="assistant"&&typeof O.time?.completed!="number"),D=u.session_status[e.session.id];return M!==void 0||D?.type==="busy"||D?.type==="retry"||D!==void 0&&D.type!=="idle"}),f=U(()=>f4e({messages:u.message[e.session.id],parts:u.part,working:h()})),p=U(()=>s4e(u.message[e.session.id],u.agent)),m=U(()=>e.showTooltip??(e.mobile||!e.sidebarExpanded())),g=U(()=>{const M=f();return M.modelID?s.all().find(D=>D.id===M.providerID)?.models[M.modelID]?.name??M.modelID:"-"}),v=U(()=>{const M=f(),D=[];return M.modelID&&D.push(g()),typeof M.cost=="number"&&M.cost>0&&D.push(p4e(M.cost,n.intl())),typeof M.duration=="number"&&M.duration>0&&D.push(h4e(M.duration,n.intl())),D}),y=()=>(()=>{var M=_4e(),D=M.firstChild;return F(D,a),F(M,b(fe,{get when(){return!f().loading},get fallback(){return(()=>{var O=k9();return F(O,()=>n.t(f().thinking?"sidebar.sessionPreview.thinking":"sidebar.sessionPreview.loading")),O})()},get children(){return[b(fe,{get when(){return f().prompt},keyed:!0,get fallback(){return(()=>{var O=k9();return F(O,()=>n.t(f().thinking?"sidebar.sessionPreview.thinking":"sidebar.sessionPreview.empty")),O})()},children:O=>(()=>{var $=C4e();return F($,O),$})()}),b(fe,{get when(){return v().length>0},get children(){var O=S4e();return F(O,b(Wt,{get each(){return v()},children:($,E)=>[b(fe,{get when(){return E()>0},get children(){return I4e()}}),(()=>{var A=$4e();return F(A,$),Me(T=>Et(A,{"truncate min-w-0":E()===0,"shrink-0":E()!==0},T)),A})()]})),O}})]}}),null),M})(),w=U(()=>{if(e.showChild)return e.childSessions?.(e.session.id)??Awe(u.session,e.session.id,Date.now())}),k=U(()=>(w()?.length??0)>0),x=U(()=>e.sessionExpanded?.(e.session.id)??!0),C=()=>{e.setSessionExpanded&&e.setSessionExpanded(e.session.id,!x())},S=(M,D)=>{const O=e.navList?.(),$=O?.some(A=>A.id===e.session.id&&A.directory===e.session.directory)?O:e.list;e.prefetchSession(e.session,D);const E=$.findIndex(A=>A.id===e.session.id&&A.directory===e.session.directory);if(E!==-1)for(let A=1;A<=M;A++){const T=$[E+A];T&&e.prefetchSession(T,A===1?"high":D);const R=$[E-A];R&&e.prefetchSession(R,A===1?"high":D)}},I=b(N4e,{get session(){return e.session},get slug(){return e.slug},get mobile(){return e.mobile},get dense(){return e.dense},title:a,tint:p,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 M=A4e(),D=M.firstChild,O=D.firstChild;return M.addEventListener("pointerenter",()=>S(1,"high")),F(D,b(fe,{get when(){return e.showChild},get children(){return b(fe,{get when(){return Fe(()=>!!k())()&&e.setSessionExpanded},get fallback(){return L4e()},get children(){var $=T4e();return $.$$click=E=>{E.preventDefault(),E.stopPropagation(),C()},F($,b(Gt,{get name(){return x()?"chevron-down":"chevron-right"},size:"small"})),Me(E=>{var A=x(),T=x()?"Collapse subsessions":"Expand subsessions";return A!==E.e&&Je($,"aria-expanded",E.e=A),T!==E.t&&Je($,"aria-label",E.t=T),E},{e:void 0,t:void 0}),$}})}}),O),F(O,b(fe,{get when(){return!e.mobile||m()},fallback:I,get children(){return b(In,{get placement(){return e.mobile?"bottom":"right"},get value(){return y()},gutter:10,class:"min-w-0 w-full",contentClass:"p-3",children:I})}})),F(D,b(fe,{get when(){return!e.level},get children(){var $=E4e();return F($,b(In,{get value(){return n.t("common.archive")},placement:"top",get children(){return b(oi,{icon:"archive",variant:"ghost",class:"size-6 rounded-md",get"aria-label"(){return n.t("common.archive")},onClick:E=>{E.preventDefault(),E.stopPropagation(),e.archiveSession(e.session)}})}})),Me(E=>Et($,{"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},E)),$}}),null),Me($=>{var E=e.session.id,A=`${8+(e.level??0)*16}px`;return E!==$.e&&Je(M,"data-session-id",$.e=E),A!==$.t&&ii(M,"padding-left",$.t=A),$},{e:void 0,t:void 0}),M})(),b(fe,{get when(){return x()},get children(){return b(Wt,{get each(){return w()??[]},children:M=>b(fe,{get when(){return M.id!==e.session.id},get children(){var D=D4e();return F(D,b(lm,ne(e,{session:M,get level(){return(e.level??0)+1}}))),D}})})}})]},z4e=e=>{const t=Hl(),r=Rt().t("command.session.new"),i=()=>e.mobile||!e.sidebarExpanded(),o=b(Wc,{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=oz();return F(s,b(Gt,{name:"new-session",size:"small",class:"text-icon-weak"})),s})(),(()=>{var s=M4e();return F(s,r),s})()]}});return(()=>{var s=O4e();return F(s,b(fe,{get when(){return!i()},get fallback(){return b(In,{get placement(){return e.mobile?"bottom":"right"},value:r,gutter:10,class:"min-w-0 w-full",children:o})},children:o})),s})()},j4e=e=>{const t=Array.from({length:e.count??4},(n,r)=>r);return(()=>{var n=P4e();return F(n,b(Wt,{each:t,children:()=>R4e()})),n})()};mr(["click"]);var F4e=ee('<div class="bg-background-base rounded-md px-2 py-1 text-14-medium text-text-strong">'),U4e=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">'),H4e=ee('<span class="text-14-medium text-text-base min-w-0 truncate">'),B4e=ee('<div class="absolute right-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5 transition-opacity">'),V4e=ee('<div class="relative w-full py-1">'),q4e=ee('<nav class="flex flex-col gap-1">'),cm=ee("<div>"),W4e=ee('<div class=py-1><div class="group/workspace relative"data-component=workspace-item><div class="flex items-center gap-1">'),G4e=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 K4e=e=>{const t=or(),n=Rt(),r=U(()=>{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(fe,{get when(){return r()},keyed:!0,children:i=>(()=>{var o=F4e();return F(o,i),o})()})},Z4e=e=>(()=>{var t=U4e(),n=t.firstChild,r=n.nextSibling,i=r.firstChild,o=r.nextSibling;return F(n,b(fe,{get when(){return e.busy()},get fallback(){return b(Gt,{name:"branch",size:"small"})},get children(){return b(e1,{class:"size-[15px]"})}})),F(r,(()=>{var s=Fe(()=>!!e.local());return()=>s()?e.language.t("workspace.type.local"):e.language.t("workspace.type.sandbox")})(),i),F(t,b(fe,{get when(){return!e.local()},get fallback(){return(()=>{var s=H4e();return F(s,()=>e.branch()??dr(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),F(o,b(Gt,{get name(){return e.open()?"chevron-down":"chevron-right"},size:"small",class:"text-icon-base"})),t})(),Y4e=e=>(()=>{var t=B4e();return F(t,b(un,{get modal(){return!e.sidebarHovering()},get open(){return e.menuOpen()},onOpenChange:n=>e.setMenuOpen(n),get children(){return[b(In,{get value(){return e.language.t("common.moreOptions")},placement:"top",get children(){return b(un.Trigger,{as:oi,icon:"dot-grid",variant:"ghost",class:"size-6 rounded-md","data-action":"workspace-menu",get"data-workspace"(){return mt(e.directory)},get"aria-label"(){return e.language.t("common.moreOptions")}})}}),b(un.Portal,{get children(){return b(un.Content,{onCloseAutoFocus:n=>{e.pendingRename()&&(n.preventDefault(),e.setPendingRename(!1),e.openEditor(`workspace:${e.directory}`,e.workspaceValue()))},get children(){return[b(un.Item,{get disabled(){return e.local()},onSelect:()=>{e.setPendingRename(!0),e.setMenuOpen(!1)},get children(){return b(un.ItemLabel,{get children(){return e.language.t("common.rename")}})}}),b(un.Item,{onSelect:()=>e.showArchivedSessionsDialog(e.directory),get children(){return b(un.ItemLabel,{get children(){return e.language.t("command.session.archived")}})}}),b(un.Separator,{}),b(un.Item,{get disabled(){return e.local()||e.busy()},onSelect:()=>e.showResetWorkspaceDialog(e.root,e.directory),get children(){return b(un.ItemLabel,{get children(){return e.language.t("common.reset")}})}}),b(un.Item,{get disabled(){return e.local()||e.busy()},onSelect:()=>e.showDeleteWorkspaceDialog(e.root,e.directory),get children(){return b(un.ItemLabel,{get children(){return e.language.t("common.delete")}})}})]}})}})]}}),null),F(t,b(fe,{get when(){return!e.touch()},get children(){return b(In,{get value(){return e.language.t("command.session.new")},placement:"top",get children(){return b(oi,{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 mt(e.directory)},get"aria-label"(){return e.language.t("command.session.new")},onClick:n=>{n.preventDefault(),n.stopPropagation(),e.clearHoverProjectSoon(),e.navigateToNewSession()}})}})}}),null),Me(n=>Et(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})(),az=e=>(()=>{var t=q4e();return F(t,b(fe,{get when(){return e.showNew()},get children(){return b(z4e,{get slug(){return e.slug()},get mobile(){return e.mobile},get sidebarExpanded(){return e.ctx.sidebarExpanded},get clearHoverProjectSoon(){return e.ctx.clearHoverProjectSoon}})}}),null),F(t,b(fe,{get when(){return e.loading()},get children(){return b(j4e,{})}}),null),F(t,b(Wt,{get each(){return e.sessions()},children:n=>b(lm,{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),F(t,b(fe,{get when(){return e.hasMore()},get children(){var n=V4e();return F(n,b(Qt,{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),F(t,b(fe,{get when(){return!e.hideArchive},get children(){return[b(cz,{get language(){return e.language},get projectID(){return e.projectID},get projectWorktree(){return e.projectWorktree}}),b(lz,{get directory(){return e.directory},get ctx(){return e.ctx},get language(){return e.language}})]}}),null),t})(),lz=e=>(()=>{var t=cm();return F(t,b(Qt,{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")}})),Me(n=>Et(t,{"relative w-full pt-1":!0,"shrink-0 pb-2":e.footer},n)),t})(),cz=e=>{const t=or(),n=U(()=>e.projectID??t.data.project.find(i=>i.id!=="global"&&!!e.projectWorktree&&Ve(i.worktree)===Ve(e.projectWorktree))?.id),r=U(()=>{const i=n();return e.projectWorktree?`/cron/worktree/${mt(e.projectWorktree)}${i?`?projectID=${encodeURIComponent(i)}`:""}`:i?`/cron/${encodeURIComponent(i)}`:void 0});return(()=>{var i=cm();return F(i,b(Wc,{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(Gt,{name:"bell",size:"small"}),Fe(()=>e.language.t("command.cron.open"))]}})),Me(o=>Et(i,{"relative w-full":!0,"shrink-0 pb-2":e.footer},o)),i})()},X4e=e=>{const t=Eo(),n=ui(),r=or(),i=Rt(),o=gr(),s=bN(e.directory),[a]=r.child(e.directory,{bootstrap:!1}),[l,c]=et({open:!1,pendingRename:!1}),u=U(()=>mt(e.directory)),d=U(()=>kf(a,e.sortNow(),e.directory)),h=U(()=>ZN(a.session,e.sortNow())),f=U(()=>e.directory===e.project.worktree),p=U(()=>Ve(e.ctx.currentDir())===Ve(e.directory)),m=U(()=>{const T=a.vcs?.branch,R=T??dr(e.directory);return e.ctx.workspaceName(e.directory,e.project.id,T)??R}),g=U(()=>e.ctx.workspaceExpanded(e.directory,f())),v=U(()=>g()||p()),y=U(()=>d()?.length??0),w=U(()=>YN(a.session)),k=U(()=>XN({loadedRootCount:w(),total:a.sessionTotal,visible:y()})),x=ka(()=>({...Jp(e.directory,o.scope.key)})),C=U(()=>e.ctx.isBusy(e.directory)),S=()=>x.isLoading&&y()===0,I=H2("(hover: none)"),M=U(()=>!S()&&(I()||y()===0||p()&&!n.id));let D=!1;const O=async()=>{if(!D){D=!0;try{await r.project.loadSessions(e.directory,{all:!0})}finally{D=!1}}},$=U(()=>e.ctx.editorOpen(`workspace:${e.directory}`)),E=()=>b(Z4e,{local:f,busy:C,open:g,get directory(){return e.directory},language:i,branch:()=>a.vcs?.branch,workspaceValue:m,workspaceEditActive:$,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 oe(()=>{v()&&r.child(e.directory,{bootstrap:!0})}),(()=>{var T=cm();return Sr(s,T,()=>!0),F(T,b(yy,{variant:"ghost",get open(){return g()},class:"shrink-0",onOpenChange:A,get children(){return[(()=>{var R=W4e(),G=R.firstChild,K=G.firstChild;return F(K,b(fe,{get when(){return $()},get fallback(){return b(yy.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 mt(e.directory)},get children(){return E()}})},get children(){var q=cm();return F(q,E),Me(()=>Ko(q,`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`)),q}}),null),F(K,b(Y4e,{get directory(){return e.directory},local:f,busy:C,menuOpen:()=>l.open,pendingRename:()=>l.pendingRename,setMenuOpen:q=>c("open",q),setPendingRename:q=>c("pendingRename",q),get sidebarHovering(){return e.ctx.sidebarHovering},touch:I,language:i,workspaceValue:m,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),Me(()=>Je(G,"data-workspace",mt(e.directory))),R})(),b(yy.Content,{get children(){return b(az,{get directory(){return e.directory},slug:u,get mobile(){return e.mobile},get ctx(){return e.ctx},showNew:M,loading:()=>x.isLoading&&y()===0,sessions:d,childSessions:h,hasMore:k,loadMore:O,language:i,get projectID(){return e.project.id},get projectWorktree(){return e.project.worktree}})}})]}})),Me(R=>Et(T,{"opacity-30":s.isActiveDraggable,"opacity-50 pointer-events-none":C()},R)),T})()},J4e=e=>{const t=or(),n=Rt(),r=gr(),i=U(()=>{const[m]=t.child(e.directory());return m}),o=U(()=>mt(e.directory())),s=U(()=>kf(i(),e.sortNow(),e.directory())),a=U(()=>ZN(i().session,e.sortNow())),l=U(()=>s()?.length??0),c=ka(()=>({...Jp(e.directory(),r.scope.key)})),u=U(()=>YN(i().session)),d=U(()=>XN({loadedRootCount:u(),total:i().sessionTotal,visible:l()})),h=()=>c.isLoading&&l()===0;let f=!1;const p=async()=>{if(!f){f=!0;try{await t.project.loadSessions(e.directory(),{all:!0})}finally{f=!1}}};return(()=>{var m=G4e(),g=m.firstChild;return Sr(v=>e.ctx.setScrollContainerRef(v,e.mobile),g),F(g,b(az,{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:p,language:n,hideArchive:!0})),F(m,b(cz,{language:n,get projectID(){return e.project.id},get projectWorktree(){return e.project.worktree},footer:!0}),null),F(m,b(lz,{get directory(){return e.directory()},get ctx(){return e.ctx},language:n,footer:!0}),null),m})()};var Q4e={};Cr(Q4e,{Arrow:()=>Ai,CheckboxItem:()=>Og,Content:()=>uz,ContextMenu:()=>Yn,Group:()=>rh,GroupLabel:()=>Pg,Icon:()=>Rg,Item:()=>Ng,ItemDescription:()=>zg,ItemIndicator:()=>jg,ItemLabel:()=>Fg,Portal:()=>Ug,RadioGroup:()=>Hg,RadioItem:()=>Bg,Root:()=>hz,Separator:()=>Tu,Sub:()=>Vg,SubContent:()=>qg,SubTrigger:()=>Wg,Trigger:()=>pz,useContextMenuContext:()=>fz});function uz(e){const t=eo(),[n,r]=ue(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return b(oN,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 dz=yt();function eke(){return pt(dz)}function fz(){const e=eke();if(e===void 0)throw new Error("[kobalte]: `useContextMenuContext` must be used within a `ContextMenu` component");return e}function hz(e){const t=`contextmenu-${fn()}`,{direction:n}=Do(),r=ze({id:t,placement:n()==="rtl"?"left-start":"right-start",gutter:2,shift:2},e),[i,o]=ue(r,["onOpenChange"]),[s,a]=he({x:0,y:0}),l=Fs({defaultOpen:!1,onOpenChange:u=>i.onOpenChange?.(u)}),c={setAnchorRect:a};return b(dz.Provider,{value:c,get children(){return b(cN,ne({get open(){return l.isOpen()},get onOpenChange(){return l.setIsOpen},getAnchorRect:s},o))}})}function pz(e){const t=eo(),n=us(),r=fz(),i=ze({id:t.generateId("trigger")},e),[o,s]=ue(i,["ref","style","disabled","onContextMenu","onPointerDown","onPointerMove","onPointerCancel","onPointerUp"]);let a=0;const l=()=>{window.clearTimeout(a)};pe(()=>{l()});const c=m=>{if(o.disabled){je(m,o.onContextMenu);return}l(),m.preventDefault(),m.stopPropagation(),r.setAnchorRect({x:m.clientX,y:m.clientY}),n.isOpen()?n.focusContent():n.open(!0)},u=m=>m.pointerType==="touch"||m.pointerType==="pen";return b(qe,ne({as:"div",ref(m){var g=ut(n.setTriggerRef,o.ref);typeof g=="function"&&g(m)},get style(){return _r({"-webkit-touch-callout":"none"},o.style)},get"data-disabled"(){return o.disabled?"":void 0},onContextMenu:c,onPointerDown:m=>{je(m,o.onPointerDown),!o.disabled&&u(m)&&(l(),r.setAnchorRect({x:m.clientX,y:m.clientY}),a=window.setTimeout(()=>n.open(!1),700))},onPointerMove:m=>{je(m,o.onPointerMove),!o.disabled&&u(m)&&l()},onPointerCancel:m=>{je(m,o.onPointerCancel),!o.disabled&&u(m)&&l()},onPointerUp:m=>{je(m,o.onPointerUp),!o.disabled&&u(m)&&l()}},()=>n.dataset(),s))}var Yn=Object.assign(hz,{Arrow:Ai,CheckboxItem:Og,Content:uz,Group:rh,GroupLabel:Pg,Icon:Rg,Item:Ng,ItemDescription:zg,ItemIndicator:jg,ItemLabel:Fg,Portal:Ug,RadioGroup:Hg,RadioItem:Bg,Separator:Tu,Sub:Vg,SubContent:qg,SubTrigger:Wg,Trigger:pz});function tke(e){return b(Yn,ne(e,{"data-component":"context-menu"}))}function nke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.Trigger,ne(n,{"data-slot":"context-menu-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function rke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.Icon,ne(n,{"data-slot":"context-menu-icon",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function ike(e){return b(Yn.Portal,e)}function oke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.Content,ne(n,{"data-component":"context-menu-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function ske(e){const[t,n]=ue(e,["class","classList"]);return b(Yn.Arrow,ne(n,{"data-slot":"context-menu-arrow",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function ake(e){const[t,n]=ue(e,["class","classList"]);return b(Yn.Separator,ne(n,{"data-slot":"context-menu-separator",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function lke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.Group,ne(n,{"data-slot":"context-menu-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function cke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.GroupLabel,ne(n,{"data-slot":"context-menu-group-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function uke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.Item,ne(n,{"data-slot":"context-menu-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function dke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.ItemLabel,ne(n,{"data-slot":"context-menu-item-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function fke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.ItemDescription,ne(n,{"data-slot":"context-menu-item-description",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function hke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.ItemIndicator,ne(n,{"data-slot":"context-menu-item-indicator",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function pke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.RadioGroup,ne(n,{"data-slot":"context-menu-radio-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function mke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.RadioItem,ne(n,{"data-slot":"context-menu-radio-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function gke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.CheckboxItem,ne(n,{"data-slot":"context-menu-checkbox-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function vke(e){return b(Yn.Sub,e)}function yke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.SubTrigger,ne(n,{"data-slot":"context-menu-sub-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function bke(e){const[t,n]=ue(e,["class","classList","children"]);return b(Yn.SubContent,ne(n,{"data-component":"context-menu-sub-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const mi=Object.assign(tke,{Trigger:nke,Icon:rke,Portal:ike,Content:oke,Arrow:ske,Separator:ake,Group:lke,GroupLabel:cke,Item:uke,ItemLabel:dke,ItemDescription:fke,ItemIndicator:hke,RadioGroup:pke,RadioItem:mke,CheckboxItem:gke,Sub:vke,SubTrigger:yke,SubContent:bke});var wke={};Cr(wke,{Link:()=>kke,Root:()=>N5});function N5(e){let t;const[n,r]=ue(e,["ref","href","disabled"]),i=If(()=>t,()=>"a");return b(qe,ne({as:"a",ref(o){var s=ut(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 Fe(()=>!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 kke=N5,xke={};Cr(xke,{Arrow:()=>Ai,Content:()=>gz,HoverCard:()=>Id,Portal:()=>vz,Root:()=>yz,Trigger:()=>bz,useHoverCardContext:()=>t1});var mz=yt();function t1(){const e=pt(mz);if(e===void 0)throw new Error("[kobalte]: `useHoverCardContext` must be used within a `HoverCard` component");return e}function gz(e){const t=t1(),[n,r]=ue(e,["ref","style"]);return b(fe,{get when(){return t.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(i){var o=ut(s=>{t.setContentRef(s)},n.ref);typeof o=="function"&&o(i)},disableOutsidePointerEvents:!1,get style(){return _r({"--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 vz(e){const t=t1();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}function Ske(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 yz(e){const t=`hovercard-${fn()}`,n=ze({id:t,openDelay:700,closeDelay:300},e),[r,i]=ue(n,["id","open","defaultOpen","onOpenChange","openDelay","closeDelay","ignoreSafeArea","forceMount"]);let o,s;const[a,l]=he(),[c,u]=he(),[d,h]=he(i.placement),f=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:D=>r.onOpenChange?.(D)}),{present:p}=xo({show:()=>r.forceMount||f.isOpen(),element:()=>c()??null}),{addGlobalListener:m,removeGlobalListener:g}=xF(),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=>jn(a(),D)||jn(c(),D),C=D=>{const O=a(),$=c();if(!(!O||!$))return Ske(D,O,$)},S=D=>{const O=D.target;if(x(O)){k();return}if(!r.ignoreSafeArea){const $=C(d());if($&&G2(f_(D),$)){k();return}}s||y()};oe(()=>{f.isOpen()&&(m(document,"pointermove",S,!0),pe(()=>{g(document,"pointermove",S,!0)}))}),pe(()=>{w(),k()});const M={dataset:U(()=>({"data-expanded":f.isOpen()?"":void 0,"data-closed":f.isOpen()?void 0:""})),isOpen:f.isOpen,contentPresent:p,openWithDelay:v,closeWithDelay:y,cancelOpening:w,cancelClosing:k,close:f.close,isTargetOnHoverCard:x,setTriggerRef:l,setContentRef:u};return b(mz.Provider,{value:M,get children(){return b(cs,ne({anchorRef:a,contentRef:c,onCurrentPlacementChange:h},i))}})}function bz(e){const t=t1(),[n,r]=ue(e,["ref","onPointerEnter","onPointerLeave","onFocus","onBlur"]),i=l=>{je(l,n.onPointerEnter),!(l.pointerType==="touch"||r.disabled||l.defaultPrevented)&&(t.cancelClosing(),t.isOpen()||t.openWithDelay())},o=l=>{je(l,n.onPointerLeave),l.pointerType!=="touch"&&t.cancelOpening()},s=l=>{je(l,n.onFocus),!(r.disabled||l.defaultPrevented)&&(t.cancelClosing(),t.isOpen()||t.openWithDelay())},a=l=>{je(l,n.onBlur),t.cancelOpening();const c=l.relatedTarget;t.isTargetOnHoverCard(c)||t.closeWithDelay()};return pe(t.cancelOpening),b(N5,ne({ref(l){var c=ut(t.setTriggerRef,n.ref);typeof c=="function"&&c(l)},onPointerEnter:i,onPointerLeave:o,onFocus:s,onBlur:a},()=>t.dataset(),r))}var Id=Object.assign(yz,{Arrow:Ai,Content:gz,Portal:vz,Trigger:bz}),_ke=ee("<div data-slot=hover-card-body>");function Cke(e){const[t,n]=ue(e,["trigger","mount","class","classList","children"]);return b(Id,ne({gutter:4},n,{get children(){return[b(Id.Trigger,{as:"div","data-slot":"hover-card-trigger",tabIndex:-1,get children(){return t.trigger}}),b(Id.Portal,{get mount(){return t.mount},get children(){return b(Id.Content,{"data-component":"hover-card-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){var r=_ke();return F(r,()=>t.children),r}})}})]}}))}var Ike=ee('<div class="bg-background-base rounded-xl p-1">'),$ke=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">'),Tke=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">'),Eke=ee("<div>");const Ake=e=>{const t=U(()=>e.projects().find(n=>n.worktree===e.activeProject()));return b(fe,{get when(){return t()},keyed:!0,children:n=>(()=>{var r=Ike();return F(r,b(sz,{project:n})),r})()})},Lke=e=>{const t=th(),n=Hl(),r=U(()=>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(mi,{get modal(){return!e.sidebarHovering()},onOpenChange:o=>{e.setMenu(o),e.setSuppressHover(o),o&&e.setOpen(!1)},get children(){return[b(mi.Trigger,{as:"button",type:"button",get"aria-label"(){return P5(e.project)},"data-action":"project-switch",get"data-project"(){return mt(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(sz,{get project(){return e.project},notify:!0})}}),b(mi.Portal,{get children(){return b(mi.Content,{get children(){return[b(mi.Item,{onSelect:()=>e.showEditProjectDialog(e.project),get children(){return b(mi.ItemLabel,{get children(){return e.language.t("common.edit")}})}}),b(mi.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return mt(e.project.worktree)},get disabled(){return Fe(()=>e.project.vcs!=="git")()&&!e.workspacesEnabled(e.project)},onSelect:()=>e.toggleProjectWorkspaces(e.project),get children(){return b(mi.ItemLabel,{get children(){return Fe(()=>!!e.workspacesEnabled(e.project))()?e.language.t("sidebar.workspaces.disable"):e.language.t("sidebar.workspaces.enable")}})}}),b(mi.Item,{"data-action":"project-clear-notifications",get"data-project"(){return mt(e.project.worktree)},get disabled(){return r()===0},onSelect:i,get children(){return b(mi.ItemLabel,{get children(){return e.language.t("sidebar.project.clearNotifications")}})}}),b(mi.Separator,{}),b(mi.Item,{"data-action":"project-close-menu",get"data-project"(){return mt(e.project.worktree)},onSelect:()=>e.closeProject(e.project.worktree),get children(){return b(mi.ItemLabel,{get children(){return e.language.t("common.close")}})}})]}})}})]}})},Dke=e=>(()=>{var t=$ke(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,o=i.nextSibling,s=o.nextSibling;return F(r,()=>P5(e.project)),F(i,()=>e.language.t("sidebar.project.recentSessions")),F(o,b(fe,{get when(){return e.workspaceEnabled()},get fallback(){return b(Wt,{get each(){return e.projectSessions().slice(0,2)},children:a=>b(lm,ne(()=>e.ctx.sessionProps,{session:a,get list(){return e.projectSessions()},get slug(){return mt(e.project.worktree)},dense:!0,showTooltip:!0,get mobile(){return e.mobile}}))})},get children(){return b(Wt,{get each(){return e.workspaces()},children:a=>{const l=U(()=>e.workspaceSessions(a));return(()=>{var c=Tke(),u=c.firstChild,d=u.firstChild,h=d.nextSibling;return F(d,b(Gt,{name:"branch",size:"small",class:"text-icon-base"})),F(h,()=>e.label(a)),F(c,b(Wt,{get each(){return l().slice(0,2)},children:f=>b(lm,ne(()=>e.ctx.sessionProps,{session:f,get list(){return l()},get slug(){return mt(a)},dense:!0,showTooltip:!0,get mobile(){return e.mobile}}))}),null),c})()}})}})),F(s,b(Qt,{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})(),Mke=e=>{const t=or(),n=Rt(),r=bN(e.project.worktree),i=U(()=>e.ctx.currentProject()?.worktree===e.project.worktree),o=U(()=>e.ctx.workspaceIds(e.project).slice(0,2)),s=U(()=>e.ctx.workspacesEnabled(e.project)),a=U(()=>e.ctx.workspaceIds(e.project)),[l,c]=et({menu:!1,suppressHover:!1}),u=()=>e.ctx.hoverProject()===e.project.worktree,d=U(()=>!e.mobile&&e.ctx.sidebarOpened()),h=U(()=>!e.mobile&&!e.ctx.sidebarOpened()),f=U(()=>l.menu||(d()||h())&&u()),p=()=>u()&&d()&&!i()&&!l.menu,m=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=U(()=>t.peek(e.project.worktree,{bootstrap:!1})[0]),v=U(()=>kf(g(),e.sortNow(),e.project.worktree)),y=k=>{const[x]=t.peek(k,{bootstrap:!1});return kf(x,e.sortNow(),k)};oe(()=>{p()&&(t.project.loadSessions(e.project.worktree),s()&&a().forEach(k=>void t.project.loadSessions(k)))});const w=()=>b(Lke,{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=Eke();return Sr(r,k,()=>!0),F(k,b(fe,{get when(){return Fe(()=>!!d())()&&!i()},get fallback(){return w()},get children(){return b(Cke,{get open(){return Fe(()=>!!(!l.suppressHover&&p()))()&&!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(Dke,{get project(){return e.project},get mobile(){return e.mobile},selected:i,workspaceEnabled:s,workspaces:o,label:m,projectSessions:v,workspaceSessions:y,get ctx(){return e.ctx},language:n})}})}})),Me(()=>k.classList.toggle("opacity-30",!!r.isActiveDraggable)),k})()};var Oke=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">'),Pke=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">'),Rke=ee("<button type=button><span class=truncate>");const jd=[{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:"skills",icon:"checklist",titleKey:"skills.page.title",descriptionKey:"settings.tab.skills.description",groupKey:"settings.section.extensions"}],Nke=[{titleKey:"settings.section.app",sections:jd.filter(e=>e.groupKey==="settings.section.app")},{titleKey:"settings.section.ai",sections:jd.filter(e=>e.groupKey==="settings.section.ai")},{titleKey:"settings.section.extensions",sections:jd.filter(e=>e.groupKey==="settings.section.extensions")}],um=e=>e==="/settings"||e.startsWith("/settings/");function zke(e){return e==="shortcuts"||e==="providers"||e==="modes"||e==="models"||e==="mcp"||e==="plugins"||e==="skills"?e:"general"}const jke=e=>e==="general"?"/settings":`/settings/${e}`;function Fke(e){return um(e)?zke(e.slice(10).split("/")[0]):"general"}function w3e(e){return jd.find(t=>t.value===e)??jd[0]}function Uke(e){const t=Rt(),n=Dve(),r=U(()=>e.mobile||(e.merged??!0));return(()=>{var i=Oke(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling,c=o.nextSibling,u=c.firstChild;return F(a,()=>t.t("sidebar.settings")),F(l,()=>t.t("app.name.web"),null),F(l,b(fe,{get when(){return n.status()?.current},children:d=>[" v",Fe(d)]}),null),F(u,b(Wt,{each:Nke,children:d=>(()=>{var h=Pke(),f=h.firstChild,p=f.nextSibling;return F(f,()=>t.t(d.titleKey)),F(p,b(Wt,{get each(){return d.sections},children:m=>{const g=()=>e.current()===m.value;return(()=>{var v=Rke(),y=v.firstChild;return v.$$click=()=>e.onSelect(m.value),F(v,b(Gt,{get name(){return m.icon},get class(){return g()?"icon-strong-base shrink-0":"icon-base shrink-0"}}),y),F(y,()=>t.t(m.titleKey)),Me(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=Et(v,k,w.e),x!==w.t&&Je(v,"aria-current",w.t=x),w},{e:void 0,t:void 0}),v})()}})),h})()})),Me(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=Et(i,h,d.e),f!==d.t&&ii(i,"width",d.t=f),d},{e:void 0,t:void 0}),i})()}mr(["click"]);var Hke=ee("<div>"),Bke=ee("<button type=button>"),x9=ee('<span class="text-icon-base text-12-medium">'),S9=ee('<div class="flex items-center gap-2"><span>'),_9=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">'),Vke=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">'),qke=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 Wke=e=>{const t=Hl(),n=Rt(),r=Ao(),i=Eo(),o=th(),s=Xi(),a=U(()=>!!e.mobile||e.opened()),l=()=>e.mobile?"bottom":"right",c=U(()=>r.pathname==="/"),u=U(()=>r.pathname==="/notifications"),d=U(()=>um(r.pathname)),h=U(()=>o.unseenCount()>0),f=g=>{i(g),t.mobileSidebar.hide()},p=g=>b(In,{get placement(){return l()},get value(){return(()=>{var v=S9(),y=v.firstChild;return F(y,()=>g.label()),F(v,b(fe,{get when(){return Fe(()=>!e.mobile)()&&!!g.keybind?.()},get children(){var w=x9();return F(w,()=>g.keybind?.()),w}}),null),v})()},get children(){var v=Bke();return Zo(v,"click",g.onClick,!0),F(v,b(Gt,{get name(){return g.icon}}),null),F(v,b(fe,{get when(){return g.notify?.()},get children(){var y=Hke();return Me(w=>Et(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),Me(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=Et(v,w,y.e),k!==y.t&&Je(v,"aria-label",y.t=k),x!==y.a&&Je(v,"aria-current",y.a=x),y},{e:void 0,t:void 0,a:void 0}),v}});let m;return oe(()=>{const g=m;if(g){if(a()){g.removeAttribute("inert");return}g.setAttribute("inert","")}}),(()=>{var g=qke(),v=g.firstChild,y=v.firstChild,w=y.nextSibling,k=v.nextSibling;return Zo(v,"mousemove",e.aimMove,!0),F(y,b(pN,{get onDragStart(){return e.handleDragStart},get onDragEnd(){return e.handleDragEnd},get onDragOver(){return e.handleDragOver},collisionDetector:fN,get children(){return[b(mN,{}),b(SN,{}),(()=>{var x=Vke();return F(x,b(p,{icon:"home",label:()=>n.t("sidebar.home"),selected:c,onClick:()=>f("/")}),null),F(x,b(p,{icon:"bell",label:()=>n.t("sidebar.notifications"),selected:u,notify:h,get critical(){return o.unseenHasError},onClick:()=>f("/notifications")}),null),F(x,b(yN,{get ids(){return e.projects().map(C=>C.worktree)},get children(){return b(Wt,{get each(){return e.projects()},children:C=>e.renderProject(C)})}}),null),F(x,b(In,{get placement(){return l()},get value(){return(()=>{var C=S9(),S=C.firstChild;return F(S,()=>e.openProjectLabel),F(C,b(fe,{get when(){return Fe(()=>!e.mobile)()&&!!e.openProjectKeybind()},get children(){var I=x9();return F(I,()=>e.openProjectKeybind()),I}}),null),C})()},get children(){var C=_9();return Zo(C,"click",e.onOpenProject,!0),F(C,b(Gt,{name:"plus"})),Me(()=>Je(C,"aria-label",typeof e.openProjectLabel=="string"?e.openProjectLabel:void 0)),C}}),null),x})(),b(gN,{get children(){return e.renderProjectOverlay()}})]}})),F(w,b(p,{icon:"settings-gear",get label(){return e.settingsLabel},selected:d,get keybind(){return e.settingsKeybind},get onClick(){return e.onOpenSettings}}),null),F(w,b(fe,{get when(){return!s.desktop},get children(){return b(In,{get placement(){return l()},get value(){return e.restartLabel()},get children(){var x=_9();return x.$$click=()=>{window.confirm(e.restartConfirm())&&e.onRestart()},F(x,b(Gt,{name:"reset"})),Me(()=>Je(x,"aria-label",e.restartLabel())),x}})}}),null),Sr(x=>{m=x},k),F(k,()=>e.renderPanel()),Me(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=Et(k,C,x.e),S!==x.t&&Je(k,"aria-hidden",x.t=S),x},{e:void 0,t:void 0}),g})()};mr(["click","mousemove"]);function Gke(e){return e.password?{Authorization:`Basic ${btoa(`${e.username??"codeplane"}:${e.password}`)}`}:{}}function Kke(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 Zke(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:Kke(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(`
|
|
2446
2446
|
`)[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(`
|
|
2447
|
-
`)[0]}:{detail:t}}async function No(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",...Gke(e),...n.headers??{}},o=await fetch(r,{cache:"no-store",...n,headers:i});if(!o.ok){let s;try{s=Zke(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 Qo={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 No(e,`/global/cron${r?`?${r}`:""}`)},get(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}`)},create(e,t){return No(e,"/global/cron",{method:"POST",body:JSON.stringify(t)})},update(e,t,n){return No(e,`/global/cron/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(n)})},remove(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}`,{method:"DELETE"})},setStatus(e,t,n){return No(e,`/global/cron/${encodeURIComponent(t)}/status`,{method:"POST",body:JSON.stringify({status:n})})},trigger(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}/trigger`,{method:"POST"})},listRuns(e,t,n){const r=n?`?limit=${n}`:"";return No(e,`/global/cron/${encodeURIComponent(t)}/runs${r}`)},getRun(e,t){return No(e,`/global/cron/runs/${encodeURIComponent(t)}`)},cancelRun(e,t){return No(e,`/global/cron/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"})}};function z5(e){if(!e)return[];const t=new Set;return[e.worktree,...e.sandboxes??[]].filter(n=>{if(!n)return!1;const r=Sa(n);return t.has(r)?!1:(t.add(r),!0)})}function Yke(e,t){return t.some(n=>$l(n,e))}function C9(e,t){return z5(t).reduce((n,r)=>$l(r,e)?Math.max(n,Sa(r).length):n,-1)}function z2(e,t,n){if(!e)return;const r=n?t.find(o=>o.id===n):void 0;if(r&&C9(e,r)>=0)return r;const i=t.map((o,s)=>({project:o,index:s,score:C9(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 wz(e,t){return e?.id??t}function kz(e,t){if(t.projectID)return e.projectID===t.projectID;const n=t.project?z5(t.project):t.directory?[t.directory]:[];return Yke(e.directory,n)}var I9=ee('<div class="flex items-center gap-2 px-2 py-2 min-w-0"><span class="text-14-medium text-text-strong truncate">'),Xke=ee('<div class="shrink-0 px-3 pt-4 pb-1 text-11-medium text-text-weak uppercase tracking-wider">'),Jke=ee('<nav class="flex-1 min-h-0 overflow-y-auto no-scrollbar flex flex-col px-1">'),Qke=ee('<div class="flex flex-col min-h-0 flex-1 py-2"><div class="shrink-0 px-1">'),e5e=ee('<div class="shrink-0 px-1">'),t5e=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),n5e=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),r5e=ee('<div class="size-1.5 rounded-full">'),i5e=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">'),o5e=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 [&:has(:focus-visible)]:bg-surface-raised-base-hover">'),s5e=ee('<div class="opacity-60 cursor-default">');const a5e=5e3,l5e=3e3,$9=6e4;function c5e(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const u5e=e=>{const t=Rt(),n=Ao(),r=gr(),i=or(),o=U(()=>r.current?.http),s=U(()=>n.pathname==="/cron"||n.pathname.startsWith("/cron/")),a=U(()=>new URLSearchParams(n.search).get("projectID")??void 0),l=U(()=>{const y=e.projectID?.(),w=(i.data.project??[]).filter(S=>S.id!=="global");if(y){const S=w.find(I=>I.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=Dr(k[1]);return z2(S,w,a())}const x=n.pathname.match(/^\/cron\/([^/?#]+)/);if(x){const S=a()??decodeURIComponent(x[1]),I=w.find(M=>M.id===S);if(I)return{id:I.id,worktree:I.worktree,sandboxes:I.sandboxes}}const C=n.pathname.match(/^\/([^/]+)\/session\//);if(C){const S=Dr(C[1]);return z2(S,w,a())}}),c=U(()=>wz(l(),a())),u=U(()=>l()?.worktree),d=U(()=>z5(l())),h=U(()=>d().flatMap(y=>{const[w]=i.child(y,{bootstrap:!1});return w.session}));oe(()=>{d().forEach(y=>void i.project.loadSessions(y))});const f=ka(()=>({queryKey:["cron","sidebar-panel-tasks",r.scope.key,c(),u()],queryFn:async()=>{const y=o(),w=c(),k=u();return!y||!w&&!k?[]:w?Qo.list(y,{projectID:w}):Qo.list(y,{directory:k})},enabled:!!o()&&(!!c()||!!u()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:a5e,gcTime:$9,retry:1})),p=U(()=>(f.data??[]).filter(y=>kz(y,{projectID:c(),project:l(),directory:u()}))),m=ka(()=>({queryKey:["cron","sidebar-panel-runs",r.scope.key,c(),p().map(y=>y.id).join(",")],queryFn:async()=>{const y=o();return y?(await Promise.all(p().map(async k=>(await Qo.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:l5e,gcTime:$9,retry:1})),g=U(()=>Iwe({runs:m.data??[],sessions:h(),directories:d(),limit:200})),v=U(()=>{const y=c(),w=u();return w?`/cron/worktree/${mt(w)}${y?`?projectID=${encodeURIComponent(y)}`:""}`:y?`/cron/${encodeURIComponent(y)}`:"/cron"});return(()=>{var y=Qke(),w=y.firstChild;return F(y,b(fe,{get when(){return Fe(()=>!!s())()&&u()},keyed:!0,children:k=>(()=>{var x=e5e();return F(x,b(Wc,{get href(){return`/${mt(k)}/session`},class:"block w-full rounded-md transition-colors hover:bg-surface-raised-base-hover",get children(){var C=I9(),S=C.firstChild;return F(C,b(Gt,{name:"arrow-left",size:"small",class:"shrink-0 icon-strong-base"}),S),F(S,()=>t.t("common.back")),C}})),x})()}),w),F(w,b(Wc,{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=I9(),x=k.firstChild;return F(k,b(Gt,{name:"bell",size:"small",class:"shrink-0 icon-strong-base"}),x),F(x,()=>t.t("cron.title")),k}})),F(y,b(fe,{get when(){return g().length>0},get children(){return[(()=>{var k=Xke();return F(k,()=>t.t("cron.rail.title")),k})(),(()=>{var k=Jke();return F(k,b(Wt,{get each(){return g()},children:x=>b(d5e,{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})()},d5e=e=>{const t=U(()=>mt(e.taskDirectory)),n=U(()=>`/cron/worktree/${t()}/session/${e.sessionID}`),r=U(()=>{if(!e.sessionID)return"";const l=new URLSearchParams({sidebar:"cron"});return e.projectID&&l.set("projectID",e.projectID),`${n()}?${l.toString()}`}),i=Ao(),o=U(()=>!!e.sessionID&&i.pathname===n()),s=(()=>{var l=n5e();return F(l,b(Al,{get fallback(){return(()=>{var c=r5e();return Me(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(Mn,{get when(){return e.status==="running"},get children(){return b(e1,{class:"size-[15px]"})}}),b(Mn,{get when(){return e.status==="queued"},get children(){return t5e()}})]}})),l})(),a=(()=>{var l=i5e(),c=l.firstChild,u=c.firstChild,d=u.firstChild;d.firstChild;var h=u.nextSibling;return F(l,s,c),F(d,()=>e.sequence,null),F(u,()=>e.taskName,null),F(h,()=>c5e(e.startedAt)),l})();return(()=>{var l=o5e();return F(l,b(fe,{get when(){return e.sessionID},get fallback(){return(()=>{var c=s5e();return F(c,a),c})()},get children(){return b(Wc,{get href(){return r()},class:"block",children:a})}})),Me(()=>l.classList.toggle("bg-surface-base-active",!!o())),l})()};var f5e={};Cr(f5e,{Description:()=>Oa,ErrorMessage:()=>Pa,Item:()=>_z,ItemControl:()=>j5,ItemDescription:()=>F5,ItemIndicator:()=>U5,ItemInput:()=>Cz,ItemLabel:()=>H5,Label:()=>B5,RadioGroup:()=>r1,Root:()=>Iz,useRadioGroupContext:()=>n1});var xz=yt();function n1(){const e=pt(xz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Sz=yt();function Eu(){const e=pt(Sz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function _z(e){const t=Li(),n=n1(),r=`${t.generateId("item")}-${fn()}`,i=ze({id:r},e),[o,s]=ue(i,["value","disabled","onPointerDown"]),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(!1),v=U(()=>n.isDefaultValue(o.value)),y=U(()=>n.isSelectedValue(o.value)),w=U(()=>o.disabled||t.isDisabled()||!1),k=S=>{je(S,o.onPointerDown),m()&&S.preventDefault()},x=U(()=>({...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:Nr(()=>s.id),registerInput:an(l),registerLabel:an(u),registerDescription:an(h),setIsFocused:g,setInputRef:p};return b(Sz.Provider,{value:C,get children(){return b(qe,ne({as:"div",role:"group",onPointerDown:k},x,s))}})}function j5(e){const t=Eu(),n=ze({id:t.generateId("control")},e),[r,i]=ue(n,["onClick","onKeyDown"]);return b(qe,ne({as:"div",onClick:a=>{je(a,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:a=>{je(a,r.onKeyDown),a.key===vm.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),i))}function F5(e){const t=Eu(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescription(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function U5(e){const t=Eu(),n=ze({id:t.generateId("indicator")},e),[r,i]=ue(n,["ref","forceMount"]),[o,s]=he(),{present:a}=xo({show:()=>r.forceMount||t.isSelected(),element:()=>o()??null});return b(fe,{get when(){return a()},get children(){return b(qe,ne({as:"div",ref(l){var c=ut(s,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function Cz(e){const t=Li(),n=n1(),r=Eu(),i=ze({id:r.generateId("input")},e),[o,s]=ue(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]=he(!1),d=p=>{if(je(p,o.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=p.target;m.checked=r.isSelected()}u(!1)},h=p=>{je(p,o.onFocus),r.setIsFocused(!0)},f=p=>{je(p,o.onBlur),r.setIsFocused(!1)};return oe(wt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;u(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(()=>pe(r.registerInput(s.id))),b(qe,ne({as:"input",ref(p){var m=ut(r.setInputRef,o.ref);typeof m=="function"&&m(p)},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 _r({...ym},o.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:h,onBlur:f},()=>r.dataset(),s))}function H5(e){const t=Eu(),n=ze({id:t.generateId("label")},e);return oe(()=>pe(t.registerLabel(n.id))),b(qe,ne({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function B5(e){return b(oh,ne({as:"span"},e))}function Iz(e){let t;const n=`radiogroup-${fn()}`,r=ze({id:n,orientation:"vertical"},e),[i,o,s]=ue(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Yg),[a,l]=Dl({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>i.onChange?.(g)}),{formControlContext:c}=Xg(o);sh(()=>t,()=>l(i.defaultValue??""));const u=()=>c.getAriaLabelledBy(me(o.id),s["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),h=g=>g===e.defaultValue,f=g=>g===a(),m={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(ih.Provider,{value:c,get children(){return b(xz.Provider,{value:m,get children(){return b(qe,ne({as:"div",ref(g){var v=ut(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"radiogroup",get id(){return me(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 r1=Object.assign(Iz,{Description:Oa,ErrorMessage:Pa,Item:_z,ItemControl:j5,ItemDescription:F5,ItemIndicator:U5,ItemInput:Cz,ItemLabel:H5,Label:B5}),$z=yt();function Tz(){const e=pt($z);if(e===void 0)throw new Error("[kobalte]: `useSegmentedControlContext` must be used within a `SegmentedControl` component");return e}function h5e(e){const t=Tz(),[n,r]=ue(e,["style"]),[i,o]=he(),[s,a]=he(!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 oe(wt(t.selectedItem,()=>{a(!i()),l(),a(!1)})),M5(t.root,()=>{Qe(()=>{a(!0),l(),a(!1)})}),b(qe,ne({as:"div",role:"presentation",get style(){return _r(i(),n.style)},get"data-resizing"(){return s()},get"data-orientation"(){return t.orientation()}},r))}var p5e=e=>{const t=n1(),n=Tz(),[r,i]=ue(e,["ref"]),[o,s]=he();return oe(()=>{const a=o();a&&t.isSelectedValue(e.value)&&n.setSelectedItem(a)}),b(r1.Item,ne({ref(a){var l=ut(s,r.ref);typeof l=="function"&&l(a)}},i))},m5e=e=>{const t=Eu(),[n,r]=ue(e,["ref"]),[i,o]=he();return sh(i,()=>{requestAnimationFrame(()=>{t.isDefault()&&t.select()})}),b(r1.ItemInput,ne({ref(s){var a=ut(o,n.ref);typeof a=="function"&&a(s)}},r))},g5e=e=>{const t=ne({defaultValue:e.value,orientation:"horizontal"},e),[n,r]=ue(t,["ref"]),[i,o]=he(),[s,a]=he(),l={value:()=>r.value,defaultValue:()=>r.defaultValue,orientation:()=>r.orientation,root:i,selectedItem:s,setSelectedItem:a};return oe(()=>{l.value()||a(void 0)}),b($z.Provider,{value:l,get children(){return b(r1,ne({ref(c){var u=ut(o,n.ref);typeof u=="function"&&u(c)}},r))}})},ld=Object.assign(g5e,{Description:Oa,ErrorMessage:Pa,Indicator:h5e,Item:p5e,ItemControl:j5,ItemDescription:F5,ItemIndicator:U5,ItemInput:m5e,ItemLabel:H5,Label:B5}),v5e=ee("<div role=presentation data-slot=radio-group-wrapper><div role=presentation data-slot=radio-group-items>"),y5e=ee("<span data-slot=radio-group-item-control>");function T9(e){const[t,n]=ue(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(ld,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 Fe(()=>!!t.current)()?r(t.current):void 0},get defaultValue(){return Fe(()=>!!t.defaultValue)()?r(t.defaultValue):void 0},onChange:s=>t.onSelect?.(o(s)),get children(){var s=v5e(),a=s.firstChild;return F(s,b(ld.Indicator,{"data-slot":"radio-group-indicator"}),a),F(a,b(Wt,{get each(){return t.options},children:l=>b(ld.Item,{get value(){return r(l)},"data-slot":"radio-group-item",get"data-value"(){return r(l)},get children(){return[b(ld.ItemInput,{"data-slot":"radio-group-item-input"}),b(ld.ItemLabel,{"data-slot":"radio-group-item-label",get children(){var c=y5e();return F(c,()=>i(l)),c}})]}})})),s}}))}var b5e={};Cr(b5e,{Description:()=>Oa,ErrorMessage:()=>Pa,Input:()=>Az,Label:()=>oh,Root:()=>Dz,TextArea:()=>Mz,TextField:()=>Ya,useTextFieldContext:()=>V5});var Ez=yt();function V5(){const e=pt(Ez);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function Az(e){return b(Lz,ne({type:"text"},e))}function Lz(e){const t=Li(),n=V5(),r=ze({id:n.generateId("input")},e),[i,o,s]=ue(r,["onInput"],L5),{fieldProps:a}=D5(o);return b(qe,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 Ct([i.onInput,n.onInput])}},()=>t.dataset(),s))}function Dz(e){let t;const n=`textfield-${fn()}`,r=ze({id:n},e),[i,o,s]=ue(r,["ref","value","defaultValue","onChange"],Yg),a=i.value,[l,c]=Dl({value:()=>a===void 0?void 0:i.value??"",defaultValue:()=>i.defaultValue,onChange:f=>i.onChange?.(f)}),{formControlContext:u}=Xg(o);sh(()=>t,()=>c(i.defaultValue??""));const d=f=>{if(u.isReadOnly()||u.isDisabled())return;const p=f.target;c(p.value),p.value=l()??""},h={value:l,generateId:Nr(()=>me(o.id)),onInput:d};return b(ih.Provider,{value:u,get children(){return b(Ez.Provider,{value:h,get children(){return b(qe,ne({as:"div",ref(f){var p=ut(m=>t=m,i.ref);typeof p=="function"&&p(f)},role:"group",get id(){return me(o.id)}},()=>u.dataset(),s))}})}})}function Mz(e){let t;const n=V5(),r=ze({id:n.generateId("textarea")},e),[i,o]=ue(r,["ref","autoResize","submitOnEnter","onKeyPress"]);oe(wt([()=>t,()=>i.autoResize,()=>n.value()],([a,l])=>{!a||!l||w5e(a)}));const s=a=>{t&&i.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(Lz,ne({as:"textarea",get"aria-multiline"(){return i.submitOnEnter?"false":void 0},get onKeyPress(){return Ct([i.onKeyPress,s])},ref(a){var l=ut(c=>t=c,i.ref);typeof l=="function"&&l(a)}},o))}function w5e(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 Ya=Object.assign(Dz,{Description:Oa,ErrorMessage:Pa,Input:Az,Label:oh,TextArea:Mz}),k5e=ee("<div data-slot=input-wrapper>");function sa(e){const t=is(),[n,r]=ue(e,["name","defaultValue","value","onChange","onKeyDown","validationState","required","disabled","readOnly","class","label","hideLabel","description","error","variant","copyable","copyKind","multiline"]),[i,o]=he(!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 Qw(u)&&(Ot({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(Ya,{"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(fe,{get when(){return n.label},get children(){return b(Ya.Label,{"data-slot":"input-label",get classList(){return{"sr-only":n.hideLabel}},get children(){return n.label}})}}),(()=>{var u=k5e();return F(u,b(fe,{get when(){return n.multiline},get fallback(){return b(Ya.Input,ne(r,{"data-slot":"input-input",get class(){return n.class}}))},get children(){return b(Ya.TextArea,ne(r,{autoResize:!0,"data-slot":"input-input",get class(){return n.class}}))}}),null),F(u,b(fe,{get when(){return n.copyable},get children(){return b(In,{get value(){return s()},placement:"top",gutter:4,get forceOpen(){return i()},skipDelayDuration:0,get children(){return b(oi,{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(fe,{get when(){return n.description},get children(){return b(Ya.Description,{"data-slot":"input-description",get children(){return n.description}})}}),b(Ya.ErrorMessage,{"data-slot":"input-error",get children(){return n.error}})]}})}function x5e(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 S5e=ee('<div class="flex h-full items-center justify-center text-text-weak">'),_5e=ee('<div class="flex h-full items-center justify-center px-8 text-center text-14-regular text-text-weak">'),C5e=ee('<div class="flex flex-col gap-1">'),I5e=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 [&_[data-slot=input-wrapper]:focus-within]:!border-border-weak-base [&_[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">'),$5e=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 Oz=1440*60*1e3,T5e=10080*60*1e3,E5e=30*Oz,A5e=e=>[e.session.title,e.session.id,e.workspace.label,e.workspace.directory].join(" ").toLowerCase(),Hc=e=>e.time.archived??0,Pz=e=>Hc(e)+E5e,L5e=e=>Math.max(1,Math.ceil((Pz(e)-Date.now())/Oz)),D5e=(e,t)=>{const n=Hc(t.session)-Hc(e.session);return n!==0?n:t.session.id.localeCompare(e.session.id)};function M5e(e){const t=Qi(),n=To(),r=Rt(),i=Eo(),o={token:0},[s,a]=et({search:"",scope:"all",age:"all",loading:!0,error:!1,sessions:[]}),l=U(()=>[{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=U(()=>[{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(p=>t.client.session.list({directory:p.directory,roots:!0,archived:!0,limit:500}).then(m=>({failed:!1,items:(m.data??[]).filter(g=>!!g?.id&&!!g.time?.archived).map(g=>({session:g,workspace:p}))})).catch(()=>({failed:!0,items:[]})))).then(p=>{if(o.token!==f)return;const m=Date.now();a({loading:!1,error:p.some(g=>g.failed),sessions:p.flatMap(g=>g.items).filter(g=>Pz(g.session)>m).sort(D5e)})})},d=U(()=>{const f=s.search.trim().toLowerCase(),p=Date.now()-T5e;return s.sessions.filter(m=>s.scope==="all"||m.workspace.kind===s.scope).filter(m=>s.age==="all"?!0:s.age==="recent"?Hc(m.session)>=p:Hc(m.session)<p).filter(m=>!f||A5e(m).includes(f))}),h=f=>{i(`/${mt(f.workspace.directory)}/session/${f.session.id}`),n.close()};return en(u),b(tu,{get title(){return r.t("archiveSessions.title")},size:"large",get children(){var f=I5e(),p=f.firstChild,m=p.firstChild,g=m.firstChild,v=m.nextSibling,y=p.nextSibling;return F(g,b(sa,{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})),F(m,b(In,{get value(){return r.t("common.refresh")},placement:"top",get children(){return b(oi,{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),F(v,b(fe,{get when(){return l().length>1},get children(){return b(T9,{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),F(v,b(T9,{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),F(y,b(Al,{get children(){return[b(Mn,{get when(){return s.loading},get children(){var w=S5e();return F(w,b(e1,{class:"size-4"})),w}}),b(Mn,{get when(){return d().length===0},get children(){var w=_5e();return F(w,(()=>{var k=Fe(()=>!!s.error);return()=>k()?r.t("archiveSessions.error"):r.t("archiveSessions.empty")})()),w}}),b(Mn,{when:!0,get children(){var w=C5e();return F(w,b(Wt,{get each(){return d()},children:k=>{const x=U(()=>rz(k.session.title));return(()=>{var C=$5e(),S=C.firstChild,I=S.nextSibling,M=I.firstChild,D=M.nextSibling,O=D.firstChild,$=O.nextSibling,E=$.nextSibling,A=E.nextSibling,T=A.nextSibling,R=I.nextSibling,G=R.firstChild;return C.$$click=()=>h(k),F(S,b(Gt,{name:"archive",size:"small"})),F(M,x),F(O,()=>k.workspace.label),F(E,()=>r.t("archiveSessions.archivedAt",{time:x5e(new Date(Hc(k.session)).toISOString(),r.t)})),F(T,()=>r.t("archiveSessions.deletesIn",{count:L5e(k.session)})),F(R,b(Gt,{name:"eye",size:"small"}),G),F(G,()=>r.t("common.open")),C})()}})),w}})]}})),f}})}mr(["click"]);var O5e=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">'),P5e=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">'),E9=ee("<div>"),R5e=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)>'),N5e=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">'),z5e=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">'),j5e=ee('<span class="text-12-regular text-text-base truncate select-text">'),F5e=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">'),A9=ee('<div class="shrink-0 py-4">'),U5e=ee('<div class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar [overflow-anchor:none]">'),H5e=ee('<div class="relative flex-1 min-h-0">'),B5e=ee('<div class="flex-1 min-h-0 flex flex-col">'),V5e=ee('<div class="flex-1 min-h-0">'),q5e=ee('<div class="hidden xl:block absolute inset-y-0 z-30 w-0 overflow-visible">'),W5e=ee('<div class="relative bg-background-base flex-1 min-h-0 min-w-0 flex flex-col select-none [&_input]:select-text [&_textarea]:select-text [&_[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>'),by=ee("<div class=size-full>"),G5e=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 K5e(e){const t=gr(),n=t.scope,[r,i,,o]=pr(On.server(n,"layout.page",["layout.page.v1"]),et({lastProjectSession:{},activeProject:void 0,activeWorkspace:void 0,workspaceOrder:{},workspaceName:{},workspaceBranchName:{},workspaceExpanded:{},sessionExpanded:{}})),s=U(()=>o());let a,l=0,c=!1;const u=ui(),d=Qi(),h=or(),f=Hl(),p=U(()=>f.ready()),m=Xi(),g=yu(),v=th(),y=b5(),w=Eo();s2e(w),eh();const k=To(),x=tA(),C=Ere(),S=Rt(),I=Dr(u.dir),M=Ao();oe(()=>{const z=u.dir;z&&Dr(z)===void 0&&w("/",{replace:!0})});const D=U(()=>{const z=u.dir;if(!z)return{slug:z,dir:""};const H=Dr(z);if(!H)return{slug:z,dir:""};const Q=h.peek(H,{bootstrap:!1});return{slug:z,store:Q,dir:Q[0].path.directory||H}}),O=U(()=>{const z=M.pathname.match(/^\/cron\/worktree\/([^/?#]+)\/session(?:\/([^/?#]+))?/);if(z){const de=Dr(z[1]);return de?{cron:!0,dir:de,sessionID:z[2]?decodeURIComponent(z[2]):void 0,slug:z[1]}:void 0}const H=M.pathname.match(/^\/([^/]+)\/session(?:\/([^/?#]+))?/),Q=Dr(H?.[1]);if(!(!H||!Q))return{cron:!1,dir:Q,sessionID:H[2]?decodeURIComponent(H[2]):void 0,slug:H[1]}}),$=["system","light","dark"],E={system:"theme.scheme.system",light:"theme.scheme.light",dark:"theme.scheme.dark"},A=z=>S.t(E[z]),T=U(()=>D().dir||O()?.dir||""),R=z=>z==="/cron"||z.startsWith("/cron/"),G=z=>z==="/"||z==="/notifications"||z==="/modes"||z==="/models"||z==="/mcp"||z==="/plugins"||z==="/skills",K=U(()=>um(M.pathname)),q=U(()=>G(M.pathname)),W=U(()=>R(M.pathname)),N=U(()=>new URLSearchParams(M.search).get("projectID")??void 0),V=U(()=>!!O()?.dir&&!!O()?.sessionID&&(O()?.cron||new URLSearchParams(M.search).get("sidebar")==="cron")),J=U(()=>{if(V())return!0;const z=T(),H=u.id??O()?.sessionID;if(!z||!H)return!1;const[Q]=h.child(z,{bootstrap:!1}),de=Q.session.find(ye=>ye.id===H);return O5(de)}),ie=U(()=>W()||J());oe(wt(()=>O()?.dir,z=>{z&&h.project.loadSessions(z)},{defer:!0})),oe(wt(()=>[J(),O()?.cron,O()?.dir,O()?.sessionID],([z,H,Q,de])=>{if(!z||H||!Q||!de)return;const[ye]=h.child(Q,{bootstrap:!1}),ge=new URLSearchParams({sidebar:"cron"});ye.project&&ge.set("projectID",ye.project),w(`/cron/worktree/${mt(Q)}/session/${de}?${ge.toString()}`,{replace:!0})}));const re=U(()=>{const z=f.projects.list().filter(Te=>Te.id!=="global"),H=(h.data.project??[]).filter(Te=>Te.id!=="global"),Q=Te=>{if(Te)return z.find(Re=>Re.id===Te.id||Ve(Re.worktree)===Ve(Te.worktree))},de=(Te,Re)=>$l(Te.worktree,Re)||!!Te.sandboxes?.some(Ue=>$l(Ue,Re)),ye=M.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(ye){const Te=Dr(ye[1]);if(Te){const Re=z.find(ft=>ft.id===N())??Q(H.find(ft=>ft.id===N()));if(Re&&de(Re,Te))return Re;const Ue=z.find(ft=>Ve(ft.worktree)===Ve(Te))??Q(H.find(ft=>Ve(ft.worktree)===Ve(Te)));if(Ue)return Ue}}const ge=M.pathname.match(/^\/cron\/([^/?#]+)/);if(ge){const Te=N()??decodeURIComponent(ge[1]),Re=z.find(Ue=>Ue.id===Te)??Q(H.find(Ue=>Ue.id===Te));if(Re)return Re}const De=T();if(De){const Te=z.find(ft=>ft.worktree===De)??Q(H.find(ft=>ft.worktree===De));if(Te)return Te;const[Re]=h.child(De,{bootstrap:!1}),Ue=Re.project;if(Ue){const ft=z.find(it=>it.id===Ue)??Q(H.find(it=>it.id===Ue));if(ft)return ft}}}),ve=U(()=>Fke(M.pathname)),ce=U(()=>{if(p()){if(K())return"settings";if(q())return"global";if(ie()){const z=re();return`cron:${z?.id??z?.worktree??O()?.slug??u.dir??"unknown"}`}if(u.dir)return`project:${u.dir}`}}),[ae,Ce]=et({autoselect:!I&&!G(M.pathname)&&!um(M.pathname)&&!R(M.pathname),busyWorkspaces:{},hoverProject:void 0,scrollSessionKey:void 0,nav:void 0,sortNow:Date.now(),sizing:!1}),_e=Hwe(),We=(z,H)=>{const Q=Ve(z);if(H){Ce("busyWorkspaces",Q,!0);return}Ce("busyWorkspaces",Xe(de=>{delete de[Q]}))},_t=z=>!!ae.busyWorkspaces[Ve(z)],st={current:void 0},bt=()=>ae.sortNow;let Jt,Kt;const tt=()=>typeof document=="object"&&document.visibilityState==="hidden",jt=()=>{tt()||Ce("sortNow",Date.now())},sr=()=>{Kt===void 0&&(Kt=setInterval(jt,6e4))},Pt=()=>{Kt!==void 0&&(clearInterval(Kt),Kt=void 0)},vr=setTimeout(()=>{jt(),tt()||sr()},6e4-Date.now()%6e4),wn=o2e({enabled:()=>!1,active:()=>ae.hoverProject,el:()=>ae.nav?.querySelector("[data-component='sidebar-rail']")??ae.nav,onActivate:()=>{}});pe(()=>{c=!0,l+=1,st.current!==void 0&&clearTimeout(st.current),clearTimeout(vr),Kt&&clearInterval(Kt),Jt!==void 0&&clearTimeout(Jt),wn.reset()}),en(()=>{const z=()=>Ce("sizing",!1),H=()=>Ra(),Q=()=>{if(document.visibilityState!=="hidden"){sr();return}Pt(),Ra()};zn(window,"pointerup",z),zn(window,"pointercancel",z),zn(window,"blur",z),zn(window,"blur",H),zn(document,"visibilitychange",Q)});const $n=U(()=>!f.sidebar.opened()&&ae.hoverProject!==void 0),di=U(()=>f.sidebar.opened()||$n()),ar=z=>{Ce("hoverProject",z),wn.reset()},ds=()=>queueMicrotask(()=>ar(void 0));oe(wt(ce,(z,H)=>{if(z&&z!==H){if(ar(void 0),z==="global"){f.sidebar.close();return}f.sidebar.open()}})),oe(wt(()=>[p(),M.pathname,M.search,ie()],([z,,,H])=>{!z||!H||(ar(void 0),f.sidebar.open())}));const Jr=()=>{st.current!==void 0&&(clearTimeout(st.current),st.current=void 0)},Ra=()=>{Jr(),ar(void 0)},ch=()=>{f.sidebar.opened()||ae.hoverProject!==void 0&&(Jr(),st.current=window.setTimeout(()=>{st.current=void 0,ar(void 0)},300))},uh=U(()=>{const z=ae.hoverProject;if(z)return f.projects.list().find(H=>H.worktree===z)});oe(()=>{f.sidebar.opened()&&ar(void 0)}),oe(()=>{if(!ae.autoselect)return;const z=u.dir;!z||!Dr(z)||Ce("autoselect",!1)});const Au=_e.editorOpen,dh=_e.openEditor,Kl=_e.closeEditor,Zl=_e.setEditor,fi=_e.InlineEditor,fs=()=>{f.sidebar.opened()||Ra()},yr=z=>{fs(),w(z),f.mobileSidebar.hide()};function Lu(z=1){const H=C.colorScheme(),Q=$.indexOf(H),de=Q===-1?0:(Q+z+$.length)%$.length,ye=$[de];C.setColorScheme(ye),Ot({title:S.t("toast.scheme.title"),description:A(ye)})}function fh(z){z!==S.locale()&&(S.setLocale(z),Ot({title:S.t("toast.language.title"),description:S.t("toast.language.description",{language:S.label(z)})}))}function Du(z=1){const H=S.locales,Q=H.indexOf(S.locale()),de=Q===-1?0:(Q+z+H.length)%H.length,ye=H[de];ye&&fh(ye)}en(()=>{const z=new Map,H=new Map,Q=5e3,de=ge=>{const De=z.get(ge);De!==void 0&&(sl.dismiss(De),z.delete(ge),H.delete(ge))},ye=d.event.listen(ge=>{if(ge.details?.type==="worktree.ready"){We(ge.name,!1),k0.ready(ge.name,n.key);return}if(ge.details?.type==="worktree.failed"){We(ge.name,!1),k0.failed(ge.name,ge.details.properties?.message??S.t("common.requestFailed"),n.key);return}if(ge.details?.type==="question.replied"||ge.details?.type==="question.rejected"||ge.details?.type==="permission.replied"){const m1=ge.details.properties,kj=`${ge.name}:${m1.sessionID}`;de(kj);return}if(ge.details?.type!=="permission.asked"&&ge.details?.type!=="question.asked")return;const De=ge.details.type==="permission.asked"?S.t("notification.permission.title"):S.t("notification.question.title"),Te=ge.details.type==="permission.asked"?"checklist":"bubble-5",Re=ge.name,Ue=ge.details.properties;if(ge.details.type==="permission.asked"&&y.autoResponds(ge.details.properties,Re))return;const[ft]=h.child(Re,{bootstrap:!1}),it=ft.session.find(m1=>m1.id===Ue.sessionID),Ke=`${Re}:${Ue.sessionID}`,Tt=it?.title??S.t("command.session.new"),on=dr(Re),Ze=ge.details.type==="permission.asked"?S.t("notification.permission.description",{sessionTitle:Tt,projectName:on}):S.t("notification.question.description",{sessionTitle:Tt,projectName:on}),Mt=`/${mt(Re)}/session/${Ue.sessionID}`,xn=Date.now(),Ft=H.get(Ke)??0;if(xn-Ft<Q)return;H.set(Ke,xn),ge.details.type==="permission.asked"&&(g.sounds.permissionsEnabled()&&I2(g.sounds.permissions()),g.notifications.permissions()&&m.notify(De,Ze,Mt)),ge.details.type==="question.asked"&&g.notifications.agent()&&m.notify(De,Ze,Mt);const Un=u.id,Hn=Ve(Re)===Ve(T()),Fu=Hn&&Ue.sessionID===Un,p1=Hn&&it?.parentID===Un,bj=a2e({desktop:m.desktop,enabled:ge.details.type==="permission.asked"?g.notifications.permissions():g.notifications.agent()});if(!l2e({desktopNativeNotificationEnabled:bj,currentSessionTarget:Fu,childSessionTarget:p1})){de(Ke);return}de(Ke);const wj=Ot({persistent:!0,icon:Te,title:De,description:Ze,actions:[{label:S.t("notification.action.goToSession"),onClick:()=>w(Mt)},{label:S.t("common.dismiss"),onClick:"dismiss"}]});z.set(Ke,wj)});pe(ye),oe(()=>{const ge=u.id;if(!T()||!ge)return;const De=`${T()}:${ge}`;de(De);const[Te]=h.child(T(),{bootstrap:!1}),Re=Te.session.filter(Ue=>Ue.parentID===ge);for(const Ue of Re)de(`${T()}:${Ue.id}`)})});function c1(z,H){if(!a||ae.scrollSessionKey===H)return;const Q=a.querySelector(`[data-session-id="${z}"]`);if(!Q)return;const de=a.getBoundingClientRect(),ye=Q.getBoundingClientRect();if(ye.top>=de.top&&ye.bottom<=de.bottom){Ce("scrollSessionKey",H);return}Ce("scrollSessionKey",H),Q.scrollIntoView({block:"nearest",behavior:"smooth"})}const pn=U(()=>{if(ie())return re();const z=T();if(!z)return;const H=Ve(z),Q=f.projects.list(),de=Q.find(Ue=>Ue.sandboxes?.some(ft=>Ve(ft)===H));if(de)return de;const ye=Q.find(Ue=>Ve(Ue.worktree)===H);if(ye)return ye;const[ge]=h.child(z,{bootstrap:!1}),De=ge.project;if(!De)return;const Re=h.data.project.find(Ue=>Ue.id===De)?.worktree;if(Re)return Q.find(Ue=>Ue.worktree===Re)});oe(wt(()=>[s(),p(),q(),K(),ie(),T(),u.dir],([z,H,Q,de,ye,ge,De])=>{!z||!H||Q||de||ye||!ge||!De||f.projects.open(ge)}));const[ph]=ns(async()=>{if(await o.promise,await f.ready.promise,!ct(()=>ae.autoselect))return;const z=f.projects.list(),H=t.projects.last();if(z.length===0){if(!H)return;await ja(H,!0)}else{const Q=z.find(de=>de.worktree===H)??z[0];if(!Q)return;await ja(Q.worktree,!0)}}),Mu=(z,H,Q)=>{const de=Ve(z),ye=r.workspaceName[de]??r.workspaceName[z];if(ye)return ye;if(H&&Q)return r.workspaceBranchName[H]?.[Q]},Tn=(z,H,Q,de)=>{const ye=Ve(z);i("workspaceName",ye,H),Q&&de&&(r.workspaceBranchName[Q]||i("workspaceBranchName",Q,{}),i("workspaceBranchName",Q,de,H))},Mo=(z,H,Q)=>Mu(z,Q,H)??H??dr(z),mh=U(()=>{const z=pn();return!z||z.vcs!=="git"?!1:f.sidebar.workspaces(z.worktree)()}),Na=U(()=>{const z=pn();return Lwe({project:z,currentDirectory:T(),workspacesEnabled:mh(),workspaces:ju(z),expanded:r.workspaceExpanded})});oe(()=>{if(!s()||!p())return;const z=f.projects.list();for(const[H,Q]of Object.entries(r.workspaceExpanded)){if(!Q)continue;const de=Ve(H),ye=z.find(ge=>Ve(ge.worktree)===de||ge.sandboxes?.some(De=>Ve(De)===de));ye&&(ye.vcs==="git"&&f.sidebar.workspaces(ye.worktree)()||i("workspaceExpanded",H,!1))}});const Oo=U(()=>{const z=bt(),H=Na();if(H.length===0)return[];const Q=[];for(const de of H){const[ye]=h.child(de,{bootstrap:!0}),ge=kf(ye,z,de);Q.push(...ge)}return Q}),Ou=200,gh=2,u1=10,hi=4,to={value:0},Ws=new Map,Pu=10,Gs=new Map,Yl=z=>{const H=Gs.get(z);if(H)return H;const Q=new Set;return Gs.set(z,Q),Q},no=(z,H)=>{const Q=Yl(z);return JO({seen:Q,keep:H,limit:Pu,preserve:u.id&&Ve(z)===Ve(T())?[u.id]:void 0})};oe(()=>{const z=new Set(Na());for(const H of Gs.keys())z.has(H)||Gs.delete(H)}),oe(()=>{D(),d.url,to.value+=1,C0e(n.key),Ws.clear()}),oe(()=>{const z=new Set(Na());for(const[H,Q]of Ws)z.has(H)||(Q.pending.length=0,Q.pendingSet.clear(),Q.running===0&&Ws.delete(H))});const Ru=z=>{const H=Ws.get(z);if(H)return H;const Q={inflight:new Set,pending:[],pendingSet:new Set,running:0};return Ws.set(z,Q),Q},Xl=(z,H)=>{if(z.length===0)return H.slice().sort((de,ye)=>de.id<ye.id?-1:de.id>ye.id?1:0);const Q=new Map;for(const de of z)Q.set(de.id,de);for(const de of H)Q.set(de.id,de);return[...Q.values()].sort((de,ye)=>de.id<ye.id?-1:de.id>ye.id?1:0)};async function d1(z,H,Q){const[de,ye]=h.child(z,{bootstrap:!1});return I0e({scope:n.key,directory:z,sessionID:H,task:ge=>sn(()=>d.client.session.messages({directory:z,sessionID:H,limit:Ou})).then(De=>{if(to.value!==Q||!G8(n.key,z,H,ge))return;const Te=(De.data??[]).filter(Ze=>!!Ze?.info?.id),Re=Te.map(Ze=>Ze.info).filter(Ze=>!!Ze?.id),Ue=Xl([],Re),ft=no(z,H),it=De.response.headers.get("x-next-cursor")??void 0,Ke={limit:Ue.length,cursor:it,complete:!it,at:Date.now()};if(ft.length>0){qO(n.key,z,ft);for(const Ze of ft)h.todo.set(Ze,void 0)}const Tt=de.message[H]??[],on=Xl(Tt.filter(Ze=>!!Ze?.id),Ue);if(G8(n.key,z,H,ge))return Qe(()=>{ft.length>0&&ye(Xe(Ze=>{yg(Ze,ft)})),ye("message",H,$t(on,{key:"id"})),i2({scope:n.key,directory:z,sessionID:H,...Ke});for(const Ze of Te){const Mt=de.part[Ze.info.id]??[],xn=Xl(Mt.filter(Ft=>!!Ft?.id),Ze.parts.filter(Ft=>!!Ft?.id));ye("part",Ze.info.id,$t(xn,{key:"id"}))}}),Ke}).catch(()=>{})})}const Nu=z=>{const H=Ru(z);if(H.running>=gh)return;const Q=H.pending.shift();if(!Q)return;H.pendingSet.delete(Q),H.inflight.add(Q),H.running+=1;const de=to.value;d1(z,Q,de).finally(()=>{H.running-=1,H.inflight.delete(Q),Nu(z)})},Po=(z,H="low")=>{const Q=z.directory;if(!Q)return;const[de]=h.child(Q,{bootstrap:!1});if(ct(()=>{const Re=r2(n.key,Q,z.id);return S0e({message:de.message[z.id]!==void 0,info:Re,chunk:Ou})}))return;const ge=Ru(Q);if(ge.inflight.has(z.id))return;if(ge.pendingSet.has(z.id)){if(H!=="high")return;const Re=ge.pending.indexOf(z.id);Re>0&&(ge.pending.splice(Re,1),ge.pending.unshift(z.id));return}const De=Yl(Q);if(!(!De.has(z.id)&&De.size>=Pu&&H!=="high")){for(H==="high"&&ge.pending.unshift(z.id),H!=="high"&&ge.pending.push(z.id),ge.pendingSet.add(z.id);ge.pending.length>u1;){const Re=ge.pending.pop();Re&&ge.pendingSet.delete(Re)}Nu(Q)}},Jl=(z,H)=>{for(let Q=1;Q<=hi;Q++){const de=z[H+Q];de&&Po(de,Q===1?"high":"low");const ye=z[H-Q];ye&&Po(ye,Q===1?"high":"low")}};oe(()=>{const z=Oo();if(z.length===0)return;const H=u.id?z.findIndex(Q=>Q.id===u.id):0;if(H!==-1){if(!u.id){const Q=z[H];Q&&Po(Q,"high")}Jl(z,H)}});function Ye(z){const H=Oo();if(H.length===0)return;const Q=u.id?H.findIndex(ge=>ge.id===u.id):-1;let de;Q===-1?de=z>0?0:H.length-1:de=(Q+z+H.length)%H.length;const ye=H[de];ye&&(Po(ye,"high"),Jl(H,de),K5(ye))}function X(z){const H=f.projects.list();if(H.length===0)return;const Q=pn()?.worktree,de=T()?br(T()):void 0,ye=Q??de,ge=ye?H.findIndex(Te=>Te.worktree===ye):-1,De=ge===-1?z>0?H[0]:H[H.length-1]:H[(ge+z+H.length)%H.length];De&&(h.child(De.worktree),ja(De.worktree))}function we(z){const H=Oo();if(H.length===0||!H.some(ge=>v.session.unseenCount(ge.id)>0))return;const de=u.id?H.findIndex(ge=>ge.id===u.id):-1,ye=de===-1?z>0?-1:0:de;for(let ge=1;ge<=H.length;ge++){const De=z>0?(ye+ge)%H.length:(ye-ge+H.length)%H.length,Te=H[De];if(Te&&v.session.unseenCount(Te.id)!==0){Po(Te,"high"),Jl(H,De),K5(Te);return}}}async function Be(z){const[H,Q]=h.child(z.directory),de=H.session??[],ye=de.findIndex(De=>De.id===z.id),ge=de[ye+1]??de[ye-1];await d.client.session.update({directory:z.directory,sessionID:z.id,time:{archived:Date.now()}}),Q(Xe(De=>{const Te=nn.search(De.session,z.id,Re=>Re.id);Te.found&&De.session.splice(Te.index,1)})),z.id===u.id&&w(ge?`/${u.dir}/session/${ge.id}`:`/${u.dir}/session`)}x.register("layout",()=>{const z=[{id:"sidebar.toggle",title:S.t("command.sidebar.toggle"),category:S.t("command.category.view"),keybind:"mod+b",onSelect:()=>{M.pathname==="/"||M.pathname==="/notifications"||f.sidebar.toggle()}},{id:"project.open",title:S.t("command.project.open"),category:S.t("command.category.project"),keybind:"mod+o",onSelect:()=>zu()},{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:()=>tn()},...m.desktop?[{id:"server.switch",title:S.t("command.server.switch"),category:S.t("command.category.server"),onSelect:()=>Xn()}]:[],{id:"settings.open",title:S.t("command.settings.open"),category:S.t("command.category.settings"),keybind:"mod+comma",onSelect:()=>kn()},{id:"quickSwitcher.open",title:S.t("command.quickSwitcher.open"),category:S.t("command.category.view"),keybind:"mod+j",onSelect:()=>Ir()},{id:"session.previous",title:S.t("command.session.previous"),category:S.t("command.category.session"),keybind:"alt+arrowup",onSelect:()=>Ye(-1)},{id:"session.next",title:S.t("command.session.next"),category:S.t("command.category.session"),keybind:"alt+arrowdown",onSelect:()=>Ye(1)},{id:"session.previous.unseen",title:S.t("command.session.previous.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowup",onSelect:()=>we(-1)},{id:"session.next.unseen",title:S.t("command.session.next.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowdown",onSelect:()=>we(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 H=Oo().find(Q=>Q.id===u.id);H&&Be(H)}},{id:"workspace.new",title:S.t("workspace.new"),category:S.t("command.category.workspace"),keybind:"mod+shift+w",disabled:!mh(),onSelect:()=>{const H=pn();if(H)return e6(H)}},{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:!pn()||pn()?.vcs!=="git",onSelect:()=>{const H=pn();if(!H||H.vcs!=="git")return;const Q=f.sidebar.workspaces(H.worktree)();f.sidebar.toggleWorkspaces(H.worktree),Ot({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")})}}];z.push({id:"theme.scheme.cycle",title:S.t("command.theme.scheme.cycle"),category:S.t("command.category.theme"),keybind:"mod+shift+s",onSelect:()=>Lu(1)});for(const H of $)z.push({id:`theme.scheme.${H}`,title:S.t("command.theme.scheme.set",{scheme:A(H)}),category:S.t("command.category.theme"),onSelect:()=>C.commitPreview(),onHighlight:()=>(C.previewColorScheme(H),()=>C.cancelPreview())});z.push({id:"language.cycle",title:S.t("command.language.cycle"),category:S.t("command.category.language"),onSelect:()=>Du(1)});for(const H of S.locales)z.push({id:`language.set.${H}`,title:S.t("command.language.set",{language:S.label(H)}),category:S.t("command.category.language"),onSelect:()=>fh(H)});return z});function tn(){const z=++l;j(()=>import("./dialog-select-provider-BdYHSwX5.js").then(H=>H.d),__vite__mapDeps([99,98,100,101])).then(H=>{c||l!==z||k.show(()=>b(H.DialogSelectProvider,{}))})}function Xn(){if(!m.desktop)return;if(m.serverManager){m.serverManager.show();return}const z=++l;j(()=>import("./dialog-select-server-3yVZhthq.js"),__vite__mapDeps([97,98])).then(H=>{c||l!==z||k.show(()=>b(H.DialogSelectServer,{}))})}function kn(){yr("/settings")}function Ir(){const z=++l;j(()=>import("./dialog-quick-switcher-B4nARhhS.js"),[]).then(H=>{c||l!==z||k.show(()=>b(H.DialogQuickSwitcher,{get currentDirectory(){return T()},onChooseProject:()=>void zu(),onSwitchServer:()=>Xn()}))})}function br(z){const H=Ve(z),Q=f.projects.list().find(Te=>Ve(Te.worktree)===H||Te.sandboxes?.some(Re=>Ve(Re)===H));if(Q)return Q.worktree;const de=Object.entries(r.workspaceOrder).find(([Te,Re])=>Ve(Te)===H||Re.some(Ue=>Ve(Ue)===H));if(de)return de[0];const[ye]=h.child(z,{bootstrap:!1}),ge=ye.project;return ge?h.data.project.find(Te=>Te.id===ge)?.worktree??z:z}function Qr(z){return pn()?.worktree??br(z)}function Ql(z,H,Q=Qr(z)){return i("lastProjectSession",Q,{directory:z,id:H,at:Date.now()}),Q}function Rn(z){r.lastProjectSession[z]&&i("lastProjectSession",Xe(H=>{delete H[z]}))}function vh(z,H,Q=Qr(z)){return Ql(z,H,Q),v.session.markViewed(H),ct(()=>r.workspaceExpanded[z])===!1&&i("workspaceExpanded",z,!0),requestAnimationFrame(()=>c1(H,`${z}:${H}`)),Q}async function za(z){if(!z)return;const H=br(z),Q=`/${mt(H)}/session`;t.projects.touch(H),yr(Q);const de=f.projects.list().find(it=>it.worktree===H);let ye=de?S0(H,[H,...de.sandboxes??[]],r.workspaceOrder[H]):[H];const ge=it=>it?ye.some(Ke=>Ve(Ke)===Ve(it)):!1,De=async it=>{if(!it||it===H||ge(it))return ge(it);const Ke=await d.client.worktree.list({directory:H}).then(Tt=>Tt.data??[]).catch(()=>[]);return ye=S0(H,[H,...Ke],r.workspaceOrder[H]),ge(it)},Te=async it=>{if(!ge(it.directory))return!1;const[Ke]=h.child(it.directory,{bootstrap:!1});if(Ke.session.some(on=>on.id===it.id))return i("lastProjectSession",H,{directory:it.directory,id:it.id,at:Date.now()}),yr(`/${mt(it.directory)}/session/${it.id}`),!0;const Tt=await d.client.session.get({sessionID:it.id}).then(on=>on.data).catch(()=>{});return!Tt?.directory||!ge(Tt.directory)?!1:(i("lastProjectSession",H,{directory:Tt.directory,id:Tt.id,at:Date.now()}),yr(`/${mt(Tt.directory)}/session/${Tt.id}`),!0)},Re=r.lastProjectSession[H];if(Re?.id){if(await De(Re.directory),await Te(Re))return;Rn(H)}const Ue=v9(ye.map(it=>h.child(it,{bootstrap:!1})[0]),Date.now());if(Ue&&await Te(Ue))return;const ft=v9(await Promise.all(ye.map(async it=>({path:{directory:it},session:await d.client.session.list({directory:it}).then(Ke=>Ke.data??[]).catch(()=>[])}))),Date.now());ft&&await Te(ft)}function K5(z){z&&yr(`/${mt(z.directory)}/session/${z.id}`)}function ja(z,H=!0){if(f.projects.open(z),H)return za(z)}const Z5=z=>{if(t.isLocal()){for(const H of Rwe(z))ja(H);for(const H of Nwe(z)){ja(H.directory,!1);const Q=mt(H.directory);H.prompt&&d2e(n.key,Q,{prompt:H.prompt});const de=H.prompt?`/${Q}/session?prompt=${encodeURIComponent(H.prompt)}`:`/${Q}/session`;yr(de)}}};en(()=>{const z=H=>{const de=H.detail?.urls??[];de.length!==0&&Z5(de)};Z5(zwe(window)),zn(window,Mwe,z)});async function nj(z,H){const Q=P5(z);if(H===Q)return;const de=H===dr(z.worktree)?"":H;if(z.id&&z.id!=="global"){await d.client.project.update({projectID:z.id,directory:z.worktree,name:de});return}h.project.meta(z.worktree,{name:de})}const rj=(z,H,Q,de)=>{(Mu(z,Q,de)??de??dr(z))!==H&&Tn(z,H,Q,de)};function Y5(z){const H=f.projects.list(),Q=Ve(z),de=H.findIndex(De=>Ve(De.worktree)===Q),ye=Ve(pn()?.worktree??"")===Q;if(de===-1)return;const ge=H[de+1];if(!ye){f.projects.close(z);return}if(!ge){f.projects.close(z),w("/");return}yr(`/${mt(ge.worktree)}/session`),f.projects.close(z),queueMicrotask(()=>{za(ge.worktree)})}function X5(z){if(f.sidebar.workspaces(z.worktree)()){f.sidebar.toggleWorkspaces(z.worktree);return}z.vcs==="git"&&f.sidebar.toggleWorkspaces(z.worktree)}const J5=z=>{const H=++l;j(()=>import("./dialog-edit-project-4li3-60L.js"),[]).then(Q=>{c||l!==H||k.show(()=>b(Q.DialogEditProject,{project:z}))})};async function zu(){function z(H){if(Array.isArray(H)){for(const Q of H)ja(Q,!1);za(H[0])}else H&&ja(H)}if(m.openDirectoryPickerDialog&&t.isLocal()){const H=await m.openDirectoryPickerDialog?.({title:S.t("command.project.open"),multiple:!0});z(H)}else{const H=++l;j(()=>import("./dialog-select-directory-C2S4PKyb.js"),__vite__mapDeps([102,103,98])).then(Q=>{c||l!==H||k.show(()=>b(Q.DialogSelectDirectory,{multiple:!0,onSelect:z}),()=>z(null))})}}const ij=async(z,H,Q=!1)=>{if(H===z)return;const de=T(),ye=Ve(de),ge=Ve(H),De=Q||!!u.dir&&ye===ge;!Q&&De&&yr(`/${mt(z)}/session`),We(H,!0);const Te=await d.client.worktree.remove({directory:z,worktreeRemoveInput:{directory:H}}).then(Tt=>Tt.data).catch(Tt=>(Ot({title:S.t("workspace.delete.failed.title"),description:vy(Tt,S.t("common.requestFailed"))}),!1));if(We(H,!1),!Te||(Ve(r.lastProjectSession[z]?.directory??"")===Ve(H)&&Rn(z),h.set("project",Xe(Tt=>{const on=Tt.find(Ze=>Ze.worktree===z);on&&(on.sandboxes=(on.sandboxes??[]).filter(Ze=>Ze!==H))})),i("workspaceOrder",z,Tt=>(Tt??[]).filter(on=>on!==H)),f.projects.close(H),f.projects.open(z),De))return;const Re=T(),Ue=Ve(Re),ft=f.projects.list().find(Tt=>Tt.worktree===z),Ke=(ft?S0(z,[z,...ft.sandboxes??[]],r.workspaceOrder[z]):[z]).some(Tt=>Ve(Tt)===Ue);u.dir&&br(Re)===z&&!Ke&&yr(`/${mt(z)}/session`)},oj=async(z,H)=>{if(H===z)return;We(H,!0);const Q=Ot({persistent:!0,title:S.t("workspace.resetting.title"),description:S.t("workspace.resetting.description")}),de=()=>sl.dismiss(Q),ye=await d.client.session.list({directory:H}).then(Te=>Te.data??[]).catch(()=>[]);if(mve(n,H,ye.map(Te=>Te.id),m),await d.client.instance.dispose({directory:H}).catch(()=>{}),!await d.client.worktree.reset({directory:z,worktreeResetInput:{directory:H}}).then(Te=>Te.data).catch(Te=>(Ot({title:S.t("workspace.reset.failed.title"),description:vy(Te,S.t("common.requestFailed"))}),!1))){We(H,!1),de();return}const De=Date.now();await Promise.all(ye.filter(Te=>Te.time.archived===void 0).map(Te=>d.client.session.update({sessionID:Te.id,directory:Te.directory,time:{archived:De}}).catch(()=>{}))),We(H,!1),de(),Ot({title:S.t("workspace.reset.success.title"),description:S.t("workspace.reset.success.description"),actions:[{label:S.t("command.session.new"),onClick:()=>{const Te=`/${mt(H)}/session`;w(Te),f.mobileSidebar.hide()}},{label:S.t("common.dismiss"),onClick:"dismiss"}]})};function sj(z){const H=U(()=>dr(z.directory)),[Q,de]=et({status:"loading",dirty:!1});en(()=>{d.client.file.status({directory:z.directory}).then(De=>{const Re=(De.data??[]).length>0;de({status:"ready",dirty:Re})}).catch(()=>{de({status:"error",dirty:!1})})});const ye=()=>{const De=!!u.dir&&Ve(T())===Ve(z.directory);De&&yr(`/${mt(z.root)}/session`),k.close(),ij(z.root,z.directory,De)},ge=()=>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(tu,{get title(){return S.t("workspace.delete.title")},fit:!0,get children(){var De=O5e(),Te=De.firstChild,Re=Te.firstChild,Ue=Re.nextSibling,ft=Te.nextSibling;return F(Re,()=>S.t("workspace.delete.confirm",{name:H()})),F(Ue,ge),F(ft,b(Qt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),F(ft,b(Qt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ye,get children(){return S.t("workspace.delete.button")}}),null),De}})}function aj(z){const H=U(()=>dr(z.directory)),[Q,de]=et({status:"loading",dirty:!1,sessions:[]}),ye=async()=>{const ft=(await d.client.session.list({directory:z.directory}).then(it=>it.data??[]).catch(()=>[])).filter(it=>it.time.archived===void 0);de({sessions:ft})};en(()=>{d.client.file.status({directory:z.directory}).then(Ue=>{const it=(Ue.data??[]).length>0;de({status:"ready",dirty:it}),ye()}).catch(()=>{de({status:"error",dirty:!1})})});const ge=()=>{k.close(),oj(z.root,z.directory)},De=()=>Q.sessions.length,Te=()=>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"),Re=()=>{const Ue=De();return Ue===0?S.t("workspace.reset.archived.none"):Ue===1?S.t("workspace.reset.archived.one"):S.t("workspace.reset.archived.many",{count:Ue})};return b(tu,{get title(){return S.t("workspace.reset.title")},fit:!0,get children(){var Ue=P5e(),ft=Ue.firstChild,it=ft.firstChild,Ke=it.nextSibling,Tt=Ke.firstChild,on=Tt.nextSibling;on.nextSibling;var Ze=ft.nextSibling;return F(it,()=>S.t("workspace.reset.confirm",{name:H()})),F(Ke,Te,Tt),F(Ke,Re,on),F(Ke,()=>S.t("workspace.reset.note"),null),F(Ze,b(Qt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),F(Ze,b(Qt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ge,get children(){return S.t("workspace.reset.button")}}),null),Ue}})}const wr={session:"",sessionProject:"",directory:""};oe(wt(()=>[s(),D().slug,u.id,pn()?.worktree,T()],([z,H,Q,de,ye])=>{if(!z||!H||!ye){wr.session="",wr.sessionProject="",wr.directory="";return}if(!Q){wr.session="",wr.sessionProject="",wr.directory="";return}const ge=`${H}/${Q}`;if(!de){wr.session=ge,wr.directory=ye,wr.sessionProject="";return}if(t.projects.last()!==de&&t.projects.touch(de),ge!==wr.session||ye!==wr.directory){wr.session=ge,wr.directory=ye,wr.sessionProject=vh(ye,Q,de);return}de!==wr.sessionProject&&(wr.directory=ye,wr.sessionProject=Ql(ye,Q,de))})),oe(()=>{const z=f.sidebar.opened()?f.sidebar.width():48;document.documentElement.style.setProperty("--dialog-left-margin",`${z}px`)});const yh=U(()=>Math.max(f.sidebar.width(),244)),f1=U(()=>Math.max(yh()-64,0)),bh=new Set;oe(wt(Na,z=>{if(z.length===0){bh.clear();return}const H=new Set(z);for(const Q of H)bh.has(Q)||h.project.loadSessions(Q);bh.clear();for(const Q of H)bh.add(Q)},{defer:!0}));function lj(z){const H=am(z);H&&(ar(void 0),i("activeProject",H))}function cj(z){const{draggable:H,droppable:Q}=z;if(H&&Q){const de=f.projects.list(),ye=de.findIndex(De=>De.worktree===H.id.toString()),ge=de.findIndex(De=>De.worktree===Q.id.toString());ye!==ge&&ge!==-1&&f.projects.move(H.id.toString(),ge)}}function uj(){i("activeProject",void 0)}function ju(z){if(!z)return[];const H=z.worktree,Q=[H,...z.sandboxes??[]],de=pn(),ye=Ve(de?.worktree??"")===Ve(z.worktree)?T():void 0,ge=ye&&Ve(ye)!==Ve(H)&&!Q.some(Re=>Ve(Re)===Ve(ye))?ye:void 0,De=ge?k0.get(ge,n.key)?.status==="pending":!1,Te=S0(H,Q,r.workspaceOrder[z.worktree]);return De&&ge?[H,ge,...Te.filter(Re=>Re!==H)]:!ge||De?Te:[...Te,ge]}function dj(z,H){return ju(z).filter(Q=>!H||Ve(Q)===Ve(H)).map(Q=>{const de=h.child(Q,{bootstrap:!1})[0],ye=Ve(Q)===Ve(z.worktree)?"local":"sandbox",ge=Mo(Q,de.vcs?.branch,z.id);return{directory:Q,kind:ye,label:`${ye==="local"?S.t("workspace.type.local"):S.t("workspace.type.sandbox")} : ${ge}`}})}function fj(z,H){k.show(()=>b(M5e,{get workspaces(){return dj(z,H)}}))}const Q5=U(()=>{if(f.sidebar.opened())return pn();const z=uh();return z||pn()});function hj(z){const H=am(z);H&&i("activeWorkspace",H)}function pj(z){const{draggable:H,droppable:Q}=z;if(!H||!Q)return;const de=Q5();if(!de)return;const ye=ju(de),ge=ye.findIndex(Ue=>Ue===H.id.toString()),De=ye.findIndex(Ue=>Ue===Q.id.toString());if(ge===-1||De===-1||ge===De)return;const Te=ye.slice(),[Re]=Te.splice(ge,1);Re&&(Te.splice(De,0,Re),i("workspaceOrder",de.worktree,Te.filter(Ue=>Ve(Ue)!==Ve(de.worktree))))}function mj(){i("activeWorkspace",void 0)}const e6=async z=>{fs();const H=await d.client.worktree.create({directory:z.worktree}).then(ge=>ge.data).catch(ge=>{Ot({title:S.t("workspace.create.failed.title"),description:vy(ge,S.t("common.requestFailed"))})});if(!H?.directory)return;Tn(H.directory,H.branch,z.id,H.branch);const Q=z.worktree,de=Ve(H.directory),ye=Ve(Q);We(H.directory,!0),k0.pending(H.directory,n.key),i("workspaceExpanded",de,!0),de!==H.directory&&i("workspaceExpanded",H.directory,!0),i("workspaceOrder",z.worktree,ge=>{const Te=(ge??[]).filter(Re=>{const Ue=Ve(Re);return Ue!==ye&&Ue!==de});return[H.directory,...Te]}),h.child(H.directory),yr(`/${mt(H.directory)}/session`)},t6={currentDir:T,navList:Oo,sidebarExpanded:di,sidebarHovering:$n,clearHoverProjectSoon:ds,prefetchSession:Po,archiveSession:Be,workspaceName:Mu,renameWorkspace:rj,editorOpen:Au,openEditor:dh,closeEditor:Kl,setEditor:Zl,InlineEditor:fi,isBusy:_t,workspaceExpanded:(z,H)=>r.workspaceExpanded[z]??H,setWorkspaceExpanded:(z,H)=>i("workspaceExpanded",z,H),sessionExpanded:z=>r.sessionExpanded[z]??!0,setSessionExpanded:(z,H)=>i("sessionExpanded",z,H),showResetWorkspaceDialog:(z,H)=>k.show(()=>b(aj,{root:z,directory:H})),showDeleteWorkspaceDialog:(z,H)=>k.show(()=>b(sj,{root:z,directory:H})),showArchivedSessionsDialog:z=>{const H=pn();H&&fj(H,z)},setScrollContainerRef:(z,H)=>{H||(a=z)}},gj={currentDir:T,currentProject:pn,sidebarOpened:()=>f.sidebar.opened(),sidebarHovering:$n,hoverProject:()=>ae.hoverProject,onProjectMouseEnter:(z,H)=>wn.enter(z,H),onProjectMouseLeave:z=>wn.leave(z),onProjectFocus:z=>wn.activate(z),onHoverOpenChanged:(z,H)=>{!H&&ae.hoverProject&&ae.hoverProject!==z||Ce("hoverProject",H?z:void 0)},navigateToProject:za,openSidebar:()=>f.sidebar.open(),closeProject:Y5,showEditProjectDialog:J5,toggleProjectWorkspaces:X5,workspacesEnabled:z=>z.vcs==="git"&&f.sidebar.workspaces(z.worktree)(),workspaceIds:ju,workspaceLabel:Mo,sessionProps:{navList:Oo,sidebarExpanded:di,clearHoverProjectSoon:ds,prefetchSession:Po,archiveSession:Be,sessionExpanded:z=>r.sessionExpanded[z]??!0,setSessionExpanded:(z,H)=>i("sessionExpanded",z,H)}},n6=z=>{const H=z.project,Q=U(()=>z.mobile||(z.merged??f.sidebar.opened())),de=U(()=>!u.dir&&f.projects.list().length===0),ye=U(()=>{const Ze=H();return Ze?Ze.name||dr(Ze.worktree):""}),ge=U(()=>H()?.id??""),De=U(()=>H()?.worktree??""),Te=U(()=>T()||De()),Re=U(()=>{const Ze=De();return Ze?mt(Ze):""}),Ue=U(()=>{const Ze=H();return Ze?ju(Ze):[]}),ft=U(()=>Ue().reduce((Ze,Mt)=>Ze+v.project.unseenCount(Mt),0)),it=()=>Ue().filter(Ze=>v.project.unseenCount(Ze)>0).forEach(Ze=>v.project.markViewed(Ze)),Ke=U(()=>{const Ze=H();return!Ze||Ze.vcs!=="git"?!1:f.sidebar.workspaces(Ze.worktree)()}),Tt=U(()=>{const Ze=H();return Ze?Ze.vcs==="git"||f.sidebar.workspaces(Ze.worktree)():!1}),on=U(()=>h.data.path.home);return(()=>{var Ze=E9();return F(Ze,b(fe,{get when(){return H()},keyed:!0,get fallback(){return b(fe,{get when(){return de()},get fallback(){return b(fe,{get when(){return z.mobile},get children(){var Mt=N5e(),xn=Mt.firstChild,Ft=xn.nextSibling,Un=Ft.nextSibling;return F(xn,()=>S.t("home.projects.title")),F(Ft,b(Wt,{get each(){return h1()},children:Hn=>(()=>{var Fu=z5e(),p1=Fu.firstChild;return Fu.$$click=()=>{w(`/${mt(Hn.worktree)}/session`),f.mobileSidebar.hide()},F(p1,()=>Hn.name||dr(Hn.worktree)),Fu})()})),F(Un,b(Qt,{size:"normal",icon:"folder-add-left",onClick:zu,get children(){return S.t("command.project.open")}})),Mt}})},get children(){var Mt=R5e(),xn=Mt.firstChild,Ft=xn.firstChild,Un=Ft.firstChild,Hn=Un.nextSibling;return F(Un,()=>S.t("sidebar.empty.title")),F(Hn,()=>S.t("sidebar.empty.description")),F(xn,b(Qt,{size:"large",icon:"folder-add-left",onClick:zu,get children(){return S.t("command.project.open")}}),null),Mt}})},children:Mt=>[(()=>{var xn=F5e(),Ft=xn.firstChild,Un=Ft.firstChild;return F(Un,b(fi,{get id(){return`project:${ge()}`},value:ye,onSave:Hn=>{nj(Mt,Hn)},class:"text-14-medium text-text-strong truncate",displayClass:"text-14-medium text-text-strong truncate",stopPropagation:!0}),null),F(Un,b(In,{placement:"bottom",gutter:2,get value(){return De()},class:"shrink-0",contentStyle:{"max-width":"640px",transform:"translate3d(52px, 0, 0)"},get children(){var Hn=j5e();return F(Hn,()=>De().replace(on(),"~")),Hn}}),null),F(Ft,b(un,{get modal(){return!$n()},get children(){return[b(un.Trigger,{as:oi,icon:"dot-grid",variant:"ghost","data-action":"project-menu",get"data-project"(){return Re()},class:"shrink-0 size-6 rounded-md transition-opacity data-[expanded]:bg-surface-base-active",get classList(){return{"opacity-100":z.mobile||Q(),"opacity-0 group-hover/project:opacity-100 group-focus-within/project:opacity-100 data-[expanded]:opacity-100":!z.mobile&&!Q()}},get"aria-label"(){return S.t("common.moreOptions")}}),b(un.Portal,{get children(){return b(un.Content,{class:"mt-1",get children(){return[b(un.Item,{onSelect:()=>{J5(Mt)},get children(){return b(un.ItemLabel,{get children(){return S.t("common.edit")}})}}),b(un.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return Re()},get disabled(){return!Tt()},onSelect:()=>{X5(Mt)},get children(){return b(un.ItemLabel,{get children(){return Fe(()=>!!Ke())()?S.t("sidebar.workspaces.disable"):S.t("sidebar.workspaces.enable")}})}}),b(un.Item,{"data-action":"project-clear-notifications",get"data-project"(){return Re()},get disabled(){return ft()===0},onSelect:it,get children(){return b(un.ItemLabel,{get children(){return S.t("sidebar.project.clearNotifications")}})}}),b(un.Separator,{}),b(un.Item,{"data-action":"project-close-menu",get"data-project"(){return Re()},onSelect:()=>{const Hn=De();Hn&&Y5(Hn)},get children(){return b(un.ItemLabel,{get children(){return S.t("common.close")}})}})]}})}})]}}),null),xn})(),(()=>{var xn=B5e();return F(xn,b(fe,{get when(){return Ke()},get fallback(){return[(()=>{var Ft=A9();return F(Ft,b(Qt,{size:"large",icon:"new-session",class:"w-full",onClick:()=>{const Un=Te();Un&&yr(`/${mt(Un)}/session`)},get children(){return S.t("command.session.new")}})),Ft})(),(()=>{var Ft=V5e();return F(Ft,b(J4e,{ctx:t6,project:Mt,directory:Te,sortNow:bt,get mobile(){return z.mobile}})),Ft})()]},get children(){return[(()=>{var Ft=A9();return F(Ft,b(Qt,{size:"large",icon:"plus-small",class:"w-full",onClick:()=>{e6(Mt)},get children(){return S.t("workspace.new")}})),Ft})(),(()=>{var Ft=H5e();return F(Ft,b(pN,{onDragStart:hj,onDragEnd:mj,onDragOver:pj,collisionDetector:fN,get children(){return[b(mN,{}),b(SN,{}),(()=>{var Un=U5e();return Sr(Hn=>{z.mobile||(a=Hn)},Un),F(Un,b(yN,{get ids(){return Ue()},get children(){return b(Wt,{get each(){return Ue()},children:Hn=>b(X4e,{ctx:t6,directory:Hn,project:Mt,sortNow:bt,get mobile(){return z.mobile}})})}})),Un})(),b(gN,{get children(){return b(K4e,{sidebarProject:Q5,activeWorkspace:()=>r.activeWorkspace,workspaceLabel:Mo})}})]}})),Ft})()]}})),xn})()]})),Me(Mt=>{var xn={"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":z.mobile,"max-w-full overflow-hidden":z.mobile},Ft=z.mobile?void 0:`${f1()}px`;return Mt.e=Et(Ze,xn,Mt.e),Ft!==Mt.t&&ii(Ze,"width",Mt.t=Ft),Mt},{e:void 0,t:void 0}),Ze})()},h1=()=>f.projects.list(),vj=()=>b(Ake,{projects:h1,activeProject:()=>r.activeProject}),yj=z=>{yr(jke(z))},r6=z=>b(Wke,{mobile:z,opened:()=>f.sidebar.opened(),get aimMove(){return wn.move},projects:h1,renderProject:H=>b(Mke,{ctx:gj,project:H,sortNow:bt,mobile:z}),handleDragStart:lj,handleDragEnd:uj,handleDragOver:cj,get openProjectLabel(){return S.t("command.project.open")},openProjectKeybind:()=>x.keybind("project.open"),onOpenProject:zu,renderProjectOverlay:vj,settingsLabel:()=>S.t("sidebar.settings"),settingsKeybind:()=>x.keybind("settings.open"),onOpenSettings:kn,restartLabel:()=>S.t("sidebar.restart"),restartConfirm:()=>S.t("sidebar.restart.confirm"),onRestart:()=>{m.restart?.()},renderPanel:()=>K()?b(Uke,{mobile:z,merged:!0,get width(){return f1()},current:ve,onSelect:yj}):ie()?(()=>{var H=E9();return F(H,b(u5e,{mobile:z,merged:!0,projectID:()=>re()?.id,projectWorktree:()=>re()?.worktree})),Me(Q=>{var de={"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":!z,"flex-1 min-w-0 max-w-full overflow-hidden":!!z},ye=z?void 0:`${f1()}px`;return Q.e=Et(H,de,Q.e),ye!==Q.t&&ii(H,"width",Q.t=ye),Q},{e:void 0,t:void 0}),H})():z?b(n6,{project:pn,mobile:!0}):b(n6,{project:pn,merged:!0})});return(()=>{var z=W5e(),H=z.firstChild,Q=H.firstChild,de=Q.firstChild,ye=de.firstChild,ge=ye.firstChild,De=ye.nextSibling,Te=De.nextSibling,Re=Te.firstChild,Ue=Re.nextSibling,ft=Te.nextSibling,it=ft.firstChild;return F(z,()=>ph()??"",H),F(z,b(Cwe,{}),H),ye.addEventListener("mouseleave",()=>{wn.reset(),$n()&&ch()}),ye.addEventListener("mouseenter",()=>{Jr()}),Sr(Ke=>{Ce("nav",Ke)},ye),Et(ye,{"hidden xl:block":!0,"absolute inset-y-0 left-0":!0,"z-10":!0}),F(ge,r6),F(de,b(fe,{get when(){return f.sidebar.opened()},get children(){var Ke=q5e();return Ke.$$pointerdown=()=>Ce("sizing",!0),F(Ke,b(Kve,{direction:"horizontal",get size(){return f.sidebar.width()},min:244,get max(){return typeof window>"u"?1e3:window.innerWidth*.3+64},onResize:Tt=>{Ce("sizing",!0),Jt!==void 0&&clearTimeout(Jt),Jt=window.setTimeout(()=>Ce("sizing",!1),120),f.sidebar.resize(Tt)}})),Me(Tt=>ii(Ke,"left",`${yh()}px`)),Ke}}),De),Re.$$click=Ke=>{Ke.target===Ke.currentTarget&&f.mobileSidebar.hide()},Ue.$$click=Ke=>Ke.stopPropagation(),F(Ue,()=>r6(!0)),Et(it,{"size-full overflow-hidden flex flex-col items-start contain-strict bg-background-base":!0}),F(it,b(fe,{get when(){return!ph.loading},get fallback(){return by()},get children(){return b(X9,{fallback:(Ke,Tt)=>{const on=Ke instanceof Error?Ke.message:String(Ke);if((/failed to fetch dynamically imported module/i.test(on)||/importing a module script failed/i.test(on)||/dynamically imported module/i.test(on))&&typeof window<"u"){const Mt="codeplane-stale-chunk-reload";if(sessionStorage.getItem(Mt)!=="1")return sessionStorage.setItem(Mt,"1"),window.location.reload(),by()}return(()=>{var Mt=G5e(),xn=Mt.firstChild,Ft=xn.nextSibling;return F(xn,()=>S.t("error.page.title")),F(Ft,()=>on||S.t("error.chain.unknown")),F(Mt,b(Qt,{onClick:Tt,get children(){return S.t("common.refresh")}}),null),Mt})()},get children(){return b(J9,{get fallback(){return by()},get children(){return e.children}})}})}})),F(H,(()=>{var Ke=Fe(()=>!1);return()=>Ke()&&b(v2e,{})})(),null),F(z,b(ra.Region,{}),null),Me(Ke=>{var Tt=S.t("sidebar.nav.projectsAndSessions"),on=`${yh()}px`,Ze={"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()},Mt=S.t("sidebar.nav.projectsAndSessions"),xn={"@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]":!!pn(),"w-[78vw] max-w-[300px]":!pn(),"translate-x-0":f.mobileSidebar.opened(),"-translate-x-full":!f.mobileSidebar.opened()},Ft={"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":!ae.sizing},Un=f.sidebar.opened()?`${yh()}px`:"4rem";return Tt!==Ke.e&&Je(ye,"aria-label",Ke.e=Tt),on!==Ke.t&&ii(ye,"width",Ke.t=on),Ke.a=Et(Re,Ze,Ke.a),Mt!==Ke.o&&Je(Ue,"aria-label",Ke.o=Mt),Ke.i=Et(Ue,xn,Ke.i),Ke.n=Et(ft,Ft,Ke.n),Un!==Ke.s&&ii(ft,"--main-left",Ke.s=Un),Ke},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),z})()}mr(["click","pointerdown"]);var Z5e=ee("<option>"),Y5e=ee("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function X5e(e){let t;const[n,r]=ue(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),i=Li(),[o,s]=he(!1),a=l=>{const c=n.collection.getItem(l);return b(fe,{get when(){return c?.type==="item"},get children(){var u=Z5e();return u.value=l,F(u,()=>c?.textValue),Me(()=>u.selected=n.selectionManager.isSelected(l)),u}})};return oe(wt(()=>n.selectionManager.selectedKeys(),(l,c)=>{c&&FR(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=Y5e(),c=l.firstChild,u=c.nextSibling;u.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),u.addEventListener("change",h=>{je(h,n.onChange),o()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var d=ut(h=>t=h,n.ref);return typeof d=="function"&&Sr(d,u),Wr(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),F(u,b(fe,{get when(){return n.isVirtualized},get fallback(){return b(Wt,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return b(Wt,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Me(h=>{var f=ym,p=n.selectionManager.isFocused()||n.isOpen?-1:0,m=i.isRequired(),g=i.isDisabled(),v=i.isReadOnly();return h.e=gm(l,f,h.e),p!==h.t&&Je(c,"tabindex",h.t=p),m!==h.a&&(c.required=h.a=m),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 L9=new WeakMap;function J5e(e){let t=L9.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return L9.set(e,t),t}var Q5e={};Cr(Q5e,{Item:()=>i1,ItemDescription:()=>o1,ItemIndicator:()=>s1,ItemLabel:()=>a1,Listbox:()=>e6e,Root:()=>W5,Section:()=>l1,useListboxContext:()=>Nz});var Rz=yt();function Nz(){const e=pt(Rz);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var zz=yt();function q5(){const e=pt(zz);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function i1(e){let t;const n=Nz(),r=`${n.generateId("item")}-${fn()}`,i=ze({id:r},e),[o,s]=ue(i,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=he(),[c,u]=he(),d=()=>n.listState().selectionManager(),h=()=>d().focusedKey()===o.item.key,f=Lg({key:()=>o.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>o.item.disabled},()=>t),p=()=>{if(d().selectionMode()!=="none")return f.isSelected()},m=U(()=>!(Cf()&&a_())),g=()=>m()?o["aria-label"]:void 0,v=()=>m()?a():void 0,y=()=>m()?c():void 0,w=()=>{if(!n.isVirtualized())return;const I=n.listState().collection().getItem(o.item.key)?.index;return I!=null?I+1:void 0},k=()=>{if(n.isVirtualized())return J5e(n.listState().collection())},x=I=>{je(I,o.onPointerMove),I.pointerType==="mouse"&&!f.isDisabled()&&n.shouldFocusOnHover()&&(mn(I.currentTarget),d().setFocused(!0),d().setFocusedKey(o.item.key))},C=U(()=>({"data-disabled":f.isDisabled()?"":void 0,"data-selected":f.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),S={isSelected:f.isSelected,dataset:C,generateId:Nr(()=>s.id),registerLabelId:an(l),registerDescriptionId:an(u)};return b(zz.Provider,{value:S,get children(){return b(qe,ne({as:"li",ref(I){var M=ut(D=>t=D,o.ref);typeof M=="function"&&M(I)},role:"option",get tabIndex(){return f.tabIndex()},get"aria-disabled"(){return f.isDisabled()},get"aria-selected"(){return p()},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 Ct([o.onPointerDown,f.onPointerDown])},get onPointerUp(){return Ct([o.onPointerUp,f.onPointerUp])},get onClick(){return Ct([o.onClick,f.onClick])},get onKeyDown(){return Ct([o.onKeyDown,f.onKeyDown])},get onMouseDown(){return Ct([o.onMouseDown,f.onMouseDown])},get onFocus(){return Ct([o.onFocus,f.onFocus])},onPointerMove:x},C,s))}})}function o1(e){const t=q5(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescriptionId(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function s1(e){const t=q5(),n=ze({id:t.generateId("indicator")},e),[r,i]=ue(n,["forceMount"]);return b(fe,{get when(){return r.forceMount||t.isSelected()},get children(){return b(qe,ne({as:"div","aria-hidden":"true"},()=>t.dataset(),i))}})}function a1(e){const t=q5(),n=ze({id:t.generateId("label")},e);return oe(()=>pe(t.registerLabelId(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function W5(e){let t;const n=`listbox-${fn()}`,r=ze({id:n,selectionMode:"single",virtualized:!1},e),[i,o]=ue(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=U(()=>i.state?i.state:Dg({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>me(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>me(i.disallowEmptySelection),selectionBehavior:()=>me(i.selectionBehavior),selectionMode:()=>me(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),a=VR({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>me(i.autoFocus),shouldFocusWrap:()=>me(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>me(i.disallowEmptySelection),selectOnFocus:()=>me(i.selectOnFocus),disallowTypeAhead:()=>me(i.disallowTypeAhead),shouldUseVirtualFocus:()=>me(i.shouldUseVirtualFocus),allowsTabNavigation:()=>me(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>t,()=>i.scrollRef?.()),l={listState:s,generateId:Nr(()=>o.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return b(Rz.Provider,{value:l,get children(){return b(qe,ne({as:"ul",ref(c){var u=ut(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 Ct([i.onKeyDown,a.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,a.onMouseDown])},get onFocusIn(){return Ct([i.onFocusIn,a.onFocusIn])},get onFocusOut(){return Ct([i.onFocusOut,a.onFocusOut])}},o,{get children(){return b(fe,{get when(){return!i.virtualized},get fallback(){return i.children?.(s().collection)},get children(){return b(mF,{get each(){return[...s().collection()]},by:"key",children:c=>b(Al,{get children(){return[b(Mn,{get when(){return c().type==="section"},get children(){return i.renderSection?.(c())}}),b(Mn,{get when(){return c().type==="item"},get children(){return i.renderItem?.(c())}})]}})})}})}}))}})}function l1(e){return b(qe,ne({as:"li",role:"presentation"},e))}var e6e=Object.assign(W5,{Item:i1,ItemDescription:o1,ItemIndicator:s1,ItemLabel:a1,Section:l1}),t6e={};Cr(t6e,{Arrow:()=>Ai,Content:()=>Fz,Description:()=>Oa,ErrorMessage:()=>Pa,HiddenSelect:()=>Uz,Icon:()=>Hz,Item:()=>i1,ItemDescription:()=>o1,ItemIndicator:()=>s1,ItemLabel:()=>a1,Label:()=>Bz,Listbox:()=>Vz,Portal:()=>qz,Root:()=>Wz,Section:()=>l1,Select:()=>Pi,Trigger:()=>Gz,Value:()=>Kz,useSelectContext:()=>qs});var jz=yt();function qs(){const e=pt(jz);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Fz(e){let t;const n=qs(),[r,i]=ue(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),o=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return wm({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),km({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),bm({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(mn(n.triggerRef()),a.preventDefault())}},()=>t),b(fe,{get when(){return n.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(a){var l=ut(c=>{n.setContentRef(c),t=c},r.ref);typeof l=="function"&&l(a)},get disableOutsidePointerEvents(){return Fe(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return _r({"--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 Uz(e){const t=qs();return b(X5e,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 Hz(e){const t=qs(),n=ze({children:"▼"},e);return b(qe,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Bz(e){const t=qs(),[n,r]=ue(e,["onClick"]);return b(oh,ne({as:"span",onClick:o=>{je(o,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Vz(e){const t=qs(),n=ze({id:t.generateId("listbox")},e),[r,i]=ue(n,["ref","id","onKeyDown"]);return oe(()=>pe(t.registerListboxId(r.id))),b(W5,ne({ref(s){var a=ut(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=>{je(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},i))}function qz(e){const t=qs();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}function n6e(e){const t=`select-${fn()}`,n=ze({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,i,o,s]=ue(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"],Yg),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(),[v,y]=he(),[w,k]=he(),[x,C]=he(!0),S=ce=>{const ae=r.optionValue;return ae==null?String(ce):String(_f(ae)?ae(ce):ce[ae])},I=U(()=>{const ce=r.optionGroupChildren;return ce==null?r.options:r.options.flatMap(ae=>ae[ce]??ae)}),M=U(()=>I().map(ce=>S(ce))),D=ce=>[...ce].map(ae=>I().find(Ce=>S(Ce)===ae)).filter(ae=>ae!=null),O=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:ce=>r.onOpenChange?.(ce)}),$=Dg({selectedKeys:()=>r.value!=null?r.value.map(S):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(S):r.defaultValue,onSelectionChange:ce=>{r.onChange?.(D(ce)),r.closeOnSelection&&K()},allowDuplicateSelectionEvents:()=>me(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>me(r.disallowEmptySelection),selectionBehavior:()=>me(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),E=U(()=>D($.selectionManager().selectedKeys())),A=ce=>{$.selectionManager().toggleSelection(S(ce))},{present:T}=xo({show:()=>r.forceMount||O.isOpen(),element:()=>m()??null}),R=()=>{const ce=v();ce&&mn(ce)},G=ce=>{if(r.options.length<=0)return;C(ce),O.open();let ae=$.selectionManager().firstSelectedKey();ae==null&&(ce==="first"?ae=$.collection().getFirstKey():ce==="last"&&(ae=$.collection().getLastKey())),R(),$.selectionManager().setFocused(!0),$.selectionManager().setFocusedKey(ae)},K=()=>{O.close(),$.selectionManager().setFocused(!1),$.selectionManager().setFocusedKey(void 0)},q=ce=>{O.isOpen()?K():G(ce)},{formControlContext:W}=Xg(o);sh(f,()=>{const ce=r.defaultValue?[...r.defaultValue].map(S):new Bo;$.selectionManager().setSelectedKeys(ce)});const N=wR({usage:"search",sensitivity:"base"}),V=U(()=>{const ce=me(r.keyboardDelegate);return ce||new BR($.collection,void 0,N)}),J=ce=>r.itemComponent?.({item:ce}),ie=ce=>r.sectionComponent?.({section:ce});oe(wt([M],([ce])=>{const Ce=[...$.selectionManager().selectedKeys()].filter(_e=>ce.includes(_e));$.selectionManager().setSelectedKeys(Ce)},{defer:!0}));const re=U(()=>({"data-expanded":O.isOpen()?"":void 0,"data-closed":O.isOpen()?void 0:""})),ve={dataset:re,isOpen:O.isOpen,isDisabled:()=>W.isDisabled()??!1,isMultiple:()=>me(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??ve.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:E,contentPresent:T,autoFocus:x,triggerRef:f,listState:()=>$,keyboardDelegate:V,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:k,setTriggerRef:p,setContentRef:g,setListboxRef:y,open:G,close:K,toggle:q,placeholder:()=>r.placeholder,renderItem:J,renderSection:ie,removeOptionFromSelection:A,generateId:Nr(()=>me(o.id)),registerTriggerId:an(l),registerValueId:an(u),registerListboxId:an(h)};return b(ih.Provider,{value:W,get children(){return b(jz.Provider,{value:ve,get children(){return b(cs,ne({anchorRef:f,contentRef:m},i,{get children(){return b(qe,ne({as:"div",role:"group",get id(){return me(o.id)}},()=>W.dataset(),re,s))}}))}})}})}function Wz(e){const[t,n]=ue(e,["value","defaultValue","onChange","multiple"]),r=U(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),i=U(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return b(n6e,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 Gz(e){const t=Li(),n=qs(),r=ze({id:n.generateId("trigger")},e),[i,o,s]=ue(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],L5),a=()=>n.listState().selectionManager(),l=()=>n.keyboardDelegate(),c=()=>i.disabled||n.isDisabled(),{fieldProps:u}=D5(o),{typeSelectHandlers:d}=UR({keyboardDelegate:l,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,f=y=>{je(y,i.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},p=y=>{je(y,i.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=y=>{if(je(y,i.onKeyDown),!c())switch(je(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=>{je(y,i.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{je(y,i.onBlur),!n.isOpen()&&a().setFocused(!1)};return oe(()=>pe(n.registerTriggerId(u.id()))),oe(()=>{n.setListboxAriaLabelledBy([u.ariaLabelledBy(),u.ariaLabel()&&!u.ariaLabelledBy()?u.id():null].filter(Boolean).join(" ")||void 0)}),b(rs,ne({ref(y){var w=ut(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 Fe(()=>!!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:p,onKeyDown:m,onFocus:g,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Kz(e){const t=Li(),n=qs(),r=ze({id:n.generateId("value")},e),[i,o]=ue(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const l=s().selectedKeys();return l.size===1&&l.has("")?!0:s().isEmpty()};return oe(()=>pe(n.registerValueId(i.id))),b(qe,ne({as:"span",get id(){return i.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),o,{get children(){return b(fe,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return b(r6e,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:l=>n.removeOptionFromSelection(l),clear:()=>s().clearSelection()},get children(){return i.children}})}})}}))}function r6e(e){const t=El(()=>{const n=e.children;return _f(n)?n(e.state):n});return Fe(t)}var Pi=Object.assign(Wz,{Arrow:Ai,Content:Fz,Description:Oa,ErrorMessage:Pa,HiddenSelect:Uz,Icon:Hz,Item:i1,ItemDescription:o1,ItemIndicator:s1,ItemLabel:a1,Label:Bz,Listbox:Vz,Portal:qz,Section:l1,Trigger:Gz,Value:Kz});function D9(e){const[t,n]=ue(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)};pe(i);const a=U(()=>gf(t.options,C2(c=>t.groupBy?t.groupBy(c):""),L1e(),x1e(([c,u])=>({category:c,options:u}))));return b(Pi,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(Pi.Section,{"data-slot":"select-section",get children(){return l.section.rawValue.category}}),itemComponent:l=>b(Pi.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(Pi.ItemLabel,{"data-slot":"select-select-item-label",get children(){return Fe(()=>!!t.children)()?t.children(l.item.rawValue):Fe(()=>!!t.label)()?t.label(l.item.rawValue):l.item.rawValue}}),b(Pi.ItemIndicator,{"data-slot":"select-select-item-indicator",get children(){return b(Gt,{name:"check-small",size:"small"})}})]}})),onChange:l=>{t.onSelect?.(l??void 0),i()},onOpenChange:l=>{t.onOpenChange?.(l),l||i()},get children(){return[b(Pi.Trigger,ne(()=>t.triggerProps,{get disabled(){return e.disabled},"data-slot":"select-select-trigger",as:Qt,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(Pi.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(Pi.Icon,{"data-slot":"select-select-trigger-icon",get children(){return b(Gt,{get name(){return t.triggerVariant==="settings"?"selector":"chevron-down"},size:"small"})}})]}})),b(Pi.Portal,{get children(){return b(Pi.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(Pi.Listbox,{"data-slot":"select-select-content-list"})}})}})]}}))}var i6e=ee("<span>");function M9(e){const[t,n]=ue(e,["size","class","classList","children"]);return(()=>{var r=i6e();return Wr(r,ne(n,{"data-component":"tag",get"data-size"(){return t.size||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}),!1,!0),F(r,()=>t.children),r})()}const O9=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function o6e(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??{}))O9(i)&&n.set(r,i);for(const[r,i]of Object.entries(e.config?.agent??{}))O9(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 s6e=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">'),a6e=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">'),l6e=ee('<ul class="overflow-hidden rounded-lg border border-border-weaker-base bg-background-base shadow-[var(--shadow-xs)]">'),c6e=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)]">'),u6e=ee('<div class="mt-0.5 truncate text-12-regular text-text-weak">'),d6e=ee("<span>·"),f6e=ee("<span>: "),h6e=ee('<div class="mt-1.5 text-12-regular text-text-critical-base whitespace-pre-wrap break-words line-clamp-3">'),p6e=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">'),m6e=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">'),g6e=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-1 rounded-md border border-border-weak-base p-0.5 self-start"><button type=button class="px-3 py-1 rounded text-13-regular transition-colors">Cron</button><button type=button class="px-3 py-1 rounded text-13-regular 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 v6e=["cron","tasks"],y6e=5e3,b6e=6e4;function P9(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 w6e(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 wy(){const e=ui(),t=Ao(),n=gr(),r=or(),i=U(()=>n.current?.http),o=U(()=>(r.data.project??[]).filter(p=>p.id!=="global")),s=U(()=>Dr(e.dir)),a=U(()=>new URLSearchParams(t.search).get("projectID")??void 0),l=U(()=>e.projectID??a()),c=U(()=>{const p=s();return p?z2(p,o(),a()):o().find(m=>m.id===l())}),u=U(()=>wz(c(),l())),d=Eo();oe(()=>{const p=c();p&&(e.dir||d(`/cron/worktree/${mt(p.worktree)}${p.id?`?projectID=${encodeURIComponent(p.id)}`:""}`,{replace:!0}))});const h=ka(()=>({queryKey:[...v6e,n.scope.key,u(),s()],queryFn:async()=>{const p=i(),m=u(),g=s();return p?m?Qo.list(p,{projectID:m}):g?Qo.list(p,{directory:g}):[]:[]},enabled:!!i()&&(!!u()||!!s()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:y6e,gcTime:b6e,retry:1})),f=U(()=>(h.data??[]).filter(p=>{const m=u(),g=s();return kz(p,{projectID:m,project:c(),directory:g})}));return(()=>{var p=s6e(),m=p.firstChild;return F(m,b(k6e,{selectedProject:c}),null),F(m,b(x6e,{server:i,tasks:f,selectedProject:c}),null),p})()}function k6e(e){const t=Rt(),n=To(),r=()=>{const i=e.selectedProject();if(!i?.worktree){Ot({variant:"error",title:t.t("common.requestFailed"),description:t.t("cron.create.noProject")});return}n.show(()=>b(Zz,{project:i}))};return(()=>{var i=a6e(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling;return F(a,()=>t.t("cron.title")),F(l,()=>t.t("cron.subtitle")),F(o,b(Qt,{variant:"primary",size:"large",icon:"plus-small",onClick:r,get children(){return t.t("cron.create")}}),null),i})()}function x6e(e){const t=Rt(),n=To(),r=i=>{const o=e.selectedProject();o?.worktree&&n.show(()=>b(Zz,{project:o,existing:i}))};return b(fe,{get when(){return e.tasks().length>0},get fallback(){return(()=>{var i=c6e();return F(i,(()=>{var o=Fe(()=>!!e.selectedProject());return()=>o()?t.t("cron.empty.project"):t.t("cron.empty")})()),i})()},get children(){var i=l6e();return F(i,b(Wt,{get each(){return e.tasks()},children:o=>b(S6e,{task:o,get server(){return e.server},onEdit:()=>r(o)})})),i}})}function S6e(e){const t=Rt(),n=pu(),r=Rt().intl,i=()=>n.invalidateQueries({queryKey:["cron"]}),o=Pd(()=>({mutationFn:async l=>{const c=e.server();if(!c)throw new Error("No server connection");return Qo.setStatus(c,e.task.id,l)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),s=Pd(()=>({mutationFn:async()=>{const l=e.server();if(!l)throw new Error("No server connection");return Qo.trigger(l,e.task.id)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),a=Pd(()=>({mutationFn:async()=>{if(!confirm(t.t("cron.delete.confirm")))return;const l=e.server();if(!l)throw new Error("No server connection");return Qo.remove(l,e.task.id)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})}));return(()=>{var l=p6e(),c=l.firstChild,u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling,p=f.firstChild,m=p.nextSibling,g=m.nextSibling,v=g.firstChild,y=u.nextSibling;return F(d,b(Gt,{name:"bell",size:"small",class:"icon-strong-base shrink-0"}),h),F(h,()=>e.task.name),F(d,b(M9,{get children(){return t.t(`cron.status.${e.task.status}`)}}),null),F(d,b(fe,{get when(){return e.task.lastRunStatus},get children(){return b(M9,{get children(){return t.t(`cron.run.status.${e.task.lastRunStatus}`)}})}}),null),F(u,b(fe,{get when(){return e.task.description},get children(){var w=u6e();return F(w,()=>e.task.description),w}}),f),F(p,()=>w6e(e.task,t)),F(g,()=>t.t("cron.next"),v),F(g,(()=>{var w=Fe(()=>e.task.status==="active");return()=>w()?P9(e.task.nextRunAt,r())??t.t("cron.never"):"—"})(),null),F(f,b(fe,{get when(){return e.task.lastRunAt},get children(){return[d6e(),(()=>{var w=f6e(),k=w.firstChild;return F(w,()=>t.t("cron.last"),k),F(w,()=>P9(e.task.lastRunAt,r()),null),w})()]}}),null),F(u,b(fe,{get when(){return Fe(()=>!!e.task.lastError)()&&e.task.lastRunStatus!=="success"},get children(){var w=h6e();return F(w,()=>e.task.lastError),w}}),null),F(y,b(In,{get value(){return t.t("cron.action.trigger")},placement:"top",get children(){return b(oi,{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),F(y,b(fe,{get when(){return e.task.status==="active"},get fallback(){return b(In,{get value(){return t.t("cron.action.resume")},placement:"top",get children(){return b(oi,{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(In,{get value(){return t.t("cron.action.pause")},placement:"top",get children(){return b(oi,{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),F(y,b(In,{get value(){return t.t("cron.action.edit")},placement:"top",get children(){return b(oi,{icon:"edit",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.edit")},get onClick(){return e.onEdit}})}}),null),F(y,b(In,{get value(){return t.t("cron.action.delete")},placement:"top",get children(){return b(oi,{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 _6e(e){return e instanceof Error&&"status"in e}function C6e(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 Zz(e){const t=Rt(),n=To(),r=pu(),i=gr(),o=eh(),s=or(),a=Qi(),l=U(()=>i.current?.http),c=ka(()=>({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=U(()=>o6e({agents:c.data,config:s.data.config,defaultLabel:t.t("common.default")})),d=U(()=>{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,p]=et(h()),m=()=>{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=C6e(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 p("errors",y),Object.keys(y).length===0},g=y=>{if(p("errors",{}),!_6e(y)){p("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),p("errors",w)},v=Pd(()=>({mutationFn:async()=>{if(!m()){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 Qo.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 Qo.create(y,x)}},onSuccess:()=>{r.invalidateQueries({queryKey:["cron"]}),n.close()},onError:y=>{y instanceof Error&&y._validation||(g(y),Ot({variant:"error",title:t.t("common.requestFailed"),description:y instanceof Error?y.message:String(y)}))}}));return b(tu,{get title(){return Fe(()=>!!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=g6e(),w=y.firstChild,k=w.firstChild,x=k.firstChild,C=x.nextSibling,S=C.firstChild,I=S.nextSibling,M=k.nextSibling,D=M.firstChild,O=D.firstChild,$=M.nextSibling,E=$.firstChild,A=w.nextSibling;return y.addEventListener("submit",T=>{T.preventDefault(),v.mutate()}),F(w,b(sa,{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=>p("name",T),get error(){return f.errors.name}}),k),F(w,b(sa,{get label(){return t.t("cron.field.description")},get placeholder(){return t.t("cron.field.description")},get value(){return f.description},onChange:T=>p("description",T)}),k),F(w,b(sa,{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=>p("prompt",T),get error(){return f.errors.prompt},class:"max-h-40 w-full overflow-y-auto"}),k),F(x,()=>t.t("cron.field.scheduleKind")),S.$$click=()=>p("scheduleKind","cron"),I.$$click=()=>p("scheduleKind","interval"),F(w,b(fe,{get when(){return f.scheduleKind==="cron"},get fallback(){return b(sa,{get label(){return t.t("cron.field.schedule.interval")},placeholder:"60",type:"number",get value(){return f.intervalMinutes},onChange:T=>p("intervalMinutes",T),get error(){return f.errors.schedule},inputmode:"numeric"})},get children(){return b(sa,{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=>p("cronExpression",T),get error(){return f.errors.schedule},spellcheck:!1,class:"font-mono text-xs"})}}),M),F(M,b(sa,{get label(){return t.t("cron.field.timeout")},placeholder:"30",type:"number",get value(){return f.timeoutMinutes},onChange:T=>p("timeoutMinutes",T),get error(){return f.errors.timeout},inputmode:"numeric"}),D),F(O,()=>t.t("cron.field.agent")),F(D,b(D9,{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=>p("agent",T?.name??"")}),null),F(E,()=>t.t("cron.field.model")),F($,b(D9,{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=>p("model",T?`${T.providerID}/${T.modelID}`:"")}),null),F(w,b(fe,{get when(){return f.errors.form},get children(){var T=m6e();return F(T,()=>f.errors.form),T}}),null),F(A,b(Qt,{type:"button",variant:"ghost",size:"large",onClick:()=>n.close(),get children(){return t.t("common.cancel")}}),null),F(A,b(Qt,{type:"submit",variant:"primary",size:"large",get disabled(){return v.isPending},get children(){return Fe(()=>!!v.isPending)()?t.t("common.saving"):t.t("common.save")}}),null),Me(T=>{var R={"bg-surface-base-active text-text-strong":f.scheduleKind==="cron","text-text-base hover:text-text-strong":f.scheduleKind!=="cron"},G={"bg-surface-base-active text-text-strong":f.scheduleKind==="interval","text-text-base hover:text-text-strong":f.scheduleKind!=="interval"};return T.e=Et(S,R,T.e),T.t=Et(I,G,T.t),T},{e:void 0,t:void 0}),y}})}mr(["click"]);var I6e=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>'),$6e=ee('<p class="text-xs text-text-weak">');const C0=`
|
|
2447
|
+
`)[0]}:{detail:t}}async function No(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",...Gke(e),...n.headers??{}},o=await fetch(r,{cache:"no-store",...n,headers:i});if(!o.ok){let s;try{s=Zke(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 Qo={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 No(e,`/global/cron${r?`?${r}`:""}`)},get(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}`)},create(e,t){return No(e,"/global/cron",{method:"POST",body:JSON.stringify(t)})},update(e,t,n){return No(e,`/global/cron/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(n)})},remove(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}`,{method:"DELETE"})},setStatus(e,t,n){return No(e,`/global/cron/${encodeURIComponent(t)}/status`,{method:"POST",body:JSON.stringify({status:n})})},trigger(e,t){return No(e,`/global/cron/${encodeURIComponent(t)}/trigger`,{method:"POST"})},listRuns(e,t,n){const r=n?`?limit=${n}`:"";return No(e,`/global/cron/${encodeURIComponent(t)}/runs${r}`)},getRun(e,t){return No(e,`/global/cron/runs/${encodeURIComponent(t)}`)},cancelRun(e,t){return No(e,`/global/cron/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"})}};function z5(e){if(!e)return[];const t=new Set;return[e.worktree,...e.sandboxes??[]].filter(n=>{if(!n)return!1;const r=Sa(n);return t.has(r)?!1:(t.add(r),!0)})}function Yke(e,t){return t.some(n=>$l(n,e))}function C9(e,t){return z5(t).reduce((n,r)=>$l(r,e)?Math.max(n,Sa(r).length):n,-1)}function z2(e,t,n){if(!e)return;const r=n?t.find(o=>o.id===n):void 0;if(r&&C9(e,r)>=0)return r;const i=t.map((o,s)=>({project:o,index:s,score:C9(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 wz(e,t){return e?.id??t}function kz(e,t){if(t.projectID)return e.projectID===t.projectID;const n=t.project?z5(t.project):t.directory?[t.directory]:[];return Yke(e.directory,n)}var I9=ee('<div class="flex items-center gap-2 px-2 py-2 min-w-0"><span class="text-14-medium text-text-strong truncate">'),Xke=ee('<div class="shrink-0 px-3 pt-4 pb-1 text-11-medium text-text-weak uppercase tracking-wider">'),Jke=ee('<nav class="flex-1 min-h-0 overflow-y-auto no-scrollbar flex flex-col px-1">'),Qke=ee('<div class="flex flex-col min-h-0 flex-1 py-2"><div class="shrink-0 px-1">'),e5e=ee('<div class="shrink-0 px-1">'),t5e=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),n5e=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),r5e=ee('<div class="size-1.5 rounded-full">'),i5e=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">'),o5e=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 [&:has(:focus-visible)]:bg-surface-raised-base-hover">'),s5e=ee('<div class="opacity-60 cursor-default">');const a5e=5e3,l5e=3e3,$9=6e4;function c5e(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const u5e=e=>{const t=Rt(),n=Ao(),r=gr(),i=or(),o=U(()=>r.current?.http),s=U(()=>n.pathname==="/cron"||n.pathname.startsWith("/cron/")),a=U(()=>new URLSearchParams(n.search).get("projectID")??void 0),l=U(()=>{const y=e.projectID?.(),w=(i.data.project??[]).filter(S=>S.id!=="global");if(y){const S=w.find(I=>I.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=Dr(k[1]);return z2(S,w,a())}const x=n.pathname.match(/^\/cron\/([^/?#]+)/);if(x){const S=a()??decodeURIComponent(x[1]),I=w.find(M=>M.id===S);if(I)return{id:I.id,worktree:I.worktree,sandboxes:I.sandboxes}}const C=n.pathname.match(/^\/([^/]+)\/session\//);if(C){const S=Dr(C[1]);return z2(S,w,a())}}),c=U(()=>wz(l(),a())),u=U(()=>l()?.worktree),d=U(()=>z5(l())),h=U(()=>d().flatMap(y=>{const[w]=i.child(y,{bootstrap:!1});return w.session}));oe(()=>{d().forEach(y=>void i.project.loadSessions(y))});const f=ka(()=>({queryKey:["cron","sidebar-panel-tasks",r.scope.key,c(),u()],queryFn:async()=>{const y=o(),w=c(),k=u();return!y||!w&&!k?[]:w?Qo.list(y,{projectID:w}):Qo.list(y,{directory:k})},enabled:!!o()&&(!!c()||!!u()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:a5e,gcTime:$9,retry:1})),p=U(()=>(f.data??[]).filter(y=>kz(y,{projectID:c(),project:l(),directory:u()}))),m=ka(()=>({queryKey:["cron","sidebar-panel-runs",r.scope.key,c(),p().map(y=>y.id).join(",")],queryFn:async()=>{const y=o();return y?(await Promise.all(p().map(async k=>(await Qo.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:l5e,gcTime:$9,retry:1})),g=U(()=>Iwe({runs:m.data??[],sessions:h(),directories:d(),limit:200})),v=U(()=>{const y=c(),w=u();return w?`/cron/worktree/${mt(w)}${y?`?projectID=${encodeURIComponent(y)}`:""}`:y?`/cron/${encodeURIComponent(y)}`:"/cron"});return(()=>{var y=Qke(),w=y.firstChild;return F(y,b(fe,{get when(){return Fe(()=>!!s())()&&u()},keyed:!0,children:k=>(()=>{var x=e5e();return F(x,b(Wc,{get href(){return`/${mt(k)}/session`},class:"block w-full rounded-md transition-colors hover:bg-surface-raised-base-hover",get children(){var C=I9(),S=C.firstChild;return F(C,b(Gt,{name:"arrow-left",size:"small",class:"shrink-0 icon-strong-base"}),S),F(S,()=>t.t("common.back")),C}})),x})()}),w),F(w,b(Wc,{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=I9(),x=k.firstChild;return F(k,b(Gt,{name:"bell",size:"small",class:"shrink-0 icon-strong-base"}),x),F(x,()=>t.t("cron.title")),k}})),F(y,b(fe,{get when(){return g().length>0},get children(){return[(()=>{var k=Xke();return F(k,()=>t.t("cron.rail.title")),k})(),(()=>{var k=Jke();return F(k,b(Wt,{get each(){return g()},children:x=>b(d5e,{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})()},d5e=e=>{const t=U(()=>mt(e.taskDirectory)),n=U(()=>`/cron/worktree/${t()}/session/${e.sessionID}`),r=U(()=>{if(!e.sessionID)return"";const l=new URLSearchParams({sidebar:"cron"});return e.projectID&&l.set("projectID",e.projectID),`${n()}?${l.toString()}`}),i=Ao(),o=U(()=>!!e.sessionID&&i.pathname===n()),s=(()=>{var l=n5e();return F(l,b(Al,{get fallback(){return(()=>{var c=r5e();return Me(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(Mn,{get when(){return e.status==="running"},get children(){return b(e1,{class:"size-[15px]"})}}),b(Mn,{get when(){return e.status==="queued"},get children(){return t5e()}})]}})),l})(),a=(()=>{var l=i5e(),c=l.firstChild,u=c.firstChild,d=u.firstChild;d.firstChild;var h=u.nextSibling;return F(l,s,c),F(d,()=>e.sequence,null),F(u,()=>e.taskName,null),F(h,()=>c5e(e.startedAt)),l})();return(()=>{var l=o5e();return F(l,b(fe,{get when(){return e.sessionID},get fallback(){return(()=>{var c=s5e();return F(c,a),c})()},get children(){return b(Wc,{get href(){return r()},class:"block",children:a})}})),Me(()=>l.classList.toggle("bg-surface-base-active",!!o())),l})()};var f5e={};Cr(f5e,{Description:()=>Oa,ErrorMessage:()=>Pa,Item:()=>_z,ItemControl:()=>j5,ItemDescription:()=>F5,ItemIndicator:()=>U5,ItemInput:()=>Cz,ItemLabel:()=>H5,Label:()=>B5,RadioGroup:()=>r1,Root:()=>Iz,useRadioGroupContext:()=>n1});var xz=yt();function n1(){const e=pt(xz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Sz=yt();function Eu(){const e=pt(Sz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function _z(e){const t=Li(),n=n1(),r=`${t.generateId("item")}-${fn()}`,i=ze({id:r},e),[o,s]=ue(i,["value","disabled","onPointerDown"]),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(!1),v=U(()=>n.isDefaultValue(o.value)),y=U(()=>n.isSelectedValue(o.value)),w=U(()=>o.disabled||t.isDisabled()||!1),k=S=>{je(S,o.onPointerDown),m()&&S.preventDefault()},x=U(()=>({...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:Nr(()=>s.id),registerInput:an(l),registerLabel:an(u),registerDescription:an(h),setIsFocused:g,setInputRef:p};return b(Sz.Provider,{value:C,get children(){return b(qe,ne({as:"div",role:"group",onPointerDown:k},x,s))}})}function j5(e){const t=Eu(),n=ze({id:t.generateId("control")},e),[r,i]=ue(n,["onClick","onKeyDown"]);return b(qe,ne({as:"div",onClick:a=>{je(a,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:a=>{je(a,r.onKeyDown),a.key===vm.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),i))}function F5(e){const t=Eu(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescription(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function U5(e){const t=Eu(),n=ze({id:t.generateId("indicator")},e),[r,i]=ue(n,["ref","forceMount"]),[o,s]=he(),{present:a}=xo({show:()=>r.forceMount||t.isSelected(),element:()=>o()??null});return b(fe,{get when(){return a()},get children(){return b(qe,ne({as:"div",ref(l){var c=ut(s,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function Cz(e){const t=Li(),n=n1(),r=Eu(),i=ze({id:r.generateId("input")},e),[o,s]=ue(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]=he(!1),d=p=>{if(je(p,o.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=p.target;m.checked=r.isSelected()}u(!1)},h=p=>{je(p,o.onFocus),r.setIsFocused(!0)},f=p=>{je(p,o.onBlur),r.setIsFocused(!1)};return oe(wt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;u(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(()=>pe(r.registerInput(s.id))),b(qe,ne({as:"input",ref(p){var m=ut(r.setInputRef,o.ref);typeof m=="function"&&m(p)},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 _r({...ym},o.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:h,onBlur:f},()=>r.dataset(),s))}function H5(e){const t=Eu(),n=ze({id:t.generateId("label")},e);return oe(()=>pe(t.registerLabel(n.id))),b(qe,ne({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function B5(e){return b(oh,ne({as:"span"},e))}function Iz(e){let t;const n=`radiogroup-${fn()}`,r=ze({id:n,orientation:"vertical"},e),[i,o,s]=ue(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Yg),[a,l]=Dl({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>i.onChange?.(g)}),{formControlContext:c}=Xg(o);sh(()=>t,()=>l(i.defaultValue??""));const u=()=>c.getAriaLabelledBy(me(o.id),s["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),h=g=>g===e.defaultValue,f=g=>g===a(),m={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(ih.Provider,{value:c,get children(){return b(xz.Provider,{value:m,get children(){return b(qe,ne({as:"div",ref(g){var v=ut(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"radiogroup",get id(){return me(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 r1=Object.assign(Iz,{Description:Oa,ErrorMessage:Pa,Item:_z,ItemControl:j5,ItemDescription:F5,ItemIndicator:U5,ItemInput:Cz,ItemLabel:H5,Label:B5}),$z=yt();function Tz(){const e=pt($z);if(e===void 0)throw new Error("[kobalte]: `useSegmentedControlContext` must be used within a `SegmentedControl` component");return e}function h5e(e){const t=Tz(),[n,r]=ue(e,["style"]),[i,o]=he(),[s,a]=he(!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 oe(wt(t.selectedItem,()=>{a(!i()),l(),a(!1)})),M5(t.root,()=>{Qe(()=>{a(!0),l(),a(!1)})}),b(qe,ne({as:"div",role:"presentation",get style(){return _r(i(),n.style)},get"data-resizing"(){return s()},get"data-orientation"(){return t.orientation()}},r))}var p5e=e=>{const t=n1(),n=Tz(),[r,i]=ue(e,["ref"]),[o,s]=he();return oe(()=>{const a=o();a&&t.isSelectedValue(e.value)&&n.setSelectedItem(a)}),b(r1.Item,ne({ref(a){var l=ut(s,r.ref);typeof l=="function"&&l(a)}},i))},m5e=e=>{const t=Eu(),[n,r]=ue(e,["ref"]),[i,o]=he();return sh(i,()=>{requestAnimationFrame(()=>{t.isDefault()&&t.select()})}),b(r1.ItemInput,ne({ref(s){var a=ut(o,n.ref);typeof a=="function"&&a(s)}},r))},g5e=e=>{const t=ne({defaultValue:e.value,orientation:"horizontal"},e),[n,r]=ue(t,["ref"]),[i,o]=he(),[s,a]=he(),l={value:()=>r.value,defaultValue:()=>r.defaultValue,orientation:()=>r.orientation,root:i,selectedItem:s,setSelectedItem:a};return oe(()=>{l.value()||a(void 0)}),b($z.Provider,{value:l,get children(){return b(r1,ne({ref(c){var u=ut(o,n.ref);typeof u=="function"&&u(c)}},r))}})},ld=Object.assign(g5e,{Description:Oa,ErrorMessage:Pa,Indicator:h5e,Item:p5e,ItemControl:j5,ItemDescription:F5,ItemIndicator:U5,ItemInput:m5e,ItemLabel:H5,Label:B5}),v5e=ee("<div role=presentation data-slot=radio-group-wrapper><div role=presentation data-slot=radio-group-items>"),y5e=ee("<span data-slot=radio-group-item-control>");function T9(e){const[t,n]=ue(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(ld,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 Fe(()=>!!t.current)()?r(t.current):void 0},get defaultValue(){return Fe(()=>!!t.defaultValue)()?r(t.defaultValue):void 0},onChange:s=>t.onSelect?.(o(s)),get children(){var s=v5e(),a=s.firstChild;return F(s,b(ld.Indicator,{"data-slot":"radio-group-indicator"}),a),F(a,b(Wt,{get each(){return t.options},children:l=>b(ld.Item,{get value(){return r(l)},"data-slot":"radio-group-item",get"data-value"(){return r(l)},get children(){return[b(ld.ItemInput,{"data-slot":"radio-group-item-input"}),b(ld.ItemLabel,{"data-slot":"radio-group-item-label",get children(){var c=y5e();return F(c,()=>i(l)),c}})]}})})),s}}))}var b5e={};Cr(b5e,{Description:()=>Oa,ErrorMessage:()=>Pa,Input:()=>Az,Label:()=>oh,Root:()=>Dz,TextArea:()=>Mz,TextField:()=>Ya,useTextFieldContext:()=>V5});var Ez=yt();function V5(){const e=pt(Ez);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function Az(e){return b(Lz,ne({type:"text"},e))}function Lz(e){const t=Li(),n=V5(),r=ze({id:n.generateId("input")},e),[i,o,s]=ue(r,["onInput"],L5),{fieldProps:a}=D5(o);return b(qe,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 Ct([i.onInput,n.onInput])}},()=>t.dataset(),s))}function Dz(e){let t;const n=`textfield-${fn()}`,r=ze({id:n},e),[i,o,s]=ue(r,["ref","value","defaultValue","onChange"],Yg),a=i.value,[l,c]=Dl({value:()=>a===void 0?void 0:i.value??"",defaultValue:()=>i.defaultValue,onChange:f=>i.onChange?.(f)}),{formControlContext:u}=Xg(o);sh(()=>t,()=>c(i.defaultValue??""));const d=f=>{if(u.isReadOnly()||u.isDisabled())return;const p=f.target;c(p.value),p.value=l()??""},h={value:l,generateId:Nr(()=>me(o.id)),onInput:d};return b(ih.Provider,{value:u,get children(){return b(Ez.Provider,{value:h,get children(){return b(qe,ne({as:"div",ref(f){var p=ut(m=>t=m,i.ref);typeof p=="function"&&p(f)},role:"group",get id(){return me(o.id)}},()=>u.dataset(),s))}})}})}function Mz(e){let t;const n=V5(),r=ze({id:n.generateId("textarea")},e),[i,o]=ue(r,["ref","autoResize","submitOnEnter","onKeyPress"]);oe(wt([()=>t,()=>i.autoResize,()=>n.value()],([a,l])=>{!a||!l||w5e(a)}));const s=a=>{t&&i.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(Lz,ne({as:"textarea",get"aria-multiline"(){return i.submitOnEnter?"false":void 0},get onKeyPress(){return Ct([i.onKeyPress,s])},ref(a){var l=ut(c=>t=c,i.ref);typeof l=="function"&&l(a)}},o))}function w5e(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 Ya=Object.assign(Dz,{Description:Oa,ErrorMessage:Pa,Input:Az,Label:oh,TextArea:Mz}),k5e=ee("<div data-slot=input-wrapper>");function sa(e){const t=is(),[n,r]=ue(e,["name","defaultValue","value","onChange","onKeyDown","validationState","required","disabled","readOnly","class","label","hideLabel","description","error","variant","copyable","copyKind","multiline"]),[i,o]=he(!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 Qw(u)&&(Ot({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(Ya,{"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(fe,{get when(){return n.label},get children(){return b(Ya.Label,{"data-slot":"input-label",get classList(){return{"sr-only":n.hideLabel}},get children(){return n.label}})}}),(()=>{var u=k5e();return F(u,b(fe,{get when(){return n.multiline},get fallback(){return b(Ya.Input,ne(r,{"data-slot":"input-input",get class(){return n.class}}))},get children(){return b(Ya.TextArea,ne(r,{autoResize:!0,"data-slot":"input-input",get class(){return n.class}}))}}),null),F(u,b(fe,{get when(){return n.copyable},get children(){return b(In,{get value(){return s()},placement:"top",gutter:4,get forceOpen(){return i()},skipDelayDuration:0,get children(){return b(oi,{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(fe,{get when(){return n.description},get children(){return b(Ya.Description,{"data-slot":"input-description",get children(){return n.description}})}}),b(Ya.ErrorMessage,{"data-slot":"input-error",get children(){return n.error}})]}})}function x5e(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 S5e=ee('<div class="flex h-full items-center justify-center text-text-weak">'),_5e=ee('<div class="flex h-full items-center justify-center px-8 text-center text-14-regular text-text-weak">'),C5e=ee('<div class="flex flex-col gap-1">'),I5e=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 [&_[data-slot=input-wrapper]:focus-within]:!border-border-weak-base [&_[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">'),$5e=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 Oz=1440*60*1e3,T5e=10080*60*1e3,E5e=30*Oz,A5e=e=>[e.session.title,e.session.id,e.workspace.label,e.workspace.directory].join(" ").toLowerCase(),Hc=e=>e.time.archived??0,Pz=e=>Hc(e)+E5e,L5e=e=>Math.max(1,Math.ceil((Pz(e)-Date.now())/Oz)),D5e=(e,t)=>{const n=Hc(t.session)-Hc(e.session);return n!==0?n:t.session.id.localeCompare(e.session.id)};function M5e(e){const t=Qi(),n=To(),r=Rt(),i=Eo(),o={token:0},[s,a]=et({search:"",scope:"all",age:"all",loading:!0,error:!1,sessions:[]}),l=U(()=>[{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=U(()=>[{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(p=>t.client.session.list({directory:p.directory,roots:!0,archived:!0,limit:500}).then(m=>({failed:!1,items:(m.data??[]).filter(g=>!!g?.id&&!!g.time?.archived).map(g=>({session:g,workspace:p}))})).catch(()=>({failed:!0,items:[]})))).then(p=>{if(o.token!==f)return;const m=Date.now();a({loading:!1,error:p.some(g=>g.failed),sessions:p.flatMap(g=>g.items).filter(g=>Pz(g.session)>m).sort(D5e)})})},d=U(()=>{const f=s.search.trim().toLowerCase(),p=Date.now()-T5e;return s.sessions.filter(m=>s.scope==="all"||m.workspace.kind===s.scope).filter(m=>s.age==="all"?!0:s.age==="recent"?Hc(m.session)>=p:Hc(m.session)<p).filter(m=>!f||A5e(m).includes(f))}),h=f=>{i(`/${mt(f.workspace.directory)}/session/${f.session.id}`),n.close()};return en(u),b(tu,{get title(){return r.t("archiveSessions.title")},size:"large",get children(){var f=I5e(),p=f.firstChild,m=p.firstChild,g=m.firstChild,v=m.nextSibling,y=p.nextSibling;return F(g,b(sa,{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})),F(m,b(In,{get value(){return r.t("common.refresh")},placement:"top",get children(){return b(oi,{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),F(v,b(fe,{get when(){return l().length>1},get children(){return b(T9,{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),F(v,b(T9,{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),F(y,b(Al,{get children(){return[b(Mn,{get when(){return s.loading},get children(){var w=S5e();return F(w,b(e1,{class:"size-4"})),w}}),b(Mn,{get when(){return d().length===0},get children(){var w=_5e();return F(w,(()=>{var k=Fe(()=>!!s.error);return()=>k()?r.t("archiveSessions.error"):r.t("archiveSessions.empty")})()),w}}),b(Mn,{when:!0,get children(){var w=C5e();return F(w,b(Wt,{get each(){return d()},children:k=>{const x=U(()=>rz(k.session.title));return(()=>{var C=$5e(),S=C.firstChild,I=S.nextSibling,M=I.firstChild,D=M.nextSibling,O=D.firstChild,$=O.nextSibling,E=$.nextSibling,A=E.nextSibling,T=A.nextSibling,R=I.nextSibling,G=R.firstChild;return C.$$click=()=>h(k),F(S,b(Gt,{name:"archive",size:"small"})),F(M,x),F(O,()=>k.workspace.label),F(E,()=>r.t("archiveSessions.archivedAt",{time:x5e(new Date(Hc(k.session)).toISOString(),r.t)})),F(T,()=>r.t("archiveSessions.deletesIn",{count:L5e(k.session)})),F(R,b(Gt,{name:"eye",size:"small"}),G),F(G,()=>r.t("common.open")),C})()}})),w}})]}})),f}})}mr(["click"]);var O5e=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">'),P5e=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">'),E9=ee("<div>"),R5e=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)>'),N5e=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">'),z5e=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">'),j5e=ee('<span class="text-12-regular text-text-base truncate select-text">'),F5e=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">'),A9=ee('<div class="shrink-0 py-4">'),U5e=ee('<div class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar [overflow-anchor:none]">'),H5e=ee('<div class="relative flex-1 min-h-0">'),B5e=ee('<div class="flex-1 min-h-0 flex flex-col">'),V5e=ee('<div class="flex-1 min-h-0">'),q5e=ee('<div class="hidden xl:block absolute inset-y-0 z-30 w-0 overflow-visible">'),W5e=ee('<div class="relative bg-background-base flex-1 min-h-0 min-w-0 flex flex-col select-none [&_input]:select-text [&_textarea]:select-text [&_[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>'),by=ee("<div class=size-full>"),G5e=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 K5e(e){const t=gr(),n=t.scope,[r,i,,o]=pr(On.server(n,"layout.page",["layout.page.v1"]),et({lastProjectSession:{},activeProject:void 0,activeWorkspace:void 0,workspaceOrder:{},workspaceName:{},workspaceBranchName:{},workspaceExpanded:{},sessionExpanded:{}})),s=U(()=>o());let a,l=0,c=!1;const u=ui(),d=Qi(),h=or(),f=Hl(),p=U(()=>f.ready()),m=Xi(),g=yu(),v=th(),y=b5(),w=Eo();s2e(w),eh();const k=To(),x=tA(),C=Ere(),S=Rt(),I=Dr(u.dir),M=Ao();oe(()=>{const z=u.dir;z&&Dr(z)===void 0&&w("/",{replace:!0})});const D=U(()=>{const z=u.dir;if(!z)return{slug:z,dir:""};const H=Dr(z);if(!H)return{slug:z,dir:""};const Q=h.peek(H,{bootstrap:!1});return{slug:z,store:Q,dir:Q[0].path.directory||H}}),O=U(()=>{const z=M.pathname.match(/^\/cron\/worktree\/([^/?#]+)\/session(?:\/([^/?#]+))?/);if(z){const de=Dr(z[1]);return de?{cron:!0,dir:de,sessionID:z[2]?decodeURIComponent(z[2]):void 0,slug:z[1]}:void 0}const H=M.pathname.match(/^\/([^/]+)\/session(?:\/([^/?#]+))?/),Q=Dr(H?.[1]);if(!(!H||!Q))return{cron:!1,dir:Q,sessionID:H[2]?decodeURIComponent(H[2]):void 0,slug:H[1]}}),$=["system","light","dark"],E={system:"theme.scheme.system",light:"theme.scheme.light",dark:"theme.scheme.dark"},A=z=>S.t(E[z]),T=U(()=>D().dir||O()?.dir||""),R=z=>z==="/cron"||z.startsWith("/cron/"),G=z=>z==="/"||z==="/notifications"||z==="/modes"||z==="/models"||z==="/mcp"||z==="/plugins"||z==="/skills",K=U(()=>um(M.pathname)),q=U(()=>G(M.pathname)),W=U(()=>R(M.pathname)),N=U(()=>new URLSearchParams(M.search).get("projectID")??void 0),V=U(()=>!!O()?.dir&&!!O()?.sessionID&&(O()?.cron||new URLSearchParams(M.search).get("sidebar")==="cron")),J=U(()=>{if(V())return!0;const z=T(),H=u.id??O()?.sessionID;if(!z||!H)return!1;const[Q]=h.child(z,{bootstrap:!1}),de=Q.session.find(ye=>ye.id===H);return O5(de)}),ie=U(()=>W()||J());oe(wt(()=>O()?.dir,z=>{z&&h.project.loadSessions(z)},{defer:!0})),oe(wt(()=>[J(),O()?.cron,O()?.dir,O()?.sessionID],([z,H,Q,de])=>{if(!z||H||!Q||!de)return;const[ye]=h.child(Q,{bootstrap:!1}),ge=new URLSearchParams({sidebar:"cron"});ye.project&&ge.set("projectID",ye.project),w(`/cron/worktree/${mt(Q)}/session/${de}?${ge.toString()}`,{replace:!0})}));const re=U(()=>{const z=f.projects.list().filter(Te=>Te.id!=="global"),H=(h.data.project??[]).filter(Te=>Te.id!=="global"),Q=Te=>{if(Te)return z.find(Re=>Re.id===Te.id||Ve(Re.worktree)===Ve(Te.worktree))},de=(Te,Re)=>$l(Te.worktree,Re)||!!Te.sandboxes?.some(Ue=>$l(Ue,Re)),ye=M.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(ye){const Te=Dr(ye[1]);if(Te){const Re=z.find(ft=>ft.id===N())??Q(H.find(ft=>ft.id===N()));if(Re&&de(Re,Te))return Re;const Ue=z.find(ft=>Ve(ft.worktree)===Ve(Te))??Q(H.find(ft=>Ve(ft.worktree)===Ve(Te)));if(Ue)return Ue}}const ge=M.pathname.match(/^\/cron\/([^/?#]+)/);if(ge){const Te=N()??decodeURIComponent(ge[1]),Re=z.find(Ue=>Ue.id===Te)??Q(H.find(Ue=>Ue.id===Te));if(Re)return Re}const De=T();if(De){const Te=z.find(ft=>ft.worktree===De)??Q(H.find(ft=>ft.worktree===De));if(Te)return Te;const[Re]=h.child(De,{bootstrap:!1}),Ue=Re.project;if(Ue){const ft=z.find(it=>it.id===Ue)??Q(H.find(it=>it.id===Ue));if(ft)return ft}}}),ve=U(()=>Fke(M.pathname)),ce=U(()=>{if(p()){if(K())return"settings";if(q())return"global";if(ie()){const z=re();return`cron:${z?.id??z?.worktree??O()?.slug??u.dir??"unknown"}`}if(u.dir)return`project:${u.dir}`}}),[ae,Ce]=et({autoselect:!I&&!G(M.pathname)&&!um(M.pathname)&&!R(M.pathname),busyWorkspaces:{},hoverProject:void 0,scrollSessionKey:void 0,nav:void 0,sortNow:Date.now(),sizing:!1}),_e=Hwe(),We=(z,H)=>{const Q=Ve(z);if(H){Ce("busyWorkspaces",Q,!0);return}Ce("busyWorkspaces",Xe(de=>{delete de[Q]}))},_t=z=>!!ae.busyWorkspaces[Ve(z)],st={current:void 0},bt=()=>ae.sortNow;let Jt,Kt;const tt=()=>typeof document=="object"&&document.visibilityState==="hidden",jt=()=>{tt()||Ce("sortNow",Date.now())},sr=()=>{Kt===void 0&&(Kt=setInterval(jt,6e4))},Pt=()=>{Kt!==void 0&&(clearInterval(Kt),Kt=void 0)},vr=setTimeout(()=>{jt(),tt()||sr()},6e4-Date.now()%6e4),wn=o2e({enabled:()=>!1,active:()=>ae.hoverProject,el:()=>ae.nav?.querySelector("[data-component='sidebar-rail']")??ae.nav,onActivate:()=>{}});pe(()=>{c=!0,l+=1,st.current!==void 0&&clearTimeout(st.current),clearTimeout(vr),Kt&&clearInterval(Kt),Jt!==void 0&&clearTimeout(Jt),wn.reset()}),en(()=>{const z=()=>Ce("sizing",!1),H=()=>Ra(),Q=()=>{if(document.visibilityState!=="hidden"){sr();return}Pt(),Ra()};zn(window,"pointerup",z),zn(window,"pointercancel",z),zn(window,"blur",z),zn(window,"blur",H),zn(document,"visibilitychange",Q)});const $n=U(()=>!f.sidebar.opened()&&ae.hoverProject!==void 0),di=U(()=>f.sidebar.opened()||$n()),ar=z=>{Ce("hoverProject",z),wn.reset()},ds=()=>queueMicrotask(()=>ar(void 0));oe(wt(ce,(z,H)=>{if(z&&z!==H){if(ar(void 0),z==="global"){f.sidebar.close();return}f.sidebar.open()}})),oe(wt(()=>[p(),M.pathname,M.search,ie()],([z,,,H])=>{!z||!H||(ar(void 0),f.sidebar.open())}));const Jr=()=>{st.current!==void 0&&(clearTimeout(st.current),st.current=void 0)},Ra=()=>{Jr(),ar(void 0)},ch=()=>{f.sidebar.opened()||ae.hoverProject!==void 0&&(Jr(),st.current=window.setTimeout(()=>{st.current=void 0,ar(void 0)},300))},uh=U(()=>{const z=ae.hoverProject;if(z)return f.projects.list().find(H=>H.worktree===z)});oe(()=>{f.sidebar.opened()&&ar(void 0)}),oe(()=>{if(!ae.autoselect)return;const z=u.dir;!z||!Dr(z)||Ce("autoselect",!1)});const Au=_e.editorOpen,dh=_e.openEditor,Kl=_e.closeEditor,Zl=_e.setEditor,fi=_e.InlineEditor,fs=()=>{f.sidebar.opened()||Ra()},yr=z=>{fs(),w(z),f.mobileSidebar.hide()};function Lu(z=1){const H=C.colorScheme(),Q=$.indexOf(H),de=Q===-1?0:(Q+z+$.length)%$.length,ye=$[de];C.setColorScheme(ye),Ot({title:S.t("toast.scheme.title"),description:A(ye)})}function fh(z){z!==S.locale()&&(S.setLocale(z),Ot({title:S.t("toast.language.title"),description:S.t("toast.language.description",{language:S.label(z)})}))}function Du(z=1){const H=S.locales,Q=H.indexOf(S.locale()),de=Q===-1?0:(Q+z+H.length)%H.length,ye=H[de];ye&&fh(ye)}en(()=>{const z=new Map,H=new Map,Q=5e3,de=ge=>{const De=z.get(ge);De!==void 0&&(sl.dismiss(De),z.delete(ge),H.delete(ge))},ye=d.event.listen(ge=>{if(ge.details?.type==="worktree.ready"){We(ge.name,!1),k0.ready(ge.name,n.key);return}if(ge.details?.type==="worktree.failed"){We(ge.name,!1),k0.failed(ge.name,ge.details.properties?.message??S.t("common.requestFailed"),n.key);return}if(ge.details?.type==="question.replied"||ge.details?.type==="question.rejected"||ge.details?.type==="permission.replied"){const m1=ge.details.properties,kj=`${ge.name}:${m1.sessionID}`;de(kj);return}if(ge.details?.type!=="permission.asked"&&ge.details?.type!=="question.asked")return;const De=ge.details.type==="permission.asked"?S.t("notification.permission.title"):S.t("notification.question.title"),Te=ge.details.type==="permission.asked"?"checklist":"bubble-5",Re=ge.name,Ue=ge.details.properties;if(ge.details.type==="permission.asked"&&y.autoResponds(ge.details.properties,Re))return;const[ft]=h.child(Re,{bootstrap:!1}),it=ft.session.find(m1=>m1.id===Ue.sessionID),Ke=`${Re}:${Ue.sessionID}`,Tt=it?.title??S.t("command.session.new"),on=dr(Re),Ze=ge.details.type==="permission.asked"?S.t("notification.permission.description",{sessionTitle:Tt,projectName:on}):S.t("notification.question.description",{sessionTitle:Tt,projectName:on}),Mt=`/${mt(Re)}/session/${Ue.sessionID}`,xn=Date.now(),Ft=H.get(Ke)??0;if(xn-Ft<Q)return;H.set(Ke,xn),ge.details.type==="permission.asked"&&(g.sounds.permissionsEnabled()&&I2(g.sounds.permissions()),g.notifications.permissions()&&m.notify(De,Ze,Mt)),ge.details.type==="question.asked"&&g.notifications.agent()&&m.notify(De,Ze,Mt);const Un=u.id,Hn=Ve(Re)===Ve(T()),Fu=Hn&&Ue.sessionID===Un,p1=Hn&&it?.parentID===Un,bj=a2e({desktop:m.desktop,enabled:ge.details.type==="permission.asked"?g.notifications.permissions():g.notifications.agent()});if(!l2e({desktopNativeNotificationEnabled:bj,currentSessionTarget:Fu,childSessionTarget:p1})){de(Ke);return}de(Ke);const wj=Ot({persistent:!0,icon:Te,title:De,description:Ze,actions:[{label:S.t("notification.action.goToSession"),onClick:()=>w(Mt)},{label:S.t("common.dismiss"),onClick:"dismiss"}]});z.set(Ke,wj)});pe(ye),oe(()=>{const ge=u.id;if(!T()||!ge)return;const De=`${T()}:${ge}`;de(De);const[Te]=h.child(T(),{bootstrap:!1}),Re=Te.session.filter(Ue=>Ue.parentID===ge);for(const Ue of Re)de(`${T()}:${Ue.id}`)})});function c1(z,H){if(!a||ae.scrollSessionKey===H)return;const Q=a.querySelector(`[data-session-id="${z}"]`);if(!Q)return;const de=a.getBoundingClientRect(),ye=Q.getBoundingClientRect();if(ye.top>=de.top&&ye.bottom<=de.bottom){Ce("scrollSessionKey",H);return}Ce("scrollSessionKey",H),Q.scrollIntoView({block:"nearest",behavior:"smooth"})}const pn=U(()=>{if(ie())return re();const z=T();if(!z)return;const H=Ve(z),Q=f.projects.list(),de=Q.find(Ue=>Ue.sandboxes?.some(ft=>Ve(ft)===H));if(de)return de;const ye=Q.find(Ue=>Ve(Ue.worktree)===H);if(ye)return ye;const[ge]=h.child(z,{bootstrap:!1}),De=ge.project;if(!De)return;const Re=h.data.project.find(Ue=>Ue.id===De)?.worktree;if(Re)return Q.find(Ue=>Ue.worktree===Re)});oe(wt(()=>[s(),p(),q(),K(),ie(),T(),u.dir],([z,H,Q,de,ye,ge,De])=>{!z||!H||Q||de||ye||!ge||!De||f.projects.open(ge)}));const[ph]=ns(async()=>{if(await o.promise,await f.ready.promise,!ct(()=>ae.autoselect))return;const z=f.projects.list(),H=t.projects.last();if(z.length===0){if(!H)return;await ja(H,!0)}else{const Q=z.find(de=>de.worktree===H)??z[0];if(!Q)return;await ja(Q.worktree,!0)}}),Mu=(z,H,Q)=>{const de=Ve(z),ye=r.workspaceName[de]??r.workspaceName[z];if(ye)return ye;if(H&&Q)return r.workspaceBranchName[H]?.[Q]},Tn=(z,H,Q,de)=>{const ye=Ve(z);i("workspaceName",ye,H),Q&&de&&(r.workspaceBranchName[Q]||i("workspaceBranchName",Q,{}),i("workspaceBranchName",Q,de,H))},Mo=(z,H,Q)=>Mu(z,Q,H)??H??dr(z),mh=U(()=>{const z=pn();return!z||z.vcs!=="git"?!1:f.sidebar.workspaces(z.worktree)()}),Na=U(()=>{const z=pn();return Lwe({project:z,currentDirectory:T(),workspacesEnabled:mh(),workspaces:ju(z),expanded:r.workspaceExpanded})});oe(()=>{if(!s()||!p())return;const z=f.projects.list();for(const[H,Q]of Object.entries(r.workspaceExpanded)){if(!Q)continue;const de=Ve(H),ye=z.find(ge=>Ve(ge.worktree)===de||ge.sandboxes?.some(De=>Ve(De)===de));ye&&(ye.vcs==="git"&&f.sidebar.workspaces(ye.worktree)()||i("workspaceExpanded",H,!1))}});const Oo=U(()=>{const z=bt(),H=Na();if(H.length===0)return[];const Q=[];for(const de of H){const[ye]=h.child(de,{bootstrap:!0}),ge=kf(ye,z,de);Q.push(...ge)}return Q}),Ou=200,gh=2,u1=10,hi=4,to={value:0},Ws=new Map,Pu=10,Gs=new Map,Yl=z=>{const H=Gs.get(z);if(H)return H;const Q=new Set;return Gs.set(z,Q),Q},no=(z,H)=>{const Q=Yl(z);return JO({seen:Q,keep:H,limit:Pu,preserve:u.id&&Ve(z)===Ve(T())?[u.id]:void 0})};oe(()=>{const z=new Set(Na());for(const H of Gs.keys())z.has(H)||Gs.delete(H)}),oe(()=>{D(),d.url,to.value+=1,C0e(n.key),Ws.clear()}),oe(()=>{const z=new Set(Na());for(const[H,Q]of Ws)z.has(H)||(Q.pending.length=0,Q.pendingSet.clear(),Q.running===0&&Ws.delete(H))});const Ru=z=>{const H=Ws.get(z);if(H)return H;const Q={inflight:new Set,pending:[],pendingSet:new Set,running:0};return Ws.set(z,Q),Q},Xl=(z,H)=>{if(z.length===0)return H.slice().sort((de,ye)=>de.id<ye.id?-1:de.id>ye.id?1:0);const Q=new Map;for(const de of z)Q.set(de.id,de);for(const de of H)Q.set(de.id,de);return[...Q.values()].sort((de,ye)=>de.id<ye.id?-1:de.id>ye.id?1:0)};async function d1(z,H,Q){const[de,ye]=h.child(z,{bootstrap:!1});return I0e({scope:n.key,directory:z,sessionID:H,task:ge=>sn(()=>d.client.session.messages({directory:z,sessionID:H,limit:Ou})).then(De=>{if(to.value!==Q||!G8(n.key,z,H,ge))return;const Te=(De.data??[]).filter(Ze=>!!Ze?.info?.id),Re=Te.map(Ze=>Ze.info).filter(Ze=>!!Ze?.id),Ue=Xl([],Re),ft=no(z,H),it=De.response.headers.get("x-next-cursor")??void 0,Ke={limit:Ue.length,cursor:it,complete:!it,at:Date.now()};if(ft.length>0){qO(n.key,z,ft);for(const Ze of ft)h.todo.set(Ze,void 0)}const Tt=de.message[H]??[],on=Xl(Tt.filter(Ze=>!!Ze?.id),Ue);if(G8(n.key,z,H,ge))return Qe(()=>{ft.length>0&&ye(Xe(Ze=>{yg(Ze,ft)})),ye("message",H,$t(on,{key:"id"})),i2({scope:n.key,directory:z,sessionID:H,...Ke});for(const Ze of Te){const Mt=de.part[Ze.info.id]??[],xn=Xl(Mt.filter(Ft=>!!Ft?.id),Ze.parts.filter(Ft=>!!Ft?.id));ye("part",Ze.info.id,$t(xn,{key:"id"}))}}),Ke}).catch(()=>{})})}const Nu=z=>{const H=Ru(z);if(H.running>=gh)return;const Q=H.pending.shift();if(!Q)return;H.pendingSet.delete(Q),H.inflight.add(Q),H.running+=1;const de=to.value;d1(z,Q,de).finally(()=>{H.running-=1,H.inflight.delete(Q),Nu(z)})},Po=(z,H="low")=>{const Q=z.directory;if(!Q)return;const[de]=h.child(Q,{bootstrap:!1});if(ct(()=>{const Re=r2(n.key,Q,z.id);return S0e({message:de.message[z.id]!==void 0,info:Re,chunk:Ou})}))return;const ge=Ru(Q);if(ge.inflight.has(z.id))return;if(ge.pendingSet.has(z.id)){if(H!=="high")return;const Re=ge.pending.indexOf(z.id);Re>0&&(ge.pending.splice(Re,1),ge.pending.unshift(z.id));return}const De=Yl(Q);if(!(!De.has(z.id)&&De.size>=Pu&&H!=="high")){for(H==="high"&&ge.pending.unshift(z.id),H!=="high"&&ge.pending.push(z.id),ge.pendingSet.add(z.id);ge.pending.length>u1;){const Re=ge.pending.pop();Re&&ge.pendingSet.delete(Re)}Nu(Q)}},Jl=(z,H)=>{for(let Q=1;Q<=hi;Q++){const de=z[H+Q];de&&Po(de,Q===1?"high":"low");const ye=z[H-Q];ye&&Po(ye,Q===1?"high":"low")}};oe(()=>{const z=Oo();if(z.length===0)return;const H=u.id?z.findIndex(Q=>Q.id===u.id):0;if(H!==-1){if(!u.id){const Q=z[H];Q&&Po(Q,"high")}Jl(z,H)}});function Ye(z){const H=Oo();if(H.length===0)return;const Q=u.id?H.findIndex(ge=>ge.id===u.id):-1;let de;Q===-1?de=z>0?0:H.length-1:de=(Q+z+H.length)%H.length;const ye=H[de];ye&&(Po(ye,"high"),Jl(H,de),K5(ye))}function X(z){const H=f.projects.list();if(H.length===0)return;const Q=pn()?.worktree,de=T()?br(T()):void 0,ye=Q??de,ge=ye?H.findIndex(Te=>Te.worktree===ye):-1,De=ge===-1?z>0?H[0]:H[H.length-1]:H[(ge+z+H.length)%H.length];De&&(h.child(De.worktree),ja(De.worktree))}function we(z){const H=Oo();if(H.length===0||!H.some(ge=>v.session.unseenCount(ge.id)>0))return;const de=u.id?H.findIndex(ge=>ge.id===u.id):-1,ye=de===-1?z>0?-1:0:de;for(let ge=1;ge<=H.length;ge++){const De=z>0?(ye+ge)%H.length:(ye-ge+H.length)%H.length,Te=H[De];if(Te&&v.session.unseenCount(Te.id)!==0){Po(Te,"high"),Jl(H,De),K5(Te);return}}}async function Be(z){const[H,Q]=h.child(z.directory),de=H.session??[],ye=de.findIndex(De=>De.id===z.id),ge=de[ye+1]??de[ye-1];await d.client.session.update({directory:z.directory,sessionID:z.id,time:{archived:Date.now()}}),Q(Xe(De=>{const Te=nn.search(De.session,z.id,Re=>Re.id);Te.found&&De.session.splice(Te.index,1)})),z.id===u.id&&w(ge?`/${u.dir}/session/${ge.id}`:`/${u.dir}/session`)}x.register("layout",()=>{const z=[{id:"sidebar.toggle",title:S.t("command.sidebar.toggle"),category:S.t("command.category.view"),keybind:"mod+b",onSelect:()=>{M.pathname==="/"||M.pathname==="/notifications"||f.sidebar.toggle()}},{id:"project.open",title:S.t("command.project.open"),category:S.t("command.category.project"),keybind:"mod+o",onSelect:()=>zu()},{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:()=>tn()},...m.desktop?[{id:"server.switch",title:S.t("command.server.switch"),category:S.t("command.category.server"),onSelect:()=>Xn()}]:[],{id:"settings.open",title:S.t("command.settings.open"),category:S.t("command.category.settings"),keybind:"mod+comma",onSelect:()=>kn()},{id:"quickSwitcher.open",title:S.t("command.quickSwitcher.open"),category:S.t("command.category.view"),keybind:"mod+j",onSelect:()=>Ir()},{id:"session.previous",title:S.t("command.session.previous"),category:S.t("command.category.session"),keybind:"alt+arrowup",onSelect:()=>Ye(-1)},{id:"session.next",title:S.t("command.session.next"),category:S.t("command.category.session"),keybind:"alt+arrowdown",onSelect:()=>Ye(1)},{id:"session.previous.unseen",title:S.t("command.session.previous.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowup",onSelect:()=>we(-1)},{id:"session.next.unseen",title:S.t("command.session.next.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowdown",onSelect:()=>we(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 H=Oo().find(Q=>Q.id===u.id);H&&Be(H)}},{id:"workspace.new",title:S.t("workspace.new"),category:S.t("command.category.workspace"),keybind:"mod+shift+w",disabled:!mh(),onSelect:()=>{const H=pn();if(H)return e6(H)}},{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:!pn()||pn()?.vcs!=="git",onSelect:()=>{const H=pn();if(!H||H.vcs!=="git")return;const Q=f.sidebar.workspaces(H.worktree)();f.sidebar.toggleWorkspaces(H.worktree),Ot({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")})}}];z.push({id:"theme.scheme.cycle",title:S.t("command.theme.scheme.cycle"),category:S.t("command.category.theme"),keybind:"mod+shift+s",onSelect:()=>Lu(1)});for(const H of $)z.push({id:`theme.scheme.${H}`,title:S.t("command.theme.scheme.set",{scheme:A(H)}),category:S.t("command.category.theme"),onSelect:()=>C.commitPreview(),onHighlight:()=>(C.previewColorScheme(H),()=>C.cancelPreview())});z.push({id:"language.cycle",title:S.t("command.language.cycle"),category:S.t("command.category.language"),onSelect:()=>Du(1)});for(const H of S.locales)z.push({id:`language.set.${H}`,title:S.t("command.language.set",{language:S.label(H)}),category:S.t("command.category.language"),onSelect:()=>fh(H)});return z});function tn(){const z=++l;j(()=>import("./dialog-select-provider-WQnY_rEG.js").then(H=>H.d),__vite__mapDeps([99,98,100,101])).then(H=>{c||l!==z||k.show(()=>b(H.DialogSelectProvider,{}))})}function Xn(){if(!m.desktop)return;if(m.serverManager){m.serverManager.show();return}const z=++l;j(()=>import("./dialog-select-server-BORmhWyb.js"),__vite__mapDeps([97,98])).then(H=>{c||l!==z||k.show(()=>b(H.DialogSelectServer,{}))})}function kn(){yr("/settings")}function Ir(){const z=++l;j(()=>import("./dialog-quick-switcher-FgaoDDD5.js"),[]).then(H=>{c||l!==z||k.show(()=>b(H.DialogQuickSwitcher,{get currentDirectory(){return T()},onChooseProject:()=>void zu(),onSwitchServer:()=>Xn()}))})}function br(z){const H=Ve(z),Q=f.projects.list().find(Te=>Ve(Te.worktree)===H||Te.sandboxes?.some(Re=>Ve(Re)===H));if(Q)return Q.worktree;const de=Object.entries(r.workspaceOrder).find(([Te,Re])=>Ve(Te)===H||Re.some(Ue=>Ve(Ue)===H));if(de)return de[0];const[ye]=h.child(z,{bootstrap:!1}),ge=ye.project;return ge?h.data.project.find(Te=>Te.id===ge)?.worktree??z:z}function Qr(z){return pn()?.worktree??br(z)}function Ql(z,H,Q=Qr(z)){return i("lastProjectSession",Q,{directory:z,id:H,at:Date.now()}),Q}function Rn(z){r.lastProjectSession[z]&&i("lastProjectSession",Xe(H=>{delete H[z]}))}function vh(z,H,Q=Qr(z)){return Ql(z,H,Q),v.session.markViewed(H),ct(()=>r.workspaceExpanded[z])===!1&&i("workspaceExpanded",z,!0),requestAnimationFrame(()=>c1(H,`${z}:${H}`)),Q}async function za(z){if(!z)return;const H=br(z),Q=`/${mt(H)}/session`;t.projects.touch(H),yr(Q);const de=f.projects.list().find(it=>it.worktree===H);let ye=de?S0(H,[H,...de.sandboxes??[]],r.workspaceOrder[H]):[H];const ge=it=>it?ye.some(Ke=>Ve(Ke)===Ve(it)):!1,De=async it=>{if(!it||it===H||ge(it))return ge(it);const Ke=await d.client.worktree.list({directory:H}).then(Tt=>Tt.data??[]).catch(()=>[]);return ye=S0(H,[H,...Ke],r.workspaceOrder[H]),ge(it)},Te=async it=>{if(!ge(it.directory))return!1;const[Ke]=h.child(it.directory,{bootstrap:!1});if(Ke.session.some(on=>on.id===it.id))return i("lastProjectSession",H,{directory:it.directory,id:it.id,at:Date.now()}),yr(`/${mt(it.directory)}/session/${it.id}`),!0;const Tt=await d.client.session.get({sessionID:it.id}).then(on=>on.data).catch(()=>{});return!Tt?.directory||!ge(Tt.directory)?!1:(i("lastProjectSession",H,{directory:Tt.directory,id:Tt.id,at:Date.now()}),yr(`/${mt(Tt.directory)}/session/${Tt.id}`),!0)},Re=r.lastProjectSession[H];if(Re?.id){if(await De(Re.directory),await Te(Re))return;Rn(H)}const Ue=v9(ye.map(it=>h.child(it,{bootstrap:!1})[0]),Date.now());if(Ue&&await Te(Ue))return;const ft=v9(await Promise.all(ye.map(async it=>({path:{directory:it},session:await d.client.session.list({directory:it}).then(Ke=>Ke.data??[]).catch(()=>[])}))),Date.now());ft&&await Te(ft)}function K5(z){z&&yr(`/${mt(z.directory)}/session/${z.id}`)}function ja(z,H=!0){if(f.projects.open(z),H)return za(z)}const Z5=z=>{if(t.isLocal()){for(const H of Rwe(z))ja(H);for(const H of Nwe(z)){ja(H.directory,!1);const Q=mt(H.directory);H.prompt&&d2e(n.key,Q,{prompt:H.prompt});const de=H.prompt?`/${Q}/session?prompt=${encodeURIComponent(H.prompt)}`:`/${Q}/session`;yr(de)}}};en(()=>{const z=H=>{const de=H.detail?.urls??[];de.length!==0&&Z5(de)};Z5(zwe(window)),zn(window,Mwe,z)});async function nj(z,H){const Q=P5(z);if(H===Q)return;const de=H===dr(z.worktree)?"":H;if(z.id&&z.id!=="global"){await d.client.project.update({projectID:z.id,directory:z.worktree,name:de});return}h.project.meta(z.worktree,{name:de})}const rj=(z,H,Q,de)=>{(Mu(z,Q,de)??de??dr(z))!==H&&Tn(z,H,Q,de)};function Y5(z){const H=f.projects.list(),Q=Ve(z),de=H.findIndex(De=>Ve(De.worktree)===Q),ye=Ve(pn()?.worktree??"")===Q;if(de===-1)return;const ge=H[de+1];if(!ye){f.projects.close(z);return}if(!ge){f.projects.close(z),w("/");return}yr(`/${mt(ge.worktree)}/session`),f.projects.close(z),queueMicrotask(()=>{za(ge.worktree)})}function X5(z){if(f.sidebar.workspaces(z.worktree)()){f.sidebar.toggleWorkspaces(z.worktree);return}z.vcs==="git"&&f.sidebar.toggleWorkspaces(z.worktree)}const J5=z=>{const H=++l;j(()=>import("./dialog-edit-project-DnYO9h5P.js"),[]).then(Q=>{c||l!==H||k.show(()=>b(Q.DialogEditProject,{project:z}))})};async function zu(){function z(H){if(Array.isArray(H)){for(const Q of H)ja(Q,!1);za(H[0])}else H&&ja(H)}if(m.openDirectoryPickerDialog&&t.isLocal()){const H=await m.openDirectoryPickerDialog?.({title:S.t("command.project.open"),multiple:!0});z(H)}else{const H=++l;j(()=>import("./dialog-select-directory-BndJRkQ2.js"),__vite__mapDeps([102,103,98])).then(Q=>{c||l!==H||k.show(()=>b(Q.DialogSelectDirectory,{multiple:!0,onSelect:z}),()=>z(null))})}}const ij=async(z,H,Q=!1)=>{if(H===z)return;const de=T(),ye=Ve(de),ge=Ve(H),De=Q||!!u.dir&&ye===ge;!Q&&De&&yr(`/${mt(z)}/session`),We(H,!0);const Te=await d.client.worktree.remove({directory:z,worktreeRemoveInput:{directory:H}}).then(Tt=>Tt.data).catch(Tt=>(Ot({title:S.t("workspace.delete.failed.title"),description:vy(Tt,S.t("common.requestFailed"))}),!1));if(We(H,!1),!Te||(Ve(r.lastProjectSession[z]?.directory??"")===Ve(H)&&Rn(z),h.set("project",Xe(Tt=>{const on=Tt.find(Ze=>Ze.worktree===z);on&&(on.sandboxes=(on.sandboxes??[]).filter(Ze=>Ze!==H))})),i("workspaceOrder",z,Tt=>(Tt??[]).filter(on=>on!==H)),f.projects.close(H),f.projects.open(z),De))return;const Re=T(),Ue=Ve(Re),ft=f.projects.list().find(Tt=>Tt.worktree===z),Ke=(ft?S0(z,[z,...ft.sandboxes??[]],r.workspaceOrder[z]):[z]).some(Tt=>Ve(Tt)===Ue);u.dir&&br(Re)===z&&!Ke&&yr(`/${mt(z)}/session`)},oj=async(z,H)=>{if(H===z)return;We(H,!0);const Q=Ot({persistent:!0,title:S.t("workspace.resetting.title"),description:S.t("workspace.resetting.description")}),de=()=>sl.dismiss(Q),ye=await d.client.session.list({directory:H}).then(Te=>Te.data??[]).catch(()=>[]);if(mve(n,H,ye.map(Te=>Te.id),m),await d.client.instance.dispose({directory:H}).catch(()=>{}),!await d.client.worktree.reset({directory:z,worktreeResetInput:{directory:H}}).then(Te=>Te.data).catch(Te=>(Ot({title:S.t("workspace.reset.failed.title"),description:vy(Te,S.t("common.requestFailed"))}),!1))){We(H,!1),de();return}const De=Date.now();await Promise.all(ye.filter(Te=>Te.time.archived===void 0).map(Te=>d.client.session.update({sessionID:Te.id,directory:Te.directory,time:{archived:De}}).catch(()=>{}))),We(H,!1),de(),Ot({title:S.t("workspace.reset.success.title"),description:S.t("workspace.reset.success.description"),actions:[{label:S.t("command.session.new"),onClick:()=>{const Te=`/${mt(H)}/session`;w(Te),f.mobileSidebar.hide()}},{label:S.t("common.dismiss"),onClick:"dismiss"}]})};function sj(z){const H=U(()=>dr(z.directory)),[Q,de]=et({status:"loading",dirty:!1});en(()=>{d.client.file.status({directory:z.directory}).then(De=>{const Re=(De.data??[]).length>0;de({status:"ready",dirty:Re})}).catch(()=>{de({status:"error",dirty:!1})})});const ye=()=>{const De=!!u.dir&&Ve(T())===Ve(z.directory);De&&yr(`/${mt(z.root)}/session`),k.close(),ij(z.root,z.directory,De)},ge=()=>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(tu,{get title(){return S.t("workspace.delete.title")},fit:!0,get children(){var De=O5e(),Te=De.firstChild,Re=Te.firstChild,Ue=Re.nextSibling,ft=Te.nextSibling;return F(Re,()=>S.t("workspace.delete.confirm",{name:H()})),F(Ue,ge),F(ft,b(Qt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),F(ft,b(Qt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ye,get children(){return S.t("workspace.delete.button")}}),null),De}})}function aj(z){const H=U(()=>dr(z.directory)),[Q,de]=et({status:"loading",dirty:!1,sessions:[]}),ye=async()=>{const ft=(await d.client.session.list({directory:z.directory}).then(it=>it.data??[]).catch(()=>[])).filter(it=>it.time.archived===void 0);de({sessions:ft})};en(()=>{d.client.file.status({directory:z.directory}).then(Ue=>{const it=(Ue.data??[]).length>0;de({status:"ready",dirty:it}),ye()}).catch(()=>{de({status:"error",dirty:!1})})});const ge=()=>{k.close(),oj(z.root,z.directory)},De=()=>Q.sessions.length,Te=()=>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"),Re=()=>{const Ue=De();return Ue===0?S.t("workspace.reset.archived.none"):Ue===1?S.t("workspace.reset.archived.one"):S.t("workspace.reset.archived.many",{count:Ue})};return b(tu,{get title(){return S.t("workspace.reset.title")},fit:!0,get children(){var Ue=P5e(),ft=Ue.firstChild,it=ft.firstChild,Ke=it.nextSibling,Tt=Ke.firstChild,on=Tt.nextSibling;on.nextSibling;var Ze=ft.nextSibling;return F(it,()=>S.t("workspace.reset.confirm",{name:H()})),F(Ke,Te,Tt),F(Ke,Re,on),F(Ke,()=>S.t("workspace.reset.note"),null),F(Ze,b(Qt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),F(Ze,b(Qt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ge,get children(){return S.t("workspace.reset.button")}}),null),Ue}})}const wr={session:"",sessionProject:"",directory:""};oe(wt(()=>[s(),D().slug,u.id,pn()?.worktree,T()],([z,H,Q,de,ye])=>{if(!z||!H||!ye){wr.session="",wr.sessionProject="",wr.directory="";return}if(!Q){wr.session="",wr.sessionProject="",wr.directory="";return}const ge=`${H}/${Q}`;if(!de){wr.session=ge,wr.directory=ye,wr.sessionProject="";return}if(t.projects.last()!==de&&t.projects.touch(de),ge!==wr.session||ye!==wr.directory){wr.session=ge,wr.directory=ye,wr.sessionProject=vh(ye,Q,de);return}de!==wr.sessionProject&&(wr.directory=ye,wr.sessionProject=Ql(ye,Q,de))})),oe(()=>{const z=f.sidebar.opened()?f.sidebar.width():48;document.documentElement.style.setProperty("--dialog-left-margin",`${z}px`)});const yh=U(()=>Math.max(f.sidebar.width(),244)),f1=U(()=>Math.max(yh()-64,0)),bh=new Set;oe(wt(Na,z=>{if(z.length===0){bh.clear();return}const H=new Set(z);for(const Q of H)bh.has(Q)||h.project.loadSessions(Q);bh.clear();for(const Q of H)bh.add(Q)},{defer:!0}));function lj(z){const H=am(z);H&&(ar(void 0),i("activeProject",H))}function cj(z){const{draggable:H,droppable:Q}=z;if(H&&Q){const de=f.projects.list(),ye=de.findIndex(De=>De.worktree===H.id.toString()),ge=de.findIndex(De=>De.worktree===Q.id.toString());ye!==ge&&ge!==-1&&f.projects.move(H.id.toString(),ge)}}function uj(){i("activeProject",void 0)}function ju(z){if(!z)return[];const H=z.worktree,Q=[H,...z.sandboxes??[]],de=pn(),ye=Ve(de?.worktree??"")===Ve(z.worktree)?T():void 0,ge=ye&&Ve(ye)!==Ve(H)&&!Q.some(Re=>Ve(Re)===Ve(ye))?ye:void 0,De=ge?k0.get(ge,n.key)?.status==="pending":!1,Te=S0(H,Q,r.workspaceOrder[z.worktree]);return De&&ge?[H,ge,...Te.filter(Re=>Re!==H)]:!ge||De?Te:[...Te,ge]}function dj(z,H){return ju(z).filter(Q=>!H||Ve(Q)===Ve(H)).map(Q=>{const de=h.child(Q,{bootstrap:!1})[0],ye=Ve(Q)===Ve(z.worktree)?"local":"sandbox",ge=Mo(Q,de.vcs?.branch,z.id);return{directory:Q,kind:ye,label:`${ye==="local"?S.t("workspace.type.local"):S.t("workspace.type.sandbox")} : ${ge}`}})}function fj(z,H){k.show(()=>b(M5e,{get workspaces(){return dj(z,H)}}))}const Q5=U(()=>{if(f.sidebar.opened())return pn();const z=uh();return z||pn()});function hj(z){const H=am(z);H&&i("activeWorkspace",H)}function pj(z){const{draggable:H,droppable:Q}=z;if(!H||!Q)return;const de=Q5();if(!de)return;const ye=ju(de),ge=ye.findIndex(Ue=>Ue===H.id.toString()),De=ye.findIndex(Ue=>Ue===Q.id.toString());if(ge===-1||De===-1||ge===De)return;const Te=ye.slice(),[Re]=Te.splice(ge,1);Re&&(Te.splice(De,0,Re),i("workspaceOrder",de.worktree,Te.filter(Ue=>Ve(Ue)!==Ve(de.worktree))))}function mj(){i("activeWorkspace",void 0)}const e6=async z=>{fs();const H=await d.client.worktree.create({directory:z.worktree}).then(ge=>ge.data).catch(ge=>{Ot({title:S.t("workspace.create.failed.title"),description:vy(ge,S.t("common.requestFailed"))})});if(!H?.directory)return;Tn(H.directory,H.branch,z.id,H.branch);const Q=z.worktree,de=Ve(H.directory),ye=Ve(Q);We(H.directory,!0),k0.pending(H.directory,n.key),i("workspaceExpanded",de,!0),de!==H.directory&&i("workspaceExpanded",H.directory,!0),i("workspaceOrder",z.worktree,ge=>{const Te=(ge??[]).filter(Re=>{const Ue=Ve(Re);return Ue!==ye&&Ue!==de});return[H.directory,...Te]}),h.child(H.directory),yr(`/${mt(H.directory)}/session`)},t6={currentDir:T,navList:Oo,sidebarExpanded:di,sidebarHovering:$n,clearHoverProjectSoon:ds,prefetchSession:Po,archiveSession:Be,workspaceName:Mu,renameWorkspace:rj,editorOpen:Au,openEditor:dh,closeEditor:Kl,setEditor:Zl,InlineEditor:fi,isBusy:_t,workspaceExpanded:(z,H)=>r.workspaceExpanded[z]??H,setWorkspaceExpanded:(z,H)=>i("workspaceExpanded",z,H),sessionExpanded:z=>r.sessionExpanded[z]??!0,setSessionExpanded:(z,H)=>i("sessionExpanded",z,H),showResetWorkspaceDialog:(z,H)=>k.show(()=>b(aj,{root:z,directory:H})),showDeleteWorkspaceDialog:(z,H)=>k.show(()=>b(sj,{root:z,directory:H})),showArchivedSessionsDialog:z=>{const H=pn();H&&fj(H,z)},setScrollContainerRef:(z,H)=>{H||(a=z)}},gj={currentDir:T,currentProject:pn,sidebarOpened:()=>f.sidebar.opened(),sidebarHovering:$n,hoverProject:()=>ae.hoverProject,onProjectMouseEnter:(z,H)=>wn.enter(z,H),onProjectMouseLeave:z=>wn.leave(z),onProjectFocus:z=>wn.activate(z),onHoverOpenChanged:(z,H)=>{!H&&ae.hoverProject&&ae.hoverProject!==z||Ce("hoverProject",H?z:void 0)},navigateToProject:za,openSidebar:()=>f.sidebar.open(),closeProject:Y5,showEditProjectDialog:J5,toggleProjectWorkspaces:X5,workspacesEnabled:z=>z.vcs==="git"&&f.sidebar.workspaces(z.worktree)(),workspaceIds:ju,workspaceLabel:Mo,sessionProps:{navList:Oo,sidebarExpanded:di,clearHoverProjectSoon:ds,prefetchSession:Po,archiveSession:Be,sessionExpanded:z=>r.sessionExpanded[z]??!0,setSessionExpanded:(z,H)=>i("sessionExpanded",z,H)}},n6=z=>{const H=z.project,Q=U(()=>z.mobile||(z.merged??f.sidebar.opened())),de=U(()=>!u.dir&&f.projects.list().length===0),ye=U(()=>{const Ze=H();return Ze?Ze.name||dr(Ze.worktree):""}),ge=U(()=>H()?.id??""),De=U(()=>H()?.worktree??""),Te=U(()=>T()||De()),Re=U(()=>{const Ze=De();return Ze?mt(Ze):""}),Ue=U(()=>{const Ze=H();return Ze?ju(Ze):[]}),ft=U(()=>Ue().reduce((Ze,Mt)=>Ze+v.project.unseenCount(Mt),0)),it=()=>Ue().filter(Ze=>v.project.unseenCount(Ze)>0).forEach(Ze=>v.project.markViewed(Ze)),Ke=U(()=>{const Ze=H();return!Ze||Ze.vcs!=="git"?!1:f.sidebar.workspaces(Ze.worktree)()}),Tt=U(()=>{const Ze=H();return Ze?Ze.vcs==="git"||f.sidebar.workspaces(Ze.worktree)():!1}),on=U(()=>h.data.path.home);return(()=>{var Ze=E9();return F(Ze,b(fe,{get when(){return H()},keyed:!0,get fallback(){return b(fe,{get when(){return de()},get fallback(){return b(fe,{get when(){return z.mobile},get children(){var Mt=N5e(),xn=Mt.firstChild,Ft=xn.nextSibling,Un=Ft.nextSibling;return F(xn,()=>S.t("home.projects.title")),F(Ft,b(Wt,{get each(){return h1()},children:Hn=>(()=>{var Fu=z5e(),p1=Fu.firstChild;return Fu.$$click=()=>{w(`/${mt(Hn.worktree)}/session`),f.mobileSidebar.hide()},F(p1,()=>Hn.name||dr(Hn.worktree)),Fu})()})),F(Un,b(Qt,{size:"normal",icon:"folder-add-left",onClick:zu,get children(){return S.t("command.project.open")}})),Mt}})},get children(){var Mt=R5e(),xn=Mt.firstChild,Ft=xn.firstChild,Un=Ft.firstChild,Hn=Un.nextSibling;return F(Un,()=>S.t("sidebar.empty.title")),F(Hn,()=>S.t("sidebar.empty.description")),F(xn,b(Qt,{size:"large",icon:"folder-add-left",onClick:zu,get children(){return S.t("command.project.open")}}),null),Mt}})},children:Mt=>[(()=>{var xn=F5e(),Ft=xn.firstChild,Un=Ft.firstChild;return F(Un,b(fi,{get id(){return`project:${ge()}`},value:ye,onSave:Hn=>{nj(Mt,Hn)},class:"text-14-medium text-text-strong truncate",displayClass:"text-14-medium text-text-strong truncate",stopPropagation:!0}),null),F(Un,b(In,{placement:"bottom",gutter:2,get value(){return De()},class:"shrink-0",contentStyle:{"max-width":"640px",transform:"translate3d(52px, 0, 0)"},get children(){var Hn=j5e();return F(Hn,()=>De().replace(on(),"~")),Hn}}),null),F(Ft,b(un,{get modal(){return!$n()},get children(){return[b(un.Trigger,{as:oi,icon:"dot-grid",variant:"ghost","data-action":"project-menu",get"data-project"(){return Re()},class:"shrink-0 size-6 rounded-md transition-opacity data-[expanded]:bg-surface-base-active",get classList(){return{"opacity-100":z.mobile||Q(),"opacity-0 group-hover/project:opacity-100 group-focus-within/project:opacity-100 data-[expanded]:opacity-100":!z.mobile&&!Q()}},get"aria-label"(){return S.t("common.moreOptions")}}),b(un.Portal,{get children(){return b(un.Content,{class:"mt-1",get children(){return[b(un.Item,{onSelect:()=>{J5(Mt)},get children(){return b(un.ItemLabel,{get children(){return S.t("common.edit")}})}}),b(un.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return Re()},get disabled(){return!Tt()},onSelect:()=>{X5(Mt)},get children(){return b(un.ItemLabel,{get children(){return Fe(()=>!!Ke())()?S.t("sidebar.workspaces.disable"):S.t("sidebar.workspaces.enable")}})}}),b(un.Item,{"data-action":"project-clear-notifications",get"data-project"(){return Re()},get disabled(){return ft()===0},onSelect:it,get children(){return b(un.ItemLabel,{get children(){return S.t("sidebar.project.clearNotifications")}})}}),b(un.Separator,{}),b(un.Item,{"data-action":"project-close-menu",get"data-project"(){return Re()},onSelect:()=>{const Hn=De();Hn&&Y5(Hn)},get children(){return b(un.ItemLabel,{get children(){return S.t("common.close")}})}})]}})}})]}}),null),xn})(),(()=>{var xn=B5e();return F(xn,b(fe,{get when(){return Ke()},get fallback(){return[(()=>{var Ft=A9();return F(Ft,b(Qt,{size:"large",icon:"new-session",class:"w-full",onClick:()=>{const Un=Te();Un&&yr(`/${mt(Un)}/session`)},get children(){return S.t("command.session.new")}})),Ft})(),(()=>{var Ft=V5e();return F(Ft,b(J4e,{ctx:t6,project:Mt,directory:Te,sortNow:bt,get mobile(){return z.mobile}})),Ft})()]},get children(){return[(()=>{var Ft=A9();return F(Ft,b(Qt,{size:"large",icon:"plus-small",class:"w-full",onClick:()=>{e6(Mt)},get children(){return S.t("workspace.new")}})),Ft})(),(()=>{var Ft=H5e();return F(Ft,b(pN,{onDragStart:hj,onDragEnd:mj,onDragOver:pj,collisionDetector:fN,get children(){return[b(mN,{}),b(SN,{}),(()=>{var Un=U5e();return Sr(Hn=>{z.mobile||(a=Hn)},Un),F(Un,b(yN,{get ids(){return Ue()},get children(){return b(Wt,{get each(){return Ue()},children:Hn=>b(X4e,{ctx:t6,directory:Hn,project:Mt,sortNow:bt,get mobile(){return z.mobile}})})}})),Un})(),b(gN,{get children(){return b(K4e,{sidebarProject:Q5,activeWorkspace:()=>r.activeWorkspace,workspaceLabel:Mo})}})]}})),Ft})()]}})),xn})()]})),Me(Mt=>{var xn={"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":z.mobile,"max-w-full overflow-hidden":z.mobile},Ft=z.mobile?void 0:`${f1()}px`;return Mt.e=Et(Ze,xn,Mt.e),Ft!==Mt.t&&ii(Ze,"width",Mt.t=Ft),Mt},{e:void 0,t:void 0}),Ze})()},h1=()=>f.projects.list(),vj=()=>b(Ake,{projects:h1,activeProject:()=>r.activeProject}),yj=z=>{yr(jke(z))},r6=z=>b(Wke,{mobile:z,opened:()=>f.sidebar.opened(),get aimMove(){return wn.move},projects:h1,renderProject:H=>b(Mke,{ctx:gj,project:H,sortNow:bt,mobile:z}),handleDragStart:lj,handleDragEnd:uj,handleDragOver:cj,get openProjectLabel(){return S.t("command.project.open")},openProjectKeybind:()=>x.keybind("project.open"),onOpenProject:zu,renderProjectOverlay:vj,settingsLabel:()=>S.t("sidebar.settings"),settingsKeybind:()=>x.keybind("settings.open"),onOpenSettings:kn,restartLabel:()=>S.t("sidebar.restart"),restartConfirm:()=>S.t("sidebar.restart.confirm"),onRestart:()=>{m.restart?.()},renderPanel:()=>K()?b(Uke,{mobile:z,merged:!0,get width(){return f1()},current:ve,onSelect:yj}):ie()?(()=>{var H=E9();return F(H,b(u5e,{mobile:z,merged:!0,projectID:()=>re()?.id,projectWorktree:()=>re()?.worktree})),Me(Q=>{var de={"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":!z,"flex-1 min-w-0 max-w-full overflow-hidden":!!z},ye=z?void 0:`${f1()}px`;return Q.e=Et(H,de,Q.e),ye!==Q.t&&ii(H,"width",Q.t=ye),Q},{e:void 0,t:void 0}),H})():z?b(n6,{project:pn,mobile:!0}):b(n6,{project:pn,merged:!0})});return(()=>{var z=W5e(),H=z.firstChild,Q=H.firstChild,de=Q.firstChild,ye=de.firstChild,ge=ye.firstChild,De=ye.nextSibling,Te=De.nextSibling,Re=Te.firstChild,Ue=Re.nextSibling,ft=Te.nextSibling,it=ft.firstChild;return F(z,()=>ph()??"",H),F(z,b(Cwe,{}),H),ye.addEventListener("mouseleave",()=>{wn.reset(),$n()&&ch()}),ye.addEventListener("mouseenter",()=>{Jr()}),Sr(Ke=>{Ce("nav",Ke)},ye),Et(ye,{"hidden xl:block":!0,"absolute inset-y-0 left-0":!0,"z-10":!0}),F(ge,r6),F(de,b(fe,{get when(){return f.sidebar.opened()},get children(){var Ke=q5e();return Ke.$$pointerdown=()=>Ce("sizing",!0),F(Ke,b(Kve,{direction:"horizontal",get size(){return f.sidebar.width()},min:244,get max(){return typeof window>"u"?1e3:window.innerWidth*.3+64},onResize:Tt=>{Ce("sizing",!0),Jt!==void 0&&clearTimeout(Jt),Jt=window.setTimeout(()=>Ce("sizing",!1),120),f.sidebar.resize(Tt)}})),Me(Tt=>ii(Ke,"left",`${yh()}px`)),Ke}}),De),Re.$$click=Ke=>{Ke.target===Ke.currentTarget&&f.mobileSidebar.hide()},Ue.$$click=Ke=>Ke.stopPropagation(),F(Ue,()=>r6(!0)),Et(it,{"size-full overflow-hidden flex flex-col items-start contain-strict bg-background-base":!0}),F(it,b(fe,{get when(){return!ph.loading},get fallback(){return by()},get children(){return b(X9,{fallback:(Ke,Tt)=>{const on=Ke instanceof Error?Ke.message:String(Ke);if((/failed to fetch dynamically imported module/i.test(on)||/importing a module script failed/i.test(on)||/dynamically imported module/i.test(on))&&typeof window<"u"){const Mt="codeplane-stale-chunk-reload";if(sessionStorage.getItem(Mt)!=="1")return sessionStorage.setItem(Mt,"1"),window.location.reload(),by()}return(()=>{var Mt=G5e(),xn=Mt.firstChild,Ft=xn.nextSibling;return F(xn,()=>S.t("error.page.title")),F(Ft,()=>on||S.t("error.chain.unknown")),F(Mt,b(Qt,{onClick:Tt,get children(){return S.t("common.refresh")}}),null),Mt})()},get children(){return b(J9,{get fallback(){return by()},get children(){return e.children}})}})}})),F(H,(()=>{var Ke=Fe(()=>!1);return()=>Ke()&&b(v2e,{})})(),null),F(z,b(ra.Region,{}),null),Me(Ke=>{var Tt=S.t("sidebar.nav.projectsAndSessions"),on=`${yh()}px`,Ze={"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()},Mt=S.t("sidebar.nav.projectsAndSessions"),xn={"@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]":!!pn(),"w-[78vw] max-w-[300px]":!pn(),"translate-x-0":f.mobileSidebar.opened(),"-translate-x-full":!f.mobileSidebar.opened()},Ft={"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":!ae.sizing},Un=f.sidebar.opened()?`${yh()}px`:"4rem";return Tt!==Ke.e&&Je(ye,"aria-label",Ke.e=Tt),on!==Ke.t&&ii(ye,"width",Ke.t=on),Ke.a=Et(Re,Ze,Ke.a),Mt!==Ke.o&&Je(Ue,"aria-label",Ke.o=Mt),Ke.i=Et(Ue,xn,Ke.i),Ke.n=Et(ft,Ft,Ke.n),Un!==Ke.s&&ii(ft,"--main-left",Ke.s=Un),Ke},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),z})()}mr(["click","pointerdown"]);var Z5e=ee("<option>"),Y5e=ee("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function X5e(e){let t;const[n,r]=ue(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),i=Li(),[o,s]=he(!1),a=l=>{const c=n.collection.getItem(l);return b(fe,{get when(){return c?.type==="item"},get children(){var u=Z5e();return u.value=l,F(u,()=>c?.textValue),Me(()=>u.selected=n.selectionManager.isSelected(l)),u}})};return oe(wt(()=>n.selectionManager.selectedKeys(),(l,c)=>{c&&FR(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=Y5e(),c=l.firstChild,u=c.nextSibling;u.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),u.addEventListener("change",h=>{je(h,n.onChange),o()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var d=ut(h=>t=h,n.ref);return typeof d=="function"&&Sr(d,u),Wr(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),F(u,b(fe,{get when(){return n.isVirtualized},get fallback(){return b(Wt,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return b(Wt,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Me(h=>{var f=ym,p=n.selectionManager.isFocused()||n.isOpen?-1:0,m=i.isRequired(),g=i.isDisabled(),v=i.isReadOnly();return h.e=gm(l,f,h.e),p!==h.t&&Je(c,"tabindex",h.t=p),m!==h.a&&(c.required=h.a=m),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 L9=new WeakMap;function J5e(e){let t=L9.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return L9.set(e,t),t}var Q5e={};Cr(Q5e,{Item:()=>i1,ItemDescription:()=>o1,ItemIndicator:()=>s1,ItemLabel:()=>a1,Listbox:()=>e6e,Root:()=>W5,Section:()=>l1,useListboxContext:()=>Nz});var Rz=yt();function Nz(){const e=pt(Rz);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var zz=yt();function q5(){const e=pt(zz);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function i1(e){let t;const n=Nz(),r=`${n.generateId("item")}-${fn()}`,i=ze({id:r},e),[o,s]=ue(i,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=he(),[c,u]=he(),d=()=>n.listState().selectionManager(),h=()=>d().focusedKey()===o.item.key,f=Lg({key:()=>o.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>o.item.disabled},()=>t),p=()=>{if(d().selectionMode()!=="none")return f.isSelected()},m=U(()=>!(Cf()&&a_())),g=()=>m()?o["aria-label"]:void 0,v=()=>m()?a():void 0,y=()=>m()?c():void 0,w=()=>{if(!n.isVirtualized())return;const I=n.listState().collection().getItem(o.item.key)?.index;return I!=null?I+1:void 0},k=()=>{if(n.isVirtualized())return J5e(n.listState().collection())},x=I=>{je(I,o.onPointerMove),I.pointerType==="mouse"&&!f.isDisabled()&&n.shouldFocusOnHover()&&(mn(I.currentTarget),d().setFocused(!0),d().setFocusedKey(o.item.key))},C=U(()=>({"data-disabled":f.isDisabled()?"":void 0,"data-selected":f.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),S={isSelected:f.isSelected,dataset:C,generateId:Nr(()=>s.id),registerLabelId:an(l),registerDescriptionId:an(u)};return b(zz.Provider,{value:S,get children(){return b(qe,ne({as:"li",ref(I){var M=ut(D=>t=D,o.ref);typeof M=="function"&&M(I)},role:"option",get tabIndex(){return f.tabIndex()},get"aria-disabled"(){return f.isDisabled()},get"aria-selected"(){return p()},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 Ct([o.onPointerDown,f.onPointerDown])},get onPointerUp(){return Ct([o.onPointerUp,f.onPointerUp])},get onClick(){return Ct([o.onClick,f.onClick])},get onKeyDown(){return Ct([o.onKeyDown,f.onKeyDown])},get onMouseDown(){return Ct([o.onMouseDown,f.onMouseDown])},get onFocus(){return Ct([o.onFocus,f.onFocus])},onPointerMove:x},C,s))}})}function o1(e){const t=q5(),n=ze({id:t.generateId("description")},e);return oe(()=>pe(t.registerDescriptionId(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function s1(e){const t=q5(),n=ze({id:t.generateId("indicator")},e),[r,i]=ue(n,["forceMount"]);return b(fe,{get when(){return r.forceMount||t.isSelected()},get children(){return b(qe,ne({as:"div","aria-hidden":"true"},()=>t.dataset(),i))}})}function a1(e){const t=q5(),n=ze({id:t.generateId("label")},e);return oe(()=>pe(t.registerLabelId(n.id))),b(qe,ne({as:"div"},()=>t.dataset(),n))}function W5(e){let t;const n=`listbox-${fn()}`,r=ze({id:n,selectionMode:"single",virtualized:!1},e),[i,o]=ue(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=U(()=>i.state?i.state:Dg({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>me(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>me(i.disallowEmptySelection),selectionBehavior:()=>me(i.selectionBehavior),selectionMode:()=>me(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),a=VR({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>me(i.autoFocus),shouldFocusWrap:()=>me(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>me(i.disallowEmptySelection),selectOnFocus:()=>me(i.selectOnFocus),disallowTypeAhead:()=>me(i.disallowTypeAhead),shouldUseVirtualFocus:()=>me(i.shouldUseVirtualFocus),allowsTabNavigation:()=>me(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>t,()=>i.scrollRef?.()),l={listState:s,generateId:Nr(()=>o.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return b(Rz.Provider,{value:l,get children(){return b(qe,ne({as:"ul",ref(c){var u=ut(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 Ct([i.onKeyDown,a.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,a.onMouseDown])},get onFocusIn(){return Ct([i.onFocusIn,a.onFocusIn])},get onFocusOut(){return Ct([i.onFocusOut,a.onFocusOut])}},o,{get children(){return b(fe,{get when(){return!i.virtualized},get fallback(){return i.children?.(s().collection)},get children(){return b(mF,{get each(){return[...s().collection()]},by:"key",children:c=>b(Al,{get children(){return[b(Mn,{get when(){return c().type==="section"},get children(){return i.renderSection?.(c())}}),b(Mn,{get when(){return c().type==="item"},get children(){return i.renderItem?.(c())}})]}})})}})}}))}})}function l1(e){return b(qe,ne({as:"li",role:"presentation"},e))}var e6e=Object.assign(W5,{Item:i1,ItemDescription:o1,ItemIndicator:s1,ItemLabel:a1,Section:l1}),t6e={};Cr(t6e,{Arrow:()=>Ai,Content:()=>Fz,Description:()=>Oa,ErrorMessage:()=>Pa,HiddenSelect:()=>Uz,Icon:()=>Hz,Item:()=>i1,ItemDescription:()=>o1,ItemIndicator:()=>s1,ItemLabel:()=>a1,Label:()=>Bz,Listbox:()=>Vz,Portal:()=>qz,Root:()=>Wz,Section:()=>l1,Select:()=>Pi,Trigger:()=>Gz,Value:()=>Kz,useSelectContext:()=>qs});var jz=yt();function qs(){const e=pt(jz);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Fz(e){let t;const n=qs(),[r,i]=ue(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),o=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return wm({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),km({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),bm({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(mn(n.triggerRef()),a.preventDefault())}},()=>t),b(fe,{get when(){return n.contentPresent()},get children(){return b(cs.Positioner,{get children(){return b(ou,ne({ref(a){var l=ut(c=>{n.setContentRef(c),t=c},r.ref);typeof l=="function"&&l(a)},get disableOutsidePointerEvents(){return Fe(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return _r({"--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 Uz(e){const t=qs();return b(X5e,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 Hz(e){const t=qs(),n=ze({children:"▼"},e);return b(qe,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Bz(e){const t=qs(),[n,r]=ue(e,["onClick"]);return b(oh,ne({as:"span",onClick:o=>{je(o,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Vz(e){const t=qs(),n=ze({id:t.generateId("listbox")},e),[r,i]=ue(n,["ref","id","onKeyDown"]);return oe(()=>pe(t.registerListboxId(r.id))),b(W5,ne({ref(s){var a=ut(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=>{je(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},i))}function qz(e){const t=qs();return b(fe,{get when(){return t.contentPresent()},get children(){return b(js,e)}})}function n6e(e){const t=`select-${fn()}`,n=ze({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,i,o,s]=ue(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"],Yg),[a,l]=he(),[c,u]=he(),[d,h]=he(),[f,p]=he(),[m,g]=he(),[v,y]=he(),[w,k]=he(),[x,C]=he(!0),S=ce=>{const ae=r.optionValue;return ae==null?String(ce):String(_f(ae)?ae(ce):ce[ae])},I=U(()=>{const ce=r.optionGroupChildren;return ce==null?r.options:r.options.flatMap(ae=>ae[ce]??ae)}),M=U(()=>I().map(ce=>S(ce))),D=ce=>[...ce].map(ae=>I().find(Ce=>S(Ce)===ae)).filter(ae=>ae!=null),O=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:ce=>r.onOpenChange?.(ce)}),$=Dg({selectedKeys:()=>r.value!=null?r.value.map(S):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(S):r.defaultValue,onSelectionChange:ce=>{r.onChange?.(D(ce)),r.closeOnSelection&&K()},allowDuplicateSelectionEvents:()=>me(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>me(r.disallowEmptySelection),selectionBehavior:()=>me(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),E=U(()=>D($.selectionManager().selectedKeys())),A=ce=>{$.selectionManager().toggleSelection(S(ce))},{present:T}=xo({show:()=>r.forceMount||O.isOpen(),element:()=>m()??null}),R=()=>{const ce=v();ce&&mn(ce)},G=ce=>{if(r.options.length<=0)return;C(ce),O.open();let ae=$.selectionManager().firstSelectedKey();ae==null&&(ce==="first"?ae=$.collection().getFirstKey():ce==="last"&&(ae=$.collection().getLastKey())),R(),$.selectionManager().setFocused(!0),$.selectionManager().setFocusedKey(ae)},K=()=>{O.close(),$.selectionManager().setFocused(!1),$.selectionManager().setFocusedKey(void 0)},q=ce=>{O.isOpen()?K():G(ce)},{formControlContext:W}=Xg(o);sh(f,()=>{const ce=r.defaultValue?[...r.defaultValue].map(S):new Bo;$.selectionManager().setSelectedKeys(ce)});const N=wR({usage:"search",sensitivity:"base"}),V=U(()=>{const ce=me(r.keyboardDelegate);return ce||new BR($.collection,void 0,N)}),J=ce=>r.itemComponent?.({item:ce}),ie=ce=>r.sectionComponent?.({section:ce});oe(wt([M],([ce])=>{const Ce=[...$.selectionManager().selectedKeys()].filter(_e=>ce.includes(_e));$.selectionManager().setSelectedKeys(Ce)},{defer:!0}));const re=U(()=>({"data-expanded":O.isOpen()?"":void 0,"data-closed":O.isOpen()?void 0:""})),ve={dataset:re,isOpen:O.isOpen,isDisabled:()=>W.isDisabled()??!1,isMultiple:()=>me(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??ve.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:E,contentPresent:T,autoFocus:x,triggerRef:f,listState:()=>$,keyboardDelegate:V,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:k,setTriggerRef:p,setContentRef:g,setListboxRef:y,open:G,close:K,toggle:q,placeholder:()=>r.placeholder,renderItem:J,renderSection:ie,removeOptionFromSelection:A,generateId:Nr(()=>me(o.id)),registerTriggerId:an(l),registerValueId:an(u),registerListboxId:an(h)};return b(ih.Provider,{value:W,get children(){return b(jz.Provider,{value:ve,get children(){return b(cs,ne({anchorRef:f,contentRef:m},i,{get children(){return b(qe,ne({as:"div",role:"group",get id(){return me(o.id)}},()=>W.dataset(),re,s))}}))}})}})}function Wz(e){const[t,n]=ue(e,["value","defaultValue","onChange","multiple"]),r=U(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),i=U(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return b(n6e,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 Gz(e){const t=Li(),n=qs(),r=ze({id:n.generateId("trigger")},e),[i,o,s]=ue(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],L5),a=()=>n.listState().selectionManager(),l=()=>n.keyboardDelegate(),c=()=>i.disabled||n.isDisabled(),{fieldProps:u}=D5(o),{typeSelectHandlers:d}=UR({keyboardDelegate:l,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,f=y=>{je(y,i.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},p=y=>{je(y,i.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=y=>{if(je(y,i.onKeyDown),!c())switch(je(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=>{je(y,i.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{je(y,i.onBlur),!n.isOpen()&&a().setFocused(!1)};return oe(()=>pe(n.registerTriggerId(u.id()))),oe(()=>{n.setListboxAriaLabelledBy([u.ariaLabelledBy(),u.ariaLabel()&&!u.ariaLabelledBy()?u.id():null].filter(Boolean).join(" ")||void 0)}),b(rs,ne({ref(y){var w=ut(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 Fe(()=>!!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:p,onKeyDown:m,onFocus:g,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Kz(e){const t=Li(),n=qs(),r=ze({id:n.generateId("value")},e),[i,o]=ue(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const l=s().selectedKeys();return l.size===1&&l.has("")?!0:s().isEmpty()};return oe(()=>pe(n.registerValueId(i.id))),b(qe,ne({as:"span",get id(){return i.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),o,{get children(){return b(fe,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return b(r6e,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:l=>n.removeOptionFromSelection(l),clear:()=>s().clearSelection()},get children(){return i.children}})}})}}))}function r6e(e){const t=El(()=>{const n=e.children;return _f(n)?n(e.state):n});return Fe(t)}var Pi=Object.assign(Wz,{Arrow:Ai,Content:Fz,Description:Oa,ErrorMessage:Pa,HiddenSelect:Uz,Icon:Hz,Item:i1,ItemDescription:o1,ItemIndicator:s1,ItemLabel:a1,Label:Bz,Listbox:Vz,Portal:qz,Section:l1,Trigger:Gz,Value:Kz});function D9(e){const[t,n]=ue(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)};pe(i);const a=U(()=>gf(t.options,C2(c=>t.groupBy?t.groupBy(c):""),L1e(),x1e(([c,u])=>({category:c,options:u}))));return b(Pi,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(Pi.Section,{"data-slot":"select-section",get children(){return l.section.rawValue.category}}),itemComponent:l=>b(Pi.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(Pi.ItemLabel,{"data-slot":"select-select-item-label",get children(){return Fe(()=>!!t.children)()?t.children(l.item.rawValue):Fe(()=>!!t.label)()?t.label(l.item.rawValue):l.item.rawValue}}),b(Pi.ItemIndicator,{"data-slot":"select-select-item-indicator",get children(){return b(Gt,{name:"check-small",size:"small"})}})]}})),onChange:l=>{t.onSelect?.(l??void 0),i()},onOpenChange:l=>{t.onOpenChange?.(l),l||i()},get children(){return[b(Pi.Trigger,ne(()=>t.triggerProps,{get disabled(){return e.disabled},"data-slot":"select-select-trigger",as:Qt,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(Pi.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(Pi.Icon,{"data-slot":"select-select-trigger-icon",get children(){return b(Gt,{get name(){return t.triggerVariant==="settings"?"selector":"chevron-down"},size:"small"})}})]}})),b(Pi.Portal,{get children(){return b(Pi.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(Pi.Listbox,{"data-slot":"select-select-content-list"})}})}})]}}))}var i6e=ee("<span>");function M9(e){const[t,n]=ue(e,["size","class","classList","children"]);return(()=>{var r=i6e();return Wr(r,ne(n,{"data-component":"tag",get"data-size"(){return t.size||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}),!1,!0),F(r,()=>t.children),r})()}const O9=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function o6e(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??{}))O9(i)&&n.set(r,i);for(const[r,i]of Object.entries(e.config?.agent??{}))O9(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 s6e=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">'),a6e=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">'),l6e=ee('<ul class="overflow-hidden rounded-lg border border-border-weaker-base bg-background-base shadow-[var(--shadow-xs)]">'),c6e=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)]">'),u6e=ee('<div class="mt-0.5 truncate text-12-regular text-text-weak">'),d6e=ee("<span>·"),f6e=ee("<span>: "),h6e=ee('<div class="mt-1.5 text-12-regular text-text-critical-base whitespace-pre-wrap break-words line-clamp-3">'),p6e=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">'),m6e=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">'),g6e=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-1 rounded-md border border-border-weak-base p-0.5 self-start"><button type=button class="px-3 py-1 rounded text-13-regular transition-colors">Cron</button><button type=button class="px-3 py-1 rounded text-13-regular 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 v6e=["cron","tasks"],y6e=5e3,b6e=6e4;function P9(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 w6e(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 wy(){const e=ui(),t=Ao(),n=gr(),r=or(),i=U(()=>n.current?.http),o=U(()=>(r.data.project??[]).filter(p=>p.id!=="global")),s=U(()=>Dr(e.dir)),a=U(()=>new URLSearchParams(t.search).get("projectID")??void 0),l=U(()=>e.projectID??a()),c=U(()=>{const p=s();return p?z2(p,o(),a()):o().find(m=>m.id===l())}),u=U(()=>wz(c(),l())),d=Eo();oe(()=>{const p=c();p&&(e.dir||d(`/cron/worktree/${mt(p.worktree)}${p.id?`?projectID=${encodeURIComponent(p.id)}`:""}`,{replace:!0}))});const h=ka(()=>({queryKey:[...v6e,n.scope.key,u(),s()],queryFn:async()=>{const p=i(),m=u(),g=s();return p?m?Qo.list(p,{projectID:m}):g?Qo.list(p,{directory:g}):[]:[]},enabled:!!i()&&(!!u()||!!s()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:y6e,gcTime:b6e,retry:1})),f=U(()=>(h.data??[]).filter(p=>{const m=u(),g=s();return kz(p,{projectID:m,project:c(),directory:g})}));return(()=>{var p=s6e(),m=p.firstChild;return F(m,b(k6e,{selectedProject:c}),null),F(m,b(x6e,{server:i,tasks:f,selectedProject:c}),null),p})()}function k6e(e){const t=Rt(),n=To(),r=()=>{const i=e.selectedProject();if(!i?.worktree){Ot({variant:"error",title:t.t("common.requestFailed"),description:t.t("cron.create.noProject")});return}n.show(()=>b(Zz,{project:i}))};return(()=>{var i=a6e(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling;return F(a,()=>t.t("cron.title")),F(l,()=>t.t("cron.subtitle")),F(o,b(Qt,{variant:"primary",size:"large",icon:"plus-small",onClick:r,get children(){return t.t("cron.create")}}),null),i})()}function x6e(e){const t=Rt(),n=To(),r=i=>{const o=e.selectedProject();o?.worktree&&n.show(()=>b(Zz,{project:o,existing:i}))};return b(fe,{get when(){return e.tasks().length>0},get fallback(){return(()=>{var i=c6e();return F(i,(()=>{var o=Fe(()=>!!e.selectedProject());return()=>o()?t.t("cron.empty.project"):t.t("cron.empty")})()),i})()},get children(){var i=l6e();return F(i,b(Wt,{get each(){return e.tasks()},children:o=>b(S6e,{task:o,get server(){return e.server},onEdit:()=>r(o)})})),i}})}function S6e(e){const t=Rt(),n=pu(),r=Rt().intl,i=()=>n.invalidateQueries({queryKey:["cron"]}),o=Pd(()=>({mutationFn:async l=>{const c=e.server();if(!c)throw new Error("No server connection");return Qo.setStatus(c,e.task.id,l)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),s=Pd(()=>({mutationFn:async()=>{const l=e.server();if(!l)throw new Error("No server connection");return Qo.trigger(l,e.task.id)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),a=Pd(()=>({mutationFn:async()=>{if(!confirm(t.t("cron.delete.confirm")))return;const l=e.server();if(!l)throw new Error("No server connection");return Qo.remove(l,e.task.id)},onSuccess:()=>i(),onError:l=>Ot({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})}));return(()=>{var l=p6e(),c=l.firstChild,u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling,p=f.firstChild,m=p.nextSibling,g=m.nextSibling,v=g.firstChild,y=u.nextSibling;return F(d,b(Gt,{name:"bell",size:"small",class:"icon-strong-base shrink-0"}),h),F(h,()=>e.task.name),F(d,b(M9,{get children(){return t.t(`cron.status.${e.task.status}`)}}),null),F(d,b(fe,{get when(){return e.task.lastRunStatus},get children(){return b(M9,{get children(){return t.t(`cron.run.status.${e.task.lastRunStatus}`)}})}}),null),F(u,b(fe,{get when(){return e.task.description},get children(){var w=u6e();return F(w,()=>e.task.description),w}}),f),F(p,()=>w6e(e.task,t)),F(g,()=>t.t("cron.next"),v),F(g,(()=>{var w=Fe(()=>e.task.status==="active");return()=>w()?P9(e.task.nextRunAt,r())??t.t("cron.never"):"—"})(),null),F(f,b(fe,{get when(){return e.task.lastRunAt},get children(){return[d6e(),(()=>{var w=f6e(),k=w.firstChild;return F(w,()=>t.t("cron.last"),k),F(w,()=>P9(e.task.lastRunAt,r()),null),w})()]}}),null),F(u,b(fe,{get when(){return Fe(()=>!!e.task.lastError)()&&e.task.lastRunStatus!=="success"},get children(){var w=h6e();return F(w,()=>e.task.lastError),w}}),null),F(y,b(In,{get value(){return t.t("cron.action.trigger")},placement:"top",get children(){return b(oi,{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),F(y,b(fe,{get when(){return e.task.status==="active"},get fallback(){return b(In,{get value(){return t.t("cron.action.resume")},placement:"top",get children(){return b(oi,{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(In,{get value(){return t.t("cron.action.pause")},placement:"top",get children(){return b(oi,{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),F(y,b(In,{get value(){return t.t("cron.action.edit")},placement:"top",get children(){return b(oi,{icon:"edit",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.edit")},get onClick(){return e.onEdit}})}}),null),F(y,b(In,{get value(){return t.t("cron.action.delete")},placement:"top",get children(){return b(oi,{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 _6e(e){return e instanceof Error&&"status"in e}function C6e(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 Zz(e){const t=Rt(),n=To(),r=pu(),i=gr(),o=eh(),s=or(),a=Qi(),l=U(()=>i.current?.http),c=ka(()=>({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=U(()=>o6e({agents:c.data,config:s.data.config,defaultLabel:t.t("common.default")})),d=U(()=>{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,p]=et(h()),m=()=>{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=C6e(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 p("errors",y),Object.keys(y).length===0},g=y=>{if(p("errors",{}),!_6e(y)){p("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),p("errors",w)},v=Pd(()=>({mutationFn:async()=>{if(!m()){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 Qo.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 Qo.create(y,x)}},onSuccess:()=>{r.invalidateQueries({queryKey:["cron"]}),n.close()},onError:y=>{y instanceof Error&&y._validation||(g(y),Ot({variant:"error",title:t.t("common.requestFailed"),description:y instanceof Error?y.message:String(y)}))}}));return b(tu,{get title(){return Fe(()=>!!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=g6e(),w=y.firstChild,k=w.firstChild,x=k.firstChild,C=x.nextSibling,S=C.firstChild,I=S.nextSibling,M=k.nextSibling,D=M.firstChild,O=D.firstChild,$=M.nextSibling,E=$.firstChild,A=w.nextSibling;return y.addEventListener("submit",T=>{T.preventDefault(),v.mutate()}),F(w,b(sa,{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=>p("name",T),get error(){return f.errors.name}}),k),F(w,b(sa,{get label(){return t.t("cron.field.description")},get placeholder(){return t.t("cron.field.description")},get value(){return f.description},onChange:T=>p("description",T)}),k),F(w,b(sa,{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=>p("prompt",T),get error(){return f.errors.prompt},class:"max-h-40 w-full overflow-y-auto"}),k),F(x,()=>t.t("cron.field.scheduleKind")),S.$$click=()=>p("scheduleKind","cron"),I.$$click=()=>p("scheduleKind","interval"),F(w,b(fe,{get when(){return f.scheduleKind==="cron"},get fallback(){return b(sa,{get label(){return t.t("cron.field.schedule.interval")},placeholder:"60",type:"number",get value(){return f.intervalMinutes},onChange:T=>p("intervalMinutes",T),get error(){return f.errors.schedule},inputmode:"numeric"})},get children(){return b(sa,{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=>p("cronExpression",T),get error(){return f.errors.schedule},spellcheck:!1,class:"font-mono text-xs"})}}),M),F(M,b(sa,{get label(){return t.t("cron.field.timeout")},placeholder:"30",type:"number",get value(){return f.timeoutMinutes},onChange:T=>p("timeoutMinutes",T),get error(){return f.errors.timeout},inputmode:"numeric"}),D),F(O,()=>t.t("cron.field.agent")),F(D,b(D9,{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=>p("agent",T?.name??"")}),null),F(E,()=>t.t("cron.field.model")),F($,b(D9,{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=>p("model",T?`${T.providerID}/${T.modelID}`:"")}),null),F(w,b(fe,{get when(){return f.errors.form},get children(){var T=m6e();return F(T,()=>f.errors.form),T}}),null),F(A,b(Qt,{type:"button",variant:"ghost",size:"large",onClick:()=>n.close(),get children(){return t.t("common.cancel")}}),null),F(A,b(Qt,{type:"submit",variant:"primary",size:"large",get disabled(){return v.isPending},get children(){return Fe(()=>!!v.isPending)()?t.t("common.saving"):t.t("common.save")}}),null),Me(T=>{var R={"bg-surface-base-active text-text-strong":f.scheduleKind==="cron","text-text-base hover:text-text-strong":f.scheduleKind!=="cron"},G={"bg-surface-base-active text-text-strong":f.scheduleKind==="interval","text-text-base hover:text-text-strong":f.scheduleKind!=="interval"};return T.e=Et(S,R,T.e),T.t=Et(I,G,T.t),T},{e:void 0,t:void 0}),y}})}mr(["click"]);var I6e=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>'),$6e=ee('<p class="text-xs text-text-weak">');const C0=`
|
|
2448
2448
|
`+"─".repeat(40)+`
|
|
2449
2449
|
`;function T6e(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 E6e(e){return typeof e=="object"&&e!==null&&"name"in e&&"data"in e&&typeof e.data=="object"}function Yz(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 A6e(e,t){const n=e.data,r=i=>Yz(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(`
|
|
2450
2450
|
`)}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(`
|
|
@@ -2463,5 +2463,5 @@ ${u}`)}if(!u&&!s&&a.push(l+c),e.cause){const d=Xz(e.cause,t,n+1,e.message);d&&a.
|
|
|
2463
2463
|
${C0}${t("error.chain.causedBy")}
|
|
2464
2464
|
`:"")+e:(n>0?`
|
|
2465
2465
|
${C0}${t("error.chain.causedBy")}
|
|
2466
|
-
`:"")+i(e)}function L6e(e,t){return Xz(e,t,0)}const D6e=e=>{const t=Xi(),n=Rt();return(()=>{var r=I6e(),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 F(i,b(wre,{class:"w-58.5 opacity-12 shrink-0"}),o),F(s,()=>n.t("error.page.title")),F(a,()=>n.t("error.page.description")),F(i,b(sa,{get value(){return L6e(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),F(l,b(Qt,{size:"large",get onClick(){return t.restart},get children(){return n.t("error.page.action.restart")}})),F(u,()=>n.t("error.page.report.prefix"),d),d.$$click=()=>t.openLink("https://github.com/devinoldenburg/codeplane/issues/new"),F(h,()=>n.t("error.page.report.issues")),F(c,b(fe,{get when(){return t.version},keyed:!0,children:f=>(()=>{var p=$6e();return F(p,()=>n.t("error.page.version",{version:f})),p})()}),null),r})()};mr(["click"]);var M6e=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base">'),O6e=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">'),P6e=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">'),R6e=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 j2=()=>j(()=>import("./home-
|
|
2467
|
-
${t.scope.key}`);return b(fe,{get when(){return n()},keyed:!0,children:r=>e.children})}function rxe(e){return b(xce,{get defaultServer(){return e.defaultServer},get disableHealthCheck(){return e.disableHealthCheck},get servers(){return e.servers},get children(){return b(exe,{get disableHealthCheck(){return e.disableHealthCheck},get children(){return b(nxe,{get children(){return b(Z6e,{get children(){return b(i0e,{get children(){return b(ipe,{get children(){return b(e_,{get component(){return e.router??uie},root:t=>b(J6e,{get appChildren(){return e.children},get children(){return t.children}}),get children(){return[b(jr,{path:"/",component:N6e}),b(jr,{path:"/notifications",component:z6e}),b(jr,{path:"/modes",component:U6e}),b(jr,{path:"/models",component:H6e}),b(jr,{path:"/mcp",component:B6e}),b(jr,{path:"/plugins",component:V6e}),b(jr,{path:"/skills",component:q6e}),b(jr,{path:"/settings/:tab?",component:j6e}),b(jr,{path:"/cron",component:wy}),b(jr,{path:"/cron/worktree/:dir/session/:id",component:G6e}),b(jr,{path:"/cron/worktree/:dir",component:wy}),b(jr,{path:"/cron/:projectID",component:wy}),b(jr,{path:"/:dir",component:yR,get children(){return[b(jr,{path:"/",component:W6e}),b(jr,{path:"/session/:id?",component:Jz})]}})]}})}})}})}})}})}})}})}mr(["click"]);const ky="ResizeObserver loop";let R9=!1;function I0(e){return typeof e=="string"?e.includes(ky):e instanceof Error?e.message.includes(ky):!e||typeof e!="object"?!1:"message"in e&&typeof e.message=="string"?e.message.includes(ky):!1}function ixe(){if(R9||typeof window>"u")return;R9=!0,window.addEventListener("error",n=>{I0(n)&&(n.stopImmediatePropagation(),n.preventDefault())},!0),window.addEventListener("unhandledrejection",n=>{I0(n.reason)&&n.preventDefault()});const e=console.error.bind(console);console.error=(...n)=>{n.some(I0)||e(...n)};const t=window.reportError?.bind(window);t&&(window.reportError=(n=>{I0(n)||t(n)}))}const oxe="29.0.
|
|
2466
|
+
`:"")+i(e)}function L6e(e,t){return Xz(e,t,0)}const D6e=e=>{const t=Xi(),n=Rt();return(()=>{var r=I6e(),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 F(i,b(wre,{class:"w-58.5 opacity-12 shrink-0"}),o),F(s,()=>n.t("error.page.title")),F(a,()=>n.t("error.page.description")),F(i,b(sa,{get value(){return L6e(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),F(l,b(Qt,{size:"large",get onClick(){return t.restart},get children(){return n.t("error.page.action.restart")}})),F(u,()=>n.t("error.page.report.prefix"),d),d.$$click=()=>t.openLink("https://github.com/devinoldenburg/codeplane/issues/new"),F(h,()=>n.t("error.page.report.issues")),F(c,b(fe,{get when(){return t.version},keyed:!0,children:f=>(()=>{var p=$6e();return F(p,()=>n.t("error.page.version",{version:f})),p})()}),null),r})()};mr(["click"]);var M6e=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base">'),O6e=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">'),P6e=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">'),R6e=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 j2=()=>j(()=>import("./home-Da1fa31c.js"),[]),dm=()=>j(()=>import("./notifications-BCVGYtyk.js"),[]),fm=()=>j(()=>import("./settings-D2q6jv_8.js"),__vite__mapDeps([104,98,100,101,99])),hm=()=>j(()=>import("./session-B7TyS2pp.js").then(e=>e.s),__vite__mapDeps([105,98,100,103])),N6e=mm(j2),z6e=mm(dm),j6e=mm(fm),F6e=mm(hm),U6e=()=>b(hu,{href:"/settings/modes"}),H6e=()=>b(hu,{href:"/settings/models"}),B6e=()=>b(hu,{href:"/settings/mcp"}),V6e=()=>b(hu,{href:"/settings/plugins"}),q6e=()=>b(hu,{href:"/settings/skills"});if(typeof location=="object"){const e=location.pathname;/\/session(?:\/|$)/.test(e)&&hm(),e.startsWith("/settings")&&fm(),e==="/notifications"&&dm()}if(typeof window=="object"&&typeof requestIdleCallback=="function"){const e=()=>{j2(),fm(),dm(),hm()};requestIdleCallback(e,{timeout:3e3})}else typeof window=="object"&&window.setTimeout(()=>{j2(),fm(),dm(),hm()},1500);const Jz=()=>b(X6e,{get children(){return b(F6e,{})}}),W6e=()=>b(hu,{href:"session"}),G6e=()=>b(yR,{get children(){return b(Jz,{})}});function K6e(e){const t=Rt();return b(wU,{get value(){return{locale:t.intl,t:t.t}},get children(){return e.children}})}function Z6e(e){const t=new qie;return b(Uie,{client:t,get children(){return e.children}})}function Y6e(e){return b(ele,{get children(){return b(J1e,{get children(){return b(Ape,{get children(){return b(W1e,{get children(){return b(Mve,{get children(){return b(j1e,{get children(){return b(Tce,{get children(){return b(cme,{get children(){return b(b0e,{get children(){return b(K5e,{get children(){return e.children}})}})}})}})}})}})}})}})}})}})}function X6e(e){return b(vve,{get children(){return b(Wpe,{get children(){return b(cve,{get children(){return b(p0e,{get children(){return e.children}})}})}})}})}function J6e(e){return b(Y6e,{get children(){return[Fe(()=>e.appChildren),Fe(()=>e.children)]}})}function Q6e(e){return b(Ore,{get children(){return[b(gre,{}),b(Are,{get children(){return b(Vae,{get locale(){return e.locale},get children(){return b(K6e,{get children(){return b(X9,{fallback:t=>b(D6e,{error:t}),get children(){return b(vU,{get children(){return b(lX,{get children(){return b(aF,{component:mre,get children(){return e.children}})}})}})}})}})}})}})]}})}function exe(e){const t=gr(),n=w4(),[r,i]=he("blocking"),[o,s]=ns(()=>e.disableHealthCheck?!0:vae(function*(){if(!t.current)return!0;const{http:a,type:l}=t.current;for(;;){if((yield*pae(()=>n(a))).healthy)return!0;if(r()==="background"||l==="http")return!1}}).pipe(yae({duration:"10 seconds",orElse:()=>mae(!1)}),bae(gae(()=>i("background"))),wae));return b(J9,{get fallback(){return(()=>{var a=M6e();return F(a,b(HT,{class:"w-16 h-20 opacity-50 animate-pulse"})),a})()},get children(){return[Fe(()=>Fe(()=>r()==="blocking")()?o():o.latest),b(fe,{get when(){return o()},get fallback(){return b(txe,{onRetry:()=>{r()==="background"&&s.refetch()},onServerSelected:a=>{i("blocking"),t.setActive(a),s.refetch()}})},get children(){return e.children}})]}})}function txe(e){const t=Rt(),n=Xi(),r=gr(),i=()=>r.list.filter(c=>gn.key(c)!==r.key),o=U(()=>r.name||r.key),s="\0server\0",a=U(()=>t.t("app.server.unreachable",{server:s}).split(s)),l=setInterval(()=>e.onRetry?.(),1e3);return pe(()=>clearInterval(l)),(()=>{var c=P6e(),u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling;return F(u,b(HT,{class:"w-12 h-15 mb-4"}),d),F(d,()=>a()[0],h),F(h,o),F(d,()=>a()[1],null),F(f,()=>t.t("app.server.retrying")),F(c,b(fe,{get when(){return i().length>0},get children(){var p=O6e(),m=p.firstChild,g=m.nextSibling;return F(m,()=>t.t("app.server.otherServers")),F(g,b(Wt,{get each(){return i()},children:v=>{const y=gn.key(v);return(()=>{var w=R6e(),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)},F(k,()=>jp(v)),w})()}})),p}}),null),c})()}function nxe(e){const t=gr(),n=U(()=>`${t.key}
|
|
2467
|
+
${t.scope.key}`);return b(fe,{get when(){return n()},keyed:!0,children:r=>e.children})}function rxe(e){return b(xce,{get defaultServer(){return e.defaultServer},get disableHealthCheck(){return e.disableHealthCheck},get servers(){return e.servers},get children(){return b(exe,{get disableHealthCheck(){return e.disableHealthCheck},get children(){return b(nxe,{get children(){return b(Z6e,{get children(){return b(i0e,{get children(){return b(ipe,{get children(){return b(e_,{get component(){return e.router??uie},root:t=>b(J6e,{get appChildren(){return e.children},get children(){return t.children}}),get children(){return[b(jr,{path:"/",component:N6e}),b(jr,{path:"/notifications",component:z6e}),b(jr,{path:"/modes",component:U6e}),b(jr,{path:"/models",component:H6e}),b(jr,{path:"/mcp",component:B6e}),b(jr,{path:"/plugins",component:V6e}),b(jr,{path:"/skills",component:q6e}),b(jr,{path:"/settings/:tab?",component:j6e}),b(jr,{path:"/cron",component:wy}),b(jr,{path:"/cron/worktree/:dir/session/:id",component:G6e}),b(jr,{path:"/cron/worktree/:dir",component:wy}),b(jr,{path:"/cron/:projectID",component:wy}),b(jr,{path:"/:dir",component:yR,get children(){return[b(jr,{path:"/",component:W6e}),b(jr,{path:"/session/:id?",component:Jz})]}})]}})}})}})}})}})}})}})}mr(["click"]);const ky="ResizeObserver loop";let R9=!1;function I0(e){return typeof e=="string"?e.includes(ky):e instanceof Error?e.message.includes(ky):!e||typeof e!="object"?!1:"message"in e&&typeof e.message=="string"?e.message.includes(ky):!1}function ixe(){if(R9||typeof window>"u")return;R9=!0,window.addEventListener("error",n=>{I0(n)&&(n.stopImmediatePropagation(),n.preventDefault())},!0),window.addEventListener("unhandledrejection",n=>{I0(n.reason)&&n.preventDefault()});const e=console.error.bind(console);console.error=(...n)=>{n.some(I0)||e(...n)};const t=window.reportError?.bind(window);t&&(window.reportError=(n=>{I0(n)||t(n)}))}const oxe="29.0.3";ixe();const Qz="codeplane.settings.dat:defaultServerUrl",Ts=window.codeplaneDesktop?.storage,F2=window.codeplaneDesktop?.notifications,sxe=e=>{if(Ts)try{return Ts.getItem(void 0,e)}catch{return null}if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},axe=(e,t)=>{if(Ts){try{if(t!==null){Ts.setItem(void 0,e,t);return}Ts.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}},ej=()=>sxe(Qz),lxe=e=>axe(Qz,e);F2?.onClick?.(e=>{wN(e)});const cxe=async(e,t,n)=>{if(F2?.notify&&await F2.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=()=>{wN(n),o.close()},!0},uxe=e=>{window.open(e,"_blank")},dxe=()=>{window.history.back()},fxe=()=>{window.history.forward()},N9=document.getElementById("root"),G5=()=>location.hostname.includes("example.invalid")?"http://localhost:4096":location.origin,z9=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},hxe=async()=>{const e=G5();try{const t=await fetch(`${e}/global/restart`,{method:"POST",headers:{"Content-Type":"application/json"}});t.ok&&(await t.json().catch(()=>({}))).method==="exit"&&await z9(e)}catch{await z9(e)}window.location.reload()},j9=()=>{const e=ej();return e||G5()},F9=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"},tj=()=>{const e=window.codeplaneDesktop?.platform;if(e)return{desktop:!0,os:F9(e)};if(!(typeof navigator!="object"||!/electron/i.test(navigator.userAgent)))return{desktop:!0,os:F9(navigator.platform||navigator.userAgent)}},xy=tj();if(typeof document<"u"){const e=document.documentElement;xy?(e.dataset.desktop="true",xy.os&&(e.dataset.os=xy.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 Fi=window.codeplaneDesktop?.serverManager,pxe=()=>(Fi?.instances??[]).map(e=>({type:"http",displayName:e.label,http:{key:e.key,remoteUrl:e.remoteUrl,url:e.proxyUrl}})),mxe=()=>Fi?.currentKey??Fi?.defaultKey??Fi?.instances[0]?.key??null,gxe={platform:"web",...tj(),version:window.codeplaneDesktop?.version??oxe,desktopAppVersion:window.codeplaneDesktop?.version,serverManager:Fi,openLink:uxe,back:dxe,forward:fxe,restart:hxe,notify:cxe,storage:Ts?e=>({getItem:t=>Ts.getItem(e,t),setItem:(t,n)=>Ts.setItem(e,t,n),removeItem:t=>Ts.removeItem(e,t)}):void 0,getDefaultServer:async()=>{if(Fi){const t=await Fi.getDefaultKey();return t?gn.Key.make(t):null}const e=ej();return e?gn.Key.make(e):null},setDefaultServer:e=>{if(Fi)return Fi.setDefaultKey(e??null).then(()=>{});lxe(e)},systemPermissions:window.codeplaneDesktop?.systemPermissions,relaunchShell:window.codeplaneDesktop?.relaunchShell?async()=>(await window.codeplaneDesktop.relaunchShell()).ok:void 0};if(N9 instanceof HTMLElement){const e=Fi?pxe():[{type:"http",http:{url:G5()}}],t=Fi?mxe():gn.Key.make(j9());Kj(()=>b(Eae,{value:gxe,get children(){return b(Q6e,{get children(){return b(rxe,{get defaultServer(){return gn.Key.make(t??j9())},get servers(){return[...e]},disableHealthCheck:!Fi})}})}}),N9)}export{a3e as $,Hl as A,Qt as B,or as C,un as D,he as E,kf as F,rz as G,P5 as H,oi as I,en as J,Al as K,Wt as L,Mn as M,Me as N,Et as O,mt as P,mr as Q,Qi as R,gn as S,sa as T,dr as U,Je as V,r4e as W,ne as X,_pe as Y,m4e as Z,Sr as _,T_ as a,e_ as a$,wg as a0,wu as a1,wt as a2,D2e as a3,ui as a4,d3e as a5,h3e as a6,eh as a7,M9 as a8,In as a9,x1e as aA,L1e as aB,C2 as aC,is as aD,zn as aE,Ere as aF,b5 as aG,yu as aH,Dve as aI,D9 as aJ,Kxe as aK,Qae as aL,Gxe as aM,Jae as aN,Zxe as aO,Qxe as aP,Xxe as aQ,Yxe as aR,Jxe as aS,u3e as aT,I2 as aU,Kb as aV,Zo as aW,z1e as aX,jke as aY,zke as aZ,w3e as a_,P1e as aa,j as ab,Ep as ac,th as ad,Wc as ae,at as af,ue as ag,Wr as ah,e1 as ai,Xe as aj,fn as ak,tA as al,c3e as am,Dr as an,Bv as ao,x5e as ap,Qe as aq,bg as ar,yi as as,ii as at,Ko as au,Vl as av,PX as aw,ct as ax,Ar as ay,gf as az,To as b,sh as b$,J9 as b0,pX as b1,hF as b2,tS as b3,f3e as b4,pr as b5,On as b6,s4e as b7,js as b8,wwe as b9,Uxe as bA,B8 as bB,kpe as bC,k0 as bD,Yp as bE,nn as bF,Cd as bG,Ece as bH,l3e as bI,ca as bJ,s3e as bK,qxe as bL,gm as bM,T2 as bN,tve as bO,z0e as bP,YO as bQ,M5 as bR,pN as bS,fN as bT,mN as bU,SN as bV,yN as bW,yxe as bX,Yg as bY,Xg as bZ,XR as b_,c9 as ba,ze as bb,ZR as bc,Dg as bd,VR as be,R5 as bf,YR as bg,Lg as bh,Ct as bi,ut as bj,nz as bk,qe as bl,_r as bm,ez as bn,pt as bo,je as bp,yt as bq,Cr as br,tz as bs,an as bt,Nr as bu,LT as bv,mre as bw,bN as bx,Ro as by,dve as bz,gr as c,oh as c0,Li as c1,L5 as c2,D5 as c3,ym as c4,xo as c5,Pa as c6,Oa as c7,vm as c8,me as c9,T9 as cA,YX as cB,Rxe as cC,C3 as cD,y3e as cE,gN as cF,Kve as cG,am as cH,o3e as cI,g3e as cJ,v3e as cK,pu as cL,Hxe as cM,Go as cN,Wxe as cO,zl as cP,r2 as cQ,x0e as cR,lpe as cS,kxe as cT,jxe as cU,Txe as cV,ih as ca,El as cb,_f as cc,Fxe as cd,m3e as ce,d2e as cf,b3e as cg,l4e as ch,yy as ci,BJ as cj,Qw as ck,gb as cl,bxe as cm,Ao as cn,wxe as co,lF as cp,H2 as cq,VO as cr,Fwe as cs,Oxe as ct,zee as cu,S7 as cv,Nxe as cw,Pxe as cx,Kj as cy,zxe as cz,BE as d,Xi as e,Rt as f,w4 as g,et as h,Pd as i,U as j,oe as k,F as l,b as m,zp as n,pe as o,Fe as p,fe as q,twe as r,ewe as s,Gt as t,Eo as u,tu as v,ns as w,$t as x,ee as y,Ot as z};
|