termdock 1.4.380 → 1.4.382
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/dist/client/assets/AndroidMirrorView-BBIr49Mj.js +3 -0
- package/dist/client/assets/AndroidMirrorView-BBIr49Mj.js.br +0 -0
- package/dist/client/assets/AndroidMirrorView-BBIr49Mj.js.gz +0 -0
- package/dist/client/assets/App-DtFyFpq9.js +188 -0
- package/dist/client/assets/App-DtFyFpq9.js.br +0 -0
- package/dist/client/assets/App-DtFyFpq9.js.gz +0 -0
- package/dist/client/assets/ArchitecturePanel-Vb5_jtw_.js +9 -0
- package/dist/client/assets/ArchitecturePanel-Vb5_jtw_.js.br +0 -0
- package/dist/client/assets/ArchitecturePanel-Vb5_jtw_.js.gz +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-DnkwhYzv.js +2 -0
- package/dist/client/assets/ChangeWalkthroughPanel-DnkwhYzv.js.br +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-DnkwhYzv.js.gz +0 -0
- package/dist/client/assets/ChatChartReference-qhK-H6vp.js +284 -0
- package/dist/client/assets/ChatChartReference-qhK-H6vp.js.br +0 -0
- package/dist/client/assets/ChatChartReference-qhK-H6vp.js.gz +0 -0
- package/dist/client/assets/ChatContextPreview-BG0rJXV0.js +1 -0
- package/dist/client/assets/ChatContextPreview-BG0rJXV0.js.br +0 -0
- package/dist/client/assets/ChatContextPreview-BG0rJXV0.js.gz +0 -0
- package/dist/client/assets/ChatFullContent-DTPsE2yj.js +67 -0
- package/dist/client/assets/ChatFullContent-DTPsE2yj.js.br +0 -0
- package/dist/client/assets/ChatFullContent-DTPsE2yj.js.gz +0 -0
- package/dist/client/assets/ChatRichContent-B2KdODRb.js +2 -0
- package/dist/client/assets/ChatRichContent-B2KdODRb.js.br +0 -0
- package/dist/client/assets/ChatRichContent-B2KdODRb.js.gz +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-B2yJadIo.js +1 -0
- package/dist/client/assets/ChatVideoPreviewDialog-B2yJadIo.js.br +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-B2yJadIo.js.gz +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-BLh-E9aF.js +1 -0
- package/dist/client/assets/CollaborationMainWorkspace-BLh-E9aF.js.br +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-BLh-E9aF.js.gz +0 -0
- package/dist/client/assets/CollaborationTaskContent-CQh0hLm5.js +1 -0
- package/dist/client/assets/ComputerControlView-tQczCVGV.js +6 -0
- package/dist/client/assets/ComputerControlView-tQczCVGV.js.br +0 -0
- package/dist/client/assets/ComputerControlView-tQczCVGV.js.gz +0 -0
- package/dist/client/assets/DagPlayground-CdJBbXwP.js +1 -0
- package/dist/client/assets/DagPlayground-CdJBbXwP.js.br +0 -0
- package/dist/client/assets/DagPlayground-CdJBbXwP.js.gz +0 -0
- package/dist/client/assets/DiffLab-yG2XUfTH.js +455 -0
- package/dist/client/assets/DiffLab-yG2XUfTH.js.br +0 -0
- package/dist/client/assets/DiffLab-yG2XUfTH.js.gz +0 -0
- package/dist/client/assets/DiffReview-9CuVTA8N.js +1 -0
- package/dist/client/assets/DiffReview-9CuVTA8N.js.br +0 -0
- package/dist/client/assets/DiffReview-9CuVTA8N.js.gz +0 -0
- package/dist/client/assets/DiffReviewLab-DEcsYe4A.js +2 -0
- package/dist/client/assets/DiffReviewLab-DEcsYe4A.js.br +0 -0
- package/dist/client/assets/DiffReviewLab-DEcsYe4A.js.gz +0 -0
- package/dist/client/assets/DiffViewer-BJJZp4gv.js +34 -0
- package/dist/client/assets/DiffViewer-BJJZp4gv.js.br +0 -0
- package/dist/client/assets/DiffViewer-BJJZp4gv.js.gz +0 -0
- package/dist/client/assets/GitLoadingSkeleton-BNMEA5PP.js +1 -0
- package/dist/client/assets/GitLoadingSkeleton-BNMEA5PP.js.br +0 -0
- package/dist/client/assets/GitLoadingSkeleton-BNMEA5PP.js.gz +0 -0
- package/dist/client/assets/Markdown-DKIPWnd3.js +23 -0
- package/dist/client/assets/Markdown-DKIPWnd3.js.br +0 -0
- package/dist/client/assets/Markdown-DKIPWnd3.js.gz +0 -0
- package/dist/client/assets/MarkdownPreview-xxeYEH6M.js +1 -0
- package/dist/client/assets/MarkdownPreview-xxeYEH6M.js.br +0 -0
- package/dist/client/assets/MarkdownPreview-xxeYEH6M.js.gz +0 -0
- package/dist/client/assets/ModelPreview-sVpHIiWR.js +4112 -0
- package/dist/client/assets/ModelPreview-sVpHIiWR.js.br +0 -0
- package/dist/client/assets/ModelPreview-sVpHIiWR.js.gz +0 -0
- package/dist/client/assets/RecordingSaveDialog-jfwVX9vZ.js +1 -0
- package/dist/client/assets/RecordingSaveDialog-jfwVX9vZ.js.br +0 -0
- package/dist/client/assets/RecordingSaveDialog-jfwVX9vZ.js.gz +0 -0
- package/dist/client/assets/RightSidebar-DFLq1zhq.js +1729 -0
- package/dist/client/assets/RightSidebar-DFLq1zhq.js.br +0 -0
- package/dist/client/assets/RightSidebar-DFLq1zhq.js.gz +0 -0
- package/dist/client/assets/SessionChatView-Cx0hPmQ-.js +38 -0
- package/dist/client/assets/SessionChatView-Cx0hPmQ-.js.br +0 -0
- package/dist/client/assets/SessionChatView-Cx0hPmQ-.js.gz +0 -0
- package/dist/client/assets/SessionResourceSidebar-xG752lqP.js +2 -0
- package/dist/client/assets/SessionResourceSidebar-xG752lqP.js.br +0 -0
- package/dist/client/assets/SessionResourceSidebar-xG752lqP.js.gz +0 -0
- package/dist/client/assets/TodoWorkspace-c6ACxKDX.js +1 -0
- package/dist/client/assets/TodoWorkspace-c6ACxKDX.js.br +0 -0
- package/dist/client/assets/TodoWorkspace-c6ACxKDX.js.gz +0 -0
- package/dist/client/assets/VideoPreviewPlayer-B670TPD2.js +1 -0
- package/dist/client/assets/VideoPreviewPlayer-B670TPD2.js.br +0 -0
- package/dist/client/assets/VideoPreviewPlayer-B670TPD2.js.gz +0 -0
- package/dist/client/assets/a-arrow-down-BsArgj7A.js +1 -0
- package/dist/client/assets/a-arrow-up-BTiNeld8.js +1 -0
- package/dist/client/assets/a-large-small-BJYWEOUS.js +1 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-DWBD4QXm.js +1 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-DWBD4QXm.js.br +0 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-DWBD4QXm.js.gz +0 -0
- package/dist/client/assets/accessibility-Ch4zyds3.js +1 -0
- package/dist/client/assets/activity-DnvRlgia.js +1 -0
- package/dist/client/assets/air-vent-CfvvWze6.js +1 -0
- package/dist/client/assets/airplay-LUsvY0JX.js +1 -0
- package/dist/client/assets/alarm-clock-CYvJQ1u0.js +1 -0
- package/dist/client/assets/alarm-clock-check-swZ2gRuv.js +1 -0
- package/dist/client/assets/alarm-clock-minus-BwWhLlWk.js +1 -0
- package/dist/client/assets/alarm-clock-off-CJTSMpML.js +1 -0
- package/dist/client/assets/alarm-clock-plus-DBYv-syX.js +1 -0
- package/dist/client/assets/alarm-smoke-DkQLm9tV.js +1 -0
- package/dist/client/assets/album-C40cD-fv.js +1 -0
- package/dist/client/assets/align-center-horizontal-DigFVSE8.js +1 -0
- package/dist/client/assets/align-center-vertical-tnPD-jzl.js +1 -0
- package/dist/client/assets/align-end-horizontal-B-yNHY6d.js +1 -0
- package/dist/client/assets/align-end-vertical-D4clm0XF.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-center-BMqLYt5r.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-end-Ddu5pUs7.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-start-DH5mtLPX.js +1 -0
- package/dist/client/assets/align-horizontal-justify-center-nSBjAeau.js +1 -0
- package/dist/client/assets/align-horizontal-justify-end-BjgUUZFn.js +1 -0
- package/dist/client/assets/align-horizontal-justify-start-qXiqJo7N.js +1 -0
- package/dist/client/assets/align-horizontal-space-around-BDesTdWw.js +1 -0
- package/dist/client/assets/align-horizontal-space-between-CtYwr_MZ.js +1 -0
- package/dist/client/assets/align-start-horizontal-C9x2ODJP.js +1 -0
- package/dist/client/assets/align-start-vertical-CoFvoYF6.js +1 -0
- package/dist/client/assets/align-vertical-distribute-center-C7KXNYqw.js +1 -0
- package/dist/client/assets/align-vertical-distribute-end-CYL4cb3I.js +1 -0
- package/dist/client/assets/align-vertical-distribute-start-B24rml_p.js +1 -0
- package/dist/client/assets/align-vertical-justify-center-wc1M6z1m.js +1 -0
- package/dist/client/assets/align-vertical-justify-end-C02B8oZL.js +1 -0
- package/dist/client/assets/align-vertical-justify-start-DmA0chgV.js +1 -0
- package/dist/client/assets/align-vertical-space-around-CsX3hhDT.js +1 -0
- package/dist/client/assets/align-vertical-space-between-CsUlNFDL.js +1 -0
- package/dist/client/assets/ambulance-C95zuAg9.js +1 -0
- package/dist/client/assets/ampersand-D-7jVqDn.js +1 -0
- package/dist/client/assets/ampersands-BpcS74Mr.js +1 -0
- package/dist/client/assets/amphora-CBTqqmdu.js +1 -0
- package/dist/client/assets/anchor-De-M3xTI.js +1 -0
- package/dist/client/assets/angry-CdeXku_r.js +1 -0
- package/dist/client/assets/annoyed-CF9oh9qf.js +1 -0
- package/dist/client/assets/antenna-D6owg6Lh.js +1 -0
- package/dist/client/assets/anvil-BXuQneCj.js +1 -0
- package/dist/client/assets/aperture-FqEGT9JK.js +1 -0
- package/dist/client/assets/app-BpK5G2O0.js +37 -0
- package/dist/client/assets/app-BpK5G2O0.js.br +0 -0
- package/dist/client/assets/app-BpK5G2O0.js.gz +0 -0
- package/dist/client/assets/app-window-A6MqhLk1.js +1 -0
- package/dist/client/assets/app-window-mac-D0CP0wWm.js +1 -0
- package/dist/client/assets/apple-BcSVY2mX.js +1 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BcMUVKJR.js +36 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BcMUVKJR.js.br +0 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BcMUVKJR.js.gz +0 -0
- package/dist/client/assets/archive-C5yZf2-U.js +1 -0
- package/dist/client/assets/archive-restore-BuJOEXVz.js +1 -0
- package/dist/client/assets/archive-x-C_kpoFlG.js +1 -0
- package/dist/client/assets/armchair-Du9IhdMW.js +1 -0
- package/dist/client/assets/arrow-big-down-BpK_7w_J.js +1 -0
- package/dist/client/assets/arrow-big-down-dash-sOuMJ888.js +1 -0
- package/dist/client/assets/arrow-big-left-D7ITsRoU.js +1 -0
- package/dist/client/assets/arrow-big-left-dash-DEa5BczE.js +1 -0
- package/dist/client/assets/arrow-big-right-DFAOVL-z.js +1 -0
- package/dist/client/assets/arrow-big-right-dash-B7ADBCM8.js +1 -0
- package/dist/client/assets/arrow-big-up-CciQv1Dc.js +1 -0
- package/dist/client/assets/arrow-big-up-dash-ajn4Vr0O.js +1 -0
- package/dist/client/assets/arrow-down-0-1-CdVVrkZp.js +1 -0
- package/dist/client/assets/arrow-down-1-0-5O2oGBA0.js +1 -0
- package/dist/client/assets/arrow-down-D-z7lHXC.js +1 -0
- package/dist/client/assets/arrow-down-from-line-D7Sjj5TN.js +1 -0
- package/dist/client/assets/arrow-down-left-CuQKFj-c.js +1 -0
- package/dist/client/assets/arrow-down-narrow-wide-KsqLwMSI.js +1 -0
- package/dist/client/assets/arrow-down-right-CydU95Nt.js +1 -0
- package/dist/client/assets/arrow-down-to-dot-B8KybNe3.js +1 -0
- package/dist/client/assets/arrow-down-to-line-gIvtsQUL.js +1 -0
- package/dist/client/assets/arrow-down-up-BoXVAX1y.js +1 -0
- package/dist/client/assets/arrow-down-wide-narrow-02LDryUP.js +1 -0
- package/dist/client/assets/arrow-down-z-a-BFaFHpxv.js +1 -0
- package/dist/client/assets/arrow-left-from-line-Csx8V2LU.js +1 -0
- package/dist/client/assets/arrow-left-right-N1d6QeHB.js +1 -0
- package/dist/client/assets/arrow-left-to-line-BaRnjmRC.js +1 -0
- package/dist/client/assets/arrow-right-from-line-Cny_xGnF.js +1 -0
- package/dist/client/assets/arrow-right-left-BF5_t3pH.js +1 -0
- package/dist/client/assets/arrow-right-to-line-CLFY7axi.js +1 -0
- package/dist/client/assets/arrow-up-0-1-weRixLUR.js +1 -0
- package/dist/client/assets/arrow-up-1-0-CF-WgGFS.js +1 -0
- package/dist/client/assets/arrow-up-a-z-ahkS_83m.js +1 -0
- package/dist/client/assets/arrow-up-down-Qk-fzntj.js +1 -0
- package/dist/client/assets/arrow-up-from-dot-BwgJsBJY.js +1 -0
- package/dist/client/assets/arrow-up-from-line-CB6YAl8L.js +1 -0
- package/dist/client/assets/arrow-up-left-DMURreOH.js +1 -0
- package/dist/client/assets/arrow-up-narrow-wide-Bb9Mpa90.js +1 -0
- package/dist/client/assets/arrow-up-to-line-CwnIidBg.js +1 -0
- package/dist/client/assets/arrow-up-wide-narrow-BaA5ZEz1.js +1 -0
- package/dist/client/assets/arrow-up-z-a-C2QSbhwr.js +1 -0
- package/dist/client/assets/arrows-up-from-line-ARN5PGsK.js +1 -0
- package/dist/client/assets/asterisk-B7W4x1WA.js +1 -0
- package/dist/client/assets/astroid-BfuN-ZF6.js +1 -0
- package/dist/client/assets/atom-CGS3CCkz.js +1 -0
- package/dist/client/assets/audio-lines-DZz89NGm.js +1 -0
- package/dist/client/assets/audio-waveform-D4Lp-rLj.js +1 -0
- package/dist/client/assets/award-CyFCdDyA.js +1 -0
- package/dist/client/assets/axe-BXcpeWhD.js +1 -0
- package/dist/client/assets/axis-3d-DKAyy46q.js +1 -0
- package/dist/client/assets/baby-CtjddEtM.js +1 -0
- package/dist/client/assets/backpack-DaeFmW5c.js +1 -0
- package/dist/client/assets/badge-Bk1C70Wf.js +1 -0
- package/dist/client/assets/badge-alert-BQMpDahX.js +1 -0
- package/dist/client/assets/badge-cent-D8uKVaKI.js +1 -0
- package/dist/client/assets/badge-check-IEnw3Fp3.js +1 -0
- package/dist/client/assets/badge-dollar-sign-SLfi-yOL.js +1 -0
- package/dist/client/assets/badge-euro-D6oqQNQr.js +1 -0
- package/dist/client/assets/badge-indian-rupee-CjPOxutX.js +1 -0
- package/dist/client/assets/badge-info-BUpjs4Mt.js +1 -0
- package/dist/client/assets/badge-japanese-yen-Cq8TNluG.js +1 -0
- package/dist/client/assets/badge-minus-D7M2ll-k.js +1 -0
- package/dist/client/assets/badge-percent-DfN0MAzm.js +1 -0
- package/dist/client/assets/badge-plus-Cx2r3At7.js +1 -0
- package/dist/client/assets/badge-pound-sterling-Cj_t-R3K.js +1 -0
- package/dist/client/assets/badge-question-mark-C-cjgBRy.js +1 -0
- package/dist/client/assets/badge-russian-ruble-CDo0EyxN.js +1 -0
- package/dist/client/assets/badge-swiss-franc-DMJX8-Co.js +1 -0
- package/dist/client/assets/badge-turkish-lira-DdUXLcar.js +1 -0
- package/dist/client/assets/badge-x-DQkE-6YW.js +1 -0
- package/dist/client/assets/baggage-claim-Bq238GVQ.js +1 -0
- package/dist/client/assets/balloon-H8qIpPfQ.js +1 -0
- package/dist/client/assets/ban-DZBQXap4.js +1 -0
- package/dist/client/assets/banana-BNYsfrBy.js +1 -0
- package/dist/client/assets/bandage-Bb8reZCw.js +1 -0
- package/dist/client/assets/banknote-arrow-down-CGHl-5Dy.js +1 -0
- package/dist/client/assets/banknote-arrow-up-YzaSr2Jz.js +1 -0
- package/dist/client/assets/banknote-jR31dhvy.js +1 -0
- package/dist/client/assets/banknote-x-BWsi6zcK.js +1 -0
- package/dist/client/assets/barcode-CYNFVfbR.js +1 -0
- package/dist/client/assets/barrel-OFvAm1gK.js +1 -0
- package/dist/client/assets/baseline-IDMnv4qy.js +1 -0
- package/dist/client/assets/bath-DBlX3OC3.js +1 -0
- package/dist/client/assets/battery-BMKoefmZ.js +1 -0
- package/dist/client/assets/battery-charging-DR2oyC8g.js +1 -0
- package/dist/client/assets/battery-full-DuU93YcY.js +1 -0
- package/dist/client/assets/battery-low-BJmSO6iA.js +1 -0
- package/dist/client/assets/battery-medium-D2LucUuC.js +1 -0
- package/dist/client/assets/battery-plus-D51njQ0h.js +1 -0
- package/dist/client/assets/battery-warning-Bb8zGzbh.js +1 -0
- package/dist/client/assets/beaker-DUvL1sKZ.js +1 -0
- package/dist/client/assets/bean-DP09YExB.js +1 -0
- package/dist/client/assets/bean-off-DsAXEsIz.js +1 -0
- package/dist/client/assets/bed-Dcky1LUE.js +1 -0
- package/dist/client/assets/bed-double-BfgUCmEe.js +1 -0
- package/dist/client/assets/bed-single-C0AS6s1t.js +1 -0
- package/dist/client/assets/beef-BohMn_q7.js +1 -0
- package/dist/client/assets/beef-off-Ay7Ezepi.js +1 -0
- package/dist/client/assets/beer-ByPBs6MT.js +1 -0
- package/dist/client/assets/beer-off-nQVtrToU.js +1 -0
- package/dist/client/assets/bell-6UWfJQD-.js +1 -0
- package/dist/client/assets/bell-check-CSyx_KMX.js +1 -0
- package/dist/client/assets/bell-electric-woashRmB.js +1 -0
- package/dist/client/assets/bell-minus-BDqOj7MX.js +1 -0
- package/dist/client/assets/bell-off-CgpxvJTb.js +1 -0
- package/dist/client/assets/bell-plus-Cuf8zugx.js +1 -0
- package/dist/client/assets/bell-ring-BDiavEsM.js +1 -0
- package/dist/client/assets/between-horizontal-end-D6ofFCE9.js +1 -0
- package/dist/client/assets/between-horizontal-start-Ct3KTmmx.js +1 -0
- package/dist/client/assets/between-vertical-end-B9ZOCl6B.js +1 -0
- package/dist/client/assets/between-vertical-start-xdGhD2o8.js +1 -0
- package/dist/client/assets/biceps-flexed-CW-FhmP0.js +1 -0
- package/dist/client/assets/bike-DN4K1Tq6.js +1 -0
- package/dist/client/assets/binary-BvsO9Nt3.js +1 -0
- package/dist/client/assets/binoculars-xJWdYRZo.js +1 -0
- package/dist/client/assets/biohazard-BpH9X2ga.js +1 -0
- package/dist/client/assets/bird-SosZcm67.js +1 -0
- package/dist/client/assets/birdhouse-2DZY34nE.js +1 -0
- package/dist/client/assets/bitcoin-DgRHAq4c.js +1 -0
- package/dist/client/assets/blend-DzZJdiFw.js +1 -0
- package/dist/client/assets/blender-DXJ63pZd.js +1 -0
- package/dist/client/assets/blinds-BJYD8y-N.js +1 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-Bs3H1nNH.js +129 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-Bs3H1nNH.js.br +0 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-Bs3H1nNH.js.gz +0 -0
- package/dist/client/assets/blocks-B-zWfA2t.js +1 -0
- package/dist/client/assets/bluetooth-connected-Cuz1K4Vc.js +1 -0
- package/dist/client/assets/bluetooth-eZeb_M7f.js +1 -0
- package/dist/client/assets/bluetooth-off-DDKobjIy.js +1 -0
- package/dist/client/assets/bluetooth-searching-s3cLs_wk.js +1 -0
- package/dist/client/assets/bold-D5UpCpm_.js +1 -0
- package/dist/client/assets/bolt-DGRj02Ub.js +1 -0
- package/dist/client/assets/bomb-CWQ4UEIH.js +1 -0
- package/dist/client/assets/bone-CaZAf3L9.js +1 -0
- package/dist/client/assets/book-Codq7qY8.js +1 -0
- package/dist/client/assets/book-a-BLBVbqYf.js +1 -0
- package/dist/client/assets/book-alert-j6feYA2_.js +1 -0
- package/dist/client/assets/book-audio-BdMyWP5g.js +1 -0
- package/dist/client/assets/book-check-Ddn4uKpb.js +1 -0
- package/dist/client/assets/book-copy-Uc2Uwhfx.js +1 -0
- package/dist/client/assets/book-dashed-BNmH4-Hw.js +1 -0
- package/dist/client/assets/book-down-CeYw2ZQK.js +1 -0
- package/dist/client/assets/book-headphones-0wekRAdW.js +1 -0
- package/dist/client/assets/book-heart-lfyRbe4G.js +1 -0
- package/dist/client/assets/book-image-D6bQEitL.js +1 -0
- package/dist/client/assets/book-key-Bl_WNExx.js +1 -0
- package/dist/client/assets/book-lock-WGzLSkyK.js +1 -0
- package/dist/client/assets/book-marked-Bts6OLMC.js +1 -0
- package/dist/client/assets/book-minus-B3zaoS1N.js +1 -0
- package/dist/client/assets/book-open-1uvHkM_8.js +1 -0
- package/dist/client/assets/book-open-check-uxigJEIf.js +1 -0
- package/dist/client/assets/book-open-text-CDY2JBsC.js +1 -0
- package/dist/client/assets/book-plus-DDwteQ1o.js +1 -0
- package/dist/client/assets/book-search-Ctc8He7i.js +1 -0
- package/dist/client/assets/book-text-B4isaaxO.js +1 -0
- package/dist/client/assets/book-type-DqlDacZq.js +1 -0
- package/dist/client/assets/book-up-2-LtEO1GII.js +1 -0
- package/dist/client/assets/book-up-C-T99R3n.js +1 -0
- package/dist/client/assets/book-user-C7BWz797.js +1 -0
- package/dist/client/assets/book-x-BTaHE-xh.js +1 -0
- package/dist/client/assets/bookmark-Bjf9XcFZ.js +1 -0
- package/dist/client/assets/bookmark-check-CcLHopEp.js +1 -0
- package/dist/client/assets/bookmark-minus-BUxaMWQS.js +1 -0
- package/dist/client/assets/bookmark-off-DlzA69fV.js +1 -0
- package/dist/client/assets/bookmark-plus-DETblGt3.js +1 -0
- package/dist/client/assets/bookmark-x-BVrqAoZE.js +1 -0
- package/dist/client/assets/boom-box-sxjOzVhf.js +1 -0
- package/dist/client/assets/bot-message-square-KJQek3aG.js +1 -0
- package/dist/client/assets/bot-off-QlUO5DNU.js +1 -0
- package/dist/client/assets/bottle-wine-Dmgqq_YC.js +1 -0
- package/dist/client/assets/bow-arrow-Eq47rLF5.js +1 -0
- package/dist/client/assets/boxes-BbOLOqSK.js +1 -0
- package/dist/client/assets/braces-BvVIVkfU.js +1 -0
- package/dist/client/assets/brackets-Da9xHiDE.js +1 -0
- package/dist/client/assets/brain-GpZkvWMu.js +1 -0
- package/dist/client/assets/brain-circuit-Bet5aGMn.js +1 -0
- package/dist/client/assets/brain-cog-DwvQLYWq.js +1 -0
- package/dist/client/assets/brain-cog-DwvQLYWq.js.br +0 -0
- package/dist/client/assets/brain-cog-DwvQLYWq.js.gz +0 -0
- package/dist/client/assets/brick-wall-DudB494L.js +1 -0
- package/dist/client/assets/brick-wall-fire-acX_uquA.js +1 -0
- package/dist/client/assets/brick-wall-shield-rA_yVxMp.js +1 -0
- package/dist/client/assets/briefcase-business-DUInYljZ.js +1 -0
- package/dist/client/assets/briefcase-conveyor-belt-Y_zMIhB_.js +1 -0
- package/dist/client/assets/briefcase-medical-CGnfQQ7f.js +1 -0
- package/dist/client/assets/bring-to-front-FuVACvWY.js +1 -0
- package/dist/client/assets/broccoli-DrWwV0f4.js +1 -0
- package/dist/client/assets/brush-cleaning-CBn6hBL4.js +1 -0
- package/dist/client/assets/brush-hZKzSD9D.js +1 -0
- package/dist/client/assets/bubbles-BPVKrJrX.js +1 -0
- package/dist/client/assets/bug-off-gPBtMc_9.js +1 -0
- package/dist/client/assets/bug-play-CmRLGmGZ.js +1 -0
- package/dist/client/assets/bug-wMHllmAR.js +1 -0
- package/dist/client/assets/building-2-DkUm7Ypc.js +1 -0
- package/dist/client/assets/building-45OXbaMP.js +1 -0
- package/dist/client/assets/bus-EzEVzlDI.js +1 -0
- package/dist/client/assets/bus-front-C4hElLJH.js +1 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-DKQn-fFD.js +38 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-DKQn-fFD.js.br +0 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-DKQn-fFD.js.gz +0 -0
- package/dist/client/assets/cable-O5K494tn.js +1 -0
- package/dist/client/assets/cable-car-xAvxQt5l.js +1 -0
- package/dist/client/assets/cake-Da-Sx3L-.js +1 -0
- package/dist/client/assets/cake-slice-Ct5ChU3m.js +1 -0
- package/dist/client/assets/calculator-1OCppXOW.js +1 -0
- package/dist/client/assets/calendar-1-D-deDbGz.js +1 -0
- package/dist/client/assets/calendar-COvsKo7O.js +1 -0
- package/dist/client/assets/calendar-arrow-down-NJA2qlaL.js +1 -0
- package/dist/client/assets/calendar-arrow-up-5jPm3Uig.js +1 -0
- package/dist/client/assets/calendar-check-2-CIttl-ZD.js +1 -0
- package/dist/client/assets/calendar-check-C9K2RpkO.js +1 -0
- package/dist/client/assets/calendar-clock-C82nqlq8.js +1 -0
- package/dist/client/assets/calendar-cog-CR7iSDby.js +1 -0
- package/dist/client/assets/calendar-days-T4r0Utgj.js +1 -0
- package/dist/client/assets/calendar-fold-CDckOjac.js +1 -0
- package/dist/client/assets/calendar-heart-BcK8Sk3R.js +1 -0
- package/dist/client/assets/calendar-minus-2-BPf6Y8rx.js +1 -0
- package/dist/client/assets/calendar-minus-BzeDm9fu.js +1 -0
- package/dist/client/assets/calendar-off-CWISAQYz.js +1 -0
- package/dist/client/assets/calendar-plus-2-BGPudeWC.js +1 -0
- package/dist/client/assets/calendar-plus-B9utmrvv.js +1 -0
- package/dist/client/assets/calendar-range-B3Q8-w12.js +1 -0
- package/dist/client/assets/calendar-search-CJj98P2F.js +1 -0
- package/dist/client/assets/calendar-sync-DMutJ3Je.js +1 -0
- package/dist/client/assets/calendar-x-2-qh7CPuPh.js +1 -0
- package/dist/client/assets/calendar-x-CvKI9YUd.js +1 -0
- package/dist/client/assets/calendars-C_NYkvEY.js +1 -0
- package/dist/client/assets/camera-B6uFfIIv.js +1 -0
- package/dist/client/assets/camera-off-BIrUg7YJ.js +1 -0
- package/dist/client/assets/candy-BH7Uvgnf.js +1 -0
- package/dist/client/assets/candy-cane-ByMCsN8c.js +1 -0
- package/dist/client/assets/candy-off-B2qyUo4x.js +1 -0
- package/dist/client/assets/cannabis-DLn3O-ur.js +1 -0
- package/dist/client/assets/cannabis-off-DdTJaYbj.js +1 -0
- package/dist/client/assets/captions-LaydTl4h.js +1 -0
- package/dist/client/assets/captions-off-zvaLEVtC.js +1 -0
- package/dist/client/assets/car-D0KPfazE.js +1 -0
- package/dist/client/assets/car-front-DUtQgs70.js +1 -0
- package/dist/client/assets/car-taxi-front-BCumSQsi.js +1 -0
- package/dist/client/assets/caravan-BnyiT6hA.js +1 -0
- package/dist/client/assets/card-sim-CLG8zEIs.js +1 -0
- package/dist/client/assets/carrot-Ow73J4tX.js +1 -0
- package/dist/client/assets/case-lower-CkJ_eY5l.js +1 -0
- package/dist/client/assets/case-sensitive-C5PW0rqC.js +1 -0
- package/dist/client/assets/case-upper-D2gWH2jQ.js +1 -0
- package/dist/client/assets/cassette-tape-DBtWd1L7.js +1 -0
- package/dist/client/assets/cast-COqKyT9n.js +1 -0
- package/dist/client/assets/castle-BlJV0O_Q.js +1 -0
- package/dist/client/assets/cat-Bkcqd_6T.js +1 -0
- package/dist/client/assets/cctv-COjap_Tx.js +1 -0
- package/dist/client/assets/cctv-off-CEQtsLae.js +1 -0
- package/dist/client/assets/channel-BNsSazuw.js +1 -0
- package/dist/client/assets/chart-area-CDtasFpS.js +1 -0
- package/dist/client/assets/chart-bar-CL1uT4eT.js +1 -0
- package/dist/client/assets/chart-bar-big-7OqiBqyM.js +1 -0
- package/dist/client/assets/chart-bar-decreasing-BaSCw3Uy.js +1 -0
- package/dist/client/assets/chart-bar-increasing-C7CzHn_Z.js +1 -0
- package/dist/client/assets/chart-bar-stacked-Rvs0c4s0.js +1 -0
- package/dist/client/assets/chart-candlestick-BY472wRS.js +1 -0
- package/dist/client/assets/chart-column-IioE7MVc.js +1 -0
- package/dist/client/assets/chart-column-big-BGwR3gqZ.js +1 -0
- package/dist/client/assets/chart-column-decreasing-6ZdQQmiW.js +1 -0
- package/dist/client/assets/chart-column-increasing-DepEpz8E.js +1 -0
- package/dist/client/assets/chart-column-stacked-B4s38YAj.js +1 -0
- package/dist/client/assets/chart-gantt-CT6BMJg7.js +1 -0
- package/dist/client/assets/chart-line-Ci3DuwAU.js +1 -0
- package/dist/client/assets/chart-network-rGNpSual.js +1 -0
- package/dist/client/assets/chart-no-axes-column-D8HXnKPG.js +1 -0
- package/dist/client/assets/chart-no-axes-column-decreasing-BOohRyUR.js +1 -0
- package/dist/client/assets/chart-no-axes-column-increasing-DLtmJQzC.js +1 -0
- package/dist/client/assets/chart-no-axes-combined-Ck_C1ca8.js +1 -0
- package/dist/client/assets/chart-no-axes-gantt-DvcqhAl1.js +1 -0
- package/dist/client/assets/chart-pie-CftKEvGL.js +1 -0
- package/dist/client/assets/chart-scatter-DTtcK9au.js +1 -0
- package/dist/client/assets/chart-spline-WaOb2j9M.js +1 -0
- package/dist/client/assets/check-check-BK43wpO_.js +1 -0
- package/dist/client/assets/check-line-DtEMIpmJ.js +1 -0
- package/dist/client/assets/chef-hat-DdYHpnrV.js +1 -0
- package/dist/client/assets/cherry-cyTvAk8V.js +1 -0
- package/dist/client/assets/chess-bishop-0QeAC8PK.js +1 -0
- package/dist/client/assets/chess-king-CtpO22XF.js +1 -0
- package/dist/client/assets/chess-knight-1Jv07Fiu.js +1 -0
- package/dist/client/assets/chess-pawn-Dn6qUuON.js +1 -0
- package/dist/client/assets/chess-queen-BnOkcx1c.js +1 -0
- package/dist/client/assets/chess-rook-LFE87Bpl.js +1 -0
- package/dist/client/assets/chevron-first-I0lxyegz.js +1 -0
- package/dist/client/assets/chevron-last-iv4-ChJ2.js +1 -0
- package/dist/client/assets/chevron-left-OkPzhoXp.js +1 -0
- package/dist/client/assets/chevrons-down-BWTGf2mq.js +1 -0
- package/dist/client/assets/chevrons-down-up-Dnd9LH_J.js +1 -0
- package/dist/client/assets/chevrons-left-D-_ftSLW.js +1 -0
- package/dist/client/assets/chevrons-left-right-CU50o-J6.js +1 -0
- package/dist/client/assets/chevrons-left-right-ellipsis-C3CW6ggR.js +1 -0
- package/dist/client/assets/chevrons-right-L2LewajD.js +1 -0
- package/dist/client/assets/chevrons-right-left-xVdW8TPv.js +1 -0
- package/dist/client/assets/chevrons-up-BhPBzIw6.js +1 -0
- package/dist/client/assets/chevrons-up-down-gkBvrMw3.js +1 -0
- package/dist/client/assets/chunk-2Q5K7J3B-DDYbq9qs.js +1 -0
- package/dist/client/assets/chunk-5VM5RSS4-BHqLcj7A.js +15 -0
- package/dist/client/assets/chunk-F27PBJKO-B87fZFxF.js +1 -0
- package/dist/client/assets/chunk-F27PBJKO-B87fZFxF.js.br +0 -0
- package/dist/client/assets/chunk-F27PBJKO-B87fZFxF.js.gz +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-B_RB3gzT.js +231 -0
- package/dist/client/assets/chunk-IMKFNOWR-B_RB3gzT.js.br +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-B_RB3gzT.js.gz +0 -0
- package/dist/client/assets/chunk-JWPE2WC7-CoKEkLE8.js +1 -0
- package/dist/client/assets/chunk-POPQ4Y6H-YKwxmVyp.js +1 -0
- package/dist/client/assets/chunk-SVP7TREG-DOpXLYSo.js +88 -0
- package/dist/client/assets/chunk-SVP7TREG-DOpXLYSo.js.br +0 -0
- package/dist/client/assets/chunk-SVP7TREG-DOpXLYSo.js.gz +0 -0
- package/dist/client/assets/chunk-TICWLB2K-BxieRUPr.js +206 -0
- package/dist/client/assets/chunk-TICWLB2K-BxieRUPr.js.br +0 -0
- package/dist/client/assets/chunk-TICWLB2K-BxieRUPr.js.gz +0 -0
- package/dist/client/assets/chunk-XXDRQBXY-ClEFOLzm.js +1 -0
- package/dist/client/assets/church-DHJX0jMa.js +1 -0
- package/dist/client/assets/cigarette-bP2L5zG4.js +1 -0
- package/dist/client/assets/cigarette-off-C5GJ3-m8.js +1 -0
- package/dist/client/assets/circle-DlWa1vec.js +1 -0
- package/dist/client/assets/circle-arrow-down-CQkbyNGb.js +1 -0
- package/dist/client/assets/circle-arrow-left-DXfG9jpA.js +1 -0
- package/dist/client/assets/circle-arrow-out-down-left-3ApMiOfC.js +1 -0
- package/dist/client/assets/circle-arrow-out-down-right-B7KNAECd.js +1 -0
- package/dist/client/assets/circle-arrow-out-up-left-BX1ihqu7.js +1 -0
- package/dist/client/assets/circle-arrow-out-up-right-ByyzObQx.js +1 -0
- package/dist/client/assets/circle-arrow-right-Baj9jzHy.js +1 -0
- package/dist/client/assets/circle-arrow-up-BlbPxMzc.js +1 -0
- package/dist/client/assets/circle-check-big-B6D3OHwV.js +1 -0
- package/dist/client/assets/circle-chevron-down-B5Y6xXr7.js +1 -0
- package/dist/client/assets/circle-chevron-left-BWnUp4M2.js +1 -0
- package/dist/client/assets/circle-chevron-right-B9uThCWh.js +1 -0
- package/dist/client/assets/circle-chevron-up-D0fJjPxy.js +1 -0
- package/dist/client/assets/circle-dashed-DHvtlcf-.js +1 -0
- package/dist/client/assets/circle-divide-Czf-LwUE.js +1 -0
- package/dist/client/assets/circle-dollar-sign-Bi9G7jY6.js +1 -0
- package/dist/client/assets/circle-dot-CKIQzhPM.js +1 -0
- package/dist/client/assets/circle-dot-dashed-By32q1z3.js +1 -0
- package/dist/client/assets/circle-ellipsis-Cueh78hK.js +1 -0
- package/dist/client/assets/circle-equal-BtpIok8k.js +1 -0
- package/dist/client/assets/circle-fading-arrow-up-BT86DSFW.js +1 -0
- package/dist/client/assets/circle-fading-plus-Btdn1kFH.js +1 -0
- package/dist/client/assets/circle-gauge-CXHvH9uI.js +1 -0
- package/dist/client/assets/circle-minus-BWtjEgbM.js +1 -0
- package/dist/client/assets/circle-off-D7X9KdNH.js +1 -0
- package/dist/client/assets/circle-parking-BP2_eUey.js +1 -0
- package/dist/client/assets/circle-parking-off-Du1TFp8r.js +1 -0
- package/dist/client/assets/circle-pause-C36xcuW1.js +1 -0
- package/dist/client/assets/circle-percent-A_iy0DDa.js +1 -0
- package/dist/client/assets/circle-pile-OKjwxOSI.js +1 -0
- package/dist/client/assets/circle-play-wCUgR-1N.js +1 -0
- package/dist/client/assets/circle-plus-CGG-Alc5.js +1 -0
- package/dist/client/assets/circle-pound-sterling-BVwWh_QX.js +1 -0
- package/dist/client/assets/circle-power-CjbrU7PH.js +1 -0
- package/dist/client/assets/circle-question-mark-dfJRNmG5.js +1 -0
- package/dist/client/assets/circle-slash-2-pU9-Otim.js +1 -0
- package/dist/client/assets/circle-slash-a5b2Mh6B.js +1 -0
- package/dist/client/assets/circle-small-D9-CuFaN.js +1 -0
- package/dist/client/assets/circle-star-CrgAz8AI.js +1 -0
- package/dist/client/assets/circle-stop-D4xOYZ87.js +1 -0
- package/dist/client/assets/circle-user-CR8OX6rM.js +1 -0
- package/dist/client/assets/circle-user-round-C1E2qc-4.js +1 -0
- package/dist/client/assets/circle-x-BvZFUYX1.js +1 -0
- package/dist/client/assets/circuit-board-_GXaz4KN.js +1 -0
- package/dist/client/assets/citrus-wl3j8yu7.js +1 -0
- package/dist/client/assets/clapperboard-WHv-qzLq.js +1 -0
- package/dist/client/assets/classDiagram-ZZMXUADV-NW-XE5Uq.js +1 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-NW-XE5Uq.js +1 -0
- package/dist/client/assets/clipboard-ByVAmeTE.js +1 -0
- package/dist/client/assets/clipboard-check-BjzLpu03.js +1 -0
- package/dist/client/assets/clipboard-clock-toGhf9df.js +1 -0
- package/dist/client/assets/clipboard-copy-B7fDJJtg.js +1 -0
- package/dist/client/assets/clipboard-list-DnALcXqh.js +1 -0
- package/dist/client/assets/clipboard-minus-D8DVugeI.js +1 -0
- package/dist/client/assets/clipboard-paste-WKCCOanD.js +1 -0
- package/dist/client/assets/clipboard-pen-BxJZdnmw.js +1 -0
- package/dist/client/assets/clipboard-pen-line-Dd1j2P8p.js +1 -0
- package/dist/client/assets/clipboard-plus-B_5ZCtzY.js +1 -0
- package/dist/client/assets/clipboard-type-Ca02YDc4.js +1 -0
- package/dist/client/assets/clipboard-x-64Na2oM3.js +1 -0
- package/dist/client/assets/clock-1-czl6AoXm.js +1 -0
- package/dist/client/assets/clock-10-BkTGtBYW.js +1 -0
- package/dist/client/assets/clock-11-BPySsbY3.js +1 -0
- package/dist/client/assets/clock-12-xxFnLgt_.js +1 -0
- package/dist/client/assets/clock-2-CerxyRNP.js +1 -0
- package/dist/client/assets/clock-4-9vtfFuOR.js +1 -0
- package/dist/client/assets/clock-5-BOsszR_E.js +1 -0
- package/dist/client/assets/clock-6-C-xR2y3l.js +1 -0
- package/dist/client/assets/clock-7-DxY-VtW1.js +1 -0
- package/dist/client/assets/clock-8-BS1UwCua.js +1 -0
- package/dist/client/assets/clock-9-BW28EQ2t.js +1 -0
- package/dist/client/assets/clock-DSrmnbe5.js +1 -0
- package/dist/client/assets/clock-alert-B6giLA_c.js +1 -0
- package/dist/client/assets/clock-arrow-down-BedSIvPa.js +1 -0
- package/dist/client/assets/clock-arrow-up-DmjbLSqP.js +1 -0
- package/dist/client/assets/clock-check-CpAdeHgf.js +1 -0
- package/dist/client/assets/clock-fading-DVpYu2ei.js +1 -0
- package/dist/client/assets/clock-plus-H5RH7bee.js +1 -0
- package/dist/client/assets/closed-caption-DOQ86FuE.js +1 -0
- package/dist/client/assets/cloud-DxFVHneC.js +1 -0
- package/dist/client/assets/cloud-alert-CSqhfcr9.js +1 -0
- package/dist/client/assets/cloud-backup-dLk34x5v.js +1 -0
- package/dist/client/assets/cloud-check-DaY1SI7s.js +1 -0
- package/dist/client/assets/cloud-cog-DBtqDYFj.js +1 -0
- package/dist/client/assets/cloud-download-C4GMcx8P.js +1 -0
- package/dist/client/assets/cloud-drizzle-NI_o3zjW.js +1 -0
- package/dist/client/assets/cloud-fog-ERL9G0_X.js +1 -0
- package/dist/client/assets/cloud-hail-CKqBsOIl.js +1 -0
- package/dist/client/assets/cloud-lightning-BNDDyEiE.js +1 -0
- package/dist/client/assets/cloud-moon-rX2rPgQE.js +1 -0
- package/dist/client/assets/cloud-moon-rain-Dbbj_j44.js +1 -0
- package/dist/client/assets/cloud-off-Cq5H_dOI.js +1 -0
- package/dist/client/assets/cloud-rain-BIXZao6V.js +1 -0
- package/dist/client/assets/cloud-rain-wind-CYan2us6.js +1 -0
- package/dist/client/assets/cloud-snow-Dp0I-xce.js +1 -0
- package/dist/client/assets/cloud-sun-BN9Bn-Y_.js +1 -0
- package/dist/client/assets/cloud-sun-rain-oj_rRGKB.js +1 -0
- package/dist/client/assets/cloud-sync-D2BYV03s.js +1 -0
- package/dist/client/assets/cloud-upload-CBAMLgzA.js +1 -0
- package/dist/client/assets/cloudy-Dc8-YINl.js +1 -0
- package/dist/client/assets/clover-H-xCiD6i.js +1 -0
- package/dist/client/assets/club-D99_dIa2.js +1 -0
- package/dist/client/assets/code-i5k-y5zc.js +1 -0
- package/dist/client/assets/coffee-fpRlD4CL.js +1 -0
- package/dist/client/assets/cog-CAMIBFxH.js +1 -0
- package/dist/client/assets/coins-NM-v_Ao2.js +1 -0
- package/dist/client/assets/columns-3-CmQnHNgw.js +1 -0
- package/dist/client/assets/columns-3-cog-CT4gLiEa.js +1 -0
- package/dist/client/assets/columns-4-CT8uGTD7.js +1 -0
- package/dist/client/assets/combine-B-nwhNqm.js +1 -0
- package/dist/client/assets/command-DaEshDZy.js +1 -0
- package/dist/client/assets/compass-bRqTxkz5.js +1 -0
- package/dist/client/assets/component-D93l3Lv0.js +1 -0
- package/dist/client/assets/computer-BtFttL5B.js +1 -0
- package/dist/client/assets/concierge-bell-kxUzQiqr.js +1 -0
- package/dist/client/assets/cone-DuCrhk8R.js +1 -0
- package/dist/client/assets/construction-BrYzV83d.js +1 -0
- package/dist/client/assets/contact-D5BkuKvD.js +1 -0
- package/dist/client/assets/contact-round-LpEHO6Pl.js +1 -0
- package/dist/client/assets/container-DDXfUDLd.js +1 -0
- package/dist/client/assets/contrast-4JNNYFrY.js +1 -0
- package/dist/client/assets/cookie-Dz0sXAtM.js +1 -0
- package/dist/client/assets/cooking-pot-DrFB5fLR.js +1 -0
- package/dist/client/assets/copy-check-1NfSsUPy.js +1 -0
- package/dist/client/assets/copy-minus-Cvi5v79k.js +1 -0
- package/dist/client/assets/copy-plus-3dX0fcNl.js +1 -0
- package/dist/client/assets/copy-slash-DzpMfJJh.js +1 -0
- package/dist/client/assets/copy-x-BwmZdOtH.js +1 -0
- package/dist/client/assets/copyleft-B3R57mFJ.js +1 -0
- package/dist/client/assets/copyright-EkitsPqf.js +1 -0
- package/dist/client/assets/corner-down-left-z0vdZ3KB.js +1 -0
- package/dist/client/assets/corner-left-down-B62YeGYJ.js +1 -0
- package/dist/client/assets/corner-left-up-pWLhMz-F.js +1 -0
- package/dist/client/assets/corner-right-down-DVIv1L66.js +1 -0
- package/dist/client/assets/corner-right-up-CRJLuUr7.js +1 -0
- package/dist/client/assets/corner-up-right-CAzBMErA.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-a0VOAcz5.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-a0VOAcz5.js.br +0 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-a0VOAcz5.js.gz +0 -0
- package/dist/client/assets/cpu-zxhmg_4M.js +1 -0
- package/dist/client/assets/creative-commons-Bt5PiSKg.js +1 -0
- package/dist/client/assets/credit-card-DTAZ9jru.js +1 -0
- package/dist/client/assets/croissant-DizPCH84.js +1 -0
- package/dist/client/assets/crop-Dg2qDIme.js +1 -0
- package/dist/client/assets/cross-CJ8ejZX-.js +1 -0
- package/dist/client/assets/crosshair-CUcUMgkV.js +1 -0
- package/dist/client/assets/crown-dcKiAZpI.js +1 -0
- package/dist/client/assets/cuboid-CKIPzTjv.js +1 -0
- package/dist/client/assets/cup-soda--uUO2i1j.js +1 -0
- package/dist/client/assets/currency-CqAgoGr7.js +1 -0
- package/dist/client/assets/cylinder-Zo1FPU41.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-Bd574WHx.js +166 -0
- package/dist/client/assets/cynefin-OW5HDTMX-Bd574WHx.js.br +0 -0
- package/dist/client/assets/cynefin-OW5HDTMX-Bd574WHx.js.gz +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-BiKN9z4u.js +62 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-BiKN9z4u.js.br +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-BiKN9z4u.js.gz +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-D6pCTphJ.js +4 -0
- package/dist/client/assets/dagre-GXQ25YYZ-D6pCTphJ.js.br +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-D6pCTphJ.js.gz +0 -0
- package/dist/client/assets/dam-LoXVEmJ_.js +1 -0
- package/dist/client/assets/database-BHgMpF8E.js +1 -0
- package/dist/client/assets/database-backup-DhAW43FW.js +1 -0
- package/dist/client/assets/database-search-DJf26wsC.js +1 -0
- package/dist/client/assets/database-zap-DycE8o0T.js +1 -0
- package/dist/client/assets/decimals-arrow-left-BmhzDsR7.js +1 -0
- package/dist/client/assets/decimals-arrow-right-Ol1XcwUa.js +1 -0
- package/dist/client/assets/delete-GqUD2zcg.js +1 -0
- package/dist/client/assets/dessert-CnPMRbci.js +1 -0
- package/dist/client/assets/diagram-S7CK7UJ4-CzAXhn9F.js +30 -0
- package/dist/client/assets/diagram-S7CK7UJ4-CzAXhn9F.js.br +0 -0
- package/dist/client/assets/diagram-S7CK7UJ4-CzAXhn9F.js.gz +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DpL2ES7f.js +41 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DpL2ES7f.js.br +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DpL2ES7f.js.gz +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-CPoaEvK-.js +3 -0
- package/dist/client/assets/diagram-VSXAHHWV-CPoaEvK-.js.br +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-CPoaEvK-.js.gz +0 -0
- package/dist/client/assets/diagram-VX7I27RA-vaN9Fbz6.js +24 -0
- package/dist/client/assets/diagram-VX7I27RA-vaN9Fbz6.js.br +0 -0
- package/dist/client/assets/diagram-VX7I27RA-vaN9Fbz6.js.gz +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-BLU6G4RD.js +24 -0
- package/dist/client/assets/diagram-Z3DM3KII-BLU6G4RD.js.br +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-BLU6G4RD.js.gz +0 -0
- package/dist/client/assets/diameter-LWt1cML5.js +1 -0
- package/dist/client/assets/diamond-YxHYYeLc.js +1 -0
- package/dist/client/assets/diamond-minus-DcpO7p88.js +1 -0
- package/dist/client/assets/diamond-percent-DxU36rVh.js +1 -0
- package/dist/client/assets/diamond-plus-DvG6FSX-.js +1 -0
- package/dist/client/assets/dice-1-B9COMz7-.js +1 -0
- package/dist/client/assets/dice-2-DRjnspJB.js +1 -0
- package/dist/client/assets/dice-3-DAhvElGD.js +1 -0
- package/dist/client/assets/dice-4-C--l8AsS.js +1 -0
- package/dist/client/assets/dice-5-CwpwiwNS.js +1 -0
- package/dist/client/assets/dice-6-CfcXOtAc.js +1 -0
- package/dist/client/assets/dices-tFn8rxFj.js +1 -0
- package/dist/client/assets/diff-CqteT-qo.js +1 -0
- package/dist/client/assets/disc-2-DFv8wxH-.js +1 -0
- package/dist/client/assets/disc-3-DZ-Sg2ZF.js +1 -0
- package/dist/client/assets/disc-B9jVRhRF.js +1 -0
- package/dist/client/assets/disc-album-CTikubkm.js +1 -0
- package/dist/client/assets/divide-Bt1LC-Uz.js +1 -0
- package/dist/client/assets/dna-BlnDsvTU.js +1 -0
- package/dist/client/assets/dna-off-BPnmSP0j.js +1 -0
- package/dist/client/assets/dock-DHCFEnce.js +1 -0
- package/dist/client/assets/dog-D5rP68KI.js +1 -0
- package/dist/client/assets/dollar-sign-CtDOW5hP.js +1 -0
- package/dist/client/assets/donut-BSGzrlPi.js +1 -0
- package/dist/client/assets/door-closed-CYEItnXQ.js +1 -0
- package/dist/client/assets/door-closed-locked-BchaCAMs.js +1 -0
- package/dist/client/assets/door-open-DsuX0H9g.js +1 -0
- package/dist/client/assets/dot-DYAMPllu.js +1 -0
- package/dist/client/assets/drafting-compass-DopAudDs.js +1 -0
- package/dist/client/assets/drama-CS29nPE8.js +1 -0
- package/dist/client/assets/drill-BcXjlEoh.js +1 -0
- package/dist/client/assets/drone-wyzKhR_Z.js +1 -0
- package/dist/client/assets/droplet-DUBk5jJN.js +1 -0
- package/dist/client/assets/droplet-off-D3NsZePf.js +1 -0
- package/dist/client/assets/droplets-B7PtRUdq.js +1 -0
- package/dist/client/assets/drum-BSZgpjUa.js +1 -0
- package/dist/client/assets/drumstick-DiSloPDq.js +1 -0
- package/dist/client/assets/dumbbell-CM7HuMEg.js +1 -0
- package/dist/client/assets/ear-D10FlNJy.js +1 -0
- package/dist/client/assets/ear-off-2GmVKknW.js +1 -0
- package/dist/client/assets/earth-lock-DsCS-Nlu.js +1 -0
- package/dist/client/assets/earth-zaYfdmj_.js +1 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-B-rznPJw.js +1 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-B-rznPJw.js.br +0 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-B-rznPJw.js.gz +0 -0
- package/dist/client/assets/eclipse-Hnu3KNwQ.js +1 -0
- package/dist/client/assets/egg-B0_FgH4P.js +1 -0
- package/dist/client/assets/egg-fried-Bqkn6i2S.js +1 -0
- package/dist/client/assets/egg-off-DQrQzoMx.js +1 -0
- package/dist/client/assets/ellipse-CF5-kV73.js +1 -0
- package/dist/client/assets/ellipsis-vertical-DKS4Xm0k.js +1 -0
- package/dist/client/assets/equal-BWiABl4R.js +1 -0
- package/dist/client/assets/equal-approximately-C8PGU_uP.js +1 -0
- package/dist/client/assets/equal-not-Dhrd5m3t.js +1 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-Cy7nVqCo.js +99 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-Cy7nVqCo.js.br +0 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-Cy7nVqCo.js.gz +0 -0
- package/dist/client/assets/ethernet-port-D-Q_Un2x.js +1 -0
- package/dist/client/assets/euro-B0qFh66W.js +1 -0
- package/dist/client/assets/ev-charger-sdWIiaxG.js +1 -0
- package/dist/client/assets/expand-JvnnJl4L.js +1 -0
- package/dist/client/assets/external-link-BgP6hs-_.js +1 -0
- package/dist/client/assets/eye-CdzRCMgZ.js +1 -0
- package/dist/client/assets/eye-closed-BGHE_LcG.js +1 -0
- package/dist/client/assets/eye-off-DgczGrEu.js +1 -0
- package/dist/client/assets/factory-CqXmZewV.js +1 -0
- package/dist/client/assets/fan-uJ_t_Rpl.js +1 -0
- package/dist/client/assets/fast-forward-BG2I2LtQ.js +1 -0
- package/dist/client/assets/feather-BZAZXF94.js +1 -0
- package/dist/client/assets/fence-Uvhtjq8o.js +1 -0
- package/dist/client/assets/ferris-wheel-DvtXYVNU.js +1 -0
- package/dist/client/assets/file-archive-vgij7j77.js +1 -0
- package/dist/client/assets/file-axis-3d-CqdueQ6h.js +1 -0
- package/dist/client/assets/file-badge-BMxl_edB.js +1 -0
- package/dist/client/assets/file-box-DHaDXzFn.js +1 -0
- package/dist/client/assets/file-braces-Cg4WTvsU.js +1 -0
- package/dist/client/assets/file-braces-corner-BzXfm4ce.js +1 -0
- package/dist/client/assets/file-chart-column-hJC9L5em.js +1 -0
- package/dist/client/assets/file-chart-column-increasing-RutFrK5R.js +1 -0
- package/dist/client/assets/file-chart-line-BX1SBs7P.js +1 -0
- package/dist/client/assets/file-chart-pie-CI_zjS6Q.js +1 -0
- package/dist/client/assets/file-check-BHtJXkk6.js +1 -0
- package/dist/client/assets/file-check-corner-BG1ssNF9.js +1 -0
- package/dist/client/assets/file-clock-D2VbKpFr.js +1 -0
- package/dist/client/assets/file-code-corner-B9908GN2.js +1 -0
- package/dist/client/assets/file-cog-B6ZJnyQj.js +1 -0
- package/dist/client/assets/file-diff-BqvhA2hD.js +1 -0
- package/dist/client/assets/file-digit-CN1ebW7o.js +1 -0
- package/dist/client/assets/file-down-Ckz6tB1y.js +1 -0
- package/dist/client/assets/file-exclamation-point-CGVTCjFw.js +1 -0
- package/dist/client/assets/file-headphone-04gwNoAk.js +1 -0
- package/dist/client/assets/file-heart-Bx8uGf3B.js +1 -0
- package/dist/client/assets/file-image-0JXRbx6m.js +1 -0
- package/dist/client/assets/file-input-CgtOXjQE.js +1 -0
- package/dist/client/assets/file-key-C9fB0RVl.js +1 -0
- package/dist/client/assets/file-lock-Cy0I5xOg.js +1 -0
- package/dist/client/assets/file-minus-corner-Dq7VuNGZ.js +1 -0
- package/dist/client/assets/file-minus-uJ7cjt4T.js +1 -0
- package/dist/client/assets/file-music-D1IK_MIh.js +1 -0
- package/dist/client/assets/file-output-CmifTC01.js +1 -0
- package/dist/client/assets/file-pen-lhb7Un5v.js +1 -0
- package/dist/client/assets/file-pen-line-B1K2FRsX.js +1 -0
- package/dist/client/assets/file-play-DdA1fEg3.js +1 -0
- package/dist/client/assets/file-plus-LUOOSL7q.js +1 -0
- package/dist/client/assets/file-plus-corner-L1ynyd3-.js +1 -0
- package/dist/client/assets/file-question-mark-CbQaPxH6.js +1 -0
- package/dist/client/assets/file-scan-DXWpzqQD.js +1 -0
- package/dist/client/assets/file-search-corner-CDeicRQD.js +1 -0
- package/dist/client/assets/file-search-oRXC5gNH.js +1 -0
- package/dist/client/assets/file-signal-yxIxsd4M.js +1 -0
- package/dist/client/assets/file-sliders-CoBOnvia.js +1 -0
- package/dist/client/assets/file-spreadsheet-_kQrenxI.js +1 -0
- package/dist/client/assets/file-stack-B24OOauq.js +1 -0
- package/dist/client/assets/file-symlink-BPz2nu5y.js +1 -0
- package/dist/client/assets/file-terminal-Ch8iK6Mr.js +1 -0
- package/dist/client/assets/file-type-CfcslDuF.js +1 -0
- package/dist/client/assets/file-type-corner-VXSJ9kbh.js +1 -0
- package/dist/client/assets/file-up-D_uowLlt.js +1 -0
- package/dist/client/assets/file-user-Bj0IirVZ.js +1 -0
- package/dist/client/assets/file-video-camera-yVajBKHF.js +1 -0
- package/dist/client/assets/file-volume-BM0eEnYd.js +1 -0
- package/dist/client/assets/file-x-BxHM3LMS.js +1 -0
- package/dist/client/assets/file-x-corner-CYROPqWV.js +1 -0
- package/dist/client/assets/files-C86VUF0R.js +1 -0
- package/dist/client/assets/film-CfNUDErR.js +1 -0
- package/dist/client/assets/fingerprint-pattern-BXdE93cC.js +1 -0
- package/dist/client/assets/fire-extinguisher-N2aPeHdg.js +1 -0
- package/dist/client/assets/fish-B6QRhzlV.js +1 -0
- package/dist/client/assets/fish-off-BAk_op3G.js +1 -0
- package/dist/client/assets/fish-symbol-Bo0DR7rO.js +1 -0
- package/dist/client/assets/fishing-hook-CjKzkb3s.js +1 -0
- package/dist/client/assets/fishing-rod-B1z_9Wq6.js +1 -0
- package/dist/client/assets/flag-BcnPvwHW.js +1 -0
- package/dist/client/assets/flag-off-WlU6mq3f.js +1 -0
- package/dist/client/assets/flag-triangle-left-BsNHb4mY.js +1 -0
- package/dist/client/assets/flag-triangle-right-D5wxlJ3D.js +1 -0
- package/dist/client/assets/flame-CfZ_a7x9.js +1 -0
- package/dist/client/assets/flame-kindling-eW3WbLUb.js +1 -0
- package/dist/client/assets/flashlight-BobBCZqr.js +1 -0
- package/dist/client/assets/flashlight-off-D3sOpufq.js +1 -0
- package/dist/client/assets/flask-conical-CVcYYoE_.js +1 -0
- package/dist/client/assets/flask-conical-off-DFjF3yei.js +1 -0
- package/dist/client/assets/flask-round-bvxw_HXh.js +1 -0
- package/dist/client/assets/flip-horizontal-2-5KIQ0kW5.js +1 -0
- package/dist/client/assets/flip-vertical-2-BU-r0Aaf.js +1 -0
- package/dist/client/assets/flowDiagram-HODETNUW-ByzvIaiM.js +168 -0
- package/dist/client/assets/flowDiagram-HODETNUW-ByzvIaiM.js.br +0 -0
- package/dist/client/assets/flowDiagram-HODETNUW-ByzvIaiM.js.gz +0 -0
- package/dist/client/assets/flower-2-DHpW6OKp.js +1 -0
- package/dist/client/assets/flower-CA_EIQNk.js +1 -0
- package/dist/client/assets/focus-DVjWIXrm.js +1 -0
- package/dist/client/assets/fold-horizontal-9v1vgpyk.js +1 -0
- package/dist/client/assets/fold-vertical-44MJun35.js +1 -0
- package/dist/client/assets/folder-archive-sh3z1jIA.js +1 -0
- package/dist/client/assets/folder-bookmark-CtkMd6DK.js +1 -0
- package/dist/client/assets/folder-check-DEbxyKm_.js +1 -0
- package/dist/client/assets/folder-clock-B-Z64uBt.js +1 -0
- package/dist/client/assets/folder-closed-DvSjhr2-.js +1 -0
- package/dist/client/assets/folder-code-Dx10yAMA.js +1 -0
- package/dist/client/assets/folder-cog-DBmWPrG3.js +1 -0
- package/dist/client/assets/folder-dot-3SPoCAoc.js +1 -0
- package/dist/client/assets/folder-down-IPUzhw3h.js +1 -0
- package/dist/client/assets/folder-git-2-C-REHLKp.js +1 -0
- package/dist/client/assets/folder-git-BzaEnJRo.js +1 -0
- package/dist/client/assets/folder-heart-DpqKZ0Xe.js +1 -0
- package/dist/client/assets/folder-input-g338LKxv.js +1 -0
- package/dist/client/assets/folder-kanban-C36FIqDC.js +1 -0
- package/dist/client/assets/folder-key-Dw6Qsj9P.js +1 -0
- package/dist/client/assets/folder-lock-CN10U6S9.js +1 -0
- package/dist/client/assets/folder-minus-D0rZPxwf.js +1 -0
- package/dist/client/assets/folder-open-dot-CugXK3kS.js +1 -0
- package/dist/client/assets/folder-output--k3gdFLn.js +1 -0
- package/dist/client/assets/folder-pen-Dm_gT1YN.js +1 -0
- package/dist/client/assets/folder-plus-Bk08DQZf.js +1 -0
- package/dist/client/assets/folder-root-B4Vq8eo9.js +1 -0
- package/dist/client/assets/folder-search-2-Bl9NB0YR.js +1 -0
- package/dist/client/assets/folder-symlink-D0XoEt6P.js +1 -0
- package/dist/client/assets/folder-sync-DGxST9h7.js +1 -0
- package/dist/client/assets/folder-tree-Dhb0qKAH.js +1 -0
- package/dist/client/assets/folder-up-BBMPVBwr.js +1 -0
- package/dist/client/assets/folder-x-Btf5WZBm.js +1 -0
- package/dist/client/assets/folders-DJU47kB5.js +1 -0
- package/dist/client/assets/footprints-4OMuM9rP.js +1 -0
- package/dist/client/assets/forklift-JujA6WWv.js +1 -0
- package/dist/client/assets/form-DYyiLplP.js +1 -0
- package/dist/client/assets/forward-CF4TVPl7.js +1 -0
- package/dist/client/assets/frame-CRqk0iHz.js +1 -0
- package/dist/client/assets/frown-BimdkN-k.js +1 -0
- package/dist/client/assets/fuel-F0kQDQGj.js +1 -0
- package/dist/client/assets/fullscreen-z1RanF51.js +1 -0
- package/dist/client/assets/funnel-D9zB13P5.js +1 -0
- package/dist/client/assets/funnel-plus-DLAc-cda.js +1 -0
- package/dist/client/assets/funnel-x-65JMY907.js +1 -0
- package/dist/client/assets/gallery-horizontal-Dr2X4ewP.js +1 -0
- package/dist/client/assets/gallery-horizontal-end-BD1iaNrL.js +1 -0
- package/dist/client/assets/gallery-thumbnails-B30BfnAY.js +1 -0
- package/dist/client/assets/gallery-vertical-Bobub-0c.js +1 -0
- package/dist/client/assets/gallery-vertical-end-DDoJLqxC.js +1 -0
- package/dist/client/assets/gamepad-2-BWeEtEqs.js +1 -0
- package/dist/client/assets/gamepad-DMBDP-s8.js +1 -0
- package/dist/client/assets/gamepad-directional-BFkboYKV.js +1 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C3BP-fbx.js +292 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C3BP-fbx.js.br +0 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C3BP-fbx.js.gz +0 -0
- package/dist/client/assets/gauge-CySeWPjU.js +1 -0
- package/dist/client/assets/gavel-5LXsPh1Z.js +1 -0
- package/dist/client/assets/gem-94UY4Pop.js +1 -0
- package/dist/client/assets/georgian-lari-DLbnXHHn.js +1 -0
- package/dist/client/assets/ghost-5C4fTYkd.js +1 -0
- package/dist/client/assets/gift-M2S1BYtk.js +1 -0
- package/dist/client/assets/git-branch-BTVy-0_n.js +1 -0
- package/dist/client/assets/git-branch-minus-BDvnnvGr.js +1 -0
- package/dist/client/assets/git-branch-plus-BA-ZOakY.js +1 -0
- package/dist/client/assets/git-commit-horizontal-fR1b39PB.js +1 -0
- package/dist/client/assets/git-commit-vertical-BAu2opsc.js +1 -0
- package/dist/client/assets/git-compare-B3yPJE_y.js +1 -0
- package/dist/client/assets/git-compare-arrows-C2LIqoXG.js +1 -0
- package/dist/client/assets/git-fork-DfT_jClc.js +1 -0
- package/dist/client/assets/git-graph-BFBEDiAX.js +1 -0
- package/dist/client/assets/git-merge-DGn-ab2k.js +1 -0
- package/dist/client/assets/git-merge-conflict-B8cJLnyD.js +1 -0
- package/dist/client/assets/git-pull-request-DsC-x9DR.js +1 -0
- package/dist/client/assets/git-pull-request-arrow-CwWaVE7z.js +1 -0
- package/dist/client/assets/git-pull-request-closed-B8voOffh.js +1 -0
- package/dist/client/assets/git-pull-request-create-C-8mce6l.js +1 -0
- package/dist/client/assets/git-pull-request-create-arrow-CoHgbNry.js +1 -0
- package/dist/client/assets/git-pull-request-draft-DRNDjt84.js +1 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-1xOFp4aA.js +106 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-1xOFp4aA.js.br +0 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-1xOFp4aA.js.gz +0 -0
- package/dist/client/assets/glass-water-VcVPLfTN.js +1 -0
- package/dist/client/assets/glasses-DqE2LNfb.js +1 -0
- package/dist/client/assets/globe-check-D4f-7ccX.js +1 -0
- package/dist/client/assets/globe-lock-7TwzWWTz.js +1 -0
- package/dist/client/assets/globe-off-l-1w2w-D.js +1 -0
- package/dist/client/assets/globe-x-Dtz3n6-p.js +1 -0
- package/dist/client/assets/goal-B6JzZqzh.js +1 -0
- package/dist/client/assets/gpu-CTbpQo9W.js +1 -0
- package/dist/client/assets/graduation-cap-B2l9aDUu.js +1 -0
- package/dist/client/assets/grape-CPwDnMea.js +1 -0
- package/dist/client/assets/grid-2x2-CyjqR97Z.js +1 -0
- package/dist/client/assets/grid-2x2-check-CNKC9s1D.js +1 -0
- package/dist/client/assets/grid-2x2-plus-BocWv07_.js +1 -0
- package/dist/client/assets/grid-2x2-x-O0YShV06.js +1 -0
- package/dist/client/assets/grid-3x2-EKfKZTsV.js +1 -0
- package/dist/client/assets/grid-3x3-CDyLc-aq.js +1 -0
- package/dist/client/assets/grip-BuUbdjeo.js +1 -0
- package/dist/client/assets/grip-horizontal-CMk19EaK.js +1 -0
- package/dist/client/assets/grip-vertical-BnLaSue5.js +1 -0
- package/dist/client/assets/group-Farf_YSb.js +1 -0
- package/dist/client/assets/guitar-Ce8OuTjf.js +1 -0
- package/dist/client/assets/ham-CCY97OHL.js +1 -0
- package/dist/client/assets/hamburger-BubWUSY-.js +1 -0
- package/dist/client/assets/hammer-C5QinTBf.js +1 -0
- package/dist/client/assets/hand-DubbISZh.js +1 -0
- package/dist/client/assets/hand-coins-B2tNPyJU.js +1 -0
- package/dist/client/assets/hand-fist-BkVOK-Zu.js +1 -0
- package/dist/client/assets/hand-grab-BoiwN28z.js +1 -0
- package/dist/client/assets/hand-heart-D7w_1Bmo.js +1 -0
- package/dist/client/assets/hand-helping-DZITCG_B.js +1 -0
- package/dist/client/assets/hand-metal-Dxvzszph.js +1 -0
- package/dist/client/assets/hand-platter-DTckElo4.js +1 -0
- package/dist/client/assets/handbag-BenV_9L0.js +1 -0
- package/dist/client/assets/handshake-DZ9vs3az.js +1 -0
- package/dist/client/assets/hard-drive-C0UkX4tN.js +1 -0
- package/dist/client/assets/hard-drive-download-CyiqTAHQ.js +1 -0
- package/dist/client/assets/hard-drive-upload-Bq4UJ2HA.js +1 -0
- package/dist/client/assets/hard-hat-CLOIYDEV.js +1 -0
- package/dist/client/assets/hash-BeonM7CM.js +1 -0
- package/dist/client/assets/hat-glasses-CjLwCgWk.js +1 -0
- package/dist/client/assets/haze-C8xb-aUu.js +1 -0
- package/dist/client/assets/hd-DQIicu2W.js +1 -0
- package/dist/client/assets/hdmi-port-oUOO4btF.js +1 -0
- package/dist/client/assets/heading-1-BUoN964j.js +1 -0
- package/dist/client/assets/heading-2-BpbZdr1g.js +1 -0
- package/dist/client/assets/heading-3-OuDcokTc.js +1 -0
- package/dist/client/assets/heading-4-CEcJdc6f.js +1 -0
- package/dist/client/assets/heading-5-B1_v1Xks.js +1 -0
- package/dist/client/assets/heading-6-C0iJ1sBR.js +1 -0
- package/dist/client/assets/heading-I9ymvjwX.js +1 -0
- package/dist/client/assets/headphone-off-BxcbP1JH.js +1 -0
- package/dist/client/assets/headphones-52Da_uqG.js +1 -0
- package/dist/client/assets/headset-rvWhXC6o.js +1 -0
- package/dist/client/assets/heart-D7AOhVVJ.js +1 -0
- package/dist/client/assets/heart-crack-CULrWb2d.js +1 -0
- package/dist/client/assets/heart-handshake-3_JeiMtf.js +1 -0
- package/dist/client/assets/heart-minus-9Kv5qmY2.js +1 -0
- package/dist/client/assets/heart-off-DFKJ_ALk.js +1 -0
- package/dist/client/assets/heart-plus-QvRVUe_0.js +1 -0
- package/dist/client/assets/heart-pulse-BmHI7PW0.js +1 -0
- package/dist/client/assets/heart-x-BcgjLRay.js +1 -0
- package/dist/client/assets/heater-DGjoy-vQ.js +1 -0
- package/dist/client/assets/helicopter-BoqCMfl2.js +1 -0
- package/dist/client/assets/hexagon-CJ8UpWtD.js +1 -0
- package/dist/client/assets/highlighter-XekkewEL.js +1 -0
- package/dist/client/assets/history-VQNwQYw5.js +1 -0
- package/dist/client/assets/hop-C7wqlEbm.js +1 -0
- package/dist/client/assets/hop-C7wqlEbm.js.br +0 -0
- package/dist/client/assets/hop-C7wqlEbm.js.gz +0 -0
- package/dist/client/assets/hop-off-ClL82Qm1.js +1 -0
- package/dist/client/assets/hop-off-ClL82Qm1.js.br +0 -0
- package/dist/client/assets/hop-off-ClL82Qm1.js.gz +0 -0
- package/dist/client/assets/hospital-DI9bwzs1.js +1 -0
- package/dist/client/assets/hotel-CZZSvpyz.js +1 -0
- package/dist/client/assets/hourglass-eq2u9vpH.js +1 -0
- package/dist/client/assets/house-EQZbvQkq.js +1 -0
- package/dist/client/assets/house-heart-BRgRJ28p.js +1 -0
- package/dist/client/assets/house-plug-BW7nKocJ.js +1 -0
- package/dist/client/assets/house-plus-BT5SPS00.js +1 -0
- package/dist/client/assets/house-wifi-3kxYZwf8.js +1 -0
- package/dist/client/assets/ice-cream-bowl-B74C2NF1.js +1 -0
- package/dist/client/assets/ice-cream-cone-CQOR0dzA.js +1 -0
- package/dist/client/assets/id-card-cazlwAr3.js +1 -0
- package/dist/client/assets/id-card-lanyard-BGwXhjQP.js +1 -0
- package/dist/client/assets/image-down-CrzHfCfQ.js +1 -0
- package/dist/client/assets/image-minus-BGtCLYNg.js +1 -0
- package/dist/client/assets/image-off-D1lM_FeF.js +1 -0
- package/dist/client/assets/image-play-BrVDHI5w.js +1 -0
- package/dist/client/assets/image-plus-u7W4twcp.js +1 -0
- package/dist/client/assets/image-up-lGFj7IsA.js +1 -0
- package/dist/client/assets/image-upscale-CQhNgk9C.js +1 -0
- package/dist/client/assets/images-BJ4AnRov.js +1 -0
- package/dist/client/assets/import-3-u9vUF0.js +1 -0
- package/dist/client/assets/inbox-DIug-XUS.js +1 -0
- package/dist/client/assets/index-BZnAvlyV.js +259 -0
- package/dist/client/assets/index-BZnAvlyV.js.br +0 -0
- package/dist/client/assets/index-BZnAvlyV.js.gz +0 -0
- package/dist/client/assets/index-CoINj2FB.css +1 -0
- package/dist/client/assets/index-CoINj2FB.css.br +0 -0
- package/dist/client/assets/index-CoINj2FB.css.gz +0 -0
- package/dist/client/assets/indian-rupee-D57h7LyO.js +1 -0
- package/dist/client/assets/infinity-qThd2c2B.js +1 -0
- package/dist/client/assets/info-cXQ4FbEo.js +1 -0
- package/dist/client/assets/infoDiagram-27XIBGKW-CfseHAcf.js +2 -0
- package/dist/client/assets/inspection-panel-CH5WL8ZD.js +1 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-BSXFRB20.js +70 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-BSXFRB20.js.br +0 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-BSXFRB20.js.gz +0 -0
- package/dist/client/assets/italic-BznzXSXy.js +1 -0
- package/dist/client/assets/iteration-ccw-XT8I6g-E.js +1 -0
- package/dist/client/assets/iteration-cw-CFRAS1Fd.js +1 -0
- package/dist/client/assets/japanese-yen-Clw2LX3Y.js +1 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-C-Yff-QB.js +139 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-C-Yff-QB.js.br +0 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-C-Yff-QB.js.gz +0 -0
- package/dist/client/assets/joystick-DeWNg5ZB.js +1 -0
- package/dist/client/assets/kanban-DKsgDqlh.js +1 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-DLMHMDzo.js +89 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-DLMHMDzo.js.br +0 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-DLMHMDzo.js.gz +0 -0
- package/dist/client/assets/kayak-C7oV199k.js +1 -0
- package/dist/client/assets/key-ZNN2soK1.js +1 -0
- package/dist/client/assets/key-round-Dk5CvibH.js +1 -0
- package/dist/client/assets/key-square-FxEXND_u.js +1 -0
- package/dist/client/assets/keyboard-7eTLXx2o.js +1 -0
- package/dist/client/assets/keyboard-music-Dqsk5f58.js +1 -0
- package/dist/client/assets/keyboard-off-Di8MvZZn.js +1 -0
- package/dist/client/assets/lamp-BjsMwirQ.js +1 -0
- package/dist/client/assets/lamp-ceiling-BE-NF4oP.js +1 -0
- package/dist/client/assets/lamp-desk-BvWqoz3F.js +1 -0
- package/dist/client/assets/lamp-floor-DYdvOGu_.js +1 -0
- package/dist/client/assets/lamp-wall-down-CYMJUdDb.js +1 -0
- package/dist/client/assets/lamp-wall-up-gDduk55S.js +1 -0
- package/dist/client/assets/land-plot-Cd98i_JA.js +1 -0
- package/dist/client/assets/landmark-Bcat55h-.js +1 -0
- package/dist/client/assets/languages-ITj54mwM.js +1 -0
- package/dist/client/assets/laptop-C04rZwnR.js +1 -0
- package/dist/client/assets/laptop-minimal-Mbvh3wj5.js +1 -0
- package/dist/client/assets/laptop-minimal-check-CS0tiA9s.js +1 -0
- package/dist/client/assets/lasso-DGooVN2_.js +1 -0
- package/dist/client/assets/lasso-select-DMc_zn3Y.js +1 -0
- package/dist/client/assets/laugh-Blx12wLf.js +1 -0
- package/dist/client/assets/layers-2-DnHmjXkM.js +1 -0
- package/dist/client/assets/layers-C8Jz_Sx4.js +1 -0
- package/dist/client/assets/layers-minus-MiaSTPuO.js +1 -0
- package/dist/client/assets/layers-plus-DotlBVuI.js +1 -0
- package/dist/client/assets/layout-dashboard-D4zZNWd-.js +1 -0
- package/dist/client/assets/layout-grid-YImtd0Px.js +1 -0
- package/dist/client/assets/layout-list-zhcsLqF5.js +1 -0
- package/dist/client/assets/layout-panel-left-DKvyCWV0.js +1 -0
- package/dist/client/assets/layout-panel-top-XdZXY52Q.js +1 -0
- package/dist/client/assets/layout-template-Ct25kLn7.js +1 -0
- package/dist/client/assets/layout-y5qImoNf.js +1 -0
- package/dist/client/assets/layout-y5qImoNf.js.br +0 -0
- package/dist/client/assets/layout-y5qImoNf.js.gz +0 -0
- package/dist/client/assets/leaf-fefLVdnv.js +1 -0
- package/dist/client/assets/leafy-green-CTlL8_dX.js +1 -0
- package/dist/client/assets/lectern-CsFA7-pi.js +1 -0
- package/dist/client/assets/lens-concave-CHoJDazX.js +1 -0
- package/dist/client/assets/lens-convex-BnIL-sP7.js +1 -0
- package/dist/client/assets/library-B9VSXbVf.js +1 -0
- package/dist/client/assets/library-big-DoQwiaR8.js +1 -0
- package/dist/client/assets/life-buoy-B9P_qODc.js +1 -0
- package/dist/client/assets/ligature-DCNaQ1jg.js +1 -0
- package/dist/client/assets/lightbulb-off-CpYt8kiR.js +1 -0
- package/dist/client/assets/line-dot-right-horizontal-Ca4h6AQq.js +1 -0
- package/dist/client/assets/line-squiggle-BR6uTkd9.js +1 -0
- package/dist/client/assets/line-style-DhQl-P9o.js +1 -0
- package/dist/client/assets/link-CjzOgSPN.js +1 -0
- package/dist/client/assets/list-CQPKICpo.js +1 -0
- package/dist/client/assets/list-check-D4qdxoWd.js +1 -0
- package/dist/client/assets/list-checks-EzRhT-O6.js +1 -0
- package/dist/client/assets/list-chevrons-down-up-DF9ZobKG.js +1 -0
- package/dist/client/assets/list-chevrons-up-down-DU6s3J2c.js +1 -0
- package/dist/client/assets/list-collapse-B7R6ftWa.js +1 -0
- package/dist/client/assets/list-end-DIEKSThW.js +1 -0
- package/dist/client/assets/list-filter-d6UT9aJt.js +1 -0
- package/dist/client/assets/list-filter-plus-CwbVVPgg.js +1 -0
- package/dist/client/assets/list-indent-decrease-D1BV2MwW.js +1 -0
- package/dist/client/assets/list-indent-increase-0dwU1HYl.js +1 -0
- package/dist/client/assets/list-minus-BZIiVCjx.js +1 -0
- package/dist/client/assets/list-music-CnM56Oa8.js +1 -0
- package/dist/client/assets/list-ordered-DWIZo-fQ.js +1 -0
- package/dist/client/assets/list-plus-vC1g2RF-.js +1 -0
- package/dist/client/assets/list-restart-D4aS-kjM.js +1 -0
- package/dist/client/assets/list-start-DwbPrgLl.js +1 -0
- package/dist/client/assets/list-tree-CEftKL7n.js +1 -0
- package/dist/client/assets/list-video-pMinNhLl.js +1 -0
- package/dist/client/assets/list-x-DFHaZiDb.js +1 -0
- package/dist/client/assets/loader-Dd_ji4Ma.js +1 -0
- package/dist/client/assets/loader-pinwheel-Brd14ARA.js +1 -0
- package/dist/client/assets/locate-DjJ5_7pr.js +1 -0
- package/dist/client/assets/locate-fixed-BLrye6n8.js +1 -0
- package/dist/client/assets/locate-off-By6KgbK7.js +1 -0
- package/dist/client/assets/lock-DpK0OQWV.js +1 -0
- package/dist/client/assets/lock-keyhole-open-Oi5zyOdr.js +1 -0
- package/dist/client/assets/lock-open-Bf983Wf5.js +1 -0
- package/dist/client/assets/log-in-DY-DmKa9.js +1 -0
- package/dist/client/assets/log-out-BStxQHk-.js +1 -0
- package/dist/client/assets/logs-nF0BzonO.js +1 -0
- package/dist/client/assets/lollipop-DJnhkJHr.js +1 -0
- package/dist/client/assets/luggage-BBh2-lF1.js +1 -0
- package/dist/client/assets/magnet-Cqd2eE1O.js +1 -0
- package/dist/client/assets/mail-check-CKTnQnol.js +1 -0
- package/dist/client/assets/mail-minus-TGEAfkR-.js +1 -0
- package/dist/client/assets/mail-open-D6ufy8H4.js +1 -0
- package/dist/client/assets/mail-plus-DdhNZF6y.js +1 -0
- package/dist/client/assets/mail-question-mark-CA_sziwC.js +1 -0
- package/dist/client/assets/mail-search-CmXy08rx.js +1 -0
- package/dist/client/assets/mail-u-pfhVeq.js +1 -0
- package/dist/client/assets/mail-warning-q44Q4XM0.js +1 -0
- package/dist/client/assets/mail-x-DHzFnI1d.js +1 -0
- package/dist/client/assets/mailbox-3QK5Tjdh.js +1 -0
- package/dist/client/assets/mails-B4b5RKew.js +1 -0
- package/dist/client/assets/map-e9rA67sP.js +1 -0
- package/dist/client/assets/map-minus-C3URRFsG.js +1 -0
- package/dist/client/assets/map-pin-B6ji5w_X.js +1 -0
- package/dist/client/assets/map-pin-check-BUBlnm8i.js +1 -0
- package/dist/client/assets/map-pin-check-inside-htRygzM0.js +1 -0
- package/dist/client/assets/map-pin-house-DY1x3qKh.js +1 -0
- package/dist/client/assets/map-pin-minus-9eOKeMRc.js +1 -0
- package/dist/client/assets/map-pin-minus-inside-c8_0K0ck.js +1 -0
- package/dist/client/assets/map-pin-off-Cx33drhI.js +1 -0
- package/dist/client/assets/map-pin-pen-DijClMSB.js +1 -0
- package/dist/client/assets/map-pin-plus-Cv1zKB8K.js +1 -0
- package/dist/client/assets/map-pin-plus-inside-fLdMweZN.js +1 -0
- package/dist/client/assets/map-pin-search-Cpmz1IS0.js +1 -0
- package/dist/client/assets/map-pin-x-Csmly1B1.js +1 -0
- package/dist/client/assets/map-pin-x-inside-Br_LfUom.js +1 -0
- package/dist/client/assets/map-pinned-8zo9X0ne.js +1 -0
- package/dist/client/assets/map-plus-BivZKvhb.js +1 -0
- package/dist/client/assets/mars-Cq4c1LSK.js +1 -0
- package/dist/client/assets/mars-stroke-Cm9Rl56C.js +1 -0
- package/dist/client/assets/martini-Cy-_O0yb.js +1 -0
- package/dist/client/assets/maximize-2-Dv1NmN2e.js +1 -0
- package/dist/client/assets/maximize-2dsoznrL.js +1 -0
- package/dist/client/assets/medal-DEAanC83.js +1 -0
- package/dist/client/assets/megaphone-CzSYC7AC.js +1 -0
- package/dist/client/assets/megaphone-off-D0I7UD2A.js +1 -0
- package/dist/client/assets/meh-DrlkmaPJ.js +1 -0
- package/dist/client/assets/memory-stick-Do0zLJT8.js +1 -0
- package/dist/client/assets/menu-W9ikgkvW.js +1 -0
- package/dist/client/assets/merge-BuEw52-1.js +1 -0
- package/dist/client/assets/mermaid.core-jSzdw4ti.js +308 -0
- package/dist/client/assets/mermaid.core-jSzdw4ti.js.br +0 -0
- package/dist/client/assets/mermaid.core-jSzdw4ti.js.gz +0 -0
- package/dist/client/assets/message-circle-check-DOQVG6bt.js +1 -0
- package/dist/client/assets/message-circle-code-BJYzZlZk.js +1 -0
- package/dist/client/assets/message-circle-dashed-D5JgJIcX.js +1 -0
- package/dist/client/assets/message-circle-heart-CZcVUX_h.js +1 -0
- package/dist/client/assets/message-circle-more-DF_T-B1p.js +1 -0
- package/dist/client/assets/message-circle-off-BIi1bIrO.js +1 -0
- package/dist/client/assets/message-circle-plus-DXhCZsdM.js +1 -0
- package/dist/client/assets/message-circle-question-mark-EcqdHky7.js +1 -0
- package/dist/client/assets/message-circle-reply-yxtQOdz8.js +1 -0
- package/dist/client/assets/message-circle-warning-Cf84YT0e.js +1 -0
- package/dist/client/assets/message-circle-x-C6LSwzKw.js +1 -0
- package/dist/client/assets/message-square-B0mz5kI9.js +1 -0
- package/dist/client/assets/message-square-check-DB9zDxgE.js +1 -0
- package/dist/client/assets/message-square-code-BOS7eB2f.js +1 -0
- package/dist/client/assets/message-square-dashed-BczEBQK8.js +1 -0
- package/dist/client/assets/message-square-diff-D37HOf_P.js +1 -0
- package/dist/client/assets/message-square-dot-CRUOhVm1.js +1 -0
- package/dist/client/assets/message-square-heart-D0Yt21rz.js +1 -0
- package/dist/client/assets/message-square-lock-DhcLmDUE.js +1 -0
- package/dist/client/assets/message-square-more-CYXuJEmh.js +1 -0
- package/dist/client/assets/message-square-off-tI9E9X_v.js +1 -0
- package/dist/client/assets/message-square-plus-jYhKjM1u.js +1 -0
- package/dist/client/assets/message-square-quote-DHNzKHaX.js +1 -0
- package/dist/client/assets/message-square-reply-DfSfwGC6.js +1 -0
- package/dist/client/assets/message-square-share-CHa1-Fcp.js +1 -0
- package/dist/client/assets/message-square-text-CRHelE4J.js +1 -0
- package/dist/client/assets/message-square-warning-8GydueyJ.js +1 -0
- package/dist/client/assets/message-square-x-BfAMk0yP.js +1 -0
- package/dist/client/assets/messages-square-DHW7nSYK.js +1 -0
- package/dist/client/assets/metronome-CSNcobNd.js +1 -0
- package/dist/client/assets/mic-BirXlB1x.js +1 -0
- package/dist/client/assets/mic-off-C8ux3-WQ.js +1 -0
- package/dist/client/assets/mic-vocal-BMUffort.js +1 -0
- package/dist/client/assets/microchip-DX4yaN4W.js +1 -0
- package/dist/client/assets/microscope-CXo_GfXt.js +1 -0
- package/dist/client/assets/microwave-BR4KGl9h.js +1 -0
- package/dist/client/assets/milestone-x57TlDGd.js +1 -0
- package/dist/client/assets/milk-off-kHJROZWD.js +1 -0
- package/dist/client/assets/milk-w-Fb3tqc.js +1 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-BFeyTO-1.js +96 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-BFeyTO-1.js.br +0 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-BFeyTO-1.js.gz +0 -0
- package/dist/client/assets/minimize-2-23nv6e_h.js +1 -0
- package/dist/client/assets/minimize-DJNow9cL.js +1 -0
- package/dist/client/assets/minus-ZVvm79Y3.js +1 -0
- package/dist/client/assets/mirror-rectangular-DsaB2fSj.js +1 -0
- package/dist/client/assets/mirror-round-CM7RkE-M.js +1 -0
- package/dist/client/assets/monitor-check-PgkejwNH.js +1 -0
- package/dist/client/assets/monitor-cloud-D1nWy58d.js +1 -0
- package/dist/client/assets/monitor-cog-B-SaOf-O.js +1 -0
- package/dist/client/assets/monitor-dot-C-mnsuwj.js +1 -0
- package/dist/client/assets/monitor-down-UKOAzuo8.js +1 -0
- package/dist/client/assets/monitor-off-CL4nMv3y.js +1 -0
- package/dist/client/assets/monitor-pause-Ba71_-Jt.js +1 -0
- package/dist/client/assets/monitor-play-DBTM_urw.js +1 -0
- package/dist/client/assets/monitor-smartphone-BFmm65ct.js +1 -0
- package/dist/client/assets/monitor-speaker-CNJ-603K.js +1 -0
- package/dist/client/assets/monitor-stop-D-W6tYd4.js +1 -0
- package/dist/client/assets/monitor-up-D7Pvryxf.js +1 -0
- package/dist/client/assets/monitor-x-jlxMu2hu.js +1 -0
- package/dist/client/assets/moon-BGOR34LQ.js +1 -0
- package/dist/client/assets/moon-star-Bs-lHVxi.js +1 -0
- package/dist/client/assets/motorbike-CLLrQI01.js +1 -0
- package/dist/client/assets/mountain-DnrAHvoh.js +1 -0
- package/dist/client/assets/mountain-snow-BVJfCjOX.js +1 -0
- package/dist/client/assets/mouse-DCgmsAPo.js +1 -0
- package/dist/client/assets/mouse-left-B7EuGlq_.js +1 -0
- package/dist/client/assets/mouse-off-DciLak72.js +1 -0
- package/dist/client/assets/mouse-pointer-2-BJuyb9cG.js +1 -0
- package/dist/client/assets/mouse-pointer-2-off-D7ndcu0b.js +1 -0
- package/dist/client/assets/mouse-pointer-CYUTLXwA.js +1 -0
- package/dist/client/assets/mouse-pointer-ban-DYZ-3Qll.js +1 -0
- package/dist/client/assets/mouse-pointer-click-DKxeqeaq.js +1 -0
- package/dist/client/assets/mouse-right-mbPRnnlO.js +1 -0
- package/dist/client/assets/move-3d-R5a45O_s.js +1 -0
- package/dist/client/assets/move-diagonal-2-BnJYvI5z.js +1 -0
- package/dist/client/assets/move-diagonal-DyOTYa-9.js +1 -0
- package/dist/client/assets/move-down-CUJQHcKH.js +1 -0
- package/dist/client/assets/move-down-left-C8iEcYWl.js +1 -0
- package/dist/client/assets/move-down-right-BbV4gGPk.js +1 -0
- package/dist/client/assets/move-horizontal-B0OnG9EU.js +1 -0
- package/dist/client/assets/move-left-BIPzZFyL.js +1 -0
- package/dist/client/assets/move-right-DkP8pqZf.js +1 -0
- package/dist/client/assets/move-up-CPPBUhS_.js +1 -0
- package/dist/client/assets/move-up-left-Cqt07IId.js +1 -0
- package/dist/client/assets/move-up-right-CisMEwqU.js +1 -0
- package/dist/client/assets/move-vertical-BvfWo7Oh.js +1 -0
- package/dist/client/assets/move-xoikBbb2.js +1 -0
- package/dist/client/assets/music-2-D5RBwKop.js +1 -0
- package/dist/client/assets/music-3-twCHyhf9.js +1 -0
- package/dist/client/assets/music-4-BZ4yg2TZ.js +1 -0
- package/dist/client/assets/music-C7HnEhM1.js +1 -0
- package/dist/client/assets/navigation-2-DoLe5W6Y.js +1 -0
- package/dist/client/assets/navigation-2-off-CdJvc6ZS.js +1 -0
- package/dist/client/assets/navigation-BJtNb0d0.js +1 -0
- package/dist/client/assets/navigation-off-CK8075w-.js +1 -0
- package/dist/client/assets/network-CoirzdsE.js +1 -0
- package/dist/client/assets/newspaper-D9lezsRE.js +1 -0
- package/dist/client/assets/nfc-BHHObO6v.js +1 -0
- package/dist/client/assets/non-binary-DXo4uv4Q.js +1 -0
- package/dist/client/assets/notebook-CXiknnHF.js +1 -0
- package/dist/client/assets/notebook-pen-BBhdovew.js +1 -0
- package/dist/client/assets/notebook-tabs-BTsBiQLd.js +1 -0
- package/dist/client/assets/notebook-text-mCXAwwD7.js +1 -0
- package/dist/client/assets/notepad-text-dashed-C3352N8k.js +1 -0
- package/dist/client/assets/notepad-text-paASsiG-.js +1 -0
- package/dist/client/assets/nut-BNJVUIZI.js +1 -0
- package/dist/client/assets/nut-off-GotKwSby.js +1 -0
- package/dist/client/assets/octagon-D4uliduN.js +1 -0
- package/dist/client/assets/octagon-alert-H-jbkS56.js +1 -0
- package/dist/client/assets/octagon-minus-DGHpklck.js +1 -0
- package/dist/client/assets/octagon-pause-12KKF9Xs.js +1 -0
- package/dist/client/assets/octagon-x-CfaB_TCS.js +1 -0
- package/dist/client/assets/omega-CSigzIVw.js +1 -0
- package/dist/client/assets/option-Cv4SNx8W.js +1 -0
- package/dist/client/assets/orbit-BUQoZ8fv.js +1 -0
- package/dist/client/assets/origami-ClE5MQ2O.js +1 -0
- package/dist/client/assets/package-2-Br4dle8E.js +1 -0
- package/dist/client/assets/package-CPbn_IZP.js +1 -0
- package/dist/client/assets/package-check-Bo7VhktJ.js +1 -0
- package/dist/client/assets/package-minus-GOcnpfDQ.js +1 -0
- package/dist/client/assets/package-open-Z4zaM1lf.js +1 -0
- package/dist/client/assets/package-plus-C3ikoh3l.js +1 -0
- package/dist/client/assets/package-search-BU9uJInv.js +1 -0
- package/dist/client/assets/package-x--z_wHgU0.js +1 -0
- package/dist/client/assets/paint-bucket-DyoD_FWi.js +1 -0
- package/dist/client/assets/paint-roller-BeDvWXO6.js +1 -0
- package/dist/client/assets/paintbrush-Bk8uJFN4.js +1 -0
- package/dist/client/assets/paintbrush-vertical-COzCsqdY.js +1 -0
- package/dist/client/assets/palette-k-govpJC.js +1 -0
- package/dist/client/assets/panda-CERXUWPB.js +1 -0
- package/dist/client/assets/panel-bottom-CyWzylBB.js +1 -0
- package/dist/client/assets/panel-bottom-close-CG6KAkjo.js +1 -0
- package/dist/client/assets/panel-bottom-dashed-DieKCC0y.js +1 -0
- package/dist/client/assets/panel-bottom-open-D4YTbfH4.js +1 -0
- package/dist/client/assets/panel-left-DbzfMDYH.js +1 -0
- package/dist/client/assets/panel-left-close-CvvSJE1J.js +1 -0
- package/dist/client/assets/panel-left-dashed-BYkKPnku.js +1 -0
- package/dist/client/assets/panel-left-open-COu_UmlK.js +1 -0
- package/dist/client/assets/panel-left-right-dashed-CooEosWt.js +1 -0
- package/dist/client/assets/panel-right-close-Dh-w7qUu.js +1 -0
- package/dist/client/assets/panel-right-dashed-Cl3IiCNX.js +1 -0
- package/dist/client/assets/panel-right-open-B0V-3rAp.js +1 -0
- package/dist/client/assets/panel-top-bottom-dashed-CcEtXu8b.js +1 -0
- package/dist/client/assets/panel-top-close-DCjkLwE3.js +1 -0
- package/dist/client/assets/panel-top-dashed-BN6YX8K6.js +1 -0
- package/dist/client/assets/panel-top-open-DgoKbtQU.js +1 -0
- package/dist/client/assets/panel-top-rUxQyOZs.js +1 -0
- package/dist/client/assets/panels-left-bottom-DWoU_L2w.js +1 -0
- package/dist/client/assets/panels-right-bottom-LsX10Kh0.js +1 -0
- package/dist/client/assets/panels-top-left-CznVumXS.js +1 -0
- package/dist/client/assets/parasol-B6m05exf.js +1 -0
- package/dist/client/assets/parentheses-CZRglGzB.js +1 -0
- package/dist/client/assets/parking-meter-CetVj2l5.js +1 -0
- package/dist/client/assets/party-popper-BR3XZ5qz.js +1 -0
- package/dist/client/assets/passwordBootstrap-SIs7oJj5.js +2 -0
- package/dist/client/assets/passwordBootstrap-SIs7oJj5.js.br +0 -0
- package/dist/client/assets/passwordBootstrap-SIs7oJj5.js.gz +0 -0
- package/dist/client/assets/pause-DfWjNimX.js +1 -0
- package/dist/client/assets/paw-print-spm4jrOd.js +1 -0
- package/dist/client/assets/pc-case-uC84RGP5.js +1 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-fjxcfKQz.js +1 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-fjxcfKQz.js.br +0 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-fjxcfKQz.js.gz +0 -0
- package/dist/client/assets/pen-BZJYF9Oj.js +1 -0
- package/dist/client/assets/pen-line-TJHANkVa.js +1 -0
- package/dist/client/assets/pen-off-drbpaaAT.js +1 -0
- package/dist/client/assets/pen-tool-z8UgerGZ.js +1 -0
- package/dist/client/assets/pencil-line-UYCRyYjS.js +1 -0
- package/dist/client/assets/pencil-off-BEEWDVpE.js +1 -0
- package/dist/client/assets/pencil-ruler-DQgi6o04.js +1 -0
- package/dist/client/assets/pentagon-ObKHHu4a.js +1 -0
- package/dist/client/assets/percent-BWn3G9jv.js +1 -0
- package/dist/client/assets/person-standing-s3u693RH.js +1 -0
- package/dist/client/assets/philippine-peso-CPDwF4sK.js +1 -0
- package/dist/client/assets/phone-DcFgJp-a.js +1 -0
- package/dist/client/assets/phone-call-CWzdCx_O.js +1 -0
- package/dist/client/assets/phone-forwarded-ChEnm9e7.js +1 -0
- package/dist/client/assets/phone-incoming-bl3ymvdy.js +1 -0
- package/dist/client/assets/phone-missed-C5wDCzi7.js +1 -0
- package/dist/client/assets/phone-off-CYfg4Yvt.js +1 -0
- package/dist/client/assets/phone-outgoing-9EB2FPa4.js +1 -0
- package/dist/client/assets/pi-dQ2UB3kC.js +1 -0
- package/dist/client/assets/piano-Cf3YHsbg.js +1 -0
- package/dist/client/assets/pickaxe-CYEEHbua.js +1 -0
- package/dist/client/assets/picture-in-picture-2-DLneK26Z.js +1 -0
- package/dist/client/assets/picture-in-picture-D7rBAUeO.js +1 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-DUlRsXnl.js +39 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-DUlRsXnl.js.br +0 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-DUlRsXnl.js.gz +0 -0
- package/dist/client/assets/piggy-bank-C9vGXXLK.js +1 -0
- package/dist/client/assets/pilcrow-BIPpSikb.js +1 -0
- package/dist/client/assets/pilcrow-left-Cqs4EWcc.js +1 -0
- package/dist/client/assets/pilcrow-right-CoRhocT4.js +1 -0
- package/dist/client/assets/pill-DaQm0tLE.js +1 -0
- package/dist/client/assets/pill-bottle-BNn8zfaJ.js +1 -0
- package/dist/client/assets/pipette-_8hzoMsz.js +1 -0
- package/dist/client/assets/pizza-CfIcU0-j.js +1 -0
- package/dist/client/assets/plane-Lo3ofiP_.js +1 -0
- package/dist/client/assets/plane-landing-CwMfo1Yd.js +1 -0
- package/dist/client/assets/plane-takeoff-DMojMM8K.js +1 -0
- package/dist/client/assets/play-BJvo8H1D.js +1 -0
- package/dist/client/assets/plug-2-D7uKZ4sI.js +1 -0
- package/dist/client/assets/plug-B1tNrvq6.js +1 -0
- package/dist/client/assets/plug-zap-BLJnhcPv.js +1 -0
- package/dist/client/assets/pocket-knife-qjQs5YPX.js +1 -0
- package/dist/client/assets/podcast-CvCDvDac.js +1 -0
- package/dist/client/assets/pointer-BH_dajl_.js +1 -0
- package/dist/client/assets/pointer-off-DlUfzj3G.js +1 -0
- package/dist/client/assets/popcorn-DiiXpiOY.js +1 -0
- package/dist/client/assets/popsicle-BU8kDsVW.js +1 -0
- package/dist/client/assets/pound-sterling-720BHgwF.js +1 -0
- package/dist/client/assets/power-By_KQxE-.js +1 -0
- package/dist/client/assets/power-off-DNQ6OT9w.js +1 -0
- package/dist/client/assets/presentation-CtJnir6F.js +1 -0
- package/dist/client/assets/printer-BnIBiROC.js +1 -0
- package/dist/client/assets/printer-check-Dr9WIeYG.js +1 -0
- package/dist/client/assets/printer-x-CLtOO-WF.js +1 -0
- package/dist/client/assets/projector-CkhMvCCU.js +1 -0
- package/dist/client/assets/proportions-9eFxFsdh.js +1 -0
- package/dist/client/assets/puzzle-BrYyqn0I.js +1 -0
- package/dist/client/assets/pyramid-B19ssUMZ.js +1 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Dljih0ap.js +7 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Dljih0ap.js.br +0 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Dljih0ap.js.gz +0 -0
- package/dist/client/assets/quote-aa2eYlsd.js +1 -0
- package/dist/client/assets/rabbit-pZsY7lJX.js +1 -0
- package/dist/client/assets/radar-BjL05P1B.js +1 -0
- package/dist/client/assets/radiation-CDAw4caK.js +1 -0
- package/dist/client/assets/radical-BB5UaIpF.js +1 -0
- package/dist/client/assets/radio-BNYHjz4J.js +1 -0
- package/dist/client/assets/radio-off-DiyGcm-V.js +1 -0
- package/dist/client/assets/radio-receiver-F-wTs1l1.js +1 -0
- package/dist/client/assets/radio-tower-DG7h1l9p.js +1 -0
- package/dist/client/assets/radius-H--qIAk7.js +1 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-CKSu1oKS.js +1 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-CKSu1oKS.js.br +0 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-CKSu1oKS.js.gz +0 -0
- package/dist/client/assets/rainbow-1g6E8ucL.js +1 -0
- package/dist/client/assets/rat-M3pxru7o.js +1 -0
- package/dist/client/assets/ratio-eQ1D0VFe.js +1 -0
- package/dist/client/assets/rdpSession-DFIuXpMg.js +1 -0
- package/dist/client/assets/rdpSession-DFIuXpMg.js.br +0 -0
- package/dist/client/assets/rdpSession-DFIuXpMg.js.gz +0 -0
- package/dist/client/assets/receipt-CxoVESJz.js +1 -0
- package/dist/client/assets/receipt-cent-IpszAG05.js +1 -0
- package/dist/client/assets/receipt-euro---t5B6ca.js +1 -0
- package/dist/client/assets/receipt-indian-rupee-C4jEugFZ.js +1 -0
- package/dist/client/assets/receipt-japanese-yen-L6LJ6XsM.js +1 -0
- package/dist/client/assets/receipt-pound-sterling-jhVyI1Ls.js +1 -0
- package/dist/client/assets/receipt-russian-ruble-lRgfXG6g.js +1 -0
- package/dist/client/assets/receipt-swiss-franc-BxnIXcbf.js +1 -0
- package/dist/client/assets/receipt-text-B3s7D-z7.js +1 -0
- package/dist/client/assets/receipt-turkish-lira-CuFDO10C.js +1 -0
- package/dist/client/assets/rectangle-circle-BS0HZJPe.js +1 -0
- package/dist/client/assets/rectangle-ellipsis-WRnIgcpf.js +1 -0
- package/dist/client/assets/rectangle-goggles-CPxAVSyA.js +1 -0
- package/dist/client/assets/rectangle-horizontal-CvtIxcYR.js +1 -0
- package/dist/client/assets/rectangle-vertical-BroDs5Ae.js +1 -0
- package/dist/client/assets/recycle-BNQoBOo1.js +1 -0
- package/dist/client/assets/redo-2-DmC1QPVH.js +1 -0
- package/dist/client/assets/redo-DsU8-VFt.js +1 -0
- package/dist/client/assets/redo-dot-BKuToLyS.js +1 -0
- package/dist/client/assets/referenceSelection-BI72ukaH.js +4 -0
- package/dist/client/assets/referenceSelection-BI72ukaH.js.br +0 -0
- package/dist/client/assets/referenceSelection-BI72ukaH.js.gz +0 -0
- package/dist/client/assets/refresh-ccw-DQDad6xu.js +1 -0
- package/dist/client/assets/refresh-ccw-dot-KE6vkAy9.js +1 -0
- package/dist/client/assets/refresh-cw-off-C36lA5Tl.js +1 -0
- package/dist/client/assets/refrigerator-CcGryvcM.js +1 -0
- package/dist/client/assets/regex-Bm_mY5pV.js +1 -0
- package/dist/client/assets/remove-formatting-BXr33Uaw.js +1 -0
- package/dist/client/assets/repeat-1-BEvCV46v.js +1 -0
- package/dist/client/assets/repeat-2-CUjXbX9z.js +1 -0
- package/dist/client/assets/repeat-BmRdVPCp.js +1 -0
- package/dist/client/assets/repeat-off-DrN7V5Gz.js +1 -0
- package/dist/client/assets/replace-BSSbm8zI.js +1 -0
- package/dist/client/assets/replace-all-Dew5gsZw.js +1 -0
- package/dist/client/assets/reply-CxmNldG7.js +1 -0
- package/dist/client/assets/reply-all-DBpc2QAl.js +1 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-ByU9TaOL.js +84 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-ByU9TaOL.js.br +0 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-ByU9TaOL.js.gz +0 -0
- package/dist/client/assets/rewind-Bq6MQcV7.js +1 -0
- package/dist/client/assets/ribbon-Cnrc06P1.js +1 -0
- package/dist/client/assets/road-CFDsGY2_.js +1 -0
- package/dist/client/assets/rocking-chair-CovnGXLz.js +1 -0
- package/dist/client/assets/roller-coaster-BtbYRCtf.js +1 -0
- package/dist/client/assets/rose-DNh_z-P3.js +1 -0
- package/dist/client/assets/rotate-3d-wsFvU2vl.js +1 -0
- package/dist/client/assets/rotate-ccw-key-Dn49EF8G.js +1 -0
- package/dist/client/assets/rotate-ccw-square-5O4w34u4.js +1 -0
- package/dist/client/assets/rotate-cw-Cydjjht_.js +1 -0
- package/dist/client/assets/rotate-cw-square-D9ODLVOe.js +1 -0
- package/dist/client/assets/route-off-DahCDvRJ.js +1 -0
- package/dist/client/assets/route-tK7rWYX8.js +1 -0
- package/dist/client/assets/router-ZJDLAFGt.js +1 -0
- package/dist/client/assets/rows-2-CIxnGDmI.js +1 -0
- package/dist/client/assets/rows-3-B0bLE1Iu.js +1 -0
- package/dist/client/assets/rows-4-CA6nVUWc.js +1 -0
- package/dist/client/assets/rss-jZqH5XxW.js +1 -0
- package/dist/client/assets/ruler-DKl6ffg_.js +1 -0
- package/dist/client/assets/ruler-dimension-line-CKbmL9fY.js +1 -0
- package/dist/client/assets/russian-ruble-ClUywWCp.js +1 -0
- package/dist/client/assets/sailboat-CLOFE8qd.js +1 -0
- package/dist/client/assets/salad-B65AiOYB.js +1 -0
- package/dist/client/assets/sandwich-z0b4jGha.js +1 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-DboYEWM4.js +40 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-DboYEWM4.js.br +0 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-DboYEWM4.js.gz +0 -0
- package/dist/client/assets/satellite-C5TrHDNA.js +1 -0
- package/dist/client/assets/satellite-dish-bNDbs48D.js +1 -0
- package/dist/client/assets/saudi-riyal-Be3FEtmY.js +1 -0
- package/dist/client/assets/save-BcQMtnnc.js +1 -0
- package/dist/client/assets/save-all-CG5Ejby9.js +1 -0
- package/dist/client/assets/save-off-DXgP3Toq.js +1 -0
- package/dist/client/assets/scale-3d-Bzl6yK5F.js +1 -0
- package/dist/client/assets/scale-BQjcnOEH.js +1 -0
- package/dist/client/assets/scaling-aysNaVLO.js +1 -0
- package/dist/client/assets/scan-CrtiGaSC.js +1 -0
- package/dist/client/assets/scan-barcode-BJ0_muJT.js +1 -0
- package/dist/client/assets/scan-eye-0NNyRRxW.js +1 -0
- package/dist/client/assets/scan-face-Fw5PBS0i.js +1 -0
- package/dist/client/assets/scan-heart-ZTpwCKpB.js +1 -0
- package/dist/client/assets/scan-line-W4Cl4HWW.js +1 -0
- package/dist/client/assets/scan-qr-code-BedRP6Jn.js +1 -0
- package/dist/client/assets/scan-search-BqKeA-Yt.js +1 -0
- package/dist/client/assets/scan-text-BHp-VH3O.js +1 -0
- package/dist/client/assets/school-BmfHL5PY.js +1 -0
- package/dist/client/assets/scissors-CDFGQTxr.js +1 -0
- package/dist/client/assets/scissors-line-dashed-Dk5jFpoX.js +1 -0
- package/dist/client/assets/scooter-CoPvXJnQ.js +1 -0
- package/dist/client/assets/screen-share-CH_Fyjvf.js +1 -0
- package/dist/client/assets/screen-share-off-CdV5604p.js +1 -0
- package/dist/client/assets/scroll-CL9YaRFa.js +1 -0
- package/dist/client/assets/scroll-text-BjBRWz2m.js +1 -0
- package/dist/client/assets/search-CZJC7NYm.js +1 -0
- package/dist/client/assets/search-alert-BpBnxybV.js +1 -0
- package/dist/client/assets/search-check-DSPOs-_b.js +1 -0
- package/dist/client/assets/search-code-Di2ps8t_.js +1 -0
- package/dist/client/assets/search-slash-CqJcggPZ.js +1 -0
- package/dist/client/assets/search-x-DOD0drSD.js +1 -0
- package/dist/client/assets/section-DEX3vurx.js +1 -0
- package/dist/client/assets/send-Bl37bA4r.js +1 -0
- package/dist/client/assets/send-horizontal-CHhxRPy5.js +1 -0
- package/dist/client/assets/send-to-back-Je9W6RLF.js +1 -0
- package/dist/client/assets/separator-horizontal-D85MbXaD.js +1 -0
- package/dist/client/assets/separator-vertical-C-Okaq6v.js +1 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-Cfww3VVh.js +162 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-Cfww3VVh.js.br +0 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-Cfww3VVh.js.gz +0 -0
- package/dist/client/assets/server-cog-eCoiQzRP.js +1 -0
- package/dist/client/assets/server-crash-BdN-dzCM.js +1 -0
- package/dist/client/assets/server-off-5VVbMiHt.js +1 -0
- package/dist/client/assets/sessionChatStartup-DDCzh-as.js +1 -0
- package/dist/client/assets/sessionChatStartup-DDCzh-as.js.br +0 -0
- package/dist/client/assets/sessionChatStartup-DDCzh-as.js.gz +0 -0
- package/dist/client/assets/settings-2-oGNqnTdu.js +1 -0
- package/dist/client/assets/settings-CcIc1_zC.js +1 -0
- package/dist/client/assets/shapes-B8H2aY4z.js +1 -0
- package/dist/client/assets/share-CP-D4h0R.js +1 -0
- package/dist/client/assets/sheet-Dw9Kp6Av.js +1 -0
- package/dist/client/assets/shell-pDGpqH6c.js +1 -0
- package/dist/client/assets/shelving-unit-BRXiga1-.js +1 -0
- package/dist/client/assets/shield-CMqV2qj6.js +1 -0
- package/dist/client/assets/shield-alert-D7tIqvL9.js +1 -0
- package/dist/client/assets/shield-ban-COhpJh8m.js +1 -0
- package/dist/client/assets/shield-check-CzqJntw7.js +1 -0
- package/dist/client/assets/shield-cog-CMOVnKF2.js +1 -0
- package/dist/client/assets/shield-cog-corner-C_sdRBQs.js +1 -0
- package/dist/client/assets/shield-ellipsis-C3GMRh0r.js +1 -0
- package/dist/client/assets/shield-half-4oh0-OZ8.js +1 -0
- package/dist/client/assets/shield-minus-BTdu797X.js +1 -0
- package/dist/client/assets/shield-off-C2XX1k2b.js +1 -0
- package/dist/client/assets/shield-plus-YpR8jbXc.js +1 -0
- package/dist/client/assets/shield-question-mark-w2gJVGec.js +1 -0
- package/dist/client/assets/shield-user-BtzPGWHZ.js +1 -0
- package/dist/client/assets/shield-x-DUjb3pDd.js +1 -0
- package/dist/client/assets/ship-0TWPZu1I.js +1 -0
- package/dist/client/assets/ship-wheel-CYkznxzW.js +1 -0
- package/dist/client/assets/shirt-C5kZmLoK.js +1 -0
- package/dist/client/assets/shopping-bag-Dua4faQf.js +1 -0
- package/dist/client/assets/shopping-basket-ybYf5CWB.js +1 -0
- package/dist/client/assets/shopping-cart-P2Sk0Mvl.js +1 -0
- package/dist/client/assets/shovel-C7UIvXd2.js +1 -0
- package/dist/client/assets/shower-head-Cb_IkBPt.js +1 -0
- package/dist/client/assets/shredder-bXMVuzH6.js +1 -0
- package/dist/client/assets/shrimp-OC9P_j0E.js +1 -0
- package/dist/client/assets/shrink-CdjqIwyc.js +1 -0
- package/dist/client/assets/shrub-DgIlFdVM.js +1 -0
- package/dist/client/assets/shuffle-DE8phEat.js +1 -0
- package/dist/client/assets/sigma-YOv18jxd.js +1 -0
- package/dist/client/assets/signal-U8r6WtYH.js +1 -0
- package/dist/client/assets/signal-high-DLr418dt.js +1 -0
- package/dist/client/assets/signal-low-DfL_IStN.js +1 -0
- package/dist/client/assets/signal-medium-B5D3M5WK.js +1 -0
- package/dist/client/assets/signal-zero-BMUFSVQ9.js +1 -0
- package/dist/client/assets/signature-DHDKaRNP.js +1 -0
- package/dist/client/assets/signpost-Cg5JkfXD.js +1 -0
- package/dist/client/assets/signpost-big-CTd1L0BF.js +1 -0
- package/dist/client/assets/siren-CDRKFpGC.js +1 -0
- package/dist/client/assets/sizeCapture-INFHLROL-D1aD1Ho8.js +1 -0
- package/dist/client/assets/sizeCapture-INFHLROL-D1aD1Ho8.js.br +0 -0
- package/dist/client/assets/sizeCapture-INFHLROL-D1aD1Ho8.js.gz +0 -0
- package/dist/client/assets/skip-back-BpImVXhH.js +1 -0
- package/dist/client/assets/skip-forward-pBRldL_u.js +1 -0
- package/dist/client/assets/skull-Cde8SDFe.js +1 -0
- package/dist/client/assets/slash-B4ucIHYg.js +1 -0
- package/dist/client/assets/slice-BB9bkHMj.js +1 -0
- package/dist/client/assets/sliders-horizontal-Dg_RWDPx.js +1 -0
- package/dist/client/assets/sliders-vertical-Cr8nQnv2.js +1 -0
- package/dist/client/assets/smartphone-charging-BuzwZ_Lz.js +1 -0
- package/dist/client/assets/smartphone-nfc-DcB9giGC.js +1 -0
- package/dist/client/assets/smile-DhTanafZ.js +1 -0
- package/dist/client/assets/smile-plus-CeCY6bAp.js +1 -0
- package/dist/client/assets/snail-uATDWv_d.js +1 -0
- package/dist/client/assets/snowflake-T3XprgWB.js +1 -0
- package/dist/client/assets/soap-dispenser-droplet-Dims7oZS.js +1 -0
- package/dist/client/assets/sofa-CQVwXcIz.js +1 -0
- package/dist/client/assets/solar-panel-B20jZK0x.js +1 -0
- package/dist/client/assets/soup-Bdyey14C.js +1 -0
- package/dist/client/assets/space-DmM-Qb-m.js +1 -0
- package/dist/client/assets/spade-CNpGIUSC.js +1 -0
- package/dist/client/assets/sparkle-BxezA1Oc.js +1 -0
- package/dist/client/assets/speaker-D7QaZ8cg.js +1 -0
- package/dist/client/assets/speech-C5Fp7by3.js +1 -0
- package/dist/client/assets/spell-check-2-OoHI2O0J.js +1 -0
- package/dist/client/assets/spell-check-D_Qq1aaI.js +1 -0
- package/dist/client/assets/spline-BgY2i49m.js +1 -0
- package/dist/client/assets/spline-pointer-BoyU7SwC.js +1 -0
- package/dist/client/assets/split-D8erGI1B.js +1 -0
- package/dist/client/assets/spool-C1nhhv1e.js +1 -0
- package/dist/client/assets/sport-shoe-q_Nj9gZ_.js +1 -0
- package/dist/client/assets/spotlight-BZF8CIZs.js +1 -0
- package/dist/client/assets/spray-can-5vSbIT4_.js +1 -0
- package/dist/client/assets/sprout-D0ZlA5LC.js +1 -0
- package/dist/client/assets/square-DlNzigrF.js +1 -0
- package/dist/client/assets/square-activity-MtwNbf1b.js +1 -0
- package/dist/client/assets/square-arrow-down-De5S7obA.js +1 -0
- package/dist/client/assets/square-arrow-down-left-BXOc1d13.js +1 -0
- package/dist/client/assets/square-arrow-down-right-CdX7AGiU.js +1 -0
- package/dist/client/assets/square-arrow-left-Bgyf7Hvm.js +1 -0
- package/dist/client/assets/square-arrow-out-down-left-CzdQuhLg.js +1 -0
- package/dist/client/assets/square-arrow-out-down-right-B1MtxwEt.js +1 -0
- package/dist/client/assets/square-arrow-out-up-left-B7sFdtGf.js +1 -0
- package/dist/client/assets/square-arrow-right-BUzr3X8Y.js +1 -0
- package/dist/client/assets/square-arrow-right-enter-ap0CxYL5.js +1 -0
- package/dist/client/assets/square-arrow-right-exit-DtEytYZM.js +1 -0
- package/dist/client/assets/square-arrow-up-C_jDXz1J.js +1 -0
- package/dist/client/assets/square-arrow-up-left-BpvhH0Ij.js +1 -0
- package/dist/client/assets/square-arrow-up-right-B1hPRfq0.js +1 -0
- package/dist/client/assets/square-asterisk-TkxgF50D.js +1 -0
- package/dist/client/assets/square-bottom-dashed-scissors-C_Y44VsY.js +1 -0
- package/dist/client/assets/square-centerline-dashed-horizontal-DZ1gUB0e.js +1 -0
- package/dist/client/assets/square-centerline-dashed-vertical-q3mkpKvo.js +1 -0
- package/dist/client/assets/square-chart-gantt-CYAu_Ukp.js +1 -0
- package/dist/client/assets/square-check-CY1sKpkq.js +1 -0
- package/dist/client/assets/square-check-big-CxQvWGRM.js +1 -0
- package/dist/client/assets/square-chevron-down-B9TfsPZK.js +1 -0
- package/dist/client/assets/square-chevron-left-gRU0t2Z8.js +1 -0
- package/dist/client/assets/square-chevron-right-LZBYDBv3.js +1 -0
- package/dist/client/assets/square-chevron-up-BWRfykxj.js +1 -0
- package/dist/client/assets/square-code-VexSTpDx.js +1 -0
- package/dist/client/assets/square-dashed-DJOHnQXc.js +1 -0
- package/dist/client/assets/square-dashed-bottom-D9OWBTsh.js +1 -0
- package/dist/client/assets/square-dashed-bottom-code-GMOswXDb.js +1 -0
- package/dist/client/assets/square-dashed-kanban-BDVdJtXq.js +1 -0
- package/dist/client/assets/square-dashed-mouse-pointer-D3cNWiDJ.js +1 -0
- package/dist/client/assets/square-dashed-text-DtyHiOHn.js +1 -0
- package/dist/client/assets/square-dashed-top-solid-Dma7WfOv.js +1 -0
- package/dist/client/assets/square-divide-BHjiEOep.js +1 -0
- package/dist/client/assets/square-dot-Cx9393TO.js +1 -0
- package/dist/client/assets/square-equal-BiQClVo0.js +1 -0
- package/dist/client/assets/square-function-CRGwhc2l.js +1 -0
- package/dist/client/assets/square-kanban-DqZKBdpr.js +1 -0
- package/dist/client/assets/square-library-dFWsLr3y.js +1 -0
- package/dist/client/assets/square-m-CWD72C8S.js +1 -0
- package/dist/client/assets/square-menu-BVjRvntW.js +1 -0
- package/dist/client/assets/square-minus-BnuiOAXl.js +1 -0
- package/dist/client/assets/square-mouse-pointer-Bev0IOeZ.js +1 -0
- package/dist/client/assets/square-parking-C-T7oquR.js +1 -0
- package/dist/client/assets/square-parking-off-5rh4-Dvs.js +1 -0
- package/dist/client/assets/square-pause-kv2SpfYt.js +1 -0
- package/dist/client/assets/square-pen-BcAutpXh.js +1 -0
- package/dist/client/assets/square-percent-BiR6VFs8.js +1 -0
- package/dist/client/assets/square-pi-B4QtxjWv.js +1 -0
- package/dist/client/assets/square-pilcrow-C4WTwk9a.js +1 -0
- package/dist/client/assets/square-play-Dxk6k3tD.js +1 -0
- package/dist/client/assets/square-plus-hEnA3TP2.js +1 -0
- package/dist/client/assets/square-power-B9OAWs7o.js +1 -0
- package/dist/client/assets/square-radical-C-gJ6GI8.js +1 -0
- package/dist/client/assets/square-round-corner-CowNBCoF.js +1 -0
- package/dist/client/assets/square-scissors-B94lUZu1.js +1 -0
- package/dist/client/assets/square-sigma-V26Gd78j.js +1 -0
- package/dist/client/assets/square-slash-DT3JO7ih.js +1 -0
- package/dist/client/assets/square-split-horizontal-DA-f_VZS.js +1 -0
- package/dist/client/assets/square-split-vertical--Xlalhk5.js +1 -0
- package/dist/client/assets/square-square-ZR38GJwk.js +1 -0
- package/dist/client/assets/square-stack-Ctmi-B-f.js +1 -0
- package/dist/client/assets/square-star-jOdE_zrA.js +1 -0
- package/dist/client/assets/square-stop-Bo1luS3o.js +1 -0
- package/dist/client/assets/square-user-JciGhKWM.js +1 -0
- package/dist/client/assets/square-user-round-CP4VVNcg.js +1 -0
- package/dist/client/assets/square-x-AQiWSAZI.js +1 -0
- package/dist/client/assets/squares-exclude-CiBofzdE.js +1 -0
- package/dist/client/assets/squares-intersect-DzwopBgu.js +1 -0
- package/dist/client/assets/squares-subtract-BoB8qn9t.js +1 -0
- package/dist/client/assets/squares-unite-D4zNJ2L3.js +1 -0
- package/dist/client/assets/squircle-DT_Vj9Fy.js +1 -0
- package/dist/client/assets/squircle-dashed-DxijwO5g.js +1 -0
- package/dist/client/assets/squirrel-5dfySg4p.js +1 -0
- package/dist/client/assets/stamp-BxBBH0JB.js +1 -0
- package/dist/client/assets/star-half-DODJiqoZ.js +1 -0
- package/dist/client/assets/star-off-M4v8cqjC.js +1 -0
- package/dist/client/assets/star-wq0EGPzp.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-CuOOh59t.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-CuOOh59t.js.br +0 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-CuOOh59t.js.gz +0 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-tmzh2kks.js +1 -0
- package/dist/client/assets/step-back-BB43YjGf.js +1 -0
- package/dist/client/assets/step-forward-nAj1j8is.js +1 -0
- package/dist/client/assets/stethoscope-DL2sZ0BL.js +1 -0
- package/dist/client/assets/sticker-KyrbiHT2.js +1 -0
- package/dist/client/assets/sticky-note-BczFsbzs.js +1 -0
- package/dist/client/assets/sticky-note-check-CET1Fh6C.js +1 -0
- package/dist/client/assets/sticky-note-minus-DEI67h_R.js +1 -0
- package/dist/client/assets/sticky-note-off-BpIu5ewm.js +1 -0
- package/dist/client/assets/sticky-note-plus-D6Jzrapy.js +1 -0
- package/dist/client/assets/sticky-note-x-CLNcNvlI.js +1 -0
- package/dist/client/assets/sticky-notes-B4U7hIXg.js +1 -0
- package/dist/client/assets/stone-_XDnNQTw.js +1 -0
- package/dist/client/assets/store-DgFsxxM-.js +1 -0
- package/dist/client/assets/stretch-horizontal-DJAqY7EK.js +1 -0
- package/dist/client/assets/stretch-vertical-BZe5QMnQ.js +1 -0
- package/dist/client/assets/strikethrough-BUAfcVbm.js +1 -0
- package/dist/client/assets/subscript-CL7EMbpj.js +1 -0
- package/dist/client/assets/sun-BPPs_5ax.js +1 -0
- package/dist/client/assets/sun-dim-CLcGTdGL.js +1 -0
- package/dist/client/assets/sun-medium-Cti4BBKx.js +1 -0
- package/dist/client/assets/sun-moon-FjAwHgu1.js +1 -0
- package/dist/client/assets/sun-snow-gLfk88KG.js +1 -0
- package/dist/client/assets/sunrise-Dgr1SsEm.js +1 -0
- package/dist/client/assets/sunset-D3NBG6jm.js +1 -0
- package/dist/client/assets/superscript-BqaUzFlI.js +1 -0
- package/dist/client/assets/swatch-book-uSPy0eS0.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-DlcJke19.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-DlcJke19.js.br +0 -0
- package/dist/client/assets/swimlanes-42K2YHIH-DlcJke19.js.gz +0 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-AQPU3y9W.js +8 -0
- package/dist/client/assets/swiper-CYYt54zb.js +1 -0
- package/dist/client/assets/swiper-CYYt54zb.js.br +0 -0
- package/dist/client/assets/swiper-CYYt54zb.js.gz +0 -0
- package/dist/client/assets/swiss-franc-ChIPEjLE.js +1 -0
- package/dist/client/assets/switch-camera-sPibTRwx.js +1 -0
- package/dist/client/assets/sword-DvXMFkGT.js +1 -0
- package/dist/client/assets/swords-CQMubv94.js +1 -0
- package/dist/client/assets/syringe-CuE5aQDM.js +1 -0
- package/dist/client/assets/table-2-dGkzmzCN.js +1 -0
- package/dist/client/assets/table-DGd2aQbF.js +1 -0
- package/dist/client/assets/table-cells-merge-DsETBT34.js +1 -0
- package/dist/client/assets/table-cells-split-DF8eLy80.js +1 -0
- package/dist/client/assets/table-columns-split-BxpH6uv_.js +1 -0
- package/dist/client/assets/table-of-contents-1k-HDQCH.js +1 -0
- package/dist/client/assets/table-properties-CS2zzMTA.js +1 -0
- package/dist/client/assets/table-rows-split-Bh6EJtid.js +1 -0
- package/dist/client/assets/tablet-BFyS14KU.js +1 -0
- package/dist/client/assets/tablet-smartphone-DeJayR6P.js +1 -0
- package/dist/client/assets/tablets-292ECvrU.js +1 -0
- package/dist/client/assets/tag-BZhKbEad.js +1 -0
- package/dist/client/assets/tags-C-RknrHl.js +1 -0
- package/dist/client/assets/tally-1-Dy61BG-R.js +1 -0
- package/dist/client/assets/tally-2-JCMLtfaU.js +1 -0
- package/dist/client/assets/tally-3-3I43Z47c.js +1 -0
- package/dist/client/assets/tally-4-DoFvqFMm.js +1 -0
- package/dist/client/assets/tally-5-BPEz25Hy.js +1 -0
- package/dist/client/assets/tangent-C7emdFfO.js +1 -0
- package/dist/client/assets/target-RPR6UeiP.js +1 -0
- package/dist/client/assets/telescope-DNSPCCxq.js +1 -0
- package/dist/client/assets/tent-DegruzXt.js +1 -0
- package/dist/client/assets/tent-tree-CY_n1zAM.js +1 -0
- package/dist/client/assets/test-tube-Dzd1ATcq.js +1 -0
- package/dist/client/assets/test-tube-diagonal-BX-JdVse.js +1 -0
- package/dist/client/assets/test-tubes-ZaWSIimJ.js +1 -0
- package/dist/client/assets/text-align-center-fcB2IoUb.js +1 -0
- package/dist/client/assets/text-align-end-tN2OSi8m.js +1 -0
- package/dist/client/assets/text-align-justify-DbHWCQTT.js +1 -0
- package/dist/client/assets/text-align-start-AHKqzU13.js +1 -0
- package/dist/client/assets/text-cursor-DJcErJus.js +1 -0
- package/dist/client/assets/text-cursor-input-DM3Nc9tw.js +1 -0
- package/dist/client/assets/text-initial-B3LrO8g9.js +1 -0
- package/dist/client/assets/text-quote-Bv0SwSXK.js +1 -0
- package/dist/client/assets/text-search-C_lb0cp1.js +1 -0
- package/dist/client/assets/text-wrap-DmCHNKBE.js +1 -0
- package/dist/client/assets/theater-C5-TYlev.js +1 -0
- package/dist/client/assets/thermometer-0EFhUN9-.js +1 -0
- package/dist/client/assets/thermometer-snowflake-Cy5LCkAf.js +1 -0
- package/dist/client/assets/thermometer-sun-Cv2qLny_.js +1 -0
- package/dist/client/assets/thumbs-down-CvqgzSln.js +1 -0
- package/dist/client/assets/thumbs-up-C4Gdhy6P.js +1 -0
- package/dist/client/assets/ticket-check-BAo85ZtU.js +1 -0
- package/dist/client/assets/ticket-minus-BFt_mkBL.js +1 -0
- package/dist/client/assets/ticket-percent-Bk_yh40L.js +1 -0
- package/dist/client/assets/ticket-plus-BbPaseZn.js +1 -0
- package/dist/client/assets/ticket-slash-L7QNodxa.js +1 -0
- package/dist/client/assets/ticket-vJ3VeCEx.js +1 -0
- package/dist/client/assets/ticket-x-B92mb4Zi.js +1 -0
- package/dist/client/assets/tickets-CjOpHjqF.js +1 -0
- package/dist/client/assets/tickets-plane-Dbq_dRYr.js +1 -0
- package/dist/client/assets/timeline-C_LpIg3N.js +1 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CfQiBLj6.js +120 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CfQiBLj6.js.br +0 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CfQiBLj6.js.gz +0 -0
- package/dist/client/assets/timer-DgxTQ3Qn.js +1 -0
- package/dist/client/assets/timer-off-BdOvegux.js +1 -0
- package/dist/client/assets/timer-reset-DDlhrfMI.js +1 -0
- package/dist/client/assets/toggle-left-Bpksob37.js +1 -0
- package/dist/client/assets/toggle-right-CuJ-RBAa.js +1 -0
- package/dist/client/assets/toilet-BJWSF90z.js +1 -0
- package/dist/client/assets/tool-case-BSqOdpve.js +1 -0
- package/dist/client/assets/toolbox-nGjwGynb.js +1 -0
- package/dist/client/assets/tornado-CX6Oe8p_.js +1 -0
- package/dist/client/assets/torus-C0_G7uW1.js +1 -0
- package/dist/client/assets/touchpad-BCsz0kPG.js +1 -0
- package/dist/client/assets/touchpad-off-Dh9pKphN.js +1 -0
- package/dist/client/assets/towel-rack-1hMhatta.js +1 -0
- package/dist/client/assets/tower-control-DRkSsRPp.js +1 -0
- package/dist/client/assets/toy-brick-DmKpEcie.js +1 -0
- package/dist/client/assets/tractor-CEhD3oJV.js +1 -0
- package/dist/client/assets/traffic-cone-fK_pGWqw.js +1 -0
- package/dist/client/assets/train-front-D_rTWLjd.js +1 -0
- package/dist/client/assets/train-front-tunnel-Btv1aZhE.js +1 -0
- package/dist/client/assets/train-track-Da9UbxZK.js +1 -0
- package/dist/client/assets/tram-front-C9HZ0og3.js +1 -0
- package/dist/client/assets/transgender-Bq_etTEX.js +1 -0
- package/dist/client/assets/trash-DvTKw5Cg.js +1 -0
- package/dist/client/assets/tree-deciduous-mqAy7zTV.js +1 -0
- package/dist/client/assets/tree-palm-wxMBfA1T.js +1 -0
- package/dist/client/assets/tree-pine-DugQXdes.js +1 -0
- package/dist/client/assets/trees-DRFjwWq7.js +1 -0
- package/dist/client/assets/trending-down-B9P8GWre.js +1 -0
- package/dist/client/assets/trending-up-7YzTtBzs.js +1 -0
- package/dist/client/assets/trending-up-down-Dq2P-bie.js +1 -0
- package/dist/client/assets/triangle-D7RBcum_.js +1 -0
- package/dist/client/assets/triangle-alert-msoQOzC0.js +1 -0
- package/dist/client/assets/triangle-dashed-DAXTqNix.js +1 -0
- package/dist/client/assets/triangle-right-BUJLAwfK.js +1 -0
- package/dist/client/assets/trophy-D_ZcJeIj.js +1 -0
- package/dist/client/assets/truck-electric-4M9Bg4HA.js +1 -0
- package/dist/client/assets/truck-sxhaFw_2.js +1 -0
- package/dist/client/assets/turkish-lira-BPq42CFX.js +1 -0
- package/dist/client/assets/turntable-MZ4XQqvL.js +1 -0
- package/dist/client/assets/turtle-BNq-zVtw.js +1 -0
- package/dist/client/assets/tv-CoDWlw47.js +1 -0
- package/dist/client/assets/tv-minimal-CKJNPGFm.js +1 -0
- package/dist/client/assets/tv-minimal-play-DLzeYm-Z.js +1 -0
- package/dist/client/assets/type-D6nZpU0V.js +1 -0
- package/dist/client/assets/type-outline-C7UN86IU.js +1 -0
- package/dist/client/assets/umbrella-CBvo5qQY.js +1 -0
- package/dist/client/assets/umbrella-off-Gx18yBta.js +1 -0
- package/dist/client/assets/underline-y9Fa4Gih.js +1 -0
- package/dist/client/assets/undo-2-BDfptxd_.js +1 -0
- package/dist/client/assets/undo-SfwKERnH.js +1 -0
- package/dist/client/assets/undo-dot-BO9U26CS.js +1 -0
- package/dist/client/assets/unfold-horizontal-b8q8uIQq.js +1 -0
- package/dist/client/assets/unfold-vertical-CpQjv3uj.js +1 -0
- package/dist/client/assets/ungroup-i1NeVMgz.js +1 -0
- package/dist/client/assets/university-B4k9crHz.js +1 -0
- package/dist/client/assets/unlink-2-CVmWn5gg.js +1 -0
- package/dist/client/assets/unlink-DXimkNoM.js +1 -0
- package/dist/client/assets/unplug-CdU0fZOj.js +1 -0
- package/dist/client/assets/upload-3avayZyR.js +1 -0
- package/dist/client/assets/usb-jpmJOiJp.js +1 -0
- package/dist/client/assets/use-gesture-react.esm-DvXI19pJ.js +1 -0
- package/dist/client/assets/use-gesture-react.esm-DvXI19pJ.js.br +0 -0
- package/dist/client/assets/use-gesture-react.esm-DvXI19pJ.js.gz +0 -0
- package/dist/client/assets/user-CiBAFw9T.js +1 -0
- package/dist/client/assets/user-check-CHyROB5o.js +1 -0
- package/dist/client/assets/user-cog-Clc7YMFy.js +1 -0
- package/dist/client/assets/user-key-DtAaQk2Z.js +1 -0
- package/dist/client/assets/user-lock-UaFHsvXi.js +1 -0
- package/dist/client/assets/user-minus-CUwyeTdx.js +1 -0
- package/dist/client/assets/user-pen-DZfwtwtb.js +1 -0
- package/dist/client/assets/user-plus-Cu74RFN_.js +1 -0
- package/dist/client/assets/user-round-00I6h_Xf.js +1 -0
- package/dist/client/assets/user-round-check-C7O4CE3l.js +1 -0
- package/dist/client/assets/user-round-cog-BLdaY84A.js +1 -0
- package/dist/client/assets/user-round-key-CKogoC_T.js +1 -0
- package/dist/client/assets/user-round-minus-l23miLOm.js +1 -0
- package/dist/client/assets/user-round-pen-D4GzUPhS.js +1 -0
- package/dist/client/assets/user-round-plus-D1ALvDUk.js +1 -0
- package/dist/client/assets/user-round-search-7tZz8QR6.js +1 -0
- package/dist/client/assets/user-round-x-BgzmNySl.js +1 -0
- package/dist/client/assets/user-search-BZA2my_p.js +1 -0
- package/dist/client/assets/user-star-ni6s4aY1.js +1 -0
- package/dist/client/assets/user-x-DZr18Oyi.js +1 -0
- package/dist/client/assets/users-D4FMIBC_.js +1 -0
- package/dist/client/assets/users-round-nF1F07kn.js +1 -0
- package/dist/client/assets/utensils-crossed--5DDaBaP.js +1 -0
- package/dist/client/assets/utensils-fk6IGT2G.js +1 -0
- package/dist/client/assets/utility-pole-CB-hgmtM.js +1 -0
- package/dist/client/assets/van-CUeaMlgc.js +1 -0
- package/dist/client/assets/variable-CoNt0GrO.js +1 -0
- package/dist/client/assets/vault-BN_l3LDD.js +1 -0
- package/dist/client/assets/vector-square-CmqS99Be.js +1 -0
- package/dist/client/assets/vegan-CKc0XyfS.js +1 -0
- package/dist/client/assets/venetian-mask-BEtCGBdf.js +1 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-Di4x9xqO.js +34 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-Di4x9xqO.js.br +0 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-Di4x9xqO.js.gz +0 -0
- package/dist/client/assets/venus-and-mars-CnUe4wUi.js +1 -0
- package/dist/client/assets/venus-gtUM2l78.js +1 -0
- package/dist/client/assets/vibrate-CVYTex2J.js +1 -0
- package/dist/client/assets/vibrate-off--kZr2Ms4.js +1 -0
- package/dist/client/assets/video-off-CxMWgBlG.js +1 -0
- package/dist/client/assets/videoCompression-Bd2D9ZoI.js +3 -0
- package/dist/client/assets/videoCompression-Bd2D9ZoI.js.br +0 -0
- package/dist/client/assets/videoCompression-Bd2D9ZoI.js.gz +0 -0
- package/dist/client/assets/videotape-D_pnQJGP.js +1 -0
- package/dist/client/assets/view-NLNtMLIw.js +1 -0
- package/dist/client/assets/voicemail-BO6XziRQ.js +1 -0
- package/dist/client/assets/volleyball-BUrahdaE.js +1 -0
- package/dist/client/assets/volume-1-BqvtHFLw.js +1 -0
- package/dist/client/assets/volume-2-CNkNPKYL.js +1 -0
- package/dist/client/assets/volume-WiGMT2Tc.js +1 -0
- package/dist/client/assets/volume-off-BUJkYp_S.js +1 -0
- package/dist/client/assets/volume-x-owc31-sr.js +1 -0
- package/dist/client/assets/vote-nFCLo3BI.js +1 -0
- package/dist/client/assets/wallet-VzUInDIe.js +1 -0
- package/dist/client/assets/wallet-cards-ctsCOm2Q.js +1 -0
- package/dist/client/assets/wallet-minimal-BNX0_HdL.js +1 -0
- package/dist/client/assets/wallpaper-B7qAUnhq.js +1 -0
- package/dist/client/assets/wand-BdRSXGxA.js +1 -0
- package/dist/client/assets/wand-sparkles-BAmBlg2T.js +1 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-Lh3vgkM-.js +78 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-Lh3vgkM-.js.br +0 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-Lh3vgkM-.js.gz +0 -0
- package/dist/client/assets/warehouse-D8T97XnP.js +1 -0
- package/dist/client/assets/washing-machine-ByxgMiJ9.js +1 -0
- package/dist/client/assets/watch-WkGcKVJd.js +1 -0
- package/dist/client/assets/waves-arrow-down-K_WjwE5U.js +1 -0
- package/dist/client/assets/waves-arrow-up-Bq3U8mql.js +1 -0
- package/dist/client/assets/waves-horizontal-B8ulo8F2.js +1 -0
- package/dist/client/assets/waves-ladder-BF3gQuhS.js +1 -0
- package/dist/client/assets/waves-vertical-DIpvDogz.js +1 -0
- package/dist/client/assets/waypoints-BTnBz5L5.js +1 -0
- package/dist/client/assets/webcam-cjEgd9A5.js +1 -0
- package/dist/client/assets/webhook-BX1LH-Hx.js +1 -0
- package/dist/client/assets/webhook-off-nJnPHww-.js +1 -0
- package/dist/client/assets/weight-Dz0Zf8om.js +1 -0
- package/dist/client/assets/weight-tilde-DQS1Lw_V.js +1 -0
- package/dist/client/assets/wheat-LwYuQNvT.js +1 -0
- package/dist/client/assets/wheat-off-xSB5IrCW.js +1 -0
- package/dist/client/assets/whole-word-cIRswonJ.js +1 -0
- package/dist/client/assets/wifi-Cm1m85eo.js +1 -0
- package/dist/client/assets/wifi-cog-tmeSq4_z.js +1 -0
- package/dist/client/assets/wifi-high-BcTX61eB.js +1 -0
- package/dist/client/assets/wifi-low-8TaVIuyk.js +1 -0
- package/dist/client/assets/wifi-pen-zDPcgBCO.js +1 -0
- package/dist/client/assets/wifi-sync-B7gLzDOG.js +1 -0
- package/dist/client/assets/wifi-zero-17y6r1x9.js +1 -0
- package/dist/client/assets/wind-Ck99j7Ph.js +1 -0
- package/dist/client/assets/wind-arrow-down-C-_nCjFB.js +1 -0
- package/dist/client/assets/wine-ag1SQrb9.js +1 -0
- package/dist/client/assets/wine-off-LRXMZl84.js +1 -0
- package/dist/client/assets/workflow-CHzKNmGF.js +1 -0
- package/dist/client/assets/worm-K-9OOhS4.js +1 -0
- package/dist/client/assets/wrench-C4SS7OSx.js +1 -0
- package/dist/client/assets/x-line-top-BE7TWTK1.js +1 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-BIECOORO.js +7 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-BIECOORO.js.br +0 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-BIECOORO.js.gz +0 -0
- package/dist/client/assets/zap-BKmIYPiZ.js +1 -0
- package/dist/client/assets/zap-off-BqzwyJtE.js +1 -0
- package/dist/client/assets/zodiac-aquarius-CROYyhDS.js +1 -0
- package/dist/client/assets/zodiac-aries-CQUXC4YD.js +1 -0
- package/dist/client/assets/zodiac-cancer-DQgL-_iq.js +1 -0
- package/dist/client/assets/zodiac-capricorn-BXecyavc.js +1 -0
- package/dist/client/assets/zodiac-gemini-dHcHWYG0.js +1 -0
- package/dist/client/assets/zodiac-leo-ud1LLqi6.js +1 -0
- package/dist/client/assets/zodiac-libra-LdUYFw9G.js +1 -0
- package/dist/client/assets/zodiac-ophiuchus-D0vEzZ07.js +1 -0
- package/dist/client/assets/zodiac-pisces-D8KOR8pI.js +1 -0
- package/dist/client/assets/zodiac-sagittarius-CndXT7e6.js +1 -0
- package/dist/client/assets/zodiac-scorpio-C6x4ZnU5.js +1 -0
- package/dist/client/assets/zodiac-taurus-DFCZjy0T.js +1 -0
- package/dist/client/assets/zodiac-virgo-r9WlcPHk.js +1 -0
- package/dist/client/assets/zoom-in-B8l7jDPf.js +1 -0
- package/dist/client/assets/zoom-out-DdC5AUvr.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.html.br +0 -0
- package/dist/client/index.html.gz +0 -0
- package/dist/client/sw.js +1 -1
- package/dist/client/sw.js.br +0 -0
- package/dist/client/sw.js.gz +0 -0
- package/dist/server/agent/automationStore.js +9 -16
- package/dist/server/routes/filesystem.js +16 -7
- package/dist/server/shared/dailySchedule.js +38 -0
- package/dist/server/todos/cli.js +6 -4
- package/dist/server/utils/terminalClientAttachment.js +14 -3
- package/dist/server/utils/terminalVersionReplies.js +66 -0
- package/package.json +1 -1
- package/runtime-manifest.json +3 -3
- package/dist/client/assets/AndroidMirrorView-C5WLVHnt.js +0 -3
- package/dist/client/assets/AndroidMirrorView-C5WLVHnt.js.br +0 -0
- package/dist/client/assets/AndroidMirrorView-C5WLVHnt.js.gz +0 -0
- package/dist/client/assets/App-CDx-F7ML.js +0 -188
- package/dist/client/assets/App-CDx-F7ML.js.br +0 -0
- package/dist/client/assets/App-CDx-F7ML.js.gz +0 -0
- package/dist/client/assets/ArchitecturePanel-CJOounLN.js +0 -9
- package/dist/client/assets/ArchitecturePanel-CJOounLN.js.br +0 -0
- package/dist/client/assets/ArchitecturePanel-CJOounLN.js.gz +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-Da1cvSoe.js +0 -2
- package/dist/client/assets/ChangeWalkthroughPanel-Da1cvSoe.js.br +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-Da1cvSoe.js.gz +0 -0
- package/dist/client/assets/ChatChartReference-DM1PDxY9.js +0 -284
- package/dist/client/assets/ChatChartReference-DM1PDxY9.js.br +0 -0
- package/dist/client/assets/ChatChartReference-DM1PDxY9.js.gz +0 -0
- package/dist/client/assets/ChatContextPreview-CWhSp8tC.js +0 -1
- package/dist/client/assets/ChatContextPreview-CWhSp8tC.js.br +0 -0
- package/dist/client/assets/ChatContextPreview-CWhSp8tC.js.gz +0 -0
- package/dist/client/assets/ChatFullContent-DmCyDkGv.js +0 -67
- package/dist/client/assets/ChatFullContent-DmCyDkGv.js.br +0 -0
- package/dist/client/assets/ChatFullContent-DmCyDkGv.js.gz +0 -0
- package/dist/client/assets/ChatRichContent-CltOS2hF.js +0 -2
- package/dist/client/assets/ChatRichContent-CltOS2hF.js.br +0 -0
- package/dist/client/assets/ChatRichContent-CltOS2hF.js.gz +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-DrCu0dy5.js +0 -1
- package/dist/client/assets/ChatVideoPreviewDialog-DrCu0dy5.js.br +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-DrCu0dy5.js.gz +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-hKmxY25K.js +0 -1
- package/dist/client/assets/CollaborationMainWorkspace-hKmxY25K.js.br +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-hKmxY25K.js.gz +0 -0
- package/dist/client/assets/CollaborationTaskContent-6O8cJvgL.js +0 -1
- package/dist/client/assets/ComputerControlView-DDif1VeW.js +0 -6
- package/dist/client/assets/ComputerControlView-DDif1VeW.js.br +0 -0
- package/dist/client/assets/ComputerControlView-DDif1VeW.js.gz +0 -0
- package/dist/client/assets/DagPlayground-BCKML8bF.js +0 -1
- package/dist/client/assets/DagPlayground-BCKML8bF.js.br +0 -0
- package/dist/client/assets/DagPlayground-BCKML8bF.js.gz +0 -0
- package/dist/client/assets/DiffLab-bT0NXd9Z.js +0 -455
- package/dist/client/assets/DiffLab-bT0NXd9Z.js.br +0 -0
- package/dist/client/assets/DiffLab-bT0NXd9Z.js.gz +0 -0
- package/dist/client/assets/DiffReview-CQUX30Y9.js +0 -1
- package/dist/client/assets/DiffReview-CQUX30Y9.js.br +0 -0
- package/dist/client/assets/DiffReview-CQUX30Y9.js.gz +0 -0
- package/dist/client/assets/DiffReviewLab-Bi8cI9PI.js +0 -2
- package/dist/client/assets/DiffReviewLab-Bi8cI9PI.js.br +0 -0
- package/dist/client/assets/DiffReviewLab-Bi8cI9PI.js.gz +0 -0
- package/dist/client/assets/DiffViewer-Dl8y7wBt.js +0 -34
- package/dist/client/assets/DiffViewer-Dl8y7wBt.js.br +0 -0
- package/dist/client/assets/DiffViewer-Dl8y7wBt.js.gz +0 -0
- package/dist/client/assets/GitLoadingSkeleton-cNqWjjY5.js +0 -1
- package/dist/client/assets/GitLoadingSkeleton-cNqWjjY5.js.br +0 -0
- package/dist/client/assets/GitLoadingSkeleton-cNqWjjY5.js.gz +0 -0
- package/dist/client/assets/Markdown--Umt7IBX.js +0 -23
- package/dist/client/assets/Markdown--Umt7IBX.js.br +0 -0
- package/dist/client/assets/Markdown--Umt7IBX.js.gz +0 -0
- package/dist/client/assets/MarkdownPreview-CeygrsS6.js +0 -1
- package/dist/client/assets/MarkdownPreview-CeygrsS6.js.br +0 -0
- package/dist/client/assets/MarkdownPreview-CeygrsS6.js.gz +0 -0
- package/dist/client/assets/ModelPreview-DUW3P2oP.js +0 -4112
- package/dist/client/assets/ModelPreview-DUW3P2oP.js.br +0 -0
- package/dist/client/assets/ModelPreview-DUW3P2oP.js.gz +0 -0
- package/dist/client/assets/RecordingSaveDialog-DOUQwogQ.js +0 -1
- package/dist/client/assets/RecordingSaveDialog-DOUQwogQ.js.br +0 -0
- package/dist/client/assets/RecordingSaveDialog-DOUQwogQ.js.gz +0 -0
- package/dist/client/assets/RightSidebar-BADXYDhc.js +0 -1729
- package/dist/client/assets/RightSidebar-BADXYDhc.js.br +0 -0
- package/dist/client/assets/RightSidebar-BADXYDhc.js.gz +0 -0
- package/dist/client/assets/SessionChatView-Bq53KiR1.js +0 -38
- package/dist/client/assets/SessionChatView-Bq53KiR1.js.br +0 -0
- package/dist/client/assets/SessionChatView-Bq53KiR1.js.gz +0 -0
- package/dist/client/assets/SessionResourceSidebar-B_SWkliu.js +0 -2
- package/dist/client/assets/SessionResourceSidebar-B_SWkliu.js.br +0 -0
- package/dist/client/assets/SessionResourceSidebar-B_SWkliu.js.gz +0 -0
- package/dist/client/assets/TodoWorkspace-u3c0-EjW.js +0 -1
- package/dist/client/assets/TodoWorkspace-u3c0-EjW.js.br +0 -0
- package/dist/client/assets/TodoWorkspace-u3c0-EjW.js.gz +0 -0
- package/dist/client/assets/VideoPreviewPlayer-Zg4jbBjm.js +0 -1
- package/dist/client/assets/VideoPreviewPlayer-Zg4jbBjm.js.br +0 -0
- package/dist/client/assets/VideoPreviewPlayer-Zg4jbBjm.js.gz +0 -0
- package/dist/client/assets/a-arrow-down-BakU3Hbn.js +0 -1
- package/dist/client/assets/a-arrow-up-oi_hHFwU.js +0 -1
- package/dist/client/assets/a-large-small-BxqI6Ukw.js +0 -1
- package/dist/client/assets/abnfDiagram-VCTEODGH-COWNzNpd.js +0 -1
- package/dist/client/assets/abnfDiagram-VCTEODGH-COWNzNpd.js.br +0 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-COWNzNpd.js.gz +0 -0
- package/dist/client/assets/accessibility-ClNcriBW.js +0 -1
- package/dist/client/assets/activity-DdZ0i-3A.js +0 -1
- package/dist/client/assets/air-vent-CwuDWC9K.js +0 -1
- package/dist/client/assets/airplay-DPGzT8dZ.js +0 -1
- package/dist/client/assets/alarm-clock-DP7NFUTT.js +0 -1
- package/dist/client/assets/alarm-clock-check-BmionpFO.js +0 -1
- package/dist/client/assets/alarm-clock-minus-3myKCaV9.js +0 -1
- package/dist/client/assets/alarm-clock-off-B0FfhVL8.js +0 -1
- package/dist/client/assets/alarm-clock-plus-TyfivRVN.js +0 -1
- package/dist/client/assets/alarm-smoke-BepWynFy.js +0 -1
- package/dist/client/assets/album-DFpX29RQ.js +0 -1
- package/dist/client/assets/align-center-horizontal-Do-t8IDZ.js +0 -1
- package/dist/client/assets/align-center-vertical-BmODP4B3.js +0 -1
- package/dist/client/assets/align-end-horizontal-B9fpmglW.js +0 -1
- package/dist/client/assets/align-end-vertical-CoPLBaqJ.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-center-p5wUJyHO.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-end-CjzXWVT5.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-start-AmPWmb6R.js +0 -1
- package/dist/client/assets/align-horizontal-justify-center-ChzGYw5l.js +0 -1
- package/dist/client/assets/align-horizontal-justify-end-DucBcXEA.js +0 -1
- package/dist/client/assets/align-horizontal-justify-start-ByBaD-9d.js +0 -1
- package/dist/client/assets/align-horizontal-space-around-LqunJyrN.js +0 -1
- package/dist/client/assets/align-horizontal-space-between-y2kV9AZV.js +0 -1
- package/dist/client/assets/align-start-horizontal-CEXaLm4h.js +0 -1
- package/dist/client/assets/align-start-vertical-BoJcwV4E.js +0 -1
- package/dist/client/assets/align-vertical-distribute-center-B3u7-Eh4.js +0 -1
- package/dist/client/assets/align-vertical-distribute-end-DlRmDWS7.js +0 -1
- package/dist/client/assets/align-vertical-distribute-start-Cjx7cQ1w.js +0 -1
- package/dist/client/assets/align-vertical-justify-center-CnJ-ykOn.js +0 -1
- package/dist/client/assets/align-vertical-justify-end-BhDTJRZd.js +0 -1
- package/dist/client/assets/align-vertical-justify-start-DvFjqGwy.js +0 -1
- package/dist/client/assets/align-vertical-space-around-D2ukHRAg.js +0 -1
- package/dist/client/assets/align-vertical-space-between-DmlF9iRE.js +0 -1
- package/dist/client/assets/ambulance-DioTIkc5.js +0 -1
- package/dist/client/assets/ampersand-DU8HcoR3.js +0 -1
- package/dist/client/assets/ampersands-6uvbHLId.js +0 -1
- package/dist/client/assets/amphora-C69d6cnT.js +0 -1
- package/dist/client/assets/anchor-DgF4Vy0W.js +0 -1
- package/dist/client/assets/angry-B11nj2Ks.js +0 -1
- package/dist/client/assets/annoyed-BR374Qpd.js +0 -1
- package/dist/client/assets/antenna-D45lrjBO.js +0 -1
- package/dist/client/assets/anvil-BtZu4KG2.js +0 -1
- package/dist/client/assets/aperture-CtgKAKqD.js +0 -1
- package/dist/client/assets/app-DqLFb1id.js +0 -37
- package/dist/client/assets/app-DqLFb1id.js.br +0 -0
- package/dist/client/assets/app-DqLFb1id.js.gz +0 -0
- package/dist/client/assets/app-window-Bo-TVsV-.js +0 -1
- package/dist/client/assets/app-window-mac-CYPvmuo2.js +0 -1
- package/dist/client/assets/apple-DH2hiZC-.js +0 -1
- package/dist/client/assets/architectureDiagram-5GKGNRK7-DkIRd48E.js +0 -36
- package/dist/client/assets/architectureDiagram-5GKGNRK7-DkIRd48E.js.br +0 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-DkIRd48E.js.gz +0 -0
- package/dist/client/assets/archive-BJRc5TX-.js +0 -1
- package/dist/client/assets/archive-restore-DXJYKSfy.js +0 -1
- package/dist/client/assets/archive-x-BXkFgz2i.js +0 -1
- package/dist/client/assets/armchair-Fxh7p0VH.js +0 -1
- package/dist/client/assets/arrow-big-down-D_kDdBFq.js +0 -1
- package/dist/client/assets/arrow-big-down-dash-Kk4NAkg_.js +0 -1
- package/dist/client/assets/arrow-big-left-DGvBapUV.js +0 -1
- package/dist/client/assets/arrow-big-left-dash-D85-8lPn.js +0 -1
- package/dist/client/assets/arrow-big-right-C1bT5yj2.js +0 -1
- package/dist/client/assets/arrow-big-right-dash-BtF_6Ly0.js +0 -1
- package/dist/client/assets/arrow-big-up-DJQTWWR2.js +0 -1
- package/dist/client/assets/arrow-big-up-dash-lCv-emZH.js +0 -1
- package/dist/client/assets/arrow-down-0-1-KcMAUqAp.js +0 -1
- package/dist/client/assets/arrow-down-1-0-Ygl0Yptk.js +0 -1
- package/dist/client/assets/arrow-down-BODCyJ9q.js +0 -1
- package/dist/client/assets/arrow-down-from-line-40O4TMiX.js +0 -1
- package/dist/client/assets/arrow-down-left-DA2Xz_X9.js +0 -1
- package/dist/client/assets/arrow-down-narrow-wide-Q7TSDss_.js +0 -1
- package/dist/client/assets/arrow-down-right-Drrf24WR.js +0 -1
- package/dist/client/assets/arrow-down-to-dot-fqNjxmzn.js +0 -1
- package/dist/client/assets/arrow-down-to-line-Bx2Sy2gA.js +0 -1
- package/dist/client/assets/arrow-down-up-BAs0r5TF.js +0 -1
- package/dist/client/assets/arrow-down-wide-narrow-C8DE5pxa.js +0 -1
- package/dist/client/assets/arrow-down-z-a-DolOZ6z4.js +0 -1
- package/dist/client/assets/arrow-left-from-line-CBcI_Z6X.js +0 -1
- package/dist/client/assets/arrow-left-right-B2MsxjYw.js +0 -1
- package/dist/client/assets/arrow-left-to-line-CDU3H_2n.js +0 -1
- package/dist/client/assets/arrow-right-from-line-ctdztYmf.js +0 -1
- package/dist/client/assets/arrow-right-left-Bj0Dj8I7.js +0 -1
- package/dist/client/assets/arrow-right-to-line-MJlQ9xvh.js +0 -1
- package/dist/client/assets/arrow-up-0-1-FZrRsgTE.js +0 -1
- package/dist/client/assets/arrow-up-1-0-BYmoLiBD.js +0 -1
- package/dist/client/assets/arrow-up-a-z-B8X9wpVJ.js +0 -1
- package/dist/client/assets/arrow-up-down-i-uDbT5P.js +0 -1
- package/dist/client/assets/arrow-up-from-dot-BTML5H4S.js +0 -1
- package/dist/client/assets/arrow-up-from-line-C3DwN0n9.js +0 -1
- package/dist/client/assets/arrow-up-left-CKg9iO43.js +0 -1
- package/dist/client/assets/arrow-up-narrow-wide-BDHufm1w.js +0 -1
- package/dist/client/assets/arrow-up-to-line-Db8VwZoA.js +0 -1
- package/dist/client/assets/arrow-up-wide-narrow-CUjwnQe-.js +0 -1
- package/dist/client/assets/arrow-up-z-a-BKtySbEn.js +0 -1
- package/dist/client/assets/arrows-up-from-line-DqhkTmpe.js +0 -1
- package/dist/client/assets/asterisk-BM4K8M__.js +0 -1
- package/dist/client/assets/astroid-_MO3nU37.js +0 -1
- package/dist/client/assets/atom-Bx84RpIR.js +0 -1
- package/dist/client/assets/audio-lines-JmfFd9Yo.js +0 -1
- package/dist/client/assets/audio-waveform-CEF41Tuz.js +0 -1
- package/dist/client/assets/award-B5JE2cgG.js +0 -1
- package/dist/client/assets/axe-CLk63AEX.js +0 -1
- package/dist/client/assets/axis-3d-CbgHIPuK.js +0 -1
- package/dist/client/assets/baby-ztL7MYj3.js +0 -1
- package/dist/client/assets/backpack-Cn7PDV5b.js +0 -1
- package/dist/client/assets/badge-CJ1rmeYT.js +0 -1
- package/dist/client/assets/badge-alert-B7gYOcKU.js +0 -1
- package/dist/client/assets/badge-cent-h5nDbAbb.js +0 -1
- package/dist/client/assets/badge-check-CycwDben.js +0 -1
- package/dist/client/assets/badge-dollar-sign-2BeLcIss.js +0 -1
- package/dist/client/assets/badge-euro-xOy5x3WN.js +0 -1
- package/dist/client/assets/badge-indian-rupee-BGz0jiUe.js +0 -1
- package/dist/client/assets/badge-info-CHjTdxy5.js +0 -1
- package/dist/client/assets/badge-japanese-yen-DspfRlNd.js +0 -1
- package/dist/client/assets/badge-minus-BcWoCP1o.js +0 -1
- package/dist/client/assets/badge-percent-Cx1BtGRu.js +0 -1
- package/dist/client/assets/badge-plus-DxJK-euz.js +0 -1
- package/dist/client/assets/badge-pound-sterling-5jCplgqW.js +0 -1
- package/dist/client/assets/badge-question-mark-CYCI1heF.js +0 -1
- package/dist/client/assets/badge-russian-ruble-DjYN7ovQ.js +0 -1
- package/dist/client/assets/badge-swiss-franc-C8SiEirv.js +0 -1
- package/dist/client/assets/badge-turkish-lira-CZ9Klv-d.js +0 -1
- package/dist/client/assets/badge-x-Ctq5Qg2A.js +0 -1
- package/dist/client/assets/baggage-claim-Cp3hfdKp.js +0 -1
- package/dist/client/assets/balloon-CAP6ELFP.js +0 -1
- package/dist/client/assets/ban-qSnPJIw6.js +0 -1
- package/dist/client/assets/banana-DKJW12K0.js +0 -1
- package/dist/client/assets/bandage-BV12TB-e.js +0 -1
- package/dist/client/assets/banknote-DhD6xviv.js +0 -1
- package/dist/client/assets/banknote-arrow-down--a17mmPo.js +0 -1
- package/dist/client/assets/banknote-arrow-up-2uu0qbac.js +0 -1
- package/dist/client/assets/banknote-x-ClCwC8t3.js +0 -1
- package/dist/client/assets/barcode-BhuAAZWu.js +0 -1
- package/dist/client/assets/barrel-CELHYjHv.js +0 -1
- package/dist/client/assets/baseline-Cafmz728.js +0 -1
- package/dist/client/assets/bath-CH-S1pYf.js +0 -1
- package/dist/client/assets/battery-E1-6N8cb.js +0 -1
- package/dist/client/assets/battery-charging-CB0TcCZX.js +0 -1
- package/dist/client/assets/battery-full-CCemSJO0.js +0 -1
- package/dist/client/assets/battery-low-CVAczajR.js +0 -1
- package/dist/client/assets/battery-medium-BywxIrFC.js +0 -1
- package/dist/client/assets/battery-plus-BoUTZAPH.js +0 -1
- package/dist/client/assets/battery-warning-s-NinSrm.js +0 -1
- package/dist/client/assets/beaker-liexkoWV.js +0 -1
- package/dist/client/assets/bean-Di05IMQa.js +0 -1
- package/dist/client/assets/bean-off-By1muZig.js +0 -1
- package/dist/client/assets/bed-CRRjeQAG.js +0 -1
- package/dist/client/assets/bed-double-DSyRwrIZ.js +0 -1
- package/dist/client/assets/bed-single-Dp31WDVP.js +0 -1
- package/dist/client/assets/beef-CnJtSaPj.js +0 -1
- package/dist/client/assets/beef-off-BYdT7V05.js +0 -1
- package/dist/client/assets/beer-OywjOomb.js +0 -1
- package/dist/client/assets/beer-off-D23IIoqL.js +0 -1
- package/dist/client/assets/bell-BR0B11qI.js +0 -1
- package/dist/client/assets/bell-check-Dc7UtzvP.js +0 -1
- package/dist/client/assets/bell-electric-CyiS6Dko.js +0 -1
- package/dist/client/assets/bell-minus-DNwwDrrM.js +0 -1
- package/dist/client/assets/bell-off-21KsVuA8.js +0 -1
- package/dist/client/assets/bell-plus-Df9b5bXY.js +0 -1
- package/dist/client/assets/bell-ring--B5w6JNY.js +0 -1
- package/dist/client/assets/between-horizontal-end-DjVrm-tP.js +0 -1
- package/dist/client/assets/between-horizontal-start-mPrl49Su.js +0 -1
- package/dist/client/assets/between-vertical-end-DXbyVHIT.js +0 -1
- package/dist/client/assets/between-vertical-start-nhHcL6JH.js +0 -1
- package/dist/client/assets/biceps-flexed-BfGyfKhE.js +0 -1
- package/dist/client/assets/bike-Dt5dOlk5.js +0 -1
- package/dist/client/assets/binary-CHKltDTX.js +0 -1
- package/dist/client/assets/binoculars-DW8HnMeY.js +0 -1
- package/dist/client/assets/biohazard-BLQt_HRC.js +0 -1
- package/dist/client/assets/bird-C3_5x6vR.js +0 -1
- package/dist/client/assets/birdhouse-DIxPXG3e.js +0 -1
- package/dist/client/assets/bitcoin-DMlZtL9O.js +0 -1
- package/dist/client/assets/blend-BxoQWGN-.js +0 -1
- package/dist/client/assets/blender-CQZZTJuX.js +0 -1
- package/dist/client/assets/blinds-Op77t8aq.js +0 -1
- package/dist/client/assets/blockDiagram-I7D4REHJ-BHjUpyrC.js +0 -129
- package/dist/client/assets/blockDiagram-I7D4REHJ-BHjUpyrC.js.br +0 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-BHjUpyrC.js.gz +0 -0
- package/dist/client/assets/blocks-BVb24U08.js +0 -1
- package/dist/client/assets/bluetooth-connected-r5lr4x-o.js +0 -1
- package/dist/client/assets/bluetooth-kpiFzvIQ.js +0 -1
- package/dist/client/assets/bluetooth-off-B5pTVSi_.js +0 -1
- package/dist/client/assets/bluetooth-searching-Bqoe9YcM.js +0 -1
- package/dist/client/assets/bold-CkJMQ2B-.js +0 -1
- package/dist/client/assets/bolt-CX4yrEFM.js +0 -1
- package/dist/client/assets/bomb-CGQTxUV7.js +0 -1
- package/dist/client/assets/bone-MJhgQeij.js +0 -1
- package/dist/client/assets/book-C-Z176bB.js +0 -1
- package/dist/client/assets/book-a-DRQxwZi9.js +0 -1
- package/dist/client/assets/book-alert-DIYma2t3.js +0 -1
- package/dist/client/assets/book-audio-DA9zxDqv.js +0 -1
- package/dist/client/assets/book-check-BG0q-LFz.js +0 -1
- package/dist/client/assets/book-copy-BxTOv5vo.js +0 -1
- package/dist/client/assets/book-dashed-BkMMXxJW.js +0 -1
- package/dist/client/assets/book-down--xW2rIHR.js +0 -1
- package/dist/client/assets/book-headphones-CpLWsKWp.js +0 -1
- package/dist/client/assets/book-heart-DwJuHT74.js +0 -1
- package/dist/client/assets/book-image-CtSgbzJD.js +0 -1
- package/dist/client/assets/book-key-K4lSBzOP.js +0 -1
- package/dist/client/assets/book-lock-vwJBQDjr.js +0 -1
- package/dist/client/assets/book-marked-IWPd0hmm.js +0 -1
- package/dist/client/assets/book-minus-C2jFXXfL.js +0 -1
- package/dist/client/assets/book-open-B-yl3rHM.js +0 -1
- package/dist/client/assets/book-open-check-9bn5Y4DR.js +0 -1
- package/dist/client/assets/book-open-text-C5T0WEEU.js +0 -1
- package/dist/client/assets/book-plus-DTdUpW2t.js +0 -1
- package/dist/client/assets/book-search-CLe3S5Tk.js +0 -1
- package/dist/client/assets/book-text-D5-y_P_E.js +0 -1
- package/dist/client/assets/book-type-D_cJ1IUy.js +0 -1
- package/dist/client/assets/book-up-1y6x7QdZ.js +0 -1
- package/dist/client/assets/book-up-2-DULgE1Qu.js +0 -1
- package/dist/client/assets/book-user-CZvQIjYr.js +0 -1
- package/dist/client/assets/book-x-Cx_J3k8L.js +0 -1
- package/dist/client/assets/bookmark-check-Degxprq4.js +0 -1
- package/dist/client/assets/bookmark-eOA5jZMF.js +0 -1
- package/dist/client/assets/bookmark-minus-DwMBmq59.js +0 -1
- package/dist/client/assets/bookmark-off-pMklikQr.js +0 -1
- package/dist/client/assets/bookmark-plus-B1Daadlo.js +0 -1
- package/dist/client/assets/bookmark-x-CRZHt66_.js +0 -1
- package/dist/client/assets/boom-box-Jt9FlfOy.js +0 -1
- package/dist/client/assets/bot-message-square-BxB9v_2W.js +0 -1
- package/dist/client/assets/bot-off-CfwF7C3g.js +0 -1
- package/dist/client/assets/bottle-wine-CBnYobQg.js +0 -1
- package/dist/client/assets/bow-arrow-CihTzxVl.js +0 -1
- package/dist/client/assets/boxes-Dk-oqe6L.js +0 -1
- package/dist/client/assets/braces-CRwqpcnc.js +0 -1
- package/dist/client/assets/brackets-DQjfv-pd.js +0 -1
- package/dist/client/assets/brain-circuit-9Wr0RF1G.js +0 -1
- package/dist/client/assets/brain-cog-CQa1UGD4.js +0 -1
- package/dist/client/assets/brain-cog-CQa1UGD4.js.br +0 -0
- package/dist/client/assets/brain-cog-CQa1UGD4.js.gz +0 -0
- package/dist/client/assets/brain-vNTTdhXh.js +0 -1
- package/dist/client/assets/brick-wall-L8sA07gt.js +0 -1
- package/dist/client/assets/brick-wall-fire-BDbIG57s.js +0 -1
- package/dist/client/assets/brick-wall-shield-DF6w4p3f.js +0 -1
- package/dist/client/assets/briefcase-business-DGQ1oUfG.js +0 -1
- package/dist/client/assets/briefcase-conveyor-belt-CcBOy1MC.js +0 -1
- package/dist/client/assets/briefcase-medical-Cndxb-6E.js +0 -1
- package/dist/client/assets/bring-to-front-DDxxxL54.js +0 -1
- package/dist/client/assets/broccoli-DBYbpNzF.js +0 -1
- package/dist/client/assets/brush-cleaning-bQpHpsKx.js +0 -1
- package/dist/client/assets/brush-oXfL-mHY.js +0 -1
- package/dist/client/assets/bubbles-jvplykbD.js +0 -1
- package/dist/client/assets/bug-DMIiL2OJ.js +0 -1
- package/dist/client/assets/bug-off-Dm2jFiu1.js +0 -1
- package/dist/client/assets/bug-play-Bm8Swf-C.js +0 -1
- package/dist/client/assets/building-2-BcHF3Zdj.js +0 -1
- package/dist/client/assets/building-RPdm03M5.js +0 -1
- package/dist/client/assets/bus-front-D-EQLHA_.js +0 -1
- package/dist/client/assets/bus-ibnWvzA-.js +0 -1
- package/dist/client/assets/c4Diagram-7LVT6UL2-rYkLXDS-.js +0 -38
- package/dist/client/assets/c4Diagram-7LVT6UL2-rYkLXDS-.js.br +0 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-rYkLXDS-.js.gz +0 -0
- package/dist/client/assets/cable-CqH_T1G9.js +0 -1
- package/dist/client/assets/cable-car-Cgg7h-y3.js +0 -1
- package/dist/client/assets/cake-rLhpoNxI.js +0 -1
- package/dist/client/assets/cake-slice-BbQZcwFi.js +0 -1
- package/dist/client/assets/calculator-BrDidW2H.js +0 -1
- package/dist/client/assets/calendar-1-D4o5rf3D.js +0 -1
- package/dist/client/assets/calendar-ClzusWmj.js +0 -1
- package/dist/client/assets/calendar-arrow-down-RW5VB9xN.js +0 -1
- package/dist/client/assets/calendar-arrow-up-BIZBBc3y.js +0 -1
- package/dist/client/assets/calendar-check-2-B2QKn7ug.js +0 -1
- package/dist/client/assets/calendar-check-CdDFeezC.js +0 -1
- package/dist/client/assets/calendar-clock-XUluoxZH.js +0 -1
- package/dist/client/assets/calendar-cog-CCtkl0h6.js +0 -1
- package/dist/client/assets/calendar-days-B3o8Zpwl.js +0 -1
- package/dist/client/assets/calendar-fold-CwnErc8I.js +0 -1
- package/dist/client/assets/calendar-heart--zfRV6Vg.js +0 -1
- package/dist/client/assets/calendar-minus-2-BW7JbP60.js +0 -1
- package/dist/client/assets/calendar-minus-4ssbf0oA.js +0 -1
- package/dist/client/assets/calendar-off-CvFXL_Uk.js +0 -1
- package/dist/client/assets/calendar-plus-2-CT4yiUyY.js +0 -1
- package/dist/client/assets/calendar-plus-CEXH_Fy5.js +0 -1
- package/dist/client/assets/calendar-range-6DF7djg2.js +0 -1
- package/dist/client/assets/calendar-search-DrLV2mht.js +0 -1
- package/dist/client/assets/calendar-sync-Brx18bIc.js +0 -1
- package/dist/client/assets/calendar-x-2-N4yOaH_H.js +0 -1
- package/dist/client/assets/calendar-x-CtUGmCWd.js +0 -1
- package/dist/client/assets/calendars-DjCS29CA.js +0 -1
- package/dist/client/assets/camera-CRMlFDW4.js +0 -1
- package/dist/client/assets/camera-off-s8pbpFak.js +0 -1
- package/dist/client/assets/candy-C3YIoa0u.js +0 -1
- package/dist/client/assets/candy-cane-BEsF1X2o.js +0 -1
- package/dist/client/assets/candy-off-HKvqySyE.js +0 -1
- package/dist/client/assets/cannabis-BHnuTa64.js +0 -1
- package/dist/client/assets/cannabis-off-Dvl9rgyS.js +0 -1
- package/dist/client/assets/captions-CaIvmrr3.js +0 -1
- package/dist/client/assets/captions-off-CcappQ5h.js +0 -1
- package/dist/client/assets/car-BKdF-ddG.js +0 -1
- package/dist/client/assets/car-front-BgKAIJf-.js +0 -1
- package/dist/client/assets/car-taxi-front-bdbZdsMf.js +0 -1
- package/dist/client/assets/caravan-CcCavWur.js +0 -1
- package/dist/client/assets/card-sim-cR_OJ26H.js +0 -1
- package/dist/client/assets/carrot-DQkaktPU.js +0 -1
- package/dist/client/assets/case-lower-RHNKTAOv.js +0 -1
- package/dist/client/assets/case-sensitive-DcrwXecy.js +0 -1
- package/dist/client/assets/case-upper-7bxnc2cF.js +0 -1
- package/dist/client/assets/cassette-tape-DuSxWkpE.js +0 -1
- package/dist/client/assets/cast-Bju4pzFW.js +0 -1
- package/dist/client/assets/castle-DORCFsQ_.js +0 -1
- package/dist/client/assets/cat-tK7OcC3e.js +0 -1
- package/dist/client/assets/cctv-DkZ5nSZf.js +0 -1
- package/dist/client/assets/cctv-off-CJihnP5w.js +0 -1
- package/dist/client/assets/channel-DcNYf08P.js +0 -1
- package/dist/client/assets/chart-area-CYLKj3Md.js +0 -1
- package/dist/client/assets/chart-bar-CAMNv-91.js +0 -1
- package/dist/client/assets/chart-bar-big-BBoY0qs0.js +0 -1
- package/dist/client/assets/chart-bar-decreasing-6nCZRuIW.js +0 -1
- package/dist/client/assets/chart-bar-increasing-D5FmkSiZ.js +0 -1
- package/dist/client/assets/chart-bar-stacked-FZz4-Usz.js +0 -1
- package/dist/client/assets/chart-candlestick-BFnJqtzS.js +0 -1
- package/dist/client/assets/chart-column-CjPI4vUQ.js +0 -1
- package/dist/client/assets/chart-column-big-N7MqBZBq.js +0 -1
- package/dist/client/assets/chart-column-decreasing-BVACLAu-.js +0 -1
- package/dist/client/assets/chart-column-increasing-Dm8qt31w.js +0 -1
- package/dist/client/assets/chart-column-stacked-D3fhjIFR.js +0 -1
- package/dist/client/assets/chart-gantt-BI_TC1oc.js +0 -1
- package/dist/client/assets/chart-line-DgdCKUJH.js +0 -1
- package/dist/client/assets/chart-network-VzxYo-Cp.js +0 -1
- package/dist/client/assets/chart-no-axes-column-DS0pHdV-.js +0 -1
- package/dist/client/assets/chart-no-axes-column-decreasing-Tl51tml6.js +0 -1
- package/dist/client/assets/chart-no-axes-column-increasing-FeG3RUMs.js +0 -1
- package/dist/client/assets/chart-no-axes-combined-C9bB11zM.js +0 -1
- package/dist/client/assets/chart-no-axes-gantt-T8gPfv5I.js +0 -1
- package/dist/client/assets/chart-pie-BGThNOhc.js +0 -1
- package/dist/client/assets/chart-scatter-DcF-r0Go.js +0 -1
- package/dist/client/assets/chart-spline-CduNeC13.js +0 -1
- package/dist/client/assets/check-check-CZoBfNYV.js +0 -1
- package/dist/client/assets/check-line-B1JGuL0e.js +0 -1
- package/dist/client/assets/chef-hat-CY4iaFeJ.js +0 -1
- package/dist/client/assets/cherry-CxTLgxAP.js +0 -1
- package/dist/client/assets/chess-bishop-DuG2bXBt.js +0 -1
- package/dist/client/assets/chess-king-rMne1plE.js +0 -1
- package/dist/client/assets/chess-knight-janbqdLV.js +0 -1
- package/dist/client/assets/chess-pawn-MY-rihcE.js +0 -1
- package/dist/client/assets/chess-queen-BecVA-HR.js +0 -1
- package/dist/client/assets/chess-rook-cjl4STs7.js +0 -1
- package/dist/client/assets/chevron-first-D3Tgdm2g.js +0 -1
- package/dist/client/assets/chevron-last-jt55AdPu.js +0 -1
- package/dist/client/assets/chevron-left-Cidkancp.js +0 -1
- package/dist/client/assets/chevrons-down-D9EW8rHy.js +0 -1
- package/dist/client/assets/chevrons-down-up-BEZsaVgt.js +0 -1
- package/dist/client/assets/chevrons-left-Fwh6U0iA.js +0 -1
- package/dist/client/assets/chevrons-left-right-BkSWU7Nu.js +0 -1
- package/dist/client/assets/chevrons-left-right-ellipsis-7uT-S1sm.js +0 -1
- package/dist/client/assets/chevrons-right-XWsl3aRv.js +0 -1
- package/dist/client/assets/chevrons-right-left-CVCeWTFC.js +0 -1
- package/dist/client/assets/chevrons-up-BPEVhBm2.js +0 -1
- package/dist/client/assets/chevrons-up-down-BW46Jiwa.js +0 -1
- package/dist/client/assets/chunk-2Q5K7J3B-7upH-6uk.js +0 -1
- package/dist/client/assets/chunk-5VM5RSS4-Bc9SzAvF.js +0 -15
- package/dist/client/assets/chunk-F27PBJKO-CpXeO1aG.js +0 -1
- package/dist/client/assets/chunk-F27PBJKO-CpXeO1aG.js.br +0 -0
- package/dist/client/assets/chunk-F27PBJKO-CpXeO1aG.js.gz +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-B9fZqAgp.js +0 -231
- package/dist/client/assets/chunk-IMKFNOWR-B9fZqAgp.js.br +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-B9fZqAgp.js.gz +0 -0
- package/dist/client/assets/chunk-JWPE2WC7-BQEUagrJ.js +0 -1
- package/dist/client/assets/chunk-POPQ4Y6H-BdKgyDk2.js +0 -1
- package/dist/client/assets/chunk-SVP7TREG-CkXc6wDv.js +0 -88
- package/dist/client/assets/chunk-SVP7TREG-CkXc6wDv.js.br +0 -0
- package/dist/client/assets/chunk-SVP7TREG-CkXc6wDv.js.gz +0 -0
- package/dist/client/assets/chunk-TICWLB2K-BC_KaGiX.js +0 -206
- package/dist/client/assets/chunk-TICWLB2K-BC_KaGiX.js.br +0 -0
- package/dist/client/assets/chunk-TICWLB2K-BC_KaGiX.js.gz +0 -0
- package/dist/client/assets/chunk-XXDRQBXY-CxJUHvac.js +0 -1
- package/dist/client/assets/church-CICrGjdZ.js +0 -1
- package/dist/client/assets/cigarette-off-CZSR52fN.js +0 -1
- package/dist/client/assets/cigarette-oxm9X_pj.js +0 -1
- package/dist/client/assets/circle-CJr2DETy.js +0 -1
- package/dist/client/assets/circle-arrow-down-BAZw7RZL.js +0 -1
- package/dist/client/assets/circle-arrow-left-BR6uF8vl.js +0 -1
- package/dist/client/assets/circle-arrow-out-down-left-BTB_CxCG.js +0 -1
- package/dist/client/assets/circle-arrow-out-down-right-BgPR0Ha-.js +0 -1
- package/dist/client/assets/circle-arrow-out-up-left-BUgqwMju.js +0 -1
- package/dist/client/assets/circle-arrow-out-up-right-B5Gqz34Z.js +0 -1
- package/dist/client/assets/circle-arrow-right-Drz_6-9C.js +0 -1
- package/dist/client/assets/circle-arrow-up-DL1bt-5K.js +0 -1
- package/dist/client/assets/circle-check-big-BEKG94eC.js +0 -1
- package/dist/client/assets/circle-chevron-down-DF5X0UtU.js +0 -1
- package/dist/client/assets/circle-chevron-left-DQLKiq-U.js +0 -1
- package/dist/client/assets/circle-chevron-right-3kmrpO0Y.js +0 -1
- package/dist/client/assets/circle-chevron-up-Bo2tmQko.js +0 -1
- package/dist/client/assets/circle-dashed-CSgd9Aj5.js +0 -1
- package/dist/client/assets/circle-divide-BSY-s-Qc.js +0 -1
- package/dist/client/assets/circle-dollar-sign-3ZbQLmaW.js +0 -1
- package/dist/client/assets/circle-dot-dashed-CQlmmr3S.js +0 -1
- package/dist/client/assets/circle-dot-dp4cL2cg.js +0 -1
- package/dist/client/assets/circle-ellipsis-CmJWBCRY.js +0 -1
- package/dist/client/assets/circle-equal-C7PAAyAQ.js +0 -1
- package/dist/client/assets/circle-fading-arrow-up-zKyNt9sb.js +0 -1
- package/dist/client/assets/circle-fading-plus-CZKNu34f.js +0 -1
- package/dist/client/assets/circle-gauge-BENvDWRt.js +0 -1
- package/dist/client/assets/circle-minus-C9fCJaiN.js +0 -1
- package/dist/client/assets/circle-off-lmYqyPQ_.js +0 -1
- package/dist/client/assets/circle-parking-DVrXGTtJ.js +0 -1
- package/dist/client/assets/circle-parking-off-Dr8BvYwU.js +0 -1
- package/dist/client/assets/circle-pause-CxErfawN.js +0 -1
- package/dist/client/assets/circle-percent-CC55cs5w.js +0 -1
- package/dist/client/assets/circle-pile-B10MS-3P.js +0 -1
- package/dist/client/assets/circle-play-Be-nI6Wn.js +0 -1
- package/dist/client/assets/circle-plus-_cjykpEa.js +0 -1
- package/dist/client/assets/circle-pound-sterling-C_h885K2.js +0 -1
- package/dist/client/assets/circle-power-Bd5Qs5BM.js +0 -1
- package/dist/client/assets/circle-question-mark-CR3MLuk5.js +0 -1
- package/dist/client/assets/circle-slash-2-54SM4oVB.js +0 -1
- package/dist/client/assets/circle-slash-M4G8vrlC.js +0 -1
- package/dist/client/assets/circle-small-BnsRtZEv.js +0 -1
- package/dist/client/assets/circle-star-BBKoolo-.js +0 -1
- package/dist/client/assets/circle-stop-DqN0lLj-.js +0 -1
- package/dist/client/assets/circle-user-ClIrcnXZ.js +0 -1
- package/dist/client/assets/circle-user-round-DbPT-S2h.js +0 -1
- package/dist/client/assets/circle-x-Cax94HOP.js +0 -1
- package/dist/client/assets/circuit-board-DcpyNjqC.js +0 -1
- package/dist/client/assets/citrus-Uj0F1DMc.js +0 -1
- package/dist/client/assets/clapperboard-DlashMh7.js +0 -1
- package/dist/client/assets/classDiagram-ZZMXUADV-BCBVHuSg.js +0 -1
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BCBVHuSg.js +0 -1
- package/dist/client/assets/clipboard-ChA0PKBW.js +0 -1
- package/dist/client/assets/clipboard-check-DLxtNQ2b.js +0 -1
- package/dist/client/assets/clipboard-clock-DQdvUX2t.js +0 -1
- package/dist/client/assets/clipboard-copy-DuG3Mjr6.js +0 -1
- package/dist/client/assets/clipboard-list-wlGNer7w.js +0 -1
- package/dist/client/assets/clipboard-minus-AAFWWgYq.js +0 -1
- package/dist/client/assets/clipboard-paste-h6Py8pGL.js +0 -1
- package/dist/client/assets/clipboard-pen-dM0bX82y.js +0 -1
- package/dist/client/assets/clipboard-pen-line-C7_DOQRK.js +0 -1
- package/dist/client/assets/clipboard-plus-DF7rNRpF.js +0 -1
- package/dist/client/assets/clipboard-type-B0Xb37G7.js +0 -1
- package/dist/client/assets/clipboard-x-D0iJ9TaN.js +0 -1
- package/dist/client/assets/clock-1-DB8_jW0Z.js +0 -1
- package/dist/client/assets/clock-10-YSZz5oRI.js +0 -1
- package/dist/client/assets/clock-11-DMPlOAtJ.js +0 -1
- package/dist/client/assets/clock-12-Bf7X6Tzp.js +0 -1
- package/dist/client/assets/clock-2-qWFA-dNt.js +0 -1
- package/dist/client/assets/clock-4-_ulUWtLN.js +0 -1
- package/dist/client/assets/clock-5-hSrfrDy0.js +0 -1
- package/dist/client/assets/clock-6-z_TRtYGj.js +0 -1
- package/dist/client/assets/clock-7-CjndoWkp.js +0 -1
- package/dist/client/assets/clock-8-CqLjOduE.js +0 -1
- package/dist/client/assets/clock-9-C7bruSAb.js +0 -1
- package/dist/client/assets/clock-WOG_aGhV.js +0 -1
- package/dist/client/assets/clock-alert-BpQ4z0JJ.js +0 -1
- package/dist/client/assets/clock-arrow-down-JvVKzFHk.js +0 -1
- package/dist/client/assets/clock-arrow-up-BoWrMjf-.js +0 -1
- package/dist/client/assets/clock-check-DE-WvXCl.js +0 -1
- package/dist/client/assets/clock-fading-BHIctYvj.js +0 -1
- package/dist/client/assets/clock-plus-BFixSkAx.js +0 -1
- package/dist/client/assets/closed-caption-D-EWTTcL.js +0 -1
- package/dist/client/assets/cloud-CSVQL-uX.js +0 -1
- package/dist/client/assets/cloud-alert-CR2jGoKf.js +0 -1
- package/dist/client/assets/cloud-backup-BX_Fu7EA.js +0 -1
- package/dist/client/assets/cloud-check-Bd6UU5lu.js +0 -1
- package/dist/client/assets/cloud-cog-DZKT0McA.js +0 -1
- package/dist/client/assets/cloud-download-XpRiwk7K.js +0 -1
- package/dist/client/assets/cloud-drizzle-BxYItNnL.js +0 -1
- package/dist/client/assets/cloud-fog-DpnFpf1I.js +0 -1
- package/dist/client/assets/cloud-hail-CzKf_Tkc.js +0 -1
- package/dist/client/assets/cloud-lightning-DPV2sBYn.js +0 -1
- package/dist/client/assets/cloud-moon-BXzCpD4L.js +0 -1
- package/dist/client/assets/cloud-moon-rain-B2SKMLCZ.js +0 -1
- package/dist/client/assets/cloud-off-9fdMItCX.js +0 -1
- package/dist/client/assets/cloud-rain-CassxSFs.js +0 -1
- package/dist/client/assets/cloud-rain-wind-BtfhOzk-.js +0 -1
- package/dist/client/assets/cloud-snow--zUfDcR9.js +0 -1
- package/dist/client/assets/cloud-sun-B_UeeV33.js +0 -1
- package/dist/client/assets/cloud-sun-rain-BCV9XVLj.js +0 -1
- package/dist/client/assets/cloud-sync-CQ8U54vO.js +0 -1
- package/dist/client/assets/cloud-upload-CklK_e-V.js +0 -1
- package/dist/client/assets/cloudy-DpftKKSh.js +0 -1
- package/dist/client/assets/clover-C8DU_iJP.js +0 -1
- package/dist/client/assets/club-Dc1LsueY.js +0 -1
- package/dist/client/assets/code-DM3MUq29.js +0 -1
- package/dist/client/assets/coffee-CrHLtjo7.js +0 -1
- package/dist/client/assets/cog-mI4gwC_v.js +0 -1
- package/dist/client/assets/coins-BucpzUky.js +0 -1
- package/dist/client/assets/columns-3-DKRaqQyD.js +0 -1
- package/dist/client/assets/columns-3-cog-BGuc4KSF.js +0 -1
- package/dist/client/assets/columns-4-B72i6sUc.js +0 -1
- package/dist/client/assets/combine-DXLUseft.js +0 -1
- package/dist/client/assets/command-BeJ2kZ45.js +0 -1
- package/dist/client/assets/compass-DDb1N6nu.js +0 -1
- package/dist/client/assets/component-GlB9ZoS8.js +0 -1
- package/dist/client/assets/computer-BaZpKMYz.js +0 -1
- package/dist/client/assets/concierge-bell-BOBqfFa5.js +0 -1
- package/dist/client/assets/cone-DZM21dUK.js +0 -1
- package/dist/client/assets/construction-CSTQm1ZH.js +0 -1
- package/dist/client/assets/contact-gIijR8jb.js +0 -1
- package/dist/client/assets/contact-round-BMsuEvcJ.js +0 -1
- package/dist/client/assets/container-KcwAM4Tg.js +0 -1
- package/dist/client/assets/contrast-BcllcJ5o.js +0 -1
- package/dist/client/assets/cookie-LbQlhCf5.js +0 -1
- package/dist/client/assets/cooking-pot-CL3tRCba.js +0 -1
- package/dist/client/assets/copy-check-L-gpP6Lu.js +0 -1
- package/dist/client/assets/copy-minus-r8B-Q2uo.js +0 -1
- package/dist/client/assets/copy-plus-ByAdNGlF.js +0 -1
- package/dist/client/assets/copy-slash-DZoZLq6V.js +0 -1
- package/dist/client/assets/copy-x-fJmpPhBM.js +0 -1
- package/dist/client/assets/copyleft-C8gNo3UQ.js +0 -1
- package/dist/client/assets/copyright-DQUVvBl4.js +0 -1
- package/dist/client/assets/corner-down-left-5jip_YI6.js +0 -1
- package/dist/client/assets/corner-left-down-BJYIbYzf.js +0 -1
- package/dist/client/assets/corner-left-up-BSUqQf17.js +0 -1
- package/dist/client/assets/corner-right-down-BTd8RlY3.js +0 -1
- package/dist/client/assets/corner-right-up-Cm6GAZ5c.js +0 -1
- package/dist/client/assets/corner-up-right-ClqhJMP7.js +0 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-B8aXetDX.js +0 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-B8aXetDX.js.br +0 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-B8aXetDX.js.gz +0 -0
- package/dist/client/assets/cpu-elyzLyW9.js +0 -1
- package/dist/client/assets/creative-commons-D9ssDDiZ.js +0 -1
- package/dist/client/assets/credit-card-Qk8fZ_45.js +0 -1
- package/dist/client/assets/croissant-DTVrrUfm.js +0 -1
- package/dist/client/assets/crop-DQcCazSe.js +0 -1
- package/dist/client/assets/cross-BgayUL_B.js +0 -1
- package/dist/client/assets/crosshair-BlvnMfQR.js +0 -1
- package/dist/client/assets/crown-B2GegaM_.js +0 -1
- package/dist/client/assets/cuboid-B-su5zut.js +0 -1
- package/dist/client/assets/cup-soda-P5VbX1YF.js +0 -1
- package/dist/client/assets/currency-i3dhGDLj.js +0 -1
- package/dist/client/assets/cylinder-By_w-hp_.js +0 -1
- package/dist/client/assets/cynefin-OW5HDTMX-CsB26iOn.js +0 -166
- package/dist/client/assets/cynefin-OW5HDTMX-CsB26iOn.js.br +0 -0
- package/dist/client/assets/cynefin-OW5HDTMX-CsB26iOn.js.gz +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cenm7T4v.js +0 -62
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cenm7T4v.js.br +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cenm7T4v.js.gz +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-C_baUfvs.js +0 -4
- package/dist/client/assets/dagre-GXQ25YYZ-C_baUfvs.js.br +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-C_baUfvs.js.gz +0 -0
- package/dist/client/assets/dam-BW7fR-Xd.js +0 -1
- package/dist/client/assets/database-Dfm30Q04.js +0 -1
- package/dist/client/assets/database-backup-DDWW3mzM.js +0 -1
- package/dist/client/assets/database-search-B3qd7vD0.js +0 -1
- package/dist/client/assets/database-zap-CF3ixjuG.js +0 -1
- package/dist/client/assets/decimals-arrow-left-DAgoFBVf.js +0 -1
- package/dist/client/assets/decimals-arrow-right-C3RPXOUe.js +0 -1
- package/dist/client/assets/delete-BsfbP3JF.js +0 -1
- package/dist/client/assets/dessert-BlCv8BhW.js +0 -1
- package/dist/client/assets/diagram-S7CK7UJ4-CAOT3q0p.js +0 -30
- package/dist/client/assets/diagram-S7CK7UJ4-CAOT3q0p.js.br +0 -0
- package/dist/client/assets/diagram-S7CK7UJ4-CAOT3q0p.js.gz +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DNB8v-C3.js +0 -41
- package/dist/client/assets/diagram-UQ7AKVKN-DNB8v-C3.js.br +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DNB8v-C3.js.gz +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-CqHehap7.js +0 -3
- package/dist/client/assets/diagram-VSXAHHWV-CqHehap7.js.br +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-CqHehap7.js.gz +0 -0
- package/dist/client/assets/diagram-VX7I27RA-NwtMxQ-l.js +0 -24
- package/dist/client/assets/diagram-VX7I27RA-NwtMxQ-l.js.br +0 -0
- package/dist/client/assets/diagram-VX7I27RA-NwtMxQ-l.js.gz +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-CB1LV5zw.js +0 -24
- package/dist/client/assets/diagram-Z3DM3KII-CB1LV5zw.js.br +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-CB1LV5zw.js.gz +0 -0
- package/dist/client/assets/diameter-CM59tkTJ.js +0 -1
- package/dist/client/assets/diamond-CKpnUlsI.js +0 -1
- package/dist/client/assets/diamond-minus-5Ng3RZo6.js +0 -1
- package/dist/client/assets/diamond-percent-BKZRMp_C.js +0 -1
- package/dist/client/assets/diamond-plus-DCBPXRbN.js +0 -1
- package/dist/client/assets/dice-1-B04OleMd.js +0 -1
- package/dist/client/assets/dice-2-T4oJlFtX.js +0 -1
- package/dist/client/assets/dice-3-DOTnflXw.js +0 -1
- package/dist/client/assets/dice-4-NY4jvXRU.js +0 -1
- package/dist/client/assets/dice-5-DvVxTMYY.js +0 -1
- package/dist/client/assets/dice-6-_C5LS7q5.js +0 -1
- package/dist/client/assets/dices-CsghLbtf.js +0 -1
- package/dist/client/assets/diff-DpS7etWG.js +0 -1
- package/dist/client/assets/disc-2-DX_LMr9T.js +0 -1
- package/dist/client/assets/disc-3-DHJICdqW.js +0 -1
- package/dist/client/assets/disc-DvVS6MP0.js +0 -1
- package/dist/client/assets/disc-album-DFf2eyiT.js +0 -1
- package/dist/client/assets/divide-DNiMgBz1.js +0 -1
- package/dist/client/assets/dna-BmA7qaea.js +0 -1
- package/dist/client/assets/dna-off-wmpBFpFW.js +0 -1
- package/dist/client/assets/dock-Dm9uxfIj.js +0 -1
- package/dist/client/assets/dog-CAfvjSh3.js +0 -1
- package/dist/client/assets/dollar-sign-CjQFagrF.js +0 -1
- package/dist/client/assets/donut-CfPENha9.js +0 -1
- package/dist/client/assets/door-closed-AVZVGuIh.js +0 -1
- package/dist/client/assets/door-closed-locked-vIYHjTPi.js +0 -1
- package/dist/client/assets/door-open-Ign7o0Ft.js +0 -1
- package/dist/client/assets/dot-DAN9V5bV.js +0 -1
- package/dist/client/assets/drafting-compass-CDYaG6R9.js +0 -1
- package/dist/client/assets/drama-BM9V_8LT.js +0 -1
- package/dist/client/assets/drill-DivZyzuB.js +0 -1
- package/dist/client/assets/drone-BbVSRIYD.js +0 -1
- package/dist/client/assets/droplet-NjCBFDom.js +0 -1
- package/dist/client/assets/droplet-off-ImGU40lL.js +0 -1
- package/dist/client/assets/droplets-BUBzY3Lx.js +0 -1
- package/dist/client/assets/drum-AZ9VpPxj.js +0 -1
- package/dist/client/assets/drumstick-yFqBPocA.js +0 -1
- package/dist/client/assets/dumbbell-DSIXcMuj.js +0 -1
- package/dist/client/assets/ear-DZYEi0Tp.js +0 -1
- package/dist/client/assets/ear-off-BaV8iVjx.js +0 -1
- package/dist/client/assets/earth-JQLKfkkG.js +0 -1
- package/dist/client/assets/earth-lock-B29WUNml.js +0 -1
- package/dist/client/assets/ebnfDiagram-PWID7BFC-BJXfFYfZ.js +0 -1
- package/dist/client/assets/ebnfDiagram-PWID7BFC-BJXfFYfZ.js.br +0 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-BJXfFYfZ.js.gz +0 -0
- package/dist/client/assets/eclipse-CUrxmsIk.js +0 -1
- package/dist/client/assets/egg-_iJQIEVB.js +0 -1
- package/dist/client/assets/egg-fried-Zu7XO1Xy.js +0 -1
- package/dist/client/assets/egg-off-B4UoGMpu.js +0 -1
- package/dist/client/assets/ellipse-OJqUOC7d.js +0 -1
- package/dist/client/assets/ellipsis-vertical-yX501Wf1.js +0 -1
- package/dist/client/assets/equal-BPq23lbl.js +0 -1
- package/dist/client/assets/equal-approximately-BwfCTTwS.js +0 -1
- package/dist/client/assets/equal-not-BhzWywVy.js +0 -1
- package/dist/client/assets/erDiagram-RLTQ6QDP-UoHjYN4B.js +0 -99
- package/dist/client/assets/erDiagram-RLTQ6QDP-UoHjYN4B.js.br +0 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-UoHjYN4B.js.gz +0 -0
- package/dist/client/assets/ethernet-port-CH6ofKFc.js +0 -1
- package/dist/client/assets/euro-CYlkK8TF.js +0 -1
- package/dist/client/assets/ev-charger-D-xWNBOh.js +0 -1
- package/dist/client/assets/expand-DKYr5BiX.js +0 -1
- package/dist/client/assets/external-link-Y_yE2RAa.js +0 -1
- package/dist/client/assets/eye-c1g0ToWe.js +0 -1
- package/dist/client/assets/eye-closed-z8M2W7Bh.js +0 -1
- package/dist/client/assets/eye-off-B1ehmZtU.js +0 -1
- package/dist/client/assets/factory-BojXqBtV.js +0 -1
- package/dist/client/assets/fan-SsvNRbKn.js +0 -1
- package/dist/client/assets/fast-forward-Yc_Si4CF.js +0 -1
- package/dist/client/assets/feather-BzcJlJrW.js +0 -1
- package/dist/client/assets/fence-GhAsuXSe.js +0 -1
- package/dist/client/assets/ferris-wheel-CIkvBj-G.js +0 -1
- package/dist/client/assets/file-archive-CZFOtjr0.js +0 -1
- package/dist/client/assets/file-axis-3d-XZpy9B2Q.js +0 -1
- package/dist/client/assets/file-badge-BADPHDVv.js +0 -1
- package/dist/client/assets/file-box-BkuD9iqs.js +0 -1
- package/dist/client/assets/file-braces-BBUFr712.js +0 -1
- package/dist/client/assets/file-braces-corner-XaSQb6DT.js +0 -1
- package/dist/client/assets/file-chart-column-BkC8KDOB.js +0 -1
- package/dist/client/assets/file-chart-column-increasing-uIe6lUWM.js +0 -1
- package/dist/client/assets/file-chart-line-CtYCuUvt.js +0 -1
- package/dist/client/assets/file-chart-pie-BkF8wr-E.js +0 -1
- package/dist/client/assets/file-check-CMbNTww0.js +0 -1
- package/dist/client/assets/file-check-corner-C7nBolyp.js +0 -1
- package/dist/client/assets/file-clock-DREdUJcr.js +0 -1
- package/dist/client/assets/file-code-corner-DM4chW_B.js +0 -1
- package/dist/client/assets/file-cog-CUzoHQ93.js +0 -1
- package/dist/client/assets/file-diff-_w5VSd5s.js +0 -1
- package/dist/client/assets/file-digit-feqrupN1.js +0 -1
- package/dist/client/assets/file-down-BQEIcIoQ.js +0 -1
- package/dist/client/assets/file-exclamation-point-CTGquQ77.js +0 -1
- package/dist/client/assets/file-headphone-DYOGX20G.js +0 -1
- package/dist/client/assets/file-heart-BnK68yw4.js +0 -1
- package/dist/client/assets/file-image-_qiKYPkc.js +0 -1
- package/dist/client/assets/file-input-BmFkZCf8.js +0 -1
- package/dist/client/assets/file-key-BQIYjAgr.js +0 -1
- package/dist/client/assets/file-lock-CT5XlsP6.js +0 -1
- package/dist/client/assets/file-minus-corner-Kjc1k8di.js +0 -1
- package/dist/client/assets/file-minus-opzoYPrz.js +0 -1
- package/dist/client/assets/file-music-DnR4j44G.js +0 -1
- package/dist/client/assets/file-output-DfJdDnIY.js +0 -1
- package/dist/client/assets/file-pen-diIqWOyt.js +0 -1
- package/dist/client/assets/file-pen-line-H-a-CPRK.js +0 -1
- package/dist/client/assets/file-play-BOapBGtN.js +0 -1
- package/dist/client/assets/file-plus-COCwCN2S.js +0 -1
- package/dist/client/assets/file-plus-corner-DeSj_2EW.js +0 -1
- package/dist/client/assets/file-question-mark-B2s2mObx.js +0 -1
- package/dist/client/assets/file-scan-DrXF_EQh.js +0 -1
- package/dist/client/assets/file-search-DkF4sY_0.js +0 -1
- package/dist/client/assets/file-search-corner-B2Qc5jV3.js +0 -1
- package/dist/client/assets/file-signal-Br8s-y3W.js +0 -1
- package/dist/client/assets/file-sliders-M-9mjpcz.js +0 -1
- package/dist/client/assets/file-spreadsheet-C45sGm4E.js +0 -1
- package/dist/client/assets/file-stack-DqxRzIEy.js +0 -1
- package/dist/client/assets/file-symlink-BUPQ7JsM.js +0 -1
- package/dist/client/assets/file-terminal-BZbb2z_8.js +0 -1
- package/dist/client/assets/file-type-CORQUiRO.js +0 -1
- package/dist/client/assets/file-type-corner-D4SJs9kf.js +0 -1
- package/dist/client/assets/file-up-DURgBAxS.js +0 -1
- package/dist/client/assets/file-user-C2rQNnCk.js +0 -1
- package/dist/client/assets/file-video-camera-BeGdHrtC.js +0 -1
- package/dist/client/assets/file-volume-BMw8K9Ns.js +0 -1
- package/dist/client/assets/file-x-BmVx3R9h.js +0 -1
- package/dist/client/assets/file-x-corner-B2PeB4QI.js +0 -1
- package/dist/client/assets/files-BCgjBwYD.js +0 -1
- package/dist/client/assets/film-CCz0Z9yl.js +0 -1
- package/dist/client/assets/fingerprint-pattern-BtlO1Ck_.js +0 -1
- package/dist/client/assets/fire-extinguisher-C5llI0As.js +0 -1
- package/dist/client/assets/fish-BDh9dquU.js +0 -1
- package/dist/client/assets/fish-off-DaRDCgDL.js +0 -1
- package/dist/client/assets/fish-symbol-BN-x_6IO.js +0 -1
- package/dist/client/assets/fishing-hook-C4LFLvVd.js +0 -1
- package/dist/client/assets/fishing-rod-CPMBvYhr.js +0 -1
- package/dist/client/assets/flag-4wONsGiZ.js +0 -1
- package/dist/client/assets/flag-off-B5V6cEWm.js +0 -1
- package/dist/client/assets/flag-triangle-left-EWf-3IQy.js +0 -1
- package/dist/client/assets/flag-triangle-right-B9RBPq32.js +0 -1
- package/dist/client/assets/flame-CGmM250H.js +0 -1
- package/dist/client/assets/flame-kindling-Beo1faeO.js +0 -1
- package/dist/client/assets/flashlight-CkBFiyE-.js +0 -1
- package/dist/client/assets/flashlight-off-BfGr5_tP.js +0 -1
- package/dist/client/assets/flask-conical-DPu9HQic.js +0 -1
- package/dist/client/assets/flask-conical-off-BjUXOMMO.js +0 -1
- package/dist/client/assets/flask-round-e4uZIFb_.js +0 -1
- package/dist/client/assets/flip-horizontal-2-DHWeEZgI.js +0 -1
- package/dist/client/assets/flip-vertical-2-C0ow3LpV.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-BPfyJRtS.js +0 -168
- package/dist/client/assets/flowDiagram-HODETNUW-BPfyJRtS.js.br +0 -0
- package/dist/client/assets/flowDiagram-HODETNUW-BPfyJRtS.js.gz +0 -0
- package/dist/client/assets/flower-2-CvAu5LDR.js +0 -1
- package/dist/client/assets/flower-Clp5v0qt.js +0 -1
- package/dist/client/assets/focus-CXX7Z2fS.js +0 -1
- package/dist/client/assets/fold-horizontal-BFEIaaaS.js +0 -1
- package/dist/client/assets/fold-vertical-BQ7p_-kE.js +0 -1
- package/dist/client/assets/folder-archive-CWa6a77Y.js +0 -1
- package/dist/client/assets/folder-bookmark-CV2Mw2e7.js +0 -1
- package/dist/client/assets/folder-check-BAM5jwdr.js +0 -1
- package/dist/client/assets/folder-clock-DJqWAfNY.js +0 -1
- package/dist/client/assets/folder-closed-BpBhf8Ef.js +0 -1
- package/dist/client/assets/folder-code-IabPLabD.js +0 -1
- package/dist/client/assets/folder-cog-B73geSwz.js +0 -1
- package/dist/client/assets/folder-dot-BbGEIxXv.js +0 -1
- package/dist/client/assets/folder-down-DbZ_7ekk.js +0 -1
- package/dist/client/assets/folder-git-2-DmzCqD2m.js +0 -1
- package/dist/client/assets/folder-git-COT4Ou7M.js +0 -1
- package/dist/client/assets/folder-heart-CB5dItlN.js +0 -1
- package/dist/client/assets/folder-input-Cd-KfB1k.js +0 -1
- package/dist/client/assets/folder-kanban-B7mQP--z.js +0 -1
- package/dist/client/assets/folder-key--OGpMwp2.js +0 -1
- package/dist/client/assets/folder-lock-Cbo2xmjK.js +0 -1
- package/dist/client/assets/folder-minus-C-b2d6ei.js +0 -1
- package/dist/client/assets/folder-open-dot-w9RBuvwW.js +0 -1
- package/dist/client/assets/folder-output-BW1t43sw.js +0 -1
- package/dist/client/assets/folder-pen-DtmbVR5J.js +0 -1
- package/dist/client/assets/folder-plus-CLJa9y54.js +0 -1
- package/dist/client/assets/folder-root-Bmq5dN1o.js +0 -1
- package/dist/client/assets/folder-search-2-1CwJxoOu.js +0 -1
- package/dist/client/assets/folder-symlink-Cc9wSX51.js +0 -1
- package/dist/client/assets/folder-sync-DFAZ85z8.js +0 -1
- package/dist/client/assets/folder-tree-CR-ZHa_S.js +0 -1
- package/dist/client/assets/folder-up-Drl9r8fV.js +0 -1
- package/dist/client/assets/folder-x-Da14pPwq.js +0 -1
- package/dist/client/assets/folders-CD7U-EBT.js +0 -1
- package/dist/client/assets/footprints-BESK6591.js +0 -1
- package/dist/client/assets/forklift-BmnrAJIA.js +0 -1
- package/dist/client/assets/form-D3Lk0MmX.js +0 -1
- package/dist/client/assets/forward-CJI73m9L.js +0 -1
- package/dist/client/assets/frame-DCBv3_yO.js +0 -1
- package/dist/client/assets/frown-5V-dUB90.js +0 -1
- package/dist/client/assets/fuel-C34C0_GK.js +0 -1
- package/dist/client/assets/fullscreen-CQH-GeCJ.js +0 -1
- package/dist/client/assets/funnel-C1EU8vz9.js +0 -1
- package/dist/client/assets/funnel-plus-CPSCVgUM.js +0 -1
- package/dist/client/assets/funnel-x-B0hn-sZP.js +0 -1
- package/dist/client/assets/gallery-horizontal-CuUQm6FI.js +0 -1
- package/dist/client/assets/gallery-horizontal-end-CaUxBlCO.js +0 -1
- package/dist/client/assets/gallery-thumbnails-CvAEjT9q.js +0 -1
- package/dist/client/assets/gallery-vertical-BPoVNM3W.js +0 -1
- package/dist/client/assets/gallery-vertical-end-9R7l3Y9p.js +0 -1
- package/dist/client/assets/gamepad-2-ZSC33aI5.js +0 -1
- package/dist/client/assets/gamepad-DO525bO2.js +0 -1
- package/dist/client/assets/gamepad-directional-CGIAtF-S.js +0 -1
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C6gPV4Mz.js +0 -292
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C6gPV4Mz.js.br +0 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-C6gPV4Mz.js.gz +0 -0
- package/dist/client/assets/gauge-C5U56Zpw.js +0 -1
- package/dist/client/assets/gavel-ZxolLTUx.js +0 -1
- package/dist/client/assets/gem-CDsckDmM.js +0 -1
- package/dist/client/assets/georgian-lari-C7q0CcWf.js +0 -1
- package/dist/client/assets/ghost-CWLlPNWT.js +0 -1
- package/dist/client/assets/gift-Do4YbyYe.js +0 -1
- package/dist/client/assets/git-branch-DHOIxS_M.js +0 -1
- package/dist/client/assets/git-branch-minus-CHIeAGcE.js +0 -1
- package/dist/client/assets/git-branch-plus-CfVHJnAi.js +0 -1
- package/dist/client/assets/git-commit-horizontal-C1nNMGoS.js +0 -1
- package/dist/client/assets/git-commit-vertical-Dxg9SiV_.js +0 -1
- package/dist/client/assets/git-compare-UIjXnQCT.js +0 -1
- package/dist/client/assets/git-compare-arrows-CfTVQAc8.js +0 -1
- package/dist/client/assets/git-fork-BJxMZtey.js +0 -1
- package/dist/client/assets/git-graph-CSvp_27t.js +0 -1
- package/dist/client/assets/git-merge-DgqQdLsY.js +0 -1
- package/dist/client/assets/git-merge-conflict-8pg0tBYO.js +0 -1
- package/dist/client/assets/git-pull-request-D-WwRJW4.js +0 -1
- package/dist/client/assets/git-pull-request-arrow-D4DOyjZl.js +0 -1
- package/dist/client/assets/git-pull-request-closed-WCPd7jFx.js +0 -1
- package/dist/client/assets/git-pull-request-create-CwoAml7W.js +0 -1
- package/dist/client/assets/git-pull-request-create-arrow-CKbWHcUw.js +0 -1
- package/dist/client/assets/git-pull-request-draft-Cm9HfYeR.js +0 -1
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CD6D2XW1.js +0 -106
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CD6D2XW1.js.br +0 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CD6D2XW1.js.gz +0 -0
- package/dist/client/assets/glass-water-Rcpx5jII.js +0 -1
- package/dist/client/assets/glasses-F5d6qNXH.js +0 -1
- package/dist/client/assets/globe-Dt49_KhP.js +0 -1
- package/dist/client/assets/globe-check-UgxhQp36.js +0 -1
- package/dist/client/assets/globe-lock-l75dbHv6.js +0 -1
- package/dist/client/assets/globe-off-CVDIL89b.js +0 -1
- package/dist/client/assets/globe-x-DVphnxMq.js +0 -1
- package/dist/client/assets/goal-BtkB-wlC.js +0 -1
- package/dist/client/assets/gpu-BHaD66JQ.js +0 -1
- package/dist/client/assets/graduation-cap-D4ACph0S.js +0 -1
- package/dist/client/assets/grape-BMeBqlZG.js +0 -1
- package/dist/client/assets/grid-2x2-3MktfA04.js +0 -1
- package/dist/client/assets/grid-2x2-check-K-7pF5UR.js +0 -1
- package/dist/client/assets/grid-2x2-plus-YgHOnspP.js +0 -1
- package/dist/client/assets/grid-2x2-x-C6iRbqBf.js +0 -1
- package/dist/client/assets/grid-3x2-Duk-KB-X.js +0 -1
- package/dist/client/assets/grid-3x3-BTiHC15M.js +0 -1
- package/dist/client/assets/grip-DZwlDtWX.js +0 -1
- package/dist/client/assets/grip-horizontal-budgPSmk.js +0 -1
- package/dist/client/assets/grip-vertical-DDl34x4y.js +0 -1
- package/dist/client/assets/group-DVdaHFOi.js +0 -1
- package/dist/client/assets/guitar-DDwH17i9.js +0 -1
- package/dist/client/assets/ham-CxZBSUAG.js +0 -1
- package/dist/client/assets/hamburger-BsTIkccF.js +0 -1
- package/dist/client/assets/hammer-ObqhGgLF.js +0 -1
- package/dist/client/assets/hand-DQ1jM279.js +0 -1
- package/dist/client/assets/hand-coins-BGMuq5fz.js +0 -1
- package/dist/client/assets/hand-fist-DxKxvk2t.js +0 -1
- package/dist/client/assets/hand-grab-CwZQZmUg.js +0 -1
- package/dist/client/assets/hand-heart-BqzAAARf.js +0 -1
- package/dist/client/assets/hand-helping-7TOfuhUp.js +0 -1
- package/dist/client/assets/hand-metal-BW0GQDjG.js +0 -1
- package/dist/client/assets/hand-platter-DL6j_WrN.js +0 -1
- package/dist/client/assets/handbag-DAZrfeW3.js +0 -1
- package/dist/client/assets/handshake-D-_664iw.js +0 -1
- package/dist/client/assets/hard-drive-B5kLRdLX.js +0 -1
- package/dist/client/assets/hard-drive-download-Cx3TBbwE.js +0 -1
- package/dist/client/assets/hard-drive-upload-DRX6J0qo.js +0 -1
- package/dist/client/assets/hard-hat-CPgcqLmi.js +0 -1
- package/dist/client/assets/hash-kTSlHPml.js +0 -1
- package/dist/client/assets/hat-glasses-pwAUFbcS.js +0 -1
- package/dist/client/assets/haze-BFM-H9KE.js +0 -1
- package/dist/client/assets/hd-W6qDyn48.js +0 -1
- package/dist/client/assets/hdmi-port-BpWT_8R8.js +0 -1
- package/dist/client/assets/heading-1-C2rQb2Uh.js +0 -1
- package/dist/client/assets/heading-2-TkIh4nf5.js +0 -1
- package/dist/client/assets/heading-3-DHeBq9ap.js +0 -1
- package/dist/client/assets/heading-4-BR3XJl2J.js +0 -1
- package/dist/client/assets/heading-5-Dw_bNpQ3.js +0 -1
- package/dist/client/assets/heading-6-4zOOdHeA.js +0 -1
- package/dist/client/assets/heading-798oc8hc.js +0 -1
- package/dist/client/assets/headphone-off-BiTMhp_p.js +0 -1
- package/dist/client/assets/headphones-Seqk_VyB.js +0 -1
- package/dist/client/assets/headset-Geyn5zsg.js +0 -1
- package/dist/client/assets/heart-DedLJXYr.js +0 -1
- package/dist/client/assets/heart-crack-C1vgJDeQ.js +0 -1
- package/dist/client/assets/heart-handshake-7X26rpK9.js +0 -1
- package/dist/client/assets/heart-minus-BqKq9mi9.js +0 -1
- package/dist/client/assets/heart-off-Ctvd2Jry.js +0 -1
- package/dist/client/assets/heart-plus-xwWKtC3_.js +0 -1
- package/dist/client/assets/heart-pulse-Cp4g6JLa.js +0 -1
- package/dist/client/assets/heart-x-nkPQtF5C.js +0 -1
- package/dist/client/assets/heater-DZaQcg43.js +0 -1
- package/dist/client/assets/helicopter-hts7iZ07.js +0 -1
- package/dist/client/assets/hexagon-CPIO9msh.js +0 -1
- package/dist/client/assets/highlighter-B_4PKRaJ.js +0 -1
- package/dist/client/assets/history-UGZn6NtS.js +0 -1
- package/dist/client/assets/hop-oBKwW3F6.js +0 -1
- package/dist/client/assets/hop-oBKwW3F6.js.br +0 -0
- package/dist/client/assets/hop-oBKwW3F6.js.gz +0 -0
- package/dist/client/assets/hop-off-B9OobKsp.js +0 -1
- package/dist/client/assets/hop-off-B9OobKsp.js.br +0 -0
- package/dist/client/assets/hop-off-B9OobKsp.js.gz +0 -0
- package/dist/client/assets/hospital-B31yqXCD.js +0 -1
- package/dist/client/assets/hotel-C5EFpHx_.js +0 -1
- package/dist/client/assets/hourglass-BwmFgSL0.js +0 -1
- package/dist/client/assets/house-BhCkYlcA.js +0 -1
- package/dist/client/assets/house-heart-DTIhVmae.js +0 -1
- package/dist/client/assets/house-plug-BJDTLQKN.js +0 -1
- package/dist/client/assets/house-plus-C_xhUW58.js +0 -1
- package/dist/client/assets/house-wifi-lu5loaTS.js +0 -1
- package/dist/client/assets/ice-cream-bowl-B4EWN7r1.js +0 -1
- package/dist/client/assets/ice-cream-cone-BgXByXcy.js +0 -1
- package/dist/client/assets/id-card-D0TkNm60.js +0 -1
- package/dist/client/assets/id-card-lanyard-7zIaxHLn.js +0 -1
- package/dist/client/assets/image-down-rQDWLuQZ.js +0 -1
- package/dist/client/assets/image-minus-KZQBl6Qv.js +0 -1
- package/dist/client/assets/image-off-D4Xj0owY.js +0 -1
- package/dist/client/assets/image-play-WwS78-zF.js +0 -1
- package/dist/client/assets/image-plus-CL2CZ-na.js +0 -1
- package/dist/client/assets/image-up-CHb3I6Ff.js +0 -1
- package/dist/client/assets/image-upscale-DUI3fuTr.js +0 -1
- package/dist/client/assets/images-Bs-wrZTF.js +0 -1
- package/dist/client/assets/import-CsLDWBAL.js +0 -1
- package/dist/client/assets/inbox-qZmnwuRK.js +0 -1
- package/dist/client/assets/index-BAOzGAUR.js +0 -259
- package/dist/client/assets/index-BAOzGAUR.js.br +0 -0
- package/dist/client/assets/index-BAOzGAUR.js.gz +0 -0
- package/dist/client/assets/index-CBb0xNS1.css +0 -1
- package/dist/client/assets/index-CBb0xNS1.css.br +0 -0
- package/dist/client/assets/index-CBb0xNS1.css.gz +0 -0
- package/dist/client/assets/indian-rupee-COkXAeU2.js +0 -1
- package/dist/client/assets/infinity-Da_ZasAG.js +0 -1
- package/dist/client/assets/info-BvLLErei.js +0 -1
- package/dist/client/assets/infoDiagram-27XIBGKW-8iFjO2PS.js +0 -2
- package/dist/client/assets/inspection-panel-DB0UlbTT.js +0 -1
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-DaPLhXDr.js +0 -70
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-DaPLhXDr.js.br +0 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-DaPLhXDr.js.gz +0 -0
- package/dist/client/assets/italic-BP2hR0DY.js +0 -1
- package/dist/client/assets/iteration-ccw-Dvb-pM9Y.js +0 -1
- package/dist/client/assets/iteration-cw-WpIFV8ZZ.js +0 -1
- package/dist/client/assets/japanese-yen-CPntTpIQ.js +0 -1
- package/dist/client/assets/journeyDiagram-3NMN7TZE-e_KxCOWL.js +0 -139
- package/dist/client/assets/journeyDiagram-3NMN7TZE-e_KxCOWL.js.br +0 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-e_KxCOWL.js.gz +0 -0
- package/dist/client/assets/joystick-DtuaakVJ.js +0 -1
- package/dist/client/assets/kanban-KXOOO2bX.js +0 -1
- package/dist/client/assets/kanban-definition-UXKFOSKX-B7YLthf2.js +0 -89
- package/dist/client/assets/kanban-definition-UXKFOSKX-B7YLthf2.js.br +0 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-B7YLthf2.js.gz +0 -0
- package/dist/client/assets/kayak-D-EZv_vm.js +0 -1
- package/dist/client/assets/key-B9omFbH1.js +0 -1
- package/dist/client/assets/key-round-CA2pkIXx.js +0 -1
- package/dist/client/assets/key-square-8VccP1xO.js +0 -1
- package/dist/client/assets/keyboard-MExPp4N-.js +0 -1
- package/dist/client/assets/keyboard-music-DB1ZABA3.js +0 -1
- package/dist/client/assets/keyboard-off-CK3oBKoQ.js +0 -1
- package/dist/client/assets/lamp-BVNSSPX7.js +0 -1
- package/dist/client/assets/lamp-ceiling-CPxUnGw3.js +0 -1
- package/dist/client/assets/lamp-desk-HBGyLTDX.js +0 -1
- package/dist/client/assets/lamp-floor-DQd3OoDI.js +0 -1
- package/dist/client/assets/lamp-wall-down-Bnmjq_nw.js +0 -1
- package/dist/client/assets/lamp-wall-up-DWSXariO.js +0 -1
- package/dist/client/assets/land-plot-b8hsomeu.js +0 -1
- package/dist/client/assets/landmark-BfhAL8Wb.js +0 -1
- package/dist/client/assets/languages-Dn_qHYL_.js +0 -1
- package/dist/client/assets/laptop-CMZSvwdR.js +0 -1
- package/dist/client/assets/laptop-minimal-a74kGTAe.js +0 -1
- package/dist/client/assets/laptop-minimal-check-BPX5Gr5D.js +0 -1
- package/dist/client/assets/lasso-BMtW_ns0.js +0 -1
- package/dist/client/assets/lasso-select-Cq9O5jPO.js +0 -1
- package/dist/client/assets/laugh-BwZxVyml.js +0 -1
- package/dist/client/assets/layers-2-aL9_L9EC.js +0 -1
- package/dist/client/assets/layers-minus-DB-pR5f0.js +0 -1
- package/dist/client/assets/layers-plus--2uRlpit.js +0 -1
- package/dist/client/assets/layers-wi_9Iw0R.js +0 -1
- package/dist/client/assets/layout-DEI2e9xT.js +0 -1
- package/dist/client/assets/layout-DEI2e9xT.js.br +0 -0
- package/dist/client/assets/layout-DEI2e9xT.js.gz +0 -0
- package/dist/client/assets/layout-dashboard-CzG4xZRu.js +0 -1
- package/dist/client/assets/layout-grid-C0qPF1If.js +0 -1
- package/dist/client/assets/layout-list-ylEsPR3o.js +0 -1
- package/dist/client/assets/layout-panel-left-un02Tqh8.js +0 -1
- package/dist/client/assets/layout-panel-top-CT_ALrm8.js +0 -1
- package/dist/client/assets/layout-template-CBdwGzng.js +0 -1
- package/dist/client/assets/leaf-CbvC1NfS.js +0 -1
- package/dist/client/assets/leafy-green-B7L1d92D.js +0 -1
- package/dist/client/assets/lectern-Dt4lzGrJ.js +0 -1
- package/dist/client/assets/lens-concave-DZ-N2Air.js +0 -1
- package/dist/client/assets/lens-convex-DxsNU_hT.js +0 -1
- package/dist/client/assets/library-79eq7-Ev.js +0 -1
- package/dist/client/assets/library-big-DLRlwd-b.js +0 -1
- package/dist/client/assets/life-buoy-BbE9uXR-.js +0 -1
- package/dist/client/assets/ligature-BI0NYApS.js +0 -1
- package/dist/client/assets/lightbulb-off-D37aTSW9.js +0 -1
- package/dist/client/assets/line-dot-right-horizontal-BVFke7fK.js +0 -1
- package/dist/client/assets/line-squiggle-iNiXWYBx.js +0 -1
- package/dist/client/assets/line-style-BEAIaS_x.js +0 -1
- package/dist/client/assets/link-CDCM-Idk.js +0 -1
- package/dist/client/assets/list-CTAeQ8IT.js +0 -1
- package/dist/client/assets/list-check-C5RzwNw2.js +0 -1
- package/dist/client/assets/list-checks-Bd058z26.js +0 -1
- package/dist/client/assets/list-chevrons-down-up-xMbIjxBK.js +0 -1
- package/dist/client/assets/list-chevrons-up-down-Dbs6u05t.js +0 -1
- package/dist/client/assets/list-collapse-C2ZrSE1U.js +0 -1
- package/dist/client/assets/list-end-ilvrlqJe.js +0 -1
- package/dist/client/assets/list-filter-N_5cfxnG.js +0 -1
- package/dist/client/assets/list-filter-plus-VqKZ5cJz.js +0 -1
- package/dist/client/assets/list-indent-decrease-CkwFt9mF.js +0 -1
- package/dist/client/assets/list-indent-increase-DqYrJ_qj.js +0 -1
- package/dist/client/assets/list-minus-qCZJAr5p.js +0 -1
- package/dist/client/assets/list-music-CFtSv7iW.js +0 -1
- package/dist/client/assets/list-ordered-CQdHqtxC.js +0 -1
- package/dist/client/assets/list-plus-Cq7dQEhG.js +0 -1
- package/dist/client/assets/list-restart-B9Z09Q6-.js +0 -1
- package/dist/client/assets/list-start-BlkhN8vF.js +0 -1
- package/dist/client/assets/list-tree-CXAgpAON.js +0 -1
- package/dist/client/assets/list-video-_PGdDDZq.js +0 -1
- package/dist/client/assets/list-x-BdZ8Ka15.js +0 -1
- package/dist/client/assets/loader-DSmnmGBY.js +0 -1
- package/dist/client/assets/loader-pinwheel-Ga7V5LDn.js +0 -1
- package/dist/client/assets/locate-BEzhKks4.js +0 -1
- package/dist/client/assets/locate-fixed-BpuxnRdZ.js +0 -1
- package/dist/client/assets/locate-off-DLkWSsNE.js +0 -1
- package/dist/client/assets/lock-Cl3vBQJF.js +0 -1
- package/dist/client/assets/lock-keyhole-C6XgNtE_.js +0 -1
- package/dist/client/assets/lock-keyhole-open-CeThHWFD.js +0 -1
- package/dist/client/assets/lock-open-CiDPUcQA.js +0 -1
- package/dist/client/assets/log-in-G2Q3y3Vw.js +0 -1
- package/dist/client/assets/log-out-Ds3EBG0L.js +0 -1
- package/dist/client/assets/logs-CySLNYxX.js +0 -1
- package/dist/client/assets/lollipop-JQ5s6GBw.js +0 -1
- package/dist/client/assets/luggage-DPiapRWp.js +0 -1
- package/dist/client/assets/magnet-gB4-HCIi.js +0 -1
- package/dist/client/assets/mail-D_kT4GXf.js +0 -1
- package/dist/client/assets/mail-check-BzNjoy4S.js +0 -1
- package/dist/client/assets/mail-minus-M6dXdjqy.js +0 -1
- package/dist/client/assets/mail-open-qIFh57qX.js +0 -1
- package/dist/client/assets/mail-plus-BNYBKwT1.js +0 -1
- package/dist/client/assets/mail-question-mark-CSqgfMs2.js +0 -1
- package/dist/client/assets/mail-search-C-p4PJSr.js +0 -1
- package/dist/client/assets/mail-warning-jR08zYV5.js +0 -1
- package/dist/client/assets/mail-x-CZOBBzRr.js +0 -1
- package/dist/client/assets/mailbox-BSuYAEsl.js +0 -1
- package/dist/client/assets/mails-2pRrYRqA.js +0 -1
- package/dist/client/assets/map-CxK4JrFF.js +0 -1
- package/dist/client/assets/map-minus-DCeDPohw.js +0 -1
- package/dist/client/assets/map-pin-Rp_T6WG1.js +0 -1
- package/dist/client/assets/map-pin-check-DKYKSsjs.js +0 -1
- package/dist/client/assets/map-pin-check-inside-BND0O32o.js +0 -1
- package/dist/client/assets/map-pin-house-vjJ5rUbT.js +0 -1
- package/dist/client/assets/map-pin-minus-inside-CoWUzk1x.js +0 -1
- package/dist/client/assets/map-pin-minus-wjcjp0Wo.js +0 -1
- package/dist/client/assets/map-pin-off-DtDFyYka.js +0 -1
- package/dist/client/assets/map-pin-pen-2Qzxs4HH.js +0 -1
- package/dist/client/assets/map-pin-plus-DVI1-IF_.js +0 -1
- package/dist/client/assets/map-pin-plus-inside-DTJPIxtN.js +0 -1
- package/dist/client/assets/map-pin-search-BqV4mIDZ.js +0 -1
- package/dist/client/assets/map-pin-x-CiqBMUd_.js +0 -1
- package/dist/client/assets/map-pin-x-inside-OWm8SDBZ.js +0 -1
- package/dist/client/assets/map-pinned-Bb-sC6RG.js +0 -1
- package/dist/client/assets/map-plus-B9VqBl_-.js +0 -1
- package/dist/client/assets/mars-D1pwhO2K.js +0 -1
- package/dist/client/assets/mars-stroke-BUWMNTFp.js +0 -1
- package/dist/client/assets/martini-0_QiJP1S.js +0 -1
- package/dist/client/assets/maximize-2-9tx2o4at.js +0 -1
- package/dist/client/assets/maximize-sGXsGbxg.js +0 -1
- package/dist/client/assets/medal-CdHoV1lV.js +0 -1
- package/dist/client/assets/megaphone-0N--r7s4.js +0 -1
- package/dist/client/assets/megaphone-off-CEGF-nsA.js +0 -1
- package/dist/client/assets/meh-3Lj4Avrq.js +0 -1
- package/dist/client/assets/memory-stick-DgGHP3P4.js +0 -1
- package/dist/client/assets/menu-Bh_mGJG-.js +0 -1
- package/dist/client/assets/merge-B97JtQbK.js +0 -1
- package/dist/client/assets/mermaid.core-BCfTYf5f.js +0 -308
- package/dist/client/assets/mermaid.core-BCfTYf5f.js.br +0 -0
- package/dist/client/assets/mermaid.core-BCfTYf5f.js.gz +0 -0
- package/dist/client/assets/message-circle-check-CTYyrcA7.js +0 -1
- package/dist/client/assets/message-circle-code-B9hXxVTi.js +0 -1
- package/dist/client/assets/message-circle-dashed-3j0ZJ6CA.js +0 -1
- package/dist/client/assets/message-circle-heart-BCaV60V9.js +0 -1
- package/dist/client/assets/message-circle-more-CEIYfKkb.js +0 -1
- package/dist/client/assets/message-circle-off-CHrCd__2.js +0 -1
- package/dist/client/assets/message-circle-plus-Ckz-bTfj.js +0 -1
- package/dist/client/assets/message-circle-question-mark-DkXtrIIF.js +0 -1
- package/dist/client/assets/message-circle-reply-E3oL9nzm.js +0 -1
- package/dist/client/assets/message-circle-warning-CNDVHzMx.js +0 -1
- package/dist/client/assets/message-circle-x-B6owGeSW.js +0 -1
- package/dist/client/assets/message-square-D0tMpLLb.js +0 -1
- package/dist/client/assets/message-square-check-DCYZFWmj.js +0 -1
- package/dist/client/assets/message-square-code-CGrCtgxr.js +0 -1
- package/dist/client/assets/message-square-dashed-CtFlu7ap.js +0 -1
- package/dist/client/assets/message-square-diff-JPtMU8Uq.js +0 -1
- package/dist/client/assets/message-square-dot-Bp3TE8mt.js +0 -1
- package/dist/client/assets/message-square-heart-BpC1R6mn.js +0 -1
- package/dist/client/assets/message-square-lock-Dvb8hJRc.js +0 -1
- package/dist/client/assets/message-square-more-DQ3XO7TQ.js +0 -1
- package/dist/client/assets/message-square-off-BbiSDLOB.js +0 -1
- package/dist/client/assets/message-square-plus-C5L0Pg8N.js +0 -1
- package/dist/client/assets/message-square-quote-SocnJ2mx.js +0 -1
- package/dist/client/assets/message-square-reply-_36lIs7l.js +0 -1
- package/dist/client/assets/message-square-share-BLwzF2M_.js +0 -1
- package/dist/client/assets/message-square-text-yYJtlSpb.js +0 -1
- package/dist/client/assets/message-square-warning-DM-TybyB.js +0 -1
- package/dist/client/assets/message-square-x-6Syr9wVF.js +0 -1
- package/dist/client/assets/messages-square-CFuoa8eS.js +0 -1
- package/dist/client/assets/metronome-C6SiRRRj.js +0 -1
- package/dist/client/assets/mic-CAgHm9xO.js +0 -1
- package/dist/client/assets/mic-off-CquXR218.js +0 -1
- package/dist/client/assets/mic-vocal-DMHH_UR5.js +0 -1
- package/dist/client/assets/microchip-DREsiGKb.js +0 -1
- package/dist/client/assets/microscope-D-o7XDQr.js +0 -1
- package/dist/client/assets/microwave-C9yZwFvJ.js +0 -1
- package/dist/client/assets/milestone-C4ujEMCP.js +0 -1
- package/dist/client/assets/milk-CrTKSzv4.js +0 -1
- package/dist/client/assets/milk-off-a9PRcwYo.js +0 -1
- package/dist/client/assets/mindmap-definition-YA3MSWOX-DQpvDh9_.js +0 -96
- package/dist/client/assets/mindmap-definition-YA3MSWOX-DQpvDh9_.js.br +0 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-DQpvDh9_.js.gz +0 -0
- package/dist/client/assets/minimize-2-7d6l-gAk.js +0 -1
- package/dist/client/assets/minimize-CKaSQfum.js +0 -1
- package/dist/client/assets/minus-Dq-Fwbnd.js +0 -1
- package/dist/client/assets/mirror-rectangular-DWZtTkce.js +0 -1
- package/dist/client/assets/mirror-round-BuesMg6w.js +0 -1
- package/dist/client/assets/monitor-check-Cs7XzoYU.js +0 -1
- package/dist/client/assets/monitor-cloud-CR4mOvHR.js +0 -1
- package/dist/client/assets/monitor-cog-DM5jPd2K.js +0 -1
- package/dist/client/assets/monitor-dot-BzCv7xe3.js +0 -1
- package/dist/client/assets/monitor-down-iCDUBlEo.js +0 -1
- package/dist/client/assets/monitor-off-DqIvKRu7.js +0 -1
- package/dist/client/assets/monitor-pause-B_XAX_3u.js +0 -1
- package/dist/client/assets/monitor-play-DJ0U0A76.js +0 -1
- package/dist/client/assets/monitor-smartphone-Dt5VOCZ3.js +0 -1
- package/dist/client/assets/monitor-speaker-yUBntdag.js +0 -1
- package/dist/client/assets/monitor-stop-BmmtVqxR.js +0 -1
- package/dist/client/assets/monitor-up-BxPZyN9c.js +0 -1
- package/dist/client/assets/monitor-x-nTy3zV2L.js +0 -1
- package/dist/client/assets/moon-K-7W_4Nv.js +0 -1
- package/dist/client/assets/moon-star-CIptDrhB.js +0 -1
- package/dist/client/assets/motorbike-HOYhUy2T.js +0 -1
- package/dist/client/assets/mountain-DbQ29qEa.js +0 -1
- package/dist/client/assets/mountain-snow-BEyBFNdX.js +0 -1
- package/dist/client/assets/mouse-CFYOxjck.js +0 -1
- package/dist/client/assets/mouse-left-Vt8-M3JC.js +0 -1
- package/dist/client/assets/mouse-off-Cav8XsLc.js +0 -1
- package/dist/client/assets/mouse-pointer-2-DTC6MuPe.js +0 -1
- package/dist/client/assets/mouse-pointer-2-off-DA8gAYmI.js +0 -1
- package/dist/client/assets/mouse-pointer-DZqLcohS.js +0 -1
- package/dist/client/assets/mouse-pointer-ban-DGGXA9AK.js +0 -1
- package/dist/client/assets/mouse-pointer-click-BQlZin_X.js +0 -1
- package/dist/client/assets/mouse-right-CHZDKhto.js +0 -1
- package/dist/client/assets/move-3d-BDRAT2jr.js +0 -1
- package/dist/client/assets/move-B7SfAksw.js +0 -1
- package/dist/client/assets/move-diagonal-2-CXz9D43Q.js +0 -1
- package/dist/client/assets/move-diagonal-CAjZIQ3T.js +0 -1
- package/dist/client/assets/move-down-BHLcUeDV.js +0 -1
- package/dist/client/assets/move-down-left-DBBCN-l9.js +0 -1
- package/dist/client/assets/move-down-right-CthrDbPf.js +0 -1
- package/dist/client/assets/move-horizontal-5wCvZSnl.js +0 -1
- package/dist/client/assets/move-left-DX6UNdsG.js +0 -1
- package/dist/client/assets/move-right-PKaioXUk.js +0 -1
- package/dist/client/assets/move-up-CGr-i6Vs.js +0 -1
- package/dist/client/assets/move-up-left-CAu-9NGl.js +0 -1
- package/dist/client/assets/move-up-right-DITkRBJk.js +0 -1
- package/dist/client/assets/move-vertical-FQ4ZVkc3.js +0 -1
- package/dist/client/assets/music-2-DalYSv8S.js +0 -1
- package/dist/client/assets/music-3-DDcL8KJb.js +0 -1
- package/dist/client/assets/music-4-DfDXTLm2.js +0 -1
- package/dist/client/assets/music-DIxey-1I.js +0 -1
- package/dist/client/assets/navigation-2-IesSF0Ib.js +0 -1
- package/dist/client/assets/navigation-2-off-BQLKLiCn.js +0 -1
- package/dist/client/assets/navigation-Cw6xccKH.js +0 -1
- package/dist/client/assets/navigation-off-HCEs5klr.js +0 -1
- package/dist/client/assets/network-Dxkx5eHG.js +0 -1
- package/dist/client/assets/newspaper-Rz2RZuXR.js +0 -1
- package/dist/client/assets/nfc-DgbHbn6B.js +0 -1
- package/dist/client/assets/non-binary-pv6wvD9y.js +0 -1
- package/dist/client/assets/notebook-pen-DEmo-spo.js +0 -1
- package/dist/client/assets/notebook-tabs-dAHAZCkZ.js +0 -1
- package/dist/client/assets/notebook-text-BRImIpsJ.js +0 -1
- package/dist/client/assets/notebook-xcThK180.js +0 -1
- package/dist/client/assets/notepad-text-CeQoRK5i.js +0 -1
- package/dist/client/assets/notepad-text-dashed-BS-VbupQ.js +0 -1
- package/dist/client/assets/nut-LlEyK5ok.js +0 -1
- package/dist/client/assets/nut-off-Dia6HNzl.js +0 -1
- package/dist/client/assets/octagon-CWUyjmfx.js +0 -1
- package/dist/client/assets/octagon-alert-DirmNprF.js +0 -1
- package/dist/client/assets/octagon-minus-BRMYGCtv.js +0 -1
- package/dist/client/assets/octagon-pause-wPwnGRlj.js +0 -1
- package/dist/client/assets/octagon-x-9PUJs76U.js +0 -1
- package/dist/client/assets/omega-xeXfPdBw.js +0 -1
- package/dist/client/assets/option-XALlzoYa.js +0 -1
- package/dist/client/assets/orbit-D5w9QjJa.js +0 -1
- package/dist/client/assets/origami-CAqaJRdu.js +0 -1
- package/dist/client/assets/package-2-Dnmruv4z.js +0 -1
- package/dist/client/assets/package-check-MTgVleZw.js +0 -1
- package/dist/client/assets/package-eV8c6LZn.js +0 -1
- package/dist/client/assets/package-minus-CbcyWBai.js +0 -1
- package/dist/client/assets/package-open-DN87vqf8.js +0 -1
- package/dist/client/assets/package-plus-Hl3mhRTN.js +0 -1
- package/dist/client/assets/package-search-C4ZLIl1S.js +0 -1
- package/dist/client/assets/package-x-znctSw6i.js +0 -1
- package/dist/client/assets/paint-bucket-BmBq9tWR.js +0 -1
- package/dist/client/assets/paint-roller-p5MuBAht.js +0 -1
- package/dist/client/assets/paintbrush-sl5FyEVP.js +0 -1
- package/dist/client/assets/paintbrush-vertical-CBX4UcL1.js +0 -1
- package/dist/client/assets/palette-dkutqBLw.js +0 -1
- package/dist/client/assets/panda-CjJMREvs.js +0 -1
- package/dist/client/assets/panel-bottom-BLbWrwew.js +0 -1
- package/dist/client/assets/panel-bottom-close-CqjS5rNr.js +0 -1
- package/dist/client/assets/panel-bottom-dashed-b2Pd-GWL.js +0 -1
- package/dist/client/assets/panel-bottom-open-NVaYc272.js +0 -1
- package/dist/client/assets/panel-left-close-BZq2fw7u.js +0 -1
- package/dist/client/assets/panel-left-dashed-DYIYVhNT.js +0 -1
- package/dist/client/assets/panel-left-open-BFPPW9CC.js +0 -1
- package/dist/client/assets/panel-left-right-dashed-DKpjDHbA.js +0 -1
- package/dist/client/assets/panel-left-z297nF0Q.js +0 -1
- package/dist/client/assets/panel-right-close-CozfYumX.js +0 -1
- package/dist/client/assets/panel-right-dashed-KbQu_6RF.js +0 -1
- package/dist/client/assets/panel-right-open-CCe2xs6N.js +0 -1
- package/dist/client/assets/panel-top-DTliaF-k.js +0 -1
- package/dist/client/assets/panel-top-bottom-dashed-CYza4Obz.js +0 -1
- package/dist/client/assets/panel-top-close-DlaY1mHo.js +0 -1
- package/dist/client/assets/panel-top-dashed-BnKwyWAo.js +0 -1
- package/dist/client/assets/panel-top-open-C2PPEvTF.js +0 -1
- package/dist/client/assets/panels-left-bottom-C-SS4Fdw.js +0 -1
- package/dist/client/assets/panels-right-bottom-AiY7A3qd.js +0 -1
- package/dist/client/assets/panels-top-left-CgIljdXD.js +0 -1
- package/dist/client/assets/parasol-C5Q2po4E.js +0 -1
- package/dist/client/assets/parentheses-BlxgIovv.js +0 -1
- package/dist/client/assets/parking-meter-Bz8L1fhB.js +0 -1
- package/dist/client/assets/party-popper-B4RXg_gv.js +0 -1
- package/dist/client/assets/passwordBootstrap-BKY08CVI.js +0 -2
- package/dist/client/assets/passwordBootstrap-BKY08CVI.js.br +0 -0
- package/dist/client/assets/passwordBootstrap-BKY08CVI.js.gz +0 -0
- package/dist/client/assets/pause-DDKAfZVS.js +0 -1
- package/dist/client/assets/paw-print-B7TC87f-.js +0 -1
- package/dist/client/assets/pc-case-DqZeRdJq.js +0 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-BINWQwq2.js +0 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-BINWQwq2.js.br +0 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-BINWQwq2.js.gz +0 -0
- package/dist/client/assets/pen-DadZucOK.js +0 -1
- package/dist/client/assets/pen-line-X_oJ0NVP.js +0 -1
- package/dist/client/assets/pen-off-CsixPF_X.js +0 -1
- package/dist/client/assets/pen-tool-BwzAh-vr.js +0 -1
- package/dist/client/assets/pencil-line-BKouSdLQ.js +0 -1
- package/dist/client/assets/pencil-off-C86rhFCJ.js +0 -1
- package/dist/client/assets/pencil-ruler-BwVK482l.js +0 -1
- package/dist/client/assets/pentagon-B1L4Pvr7.js +0 -1
- package/dist/client/assets/percent-CAuTVzjw.js +0 -1
- package/dist/client/assets/person-standing-8Df0NaZU.js +0 -1
- package/dist/client/assets/philippine-peso-XlC93PIp.js +0 -1
- package/dist/client/assets/phone-LBdqtXPG.js +0 -1
- package/dist/client/assets/phone-call-Bn_ZX93S.js +0 -1
- package/dist/client/assets/phone-forwarded-Xdx9tHTl.js +0 -1
- package/dist/client/assets/phone-incoming-B8KNsS9b.js +0 -1
- package/dist/client/assets/phone-missed-DdVQczlw.js +0 -1
- package/dist/client/assets/phone-off-DlSV7K0g.js +0 -1
- package/dist/client/assets/phone-outgoing-FPli2dBm.js +0 -1
- package/dist/client/assets/pi-5zFrroys.js +0 -1
- package/dist/client/assets/piano-CPxkW08c.js +0 -1
- package/dist/client/assets/pickaxe-BSJgPqDw.js +0 -1
- package/dist/client/assets/picture-in-picture-2-D9V3exok.js +0 -1
- package/dist/client/assets/picture-in-picture-BoAgVSRK.js +0 -1
- package/dist/client/assets/pieDiagram-E7YTZNPT-CJZQc_PC.js +0 -39
- package/dist/client/assets/pieDiagram-E7YTZNPT-CJZQc_PC.js.br +0 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-CJZQc_PC.js.gz +0 -0
- package/dist/client/assets/piggy-bank-WHW5i788.js +0 -1
- package/dist/client/assets/pilcrow-D6MuZOUm.js +0 -1
- package/dist/client/assets/pilcrow-left-9d66yxDi.js +0 -1
- package/dist/client/assets/pilcrow-right-CgGff0_6.js +0 -1
- package/dist/client/assets/pill-CKg9zq-d.js +0 -1
- package/dist/client/assets/pill-bottle-BEA9ADoa.js +0 -1
- package/dist/client/assets/pipette-DgGIEVqF.js +0 -1
- package/dist/client/assets/pizza-DqHdp0eG.js +0 -1
- package/dist/client/assets/plane-fxp1MogX.js +0 -1
- package/dist/client/assets/plane-landing-Bbpf98ZU.js +0 -1
- package/dist/client/assets/plane-takeoff-BAesUM0I.js +0 -1
- package/dist/client/assets/play-CpTm6C8R.js +0 -1
- package/dist/client/assets/plug-2-D_PoNrJw.js +0 -1
- package/dist/client/assets/plug-Dahh2vxQ.js +0 -1
- package/dist/client/assets/plug-zap-DdyXMrd7.js +0 -1
- package/dist/client/assets/pocket-knife-CWFX0Frc.js +0 -1
- package/dist/client/assets/podcast-ByQCnRg5.js +0 -1
- package/dist/client/assets/pointer-BN1asIQt.js +0 -1
- package/dist/client/assets/pointer-off-DFt_KQhQ.js +0 -1
- package/dist/client/assets/popcorn-C6Hwogg-.js +0 -1
- package/dist/client/assets/popsicle-CFxkge__.js +0 -1
- package/dist/client/assets/pound-sterling-IYNDUt85.js +0 -1
- package/dist/client/assets/power-Z70XeVel.js +0 -1
- package/dist/client/assets/power-off-h1D-UgGx.js +0 -1
- package/dist/client/assets/presentation-D2PKi9wD.js +0 -1
- package/dist/client/assets/printer-DyJPxWdX.js +0 -1
- package/dist/client/assets/printer-check-BBuBNs31.js +0 -1
- package/dist/client/assets/printer-x-Cvbf_F8l.js +0 -1
- package/dist/client/assets/projector-HVo01uzz.js +0 -1
- package/dist/client/assets/proportions-Bup39s-F.js +0 -1
- package/dist/client/assets/puzzle-CoQIB_LU.js +0 -1
- package/dist/client/assets/pyramid-0gm3dT_p.js +0 -1
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Cvsk7N5U.js +0 -7
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Cvsk7N5U.js.br +0 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-Cvsk7N5U.js.gz +0 -0
- package/dist/client/assets/quote-CeNdreoE.js +0 -1
- package/dist/client/assets/rabbit-Cu69qIWF.js +0 -1
- package/dist/client/assets/radar-CnyGOlck.js +0 -1
- package/dist/client/assets/radiation-CUy5BLi5.js +0 -1
- package/dist/client/assets/radical--Kx_GSd_.js +0 -1
- package/dist/client/assets/radio-CizSzebz.js +0 -1
- package/dist/client/assets/radio-off-wi8DUC0_.js +0 -1
- package/dist/client/assets/radio-receiver-B1NDMd5x.js +0 -1
- package/dist/client/assets/radio-tower-BQFwW0pV.js +0 -1
- package/dist/client/assets/radius-CwN8D3M_.js +0 -1
- package/dist/client/assets/railroadDiagram-O6MQD6OU-BWzNgIry.js +0 -1
- package/dist/client/assets/railroadDiagram-O6MQD6OU-BWzNgIry.js.br +0 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-BWzNgIry.js.gz +0 -0
- package/dist/client/assets/rainbow-f7LR52P8.js +0 -1
- package/dist/client/assets/rat-6QPSVdXl.js +0 -1
- package/dist/client/assets/ratio-Dn3hkVC6.js +0 -1
- package/dist/client/assets/rdpSession-DwnbvB9f.js +0 -1
- package/dist/client/assets/rdpSession-DwnbvB9f.js.br +0 -0
- package/dist/client/assets/rdpSession-DwnbvB9f.js.gz +0 -0
- package/dist/client/assets/receipt-BvPCq-hl.js +0 -1
- package/dist/client/assets/receipt-cent-lsgqOwsE.js +0 -1
- package/dist/client/assets/receipt-euro-CISiaC5k.js +0 -1
- package/dist/client/assets/receipt-indian-rupee-B-7ODwvv.js +0 -1
- package/dist/client/assets/receipt-japanese-yen-DE7GiP-X.js +0 -1
- package/dist/client/assets/receipt-pound-sterling-wkvYTJBc.js +0 -1
- package/dist/client/assets/receipt-russian-ruble-Yw-hE9T0.js +0 -1
- package/dist/client/assets/receipt-swiss-franc-CfszlUwW.js +0 -1
- package/dist/client/assets/receipt-text-CYkO84cR.js +0 -1
- package/dist/client/assets/receipt-turkish-lira-DK07lvrt.js +0 -1
- package/dist/client/assets/rectangle-circle-BUizwC2g.js +0 -1
- package/dist/client/assets/rectangle-ellipsis-Cq9-A8-d.js +0 -1
- package/dist/client/assets/rectangle-goggles-ohrj0pkS.js +0 -1
- package/dist/client/assets/rectangle-horizontal-BSZnhDKz.js +0 -1
- package/dist/client/assets/rectangle-vertical-CbXFrAfK.js +0 -1
- package/dist/client/assets/recycle-Dw5AEtxQ.js +0 -1
- package/dist/client/assets/redo-2-B1QjiaQ6.js +0 -1
- package/dist/client/assets/redo-Da_gXAxz.js +0 -1
- package/dist/client/assets/redo-dot-BytT2Qhj.js +0 -1
- package/dist/client/assets/referenceSelection-CQ1z0U7y.js +0 -4
- package/dist/client/assets/referenceSelection-CQ1z0U7y.js.br +0 -0
- package/dist/client/assets/referenceSelection-CQ1z0U7y.js.gz +0 -0
- package/dist/client/assets/refresh-ccw-8dETZDlZ.js +0 -1
- package/dist/client/assets/refresh-ccw-dot-fHqCuXt5.js +0 -1
- package/dist/client/assets/refresh-cw-off-BsfKPyf4.js +0 -1
- package/dist/client/assets/refrigerator-Bgt03gc9.js +0 -1
- package/dist/client/assets/regex-DsDPWKzB.js +0 -1
- package/dist/client/assets/remove-formatting-ll9jscI7.js +0 -1
- package/dist/client/assets/repeat-1-Cp4F82_P.js +0 -1
- package/dist/client/assets/repeat-2-D_Jh4LX1.js +0 -1
- package/dist/client/assets/repeat-off-jgmHijwM.js +0 -1
- package/dist/client/assets/repeat-v7zApuQE.js +0 -1
- package/dist/client/assets/replace-DgcglMN8.js +0 -1
- package/dist/client/assets/replace-all-w2Xcv0vn.js +0 -1
- package/dist/client/assets/reply-C6sezvSF.js +0 -1
- package/dist/client/assets/reply-all-BEQDHmWJ.js +0 -1
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CV4TxjiL.js +0 -84
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CV4TxjiL.js.br +0 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CV4TxjiL.js.gz +0 -0
- package/dist/client/assets/rewind-QmOszjfJ.js +0 -1
- package/dist/client/assets/ribbon-Dgu8qoUw.js +0 -1
- package/dist/client/assets/road-CDYoJXjX.js +0 -1
- package/dist/client/assets/rocking-chair-DxT6AysG.js +0 -1
- package/dist/client/assets/roller-coaster-CHq2gqCR.js +0 -1
- package/dist/client/assets/rose-B2S_yRu0.js +0 -1
- package/dist/client/assets/rotate-3d-BCpK46Og.js +0 -1
- package/dist/client/assets/rotate-ccw-key-Bb8eQ2LI.js +0 -1
- package/dist/client/assets/rotate-ccw-square-JMu0Xrxx.js +0 -1
- package/dist/client/assets/rotate-cw-CzNiZosp.js +0 -1
- package/dist/client/assets/rotate-cw-square-BiQiUzov.js +0 -1
- package/dist/client/assets/route-CCjLbEqX.js +0 -1
- package/dist/client/assets/route-off-B6l6tRcx.js +0 -1
- package/dist/client/assets/router-Cx8XoAqR.js +0 -1
- package/dist/client/assets/rows-2-Cf3kAs05.js +0 -1
- package/dist/client/assets/rows-3-POKUC8Is.js +0 -1
- package/dist/client/assets/rows-4-CU4ckip3.js +0 -1
- package/dist/client/assets/rss-Cwpum_tu.js +0 -1
- package/dist/client/assets/ruler-9iNIY0dj.js +0 -1
- package/dist/client/assets/ruler-dimension-line-QdGbB8Ha.js +0 -1
- package/dist/client/assets/russian-ruble-DXP5TBMH.js +0 -1
- package/dist/client/assets/sailboat-DZaSiHQk.js +0 -1
- package/dist/client/assets/salad-Kd30TVMD.js +0 -1
- package/dist/client/assets/sandwich-DR2JdutC.js +0 -1
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-ooJ6d09V.js +0 -40
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-ooJ6d09V.js.br +0 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-ooJ6d09V.js.gz +0 -0
- package/dist/client/assets/satellite-B5zoG2K8.js +0 -1
- package/dist/client/assets/satellite-dish-BBBwpCXv.js +0 -1
- package/dist/client/assets/saudi-riyal-deFNFHsQ.js +0 -1
- package/dist/client/assets/save-DQvSchcf.js +0 -1
- package/dist/client/assets/save-all-DpxjxIYP.js +0 -1
- package/dist/client/assets/save-off-BzDZCbBv.js +0 -1
- package/dist/client/assets/scale-3d-C8-DAnsR.js +0 -1
- package/dist/client/assets/scale-BD9_rtZd.js +0 -1
- package/dist/client/assets/scaling-DG-kSq3G.js +0 -1
- package/dist/client/assets/scan-barcode-D_tL1z9e.js +0 -1
- package/dist/client/assets/scan-eye-PfScLycv.js +0 -1
- package/dist/client/assets/scan-face-C0d-k0G6.js +0 -1
- package/dist/client/assets/scan-heart-tHk8FLxM.js +0 -1
- package/dist/client/assets/scan-line-D7fOmIGP.js +0 -1
- package/dist/client/assets/scan-qr-code-B2vw_S4z.js +0 -1
- package/dist/client/assets/scan-search-C4hFSf16.js +0 -1
- package/dist/client/assets/scan-text-DN5d74cW.js +0 -1
- package/dist/client/assets/scan-u4ino1aN.js +0 -1
- package/dist/client/assets/school-B_CC89DH.js +0 -1
- package/dist/client/assets/scissors-line-dashed-s6pJfT5D.js +0 -1
- package/dist/client/assets/scissors-nYumuQfV.js +0 -1
- package/dist/client/assets/scooter-DasP9jQx.js +0 -1
- package/dist/client/assets/screen-share-DvnaJQja.js +0 -1
- package/dist/client/assets/screen-share-off-BPMFQ4-8.js +0 -1
- package/dist/client/assets/scroll-CJtJoi2G.js +0 -1
- package/dist/client/assets/scroll-text-DQzZAqQ_.js +0 -1
- package/dist/client/assets/search-CsN3y5zG.js +0 -1
- package/dist/client/assets/search-alert-BfX9SfVN.js +0 -1
- package/dist/client/assets/search-check-DZK6LmdU.js +0 -1
- package/dist/client/assets/search-code-DLD7blfg.js +0 -1
- package/dist/client/assets/search-slash-BgMoxUn-.js +0 -1
- package/dist/client/assets/search-x-CrA0udnn.js +0 -1
- package/dist/client/assets/section-BIbegFVL.js +0 -1
- package/dist/client/assets/send-dAIPsfVF.js +0 -1
- package/dist/client/assets/send-horizontal-Dpy_mE4w.js +0 -1
- package/dist/client/assets/send-to-back-Dxt8iMtm.js +0 -1
- package/dist/client/assets/separator-horizontal-DpGVOK-A.js +0 -1
- package/dist/client/assets/separator-vertical-7edksovH.js +0 -1
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-BnbRM36o.js +0 -162
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-BnbRM36o.js.br +0 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-BnbRM36o.js.gz +0 -0
- package/dist/client/assets/server-cog-78ViWUkB.js +0 -1
- package/dist/client/assets/server-crash-TYHhiwWX.js +0 -1
- package/dist/client/assets/server-off-Cwzxpnq4.js +0 -1
- package/dist/client/assets/sessionChatStartup-DdGVP7g3.js +0 -1
- package/dist/client/assets/sessionChatStartup-DdGVP7g3.js.br +0 -0
- package/dist/client/assets/sessionChatStartup-DdGVP7g3.js.gz +0 -0
- package/dist/client/assets/settings-2-CEzwGkYM.js +0 -1
- package/dist/client/assets/settings-CMcJdb28.js +0 -1
- package/dist/client/assets/shapes-B11VIxMR.js +0 -1
- package/dist/client/assets/share-BwM0Pzon.js +0 -1
- package/dist/client/assets/sheet-lC8ojkhr.js +0 -1
- package/dist/client/assets/shell-BmkJC4uI.js +0 -1
- package/dist/client/assets/shelving-unit-DARg3ife.js +0 -1
- package/dist/client/assets/shield-By8Qm9hI.js +0 -1
- package/dist/client/assets/shield-alert-C5SEUgi6.js +0 -1
- package/dist/client/assets/shield-ban-C25_Gr0_.js +0 -1
- package/dist/client/assets/shield-check-CM3vBhDO.js +0 -1
- package/dist/client/assets/shield-cog-M9jR9AgD.js +0 -1
- package/dist/client/assets/shield-cog-corner-Cl5apIn0.js +0 -1
- package/dist/client/assets/shield-ellipsis--RryXytN.js +0 -1
- package/dist/client/assets/shield-half-DGEs5NLI.js +0 -1
- package/dist/client/assets/shield-minus-C0i4eItP.js +0 -1
- package/dist/client/assets/shield-off-fJ3aneH2.js +0 -1
- package/dist/client/assets/shield-plus-lm61sF0n.js +0 -1
- package/dist/client/assets/shield-question-mark-DMaVb2sZ.js +0 -1
- package/dist/client/assets/shield-user-CTI3XZ6O.js +0 -1
- package/dist/client/assets/shield-x-CtmZhHkG.js +0 -1
- package/dist/client/assets/ship-DN6oj_n0.js +0 -1
- package/dist/client/assets/ship-wheel-CIdil8jy.js +0 -1
- package/dist/client/assets/shirt-BoAZ_ZfR.js +0 -1
- package/dist/client/assets/shopping-bag-BZ8ubjj5.js +0 -1
- package/dist/client/assets/shopping-basket-sYcn3kOv.js +0 -1
- package/dist/client/assets/shopping-cart-Dw0xb6_F.js +0 -1
- package/dist/client/assets/shovel-CHIR2GF5.js +0 -1
- package/dist/client/assets/shower-head-B6lSQRIO.js +0 -1
- package/dist/client/assets/shredder-DwxMB4G3.js +0 -1
- package/dist/client/assets/shrimp-C-MykqgQ.js +0 -1
- package/dist/client/assets/shrink-DfdqA9RZ.js +0 -1
- package/dist/client/assets/shrub-Dzlpk7T8.js +0 -1
- package/dist/client/assets/shuffle-DwqwHOJZ.js +0 -1
- package/dist/client/assets/sigma-CnQT3V9Q.js +0 -1
- package/dist/client/assets/signal-BY0eL8VF.js +0 -1
- package/dist/client/assets/signal-high-DWX054_H.js +0 -1
- package/dist/client/assets/signal-low-BAtbd1o2.js +0 -1
- package/dist/client/assets/signal-medium-NOqFrKM9.js +0 -1
- package/dist/client/assets/signal-zero-D6uL855t.js +0 -1
- package/dist/client/assets/signature-BCsIWrMx.js +0 -1
- package/dist/client/assets/signpost-C1G6gEPR.js +0 -1
- package/dist/client/assets/signpost-big-BxkNXumO.js +0 -1
- package/dist/client/assets/siren-TnW6DCn4.js +0 -1
- package/dist/client/assets/sizeCapture-INFHLROL-Blq-Fk9E.js +0 -1
- package/dist/client/assets/sizeCapture-INFHLROL-Blq-Fk9E.js.br +0 -0
- package/dist/client/assets/sizeCapture-INFHLROL-Blq-Fk9E.js.gz +0 -0
- package/dist/client/assets/skip-back-CeU-BzQs.js +0 -1
- package/dist/client/assets/skip-forward-Dc4GVwbk.js +0 -1
- package/dist/client/assets/skull-DtNax_aa.js +0 -1
- package/dist/client/assets/slash-tIsx3Gbq.js +0 -1
- package/dist/client/assets/slice-BecgfKEU.js +0 -1
- package/dist/client/assets/sliders-horizontal-DRPbXqXJ.js +0 -1
- package/dist/client/assets/sliders-vertical-QtzuVy3C.js +0 -1
- package/dist/client/assets/smartphone-charging-CwKpDv_R.js +0 -1
- package/dist/client/assets/smartphone-nfc-b5wTUoYB.js +0 -1
- package/dist/client/assets/smile-DS4-KMEY.js +0 -1
- package/dist/client/assets/smile-plus-BWa3QKFh.js +0 -1
- package/dist/client/assets/snail-BsciIUrE.js +0 -1
- package/dist/client/assets/snowflake-CQ7BTJSS.js +0 -1
- package/dist/client/assets/soap-dispenser-droplet-gQru8CxY.js +0 -1
- package/dist/client/assets/sofa-Bzdc9EkG.js +0 -1
- package/dist/client/assets/solar-panel-CmhRfiwG.js +0 -1
- package/dist/client/assets/soup-DYNJHKB3.js +0 -1
- package/dist/client/assets/space-Bzlf1wrF.js +0 -1
- package/dist/client/assets/spade-DatuNhQ6.js +0 -1
- package/dist/client/assets/sparkle-BYlSQ76B.js +0 -1
- package/dist/client/assets/speaker-DP9VC2Bw.js +0 -1
- package/dist/client/assets/speech-C3CRqvz7.js +0 -1
- package/dist/client/assets/spell-check-2-DuMfMuAZ.js +0 -1
- package/dist/client/assets/spell-check-RAxRmxUc.js +0 -1
- package/dist/client/assets/spline-B0AWC7oy.js +0 -1
- package/dist/client/assets/spline-pointer-DBtcOnR7.js +0 -1
- package/dist/client/assets/split-CEb900rR.js +0 -1
- package/dist/client/assets/spool-DvKKuNXi.js +0 -1
- package/dist/client/assets/sport-shoe-DZ6nd0fT.js +0 -1
- package/dist/client/assets/spotlight-BUYHEArI.js +0 -1
- package/dist/client/assets/spray-can-BfW8mtxc.js +0 -1
- package/dist/client/assets/sprout-DTskdrJK.js +0 -1
- package/dist/client/assets/square-9qXz4dyO.js +0 -1
- package/dist/client/assets/square-activity-CexVUZAk.js +0 -1
- package/dist/client/assets/square-arrow-down-DNWFVuEJ.js +0 -1
- package/dist/client/assets/square-arrow-down-left-CrBXnt5g.js +0 -1
- package/dist/client/assets/square-arrow-down-right-CFqa4rrW.js +0 -1
- package/dist/client/assets/square-arrow-left-CXU0et64.js +0 -1
- package/dist/client/assets/square-arrow-out-down-left-BPZnbt7q.js +0 -1
- package/dist/client/assets/square-arrow-out-down-right-DIo68Dfj.js +0 -1
- package/dist/client/assets/square-arrow-out-up-left-BhjrN01U.js +0 -1
- package/dist/client/assets/square-arrow-right-BefB3WIu.js +0 -1
- package/dist/client/assets/square-arrow-right-enter-BXD3IymS.js +0 -1
- package/dist/client/assets/square-arrow-right-exit-Bk8ScT1C.js +0 -1
- package/dist/client/assets/square-arrow-up-C-9rDKkc.js +0 -1
- package/dist/client/assets/square-arrow-up-left-CYYPTrMA.js +0 -1
- package/dist/client/assets/square-arrow-up-right-DxH4KCB2.js +0 -1
- package/dist/client/assets/square-asterisk-DLwlm-pm.js +0 -1
- package/dist/client/assets/square-bottom-dashed-scissors-C1I7k-FX.js +0 -1
- package/dist/client/assets/square-centerline-dashed-horizontal-BT1gQXac.js +0 -1
- package/dist/client/assets/square-centerline-dashed-vertical-D97swWhW.js +0 -1
- package/dist/client/assets/square-chart-gantt-B86Fub3r.js +0 -1
- package/dist/client/assets/square-check-CLmq-kMz.js +0 -1
- package/dist/client/assets/square-check-big-DLzajEhL.js +0 -1
- package/dist/client/assets/square-chevron-down-D9rwRXTp.js +0 -1
- package/dist/client/assets/square-chevron-left-CdqDsE-c.js +0 -1
- package/dist/client/assets/square-chevron-right-bthlEErS.js +0 -1
- package/dist/client/assets/square-chevron-up-CO5M5m5e.js +0 -1
- package/dist/client/assets/square-code-B5ozVECz.js +0 -1
- package/dist/client/assets/square-dashed-CL6fHWtu.js +0 -1
- package/dist/client/assets/square-dashed-bottom-Trs38QKW.js +0 -1
- package/dist/client/assets/square-dashed-bottom-code-Bewjnf5x.js +0 -1
- package/dist/client/assets/square-dashed-kanban-C3CYHdf6.js +0 -1
- package/dist/client/assets/square-dashed-mouse-pointer-BFXU0cEN.js +0 -1
- package/dist/client/assets/square-dashed-text-CXZnYR6e.js +0 -1
- package/dist/client/assets/square-dashed-top-solid-DIS-TpyN.js +0 -1
- package/dist/client/assets/square-divide-CaCXNgC8.js +0 -1
- package/dist/client/assets/square-dot-Cj_gH8Oe.js +0 -1
- package/dist/client/assets/square-equal-CGtMy-De.js +0 -1
- package/dist/client/assets/square-function-BjjXMNJK.js +0 -1
- package/dist/client/assets/square-kanban-DUD03Pvp.js +0 -1
- package/dist/client/assets/square-library-C_c3Oczj.js +0 -1
- package/dist/client/assets/square-m-B0RG617H.js +0 -1
- package/dist/client/assets/square-menu-BIPhsOkD.js +0 -1
- package/dist/client/assets/square-minus-C6i47nfj.js +0 -1
- package/dist/client/assets/square-mouse-pointer-D6Go4-Z4.js +0 -1
- package/dist/client/assets/square-parking-CEUlIxlx.js +0 -1
- package/dist/client/assets/square-parking-off-B600ObxM.js +0 -1
- package/dist/client/assets/square-pause-D9FguBkx.js +0 -1
- package/dist/client/assets/square-pen-o1m03bEJ.js +0 -1
- package/dist/client/assets/square-percent-nQmzF5Ta.js +0 -1
- package/dist/client/assets/square-pi-BfJGjcDn.js +0 -1
- package/dist/client/assets/square-pilcrow-EL5BXoaq.js +0 -1
- package/dist/client/assets/square-play-8mlyv5Q5.js +0 -1
- package/dist/client/assets/square-plus-BPV-mou9.js +0 -1
- package/dist/client/assets/square-power-CyB_XRWN.js +0 -1
- package/dist/client/assets/square-radical-Bb3qIKvy.js +0 -1
- package/dist/client/assets/square-round-corner-BwJCmP27.js +0 -1
- package/dist/client/assets/square-scissors-Dml9fvc-.js +0 -1
- package/dist/client/assets/square-sigma-DwvkoMe9.js +0 -1
- package/dist/client/assets/square-slash-TBfltJV5.js +0 -1
- package/dist/client/assets/square-split-horizontal-DJKg4JF7.js +0 -1
- package/dist/client/assets/square-split-vertical-_QbuGIkr.js +0 -1
- package/dist/client/assets/square-square-BGmvp8y3.js +0 -1
- package/dist/client/assets/square-stack-C8h3zKfv.js +0 -1
- package/dist/client/assets/square-star-DEOv9lYH.js +0 -1
- package/dist/client/assets/square-stop-D0Vs5qip.js +0 -1
- package/dist/client/assets/square-user-TcF4fRyD.js +0 -1
- package/dist/client/assets/square-user-round-CTSsqtpz.js +0 -1
- package/dist/client/assets/square-x-CXVoTS-u.js +0 -1
- package/dist/client/assets/squares-exclude-MQ_v0Ouq.js +0 -1
- package/dist/client/assets/squares-intersect-ByxhDMun.js +0 -1
- package/dist/client/assets/squares-subtract-C0Qki3x4.js +0 -1
- package/dist/client/assets/squares-unite-AS_xsqnB.js +0 -1
- package/dist/client/assets/squircle-C_1VsFqg.js +0 -1
- package/dist/client/assets/squircle-dashed-B0Zc3FiS.js +0 -1
- package/dist/client/assets/squirrel-DADyRjE2.js +0 -1
- package/dist/client/assets/stamp-DgltcGWa.js +0 -1
- package/dist/client/assets/star-DeHdgAGy.js +0 -1
- package/dist/client/assets/star-half-CNPyjr2s.js +0 -1
- package/dist/client/assets/star-off-CRcOlp8c.js +0 -1
- package/dist/client/assets/stateDiagram-D77RDMKH-BLpdmkWQ.js +0 -1
- package/dist/client/assets/stateDiagram-D77RDMKH-BLpdmkWQ.js.br +0 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-BLpdmkWQ.js.gz +0 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-MMY7kPh-.js +0 -1
- package/dist/client/assets/step-back-Km4-ya73.js +0 -1
- package/dist/client/assets/step-forward-CzeQ1NPK.js +0 -1
- package/dist/client/assets/stethoscope-DQrjetZ9.js +0 -1
- package/dist/client/assets/sticker-DMge3hG6.js +0 -1
- package/dist/client/assets/sticky-note-BHjU3O55.js +0 -1
- package/dist/client/assets/sticky-note-check-h7A8oQWC.js +0 -1
- package/dist/client/assets/sticky-note-minus-CEGiJUp5.js +0 -1
- package/dist/client/assets/sticky-note-off-zefO4Ala.js +0 -1
- package/dist/client/assets/sticky-note-plus-CHZmspgQ.js +0 -1
- package/dist/client/assets/sticky-note-x-Cng0RE6e.js +0 -1
- package/dist/client/assets/sticky-notes-tTbdJ4R5.js +0 -1
- package/dist/client/assets/stone-B-EP5Xsd.js +0 -1
- package/dist/client/assets/store-BGjHBTMp.js +0 -1
- package/dist/client/assets/stretch-horizontal-CyQ4tkCo.js +0 -1
- package/dist/client/assets/stretch-vertical-BaWPLIRp.js +0 -1
- package/dist/client/assets/strikethrough-BNcNFpNa.js +0 -1
- package/dist/client/assets/subscript-Dq6kKgL_.js +0 -1
- package/dist/client/assets/sun-BHGL99Ov.js +0 -1
- package/dist/client/assets/sun-dim-B2G4fpwA.js +0 -1
- package/dist/client/assets/sun-medium-B4GLDEBd.js +0 -1
- package/dist/client/assets/sun-moon-3RVbHrlo.js +0 -1
- package/dist/client/assets/sun-snow-CmdIRSXS.js +0 -1
- package/dist/client/assets/sunrise-J2w6yK81.js +0 -1
- package/dist/client/assets/sunset-DFpyRYRH.js +0 -1
- package/dist/client/assets/superscript-DK7FXUS5.js +0 -1
- package/dist/client/assets/swatch-book-Dne0h3i_.js +0 -1
- package/dist/client/assets/swimlanes-42K2YHIH-B2mEjXSJ.js +0 -1
- package/dist/client/assets/swimlanes-42K2YHIH-B2mEjXSJ.js.br +0 -0
- package/dist/client/assets/swimlanes-42K2YHIH-B2mEjXSJ.js.gz +0 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-3JeFsE4Z.js +0 -8
- package/dist/client/assets/swiper-5s2kuUD5.js +0 -1
- package/dist/client/assets/swiper-5s2kuUD5.js.br +0 -0
- package/dist/client/assets/swiper-5s2kuUD5.js.gz +0 -0
- package/dist/client/assets/swiss-franc-V3pElpin.js +0 -1
- package/dist/client/assets/switch-camera-B9APUnRm.js +0 -1
- package/dist/client/assets/sword-Ck_ySSVn.js +0 -1
- package/dist/client/assets/swords-DKpcCrvZ.js +0 -1
- package/dist/client/assets/syringe-Chspn2bs.js +0 -1
- package/dist/client/assets/table-2-DPmm8AmB.js +0 -1
- package/dist/client/assets/table-9FTMynUV.js +0 -1
- package/dist/client/assets/table-cells-merge-BOkWsuz_.js +0 -1
- package/dist/client/assets/table-cells-split-CH68pbeN.js +0 -1
- package/dist/client/assets/table-columns-split-Dfbk9dSi.js +0 -1
- package/dist/client/assets/table-of-contents-CkPgayWo.js +0 -1
- package/dist/client/assets/table-properties-CPZayzvA.js +0 -1
- package/dist/client/assets/table-rows-split-Dow-ZeEB.js +0 -1
- package/dist/client/assets/tablet-DHMnMeRK.js +0 -1
- package/dist/client/assets/tablet-smartphone-CcM9H916.js +0 -1
- package/dist/client/assets/tablets-Dphyt2Ig.js +0 -1
- package/dist/client/assets/tag-DTN4A8d6.js +0 -1
- package/dist/client/assets/tags-DoUDagdu.js +0 -1
- package/dist/client/assets/tally-1-B_mt_FkX.js +0 -1
- package/dist/client/assets/tally-2-D6HhYqDn.js +0 -1
- package/dist/client/assets/tally-3-DkoIJhgK.js +0 -1
- package/dist/client/assets/tally-4-BcVTmEPk.js +0 -1
- package/dist/client/assets/tally-5-B2j4zM-p.js +0 -1
- package/dist/client/assets/tangent-DZuLOrio.js +0 -1
- package/dist/client/assets/target-Bx4CcGVV.js +0 -1
- package/dist/client/assets/telescope-CQeyDz5W.js +0 -1
- package/dist/client/assets/tent-DvtAVNHI.js +0 -1
- package/dist/client/assets/tent-tree-SyvWUXUT.js +0 -1
- package/dist/client/assets/test-tube-3pMdaslb.js +0 -1
- package/dist/client/assets/test-tube-diagonal-CDnUpDZq.js +0 -1
- package/dist/client/assets/test-tubes-DA8qt8CY.js +0 -1
- package/dist/client/assets/text-align-center-X0HPCCgW.js +0 -1
- package/dist/client/assets/text-align-end-B6IHyHgh.js +0 -1
- package/dist/client/assets/text-align-justify-OIyc_YT2.js +0 -1
- package/dist/client/assets/text-align-start-iWlUeidK.js +0 -1
- package/dist/client/assets/text-cursor-C-8QGT-Q.js +0 -1
- package/dist/client/assets/text-cursor-input-D6WG_LcN.js +0 -1
- package/dist/client/assets/text-initial-BPP7g16l.js +0 -1
- package/dist/client/assets/text-quote-CwnTnVVo.js +0 -1
- package/dist/client/assets/text-search-U1lA8O0w.js +0 -1
- package/dist/client/assets/text-wrap-BZdwk8sN.js +0 -1
- package/dist/client/assets/theater-CELGspAa.js +0 -1
- package/dist/client/assets/thermometer-ZXZwFGbH.js +0 -1
- package/dist/client/assets/thermometer-snowflake-BaDiI4r5.js +0 -1
- package/dist/client/assets/thermometer-sun-CDmbfCDT.js +0 -1
- package/dist/client/assets/thumbs-down-C7kyL1HH.js +0 -1
- package/dist/client/assets/thumbs-up-DOZJKY8w.js +0 -1
- package/dist/client/assets/ticket-CTrQKWSW.js +0 -1
- package/dist/client/assets/ticket-check-CMhqS3E2.js +0 -1
- package/dist/client/assets/ticket-minus-C5QgLH5v.js +0 -1
- package/dist/client/assets/ticket-percent-BL7dPvk_.js +0 -1
- package/dist/client/assets/ticket-plus-Da3OjSB6.js +0 -1
- package/dist/client/assets/ticket-slash-DXqUxMoT.js +0 -1
- package/dist/client/assets/ticket-x-CsxpbSu5.js +0 -1
- package/dist/client/assets/tickets-CAjPCttH.js +0 -1
- package/dist/client/assets/tickets-plane-0xx-OGI2.js +0 -1
- package/dist/client/assets/timeline-CmV_UeK6.js +0 -1
- package/dist/client/assets/timeline-definition-24CTP7MA-Bp6-u2Xe.js +0 -120
- package/dist/client/assets/timeline-definition-24CTP7MA-Bp6-u2Xe.js.br +0 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-Bp6-u2Xe.js.gz +0 -0
- package/dist/client/assets/timer-off-PpNZo6qx.js +0 -1
- package/dist/client/assets/timer-reset-DmObsA1u.js +0 -1
- package/dist/client/assets/timer-xMybfa2Y.js +0 -1
- package/dist/client/assets/toggle-left-D-wKCBSx.js +0 -1
- package/dist/client/assets/toggle-right-BolmomKP.js +0 -1
- package/dist/client/assets/toilet-bbKpluJb.js +0 -1
- package/dist/client/assets/tool-case-CbdrOuk2.js +0 -1
- package/dist/client/assets/toolbox-Dm9s0dG4.js +0 -1
- package/dist/client/assets/tornado-DDD7egQq.js +0 -1
- package/dist/client/assets/torus-DpKouzuI.js +0 -1
- package/dist/client/assets/touchpad-BEBkBJTD.js +0 -1
- package/dist/client/assets/touchpad-off-BOtZ574q.js +0 -1
- package/dist/client/assets/towel-rack-Bp82-6gq.js +0 -1
- package/dist/client/assets/tower-control-C5u4Lgok.js +0 -1
- package/dist/client/assets/toy-brick-CQKBR51K.js +0 -1
- package/dist/client/assets/tractor-DyoeT4ny.js +0 -1
- package/dist/client/assets/traffic-cone-Bm78GP3Y.js +0 -1
- package/dist/client/assets/train-front-DhmE8WZ6.js +0 -1
- package/dist/client/assets/train-front-tunnel-CQAkhKe-.js +0 -1
- package/dist/client/assets/train-track-yjTaCN2F.js +0 -1
- package/dist/client/assets/tram-front-DXLr1OKz.js +0 -1
- package/dist/client/assets/transgender-C7UCMN67.js +0 -1
- package/dist/client/assets/trash-BCWLH1FA.js +0 -1
- package/dist/client/assets/tree-deciduous-3EnZK4gL.js +0 -1
- package/dist/client/assets/tree-palm-Dpiovb4i.js +0 -1
- package/dist/client/assets/tree-pine-BT9Czv2T.js +0 -1
- package/dist/client/assets/trees-MHclJ8GK.js +0 -1
- package/dist/client/assets/trending-down-C8BWpTiY.js +0 -1
- package/dist/client/assets/trending-up-down-ChW3OIsu.js +0 -1
- package/dist/client/assets/trending-up-srY1SZNu.js +0 -1
- package/dist/client/assets/triangle-Bt4mmoxB.js +0 -1
- package/dist/client/assets/triangle-alert-DZrE7Dag.js +0 -1
- package/dist/client/assets/triangle-dashed-9cXW9BjZ.js +0 -1
- package/dist/client/assets/triangle-right-5oc68BzA.js +0 -1
- package/dist/client/assets/trophy-owbaKLJC.js +0 -1
- package/dist/client/assets/truck-CcgO3_hW.js +0 -1
- package/dist/client/assets/truck-electric-DzpxTYmu.js +0 -1
- package/dist/client/assets/turkish-lira-BzVgj9pL.js +0 -1
- package/dist/client/assets/turntable-DhtP8xI-.js +0 -1
- package/dist/client/assets/turtle-DkSEKwsh.js +0 -1
- package/dist/client/assets/tv-DfSpzAc0.js +0 -1
- package/dist/client/assets/tv-minimal-Dh06U4Vo.js +0 -1
- package/dist/client/assets/tv-minimal-play-Cvh-aEWV.js +0 -1
- package/dist/client/assets/type-CAKtk0h8.js +0 -1
- package/dist/client/assets/type-outline-C16T3ZR1.js +0 -1
- package/dist/client/assets/umbrella-DFhNE3dn.js +0 -1
- package/dist/client/assets/umbrella-off-CtD9sj3x.js +0 -1
- package/dist/client/assets/underline-nJ6Ulk_o.js +0 -1
- package/dist/client/assets/undo-2-6gs2DlEL.js +0 -1
- package/dist/client/assets/undo-Ca6PYpOG.js +0 -1
- package/dist/client/assets/undo-dot-BzVzmpNf.js +0 -1
- package/dist/client/assets/unfold-horizontal-D8ap7KDy.js +0 -1
- package/dist/client/assets/unfold-vertical-D-716mbr.js +0 -1
- package/dist/client/assets/ungroup-BqrYC851.js +0 -1
- package/dist/client/assets/university-DGCc7u3d.js +0 -1
- package/dist/client/assets/unlink-0R8zZGAh.js +0 -1
- package/dist/client/assets/unlink-2-CYrlzWvZ.js +0 -1
- package/dist/client/assets/unplug-CEiaQ7G2.js +0 -1
- package/dist/client/assets/upload-nNxBujCd.js +0 -1
- package/dist/client/assets/usb-wPS5U-4S.js +0 -1
- package/dist/client/assets/use-gesture-react.esm-CNVVA2mz.js +0 -1
- package/dist/client/assets/use-gesture-react.esm-CNVVA2mz.js.br +0 -0
- package/dist/client/assets/use-gesture-react.esm-CNVVA2mz.js.gz +0 -0
- package/dist/client/assets/user-BB1HDv2E.js +0 -1
- package/dist/client/assets/user-check-Cx3ZGiIE.js +0 -1
- package/dist/client/assets/user-cog-BPHCTNbl.js +0 -1
- package/dist/client/assets/user-key-Ccpv4Af6.js +0 -1
- package/dist/client/assets/user-lock-xIE5CG_V.js +0 -1
- package/dist/client/assets/user-minus-BiLF4bWb.js +0 -1
- package/dist/client/assets/user-pen-Cz1ungxt.js +0 -1
- package/dist/client/assets/user-plus-V-jhkMoM.js +0 -1
- package/dist/client/assets/user-round-CMCJK-Jc.js +0 -1
- package/dist/client/assets/user-round-check-Bq6nLMzI.js +0 -1
- package/dist/client/assets/user-round-cog-Di3FejIS.js +0 -1
- package/dist/client/assets/user-round-key-8tM0aVgR.js +0 -1
- package/dist/client/assets/user-round-minus-Crv9HWbT.js +0 -1
- package/dist/client/assets/user-round-pen-Bgz966ui.js +0 -1
- package/dist/client/assets/user-round-plus-Bg60hznV.js +0 -1
- package/dist/client/assets/user-round-search-BME2TKHW.js +0 -1
- package/dist/client/assets/user-round-x-Bqm0AEPc.js +0 -1
- package/dist/client/assets/user-search-CUyoXer3.js +0 -1
- package/dist/client/assets/user-star-DHnTsgdT.js +0 -1
- package/dist/client/assets/user-x-RJEwO_6t.js +0 -1
- package/dist/client/assets/users-DUv9b6SR.js +0 -1
- package/dist/client/assets/users-round-DRm6kihH.js +0 -1
- package/dist/client/assets/utensils-IIcUOeRD.js +0 -1
- package/dist/client/assets/utensils-crossed-CdT5ruZV.js +0 -1
- package/dist/client/assets/utility-pole-BRLq5L2g.js +0 -1
- package/dist/client/assets/van-CjklVt1Y.js +0 -1
- package/dist/client/assets/variable-BbqnIvcJ.js +0 -1
- package/dist/client/assets/vault-VSkuVamo.js +0 -1
- package/dist/client/assets/vector-square-he31v-1g.js +0 -1
- package/dist/client/assets/vegan-z7E6YPIP.js +0 -1
- package/dist/client/assets/venetian-mask-D21l5Txl.js +0 -1
- package/dist/client/assets/vennDiagram-4TSXK5OY-C1BJmRyk.js +0 -34
- package/dist/client/assets/vennDiagram-4TSXK5OY-C1BJmRyk.js.br +0 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-C1BJmRyk.js.gz +0 -0
- package/dist/client/assets/venus-CFqfG46O.js +0 -1
- package/dist/client/assets/venus-and-mars-CwMlbMLX.js +0 -1
- package/dist/client/assets/vibrate-D1Lsbtr6.js +0 -1
- package/dist/client/assets/vibrate-off-DvObnQ5r.js +0 -1
- package/dist/client/assets/video-off-BIXQTaYg.js +0 -1
- package/dist/client/assets/videoCompression-shaA4VPG.js +0 -3
- package/dist/client/assets/videoCompression-shaA4VPG.js.br +0 -0
- package/dist/client/assets/videoCompression-shaA4VPG.js.gz +0 -0
- package/dist/client/assets/videotape-M69dUODx.js +0 -1
- package/dist/client/assets/view-C8Y9Kwvn.js +0 -1
- package/dist/client/assets/voicemail-Ckw62nYv.js +0 -1
- package/dist/client/assets/volleyball-wi-JVa29.js +0 -1
- package/dist/client/assets/volume-1-srm2d82M.js +0 -1
- package/dist/client/assets/volume-2-CDSV6OYC.js +0 -1
- package/dist/client/assets/volume-B-3e3rKU.js +0 -1
- package/dist/client/assets/volume-off-VP6hGPJQ.js +0 -1
- package/dist/client/assets/volume-x-Bx0_zmLM.js +0 -1
- package/dist/client/assets/vote-0aceATMi.js +0 -1
- package/dist/client/assets/wallet-CHNi4Jo4.js +0 -1
- package/dist/client/assets/wallet-cards-U8fF7Ly4.js +0 -1
- package/dist/client/assets/wallet-minimal-BhMIpi0O.js +0 -1
- package/dist/client/assets/wallpaper-hVkZIYky.js +0 -1
- package/dist/client/assets/wand-D9G3YlBC.js +0 -1
- package/dist/client/assets/wand-sparkles-kfgfhW1V.js +0 -1
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-TI8n9QqA.js +0 -78
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-TI8n9QqA.js.br +0 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-TI8n9QqA.js.gz +0 -0
- package/dist/client/assets/warehouse-15WT0u7b.js +0 -1
- package/dist/client/assets/washing-machine-D-BO_SwL.js +0 -1
- package/dist/client/assets/watch-BjePdoRK.js +0 -1
- package/dist/client/assets/waves-arrow-down-BwVChgfS.js +0 -1
- package/dist/client/assets/waves-arrow-up-6hwS5bA2.js +0 -1
- package/dist/client/assets/waves-horizontal-C9sjA2XS.js +0 -1
- package/dist/client/assets/waves-ladder-WfBtjHsj.js +0 -1
- package/dist/client/assets/waves-vertical-Ced6lb-Z.js +0 -1
- package/dist/client/assets/waypoints-V80kQake.js +0 -1
- package/dist/client/assets/webcam-CP3Monkg.js +0 -1
- package/dist/client/assets/webhook-BKCaD7VK.js +0 -1
- package/dist/client/assets/webhook-off-DI_WFZHE.js +0 -1
- package/dist/client/assets/weight-BWhi8jI0.js +0 -1
- package/dist/client/assets/weight-tilde-DxVBkPmf.js +0 -1
- package/dist/client/assets/wheat-DjE6s4UV.js +0 -1
- package/dist/client/assets/wheat-off-DVyQGkYk.js +0 -1
- package/dist/client/assets/whole-word-DMkphwjF.js +0 -1
- package/dist/client/assets/wifi-Dc4j3qk7.js +0 -1
- package/dist/client/assets/wifi-cog-B-wFo7I0.js +0 -1
- package/dist/client/assets/wifi-high-C2ZnJbVZ.js +0 -1
- package/dist/client/assets/wifi-low-B3VQ6KkB.js +0 -1
- package/dist/client/assets/wifi-pen-CoiA7Ej4.js +0 -1
- package/dist/client/assets/wifi-sync-fwfLhC__.js +0 -1
- package/dist/client/assets/wifi-zero-SeOqAvwK.js +0 -1
- package/dist/client/assets/wind-B79c20RC.js +0 -1
- package/dist/client/assets/wind-arrow-down-BHh2VEkw.js +0 -1
- package/dist/client/assets/wine-Bpa3bw7N.js +0 -1
- package/dist/client/assets/wine-off-CpKYf4Rq.js +0 -1
- package/dist/client/assets/workflow-C0KfGh0p.js +0 -1
- package/dist/client/assets/worm-CGGCb6xs.js +0 -1
- package/dist/client/assets/wrench-CLEnBPgq.js +0 -1
- package/dist/client/assets/x-line-top-CyDgzB5U.js +0 -1
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-ZgJ7fCxh.js +0 -7
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-ZgJ7fCxh.js.br +0 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-ZgJ7fCxh.js.gz +0 -0
- package/dist/client/assets/zap-C6YNk3mo.js +0 -1
- package/dist/client/assets/zap-off-WLSb6U-8.js +0 -1
- package/dist/client/assets/zodiac-aquarius-BUx7Hvf0.js +0 -1
- package/dist/client/assets/zodiac-aries-ClFWCZUb.js +0 -1
- package/dist/client/assets/zodiac-cancer-BINRLEXA.js +0 -1
- package/dist/client/assets/zodiac-capricorn-DpotOpHn.js +0 -1
- package/dist/client/assets/zodiac-gemini-DKpic8xG.js +0 -1
- package/dist/client/assets/zodiac-leo-DkqhioQA.js +0 -1
- package/dist/client/assets/zodiac-libra-B9LlQC5Y.js +0 -1
- package/dist/client/assets/zodiac-ophiuchus-CZuj8tSp.js +0 -1
- package/dist/client/assets/zodiac-pisces-Ctbzi-TH.js +0 -1
- package/dist/client/assets/zodiac-sagittarius-Zp0bjwiU.js +0 -1
- package/dist/client/assets/zodiac-scorpio-D_n2j0yg.js +0 -1
- package/dist/client/assets/zodiac-taurus-zH9pj_SG.js +0 -1
- package/dist/client/assets/zodiac-virgo-gzMvkN55.js +0 -1
- package/dist/client/assets/zoom-in-RZejM0po.js +0 -1
- package/dist/client/assets/zoom-out-CGlf-_aT.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/passwordBootstrap-SIs7oJj5.js","assets/dnd-CYu7YLJF.js","assets/terminal-DaiFCKy_.js","assets/videoCompression-Bd2D9ZoI.js","assets/SessionResourceSidebar-xG752lqP.js","assets/RecordingSaveDialog-jfwVX9vZ.js","assets/use-gesture-react.esm-DvXI19pJ.js","assets/gestureArbiter-DszagC-d.js","assets/house-EQZbvQkq.js","assets/folder-tree-Dhb0qKAH.js","assets/upload-3avayZyR.js","assets/SessionChatView-Cx0hPmQ-.js","assets/sessionChatStartup-DDCzh-as.js","assets/sessionChatStartup-BqUw9ShQ.css","assets/Markdown-DKIPWnd3.js","assets/swiper-CYYt54zb.js","assets/swiper-C2J0D0kV.css","assets/referenceSelection-BI72ukaH.js","assets/list-tree-CEftKL7n.js","assets/Markdown-DKQhs57e.css","assets/quote-aa2eYlsd.js","assets/sliders-horizontal-Dg_RWDPx.js","assets/history-VQNwQYw5.js","assets/arrow-down-D-z7lHXC.js","assets/App-DtFyFpq9.js","assets/link-D4yDVdfg.js","assets/layout-grid-YImtd0Px.js","assets/log-out-BStxQHk-.js","assets/triangle-alert-msoQOzC0.js","assets/grip-vertical-BnLaSue5.js","assets/wand-sparkles-BAmBlg2T.js","assets/file-up-D_uowLlt.js","assets/corner-down-left-z0vdZ3KB.js","assets/clipboard-ByVAmeTE.js","assets/move-xoikBbb2.js","assets/clipboard-paste-WKCCOanD.js","assets/v4-EwEgHOG0.js","assets/GitLoadingSkeleton-BNMEA5PP.js","assets/panel-left-close-CvvSJE1J.js","assets/panel-left-open-COu_UmlK.js","assets/panel-right-close-Dh-w7qUu.js","assets/panel-right-open-B0V-3rAp.js","assets/archive-C5yZf2-U.js","assets/circle-question-mark-dfJRNmG5.js","assets/circle-dot-CKIQzhPM.js","assets/settings-CcIc1_zC.js","assets/search-CZJC7NYm.js","assets/users-D4FMIBC_.js","assets/settings-2-oGNqnTdu.js","assets/layout-dashboard-D4zZNWd-.js","assets/star-wq0EGPzp.js","assets/circle-DlWa1vec.js","assets/play-BJvo8H1D.js","assets/send-Bl37bA4r.js","assets/external-link-BgP6hs-_.js","assets/maximize-2-Dv1NmN2e.js","assets/calendar-clock-C82nqlq8.js","assets/pause-DfWjNimX.js","assets/unlink-DXimkNoM.js","assets/chart-bar-CL1uT4eT.js","assets/workflow-CHzKNmGF.js","assets/rows-2-CIxnGDmI.js","assets/grid-2x2-CyjqR97Z.js","assets/pencil-line-UYCRyYjS.js","assets/git-branch-BTVy-0_n.js","assets/git-compare-B3yPJE_y.js","assets/network-CoirzdsE.js","assets/AndroidMirrorView-BBIr49Mj.js","assets/unplug-CdU0fZOj.js","assets/plug-B1tNrvq6.js","assets/camera-B6uFfIIv.js","assets/square-DlNzigrF.js","assets/minimize-DJNow9cL.js","assets/maximize-2dsoznrL.js","assets/monitor-smartphone-BFmm65ct.js","assets/layers-C8Jz_Sx4.js","assets/bell-6UWfJQD-.js","assets/rotate-cw-Cydjjht_.js","assets/volume-1-BqvtHFLw.js","assets/volume-2-CNkNPKYL.js","assets/power-By_KQxE-.js","assets/keyboard-7eTLXx2o.js","assets/minus-ZVvm79Y3.js","assets/hand-DubbISZh.js","assets/undo-2-BDfptxd_.js","assets/stethoscope-DL2sZ0BL.js","assets/code-i5k-y5zc.js","assets/shield-alert-D7tIqvL9.js","assets/shield-check-CzqJntw7.js","assets/mouse-pointer-2-BJuyb9cG.js","assets/moon-BGOR34LQ.js","assets/sun-BPPs_5ax.js","assets/cable-O5K494tn.js","assets/hash-BeonM7CM.js","assets/clock-DSrmnbe5.js","assets/pen-line-TJHANkVa.js","assets/type-D6nZpU0V.js","assets/App-D-2enNLe.css","assets/DagPlayground-CdJBbXwP.js","assets/ChangeWalkthroughPanel-DnkwhYzv.js","assets/chevron-left-OkPzhoXp.js","assets/minimize-2-23nv6e_h.js","assets/DiffLab-yG2XUfTH.js","assets/DiffViewer-BJJZp4gv.js","assets/link-CjzOgSPN.js","assets/DiffViewer-T3uj2-aP.css","assets/DiffReviewLab-DEcsYe4A.js","assets/DiffReview-9CuVTA8N.js","assets/list-CQPKICpo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as Vu,g as fy,R as Ut,f as w,r as Vn,j as FS}from"./dnd-CYu7YLJF.js";import{T as US,l as HS}from"./terminal-DaiFCKy_.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const $S="modulepreload",zS=function(e){return"/"+e},$h={},tn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=i?.nonce||i?.getAttribute("nonce");o=c(n.map(d=>{if(d=zS(d),d in $h)return;$h[d]=!0;const u=d.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":$S,u||(h.as="script"),h.crossOrigin="",h.href=d,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};var wl={exports:{}},fs={};var zh;function qS(){if(zh)return fs;zh=1;var e=Vu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,d){var u,f={},h=null,p=null;d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(p=c.ref);for(u in c)r.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:a,key:h,ref:p,props:f,_owner:o.current}}return fs.Fragment=n,fs.jsx=i,fs.jsxs=i,fs}var qh;function KS(){return qh||(qh=1,wl.exports=qS()),wl.exports}var l=KS();function GS(){typeof crypto>"u"||typeof crypto.randomUUID=="function"||Object.defineProperty(crypto,"randomUUID",{configurable:!0,value:()=>{const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}})}GS();const Dr="termdock-secure-target-v1",Yu="termdock-secure-entry-v1",WS=new Set([Dr,Yu,"termdock-color-theme","termdock:locale","termdock.federation.connections.v1"]),qi=typeof Storage>"u"?void 0:Storage.prototype.getItem,bl=typeof Storage>"u"?void 0:Storage.prototype.setItem,Kh="termdock-secure-legacy-owner",Tc=typeof window<"u"&&window.parent!==window&&location.pathname==="/workspace.html";function VS(){if(typeof window>"u")return null;try{if(Tc){const t=new URLSearchParams(location.search).get("termdock-workspace"),n=JSON.parse(localStorage.getItem("termdock.federation.connections.v1")||"[]"),r=Array.isArray(n)?n.find(o=>o?.targetPeerId===t):void 0;return r&&typeof r.url=="string"&&typeof r.targetPeerId=="string"?{...r,serviceName:r.label||r.serviceName}:null}const e=JSON.parse(sessionStorage.getItem(Dr)??localStorage.getItem(Dr)??"null");return e&&typeof e.url=="string"&&typeof e.targetPeerId=="string"?e:null}catch{return null}}let pi=VS();const Rd=new Set,ko=pi?.targetPeerId??"unpaired";function ht(){return pi}function YS(e){return Rd.add(e),()=>Rd.delete(e)}function hy(){for(const e of Rd)e(pi)}function Xu(e){if(pi=e,hy(),Tc)return;const t=JSON.stringify(e);sessionStorage.setItem(Dr,t),localStorage.setItem(Dr,t)}function XS(){pi=null,hy(),!Tc&&(localStorage.removeItem(Dr),sessionStorage.removeItem(Dr),localStorage.removeItem(Yu))}function Hs(e,t=ko){return WS.has(e)||e.startsWith("termdock-secure-")?e:`termdock-service:${t}:${e}`}function JS(e){if(!(!qi||!bl))try{if(qi.call(localStorage,Kh))return;bl.call(localStorage,Kh,e);for(const n of[localStorage,sessionStorage]){const r=Array.from({length:n.length},(o,s)=>n.key(s)).filter(o=>!!o);for(const o of r){if(o.startsWith("termdock-service:")||Hs(o,e)===o)continue;const s=Hs(o,e),i=qi.call(n,o);i!==null&&qi.call(n,s)===null&&bl.call(n,s,i)}}}catch{}}let Gh=!1;function ZS(){if(Gh||typeof Storage>"u")return;Gh=!0;const e=Storage.prototype.getItem,t=Storage.prototype.setItem,n=Storage.prototype.removeItem;Storage.prototype.getItem=function(r){return e.call(this,Hs(String(r)))},Storage.prototype.setItem=function(r,o){t.call(this,Hs(String(r)),o)},Storage.prototype.removeItem=function(r){n.call(this,Hs(String(r)))}}ZS();const QS={},Wh=e=>{let t;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,p))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>d,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(QS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,o,c);return c},py=e=>e?Wh(e):Wh;var vl={exports:{}},xl={},Sl={exports:{}},El={};var Vh;function eE(){if(Vh)return El;Vh=1;var e=Vu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var p=h(),g=r({inst:{value:p,getSnapshot:h}}),m=g[0].inst,b=g[1];return s(function(){m.value=p,m.getSnapshot=h,c(m)&&b({inst:m})},[f,p,h]),o(function(){return c(m)&&b({inst:m}),f(function(){c(m)&&b({inst:m})})},[f]),i(p),p}function c(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function d(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return El.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,El}var Yh;function tE(){return Yh||(Yh=1,Sl.exports=eE()),Sl.exports}var Xh;function nE(){if(Xh)return xl;Xh=1;var e=Vu(),t=tE();function n(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return xl.useSyncExternalStoreWithSelector=function(d,u,f,h,p){var g=s(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(A){if(!k){if(k=!0,x=A,A=h(A),p!==void 0&&m.hasValue){var E=m.value;if(p(E,A))return T=E}return T=A}if(E=T,r(x,A))return E;var v=h(A);return p!==void 0&&p(E,v)?(x=A,E):(x=A,T=v)}var k=!1,x,T,_=f===void 0?null:f;return[function(){return y(u())},_===null?void 0:function(){return y(_())}]},[u,f,h,p]);var b=o(d,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},xl}var Jh;function rE(){return Jh||(Jh=1,vl.exports=nE()),vl.exports}var oE=rE();const sE=fy(oE),my={},{useDebugValue:iE}=Ut,{useSyncExternalStoreWithSelector:aE}=sE;let Zh=!1;const cE=e=>e;function gy(e,t=cE,n){(my?"production":void 0)!=="production"&&n&&!Zh&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Zh=!0);const r=aE(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return iE(r),r}const Qh=e=>{(my?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?py(e):e,n=(r,o)=>gy(t,r,o);return Object.assign(n,t),n},pr=e=>e?Qh(e):Qh;const yy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const lE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const dE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ep=e=>{const t=dE(e);return t.charAt(0).toUpperCase()+t.slice(1)};var kl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const uE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},fE=w.createContext({}),hE=()=>w.useContext(fE),pE=w.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>{const{size:d=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:p=""}=hE()??{},g=r??f?Number(n??u)*24/Number(t??d):n??u;return w.createElement("svg",{ref:c,...kl,width:t??d??kl.width,height:t??d??kl.height,stroke:e??h,strokeWidth:g,className:yy("lucide",p,o),...!s&&!uE(a)&&{"aria-hidden":"true"},...a},[...i.map(([m,b])=>w.createElement(m,b)),...Array.isArray(s)?s:[s]])});const me=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(pE,{ref:s,iconNode:t,className:yy(`lucide-${lE(ep(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ep(e),n};const wy=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]],by=me("arrow-down-a-z",wy),EM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:wy,default:by},Symbol.toStringTag,{value:"Module"}));const vy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ju=me("arrow-left",vy),kM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:vy,default:Ju},Symbol.toStringTag,{value:"Module"}));const xy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sy=me("arrow-right",xy),IM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:xy,default:Sy},Symbol.toStringTag,{value:"Module"}));const Ey=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ky=me("arrow-up-right",Ey),CM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ey,default:ky},Symbol.toStringTag,{value:"Module"}));const Iy=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M11.68 2.009A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673c-.824-.85-1.678-1.731-2.21-3.348",key:"xaq59h"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Zu=me("bell-dot",Iy),TM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Iy,default:Zu},Symbol.toStringTag,{value:"Module"}));const Cy=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Ty=me("bot",Cy),AM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Cy,default:Ty},Symbol.toStringTag,{value:"Module"}));const Ay=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Ry=me("box",Ay),RM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ay,default:Ry},Symbol.toStringTag,{value:"Module"}));const Py=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ny=me("briefcase",Py),PM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Py,default:Ny},Symbol.toStringTag,{value:"Module"}));const _y=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mn=me("check",_y),NM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:_y,default:Mn},Symbol.toStringTag,{value:"Module"}));const Ly=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Or=me("chevron-down",Ly),_M=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ly,default:Or},Symbol.toStringTag,{value:"Module"}));const jy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Un=me("chevron-right",jy),LM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:jy,default:Un},Symbol.toStringTag,{value:"Module"}));const Dy=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Oy=me("chevron-up",Dy),jM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Dy,default:Oy},Symbol.toStringTag,{value:"Module"}));const My=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],By=me("circle-alert",My),DM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:My,default:By},Symbol.toStringTag,{value:"Module"}));const Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Uy=me("circle-check",Fy),OM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Fy,default:Uy},Symbol.toStringTag,{value:"Module"}));const Hy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Da=me("clock-3",Hy),MM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Hy,default:Da},Symbol.toStringTag,{value:"Module"}));const $y=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],zy=me("code-xml",$y),BM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:$y,default:zy},Symbol.toStringTag,{value:"Module"}));const qy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Ky=me("columns-2",qy),FM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:qy,default:Ky},Symbol.toStringTag,{value:"Module"}));const Gy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],mi=me("copy",Gy),UM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Gy,default:mi},Symbol.toStringTag,{value:"Module"}));const Wy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ac=me("download",Wy),HM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Wy,default:Ac},Symbol.toStringTag,{value:"Module"}));const Vy=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Mr=me("ellipsis",Vy),$M=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Vy,default:Mr},Symbol.toStringTag,{value:"Module"}));const Yy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Xy=me("file-code",Yy),zM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Yy,default:Xy},Symbol.toStringTag,{value:"Module"}));const Jy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Zy=me("file-text",Jy),qM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Jy,default:Zy},Symbol.toStringTag,{value:"Module"}));const Qy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Qu=me("file",Qy),KM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Qy,default:Qu},Symbol.toStringTag,{value:"Module"}));const ew=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],$s=me("folder-open",ew),GM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ew,default:$s},Symbol.toStringTag,{value:"Module"}));const tw=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],Rc=me("folder-search",tw),WM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:tw,default:Rc},Symbol.toStringTag,{value:"Module"}));const nw=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Pc=me("folder",nw),VM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:nw,default:Pc},Symbol.toStringTag,{value:"Module"}));const rw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ow=me("globe",rw),YM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:rw,default:ow},Symbol.toStringTag,{value:"Module"}));const sw=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],iw=me("lightbulb",sw),XM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:sw,default:iw},Symbol.toStringTag,{value:"Module"}));const aw=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],cw=me("link-2-off",aw),JM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:aw,default:cw},Symbol.toStringTag,{value:"Module"}));const lw=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Uo=me("link-2",lw),ZM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:lw,default:Uo},Symbol.toStringTag,{value:"Module"}));const dw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],uw=me("loader-circle",dw),QM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:dw,default:uw},Symbol.toStringTag,{value:"Module"}));const fw=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],hw=me("lock-keyhole",fw),eB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:fw,default:hw},Symbol.toStringTag,{value:"Module"}));const pw=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],gi=me("message-circle",pw),tB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:pw,default:gi},Symbol.toStringTag,{value:"Module"}));const mw=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Nc=me("monitor",mw),nB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:mw,default:Nc},Symbol.toStringTag,{value:"Module"}));const gw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],yw=me("panel-right",gw),rB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:gw,default:yw},Symbol.toStringTag,{value:"Module"}));const ww=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],bw=me("paperclip",ww),oB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ww,default:bw},Symbol.toStringTag,{value:"Module"}));const vw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],xw=me("pencil",vw),sB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:vw,default:xw},Symbol.toStringTag,{value:"Module"}));const Sw=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],ni=me("pin",Sw),iB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Sw,default:ni},Symbol.toStringTag,{value:"Module"}));const Ew=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],ri=me("pin-off",Ew),aB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ew,default:ri},Symbol.toStringTag,{value:"Module"}));const kw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ef=me("plus",kw),cB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:kw,default:ef},Symbol.toStringTag,{value:"Module"}));const Iw=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Cw=me("qr-code",Iw),lB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Iw,default:Cw},Symbol.toStringTag,{value:"Module"}));const Tw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],tf=me("refresh-cw",Tw),dB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Tw,default:tf},Symbol.toStringTag,{value:"Module"}));const Aw=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Rw=me("rocket",Aw),uB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Aw,default:Rw},Symbol.toStringTag,{value:"Module"}));const Pw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Nw=me("rotate-ccw",Pw),fB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Pw,default:Nw},Symbol.toStringTag,{value:"Module"}));const _w=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],yi=me("server",_w),hB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:_w,default:yi},Symbol.toStringTag,{value:"Module"}));const Lw=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],_c=me("smartphone",Lw),pB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Lw,default:_c},Symbol.toStringTag,{value:"Module"}));const jw=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Dw=me("sparkles",jw),mB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:jw,default:Dw},Symbol.toStringTag,{value:"Module"}));const Ow=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],nf=me("square-terminal",Ow),gB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ow,default:nf},Symbol.toStringTag,{value:"Module"}));const Mw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Bw=me("terminal",Mw),yB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Mw,default:Bw},Symbol.toStringTag,{value:"Module"}));const Fw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],rf=me("trash-2",Fw),wB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Fw,default:rf},Symbol.toStringTag,{value:"Module"}));const Uw=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Hw=me("video",Uw),bB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Uw,default:Hw},Symbol.toStringTag,{value:"Module"}));const $w=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],zw=me("wifi-off",$w),vB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:$w,default:zw},Symbol.toStringTag,{value:"Module"}));const qw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wi=me("x",qw),xB=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:qw,default:wi},Symbol.toStringTag,{value:"Module"})),mE="termdock:secure-ready";let Pd="ready";const Nd=new Set;function zs(e){if(e!==Pd){Pd=e;for(const t of Nd)t();e==="ready"&&window.dispatchEvent(new Event(mE))}}function Kw(){return w.useSyncExternalStore(e=>(Nd.add(e),()=>{Nd.delete(e)}),()=>Pd)}function Gw(e){const t=e instanceof Error?e.message:String(e);return/^(Secure connection closed|Secure connection timed out|Secure request closed|Secure response ended unexpectedly|Encrypted connection unavailable|Encrypted transport disconnected|Secure transport unavailable|Secure handshake timed out|WebSocket closed|WebSocket connection failed)$/.test(t)}const gE={architecture:{choosePaths:"Choose folders or files",browsePaths:"Browse",addScopeReference:"Add to analysis scope",searchScopePaths:"Search files or folders",useCurrentFile:"Use current file",useCurrentDirectory:"Use current folder",browsePathsHint:"Expand folders to browse. Use the reference button on a row to add it to the analysis scope.",correctPathsFirst:"Correct the entered paths before adding more scope.",pathsHint:"Choose scope or paste file/line references. Paths are relative to this project.",featureScopeHint:"Locate this feature within the selected scope first",removePath:"Remove path",chooseThisDirectory:"Select this folder",filterDirectory:"Filter this folder",loadingPaths:"Loading folder…",pathsLoadFailed:"Could not read this folder. Check connection or access, then retry.",noPaths:"No matching files or folders here.",pathsTruncated:"This folder has too many entries to show at once. Open a subfolder or paste its path directly.",selectedPaths:"Selected paths",usePaths:"Use selected scope",expandDetail:"Read module details",collapseDetail:"Collapse module details",backToMap:"Back to map",backToModule:"Back to module",previousModule:"Previous module",parentModule:"Back to parent",viewPrepared:"View this analysis",closeDetail:"Close module details",connections:"Connections",outgoing:"To",incoming:"From",browseMode:"Browse mode",outlineMode:"Module details",graphMode:"Relationship diagram",analysisNotes:"Analysis notes",limitations:"Scope and limitations",analyzedPaths:"Analyzed sources",fitGraph:"Fit entire diagram",fullscreen:"Open fullscreen diagram",closeFullscreen:"Close fullscreen diagram",panHint:"Drag to pan, pinch to zoom; select a module for details",newAnalysis:"New analysis",updateAnalysis:"Update current analysis",closePreparation:"Close analysis settings",analysisRange:"Analysis scope",projectRange:"Entire project",moduleRange:"Directory / module",featureRange:"Feature flow",modulePaths:"Module paths (one per line)",modulePlaceholder:"Choose folders/files or paste existing references, one per line",featureTarget:"Feature to understand",featurePlaceholder:"For example: file upload from selecting a file to storage",invalidPaths:"Choose up to 20 project folders/files or paste their references; outside paths and .. are not allowed.",requiredFeature:"Describe a specific feature and check that optional starting paths are project-relative.",independentHint:"Scoped analyses are saved separately. Repeating the same scope updates its map; the entire project uses the project overview.",updateOnly:"Only this analysis will be updated. Other maps are preserved.",analysisOptions:"Dependencies and other options",dependencyDepth:"Dependency tracing",boundaryDepth:"Scope boundary (faster)",followDepth:"Follow relevant calls and dependencies",startPaths:"Feature scope (optional)",focus:"Analysis request and constraints (optional)",focusPlaceholder:"For example: explain permission checks and retries; skip styling.",savedAnalyses:"Saved analyses",libraryFailed:"Could not list analyses. The current map is still available. Refresh to retry.",awaitingFile:"This analysis has not been saved yet. Send the prepared prompt to your Agent; the result will appear after the file is saved.",analyzeModule:"Analyze this module in detail",scopeUnavailable:"This scoped map is missing analysis metadata. Create a new analysis to specify its boundaries.",tab:"Map",title:"Code architecture",generate:"Generate",update:"Update",refresh:"Refresh architecture",prepare:"Prepare architecture analysis",promptHint:"Use the Agent in this project's terminal to analyze the code. The prompt goes into the current input or context draft for you to review and send. This view refreshes when the architecture is saved. Open an Agent first; analysis uses its time and allowance.",insertPrompt:"Insert prompt",copyPrompt:"Copy prompt",previewPrompt:"Review analysis prompt",inserting:"Adding to the current input…",insertFailed:"Could not add the prompt. Check the current session, or copy it below.",inserted:"Review the current input or context draft, then send it to your Agent.",copied:"Prompt copied.",failed:"Copy failed. Copy manually from the prompt below.",loading:"Reading project architecture…",invalid:"The architecture file is invalid. Analyze the project again to repair it.",loadFailed:"Could not read project architecture. Check connection and access, then retry.",previous:"The last successfully loaded architecture remains below.",retry:"Retry",empty:"Understand this project's architecture",emptyHint:"Start with the project, selected paths or one feature. A full project map is not required.",savedAt:"Saved",perspective:"Perspective",breadcrumb:"Architecture hierarchy",modules:"Modules",explore:"Explore submodules",sourceFiles:"Related source",diagram:"Architecture diagram",diagramHint:"Select a module for details",zoomOut:"Zoom out diagram",zoomIn:"Zoom in diagram",resetZoom:"Reset diagram zoom",download:"Download architecture SVG",downloadFailed:"Download failed. Please retry.",diagramFailed:"The diagram could not render. You can still explore the modules below.",rendering:"Drawing architecture…"},computer:{returnToDesktop:"Return to desktop",tools:"Control settings",closeTools:"Close control settings",keyboard:"Keyboard",keyboardInput:"Type directly on the computer",keyboardPlaceholder:"Tap to type directly on the computer",hideKeyboard:"Hide keyboard",keyboardNavigation:"Keyboard navigation",desktopZoom:"Desktop zoom",zoomIn:"Zoom in desktop",zoomOut:"Zoom out desktop",resetZoom:"Fit desktop to screen",pinchHint:"Pinch to zoom",keyEscape:"Send Esc",keyLeft:"Move left",keyDown:"Move down",keyUp:"Move up",keyRight:"Move right",keySelectAll:"Select all",clipboardTool:"Clipboard",zoom:"Zoom in",expand:"Full screen",switchTouchMode:"Switch touch mode",touchMode:"Touch mode",trackpadMode:"Trackpad",directTouchMode:"Direct touch",trackpadHint:"Slide to move, tap to click, hold to drag. Use two fingers to scroll or tap for right-click.",directTouchHint:"Tap a position on the screen to click. Drag your finger to interact with the desktop.",trustCertificateHere:"Trust this computer’s certificate",rememberLogin:"Remember login",autoConnect:"Connect automatically next time",forgetLogin:"Forget login",savedPassword:"Saved — leave empty to connect",loginExpired:"Saved login expired. Enter your password again.",loginSaveFailed:"Could not save or retrieve login details. Please retry.",title:"Computer control",host:"Computer address",hostPlaceholder:"192.168.1.20 or computer.local",username:"Username (optional)",password:"Password",passwordHint:"Enter the target computer’s VNC password. Include a username if the server requires account sign-in. Remember login encrypts credentials on the service after a successful connection.",connect:"Connect",disconnect:"Disconnect",cancel:"Cancel",connecting:"Connecting…",connected:"Connected",disconnected:"Disconnected. You can reconnect.",viewOnly:"View only",control:"Allow control",fit:"Fit to panel",actualSize:"Actual size",fullscreen:"Expand desktop",exitFullscreen:"Collapse desktop",setup:"How to connect a computer",step1:"On your Mac, open System Settings → General → Sharing → Screen Sharing.",step2:"Allow your user in Screen Sharing settings. For a VNC password, enable “VNC viewers may control screen with password”.",step3:"Enter a private computer address reachable from this service. To control the computer running this service, choose “This computer”.",networkHint:"Uses VNC port 5900. Browser-to-Termdock traffic is encrypted; use a trusted LAN or VPN for the VNC connection from the service to the target computer.",service:"Current service: {name}",remoteTitle:"Remote computer desktop",startHint:"Connect to view the desktop and control the computer with mouse, touch, and keyboard.",credentials:"Enter login credentials",authenticate:"Sign in",authFailed:"Sign-in failed. Check the username, password, and remote desktop permissions.",sharingOff:"VNC connection refused. Start desktop sharing and check port 5900.",unreachable:"Cannot reach the computer. Check the address, network, and firewall.",timeout:"Connection timed out. Make sure the target computer is awake and reachable from this service.",invalidHost:"Enter a private IP or hostname without a protocol or port.",privateOnly:"Only private or local addresses are supported. For remote access, switch to the Termdock service on the target computer.",permission:"This invitation does not authorize this computer or operation.",sharedViewUnsupported:"This VNC authentication method cannot be safely shared in view-only mode. Change the screen sharing authentication method and reconnect.",failed:"Connection failed. Please reconnect.",clipboard:"Send clipboard",clipboardPlaceholder:"Send text to the computer clipboard",clipboardHint:"Enter text and press {shortcut} to paste, or send it to the clipboard only. Character support depends on the target computer.",remoteClipboard:"Text copied on the computer",copyToDevice:"Copy to this device",clipboardCopied:"Copied to this device",clipboardAccessFailed:"System clipboard is unavailable. Enter text here to send, or select the received text and copy it manually.",clipboardSent:"Sent to computer clipboard",shortcuts:"Shortcuts",switchApps:"Switch apps",spotlight:"Spotlight search",desktop:"Show desktop",loading:"Loading computer control…",platform:"Target system",thisComputer:"This computer",otherComputer:"Another computer",target:"Computer to connect",localService:"Computer running the current Termdock service · {name}",advanced:"Advanced settings",rdpLoginHint:"Use the credentials from Remote Desktop settings.",vncLoginHint:"Use your screen sharing VNC password.",checkSettings:"Check connection settings",localHint:"Local means the computer running the current Termdock service. Enable the selected remote desktop protocol on the target first.",linuxStep1:"Ubuntu / Linux needs a VNC server. To share the current desktop with x11vnc, use an X11 session; select “Ubuntu on Xorg” at the Ubuntu login screen.",linuxStep2:"Set a VNC password and listen on port 5900. RDP-only desktop sharing cannot connect here.",linuxCommandHint:"Run these commands in a desktop terminal on the target, then enter the VNC password you set. This example only accepts connections from the service computer. Commands are not run automatically:",linuxProtocolHint:"Ubuntu 24.04’s built-in Remote Desktop uses RDP; this panel uses VNC. Wayland needs a VNC server compatible with the desktop. TigerVNC virtual desktops are separate sessions, not the current screen.",windowsStep1:"Install and start a compatible VNC server on Windows. Windows RDP Remote Desktop cannot connect here.",windowsStep2:"Set a VNC password, enable keyboard and mouse control, and allow this service to reach port 5900 through the firewall.",systemSearch:"System search",protocol:"Connection protocol",port:"RDP port",rdpUsername:"RDP username",domain:"Domain (optional)",rdpPasswordHint:"Use the RDP username and password configured in Remote Desktop settings. Ubuntu remote login credentials may differ from your system account. Remember login encrypts credentials on the service after a successful connection.",rdpBackendUnavailable:"RDP support is unavailable on this service. Complete the server-side RDP setup first.",rdpBackendRecovery:"Start the RDP backend (guacd) on the computer running this Termdock service, then refresh this page to check again. Connection settings are kept; you can also switch to VNC in advanced settings.",rdpFailed:"RDP connection failed. Check Remote Desktop, the port, and credentials. For a self-signed certificate, verify the computer’s identity before enabling certificate trust.",rdpLinuxStep1:"On Ubuntu, open Settings → System → Remote Desktop. Enable Desktop Sharing or Remote Login and configure RDP credentials.",rdpStep1:"Enable RDP on the target computer. On Windows, use Settings → System → Remote Desktop. Use VNC for built-in Mac Screen Sharing.",rdpStep2:"Enter the username, password, and port from Remote Desktop settings. The default RDP port is 3389; Ubuntu Desktop Sharing may use 3390. Verify the target before trusting a self-signed certificate.",rdpNetworkHint:"Display and input use the encrypted browser-to-Termdock channel. The current service connects to the target over RDP. Desktop Sharing and Remote Login may use different sessions; showing the current screen depends on the target service’s settings.",trustCertificate:"Trust this computer’s RDP certificate (skip verification)",settingsLoading:"Loading connection settings…",settingsSaving:"Saving settings…",settingsSaved:"Connection settings saved on this service.",settingsSaveFailed:"Settings could not be saved. Your edits are still on this page.",settingsLoadFailed:"Connection settings could not be loaded. Please retry.",retry:"Retry",retryConnect:"Retry connection",rdpCertificate:"The target computer’s RDP certificate could not be verified. After confirming the computer’s identity, trust its certificate below and retry.",clipboardFailed:"Failed to send clipboard. Try again."},app:{name:"Termdock"},android:{device:"Device",selectDevice:"Select device",noDevices:"No device found",closeTab:"Close device tab",refresh:"Refresh devices",connect:"Connect",disconnect:"Stop mirroring",addDevice:"Connect over network",addressPlaceholder:"ip:port, e.g. 192.168.1.20:5555",adbUnavailable:"adb (Android platform-tools) not found; mirroring is unavailable. macOS: brew install android-platform-tools; Ubuntu: sudo apt install adb; or set TERMDOCK_ADB_BIN in ~/.termdock/.env.",scrcpyUnavailable:"scrcpy / scrcpy-server not found; mirroring is unavailable. macOS: brew install scrcpy; Ubuntu: sudo apt install scrcpy; or set TERMDOCK_SCRCPY_BIN in ~/.termdock/.env.",connecting:"Connecting to device…",reconnecting:"Connection lost, reconnecting…",retrySchedule:"Retry {attempt} starts in {seconds} seconds",lastError:"Last error (retained while reconnecting)",retry:"Retry",idleHint:"Pick a device to start mirroring",noDevicesHint:"Connect a phone over USB with debugging enabled, or add a network device",back:"Back",home:"Home",recents:"Recents",notifications:"Notifications",rotate:"Rotate",volumeUp:"Volume up",volumeDown:"Volume down",power:"Power",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomPanHint:"Two-finger drag to move the view",inputText:"Type text",inputPlaceholder:"Text to send to the phone",send:"Send",splitOpen:"Open in split view",splitClose:"Exit split view",splitDockedHint:"Mirroring is shown in the split area.",splitDrag:"Drag to reposition",insertFixPrompt:"Insert fix prompt",screenshot:"Screenshot and insert",recordingStart:"Start recording",recordingStop:"Stop recording",recording:"Recording…",recordingLimit:"Reached the 5-minute limit, recording stopped",recordingStopped:"Mirroring stopped, recording ended",captureInserted:"Screenshot inserted",recordingInserted:"Recording inserted",recordingConfirm:"Recording finished. What next?",recordingInsert:"Insert directly",recordingSave:"Save to a folder",recordingSaveHint:"The recording is ready. Add it to the current input or save it to a folder.",recordingDiscard:"Discard recording",captureInserting:"Inserting…",recordingSaving:"Saving recording…",captureFailed:"Insert failed",captureUnavailable:"Cannot add right now. Check that this session allows input.",more:"More",fullscreen:"Fullscreen",fillSidebar:"Fill sidebar",exitFullscreen:"Exit fullscreen",fullscreenHint:"Mirroring is shown in fullscreen.",quality:"Quality",qualityAutoHint:"Adapts bitrate to connection and decoding performance without reconnecting. Resolution stays stable; controls and server recording are unaffected.",qualityAutoUnavailable:"Automatic bitrate adjustment paused; video stays connected.",qualityAutoVersionError:"Server scrcpy version is not supported (details).",qualityAutoBuildError:"Server scrcpy build has not been verified (details).",qualityAutoExtensionError:"Bitrate extension could not be read, verified or transferred (details).",qualityAutoTimeoutError:"Bitrate confirmation timed out; encoder support is unknown (details).",qualityAutoEncoderError:"Device encoder rejected this adjustment (details).",qualityAutoChannelError:"Bitrate control channel failed (details).",qualityAutoUnknownError:"Server did not provide a reason; update that server and retry (details).",qualityLow:"Smooth",qualityMedium:"Standard",qualityHigh:"HD",qualityCustom:"Custom",qualityResolution:"Resolution",qualityBitRate:"Bitrate",qualityFrameRate:"Frame rate",qualityAuto:"Auto",qualityApply:"Apply",presetNamePlaceholder:"Preset name",presetSave:"Save preset",presetDelete:"Delete preset",stateUnauthorized:"unauthorized",stateOffline:"offline",stateUnknown:"unknown state",unauthorizedHint:"Confirm the USB debugging prompt on the phone.",offlineHint:"Device is offline; reconnect the cable or network device."},common:{cancel:"Cancel",close:"Close",save:"Save",reset:"Reset",loading:"Loading…",error:"Error",retry:"Retry",refresh:"Refresh",search:"Search",clear:"Clear",delete:"Delete",on:"On",off:"Off",back:"Back",copy:"Copy",decrease:"Decrease",increase:"Increase",use:"Use",previous:"Previous",next:"Next"},login:{prompt:"termdock login",placeholder:"Enter password",placeholderBlocked:({s:e})=>`Please wait ${e}s`,submit:"Sign in",invalidPassword:"The password is incorrect, or the service identity could not be verified. Check and try again.",identityMismatch:"The service identity has changed. Check the address with its owner before trying again.",unavailable:"Password sign-in is temporarily unavailable. Check the connection and try again.",authorizationRequired:"This device needs authorization. Ask the service owner for a new invitation.",passwordNotConfigured:"The target service has no access password, and this device is not authorized. Ask the target service owner for an invitation or device authorization, then reconnect.",targetPasswordRequired:"Relay access is disabled because the target service has no valid access password. Ask the target service owner to configure one first.",securityUpgradeRequired:"Relay password protection cannot be verified. Update the target service and relay before connecting.",viaEntry:({entry:e,address:t})=>`Via relay ${e} (${t}). Use the target service password.`,currentTarget:({address:e})=>`Signing in to ${e}`,manageServices:"Manage services / use another address",failed:"Could not sign in. Check the connection and try again.",rateLimited:"Too many attempts. Please wait and try again.",continueAfterReconnect:"You can continue signing in when the network returns.",savedConnectionRetained:"Saved service retained. Access will be checked after reconnecting.",invalidAddress:"Enter a valid HTTPS service address, for example computer.example:9834 or https://computer.example:9834.",invalidInvitation:"This invitation is incomplete or invalid. Copy the full invitation link and try again."},sidebar:{sessionCreating:"Starting…",sessionCreateWaiting:"Still waiting for the service…",sessionCreateElapsed:"{seconds}s",sessionCreateContinue:"You can keep using your current session.",sessionCreateDirectoryUnavailable:"The working directory is unavailable. Choose another folder and try again.",sessionCreatePermissionDenied:"You do not have permission to start here. Choose another folder.",sessionCreateConnectionFailed:"Could not connect. Check the connection and try again.",sessionCreateFailed:"Could not start the session. Please try again.",sessions:"Sessions",noSessions:"No open sessions yet.",noMatchingSessions:"No matching sessions.",toggleSearch:"Toggle search",settings:"Settings",moreActions:"More actions",subscriptionQuota:"Subscription quota",collapseSessions:"Collapse session list",expandSessions:"Expand session list",collapseTools:"Collapse tools panel",expandTools:"Expand tools panel",runningSessionButton:"Running sessions button",runningSessionButtonHint:"Tap to cycle, swipe sideways to select, hold to drag",attentionButton:"Attention button",attentionButtonHint:"Show the yellow floating bell for unread or pending sessions",updateAvailable:({version:e})=>`Termdock ${e} is available`,updateInstalling:"Installing in the background without interrupting this service.",updateReady:"The update is installed and ready for a confirmed restart.",updateRestart:"Restart and finish update",updateRestartConfirm:({version:e})=>`Restart Termdock and switch to ${e}? This page will reconnect briefly and sessions will stay open.`,updateRestarting:"Restarting; this page will reconnect automatically…",updateFailed:"Automatic installation failed. This reminder will remain.",updateRetry:"Try again",serverAttention:"The service had a problem",filterSessions:"Filter sessions",clearSearch:"Clear search",groupByFolder:"Group by folder",groupByFolderTitle:"Collapse sessions into groups by working directory. Mutually exclusive with drag sorting.",ungrouped:"Other",needsAttention:"Needs attention",waitingForYou:"Waiting for you",completedUnread:"Completed · unread",closeSession:({name:e})=>`Close ${e}`,newShell:"Shell",newTmux:"Tmux",newTmuxDisabled:"tmux not available on server",confirmNewShell:"Create Shell?",confirmNewTmux:"Create Tmux?",newSession:"New terminal",newSessionWithAgent:({agent:e})=>`New ${e}`,moreLaunchOptions:"More launch options",recoverableSessions:"Recoverable sessions",confirmCloseRecoverableSession:({name:e})=>`End ${e}? This stops all processes in the session.`,endRecoverableSession:"End session",closeRecoverableSessionFailed:"Could not end the session. Please retry.",refreshRecoverableSessions:"Refresh recoverable sessions",restoreRecoverableSession:({name:e})=>`Restore ${e}`,restoringRecoverableSession:"Restoring…",restore:"Restore",newSessionAdvanced:"Quick-launch agent",newSessionComposerTitle:"Start a session",newSessionHint:"Choose how and where it starts",launchSessionWith:({name:e})=>`Start ${e}`,setNewSessionDefault:({name:e})=>`Set ${e} as default`,currentNewSessionDefault:({name:e})=>`${e} is the current default`,currentDefaultAgent:({name:e})=>`Current default: ${e}`,defaultAgent:"Default",makeDefault:"Make default",sessionMode:"Run mode",tmuxKeepsRunning:"Keeps running after disconnect",resumeHistory:"Recent conversations",resumeHistoryCount:({n:e})=>`${e} saved`,resumeHistoryLoading:"Loading recent Agent conversations…",resumeHistoryAction:({title:e})=>`Resume ${e}`,resumeHistoryRemove:({title:e})=>`Remove ${e} from recent conversations`,resumeHistoryLoadFailed:"Could not load recent Agent conversations.",resumeHistoryFailed:"Could not prepare this Agent conversation for resume.",resumeHistoryRemoveFailed:"Could not remove the conversation from history.",customStartupCommand:"Custom command",changeStartupCommand:"Change startup command",saveStartupCommand:"Save command",commandPreset:"Command preset",commandPresetName:"Preset name",agentDefaultCommand:"Agent original command",addAgentCommand:"+ Add command preset…",currentAgentCommand:"Current custom command",sharedAgentCommandsHint:"Shared by Todos and new sessions in this browser. Existing task configurations keep their commands.",startupCommandSaved:"Saved",saveStartupCommandFailed:"Could not save. Check browser storage permissions.",addStartupCommand:"Add custom command…",deleteStartupCommand:"Delete command",startupCommand:"Startup command",resetStartupCommand:"Reset",startupCommandPlaceholder:"e.g. vim, htop or npm run dev",agentStartupCommandHint:"Edit the full command; leave blank for the Agent default. Saved in this browser.",terminalStartupCommandHint:"Run a program in the selected directory, e.g. vim README.md. Saved in this browser.",workingDirectory:"Working directory",directoryPlaceholder:"Enter a directory path",browseDirectories:"Browse",hideDirectoryBrowser:"Hide browser",chooseDirectory:"Choose working directory",directoryPickerHint:"Open a folder, then confirm the current location.",useThisFolder:"Use folder",recentDirectories:"Recent directories",startCommand:"Start command",customCommand:"Other command",commandPlaceholder:"Optional, e.g. codex",detectAgents:"Detect agents again",savePreset:"Save as preset",createAndRun:"Create and run",createSession:"Create terminal",openLeftSidebar:"Open left sidebar",openRightSidebar:"Open right sidebar",closeSidebar:"Close sidebar"},rightSidebar:{workspace:"Workspace",currentProject:"Project",browsingLocation:"Browsing",parentFolder:"Parent folder",backToProjectRoot:"Back to project",refreshFiles:"Refresh current folder",resizeFileTree:"Drag to resize file browser",pinCurrentFolder:"Pin current folder to this project",unpinCurrentFolder:"Unpin current folder",showHiddenFiles:"Show hidden files",hideHiddenFiles:"Hide hidden files",hideGitIgnoredFiles:"Hide Git-ignored files",showGitIgnoredFiles:"Show Git-ignored files",gitIgnoreSaveFailed:"Could not save Git ignore visibility. Please retry.",gitIgnoreConfigureHint:"Long-press or right-click to configure exceptions",gitIgnoreExceptionsTitle:"Git ignore filter exceptions",gitIgnoreExceptionsHint:"Select files or folders to keep visible while filtering is enabled. Use the arrow beside a folder to browse inside it. Selected folders include all descendants; parent folders of selected files stay visible. Save to apply.",gitIgnoreExceptionsPaths:"Select files or folders",gitIgnoreExceptionsInvalid:"Select up to 200 files or folders.",gitIgnoreExceptionsLoadFailed:"Could not load this folder. Please retry.",gitIgnoreExceptionsEmptyDirectory:"This folder is empty",gitIgnoreExceptionsOpenDirectory:({name:e})=>`Open folder ${e}`,gitIgnoreExceptionsSelected:({count:e})=>`${e} selected`,gitIgnoreExceptionsClear:"Clear selection",gitIgnoreExceptionsRemove:({path:e})=>`Remove ${e}`,gitIgnoreExceptionsTruncated:"This folder has too many entries; only some are shown.",gitIgnoreExceptionsSaveFailed:"Could not save. Check that all paths are inside the current folder (up to 200), then retry.",insertCurrentFolder:"Insert current folder reference",insertCurrentFolderShort:"Insert",pinnedFolders:"Pinned",unpinFolder:({name:e})=>`Unpin ${e}`,fileWatchUnavailable:({message:e})=>`File watcher unavailable: ${e}. Click to refresh manually.`,browsingOutsideProject:"Browsing outside current project",browsingOutsideProjectHint:"Git and Changes still use the current project. File references from here are inserted as external paths.",toggleSearch:"Toggle search",refreshGit:"Refresh Git status",gitLastUpdated:({time:e})=>`Last updated: ${e}`,close:"Close",filterChanges:"Filter changes or files",searchPlaceholderContent:"Search text in files…",searchModeName:"File",searchModeContent:"Content",clearSearch:"Clear search",searchScope:"Scope",searchScopePlaceholder:"Relative folder or absolute path",resetSearchScope:"Reset to current folder",searchOptions:"Search options",searchExclude:"Exclude",searchExcludePlaceholder:"dist/**, *.lock",clearSearchExclude:"Clear exclusions",contentSearchOptions:"Content search options",matchCase:"Match case",matchWholeWord:"Whole word",useRegex:"Regex",insertGitContext:"Insert current Git context into terminal",copyGitContext:"Copy Git context",insertChangeAuditPrompt:"Explain changes",insertChangeAuditPromptTitle:"Insert the change audit prompt into the current session",changeAuditShort:"Explain changes",changeAuditLoading:"Loading hunk explanations…",changeAuditLoaded:({count:e})=>`${e} hunk explanation${e===1?"":"s"} loaded`,changeAuditLoadedAt:({time:e})=>`Generated ${e}`,changeAuditRegenerate:"Regenerate",changeAuditRefreshStale:"Fill stale",changeAuditRefreshStaleTitle:"Insert a prompt to refresh stale hunk explanations",clearChangeAudit:"Clear change explanations",clearChangeAuditTitle:"Clear hunk explanations for the current repository",changeAuditClearFailed:({message:e})=>`Failed to clear hunk explanations: ${e}`,changeAuditScopeAll:"All repositories",changeAuditScopeLabel:"Explain scope",branchAuditTitle:"Branch explanation",branchAuditShort:"Explain branch changes",branchAuditBaseLabel:"Base branch",branchAuditBasePlaceholder:"Base branch, e.g. master",branchAuditBaseSearchPlaceholder:"Search base branch",branchAuditBaseEmpty:"No branch options. Type a branch name directly.",branchAuditGenerate:"Generate",branchAuditRegenerate:"Regenerate",branchAuditGenerateTitle:"Insert a prompt to explain this branch against the base branch",branchAuditViewDiff:"View diff",branchAuditViewDiffTitle:"View target branch changes against the base branch",branchAuditDiffLoading:"Loading branch diff...",branchAuditDiffEmpty:"No changes between this branch and the base branch.",branchAuditMissingBase:({repo:e})=>`${e} has no base branch set`,branchAuditRefreshDiff:"Refresh diff",branchAuditRefreshStale:"Fill stale",branchAuditRefreshStaleTitle:"Insert a prompt to refresh stale branch explanations",branchAuditClearTitle:"Clear current branch explanation",branchAuditClearFailed:({message:e})=>`Failed to clear branch explanation: ${e}`,branchAuditCommitCount:({count:e})=>`${e} commit${e===1?"":"s"}`,branchAuditFileCount:({count:e})=>`${e} file${e===1?"":"s"}`,branchAuditTruncated:"diff truncated",branchAuditCurrent:"Saved explanation",branchAuditStale:"Explanation is stale",branchAuditEmpty:"No branch explanation yet. Generate one to persist it here for later review.",branchAuditView:"View explanations",branchAuditSaved:({count:e})=>`${e} hunk explanation${e===1?"":"s"} saved`,branchAuditGeneratedAt:({time:e})=>`Generated ${e}`,insertPreset:({label:e})=>`Insert: ${e}`,tabChanges:"Changes",tabGit:"Git",tabFiles:"Files",tabAndroid:"Device",tabComputer:"Mac",showAndroidTab:"Show device tab",showArchitectureTab:"Show architecture tab",showComputerTab:"Show computer tab",inserted:"Inserted",copied:"Copied",toggleContextDraft:"Toggle context draft",contextDraftTitle:"Context draft",contextDraftHint:"References are added here while enabled. Keep browsing, add instructions, then insert once.",contextDraftPlaceholder:"Compose a longer prompt here. Keep using sidebar references to add context…",contextDraftCollapse:"Collapse context draft",contextDraftExpand:"Expand context draft",contextDraftDisable:"Disable context draft",contextDraftClear:"Clear draft",contextDraftInsert:"Insert",contextDraftInsertAndSend:"Insert & send",contextDraftInserted:"Inserted",contextDraftSent:"Sent",contextDraftSend:"Send draft",contextDraftAppended:"Reference added",contextDraftResize:"Drag to resize, double-click for default height",contextDraftAutoCollapseAfterSend:"Collapse after insert/send",referenceInsertFailed:"Could not insert. Check the target terminal connection and retry.",contextDraftInsertFailed:"Input not accepted — draft kept. Close the active form or return to the terminal and retry.",contextDraftPending:"Waiting…",contextDraftCharacterCount:({count:e})=>`${e} chars`,selectFilePrompt:"Select a file to preview its contents",backToFileList:"Back to file list",backToPreviousPreview:"Back to source document",insertLineRef:({lineLabel:e})=>`Insert ${e}`,insertFileRef:"Insert",copyFileRef:"Copy file reference",findInFile:"Find in file",findInFilePlaceholder:"Find in this file…",previousSearchMatch:"Previous match",nextSearchMatch:"Next match",closeFileSearch:"Close file search",downloadFile:"Download file",downloadFailed:"Download failed",downloadCanceled:"Download canceled",downloadSaved:"File saved",downloadStarted:"Browser download started",uploadPending:"Uploading…",uploadInserting:"File uploaded · waiting for input acceptance…",uploadDone:({count:e})=>`${e} files uploaded`,uploadReferenceDone:"File uploaded · reference added",uploadReferenceRejected:"File uploaded; reference not added. Close the active form or return to the original terminal and retry.",uploadLimit:"Choose up to 50 files. None were uploaded; select a smaller batch.",uploadCanceled:"Upload stopped. Check the target directory before uploading again.",uploadFileCount:({count:e})=>`${e} selected files`,uploadFile:"Upload file",uploadFiles:"Upload files",insertLocalFile:"Insert local file",insertLocalImage:"Insert local image",layoutMode:"Display mode",layoutModeAuto:"Auto",layoutModeNarrow:"Narrow",layoutModeWide:"Wide",dropToUpload:"Drop files to upload",uploading:"Uploading…",uploadSuccess:({count:e})=>`${e} file${e===1?"":"s"} uploaded`,uploadFailed:"Upload failed",binaryPreviewHint:"Binary files cannot be previewed. Use the download button above to save it.",selectedLineHint:({lineLabel:e})=>`Selected ${e} · tap "Insert" below to add to terminal`,multiLineHint:"Multi-line select: tap start line, then end line",loadingImage:"Loading image…",imagePreviewHint:"Pinch or ⌘/Ctrl + scroll to zoom · double-tap to reset",imageLoadFailed:"Failed to load image preview",loadingVideo:"Loading video…",videoPreviewHint:"Click to play · hold 2× and drag forward to speed up · arrows seek/volume · space pauses",videoLoadFailed:"Failed to load video preview",videoUnsupported:"Your browser does not support this video format",videoPlay:"Play",videoPause:"Pause",videoLongPressSpeed:({rate:e})=>`Playing at ${e}×`,videoVolume:({percent:e})=>`Volume ${e}%`,videoRotate:"Rotate 90° clockwise",videoFullscreenEnter:"Enter fullscreen",videoFullscreenExit:"Exit fullscreen",model3dLoading:"Loading 3D model…",model3dExplode:"Exploded view",model3dExplodeAxis:"Explosion axis (viewer coordinates)",model3dExplodeAmount:"Explosion amount",model3dHome:"Reset view",model3dFit:"Fit visible parts",model3dFront:"Front view",model3dTop:"Top view",model3dRight:"Right view",model3dAssemble:"Restore assembly",model3dExplodedNotice:"Exploded · dimensions and references remain assembled",model3dLoadFailed:"Failed to load 3D model preview",model3dTimeout:"3D model transfer timed out. Check your connection and retry.",model3dDimensions:({dims:e})=>`Dimensions: ${e}`,model3dHintMouse:"Drag to orbit · two-finger pan · pinch or scroll to zoom",model3dHintTouch:"One finger to orbit · two fingers to zoom & pan",model3dFullscreenEnter:"Fullscreen",model3dFullscreenExit:"Exit fullscreen",model3dBgToLight:"Light background",model3dBgToDark:"Dark background",model3dRefresh:"Reload model",model3dClipToggle:"Section view",model3dClipPosition:"Section position",model3dClipFlip:"Flip section direction",model3dFeatureToggle:"Features",model3dFeatureStatus:({total:e,positioned:t})=>`Features: ${e} · positioned ${t}`,model3dFeatureInsert:"Insert reference",model3dGlossaryToggle:"Modeling terms",model3dPickToggle:"Select part / reference",model3dPickHint:"Select a part to hide it or insert a point reference",model3dHidePart:"Hide part",model3dShowAllParts:({count:e})=>`Show all (${e})`,model3dParts:"Parts",model3dCloseParts:"Close parts",model3dSearchParts:"Find a part",model3dClearPartSearch:"Clear part search",model3dHiddenParts:({count:e})=>`${e} hidden`,model3dShowNamedPart:({name:e})=>`Show ${e}`,model3dHideNamedPart:({name:e})=>`Hide ${e}`,model3dIsolateNamedPart:({name:e})=>`Only show ${e}`,model3dIsolatePart:"Only this part",model3dShowPart:"Show part",model3dNoParts:"No matching parts",model3dUndoVisibility:"Undo",model3dClearSelection:"Clear selection",model3dAllPartsVisible:"All parts visible",model3dInspectHint:"Drag to orbit · double-tap to zoom · double-tap empty space to fit",model3dUnnamedPart:({index:e})=>`Part ${e}`,model3dCanvas:"3D model",model3dMore:"More model options",edaLoading:"Rendering KiCad file…",reviewTargetChanged:"The active session changed. Return to the original session before inserting this reference.",reviewReference:"Review reference",reviewReferenceHint:"Add context, then insert. Nothing is sent automatically.",reviewSnapshot:"Snapshot of the selected viewer",reviewCapturing:"Capturing this view…",reviewIncludeImage:"Include snapshot (stored temporarily on this server)",reviewCaptureFailed:"Snapshot unavailable; location can still be inserted.",reviewNote:"Your comment (optional)",reviewNotePlaceholder:"What should change here?",reviewDetails:"View location and quoted content",reviewUploading:"Preparing reference…",reviewAddToDraft:"Add to context draft",reviewInsert:"Insert reference",reviewUploadFailed:"Could not prepare the reference. Your comment is kept. Retry, or uncheck the snapshot to insert text only.",edaLoadFailed:"Failed to render KiCad preview",edaTimeout:"KiCad preview rendering or transfer timed out. Please retry.",edaRefresh:"Render again",edaPickHint:"Click a schematic or PCB location to create an electronics annotation",edaPickedPosition:({x:e,y:t})=>`Selected ${e}%, ${t}%`,edaPickedBoardPosition:({x:e,y:t,object:n})=>`Board ${e}, ${t} mm · ${n}`,edaInspecting:"Reading board coordinates and nearby object…",edaNoNearbyObject:"No nearby object",edaInsertAnnotation:"Insert electronics annotation",csvUnnamedColumn:({index:e})=>`Column ${e}`,csvSelectedCell:({row:e,column:t})=>`Row ${e} · ${t}`,csvPickHint:({rows:e,columns:t})=>`${e} records · ${t} columns; click a cell to reference`,csvInsertAnnotation:"Insert table annotation",csvTablePreview:"Table preview: select a cell to reference its record",kicadLocalStateNotice:"This is local UI state and is not part of schematic, PCB, or manufacturing review.",kicadShowRawJson:"Show raw JSON",kicadProjectPickHint:"Select a setting to insert a reference",kicadInsertSetting:"Insert setting",markdownPreview:"Preview",markdownSource:"Source",markdownParseFailed:"Markdown preview parsing failed or exceeded its limits. Showing the source text.",markdownPreviewHint:"Tap a line/section to reference, tap another to extend; drag the left rail to select a range",htmlPreview:"Preview",htmlSource:"Source",htmlPreviewHint:"Sandboxed iframe preview; scripts run sandboxed",htmlFullscreenEnter:"Enter fullscreen preview",htmlFullscreenExit:"Exit fullscreen preview",markdownOutline:"Markdown outline",markdownOutlineShort:"Outline",closeMarkdownOutline:"Close outline",changedFromPath:({path:e})=>`from ${e}`,selectedLineFooter:({lineLabel:e})=>`Selected ${e}`,clearSelection:"Clear",allChanges:"All changes",backToChangeList:"Back to list",allRepositories:"All repositories",allRepositoriesShort:"All",repositories:"Repositories",gitRepositorySectionTitle:"Repository",gitRepositoryLabel:"Repository",gitRepositoryPlaceholder:"Select repository",gitRepositorySearchPlaceholder:"Search repositories",gitRepositoryEmpty:"No available repositories",selectRepositoryForGitActions:"Select a repository before running Git actions",selectRepositoryForDiff:"Select a repository or file to view diff",repoNotLoaded:"Tap to load",repoChangedCount:({count:e})=>`${e} change${e===1?"":"s"}`,repoStagedCount:({count:e})=>`${e} staged`,noChanges:"No changes",noMatchingChanges:"No matching changes",loadingGitChanges:"Loading Git changes…",loadingGitChangesSlow:"Large repositories can take a few seconds.",refreshingGitChanges:"Refreshing Git changes…",gitChangesLoadFailed:"Unable to load Git changes",retryGitChanges:"Retry",insertThisFile:"Insert this file reference into terminal",viewDiff:"View diff",diffViewMode:"Change file display mode",diffViewModeList:"Flat list",diffViewModeTree:"Folder tree",diffViewModeAi:"AI walkthrough",changeWalkthroughEmpty:"No AI walkthrough yet. Generate explanations to show the overview, flow, and checks here.",gitInfo:"Git context",wrapLongLines:"Wrap long lines",wrapOn:"Wrapped",wrapOff:"Raw",multiRepoScan:"Scan sub-repos",multiRepoScanTitle:"Scan this workspace for nested Git repositories. Off keeps a single-repo view, which opens much faster on large repos.",horizontalScrollHint:"Swipe left/right to see the full diff",stageFile:"Stage",stageAll:"Stage all",unstageFile:"Unstage",stashFile:"Stash",stashAll:"Stash all",restoreFile:"Restore",gitQuickActions:"Git Actions",gitUnavailable:"Current directory is not a Git repository",branchSectionTitle:"Current branch",currentBranchLabel:"Branch",switchBranchPlaceholder:"Select branch",switchBranchSearchPlaceholder:"Search local branch",switchNoBranches:"No local branches",switchBranch:"Switch",noStagedChangesShort:"no staged",stagedCount:({count:e})=>`${e} staged`,stagedCountShort:({count:e})=>`${e} staged`,commitSectionTitle:"Commit",commitReadyHint:({count:e})=>`${e} file${e===1?"":"s"} ready`,commitMessagePlaceholder:"Commit message",commitChanges:"Commit",commitNeedsStaged:"Stage changes before committing",commitAhead:"↑ Unpushed",commitBehind:"↓ Incoming",commitSynced:"Synced",recentCommitsTitle:"Recent commits",recentCommitsSearchPlaceholder:"Search commit hash or message",recentCommitsLoadMore:"Load more commits",recentCommitsEmpty:"No commit history",pushSectionTitle:"Remote sync",pushRemoteLabel:"Remote",pushRemotePlaceholder:"origin",pushRemoteSearchPlaceholder:"Search remote",pushNoRemotes:"No remotes",pushBranchLabel:"Target",pushBranchPlaceholder:({branch:e})=>`${e}`,pushBranchSearchPlaceholder:"Search branch",pushNoBranches:"No branches",pushUpstreamBadge:"upstream",pushCurrentBranchBadge:"current",pushNoUpstream:"No upstream configured",pushUpToDate:"Up to date with remote",pushAheadCount:({count:e})=>`${e} commit${e===1?"":"s"} to push`,pushBehindCount:({count:e})=>`${e} commit${e===1?"":"s"} to pull`,pushDivergedCount:({ahead:e,behind:t})=>`${e} ahead / ${t} behind`,pullChanges:"Pull",pushChanges:"Push",gitActionRunning:"Running…",gitActionFailed:({message:e})=>`Git action failed: ${e}`,confirmRestoreTitle:"Discard changes?",confirmRestoreDescription:({path:e})=>`This will discard unstaged changes in ${e}. Termdock cannot recover them.`,confirmRestorePhrase:"discard changes",confirmRestorePlaceholder:"Type “discard changes” to confirm",confirmStashAllTitle:"Stash all changes?",confirmStashAllDescription:"This moves current working tree changes, including untracked files, into a stash.",confirmAction:"Confirm",renderingHtml:"Rendering HTML…",footnotes:"Footnotes",backToFootnote:({index:e})=>`Back to footnote ${e}`,openMermaidDiagram:"Open Mermaid diagram",mermaidDiagram:"Mermaid diagram",renderingDiagram:"Rendering diagram…",markdownImage:"Markdown image",image:"Image",previousImage:"Previous image",nextImage:"Next image",closeImagePreview:"Close image preview",emptyFile:"Empty file.",insertReference:({reference:e})=>`Insert reference: ${e}`,copyReference:({reference:e})=>`Copy reference: ${e}`,byteCount:({count:e})=>`${e} bytes`,previewTruncated:"Preview truncated to 1 MB",branchCandidatesLoading:"Loading branch candidates…",includeUncommitted:"Include local uncommitted changes",includeUncommittedCurrentBranchOnly:"Available only when the compared branch is checked out",includeUncommittedHint:"Include working tree and untracked diffs when viewing or explaining changes",missingBaseReposSkipped:({repositories:e})=>`Repositories without a base branch will be skipped: ${e}`,localBranch:"local",remoteBranch:"remote"},fileTree:{insertRef:"Insert",insertRefTitle:"Insert file reference into active terminal",openDirRoot:"Open",openDirRootTitle:"Use this folder as the current browsing root",openInFileBrowser:"Reveal in Finder",openInFileBrowserTitle:"Open this item in the system file browser",openInFileBrowserFailed:"Failed to open file browser",moreDirActions:"More folder actions",searchFromDir:"Search from here",searchFromDirTitle:"Search only this folder and its descendants",pinDir:"Pin",pinDirTitle:"Pin this folder to the current project",unpinDir:"Pinned",unpinDirTitle:"Unpin this folder",pinFileTitle:"Pin this file to the current project",unpinFileTitle:"Unpin this file",pinFile:"Pin",unpinFile:"Unpin",moreFileActions:"More file actions",deleteFile:"Delete file",deleteFileConfirm:({name:e})=>`Delete “${e}”? This action cannot be undone.`,deleteFileFailed:({message:e})=>`Failed to delete file: ${e}`,noWorkingDir:"No working directory detected.",emptyDir:"Empty directory.",noMatchingFiles:"No matching files.",searching:"Searching files…",searchingWithCount:({count:e})=>`Searching… ${e} found`,searchResults:({count:e})=>`${e} results`,searchScope:"Search scope",searchTruncatedHint:({count:e})=>`Fallback search scanned a large directory and stopped after ${e} matches. Install ripgrep or refine the query for complete results.`,searchStillRunning:"Search is still running. More results will appear automatically.",showingSearchResults:({shown:e,total:t})=>`Showing ${e} of ${t}`,loadMoreSearchResults:({shown:e,total:t})=>`Show more (${e}/${t})`,contentMatchesCount:({count:e})=>`${e} file${e===1?"":"s"} with matches`,moreMatches:({count:e})=>`+${e} more match${e===1?"":"es"}`,noContentMatches:"No matches found in file contents.",contentSearchNeedsRipgrep:"Content search requires ripgrep (rg). Install it on the server to search inside files.",truncatedHint:"Showing first 1000 entries. Use search or open a smaller folder for better performance.",dropToUploadHere:"Upload here",symbolicLink:"Symbolic link",sortByModified:"Sort by recent changes",sortByName:"Sort by name",sortedByModified:"Sorted by recent changes"},diffViewer:{noFileChanges:"No changes in this file.",noUnstagedChanges:"No unstaged changes.",emptyHint:"Make some changes, or pull from a remote.",loading:"Loading diff…",insertAllDiff:"Insert current diff as context",insertFileDiff:"Insert this file's diff",insertHunkDiff:"Insert this hunk",insertLineDiff:"Insert the selected diff lines",insertHunkShort:"Insert",insertFileShort:"Insert",insertAllShort:"Insert all",stageHunk:"Stage",stageHunkTitle:"Stage only this hunk (git apply --cached)",revertHunk:"Revert",revertHunkTitle:"Revert this hunk in the worktree (cannot be undone)",revertHunkConfirm:"Confirm revert?",hunkActionReverted:"Reverted",hunkActionStaged:"Staged",hunkActionApplying:"Applying…",hunkActionUnavailable:"Cannot build a patch for this hunk",hunkActionFailed:({message:e})=>`Failed: ${e}. If the changes moved on, refresh and retry.`,auditExplanation:"Change meaning",auditStale:"Explanation stale",auditClear:"Clear explanation",auditGeneratedAt:({time:e})=>`Generated ${e}`,allDiffLabel:"all changes",allChangesLabel:"all changes",workingTree:"Working tree changes",allUnstaged:"All unstaged changes",binaryOrEmpty:"No textual changes to display.",noFinalNewline:"No newline at end of file",noHunks:"No hunks",hunkOutline:"Hunks",expandHunkRail:"Show hunk list",collapseHunkRail:"Hide hunk list",prevHunk:"Previous hunk",nextHunk:"Next hunk",prevFile:"Previous",nextFile:"Next",expandFile:"Expand file",collapseFile:"Collapse file",expandAll:"Expand all",collapseAll:"Collapse all",collapseHunk:"Collapse hunk",useBracketKeysHint:"Press [ / ] to jump between hunks",unified:"Unified",unifiedMode:"Unified view",split:"Split",splitMode:"Side-by-side view",moreActions:"More actions",view:"View",loadingPreviousFile:"Loading previous file…",loadingNextFile:"Loading next file…",resizeNavigation:"Resize diff navigation",focusPathHint:"Select a label to focus its path",whitespace:"Whitespace",whitespaceDefault:"Default",whitespaceTrim:"Ignore trailing",whitespaceIgnore:"Ignore all",whitespaceIgnoreBlankLines:"Ignore blank lines",context:"Context",expandAbove:({count:e})=>`Expand ${e} lines above`,expandBelow:({count:e})=>`Expand ${e} lines below`,contextLines:({count:e})=>`${e} lines`,contextAll:"All"},settings:{title:"Settings",appearanceSection:"Appearance and terminal",controlsSection:"Controls and alerts",serviceSection:"Service and diagnostics",serverHealthRecoveryOn:"Recovery on",serverHealthRecoveryOff:"Recovery off",serverHealthNeedsAttention:"Needs attention",font:"Font",render:"Render",workspaceLimit:"Keep service pages",workspaceUnlimited:"Unlimited",workspaceLimitHint:"Applies on this device, including the entry page. Lower limits save memory. Older background pages reconnect when revisited; terminal tasks keep running.",theme:"Theme",darkTheme:"Dark",lightTheme:"Light",newTab:"New tab",debug:"Debug",noSleep:"No sleep",noSleepUnavailable:"No network — disabled",updateTitle:"Termdock update",updateRuntimeTitle:"CLI and service runtime",updateServiceTitle:"Service updates",updateDetails:"Version details",updateHint:"A manual check downloads and installs a new version immediately. The service restarts only after you confirm.",updateCheck:"Check for updates",updateCheckAgain:"Check again",updateChecking:"Checking npm for the latest version…",updateCheckingShort:"Checking…",updateInstallingShort:"Installing…",updateCurrent:"This service is up to date.",desktopUpdateTitle:"macOS desktop app",desktopUpdateHint:"Manually check signed desktop releases published on GitHub.",desktopUpdateUnsupported:"In-app updates require an installed, signed macOS app.",desktopUpdateChecking:"Checking for a desktop update…",desktopUpdateCurrent:"The desktop app is up to date.",desktopUpdateDownloadingShort:"Downloading…",desktopUpdateDownloading:"A new version is downloading in the background…",desktopUpdateReady:"The desktop update is downloaded and ready to install.",desktopUpdateInstalling:"Restarting to install the desktop update…",desktopUpdateCheck:"Check desktop app",desktopUpdateCheckAgain:"Check again",desktopUpdateRestart:"Restart and install",desktopUpdateRestartConfirm:"Restart Termdock and install the downloaded desktop update? The terminal service and tmux sessions will remain running.",serverHealthTitle:"Service health",serverHealthHint:"What happened to the Termdock service recently.",serverHealthSupervised:"Automatic recovery is on: the service will attempt to restart if it crashes or stops responding.",serverHealthUnsupervised:"Built-in automatic recovery is off. A crash may require a manual restart.",serverHealthEnable:"Enable and restart",serverHealthEnableHint:"Enabling restarts the service and briefly disconnects clients. Plain terminals may close; tmux sessions can reconnect. Repeated startup failures stop automatic retries.",serverHealthEnabling:"Enabling…",serverHealthEnablePending:"Waiting for reconnection to confirm automatic recovery…",serverHealthEnableError:"Could not confirm automatic recovery. Reconnect to check its status. If the service is unreachable, check the startup logs on its host.",serverHealthEnableUnavailable:"This launch method cannot enable recovery here. Configure supervision on the service host; desktop and externally managed services remain managed by their launcher.",serverHealthClean:"No problems recorded.",serverHealthHistory:"Previous problem",serverHealthRunningNow:"The service is running now with automatic recovery enabled.",serverHealthLastIncident:"Last problem",serverHealthRestarted:({count:e})=>`Restarted automatically ${e}${e===1?" time":" times"}`,serverHealthGaveUp:({count:e})=>`This supervisor stopped retrying after ${e} consecutive failures.`,serverHealthSupervisorLost:"Automatic recovery is unavailable. The service is still running.",serverHealthOomNote:"Memory was near the limit before it died; the OOM killer may have taken it.",serverHealthUptime:({duration:e})=>`ran for ${e}`,serverHealthDismiss:"Got it",serverHealthDismissed:"Acknowledged",serverHealthUnknownEvent:"Something went wrong",serverHealthEventStartupFailure:"Failed to start",serverHealthEventCrash:"Crashed",serverHealthEventCrashNative:"Crashed in native code",serverHealthEventKilled:"Killed outright",serverHealthEventWedge:"Stopped responding and had to be killed",serverHealthEventPortConflict:"Could not start: the port is already in use",serverHealthEventGaveUp:"Repeated failures; retries stopped at that time",serverHealthEventExitZero:"Exited with code 0 without being asked to",serverHealthEventTerminated:"Terminated by another process",serverHealthEventSupervisorLost:"Lost contact with the supervisor",serverHealthEventUncaughtException:"Hit an uncaught exception",serverHealthEventUnhandledRejection:"Had an unhandled promise rejection",serverHealthEventExitNonzero:"Exited with an error code",notifications:"Notify",notificationsTitle:"Notification settings",notificationsHint:"Notify when an AI task finishes while Termdock is hidden.",notificationsPageHint:"Choose which Termdock events can send system notifications. The master switch controls browser permission and delivery; event switches decide what should notify you.",notificationsMaster:"System notifications",notificationsMasterHint:"Allow Termdock to send notifications when it is hidden or running as an installed PWA.",notificationsIOSInstallHint:"On iPhone and iPad, install Termdock to the Home Screen before enabling notifications.",notificationsPermission:"Permission",notificationsPermissionSystem:"Managed by macOS",notificationsTest:"Send test",notificationsTestChecking:"Waiting for macOS to confirm delivery…",notificationsTestDelivered:"Delivered to Notification Center. If no banner appeared, check the alert style and Focus.",notificationsTestFailed:"macOS did not deliver the notification. Allow Termdock in System Settings.",notificationsOpenSystemSettings:"Open system notification settings",notificationsAlertStyle:"Alert style",notificationsAlertStyleHint:"Browsers and Android still decide the final heads-up behavior. Termdock can only request quiet/default/sticky notification options.",notificationsStyleNormal:"Default",notificationsStyleNormalHint:"Sound/vibration if allowed",notificationsStyleQuiet:"Quiet",notificationsStyleQuietHint:"Status tray, no sound",notificationsStylePersistent:"Sticky",notificationsStylePersistentHint:"Stay until dismissed",notificationsEvents:"Events",notificationsAiFinished:"AI task finished",notificationsAiFinishedHint:"Notify when an AI agent stops while Termdock is in the background.",notificationsSessionExited:"Terminal exited",notificationsSessionExitedHint:"Notify when a terminal process exits on its own (closing it yourself does not trigger; delivered via Web Push).",notificationsFutureHint:"More notification types can be added here later without changing the top-level settings layout.",notificationsOffSummary:"System notifications disabled",notificationsAiOnSummary:"AI task finished enabled",notificationsExitOnSummary:"Terminal exit enabled",notificationsBothOnSummary:"AI task finished and terminal exit enabled",notificationsNoEventsSummary:"No notification events enabled",notificationsDenied:"Browser notification permission is blocked. Enable it in site settings.",notificationsUnsupported:"Notifications need HTTPS and browser support. You can also use the desktop app.",notificationsTestBody:"Notifications are enabled. You will be notified when an AI task finishes in the background.",shell:"Temporary",tmux:"Keep on disconnect",auto:"Auto",webgl:"WebGL",canvas:"Built-in",tmuxServer:"Tmux server",tmuxUnavailable:"unavailable",noTmuxSessions:"No tmux sessions on the server.",installTmuxHint:"Install tmux on the server to enable.",refresh:"Refresh",attached:"Attached",restorable:"Restorable",attach:"Attach",attaching:"Attaching…",destroy:"Destroy",sessions:({n:e})=>`${e} session${e===1?"":"s"}`,windows:({n:e})=>`${e} window${e===1?"":"s"}`,keyboardToolbar:"Keyboard toolbar",aiAgentDetection:"AI agent detection",signOut:"Sign out",language:"Language",programNamePlaceholder:"Program name (e.g. claude)",patternPlaceholder:"Regex pattern (e.g. Thinking|Generating)",statusPlaceholder:"Status",addProgram:"Add program",addPattern:"Add pattern",resetDefaults:"Reset defaults",invalidRegex:"Invalid regex",removeProgram:"Remove program",removeRule:"Remove rule",keepLabel:"keep",customColor:"Custom color",tabIndicator:"Tab indicator style",toolbarPresets:"Customize toolbar",detectionRules:"Detection rules",agentHooksHint:"With hooks installed, agents report their own status: working (green), waiting for you (amber), turn done (check) — and you get a notification the moment one needs your input. Hooks install globally but only fire inside termdock terminals.",agentHooksInstall:"Install",agentHooksInstalled:"Installed",agentHooksOutdated:"Outdated",agentHooksNeedsApproval:"Needs approval",agentHooksUnverified:"Runtime unverified",agentHooksUnverifiedHint:"The configuration exists, but Codex could not confirm that these hooks are enabled and trusted. Check /hooks in Codex.",agentHooksApprovalHint:"Run /hooks in Codex and approve the Termdock hooks",agentHooksNotInstalled:"Not installed",agentHooksUninstall:"Uninstall",agentHooksReinstall:"Reinstall",agentHooksDevMode:"Dev mode: hooks point at TS sources and need a built install to fire",agentHooksTarget:"writes to",agentAutoRename:"Automatic session titles",agentAutoRenameHint:"Update the title from recent work when an agent finishes a turn. Off by default; manual titles are never overwritten. External plugin CLIs run only after their title feature is enabled.",agentAutoRenameToggle:"Toggle automatic titles for this agent",agentAutoRenameShort:"Auto title",agentAutoRenameNamer:"Title agent",agentAutoRenameFollow:"Follow current session",agentAutoRenameModelsFromCli:"Models discovered from local CLIs",agentAutoRenameRefreshModels:"Refresh CLI models",agentAutoRenameCliDefault:"CLI default model",agentAutoRenameAutomatic:"Automatic selection",agentAutoRenameNoCli:"No supported title CLI detected",agentAutoRenameAdvanced:"Advanced title preferences",agentAutoRenamePreference:"Additional preferences",agentAutoRenamePreferenceHint:"Optional. Add preferences for title style or emphasis; Termdock keeps its default naming rules. Saved when you leave the field.",agentAutoRenamePreferencePlaceholder:"For example: emphasize user value; use action phrases; avoid technical jargon",agentAutoRenamePayloadLimit:"User-message context limit (characters)",agentAutoRenamePayloadLimitHint:"Total raw prompt-submit payload characters retained. Default 12000; range 1000–64000.",agentPlugins:"Agent Plugins",agentPluginAdd:"Add Plugin",agentPluginHint:"Public or private Git (HTTPS, HTTP, SSH) and local directories are supported. The connected service computer fetches using its Git credentials and SSH configuration. Enable hooks and title CLIs separately.",agentPluginCreate:"Create Plugin",agentPluginDelete:"Delete Plugin",agentPluginInvalid:"Invalid plugin manifest",agentPluginCopyAiPrompt:"Copy AI fix prompt",agentPluginCopied:"Copied",agentPluginSourcePlaceholder:"Git URL, git@host:team/plugin.git or local directory",agentPluginInstallPackage:"Install plugin",agentPluginAdvancedManifest:"Advanced: paste manifest.json",agentPluginUpdateAvailable:"Update available",agentPluginManualSource:"Manual manifest",agentPluginUpdate:"Update",agentPluginCheck:"Check",agentPluginDoctor:"Diagnose",agentPluginDoctorHint:"Explicitly probe plugin models without generating a title",agentPluginDoctorStatusOk:"Title and model capabilities are healthy",agentPluginDoctorStatusMissing:"titleNamer is not declared",agentPluginDoctorStatusCliDefault:"Titles are available using the CLI default model",agentPluginDoctorStatusNoModels:"No usable model data was returned",agentPluginDoctorStatusFailed:"Model probe failed",agentPluginDoctorModels:"usable models",agentPluginDoctorAutomatic:"automatic",agentPluginDoctorCliDefault:"When no model is specified, the Agent CLI default model is used",agentAutoRenameInterval:"Recheck interval",agentAutoRenameMinutes:"minutes",mobileKeyboard:"Mobile keyboard",saving:"Saving…",rulesHint:"Configure regex patterns to detect what an AI tool is doing in a terminal tab. Each rule can choose its label, color, icon style and how long the indicator is kept after output quiets down. When it stops and you haven't viewed the tab yet, the tab keeps a yellow review hint.",programsHelp:"Supports multiple programs in one config. Separate with commas.",programLabelResolution:"Program label resolution",rawCommandMapping:"Raw command mapping",rawCommandMappingHint:"Rules below map the raw command line to the tab display label. User rules run before built-ins.",genericProgramNames:"Generic program names",genericProgramNamesHint:"Trigger ps-based deep detection (e.g. node, python)",wrapperScriptNames:"Wrapper script names",wrapperScriptNamesHint:"CLI wrappers that launch another tool (e.g. aiden, npx)",shellNamesConfig:"Shell names",shellNamesHint:"Filtered out from tab display (e.g. bash, zsh)",addTag:"+ add",customRules:"Custom rules",addRule:"Add rule",localAccess:"Local access",localAccessHint:"Connection addresses and phone setup instructions",resetAutoName:"Reset auto",mobileSetupIntro:"Connect your phone to the same network as this service. If HTTPS is enabled, install and trust its CA certificate first, then open an address below.",mobileSetupDownload:"1. Scan to download the CA certificate",mobileSetupIos:"iPhone / iPad: scan with the Camera and open in Safari. Install the downloaded profile in Settings → General → VPN & Device Management, then enable full trust in Settings → General → About → Certificate Trust Settings.",mobileSetupAndroid:"Android: download the certificate and install it as a CA certificate in system security settings. Menu names vary by device.",mobileSetupConnect:"2. Open Termdock",mobileSetupConnectHint:"After trusting the certificate, scan an IP address QR code below or copy the local address to your phone browser. If the hostname does not resolve, use an IP address.",onboardingUrl:"Mobile setup",httpsActive:"HTTPS active",httpsInactive:"HTTPS inactive",caMissing:"CA download unavailable",closeSettings:"Close settings",desktopTitle:"Termdock Desktop",desktopStatusLoading:"Reading native macOS status…",desktopSwitchService:"Switch service",desktopOpenDataDirectory:"Open data directory"},toolbarPresets:{toolbarOptions:"Toolbar options",arrangement:"Arrangement",currentLayout:"Current",reorderAction:"Reorder {name}",autoMatch:"Auto match",manualShort:"Manual",previewFor:"Preview · {name}",previewTapHint:"Tap custom actions to edit",useInTerminal:"Use in this terminal",automatic:"Auto (follow program)",autoToolbar:"Auto toolbar · {name}",manualToolbar:"Current toolbar · {name}",switchToolbar:"Switch or customize toolbar",reloadTitle:"Reload saved toolbars?",reloadHint:"This discards unsaved local edits and loads the latest configuration from the service.",staleAction:"This button changed while you were editing. Your draft is still here; cancel and reopen the latest button.",previewMobile:"Mobile",previewDesktop:"Desktop",desktopPreviewHint:"Desktop shows these actions without the mobile main row.",enableDesktop:"Currently hidden on desktop · Show it",done:"Done",confirmChange:"Confirm",comboHelp:"Choose modifiers and the key to press together.",matchedHint:"In Auto mode, used for {programs}.",intro:"Keep useful actions within reach",introHint:"Choose a toolbar, then tap a button to edit it or add another.",chooseToolbar:"Toolbar to customize",baseName:"General terminal",autoHint:"Choose what to edit here. The terminal keeps its current selection mode.",baseHint:"In Auto mode, used when no other toolbar matches.",manualHint:"Choose this toolbar from the terminal switcher, or link a program in more settings.",previewHint:"Tap a button to edit. This previews the expanded action area.",fixedKeysHint:"Esc, Ctrl, paste and other fixed keys stay in the main toolbar.",editAction:"Edit {name}",newToolbar:"Make a copy",copyName:"{name} copy",moreSettings:"Name, automatic switching and more",appearance:"Button size",comfortable:"4 per row",balanced:"6 per row",compact:"8 per row",customLayout:"Custom row sizes",advanced:"Advanced settings",advancedHint:"For special key codes, multi-step input or double-tap actions.",saveAction:"Save button",addAction:"Add to toolbar",actionName:"Button name",otherKeys:"Other keys",backToKeys:"Back to button library",addKey:"Add {key}",keyAlreadyAdded:"{key} is on the toolbar",renameAction:"Rename button",actionType:"What happens when tapped",commonKeys:"Common keys",inputText:"Command or text",combination:"Key combination",rawAction:"Custom sequence",chooseKey:"Choose a key",textContent:"Text or command to type",textPlaceholder:"e.g. /compact or git status",sendEnter:"Press Enter after typing",sendEnterHint:"On submits the command immediately. Off only types the text.",namePlaceholder:"Uses the action name when empty",draftHint:"Changes apply when saved. Cancel keeps the original button.",pressSummary:"Press {key}",typeSummary:"Type “{text}”",submitSummary:"Type “{text}” and press Enter",customSummary:"Custom action",doubleTapSummary:"Includes a double-tap action",doubleTapHelp:"Sent on two quick taps. Leave empty to disable double-tap.",sequenceHelp:"Use \\r for Enter, \\t for Tab, \\u001b for Esc, and || between delayed steps.",emptyAction:"Choose a key or enter some text first.",removeButton:"Delete button",lastButton:"Keep at least one button",undo:"Undo",changed:"Toolbar updated",removed:"Button removed",restoreToolbar:"Restore this toolbar’s defaults",restoreAll:"Restore all default toolbars",restoreTitle:"Restore all default toolbars?",restoreHint:"This replaces custom toolbars and edits. You can undo afterward.",deleteTitle:"Delete this toolbar?",deleteHint:"Its program will use another matching toolbar or the general toolbar. You can undo afterward.",defaultsHint:"Using default buttons. Editing keeps the other keys.",sharedHint:"Saved on this service and shared with devices connected to it.",saving:"Saving…",saved:"Saved",loading:"Loading toolbars…",saveFailed:"Not saved to the service. Please retry.",loadFailed:"Could not load saved toolbars. Retry before editing.",conflict:"Another device changed these toolbars. Reload before editing.",reload:"Reload",configure:"Customize toolbar…",entryHint:"Edit buttons, order and size",programNames:"Use automatically for these programs",programHint:"Enter program names such as codex or vim. Leave empty to choose manually.",programPlaceholder:"Enter a program name",layoutHint:"Buttons wrap automatically. No need to count empty slots.",key_interrupt:"Interrupt running task",key_tab:"Complete / next field",key_enter:"Confirm / Enter",key_escape:"Cancel / go back",key_clear:"Clear screen",key_search:"Search command history",key_up:"Up / previous history",key_down:"Down / next history",key_left:"Move cursor left",key_right:"Move cursor right",key_home:"Start of line",key_end:"End of line",key_shiftLeft:"Shift + Left",key_deleteLine:"Delete before cursor",key_eof:"End input",preview:"Preview",presets:"Toolbars",label:"Label",new:"New",reset:"Reset",presetLabelPlaceholder:"Preset label",deletePreset:({name:e})=>`Delete preset ${e}`,matchPrograms:"Match programs",typeEnterHint:"Type & Enter",programsPlaceholder:"vim, nvim, /^claude(-code)?$/i …",programsHelp:"Plain names match as case-insensitive substrings. Wrap in /…/flags for regex (tested against the lowercase program name).",altSlot:"Alt modifier slot",altSlotHint:"Reserve one preview slot for the Alt key.",desktopVisibility:"Show on desktop",desktopVisibilityHint:"Desktop shows only this preset’s custom actions, not the basic keyboard shortcuts.",rowLayout:"Row layout",rowLayoutHint:"Buttons per expanded row.",addRow:"Row",rowN:({n:e})=>`Row ${e}`,del:"Del",buttons:"Buttons",buttonsHint:"Tap to edit. Use ↑↓ to reorder.",addButton:"Add button",noCustomButtons:"No custom buttons yet. Add one to override the default toolbar.",moveUp:"Move up",moveDown:"Move down",removeRow:({n:e})=>`Remove row ${e}`,removeAction:({name:e})=>`Remove ${e}`,labelField:"Label",labelPlaceholder:"Label shown on the button",sequence:"Sequence",keyCombo:"Key combination",comboKey:"Key",namedKeys:"Navigation and control keys",functionKeys:"Function keys",characterKeys:"Letters, numbers and symbols",insertCombo:"Insert key combination",keyComboHint:"Choose modifiers and a key to append to the sequence. Behavior depends on the terminal application.",unsupportedCombo:"The terminal cannot distinguish this combination. Change the modifiers or key.",sequencePlaceholder:"e.g. /undo or \\t or /||undo",sequenceHint:"Double-tap sequence",doubleTap:"Double-tap sequence",doubleTapAdd:"+ Add",doubleTapPlaceholder:"e.g. /undo\\r or /||undo ||\\r",remove:"Remove",noSequence:"No sequence",preset:"Preset",overCapacityHint:"More buttons than slots. Extra rows will use the last row size."},agentRules:{ruleColors:{green:"Green",yellow:"Yellow",red:"Red",blue:"Blue",purple:"Purple",orange:"Orange",gray:"Gray"}},tab:{session:"Session",new:"New session",rename:"Rename",renameHint:"Change the tab display name",renamePlaceholder:"Leave empty to reset to default",copyCwd:"Copy cwd",copyCwdHint:"Copy the current working directory",closeMenu:"Close menu",openGroup:"Open collaboration group",leaveGroup:"Leave collaboration group",leaveGroupShortHint:"Keep the terminal running",leaveGroupConfirm:"Confirm leave",leaveGroupQuestion:({name:e})=>`Remove this session from “${e}”?`,leaveGroupHint:"The terminal keeps running. Other members and message history stay. This session will stop receiving new group messages and can rejoin later.",leavingGroup:"Leaving…",leaveGroupFailed:"Could not leave the group. Please retry.",fontSize:"Font size",fontSizeHint:"Only for this session",fontSizeReset:"Follow global",resumeAgent:"Resume agent session",resumeAgentHint:"Resume the last conversation by its native session id",resumeAgentAvailable:"Agent conversation available to resume",resumeAgentRecoveredTitle:({agent:e})=>`${e} conversation available`,resumeAgentRecoveredHint:"This terminal was rebuilt after an interruption. Continue where you left off.",resumeAgentNow:"Resume",resumeAgentLater:"Dismiss for now",resumeAgentSubmitting:"Submitting the native resume command…",resumeAgentWaiting:"Waiting for the Agent to confirm the restored conversation…",resumeAgentSuccess:({agent:e})=>`${e} conversation restored`,resumeAgentFailed:"Could not resume the Agent conversation. You can retry.",resumeAgentConflict:"This Agent conversation is already open in another terminal.",resumeAgentBusy:"Wait for the current Agent turn to finish before resuming.",resumeAgentTimeout:"The Agent did not confirm the restored conversation. Check the terminal or retry.",tmuxRecoveryTitle:({count:e})=>`Terminal interrupted · ${e} conversations to reconnect`,tmuxRecoveryHint:"Reconnect the original conversations and keep their history. Progress stays visible.",tmuxRecoveryRestoreAll:"Restore all",tmuxRecoveryRestoring:"Restoring…",tmuxRecoveryDismiss:"Not now",tmuxRecoveryPartial:({restored:e,failed:t})=>`${e} reconnected · ${t} need attention`,tmuxRecoveryFailed:"Recovery failed. Check the terminals and try again.",tmuxRecoveryDismissFailed:"Could not dismiss the recovery notice.",tmuxRecoveryProgress:({total:e,queued:t,paused:n,resourceWait:r,running:o,succeeded:s,failed:i})=>`Recovery: ${s}/${e} complete · ${t} queued · ${n} paused (${r} waiting for resources) · ${o} running · ${i} failed`,tmuxRecoveryPausedForResources:"Resources are below budget. New launches are paused and will resume automatically when capacity returns.",tmuxRecoveryPause:"Pause",tmuxRecoveryResume:"Resume",tmuxRecoveryInProgress:"Recovery in progress",tmuxRecoveryDetails:"Affected conversations",tmuxRecoveryDiagnostics:"Recovery details",tmuxRecoveryWaiting:"Waiting to reconnect",tmuxRecoveryDone:"Reconnected",tmuxRecoverySuccess:({count:e})=>`${e} original conversations reconnected`,tmuxRecoveryReturn:"Return to recovery",tmuxRecoveryInspect:"View terminal",tmuxRecoveryRetryFailed:"Retry failed sessions",copied:"Copied",close:"Close session",closeHint:"Remove this tab from the list",longPressTip:"Tip: hold a tab still for a moment to open actions; hold and drag to reorder.",sessionsTitle:"Sessions",explorerTitle:"Explorer",split:"Split",splitTitle:"Add to split workspace",closeFailed:({name:e})=>`Could not close ${e}. The session is still open. Try again.`,splitNew:"New session in workspace",splitNewHint:"Uses the current directory and default type; add as many panes as needed",splitExisting:"Choose a session or workspace",splitExistingHint:"Create multiple independent workspaces; choosing another workspace merges them",splitCurrent:"Current",splitClose:"Exit split",splitLayout:"Split layout",splitHorizontal:"Side by side",splitVertical:"Stacked",splitGrid:"Grid",splitWorkspace:"Split group",splitWorkspaces:"Split workspaces",splitRename:"Rename split group",splitRemovePane:"Remove from split",splitExistingGroups:"Existing split groups",splitAvailableSessions:"Available sessions",splitOccupied:"Grouped",splitUnavailableGrouped:"Grouped mode only supports sessions in the same directory",splitEndedGrouped:"Split ended: grouped mode does not support mixed directories",splitNoOtherSessions:"No other sessions are available",sessionCount:({count:e})=>`${e} session${e===1?"":"s"}`,closeChooserTitle:"Destroy tmux session?",closeChooserDescription:"This will stop the session and every process inside it. This cannot be undone.",destroySession:"Destroy session",confirmDestroySession:"Confirm destroy",destroySessionHint:"Stop the tmux session and every process inside it.",dragToClose:"Drag here to close",releaseToClose:"Release to confirm"},agent:{aiRunning:"AI running",recentActivity:"Recent session activity",needsReview:"Needs review",finishedReview:"AI finished — needs review",chatUnread:"{count} unread messages",aiWaiting:"AI waiting",copyMode:"Copy mode",jumpToNext:"Jump to next session needing attention",jumpToNextRunning:"Jump to next running session",selectRunningSession:"Select a running session",runningSessionGestureHint:"Tap to cycle · swipe sideways to select · hold to drag",currentSession:"Current"},serviceAttention:{title:"Attention across services",summary:"{services} services · {count} sessions",currentService:"Current service",waiting:"Waiting for you",offline:"Offline · Last known status",login:"Sign-in required · Last known status",empty:"No sessions need attention",viewService:"Open service",scope:"Includes opened services. Select a session to go directly to it.",changed:"The pending sessions have changed. Please choose again.",unavailable:"Unable to open this service. Retry from the service list."},connection:{reconnecting:"Reconnecting…"},desktopServices:{switchService:"Switch Termdock service",openServices:"Open services",idle:"Idle",manageServices:"Manage services and names"},terminal:{input:"Terminal input",error:"Error",dropFilesToPastePaths:"Drop files to paste paths",loading:"Loading terminal…",initializing:"Initializing terminal engine…",failedToLoad:"Failed to load terminal",unknownError:"An unknown error occurred",componentFailed:"Terminal component failed to load",paste:"Paste",copied:"Copied",copyFailed:"Copy failed",longPressSelectsText:"Long press selects text",longPressSendsArrows:"Long press sends arrow keys",switchLongPressToArrows:"Switch long press to arrow keys",switchLongPressToCopy:"Switch long press to copy selection"},quota:{title:"Subscription Quota",noProviders:"No subscription providers detected.",noProvidersHint:"Quota tracking becomes available when you use AI coding agents with API keys or OAuth login.",exhausted:"Exhausted",left:({n:e})=>`${e} left`,updated:({time:e})=>`Updated ${e}`,refresh:"Refresh",close:"Close"},errorBoundary:{title:"Something went wrong",unexpected:"An unexpected error occurred",retry:"Try Again",copyDetails:"Copy error details",copied:"Copied",copyFailed:"Copy failed"},error:{type:{network:"Network error",session:"Session error",terminal:"Terminal error",auth:"Authentication error",validation:"Validation error",unknown:"Unknown error"},severity:{low:"Notice: ",medium:"Warning: ",high:"Error: ",critical:"Critical: "},suggestion:{networkCheck:"Check your network connection",networkRetry:"Try reconnecting",networkProxy:"Check proxy settings",networkWait:"Wait for the network to recover",sessionRecreate:"Recreate the session",sessionServer:"Check the server status",sessionCache:"Clear your browser cache",terminalRestart:"Restart the terminal",terminalConfig:"Check the terminal configuration",terminalClear:"Clear the terminal output",authRelogin:"Sign in again",authCredentials:"Check your credentials",authAdmin:"Contact the administrator",validationFormat:"Check the input format",validationParams:"Verify your parameters",validationDocs:"See the documentation",unknownReload:"Reload the page",unknownApp:"Restart the app",unknownSupport:"Contact support"}}},yE={architecture:{choosePaths:"选择目录或文件",browsePaths:"浏览目录",addScopeReference:"引用到分析范围",searchScopePaths:"搜索文件或目录",useCurrentFile:"引用当前文件",useCurrentDirectory:"引用当前目录",browsePathsHint:"展开目录浏览,点击右侧引用按钮加入分析范围。",correctPathsFirst:"请先修正已填写的路径,再添加范围。",pathsHint:"可选择范围或粘贴文件/行引用,路径相对当前项目。",featureScopeHint:"优先在所选范围内定位功能",removePath:"移除路径",chooseThisDirectory:"选择此目录",filterDirectory:"筛选当前目录",loadingPaths:"正在读取目录…",pathsLoadFailed:"无法读取目录,请检查连接或访问权限后重试。",noPaths:"当前目录没有匹配的文件或子目录。",pathsTruncated:"当前目录条目较多,仅显示部分结果;可进入子目录,或直接粘贴目标路径。",selectedPaths:"已选路径",usePaths:"使用所选范围",expandDetail:"查看详情",collapseDetail:"收起说明",backToMap:"返回架构",backToModule:"返回模块",previousModule:"上一模块",parentModule:"返回上一级",viewPrepared:"查看这份分析",closeDetail:"关闭模块详情",connections:"连接关系",outgoing:"连向",incoming:"来自",browseMode:"浏览方式",outlineMode:"模块说明",graphMode:"关系图",analysisNotes:"分析说明",limitations:"范围与限制",analyzedPaths:"已分析源码",fitGraph:"查看全图",fullscreen:"全屏看图",closeFullscreen:"关闭全屏图",panHint:"拖动浏览,双指缩放;点击模块查看说明",newAnalysis:"新建分析",updateAnalysis:"更新当前分析",closePreparation:"关闭分析设置",analysisRange:"分析范围",projectRange:"整个项目",moduleRange:"目录 / 模块",featureRange:"功能链路",modulePaths:"模块路径(每行一个)",modulePlaceholder:"选择目录或文件,或粘贴已有引用,每行一个",featureTarget:"想了解的功能",featurePlaceholder:"例如:文件上传从选择文件到写入存储的完整流程",invalidPaths:"请选择项目内的目录或文件,或粘贴其引用,最多 20 个;项目外路径和 .. 无法使用。",requiredFeature:"请描述一个具体功能,并检查可选起始路径是否为项目内相对路径。",independentHint:"局部分析单独保存,可随时切换。同一范围再次生成会更新对应的图;整个项目使用项目总览。",updateOnly:"只更新当前这份分析,其他架构图会保留。",analysisOptions:"依赖深度与其他选项",dependencyDepth:"依赖追踪",boundaryDepth:"范围边界(更快)",followDepth:"追踪相关调用与依赖",startPaths:"功能范围(可选)",focus:"分析诉求与限制(可选)",focusPlaceholder:"例如:重点解释权限检查和失败重试,忽略界面样式。",savedAnalyses:"已保存分析",libraryFailed:"无法读取分析列表,当前图仍可浏览。请点击刷新重试。",awaitingFile:"这份分析尚未保存。将准备好的指令发送给 Agent;文件保存后这里会自动显示结果。",analyzeModule:"细化分析这个模块",scopeUnavailable:"这份局部架构缺少范围信息,请新建分析以明确分析边界。",tab:"架构",title:"代码架构",generate:"生成",update:"更新",refresh:"刷新架构",prepare:"准备架构分析",promptHint:"使用当前项目的 Agent 分析代码。提示词会放入当前输入区或上下文草稿,检查后发送;架构保存后,这里会自动刷新。请先在终端打开 Agent,分析会消耗其时间和额度。",insertPrompt:"放入输入区",copyPrompt:"复制提示词",previewPrompt:"查看分析提示词",inserting:"正在添加到当前输入区…",insertFailed:"未能添加提示词,请检查当前会话,或从下方复制。",inserted:"请检查当前输入区或上下文草稿,并发送给 Agent。",copied:"提示词已复制。",failed:"复制失败,请从下方提示词中手动复制。",loading:"正在读取项目架构…",invalid:"架构文件格式有误。可以重新分析项目来修复。",loadFailed:"无法读取项目架构,请检查连接与访问权限后重试。",previous:"下面保留上次成功读取的架构。",retry:"重试",empty:"了解这个项目的代码架构",emptyHint:"可以从整个项目、指定目录或某个功能开始分析,无需先生成全项目架构。",savedAt:"保存于",perspective:"视角",breadcrumb:"架构层级",modules:"模块",explore:"展开子模块",sourceFiles:"相关源码",diagram:"架构关系图",diagramHint:"点击模块查看详情",zoomOut:"缩小架构图",zoomIn:"放大架构图",resetZoom:"重置架构图缩放",download:"下载架构图 SVG",downloadFailed:"下载失败,请重试。",diagramFailed:"图表暂时无法渲染,仍可通过下方模块查看架构。",rendering:"正在绘制架构图…"},computer:{returnToDesktop:"返回桌面",tools:"控制设置",closeTools:"关闭控制设置",keyboard:"键盘",keyboardInput:"直接输入到电脑",keyboardPlaceholder:"点这里打字,文字直接发送到电脑",hideKeyboard:"收起键盘",keyboardNavigation:"键盘导航",desktopZoom:"桌面缩放",zoomIn:"放大桌面",zoomOut:"缩小桌面",resetZoom:"恢复适应屏幕",pinchHint:"双指捏合缩放",keyEscape:"发送 Esc",keyLeft:"向左",keyDown:"向下",keyUp:"向上",keyRight:"向右",keySelectAll:"全选",clipboardTool:"剪贴板",zoom:"放大",expand:"全屏",switchTouchMode:"切换触摸方式",touchMode:"触控模式",trackpadMode:"触控板",directTouchMode:"直接触摸",trackpadHint:"单指滑动移动鼠标,轻点点击,长按拖动;双指滚动,双指轻点右键。",directTouchHint:"轻点屏幕上的位置即可点击,拖动手指操作桌面。",trustCertificateHere:"信任此电脑的证书",rememberLogin:"记住登录",autoConnect:"下次打开自动连接",forgetLogin:"清除登录",savedPassword:"已保存,留空直接连接",loginExpired:"登录信息已失效,请重新输入密码。",loginSaveFailed:"登录信息保存或读取失败,请重试。",title:"电脑控制",host:"电脑地址",hostPlaceholder:"192.168.1.20 或 computer.local",username:"用户名(可选)",password:"密码",passwordHint:"填写目标电脑的 VNC 密码;服务器要求账户登录时,同时填写用户名。勾选记住登录后,成功连接时在服务端加密保存。",connect:"连接",disconnect:"断开",cancel:"取消",connecting:"正在连接…",connected:"已连接",disconnected:"连接已断开,可以重新连接。",viewOnly:"仅查看",control:"允许控制",fit:"适应面板",actualSize:"原始尺寸",fullscreen:"展开桌面",exitFullscreen:"收起桌面",setup:"如何连接电脑",step1:"在 Mac 上打开「系统设置 → 通用 → 共享 → 屏幕共享」。",step2:"在屏幕共享设置中允许你的用户访问;使用 VNC 密码时,开启「VNC 查看器可以使用密码控制屏幕」。",step3:"填写当前服务能访问的电脑内网地址;控制服务所在电脑时,选择「当前电脑」。",networkHint:"使用 VNC 端口 5900。浏览器到 Termdock 全程加密;服务到目标电脑的 VNC 段请使用可信内网或 VPN。",service:"当前服务:{name}",remoteTitle:"远程电脑桌面",startHint:"连接后可在这里查看桌面,用鼠标、触摸和键盘操作电脑。",credentials:"请填写登录信息",authenticate:"登录",authFailed:"登录失败,请检查用户名、密码和目标电脑的远程桌面权限。",sharingOff:"电脑未接受 VNC 连接,请先启动桌面共享服务,并检查端口 5900。",unreachable:"无法连接电脑,请检查地址、网络以及防火墙。",timeout:"连接超时,请确认目标电脑已唤醒且能从当前服务访问。",invalidHost:"请填写电脑的内网 IP 或主机名,无需协议或端口。",privateOnly:"仅支持内网或本机地址;远程访问可切换到目标电脑上的 Termdock 服务。",permission:"当前邀请未授权这台电脑或此项操作。",sharedViewUnsupported:"这台电脑使用了不支持只读过滤的 VNC 登录方式。请调整屏幕共享认证方式后重试。",failed:"电脑连接失败,请重新连接。",clipboard:"发送剪贴板",clipboardPlaceholder:"发送文字到电脑剪贴板",clipboardHint:"输入文字后点 {shortcut} 即可粘贴;也可以只发送到剪贴板。字符支持取决于目标电脑。",remoteClipboard:"电脑复制的文字",copyToDevice:"复制到本机",clipboardCopied:"已复制到本机",clipboardAccessFailed:"无法访问系统剪贴板。可在此输入文字发送,或选中电脑复制的文字手动复制。",clipboardSent:"已发送到电脑剪贴板",shortcuts:"快捷键",switchApps:"切换应用",spotlight:"Spotlight 搜索",desktop:"显示桌面",loading:"正在加载电脑控制…",platform:"目标系统",thisComputer:"当前电脑",otherComputer:"其他电脑",target:"连接哪台电脑",localService:"运行当前 Termdock 服务的电脑 · {name}",advanced:"高级设置",rdpLoginHint:"使用远程桌面设置中的账号和密码。",vncLoginHint:"使用屏幕共享的 VNC 密码。",checkSettings:"检查连接设置",localHint:"本机指运行当前 Termdock 服务的电脑;目标电脑需先启用所选协议的远程桌面服务。",linuxStep1:"Ubuntu / Linux 需要运行 VNC 服务。共享当前桌面时,x11vnc 需要 X11 会话;Ubuntu 登录界面可选择「Ubuntu on Xorg」。",linuxStep2:"设置 VNC 密码,并让服务监听 5900 端口;只有 RDP 的桌面共享无法在此连接。",linuxCommandHint:"在目标电脑的桌面终端执行以下命令,然后填写设置的 VNC 密码。此示例仅允许连接服务所在电脑,不会自动执行:",linuxProtocolHint:"Ubuntu 24.04 的内置远程桌面使用 RDP,此处使用 VNC。Wayland 需要兼容该桌面的 VNC 服务;TigerVNC 虚拟桌面是独立会话,不等同于当前屏幕。",windowsStep1:"在 Windows 上安装并启动兼容 VNC 的桌面共享服务器;Windows 的 RDP 远程桌面无法在此连接。",windowsStep2:"设置 VNC 密码,启用键盘和鼠标控制,并允许当前服务通过防火墙访问 5900 端口。",systemSearch:"系统搜索",protocol:"连接协议",port:"RDP 端口",rdpUsername:"RDP 用户名",domain:"域(可选)",rdpPasswordHint:"填写远程桌面设置中的 RDP 用户名和密码;Ubuntu 的远程登录凭据可能与系统账户不同。勾选记住登录后,成功连接时在服务端加密保存。",rdpBackendUnavailable:"当前服务的 RDP 支持不可用,请先完成服务端 RDP 配置。",rdpBackendRecovery:"请在运行 Termdock 服务的电脑上启动 RDP 后台(guacd),然后刷新此页面重新检查。连接设置会保留;也可在高级设置中切换为 VNC。",rdpFailed:"远程桌面连接失败。请检查目标地址、端口和电脑上的远程桌面设置。",rdpLinuxStep1:"在 Ubuntu 打开「设置 → 系统 → 远程桌面」,启用「桌面共享」或「远程登录」,并设置 RDP 登录凭据。",rdpStep1:"在目标电脑启用 RDP 远程桌面。Windows 可在「设置 → 系统 → 远程桌面」中开启;Mac 内置屏幕共享请使用 VNC。",rdpStep2:"填写远程桌面设置中的用户名、密码和实际端口。RDP 默认端口为 3389;Ubuntu 的桌面共享也可能使用 3390。目标使用自签名证书时,确认电脑身份后可勾选信任证书。",rdpNetworkHint:"浏览器到 Termdock 的画面和输入复用加密通道;RDP 由当前服务连接目标电脑。桌面共享与远程登录可能连接不同会话,是否显示当前屏幕取决于目标服务的设置。",trustCertificate:"信任此电脑的 RDP 证书(跳过校验)",settingsLoading:"正在读取连接设置…",settingsSaving:"正在保存设置…",settingsSaved:"连接设置已保存到当前服务。",settingsSaveFailed:"设置未能保存,当前修改仍在此页面。",settingsLoadFailed:"连接设置读取失败,请重试。",retry:"重试",retryConnect:"重试连接",rdpCertificate:"目标电脑的 RDP 证书未通过校验。确认是你的电脑后,可勾选信任证书并重试。",clipboardFailed:"剪贴板发送失败,请重试。"},app:{name:"Termdock"},android:{device:"设备",selectDevice:"选择设备",noDevices:"未发现设备",closeTab:"关闭设备 Tab",refresh:"刷新设备",connect:"连接",disconnect:"停止投屏",addDevice:"网络连接",addressPlaceholder:"ip:port,例如 192.168.1.20:5555",adbUnavailable:"本机未找到 adb(Android platform-tools),无法投屏。macOS: brew install android-platform-tools;Ubuntu: sudo apt install adb;或在 ~/.termdock/.env 设置 TERMDOCK_ADB_BIN。",scrcpyUnavailable:"本机未找到 scrcpy / scrcpy-server,无法投屏。macOS: brew install scrcpy;Ubuntu: sudo apt install scrcpy;或在 ~/.termdock/.env 设置 TERMDOCK_SCRCPY_BIN。",connecting:"正在连接设备…",reconnecting:"连接断开,正在自动重连…",retrySchedule:"第 {attempt} 次重试将在 {seconds} 秒后开始",lastError:"最近一次错误(重连期间保留)",retry:"重试",idleHint:"选择设备开始投屏",noDevicesHint:"用 USB 连接手机并开启 USB 调试,或在此添加网络设备",back:"返回",home:"主页",recents:"多任务",notifications:"通知栏",rotate:"旋转屏幕",volumeUp:"音量 +",volumeDown:"音量 -",power:"电源",zoomIn:"放大",zoomOut:"缩小",zoomPanHint:"双指拖动可移动画面",inputText:"输入文字",inputPlaceholder:"输入要发送到手机的文字",send:"发送",splitOpen:"在分屏中打开",splitClose:"退出分屏",splitDockedHint:"投屏已在分屏区域显示。",splitDrag:"按住拖动调整位置",insertFixPrompt:"插入修复提示词",screenshot:"截图并插入",recordingStart:"开始录屏",recordingStop:"停止录屏",recording:"正在录屏…",recordingLimit:"已达 5 分钟上限,录屏已停止",recordingStopped:"投屏已中断,录屏已停止",captureInserted:"截图已插入",recordingInserted:"录屏已插入",recordingConfirm:"录屏已结束,如何处理?",recordingInsert:"直接插入",recordingSave:"保存到指定目录",recordingSaveHint:"录像已准备好,可添加到当前输入框,或保存到文件目录。",recordingDiscard:"丢弃录屏",captureInserting:"正在插入…",recordingSaving:"正在保存录屏…",captureFailed:"插入失败",captureUnavailable:"当前无法添加,请确认会话允许输入",more:"更多",fullscreen:"全屏",fillSidebar:"铺满侧栏",exitFullscreen:"退出全屏",fullscreenHint:"投屏正在全屏显示。",quality:"画质",qualityAutoHint:"根据连接与解码表现动态调码率,不断流、不重连。分辨率保持稳定,操作和服务端录屏不受影响。",qualityAutoUnavailable:"自动调码率已暂停,画面保持连接。",qualityAutoVersionError:"服务端 scrcpy 版本尚未适配(点击查看详情)。",qualityAutoBuildError:"服务端 scrcpy 文件尚未验证兼容(点击查看详情)。",qualityAutoExtensionError:"调码率扩展文件读取、校验或推送失败(点击查看详情)。",qualityAutoTimeoutError:"调码率确认超时,不能据此判断编码器不支持(点击查看详情)。",qualityAutoEncoderError:"设备编码器拒绝了这次调节(点击查看详情)。",qualityAutoChannelError:"调码率控制通道异常(点击查看详情)。",qualityAutoUnknownError:"服务端未提供具体原因,请更新该服务端后重试(点击查看详情)。",qualityLow:"流畅",qualityMedium:"标准",qualityHigh:"高清",qualityCustom:"自定义",qualityResolution:"分辨率",qualityBitRate:"码率",qualityFrameRate:"帧率",qualityAuto:"自动",qualityApply:"应用",presetNamePlaceholder:"预设名称",presetSave:"保存预设",presetDelete:"删除预设",stateUnauthorized:"未授权",stateOffline:"离线",stateUnknown:"状态未知",unauthorizedHint:"请在手机上确认 USB 调试授权。",offlineHint:"设备离线,请重新插拔或重连。"},common:{cancel:"取消",close:"关闭",save:"保存",reset:"重置",loading:"加载中…",error:"错误",retry:"重试",refresh:"刷新",search:"搜索",clear:"清除",delete:"删除",on:"开",off:"关",back:"返回",copy:"复制",decrease:"减少",increase:"增加",use:"使用",previous:"上一个",next:"下一个"},login:{prompt:"termdock login",placeholder:"请输入密码",placeholderBlocked:({s:e})=>`请稍候 ${e}s`,submit:"登录",invalidPassword:"密码不正确,或服务身份无法验证。请检查后重试。",identityMismatch:"服务身份已改变。请与服务所有者核对地址后再试。",unavailable:"暂时无法登录此服务,请检查连接后重试。",authorizationRequired:"此设备需要授权。请向服务所有者索取新的邀请。",passwordNotConfigured:"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。",targetPasswordRequired:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。",securityUpgradeRequired:"无法核验中转的密码保护,已禁用中转。请更新目标服务和中继程序。",viaEntry:({entry:e,address:t})=>`经入口“${e}”(${t})中转,请使用目标服务的密码。`,currentTarget:({address:e})=>`正在登录 ${e}`,manageServices:"管理服务 / 使用其他地址",failed:"暂时无法登录,请检查连接后重试。",rateLimited:"尝试次数较多,请稍后再试。",continueAfterReconnect:"网络恢复后可继续登录。",savedConnectionRetained:"已保留服务记录,恢复连接后会重新检查访问权限。",invalidAddress:"请输入有效的 HTTPS 服务地址,例如 computer.example:9834 或 https://computer.example:9834。",invalidInvitation:"邀请链接不完整或无效,请重新复制完整链接后重试。"},sidebar:{sessionCreating:"正在启动…",sessionCreateWaiting:"仍在等待服务响应…",sessionCreateElapsed:"{seconds} 秒",sessionCreateContinue:"可以继续使用当前会话。",sessionCreateDirectoryUnavailable:"工作目录已失效,请重新选择目录后重试。",sessionCreatePermissionDenied:"没有权限在此目录启动,请选择其他目录。",sessionCreateConnectionFailed:"连接失败,请检查连接后重试。",sessionCreateFailed:"无法启动会话,请重试。",sessions:"会话",noSessions:"暂无打开的会话。",noMatchingSessions:"没有匹配的会话。",toggleSearch:"切换搜索",settings:"设置",moreActions:"更多操作",subscriptionQuota:"订阅额度",collapseSessions:"收起会话列表",expandSessions:"展开会话列表",collapseTools:"收起工具面板",expandTools:"展开工具面板",runningSessionButton:"运行中会话按钮",runningSessionButtonHint:"轻点循环,横向滑动选择,长按拖动",attentionButton:"待处理提醒按钮",attentionButtonHint:"显示未读、等待处理的黄色悬浮铃铛",updateAvailable:({version:e})=>`Termdock ${e} 可用`,updateInstalling:"正在后台安装,不会中断当前服务。",updateReady:"更新已安装,确认后将重启服务。",updateRestart:"重启并完成更新",updateRestartConfirm:({version:e})=>`确认重启 Termdock 并切换到 ${e}?当前网页会短暂重连,会话不会被关闭。`,updateRestarting:"正在重启,网页将自动重连…",updateFailed:"自动安装失败,提醒会保留。",updateRetry:"重新尝试",serverAttention:"服务出过问题",filterSessions:"过滤会话",clearSearch:"清除搜索",groupByFolder:"按文件夹分组",groupByFolderTitle:"按工作目录把会话归组折叠;与拖拽排序互斥。",ungrouped:"其他",needsAttention:"待处理",waitingForYou:"等你操作",completedUnread:"完成待查看",closeSession:({name:e})=>`关闭 ${e}`,newShell:"Shell",newTmux:"Tmux",newTmuxDisabled:"服务端未安装 tmux",confirmNewShell:"创建 Shell?",confirmNewTmux:"创建 Tmux?",newSession:"新建 Terminal",newSessionWithAgent:({agent:e})=>`新建 ${e}`,moreLaunchOptions:"更多启动选项",recoverableSessions:"可恢复会话",confirmCloseRecoverableSession:({name:e})=>`结束 ${e}?这会停止该会话中的所有进程。`,endRecoverableSession:"结束会话",closeRecoverableSessionFailed:"结束会话失败,请重试。",refreshRecoverableSessions:"刷新可恢复会话",restoreRecoverableSession:({name:e})=>`恢复 ${e}`,restoringRecoverableSession:"恢复中…",restore:"恢复",newSessionAdvanced:"快速启动 Agent",newSessionComposerTitle:"开始新会话",newSessionHint:"选好运行方式和目录后再启动",launchSessionWith:({name:e})=>`启动 ${e}`,setNewSessionDefault:({name:e})=>`将 ${e} 设为默认`,currentNewSessionDefault:({name:e})=>`${e} 是当前默认`,currentDefaultAgent:({name:e})=>`当前默认:${e}`,defaultAgent:"默认",makeDefault:"设为默认",sessionMode:"运行方式",tmuxKeepsRunning:"断开后继续运行",resumeHistory:"最近会话",resumeHistoryCount:({n:e})=>`已保存 ${e} 条`,resumeHistoryLoading:"正在载入最近的 Agent 会话…",resumeHistoryAction:({title:e})=>`恢复 ${e}`,resumeHistoryRemove:({title:e})=>`从最近会话中移除 ${e}`,resumeHistoryLoadFailed:"无法载入最近的 Agent 会话。",resumeHistoryFailed:"无法准备恢复该 Agent 会话。",resumeHistoryRemoveFailed:"无法从历史中移除该会话。",customStartupCommand:"自定义命令",changeStartupCommand:"更改启动命令",saveStartupCommand:"保存命令",commandPreset:"命令方案",commandPresetName:"方案名称",agentDefaultCommand:"Agent 原始命令",addAgentCommand:"+ 新增命令方案…",currentAgentCommand:"当前自定义命令",sharedAgentCommandsHint:"与待办、新会话共享,保存在当前浏览器。已有任务配置保持原命令。",startupCommandSaved:"已保存",saveStartupCommandFailed:"保存失败,请检查浏览器存储权限",addStartupCommand:"新增自定义命令…",deleteStartupCommand:"删除命令",startupCommand:"启动命令",resetStartupCommand:"恢复默认",startupCommandPlaceholder:"例如 vim、htop 或 npm run dev",agentStartupCommandHint:"可修改完整命令;留空使用 Agent 默认命令。保存到当前浏览器。",terminalStartupCommandHint:"在所选目录启动程序,例如 vim README.md。保存到当前浏览器。",workingDirectory:"工作目录",directoryPlaceholder:"输入目录路径",browseDirectories:"浏览目录",hideDirectoryBrowser:"收起目录",chooseDirectory:"选择工作目录",directoryPickerHint:"进入文件夹,确认后才会更改工作目录。",useThisFolder:"使用此目录",recentDirectories:"最近使用的目录",startCommand:"启动命令",customCommand:"其他命令",commandPlaceholder:"可选,例如 codex",detectAgents:"重新检测 Agent",savePreset:"保存为预设",createAndRun:"创建并运行",createSession:"创建 Terminal",openLeftSidebar:"打开左侧边栏",openRightSidebar:"打开右侧边栏",closeSidebar:"关闭边栏"},rightSidebar:{workspace:"工作区",currentProject:"项目",browsingLocation:"浏览中",parentFolder:"上一级目录",backToProjectRoot:"回到当前项目",refreshFiles:"刷新当前目录",resizeFileTree:"拖动调整文件目录宽度",pinCurrentFolder:"固定当前目录到这个项目",unpinCurrentFolder:"取消固定当前目录",showHiddenFiles:"显示隐藏文件",hideHiddenFiles:"不显示隐藏文件",hideGitIgnoredFiles:"隐藏 Git 忽略文件",showGitIgnoredFiles:"显示 Git 忽略文件",gitIgnoreSaveFailed:"保存 Git 忽略文件显示设置失败,请重试",gitIgnoreConfigureHint:"长按或右键配置例外",gitIgnoreExceptionsTitle:"Git 忽略过滤例外",gitIgnoreExceptionsHint:"勾选过滤开启时仍需显示的文件或目录。点击目录右侧箭头可进入选择;选中目录会包含所有子项,文件的父目录会自动保留。保存后生效。",gitIgnoreExceptionsPaths:"选择文件或目录",gitIgnoreExceptionsInvalid:"最多选择 200 个文件或目录。",gitIgnoreExceptionsLoadFailed:"无法加载目录,请重试。",gitIgnoreExceptionsEmptyDirectory:"此目录为空",gitIgnoreExceptionsOpenDirectory:({name:e})=>`进入目录 ${e}`,gitIgnoreExceptionsSelected:({count:e})=>`已选 ${e} 项`,gitIgnoreExceptionsClear:"清空选择",gitIgnoreExceptionsRemove:({path:e})=>`移除 ${e}`,gitIgnoreExceptionsTruncated:"此目录项目过多,仅显示部分内容。",gitIgnoreExceptionsSaveFailed:"保存失败,请检查路径是否位于当前目录内(最多 200 个),然后重试。",insertCurrentFolder:"引用当前目录",insertCurrentFolderShort:"引用",pinnedFolders:"固定",unpinFolder:({name:e})=>`取消固定 ${e}`,fileWatchUnavailable:({message:e})=>`文件监听不可用:${e}。可点击手动刷新。`,browsingOutsideProject:"正在浏览当前项目外目录",browsingOutsideProjectHint:"Git 和改动仍使用当前项目;这里引用的文件会按外部路径插入。",toggleSearch:"切换搜索",refreshGit:"刷新 Git 状态",gitLastUpdated:({time:e})=>`上次更新:${e}`,close:"关闭",filterChanges:"过滤改动或文件",searchPlaceholderContent:"在文件内容中搜索…",searchModeName:"文件",searchModeContent:"内容",clearSearch:"清除搜索",searchScope:"范围",searchScopePlaceholder:"相对目录或绝对路径",resetSearchScope:"恢复搜索当前目录",searchOptions:"搜索选项",searchExclude:"排除",searchExcludePlaceholder:"dist/**, *.lock",clearSearchExclude:"清空排除规则",contentSearchOptions:"内容搜索选项",matchCase:"区分大小写",matchWholeWord:"全词",useRegex:"正则",insertGitContext:"把当前 Git 信息插入 Terminal",copyGitContext:"复制 Git 信息",insertChangeAuditPrompt:"解释当前改动",insertChangeAuditPromptTitle:"把更改审计提示词插入当前会话",changeAuditShort:"解释当前改动",changeAuditLoading:"正在加载 hunk 解释…",changeAuditLoaded:({count:e})=>`已加载 ${e} 条 hunk 解释`,changeAuditLoadedAt:({time:e})=>`最近生成 ${e}`,changeAuditRegenerate:"重新生成",changeAuditRefreshStale:"补充失效",changeAuditRefreshStaleTitle:"为已失效的 hunk 解释插入补充生成提示词",clearChangeAudit:"清理改动解释",clearChangeAuditTitle:"清理当前仓库的 hunk 解释",changeAuditClearFailed:({message:e})=>`清理 hunk 解释失败:${e}`,changeAuditScopeAll:"全部仓库",changeAuditScopeLabel:"解释范围",branchAuditTitle:"分支解释",branchAuditShort:"解释分支改动",branchAuditBaseLabel:"基线分支",branchAuditBasePlaceholder:"基线分支,例如 master",branchAuditBaseSearchPlaceholder:"搜索基线分支",branchAuditBaseEmpty:"没有可选分支,可直接输入分支名",branchAuditGenerate:"生成解释",branchAuditRegenerate:"重新生成",branchAuditGenerateTitle:"生成当前分支相对于基线分支的解释提示词",branchAuditViewDiff:"查看对比",branchAuditViewDiffTitle:"查看目标分支相对于基线分支的改动",branchAuditDiffLoading:"正在加载分支对比…",branchAuditDiffEmpty:"当前分支相对于基线分支暂无改动。",branchAuditMissingBase:({repo:e})=>`${e} 未设置基线分支`,branchAuditRefreshDiff:"刷新对比",branchAuditRefreshStale:"补充失效",branchAuditRefreshStaleTitle:"为已失效的分支解释插入补充生成提示词",branchAuditClearTitle:"清理当前分支解释",branchAuditClearFailed:({message:e})=>`清理分支解释失败:${e}`,branchAuditCommitCount:({count:e})=>`${e} 个提交`,branchAuditFileCount:({count:e})=>`${e} 个文件`,branchAuditTruncated:"diff 已截断",branchAuditCurrent:"已保存解释",branchAuditStale:"解释已失效",branchAuditEmpty:"暂无分支解释。生成后会持久化保存,可随时回来查看。",branchAuditView:"查看解释",branchAuditSaved:({count:e})=>`已保存 ${e} 条 hunk 解释`,branchAuditGeneratedAt:({time:e})=>`生成于 ${e}`,insertPreset:({label:e})=>`插入:${e}`,tabChanges:"改动",tabGit:"Git",tabFiles:"文件",tabAndroid:"设备",tabComputer:"电脑",showAndroidTab:"显示设备 Tab",showArchitectureTab:"显示架构 Tab",showComputerTab:"显示电脑 Tab",inserted:"已插入",copied:"已复制",toggleContextDraft:"切换上下文草稿",contextDraftTitle:"上下文草稿",contextDraftHint:"启用后,引用会追加到这里;可以继续浏览、补写描述,最后一次插入。",contextDraftPlaceholder:"在这里组织长提示词,继续点击侧栏中的引用来追加上下文…",contextDraftCollapse:"收起上下文草稿",contextDraftExpand:"展开上下文草稿",contextDraftDisable:"停用上下文草稿",contextDraftClear:"清空草稿",contextDraftInsert:"插入",contextDraftInsertAndSend:"插入并发送",contextDraftInserted:"已插入",contextDraftSent:"已发送",contextDraftSend:"发送草稿",contextDraftAppended:"已追加引用",contextDraftResize:"拖动调整高度,双击恢复默认",contextDraftAutoCollapseAfterSend:"插入/发送后收起",referenceInsertFailed:"未能插入,请检查目标终端连接后重试。",contextDraftInsertFailed:"输入未被接受,草稿已保留。关闭当前表单或返回终端后重试。",contextDraftPending:"等待接收…",contextDraftCharacterCount:({count:e})=>`${e} 字`,selectFilePrompt:"选择文件以预览内容",backToFileList:"返回文件列表",backToPreviousPreview:"返回来源文档",insertLineRef:({lineLabel:e})=>`引用${e}`,insertFileRef:"引用",copyFileRef:"复制文件引用",findInFile:"在文件内查找",findInFilePlaceholder:"在当前文件中查找…",previousSearchMatch:"上一个匹配项",nextSearchMatch:"下一个匹配项",closeFileSearch:"关闭文件搜索",downloadFile:"下载文件",downloadFailed:"下载失败",downloadCanceled:"下载已取消",downloadSaved:"文件已保存",downloadStarted:"浏览器已开始下载",uploadPending:"正在上传…",uploadInserting:"文件已上传,等待输入接收…",uploadDone:({count:e})=>`已上传 ${e} 个文件`,uploadReferenceDone:"文件已上传,引用已添加",uploadReferenceRejected:"文件已上传,引用尚未添加。关闭当前表单或返回原终端后重试。",uploadLimit:"每次最多上传 50 个文件。本次未上传,请重新选择较小批次。",uploadCanceled:"已停止上传。再次上传前请检查目标目录。",uploadFileCount:({count:e})=>`已选择 ${e} 个文件`,uploadFile:"上传文件",uploadFiles:"上传文件",insertLocalFile:"插入本地文件",insertLocalImage:"插入本地图片",layoutMode:"显示模式",layoutModeAuto:"自动",layoutModeNarrow:"窄版",layoutModeWide:"宽版",dropToUpload:"拖放文件以上传",uploading:"上传中…",uploadSuccess:({count:e})=>`已上传 ${e} 个文件`,uploadFailed:"上传失败",binaryPreviewHint:"二进制文件无法预览,请使用上方下载按钮保存到本地",selectedLineHint:({lineLabel:e})=>`已选 ${e} · 点下方「引用」按钮插入`,multiLineHint:"多行引用:先点起始行,再点结束行",loadingImage:"正在加载图片…",imagePreviewHint:"双指捏合或 ⌘/Ctrl + 滚动缩放 · 双击还原",imageLoadFailed:"图片预览加载失败",loadingVideo:"正在加载视频…",videoPreviewHint:"点击播放 · 长按 2× 并前拖提速 · 方向键调进度/音量 · 空格暂停",videoLoadFailed:"视频预览加载失败",videoUnsupported:"当前浏览器不支持该视频格式",videoPlay:"播放",videoPause:"暂停",videoLongPressSpeed:({rate:e})=>`正在 ${e}× 播放`,videoVolume:({percent:e})=>`音量 ${e}%`,videoRotate:"顺时针旋转 90°",videoFullscreenEnter:"全屏播放",videoFullscreenExit:"退出全屏",model3dLoading:"正在加载 3D 模型…",model3dExplode:"爆炸展开",model3dExplodeAxis:"展开方向(查看器坐标)",model3dExplodeAmount:"展开程度",model3dHome:"回正并看全",model3dFit:"看全可见零件",model3dFront:"正视图",model3dTop:"俯视图",model3dRight:"右视图",model3dAssemble:"恢复装配",model3dExplodedNotice:"爆炸展示 · 尺寸与引用仍为原始装配坐标",model3dLoadFailed:"3D 模型预览加载失败",model3dTimeout:"3D 模型传输超时,请检查连接后重试。",model3dDimensions:({dims:e})=>`尺寸: ${e}`,model3dHintMouse:"拖拽旋转 / 双指平移 / 捏合或滚轮缩放",model3dHintTouch:"单指旋转 / 双指缩放平移",model3dFullscreenEnter:"全屏查看",model3dFullscreenExit:"退出全屏",model3dBgToLight:"切换为白底",model3dBgToDark:"切换为黑底",model3dRefresh:"重新加载模型",model3dClipToggle:"切面查看",model3dClipPosition:"切面位置",model3dClipFlip:"反转切面方向",model3dFeatureToggle:"特征标注",model3dFeatureStatus:({total:e,positioned:t})=>`特征: ${e} 个 · 已定位 ${t}`,model3dFeatureInsert:"引用",model3dGlossaryToggle:"建模名词说明",model3dPickToggle:"选择零件 / 引用",model3dPickHint:"点选零件后可临时隐藏,或引用所选位置",model3dHidePart:"隐藏零件",model3dShowAllParts:({count:e})=>`显示全部(${e})`,model3dParts:"零件",model3dCloseParts:"关闭零件列表",model3dSearchParts:"查找零件",model3dClearPartSearch:"清空零件搜索",model3dHiddenParts:({count:e})=>`已隐藏 ${e}`,model3dShowNamedPart:({name:e})=>`显示 ${e}`,model3dHideNamedPart:({name:e})=>`隐藏 ${e}`,model3dIsolateNamedPart:({name:e})=>`只看 ${e}`,model3dIsolatePart:"只看此件",model3dShowPart:"显示零件",model3dNoParts:"没有匹配的零件",model3dUndoVisibility:"撤销",model3dClearSelection:"取消选择",model3dAllPartsVisible:"全部可见",model3dInspectHint:"单指旋转 · 双指缩放平移 · 双击局部放大,双击空白看全",model3dUnnamedPart:({index:e})=>`零件 ${e}`,model3dCanvas:"三维模型",model3dMore:"更多模型选项",edaLoading:"正在渲染 KiCad 文件…",reviewTargetChanged:"当前会话已切换,请回到创建这条引用的会话后再插入。",reviewReference:"审阅引用",reviewReferenceHint:"补充意见后插入,不会自动发送。",reviewSnapshot:"选中位置的视图快照",reviewCapturing:"正在截取当前视图…",reviewIncludeImage:"附带截图(临时保存在当前服务器)",reviewCaptureFailed:"截图未成功,仍可插入定位信息。",reviewNote:"你的意见(可选)",reviewNotePlaceholder:"例如:这里太厚了,能否减薄?",reviewDetails:"查看定位信息和引用原文",reviewUploading:"正在准备引用…",reviewAddToDraft:"加入引用草稿",reviewInsert:"插入引用",reviewUploadFailed:"引用准备失败,意见已保留。请重试,或取消附带截图后只插入文字。",edaLoadFailed:"KiCad 预览渲染失败",edaTimeout:"KiCad 预览生成或传输超时,请重试。",edaRefresh:"重新渲染",edaPickHint:"点击原理图或 PCB 上的问题位置,生成电子标注",edaPickedPosition:({x:e,y:t})=>`已选位置 ${e}%, ${t}%`,edaPickedBoardPosition:({x:e,y:t,object:n})=>`板坐标 ${e}, ${t} mm · ${n}`,edaInspecting:"正在读取板坐标和附近对象…",edaNoNearbyObject:"附近无对象",edaInsertAnnotation:"引用电子标注",csvUnnamedColumn:({index:e})=>`第 ${e} 列`,csvSelectedCell:({row:e,column:t})=>`已选第 ${e} 行 · ${t}`,csvPickHint:({rows:e,columns:t})=>`${e} 条记录 · ${t} 列,点击单元格引用`,csvInsertAnnotation:"引用表格标注",csvTablePreview:"表格预览:点击单元格后可引用完整记录",kicadLocalStateNotice:"这是本机界面状态文件,不参与原理图、PCB 或生产审查。",kicadShowRawJson:"查看原始 JSON",kicadProjectPickHint:"点击一项配置后可插入引用",kicadInsertSetting:"引用配置",markdownPreview:"预览",markdownSource:"源码",markdownParseFailed:"Markdown 预览解析失败或超过限制,已显示原文。",markdownPreviewHint:"点按行/段落引用,再点一行扩选;拖左侧竖条可连续框选",htmlPreview:"预览",htmlSource:"源码",htmlPreviewHint:"HTML 沙箱 iframe 预览,脚本受限",htmlFullscreenEnter:"全屏预览",htmlFullscreenExit:"退出全屏预览",markdownOutline:"Markdown 目录",markdownOutlineShort:"目录",closeMarkdownOutline:"关闭目录",changedFromPath:({path:e})=>`来自 ${e}`,selectedLineFooter:({lineLabel:e})=>`已选 ${e}`,clearSelection:"清除",allChanges:"全部改动",backToChangeList:"返回目录",allRepositories:"全部仓库",allRepositoriesShort:"全部",repositories:"仓库",gitRepositorySectionTitle:"操作仓库",gitRepositoryLabel:"仓库",gitRepositoryPlaceholder:"选择仓库",gitRepositorySearchPlaceholder:"搜索仓库",gitRepositoryEmpty:"没有可操作的仓库",selectRepositoryForGitActions:"请选择一个仓库后再执行 Git 操作",selectRepositoryForDiff:"选择一个仓库或文件查看 diff",repoNotLoaded:"点击加载",repoChangedCount:({count:e})=>`${e} 个改动`,repoStagedCount:({count:e})=>`${e} 已暂存`,noChanges:"没有改动",noMatchingChanges:"没有匹配的改动",loadingGitChanges:"正在加载 Git 改动…",loadingGitChangesSlow:"仓库较大时可能需要几秒。",refreshingGitChanges:"正在刷新 Git 改动…",gitChangesLoadFailed:"无法加载 Git 改动",retryGitChanges:"重试",insertThisFile:"把这个文件引用插入 Terminal",viewDiff:"查看 diff",diffViewMode:"改动文件展示方式",diffViewModeList:"平铺列表",diffViewModeTree:"目录结构",diffViewModeAi:"AI 导览",changeWalkthroughEmpty:"暂无 AI 导览。生成解释后会在这里展示总览、链路和验证点。",gitInfo:"Git 信息",wrapLongLines:"长行换行",wrapOn:"已换行",wrapOff:"原始",multiRepoScan:"扫描子仓库",multiRepoScanTitle:"扫描当前工作区下的嵌套 Git 仓库。关闭时只看单个仓库,大仓库打开更快。",horizontalScrollHint:"左右滑动查看完整 diff",stageFile:"暂存",stageAll:"全部暂存",unstageFile:"取消暂存",stashFile:"贮藏",stashAll:"全部贮藏",restoreFile:"丢弃",gitQuickActions:"Git 操作",gitUnavailable:"当前目录不是 Git 仓库",branchSectionTitle:"当前分支",currentBranchLabel:"分支",switchBranchPlaceholder:"选择分支",switchBranchSearchPlaceholder:"搜索本地分支",switchNoBranches:"没有本地分支",switchBranch:"切换",noStagedChangesShort:"无暂存",stagedCount:({count:e})=>`已暂存 ${e}`,stagedCountShort:({count:e})=>`已暂存 ${e}`,commitSectionTitle:"提交",commitReadyHint:({count:e})=>`${e} 个文件已准备提交`,commitMessagePlaceholder:"提交信息",commitChanges:"提交",commitNeedsStaged:"请先暂存要提交的改动",commitAhead:"↑ 待推送",commitBehind:"↓ 待拉取",commitSynced:"已同步",recentCommitsTitle:"近期提交",recentCommitsSearchPlaceholder:"搜索提交 hash 或信息",recentCommitsLoadMore:"加载更多提交",recentCommitsEmpty:"暂无提交历史",pushSectionTitle:"同步远端",pushRemoteLabel:"Remote",pushRemotePlaceholder:"origin",pushRemoteSearchPlaceholder:"搜索 Remote",pushNoRemotes:"没有 Remote",pushBranchLabel:"目标分支",pushBranchPlaceholder:({branch:e})=>`${e}`,pushBranchSearchPlaceholder:"搜索分支",pushNoBranches:"没有分支",pushUpstreamBadge:"upstream",pushCurrentBranchBadge:"当前",pushNoUpstream:"当前分支未设置 upstream",pushUpToDate:"与远端同步",pushAheadCount:({count:e})=>`领先远端 ${e} 个提交`,pushBehindCount:({count:e})=>`落后远端 ${e} 个提交`,pushDivergedCount:({ahead:e,behind:t})=>`领先 ${e} / 落后 ${t} 个提交`,pullChanges:"拉取",pushChanges:"推送",gitActionRunning:"执行中…",gitActionFailed:({message:e})=>`Git 操作失败:${e}`,confirmRestoreTitle:"确认丢弃改动",confirmRestoreDescription:({path:e})=>`将丢弃 ${e} 的未暂存改动,此操作不可从 Termdock 恢复。`,confirmRestorePhrase:"丢弃改动",confirmRestorePlaceholder:"输入“丢弃改动”确认",confirmStashAllTitle:"确认贮藏全部改动",confirmStashAllDescription:"会把当前工作区改动(包含未跟踪文件)移入贮藏。",confirmAction:"确认",renderingHtml:"正在渲染 HTML…",footnotes:"脚注",backToFootnote:({index:e})=>`返回脚注 ${e}`,openMermaidDiagram:"打开 Mermaid 图表",mermaidDiagram:"Mermaid 图表",renderingDiagram:"正在渲染图表…",markdownImage:"Markdown 图片",image:"图片",previousImage:"上一张图片",nextImage:"下一张图片",closeImagePreview:"关闭图片预览",emptyFile:"空文件。",insertReference:({reference:e})=>`插入引用:${e}`,copyReference:({reference:e})=>`复制引用:${e}`,byteCount:({count:e})=>`${e} 字节`,previewTruncated:"预览已截断至 1 MB",branchCandidatesLoading:"正在加载分支候选…",includeUncommitted:"包含本地未提交改动",includeUncommittedCurrentBranchOnly:"仅当对比分支是当前检出分支时可开启",includeUncommittedHint:"查看对比或生成解释时纳入工作区和未跟踪文件的 diff",missingBaseReposSkipped:({repositories:e})=>`未设置基线的仓库会跳过:${e}`,localBranch:"本地",remoteBranch:"远端"},fileTree:{insertRef:"引用",insertRefTitle:"Insert file reference into active terminal",openDirRoot:"进入",openDirRootTitle:"把这个目录作为当前浏览根目录",openInFileBrowser:"在 Finder 中显示",openInFileBrowserTitle:"在系统文件浏览器中打开这个项目",openInFileBrowserFailed:"打开文件浏览器失败",moreDirActions:"更多目录操作",searchFromDir:"从这里搜索",searchFromDirTitle:"只搜索这个目录及其子目录",pinDir:"固定",pinDirTitle:"固定这个目录到当前项目",unpinDir:"已固定",unpinDirTitle:"取消固定这个目录",pinFileTitle:"固定这个文件到当前项目",unpinFileTitle:"取消固定这个文件",pinFile:"固定",unpinFile:"已固定",moreFileActions:"更多文件操作",deleteFile:"删除文件",deleteFileConfirm:({name:e})=>`确认删除“${e}”?此操作无法撤销。`,deleteFileFailed:({message:e})=>`删除文件失败:${e}`,noWorkingDir:"未检测到工作目录。",emptyDir:"空目录。",noMatchingFiles:"没有匹配的文件。",searching:"正在搜索文件…",searchingWithCount:({count:e})=>`搜索中…已找到 ${e} 项`,searchResults:({count:e})=>`${e} 个结果`,searchScope:"搜索范围",searchTruncatedHint:({count:e})=>`降级搜索已扫描大量目录并在找到 ${e} 项后停止。安装 ripgrep 或输入更精确关键词可获得完整结果。`,searchStillRunning:"搜索仍在进行,更多结果会自动出现。",showingSearchResults:({shown:e,total:t})=>`正在展示 ${e}/${t}`,loadMoreSearchResults:({shown:e,total:t})=>`查看更多(${e}/${t})`,contentMatchesCount:({count:e})=>`${e} 个文件命中`,moreMatches:({count:e})=>`还有 ${e} 处匹配`,noContentMatches:"文件内容中没有匹配。",contentSearchNeedsRipgrep:"内容搜索需要 ripgrep(rg),请在服务端安装后再在文件内搜索。",truncatedHint:"仅展示前 1000 项。使用搜索或打开更小的文件夹以获得更好性能。",dropToUploadHere:"上传到这里",symbolicLink:"符号链接",sortByModified:"按最近修改排序",sortByName:"按名称排序",sortedByModified:"已按最近修改排序"},diffViewer:{noFileChanges:"此文件无改动。",noUnstagedChanges:"没有未暂存的改动。",emptyHint:"做一些改动,或从远程拉取。",loading:"正在加载 diff…",insertAllDiff:"把当前 diff 内容作为上下文插入 Terminal",insertFileDiff:"引用这个文件的 diff",insertHunkDiff:"引用这段 diff hunk",insertLineDiff:"引用选中的这几行 diff",insertHunkShort:"引用",insertFileShort:"引用",insertAllShort:"全部",stageHunk:"暂存",stageHunkTitle:"只把这个 hunk 加入暂存区 (git apply --cached)",revertHunk:"撤销",revertHunkTitle:"撤销这个 hunk 的工作区改动(不可恢复)",revertHunkConfirm:"确认撤销?",hunkActionReverted:"已撤销",hunkActionStaged:"已暂存",hunkActionApplying:"应用中…",hunkActionUnavailable:"无法为这个 hunk 构造补丁",hunkActionFailed:({message:e})=>`操作失败:${e}。如改动已变化,请刷新后重试。`,auditExplanation:"更改意义",auditStale:"解释已失效",auditClear:"清除解释",auditGeneratedAt:({time:e})=>`生成于 ${e}`,allDiffLabel:"全部 diff",allChangesLabel:"全部改动",workingTree:"工作区改动",allUnstaged:"所有未暂存改动",binaryOrEmpty:"没有可显示的文本改动。",noFinalNewline:"文件末尾没有换行符",noHunks:"没有 hunk",hunkOutline:"Hunk 列表",expandHunkRail:"显示 hunk 列表",collapseHunkRail:"隐藏 hunk 列表",prevHunk:"上一个 hunk",nextHunk:"下一个 hunk",prevFile:"上一个",nextFile:"下一个",expandFile:"展开文件",collapseFile:"折叠文件",expandAll:"全部展开",collapseAll:"全部折叠",collapseHunk:"折叠 hunk",useBracketKeysHint:"按 [ / ] 在 hunk 之间跳转",unified:"统一",unifiedMode:"统一视图",split:"分屏",splitMode:"左右分屏视图",moreActions:"更多操作",view:"视图",loadingPreviousFile:"正在加载上一个文件…",loadingNextFile:"正在加载下一个文件…",resizeNavigation:"调整 diff 导航宽度",focusPathHint:"点击标注聚焦路径",whitespace:"空白",whitespaceDefault:"默认",whitespaceTrim:"忽略行尾空白",whitespaceIgnore:"忽略所有空白",whitespaceIgnoreBlankLines:"忽略空行",context:"上下文",expandAbove:({count:e})=>`向上展开 ${e} 行`,expandBelow:({count:e})=>`向下展开 ${e} 行`,contextLines:({count:e})=>`${e} 行`,contextAll:"全部"},settings:{title:"设置",appearanceSection:"外观与终端",controlsSection:"操作与提醒",serviceSection:"服务与诊断",serverHealthRecoveryOn:"自动恢复已开",serverHealthRecoveryOff:"自动恢复未开",serverHealthNeedsAttention:"有异常",font:"字体",render:"渲染",workspaceLimit:"保留服务页面",workspaceUnlimited:"不限制",workspaceLimitHint:"在本机生效,包含入口页面。数量越少越省内存;超限释放最久未用的后台页面,切回时重新连接,终端任务继续运行。",theme:"主题",darkTheme:"深色",lightTheme:"浅色",newTab:"新标签",debug:"调试",noSleep:"常亮",noSleepUnavailable:"无网络 — 已禁用",updateTitle:"Termdock 更新",updateRuntimeTitle:"CLI 与服务 Runtime",updateServiceTitle:"服务更新",updateDetails:"版本详情",updateHint:"手动检查会立即下载并安装新版本;服务只会在你确认后重启。",updateCheck:"检查更新",updateCheckAgain:"再次检查",updateChecking:"正在检查 npm 上的最新版本…",updateCheckingShort:"检查中…",updateInstallingShort:"安装中…",updateCurrent:"当前服务已是最新版本。",desktopUpdateTitle:"macOS 桌面版",desktopUpdateHint:"手动检查 GitHub 发布的签名桌面版本。",desktopUpdateUnsupported:"仅签名安装的 macOS 桌面版支持应用内更新。",desktopUpdateChecking:"正在检查桌面版更新…",desktopUpdateCurrent:"桌面版已是最新版本。",desktopUpdateDownloadingShort:"下载中…",desktopUpdateDownloading:"发现新版本,正在后台下载…",desktopUpdateReady:"桌面版更新已下载,可以重启安装。",desktopUpdateInstalling:"正在重启并安装桌面版更新…",desktopUpdateCheck:"检查桌面版",desktopUpdateCheckAgain:"再次检查",desktopUpdateRestart:"重启并安装",desktopUpdateRestartConfirm:"重启 Termdock 并安装已下载的桌面版更新?终端服务和 tmux 会话不会被停止。",serverHealthTitle:"服务健康",serverHealthHint:"Termdock 服务最近出过什么事。",serverHealthSupervised:"自动恢复已开启:服务崩溃或无响应时会尝试自动重启。",serverHealthUnsupervised:"内置自动恢复未开启,服务异常退出后可能需要手动重启。",serverHealthEnable:"开启并重启",serverHealthEnableHint:"开启后会重启服务并短暂断连。普通终端可能中断,tmux 会话可在重连后恢复。连续多次启动失败时会停止重试。",serverHealthEnabling:"正在开启…",serverHealthEnablePending:"等待服务重连并确认自动恢复状态…",serverHealthEnableError:"未能确认自动恢复已开启。请重连后查看状态;若服务无法连接,请在服务所在设备检查启动日志。",serverHealthEnableUnavailable:"当前启动方式不支持在此开启。请在服务所在设备配置守护启动;桌面版或外部托管服务由原启动程序管理。",serverHealthClean:"没有异常记录。",serverHealthHistory:"历史异常",serverHealthRunningNow:"当前服务正在运行,自动恢复已开启。",serverHealthLastIncident:"最近一次异常",serverHealthRestarted:({count:e})=>`已自动重启 ${e} 次`,serverHealthGaveUp:({count:e})=>`连续失败 ${e} 次后,该守护进程已停止重试。`,serverHealthSupervisorLost:"自动恢复已失效,服务仍在运行。",serverHealthOomNote:"退出前内存接近上限,可能是被 OOM killer 杀掉的。",serverHealthUptime:({duration:e})=>`运行了 ${e}`,serverHealthDismiss:"知道了",serverHealthDismissed:"已确认",serverHealthUnknownEvent:"服务出过问题",serverHealthEventStartupFailure:"启动失败",serverHealthEventCrash:"崩溃退出",serverHealthEventCrashNative:"原生代码崩溃",serverHealthEventKilled:"被强制杀掉",serverHealthEventWedge:"卡死无响应,只能杀掉",serverHealthEventPortConflict:"起不来:端口已被占用",serverHealthEventGaveUp:"当时连续失败,停止重试",serverHealthEventExitZero:"未经要求地以 0 退出",serverHealthEventTerminated:"被其他进程终止",serverHealthEventSupervisorLost:"与监督者失联",serverHealthEventUncaughtException:"触发了未捕获异常",serverHealthEventUnhandledRejection:"有未处理的 Promise 拒绝",serverHealthEventExitNonzero:"以错误码退出",notifications:"通知",notificationsTitle:"通知设置",notificationsHint:"Termdock 在后台时,AI 任务结束后发送系统通知。",notificationsPageHint:"选择哪些 Termdock 事件可以发送系统通知。总开关负责浏览器权限和投递,事件开关决定具体哪些内容提醒你。",notificationsMaster:"系统通知",notificationsMasterHint:"允许 Termdock 在隐藏或作为 PWA 安装运行时发送通知。",notificationsIOSInstallHint:"在 iPhone 或 iPad 上,请先将 Termdock 添加到主屏幕,再开启通知。",notificationsPermission:"权限",notificationsPermissionSystem:"由 macOS 管理",notificationsTest:"发送测试",notificationsTestChecking:"正在等待 macOS 确认投递…",notificationsTestDelivered:"已投递到通知中心;若没有横幅,请检查提醒样式和专注模式。",notificationsTestFailed:"macOS 未投递通知,请在系统设置中允许 Termdock 通知。",notificationsOpenSystemSettings:"打开系统通知设置",notificationsAlertStyle:"提醒方式",notificationsAlertStyleHint:"最终是否横幅弹出仍由浏览器和 Android 系统决定。Termdock 只能请求静默、默认或持续显示等通知选项。",notificationsStyleNormal:"默认",notificationsStyleNormalHint:"允许时声音/震动",notificationsStyleQuiet:"静默",notificationsStyleQuietHint:"仅状态栏,无声音",notificationsStylePersistent:"持续",notificationsStylePersistentHint:"保留到手动关闭",notificationsEvents:"事件",notificationsAiFinished:"AI 任务结束",notificationsAiFinishedHint:"当 Termdock 在后台时,AI agent 停止后发送通知。",notificationsSessionExited:"终端退出",notificationsSessionExitedHint:"终端进程自行结束时发送通知(主动关闭不触发,经 Web Push 投递)。",notificationsFutureHint:"后续可以在这里继续增加更多通知类型,不需要改变顶层设置布局。",notificationsOffSummary:"系统通知已关闭",notificationsAiOnSummary:"AI 任务结束通知已开启",notificationsExitOnSummary:"终端退出通知已开启",notificationsBothOnSummary:"AI 任务结束、终端退出通知已开启",notificationsNoEventsSummary:"暂无开启的通知事件",notificationsDenied:"浏览器通知权限已被阻止,请在站点设置中开启。",notificationsUnsupported:"通知需要 HTTPS 和浏览器支持,也可使用客户端。",notificationsTestBody:"通知已开启。后台 AI 任务结束后会提醒你。",shell:"临时会话",tmux:"断线保留",auto:"自动",webgl:"WebGL",canvas:"内置",tmuxServer:"Tmux 服务",tmuxUnavailable:"不可用",noTmuxSessions:"服务端没有 tmux 会话。",installTmuxHint:"请在服务端安装 tmux 后启用。",refresh:"刷新",attached:"已连接",restorable:"可恢复",attach:"连接",attaching:"连接中…",destroy:"销毁",sessions:({n:e})=>`${e} 个会话`,windows:({n:e})=>`${e} 个窗口`,keyboardToolbar:"键盘工具栏",aiAgentDetection:"AI 代理检测",signOut:"退出登录",language:"语言",programNamePlaceholder:"程序名(如 claude)",patternPlaceholder:"正则表达式(如 Thinking|Generating)",statusPlaceholder:"状态",addProgram:"添加程序",addPattern:"添加规则",resetDefaults:"恢复默认",invalidRegex:"无效的正则",removeProgram:"移除程序",removeRule:"移除规则",keepLabel:"保持",customColor:"自定义颜色",tabIndicator:"标签指示器样式",toolbarPresets:"自定义工具栏",detectionRules:"检测规则",agentHooksHint:"安装 hooks 后,agent 会主动上报状态:回合进行中(绿)、等你授权/回答(黄)、回合完成(对勾),并在等待你输入时推送通知。hooks 全局安装但只在 termdock 的终端里生效。",agentHooksInstall:"安装",agentHooksInstalled:"已安装",agentHooksOutdated:"需更新",agentHooksNeedsApproval:"待授权",agentHooksUnverified:"运行状态未确认",agentHooksUnverifiedHint:"配置已写入,但尚未确认 Codex 已启用并信任这些 Hook。请在 Codex 中运行 /hooks 检查。",agentHooksApprovalHint:"在 Codex 中输入 /hooks,批准 Termdock Hook 后生效",agentHooksNotInstalled:"未安装",agentHooksUninstall:"卸载",agentHooksReinstall:"重新安装",agentHooksDevMode:"开发模式:hooks 指向 TS 源码,需要构建后的版本才能生效",agentHooksTarget:"写入",agentAutoRename:"自动更新会话标题",agentAutoRenameHint:"Agent 完成一轮后,根据近期内容更新标题。默认全部关闭,手工命名的会话不会被覆盖;启用外部插件标题后才会执行其 CLI。",agentAutoRenameToggle:"切换此 Agent 的自动标题",agentAutoRenameShort:"自动标题",agentAutoRenameNamer:"起名 Agent",agentAutoRenameFollow:"跟随当前会话",agentAutoRenameModelsFromCli:"模型由本机 CLI 动态提供",agentAutoRenameRefreshModels:"重新查询 CLI 模型",agentAutoRenameCliDefault:"CLI 默认模型",agentAutoRenameAutomatic:"自动选择",agentAutoRenameNoCli:"未检测到可用于起名的 CLI",agentAutoRenameAdvanced:"高级标题偏好",agentAutoRenamePreference:"补充偏好",agentAutoRenamePreferenceHint:"可选。仅补充你对标题风格或重点的偏好;Termdock 的默认起名规则仍会保留。离开输入框时自动保存。",agentAutoRenamePreferencePlaceholder:"例如:突出用户收益;优先使用动宾结构;避免技术术语",agentAutoRenamePayloadLimit:"用户消息上下文上限(字符)",agentAutoRenamePayloadLimitHint:"保留 prompt-submit 原始 payload 的总字符数,默认 12000,可设置 1000–64000。",agentPlugins:"Agent 插件",agentPluginAdd:"添加插件",agentPluginHint:"支持公开或内网 Git(HTTPS、HTTP、SSH)及本地目录。由当前服务电脑拉取,使用该电脑的 Git 凭证和 SSH 配置。Hooks 和标题 CLI 需分别启用。",agentPluginCreate:"创建插件",agentPluginDelete:"删除插件",agentPluginInvalid:"插件配置无效",agentPluginCopyAiPrompt:"复制 AI 修复提示",agentPluginCopied:"已复制",agentPluginSourcePlaceholder:"Git 仓库地址、git@host:team/plugin.git 或本地目录",agentPluginInstallPackage:"安装插件",agentPluginAdvancedManifest:"高级:直接粘贴 manifest.json",agentPluginUpdateAvailable:"有更新",agentPluginManualSource:"手动 manifest",agentPluginUpdate:"更新",agentPluginCheck:"检查更新",agentPluginDoctor:"诊断",agentPluginDoctorHint:"显式运行插件模型探测,不会调用标题生成",agentPluginDoctorStatusOk:"标题与模型能力正常",agentPluginDoctorStatusMissing:"未声明 titleNamer",agentPluginDoctorStatusCliDefault:"标题可用,使用 CLI 默认模型",agentPluginDoctorStatusNoModels:"没有可用的模型数据",agentPluginDoctorStatusFailed:"模型探测失败",agentPluginDoctorModels:"个可用模型",agentPluginDoctorAutomatic:"自动选择",agentPluginDoctorCliDefault:"未指定模型时使用 Agent CLI 默认模型",agentAutoRenameInterval:"重新判断间隔",agentAutoRenameMinutes:"分钟",mobileKeyboard:"移动键盘",saving:"保存中…",rulesHint:"配置正则表达式来识别 AI 工具在终端标签中的状态。每条规则可独立设置标签、颜色、图标样式以及输出静默后指示器保留的时长。停止后若你未查看该标签,标签会保留一个黄色待查看提示。",programsHelp:"支持在一个配置中匹配多个程序,用英文逗号分隔。",programLabelResolution:"程序名识别",rawCommandMapping:"原始命令映射",rawCommandMappingHint:"以下规则将原始命令行映射为标签显示名。用户规则优先于内置规则。",genericProgramNames:"通用程序名",genericProgramNamesHint:"触发 ps 深度识别(如 node, python)",wrapperScriptNames:"包装脚本名",wrapperScriptNamesHint:"CLI 包装器,启动其他工具(如 aiden, npx)",shellNamesConfig:"Shell 名称",shellNamesHint:"从标签显示中过滤(如 bash, zsh)",addTag:"+ 添加",customRules:"自定义规则",addRule:"添加规则",localAccess:"本地访问",localAccessHint:"连接地址与手机访问引导",resetAutoName:"恢复自动",mobileSetupIntro:"手机与此服务需处于同一网络。启用 HTTPS 时,先安装并信任本地 CA 证书,再打开下方访问地址。",mobileSetupDownload:"1. 扫码下载 CA 证书",mobileSetupIos:"iPhone / iPad:用相机扫码后在 Safari 打开。在「设置 → 通用 → VPN 与设备管理」安装已下载的描述文件,再到「设置 → 通用 → 关于本机 → 证书信任设置」开启完全信任。",mobileSetupAndroid:"Android:下载证书后,在系统安全设置中将其安装为 CA 证书。不同品牌的菜单名称可能有所不同。",mobileSetupConnect:"2. 打开 Termdock",mobileSetupConnectHint:"信任证书后,扫描下方 IP 地址二维码,或将本地地址复制到手机浏览器。若域名无法解析,请使用 IP 地址。",onboardingUrl:"手机引导",httpsActive:"HTTPS 已启用",httpsInactive:"HTTPS 未启用",caMissing:"未配置 CA 下载",closeSettings:"关闭设置",desktopTitle:"Termdock 桌面端",desktopStatusLoading:"正在读取 macOS 原生状态…",desktopSwitchService:"切换服务",desktopOpenDataDirectory:"打开数据目录"},toolbarPresets:{toolbarOptions:"工具栏选项",arrangement:"排列",currentLayout:"当前",reorderAction:"拖动 {name} 排序",autoMatch:"自动匹配",manualShort:"手动选择",previewFor:"预览 · {name}",previewTapHint:"点自定义按钮编辑",useInTerminal:"在当前终端使用这套",automatic:"自动(跟随程序)",autoToolbar:"自动跟随程序 · {name}",manualToolbar:"当前工具栏 · {name}",switchToolbar:"切换或自定义工具栏",reloadTitle:"重新读取已保存的配置?",reloadHint:"这会放弃本机尚未保存的修改,改用服务上的最新配置。",staleAction:"此按钮在编辑期间发生了变化。草稿仍保留,请取消后重新打开最新按钮。",previewMobile:"手机",previewDesktop:"电脑",desktopPreviewHint:"电脑工具栏显示这里的按钮,不显示手机主工具栏。",enableDesktop:"这套目前在电脑上隐藏 · 点击显示",done:"完成",confirmChange:"确认",comboHelp:"选择要一起按下的修饰键和按键。",matchedHint:"自动模式下,运行 {programs} 时使用。",intro:"把常用操作放到手边",introHint:"先选要调整的工具栏,再点按钮修改或添加。",chooseToolbar:"要调整哪套工具栏",baseName:"通用终端",autoHint:"这里选择要编辑的工具栏;终端仍按原来的方式选择。",baseHint:"自动模式下,未匹配其他程序时使用这套。",manualHint:"这套需要在终端工具栏的切换菜单中选择。可在更多设置中关联程序。",previewHint:"点按钮即可修改。这里预览展开后的按钮区。",fixedKeysHint:"手机主工具栏的 Esc、Ctrl、粘贴等常用键始终保留。",editAction:"编辑 {name}",newToolbar:"复制为新工具栏",copyName:"{name} 副本",moreSettings:"名称、自动切换与更多设置",appearance:"按钮大小",comfortable:"每行 4 个",balanced:"每行 6 个",compact:"每行 8 个",customLayout:"自定义每行数量",advanced:"高级设置",advancedHint:"仅在需要特殊按键、多步输入或双击操作时使用。",saveAction:"保存按钮",addAction:"添加到工具栏",actionName:"按钮名称",otherKeys:"其他按键",backToKeys:"返回按钮库",addKey:"添加 {key}",keyAlreadyAdded:"{key} 已在工具栏",renameAction:"修改按钮名称",actionType:"点击后做什么",commonKeys:"常用按键",inputText:"命令或文字",combination:"组合按键",rawAction:"自定义序列",chooseKey:"选择一个按键",textContent:"要输入的文字或命令",textPlaceholder:"例如 /compact 或 git status",sendEnter:"输入后按回车",sendEnterHint:"开启后会直接提交命令;关闭则只填入文字。",namePlaceholder:"留空时使用操作名称",draftHint:"保存后才会更新工具栏。取消不会修改原按钮。",pressSummary:"按下 {key}",typeSummary:"输入「{text}」",submitSummary:"输入「{text}」并回车",customSummary:"自定义多步操作",doubleTapSummary:"另有双击操作",doubleTapHelp:"连续点两次时发送的内容。留空则关闭双击操作。",sequenceHelp:"支持 \\r 回车、\\t Tab、\\u001b Esc;用 || 分隔需要间隔发送的步骤。",emptyAction:"请先选择按键或填写文字。",removeButton:"删除按钮",lastButton:"至少保留一个按钮",undo:"撤销",changed:"已更新工具栏",removed:"已删除按钮",restoreToolbar:"恢复这套的默认按钮",restoreAll:"恢复所有默认工具栏",restoreTitle:"恢复所有默认工具栏?",restoreHint:"自定义工具栏和修改都会被替换。恢复后仍可撤销。",deleteTitle:"删除这套工具栏?",deleteHint:"对应程序会改用其他匹配的工具栏或通用终端。删除后可撤销。",defaultsHint:"当前使用默认按钮,修改时会保留其他按键。",sharedHint:"配置保存在当前服务,连接此服务的设备共享。",saving:"正在保存…",saved:"已保存",loading:"正在读取工具栏…",saveFailed:"尚未保存到服务,请重试。",loadFailed:"未能读取已保存的配置,请重试后再编辑。",conflict:"另一台设备刚修改了配置,请重新读取后再编辑。",reload:"重新读取",configure:"自定义工具栏…",entryHint:"增删按钮、调整顺序与大小",programNames:"在哪些程序中自动使用",programHint:"输入程序名后回车,例如 codex 或 vim。留空则手动选择。",programPlaceholder:"输入程序名称",layoutHint:"按按钮数量自动换行,不必计算空位。",key_interrupt:"停止当前运行",key_tab:"补全 / 切换",key_enter:"确认 / 回车",key_escape:"取消 / 返回",key_clear:"清空屏幕",key_search:"搜索命令历史",key_up:"向上 / 上条历史",key_down:"向下 / 下条历史",key_left:"光标向左",key_right:"光标向右",key_home:"移到行首",key_end:"移到行尾",key_shiftLeft:"Shift + 向左",key_deleteLine:"删除光标前内容",key_eof:"结束输入",preview:"预览",presets:"工具栏",label:"标签",new:"新建",reset:"重置",presetLabelPlaceholder:"预设名称",deletePreset:({name:e})=>`删除预设 ${e}`,matchPrograms:"匹配程序",typeEnterHint:"输入后回车",programsPlaceholder:"vim, nvim, /^claude(-code)?$/i …",programsHelp:"纯字符串按大小写不敏感子串匹配。用 /…/flags 包裹则为正则(针对小写程序名测试)。",altSlot:"Alt 修饰键槽",altSlotHint:"在预览中保留一个 Alt 键槽位。",desktopVisibility:"桌面端显示",desktopVisibilityHint:"桌面端只显示该预设的自定义按钮,不显示基础快捷键。",rowLayout:"行布局",rowLayoutHint:"每行按钮数。",addRow:"行",rowN:({n:e})=>`第 ${e} 行`,del:"删",buttons:"按钮",buttonsHint:"点击编辑,使用 ↑↓ 排序。",addButton:"添加按钮",noCustomButtons:"暂无自定义按钮。添加一个来覆盖默认工具栏。",moveUp:"上移",moveDown:"下移",removeRow:({n:e})=>`移除第 ${e} 行`,removeAction:({name:e})=>`移除 ${e}`,labelField:"标签",labelPlaceholder:"按钮上显示的文本",sequence:"序列",keyCombo:"组合键",comboKey:"按键",namedKeys:"方向与控制键",functionKeys:"功能键",characterKeys:"字母、数字与符号",insertCombo:"插入组合键",keyComboHint:"选择修饰键和按键,追加到当前序列末尾。具体效果由终端程序决定。",unsupportedCombo:"终端无法区分此组合键,请调整修饰键或按键。",sequencePlaceholder:"例如 /undo 或 \\t 或 /||undo",sequenceHint:"双击序列",doubleTap:"双击序列",doubleTapAdd:"+ 添加",doubleTapPlaceholder:"例如 /undo\\r 或 /||undo ||\\r",remove:"移除",noSequence:"无序列",preset:"预设",overCapacityHint:"按钮数超过槽位,多余按钮将使用最后一行的尺寸。"},agentRules:{ruleColors:{green:"绿",yellow:"黄",red:"红",blue:"蓝",purple:"紫",orange:"橙",gray:"灰"}},tab:{session:"会话",new:"新建会话",rename:"重命名",renameHint:"修改标签的显示名称",renamePlaceholder:"留空则恢复默认名称",copyCwd:"复制当前目录",copyCwdHint:"复制当前工作目录",closeMenu:"关闭菜单",openGroup:"打开协作组",leaveGroup:"退出协作组",leaveGroupShortHint:"保留终端,仅退出这个协作组",leaveGroupConfirm:"确认退出",leaveGroupQuestion:({name:e})=>`让这个会话退出“${e}”?`,leaveGroupHint:"终端继续运行,其他成员和历史消息会保留。退出后不再接收这个组的新消息,可以重新加入。",leavingGroup:"正在退出…",leaveGroupFailed:"退出失败,请重试",fontSize:"字体大小",fontSizeHint:"仅对这个会话生效",fontSizeReset:"跟随全局",resumeAgent:"恢复 Agent 会话",resumeAgentHint:"用原生 session id 恢复上次对话",resumeAgentAvailable:"有可恢复的 Agent 对话",resumeAgentRecoveredTitle:({agent:e})=>`可继续上次的 ${e} 对话`,resumeAgentRecoveredHint:"Terminal 曾异常中断,已重新创建;可以从上次对话继续。",resumeAgentNow:"恢复",resumeAgentLater:"暂不恢复",resumeAgentSubmitting:"正在提交原生恢复命令…",resumeAgentWaiting:"正在等待 Agent 确认已载入原会话…",resumeAgentSuccess:({agent:e})=>`${e} 会话已恢复`,resumeAgentFailed:"Agent 会话恢复失败,可以重试。",resumeAgentConflict:"该 Agent 会话已在另一个 Terminal 中打开。",resumeAgentBusy:"当前 Agent 回合尚未结束,暂时不能恢复。",resumeAgentTimeout:"Agent 未确认已载入原会话,请查看 Terminal 输出或重试。",tmuxRecoveryTitle:({count:e})=>`终端中断,${e} 个对话待接回`,tmuxRecoveryHint:"接回原对话,保留历史。进度会持续显示。",tmuxRecoveryRestoreAll:"恢复全部",tmuxRecoveryRestoring:"正在恢复…",tmuxRecoveryDismiss:"暂不处理",tmuxRecoveryPartial:({restored:e,failed:t})=>`已接回 ${e} 个 · 失败 ${t} 个`,tmuxRecoveryFailed:"恢复失败,请检查终端状态后重试。",tmuxRecoveryDismissFailed:"暂时无法关闭该恢复提示。",tmuxRecoveryProgress:({total:e,queued:t,paused:n,resourceWait:r,running:o,succeeded:s,failed:i})=>`恢复进度:总计 ${e} · 排队 ${t} · 暂停 ${n}(资源等待 ${r}) · 执行中 ${o} · 完成 ${s} · 失败 ${i}`,tmuxRecoveryPausedForResources:"资源不足,已暂停启动;资源恢复后会自动继续。",tmuxRecoveryPause:"暂停",tmuxRecoveryResume:"继续",tmuxRecoveryInProgress:"恢复进行中",tmuxRecoveryDetails:"受影响的对话",tmuxRecoveryDiagnostics:"查看恢复详情",tmuxRecoveryWaiting:"等待接回",tmuxRecoveryDone:"已接回",tmuxRecoverySuccess:({count:e})=>`${e} 个原对话已接回`,tmuxRecoveryReturn:"返回恢复",tmuxRecoveryInspect:"查看终端",tmuxRecoveryRetryFailed:"重试失败会话",copied:"已复制",close:"关闭会话",closeHint:"从列表移除该标签",longPressTip:"提示:按住标签不动约半秒打开操作菜单,按住并拖动可排序。",sessionsTitle:"会话",explorerTitle:"资源管理器",split:"分屏",splitTitle:"添加到分屏工作区",closeFailed:({name:e})=>`未能关闭「${e}」。会话仍保留,请重试。`,splitNew:"新建会话并加入",splitNewHint:"沿用当前目录和默认会话类型;可连续加入多个会话",splitExisting:"选择已有会话或工作区",splitExistingHint:"会话可组成多个独立工作区;选择另一工作区会将两组合并",splitCurrent:"当前",splitClose:"退出分屏",splitLayout:"分屏布局",splitHorizontal:"左右",splitVertical:"上下",splitGrid:"网格",splitWorkspace:"分屏组",splitWorkspaces:"分屏工作区",splitRename:"重命名分屏组",splitRemovePane:"移出分屏",splitExistingGroups:"已有分屏组",splitAvailableSessions:"可加入的会话",splitOccupied:"已成组",splitUnavailableGrouped:"分组模式下只能分屏同一目录的会话",splitEndedGrouped:"已退出分屏:分组模式不支持跨目录组合",splitNoOtherSessions:"没有可组合的其他会话",sessionCount:({count:e})=>`${e} 个会话`,closeChooserTitle:"销毁 Tmux 会话?",closeChooserDescription:"确认后会终止该会话及其中的所有进程,此操作无法撤销。",destroySession:"销毁会话",confirmDestroySession:"确认销毁",destroySessionHint:"终止 tmux 会话及其中的所有进程。",dragToClose:"拖到此处关闭",releaseToClose:"松手后确认"},agent:{aiRunning:"AI 运行中",recentActivity:"会话有新动态",needsReview:"需要查看",finishedReview:"AI 已完成 — 需要查看",chatUnread:"{count} 条未读消息",aiWaiting:"AI 等待中",copyMode:"Copy 模式",jumpToNext:"跳到下一个待处理",jumpToNextRunning:"跳到下一个运行中会话",selectRunningSession:"选择运行中的 Session",runningSessionGestureHint:"轻点循环 · 横向滑动选择 · 长按拖动",currentSession:"当前"},serviceAttention:{title:"所有服务的待处理",summary:"{services} 个服务 · {count} 个会话",currentService:"当前服务",waiting:"等待你处理",offline:"连接已断开 · 显示上次状态",login:"需要重新登录 · 显示上次状态",empty:"暂时没有待处理会话",viewService:"进入服务查看",scope:"汇总已打开的服务,点会话直接进入",changed:"待处理状态已更新,请重新选择。",unavailable:"暂时无法打开该服务,请从服务列表重试。"},connection:{reconnecting:"正在重连…"},desktopServices:{switchService:"切换 Termdock 服务",openServices:"已打开的服务",idle:"空闲",manageServices:"管理服务与名称"},terminal:{input:"终端输入",error:"错误",dropFilesToPastePaths:"拖放文件以输入路径",loading:"正在加载终端…",initializing:"正在初始化终端引擎…",failedToLoad:"终端加载失败",unknownError:"发生未知错误",componentFailed:"终端组件加载失败",paste:"粘贴",copied:"已复制",copyFailed:"复制失败",longPressSelectsText:"长按选择文本",longPressSendsArrows:"长按发送方向键",switchLongPressToArrows:"将长按切换为方向键",switchLongPressToCopy:"将长按切换为复制所选文本"},quota:{title:"订阅配额",noProviders:"未检测到订阅服务。",noProvidersHint:"使用 AI 编程工具并登录后,自动显示配额信息。",exhausted:"已用完",left:({n:e})=>`剩余 ${e}`,updated:({time:e})=>`${e} 更新`,refresh:"刷新",close:"关闭"},errorBoundary:{title:"出现了一些问题",unexpected:"发生意外错误",retry:"重试",copyDetails:"复制错误信息",copied:"已复制",copyFailed:"复制失败"},error:{type:{network:"网络连接错误",session:"会话错误",terminal:"终端错误",auth:"认证错误",validation:"验证错误",unknown:"未知错误"},severity:{low:"提示:",medium:"警告:",high:"错误:",critical:"严重错误:"},suggestion:{networkCheck:"检查网络连接",networkRetry:"尝试重新连接",networkProxy:"检查代理设置",networkWait:"等待网络恢复",sessionRecreate:"重新创建会话",sessionServer:"检查服务器状态",sessionCache:"清理浏览器缓存",terminalRestart:"重启终端",terminalConfig:"检查终端配置",terminalClear:"清除终端输出",authRelogin:"重新登录",authCredentials:"检查凭证",authAdmin:"联系管理员",validationFormat:"检查输入格式",validationParams:"验证参数",validationDocs:"参考文档",unknownReload:"刷新页面",unknownApp:"重启应用",unknownSupport:"联系技术支持"}}},wE=["en","zh"],Ho="en",_d=new WeakMap;let bE=0;function vE(e,t,n){const r=_d.get(e);if(!r?.pending||r.pending.id!==t)return;const o=performance.now();if(!document.hidden&&o-r.lastPoll<2500){const s=o-r.pending.sentAt;r.samples.push(s<8e3?s:null),r.samples=r.samples.slice(-20),s<8e3&&(r.lastReply=o,r.handlerMs=typeof n=="number"&&Number.isFinite(n)&&n>=0&&n<=s?n:void 0)}r.pending=void 0}function xE(e){const t={connected:!1,rtt:null,average:null,jitter:null,timeouts:0,samples:0,waiting:!1};if(!e||e.readyState!==WebSocket.OPEN)return t;const n=performance.now();let r=_d.get(e);if(r||(r={lastPoll:n,lastSent:-1/0,lastReply:-1/0,samples:[]},_d.set(e,r)),(document.hidden||n-r.lastPoll>=2500)&&(r.pending=void 0,r.lastSent=-1/0,r.lastReply=-1/0),r.lastPoll=n,!document.hidden&&(r.pending&&n-r.pending.sentAt>=8e3&&(r.samples.push(null),r.samples=r.samples.slice(-20),r.pending=void 0),!r.pending&&n-r.lastSent>=5e3)){const d=`quality-${++bE}`;r.pending={id:d,sentAt:n},r.lastSent=n;try{e.send(JSON.stringify({type:"ping",qualityProbeId:d}))}catch{return r.pending=void 0,t}}const o=r.samples.filter(d=>d!==null),s=r.samples[r.samples.length-1],i=n-r.lastReply<15e3,a=o.slice(1).map((d,u)=>Math.abs(d-o[u])),c=[...o].sort((d,u)=>d-u);return{diagnostics:e.getConnectionDiagnostics?.(),minimum:c[0],maximum:c[c.length-1],p95:c[Math.ceil(c.length*.95)-1],history:[...r.samples],handlerMs:i&&s!=null?r.handlerMs:void 0,lastReplyAgeMs:Number.isFinite(r.lastReply)?n-r.lastReply:void 0,connected:!0,rtt:i&&s!=null?Math.round(s):null,average:o.length?Math.round(o.reduce((d,u)=>d+u,0)/o.length):null,jitter:a.length?Math.round(a.reduce((d,u)=>d+u,0)/a.length):null,timeouts:r.samples.length-o.length,samples:r.samples.length,waiting:!!r.pending&&n-r.pending.sentAt>=1500}}function of(e){return e.displayName?.trim()?{displayName:e.displayName,displaySubtitle:e.displaySubtitle??null}:Ww({name:e.name,sessionId:e.sessionId,agent:e.agent})}const Lc=new Set(["bash","zsh","fish","sh","dash","ksh","tcsh","csh","nu"]);function Ki(e){if(!e)return null;if(e==="/")return"/";const t=e.replace(/\/+$/,"").split("/");return t[t.length-1]||e}function SE(e,t,n,r=Lc,o=null,s=null){if(e.customName&&e.name.trim())return{primary:e.name,secondary:Ki(n)};if(o){const d=Ki(n),u=o===n||o===d;if(s!=="idle"&&!r.has(o)&&!u)return{primary:o,secondary:d}}if(t&&!r.has(t))return{primary:t,secondary:Ki(n)};const i=Ki(n);if(i)return{primary:i,secondary:null};const a=e.name.trim(),c=/^(?:tmux:|remote:|wt-)/i.test(a)||a===e.sessionId||a===e.id;return{primary:a&&!c?a:e.agent?.displayName||"终端会话",secondary:null}}function Ww(e,t=Lc){const{primary:n,secondary:r}=SE(e,e.activeProgram??null,e.cwd??null,t,e.shellTitle??null,e.promptState??null);return{displayName:n,displaySubtitle:r}}function EE(e){const t=e.serviceLabel?.trim();if(!t||/^https?:\/\//i.test(t)||t===e.serviceOrigin)return"远端服务";try{const n=new URL(e.serviceOrigin??"");if(t===n.host||t===n.hostname)return"远端服务"}catch{}return t}function SB(e,t){const n=s=>of(s).displayName,r=n(e),o=t.filter(s=>n(s)===r);return o.length>1?`${r} ${o.findIndex(s=>s.sessionId===e.sessionId)+1}`:r}function EB(e){return e.serviceConnected===!1||["offline","disconnected","service-unreachable","closed","exited"].includes(e.status??"")?"disconnected":e.serviceConnected===!0?"connected":"unknown"}const Vw={RELAY_AUTHORIZATION_REQUIRED:"没有有效中转授权",TARGET_AUTHORIZATION_REQUIRED:"目标服务需要重新登录",PERMISSION_DENIED:"当前权限不允许此操作",TARGET_IDENTITY_MISMATCH:"服务身份与保存的身份不一致",RELAY_SELF_TARGET:"不能通过服务中转到其自身;同一服务的其它地址请添加为备用地址。",TARGET_PASSWORD_REQUIRED:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。",TARGET_SECURITY_UPGRADE_REQUIRED:"中转服务版本不支持密码保护核验,已禁用中转。请更新目标服务和中继程序。"};class pt extends Error{constructor(t,n={}){super(Vw[t]),this.code=t,this.context=n}code;context;name="ConnectionAccessError"}function Br(e,t={}){if(e instanceof pt)return Object.assign(e.context,{...t,...e.context}),e;if(e instanceof Error&&(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED"))return new pt(e.message,t);if(e instanceof Error&&e.name==="ConnectionAccessError"&&"code"in e&&typeof e.code=="string"&&Object.hasOwn(Vw,e.code))return new pt(e.code,t);if(e instanceof Error&&e.name==="UnexpectedPeerError")return new pt("TARGET_IDENTITY_MISMATCH",t)}function sf(e,t){return e instanceof Error&&(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")?new pt(e.message,t):e instanceof Error&&(e.message==="AUTHORIZATION_DENIED"||e instanceof pt&&e.code==="PERMISSION_DENIED")?new pt("RELAY_AUTHORIZATION_REQUIRED",t):e instanceof Error?e:new Error("中转连接暂不可用")}const Fr=4;function ze(e){if(typeof e!="string"||!e.trim()||e.length>2048)throw new Error("请输入服务地址。");const t=e.trim(),n=new URL(/^[a-z][a-z\d+.-]*:\/\//i.test(t)?t:`https://${t}`);if(n.protocol==="wss:"&&(n.protocol="https:"),n.protocol==="ws:"&&(n.protocol="http:"),!["https:","http:"].includes(n.protocol))throw new Error("请使用 HTTP 或 HTTPS 服务地址。");if(n.username||n.password||n.search||n.hash||!["/","/api/federation/secure"].includes(n.pathname))throw new Error("请输入服务首页地址,不要包含账号或额外参数。");return n.origin}function af(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new pt("RELAY_SELF_TARGET",{entryServiceId:e.entryServiceId,targetServiceId:e.targetPeerId});const t=Array.isArray(e.routes)?e.routes.slice(0,64):[];e.entryServiceId&&t.unshift({url:e.url,targetPeerId:e.entryServiceId});const n=new Set;return t.flatMap(r=>{try{if(!r||typeof r.targetPeerId!="string"||!/^[a-zA-Z0-9_.:-]{1,160}$/.test(r.targetPeerId))return[];const o=ze(r.url),s=JSON.stringify([r.targetPeerId,o]);return n.has(s)?[]:(n.add(s),[{url:o,targetPeerId:r.targetPeerId}])}catch{return[]}}).slice(0,Fr)}function Yw(e){return af(e).filter(t=>t.targetPeerId!==e.targetPeerId)}function Xw(e){const t=af(e),n=new Set(t.filter(s=>s.targetPeerId!==e.targetPeerId).map(s=>s.url)),r=[e.serviceOrigin||e.url,...t.filter(s=>s.targetPeerId===e.targetPeerId).map(s=>s.url)],o=new Set;for(const s of r)try{const i=ze(s);n.has(i)||o.add(i)}catch{}return[...o]}function kE(e,t,n=new Set){return Xw(e).length>0||!!t&&Yw(e).some(r=>r.targetPeerId!==t&&!n.has(r.targetPeerId))}function Oa(e){const t={...e,url:ze(e.url)},n=af(e);if(e.routes!==void 0&&(t.routes=n),e.serviceOrigin){const r=ze(e.serviceOrigin);n.some(o=>o.targetPeerId!==e.targetPeerId&&o.url===r)?delete t.serviceOrigin:t.serviceOrigin=r}return t}function IE(e,t="secure"){const n=new URL(ze(e));return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=`/api/federation/${t}`,n}const jc="termdock.federation.connections.v1",Ld="termdock:services-changed",cf="termdock-secure-removed-services",Ma=e=>[e.id,e.targetPeerId,e.serviceOrigin||e.url].filter(t=>!!t);function lf(){try{const e=JSON.parse(localStorage.getItem(cf)||"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}catch{return[]}}function Hn(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.url=="string")try{const n=ze(t.url),r=typeof t.targetPeerId=="string"&&t.targetPeerId?t.targetPeerId:void 0,o=(typeof t.label=="string"?t.label:typeof t.serviceName=="string"?t.serviceName:"").trim().slice(0,120)||new URL(n).host;return Oa({id:typeof t.id=="string"&&t.id?t.id:r||n,url:n,label:o,...r?{targetPeerId:r}:{},...typeof t.serviceOrigin=="string"?{serviceOrigin:ze(t.serviceOrigin)}:{},...typeof t.entryServiceId=="string"&&t.entryServiceId?{entryServiceId:t.entryServiceId}:{},...Array.isArray(t.routes)?{routes:t.routes.slice(0,Fr).flatMap(s=>{try{return s&&typeof s.targetPeerId=="string"&&s.targetPeerId?[{url:ze(s.url),targetPeerId:s.targetPeerId}]:[]}catch{return[]}})}:{}})}catch{return}}function ln(e,t){return e.targetPeerId&&t.targetPeerId?e.targetPeerId===t.targetPeerId:(e.serviceOrigin||e.url)===(t.serviceOrigin||t.url)}function Jw(e){const t=[];for(const n of e){const r=t.findIndex(o=>ln(o,n));r<0?t.push(Oa(n)):t[r]=Oa({...t[r],...n,id:t[r].id})}return t}function bi(){return typeof window>"u"?void 0:window.termdockDesktop}function Ur(){try{const e=JSON.parse(localStorage.getItem(jc)||"[]");return Array.isArray(e)?Jw(e.map(Hn).filter(t=>!!t)):[]}catch{return[]}}function Zw(e){localStorage.setItem(jc,JSON.stringify(e.map(t=>({...t,serviceName:t.label})))),window.dispatchEvent(new Event(Ld))}let hs;async function gt(){const e=bi();if(!e?.serviceConnections||!e.saveServiceConnection)return Ur();if(hs)return hs;hs=(async()=>{let t=await e.serviceConnections();const n=Ur();for(const r of n)t.some(o=>ln(o,r))||(t=await(e.importServiceConnection||e.saveServiceConnection)(r));return n.length&&localStorage.removeItem(jc),t.map(Hn).filter(r=>!!r)})();try{return await hs}finally{hs=void 0}}async function $n(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Hn(e);if(!t)throw new Error("服务地址无效。");const n=bi();if(n?.saveServiceConnection)return(await n.saveServiceConnection(t)).map(Hn).filter(a=>!!a);const r=Ur(),o=r.find(a=>a.id===t.id||ln(a,t)),s=new Set([...Ma(t),...o?Ma(o):[]]);localStorage.setItem(cf,JSON.stringify(lf().filter(a=>!s.has(a))));const i=Jw([...r.filter(a=>a!==o),Oa({...o,...t,id:o?.id||t.id})]);return Zw(i),i}async function CE(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Hn(e);if(!t)throw new Error("服务地址无效。");const n=bi();if(n?.importServiceConnection)return(await n.importServiceConnection(t)).map(Hn).filter(r=>!!r);if(n?.serviceConnections){const r=await n.serviceConnections();return r.some(o=>ln(o,t))?$n(t):r}return Ma(t).some(r=>lf().includes(r))?Ur():$n(t)}async function TE(e){const t=bi();if(t?.removeServiceConnection)return(await t.removeServiceConnection(e)).map(Hn).filter(s=>!!s);const n=Ur(),r=n.find(s=>s.id===e);r&&localStorage.setItem(cf,JSON.stringify([...new Set([...lf(),...Ma(r)])].slice(-768)));const o=n.filter(s=>s.id!==e);return Zw(o),o}function vi(e){const t=r=>{(r.key===jc||r.key===null)&&e()};window.addEventListener(Ld,e),window.addEventListener("storage",t);const n=bi()?.onServiceConnections?.(e);return()=>{window.removeEventListener(Ld,e),window.removeEventListener("storage",t),n?.()}}function _s(e){if(!e.startsWith("remote:"))return null;const t=e.slice(7).split(":");if(t.length!==2)return null;try{const n=decodeURIComponent(t[0]),r=decodeURIComponent(t[1]);return!r||new URL(n).origin!==n||!/^https?:/.test(n)?null:{origin:n,id:r}}catch{return null}}class AE{constructor(t){this.source=t,this.peers={state:t.peerProtocol==="unsupported"?"unsupported":t.readPeers?"loading":"unavailable",checkedAt:null}}source;local=null;remote=[];peers;localInFlight=null;peerInFlight=null;listeners=new Set;disposed=!1;peerTimer;lastPeerAttempt=-1/0;generation=0;localHealthy=!1;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}snapshot(){if(!this.local)return null;const t=new Map;for(const n of this.local.groups)for(const r of n.remoteSessions??[]){const o=_s(r.sessionId);o&&o.origin!==this.source.origin&&o.origin!==this.source.peerOrigin&&t.set(r.sessionId,{...r,status:"offline",serviceConnected:!1})}for(const n of this.remote)t.set(n.sessionId,n);for(const n of this.local.sessions){const r=_s(n.sessionId);t.set(n.sessionId,r&&r.origin!==this.source.origin&&r.origin!==this.source.peerOrigin?{...n,status:"offline",serviceConnected:!1}:n)}for(const n of this.remote){const r=this.peers.services?.find(o=>o.origin===n.serviceOrigin||o.origin===_s(n.sessionId)?.origin);t.set(n.sessionId,r?.connected===!1?{...n,status:"offline",serviceConnected:!1}:n)}return{groups:this.local.groups.map(n=>({...n,remoteSessions:n.remoteSessions?.map(r=>t.get(r.sessionId)??r)})),sessions:[...t.values()],peers:this.peers,capabilities:this.local.capabilities}}emit(){if(this.disposed||!this.localHealthy)return;const t=this.snapshot();if(t)for(const n of this.listeners)n(t)}load(){if(this.disposed)return Promise.reject(new Error("协作连接已切换,请重新加载"));if(this.localInFlight)return this.localInFlight;this.refreshPeers();const t=this.generation,n=Promise.resolve().then(()=>this.source.readLocal()).then(r=>{if(this.disposed)throw new Error("协作连接已切换,请重新加载");if(t!==this.generation)return this.load();if(!Array.isArray(r.groups)||!Array.isArray(r.sessions))throw new Error("协作会话响应无效,请更新服务后重试");return this.local=r,this.localHealthy=!0,this.emit(),this.snapshot()}).catch(r=>{throw t===this.generation&&(this.localHealthy=!1,this.remote=this.remote.map(o=>({...o,status:"offline",serviceConnected:!1}))),r}).finally(()=>{this.localInFlight===n&&(this.localInFlight=null)});return this.localInFlight=n,n}invalidate(){this.generation++,this.localInFlight=null,this.localHealthy=!1}refreshPeers(t=!1){if(this.disposed||!this.source.readPeers||this.peerInFlight||!t&&Date.now()-this.lastPeerAttempt<2e3)return;this.lastPeerAttempt=Date.now(),this.peers.checkedAt||(this.peers={state:"loading",checkedAt:null}),this.emit();const n=this.source.readPeers;this.peerInFlight=Promise.race([Promise.resolve().then(()=>n()),new Promise((r,o)=>{this.peerTimer=setTimeout(()=>o(new Error("服务端协作目录加载超时,请检查服务连接")),2e4)})]).then(r=>{if(this.disposed)return;const o=r.origin===this.source.origin||!!this.source.peerOrigin&&r.origin===this.source.peerOrigin;if(!Array.isArray(r.sessions)||this.source.peerProtocol==="v2"&&(r.protocolVersion!==2||!o)||r.origin&&!o||r.protocolVersion!==void 0&&r.protocolVersion!==2)throw new Error("协作目录响应与当前服务不匹配,请升级服务后重试");this.remote=r.sessions.filter(i=>{const a=_s(i.sessionId);return a&&a.origin!==this.source.origin&&a.origin!==this.source.peerOrigin});const s=r.services?.filter(i=>i.origin!==this.source.origin&&i.origin!==this.source.peerOrigin);this.peers={state:s?.some(i=>!i.connected)?"partial":"ready",checkedAt:Date.now(),services:s,removedServices:r.removedServices}}).catch(r=>{this.disposed||(this.remote=this.remote.map(o=>({...o,status:"offline",serviceConnected:!1})),this.peers={state:"error",checkedAt:Date.now(),error:r instanceof Error?r.message:"跨服务会话加载失败"})}).finally(()=>{clearTimeout(this.peerTimer),this.peerInFlight=null,this.emit()})}dispose(){this.disposed=!0,clearTimeout(this.peerTimer),this.listeners.clear(),this.local=null,this.remote=[]}}const Ba=e=>`@collaboration:${e}`,Qw=pr(e=>({activePaneId:null,setActivePane:t=>e({activePaneId:t}),docks:{},hosts:{},setDock:(t,n)=>e(r=>{const o={...r.docks};return n?o[t]=n:delete o[t],{docks:o,...!n&&r.activePaneId===Ba(t)?{activePaneId:r.docks[t]?.sessionId??null}:{}}}),setHost:(t,n)=>e(r=>{const o={...r.hosts};return n?o[t]=n:delete o[t],{hosts:o}})})),vr=new Map;let Fa;function eb(){const e=Qw.getState().activePaneId,t=vr.get(Fa??"");if(t?.requiresFocus&&e===Ba(t.paneKey))return t.receive;for(const n of vr.values())if(n.requiresFocus&&e===Ba(n.paneKey))return n.receive;return t&&!t.requiresFocus?t.receive:void 0}function RE(e){const t=vr.get(e);t&&(Fa=e,Qw.getState().setActivePane(t.requiresFocus?Ba(t.paneKey):null))}function PE(e){const t=eb();return!t||!e?!1:(t(e),!0)}function kB(e,t="default",n=!1,r=t){vr.set(t,{receive:e,requiresFocus:n,paneKey:r}),n||RE(t);const o=s=>{const{text:i,nonce:a}=s.detail??{};!i||eb()!==e||(e(i),s.stopImmediatePropagation(),a&&window.dispatchEvent(new CustomEvent("termdock-insert-reference-ack",{detail:{nonce:a,ok:!0}})))};return window.addEventListener("termdock-insert-reference",o,!0),()=>{vr.get(t)?.receive===e&&(vr.delete(t),Fa===t&&(Fa=[...vr.keys()].at(-1))),window.removeEventListener("termdock-insert-reference",o,!0)}}const NE=/^[A-Za-z0-9_@%+=:,./-]$/;function tb(e){return Array.from(e,t=>(t.codePointAt(0)??0)>127||NE.test(t)?t:`\\${t}`).join("")}let _E=0;function LE(e,t){if(!t)return!1;try{const n=new URL(t.serviceOrigin||t.url);return n.origin===e&&/^(localhost|\[::1\]|127(?:\.\d{1,3}){3})$/.test(n.hostname)&&!(t.routes??[]).some(r=>r.targetPeerId!==t.targetPeerId)}catch{return!1}}function jE(e,t=!0){const n=new Set,r=new Set,o=new WeakMap,s=d=>d.target instanceof Element?d.target.closest("[data-termdock-terminal-dropzone]"):null,i=()=>!t||!LE(location.origin,ht()),a=d=>{const u=s(d);!u||!i()||!d.dataTransfer?.types.includes("Files")||(d.preventDefault(),d.stopImmediatePropagation(),d.dataTransfer.dropEffect="copy",u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropState="remote")},c=d=>{const u=s(d),f=Array.from(d.dataTransfer?.files??[]);if(!u||!f.length||!i())return;d.preventDefault(),d.stopImmediatePropagation(),o.get(u)?.abort();const h=new AbortController;o.set(u,h);const p=u.dataset.termdockTerminalDropzone??"",g=ht(),m=u.dataset.termdockTerminalOwner,b=g?.targetPeerId??null,y=String(++_E),k=()=>!h.signal.aborted&&u.isConnected&&u.dataset.termdockTerminalDropzone===p&&u.dataset.nativeFileDropOperation===y&&ht()===g&&ht()?.targetPeerId===b&&u.dataset.termdockTerminalOwner===m,x=()=>k()?!1:(u.dataset.nativeFileDropOperation===y&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation,delete u.dataset.nativeFileDropProgress,delete u.dataset.nativeFileDropCancellable),!0);u.dataset.nativeFileDropOperation=y,u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropState="uploading",u.dataset.nativeFileDropCancellable="true",delete u.dataset.nativeFileDropProgress;const T=S=>{(S?.type==="auth:unauthorized"||S?.type==="pagehide"||!k())&&(h.abort(),x())},_=new MutationObserver(()=>T());_.observe(u,{attributes:!0,attributeFilter:["data-termdock-terminal-dropzone","data-termdock-terminal-owner","data-native-file-drop-operation"]});const A=()=>{h.abort(),x(),v()},E=S=>{if(!(S.target instanceof Element)||S.target.closest("[data-termdock-terminal-dropzone]")!==u||!k())return;A(),u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropOperation=y,u.dataset.nativeFileDropState="cancelled";const I=window.setTimeout(()=>{r.delete(I),u.dataset.nativeFileDropOperation===y&&u.dataset.nativeFileDropState==="cancelled"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)};window.addEventListener("termdock:file-drop-cancel",E);const v=()=>{window.removeEventListener("termdock:file-drop-cancel",E),_.disconnect();for(const S of["termdock:secure-state","auth:unauthorized","pagehide"])window.removeEventListener(S,T);n.delete(A)};n.add(A);for(const S of["termdock:secure-state","auth:unauthorized","pagehide"])window.addEventListener(S,T);tn(async()=>{const{uploadFiles:S}=await Promise.resolve().then(()=>O_);return{uploadFiles:S}},void 0).then(({uploadFiles:S})=>{if(!k())throw new DOMException("Drop target changed","AbortError");return S("/tmp",f,h.signal,I=>{k()&&(u.dataset.nativeFileDropProgress=String(Math.round(I)))},k)}).then(S=>{if(S.files.length!==f.length||S.files.some(R=>!R.path))throw new Error("Upload did not return every file path");if(x())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,e({sessionKey:p,paths:S.files.map(R=>R.path)}),u.dataset.nativeFileDropState="uploaded";const I=window.setTimeout(()=>{r.delete(I),k()&&u.dataset.nativeFileDropState==="uploaded"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)}).catch(S=>{if(x())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,u.dataset.nativeFileDropState="error",u.dispatchEvent(new CustomEvent("termdock:file-drop-error",{bubbles:!0,detail:S instanceof Error?S.message:"File upload failed"}));const I=window.setTimeout(()=>{r.delete(I),k()&&u.dataset.nativeFileDropState==="error"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)}).finally(v)};return window.addEventListener("dragover",a,!0),window.addEventListener("drop",c,!0),()=>{window.removeEventListener("dragover",a,!0),window.removeEventListener("drop",c,!0);for(const d of n)d();for(const d of r)clearTimeout(d);r.clear()}}function ct(){return typeof window>"u"?null:window.termdockDesktop??null}const Il=new Set;let tp=!1;function IB(e){const t=ct();if(Il.add(e),!tp){const n=r=>{if(!PE(r.paths.map(tb).join(" ")+" "))for(const o of Il)o(r)};jE(n,!!t),t?.onNativeFileDrop(n),tp=!0}return()=>{Il.delete(e)}}async function DE(e,t){const n=navigator.serviceWorker?.controller;if(!n)return null;const r=new MessageChannel;return new Promise(o=>{const s=a=>{clearTimeout(i),r.port1.close(),o(a)},i=setTimeout(()=>s(null),5e3);r.port1.onmessage=a=>{try{const c=new URL(a.data.url,location.origin);s(c.origin===location.origin&&/^\/__termdock-download\/[a-f0-9-]{36}$/.test(c.pathname)?c.href:null)}catch{s(null)}},r.port1.onmessageerror=()=>s(null);try{n.postMessage({type:"termdock:prepare-download",blob:e,filename:t},[r.port2])}catch{s(null)}})}const OE=4*1024*1024,ME=256*1024,BE=1440*6e4;let Io=0,np;function df(){return typeof indexedDB>"u"?Promise.resolve(null):np??=new Promise(e=>{const t=indexedDB.open(`termdock-terminal-snapshots:${ko}`,1);t.onupgradeneeded=()=>t.result.createObjectStore("snapshots",{keyPath:"id"}),t.onerror=()=>e(null),t.onblocked=()=>e(null),t.onsuccess=()=>{t.result.onversionchange=()=>{t.result.close(),np=void 0},e(t.result)}})}function jd(e){return!!e&&e.version===1&&typeof e.epoch=="string"&&e.epoch.length>0&&Number.isSafeInteger(e.cols)&&e.cols>0&&Number.isSafeInteger(e.rows)&&e.rows>0&&Number.isSafeInteger(e.seq)&&e.seq>0&&typeof e.data=="string"&&e.data.length*2<=ME&&e.savedAt<=Date.now()&&Date.now()-e.savedAt<BE}async function CB(e){const t=Io;try{const n=await df();return!n||t!==Io?null:await new Promise(r=>{const o=n.transaction("snapshots").objectStore("snapshots").get(e);o.onerror=()=>r(null),o.onsuccess=()=>r(t===Io&&jd(o.result)?o.result:null)})}catch{return null}}async function TB(e){const t=Io;if(jd(e))try{const n=await df();if(!n||t!==Io)return;await new Promise(r=>{const o=n.transaction("snapshots","readwrite"),s=o.objectStore("snapshots");s.put(e);const i=s.getAll();i.onsuccess=()=>{let a=0,c=0;for(const d of i.result.sort((u,f)=>f.savedAt-u.savedAt))a+=d.data.length*2,(++c>32||a>OE||!jd(d))&&s.delete(d.id)},o.oncomplete=()=>r(),o.onerror=o.onabort=()=>r()})}catch{}}async function nb(){Io+=1;try{(await df())?.transaction("snapshots","readwrite").objectStore("snapshots").clear()}catch{}}typeof window<"u"&&window.addEventListener("auth:unauthorized",()=>{nb()});const Dd=8,rb=128,uf=2e4,FE=256*1024,UE=1024*1024,HE=3e4;function ob(e){if(e.label)return e.label;if(e.url)try{return new URL(e.url).host}catch{}return`中转服务 ${e.serviceId.slice(-8)}`}function xr(e){return e.error==="TARGET_PASSWORD_REQUIRED"?"目标服务未配置有效访问密码,已禁用中转。请让目标管理员先配置访问密码":e.error==="TARGET_SECURITY_UPGRADE_REQUIRED"?"无法核验密码保护,已禁用中转。请更新目标服务和中继程序":e.error==="TARGET_IDENTITY_MISMATCH"?"服务身份与登记地址不一致,请修正登记":e.error==="TARGET_CHECKING"?"正在验证目标服务身份":e.error==="TARGET_UNREACHABLE"?"目标连接失败,请检查地址、网络与证书":"中转暂不可用"}const $E=1024*1024;function zE(e){return(e==="/api/terminal/fs/upload"||/^\/api\/terminal\/[^/]+\/chat\/attachments$/.test(e)?110:5)*$E}class qE extends Error{static name="UnexpectedPeerError";constructor(t="Unexpected Peer"){super(t),this.name="UnexpectedPeerError"}}let KE=class extends Error{static name="InvalidCryptoExchangeError";constructor(t="Invalid crypto exchange"){super(t),this.name="InvalidCryptoExchangeError"}},fn=class extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}};class sb extends Error{static name="InvalidPublicKeyError";constructor(t="Invalid public key"){super(t),this.name="InvalidPublicKeyError"}}class ib extends Error{static name="InvalidPrivateKeyError";constructor(t="Invalid private key"){super(t),this.name="InvalidPrivateKeyError"}}class GE extends Error{static name="InvalidCIDError";constructor(t="Invalid CID"){super(t),this.name="InvalidCIDError"}}class WE extends Error{static name="InvalidMultihashError";constructor(t="Invalid Multihash"){super(t),this.name="InvalidMultihashError"}}class Dc extends Error{static name="UnsupportedKeyTypeError";constructor(t="Unsupported key type"){super(t),this.name="UnsupportedKeyTypeError"}}const ab=Symbol.for("@libp2p/peer-id");function VE(e){return typeof e?.handleEvent=="function"}function YE(e){return e===!0||e===!1}function XE(e){return YE(e)?e:e?.capture??!1}function Od(e){const t={capture:XE(e),once:!!e?.once};return e?.passive!=null&&(t.passive=e?.passive),e?.signal!=null&&(t.signal=e?.signal),t}function rp(e,t){return Od(e).capture===Od(t).capture}class JE extends EventTarget{#e=new Map;constructor(){super()}listenerCount(t){const n=this.#e.get(t);return n==null?0:n.length}addEventListener(t,n,r){const o=Od(r);if(o?.signal?.aborted===!0)return;const s=d=>{o.once&&this.removeEventListener(t,n,o),VE(n)?n.handleEvent(d):n(d)};let i=this.#e.get(t);if(i==null&&(i=[],this.#e.set(t,i)),i.some(d=>d.callback!==n?!1:rp(d.options,o)))return;super.addEventListener(t,s,o);const c=()=>{this.removeEventListener(t,n,o)};o.signal?.addEventListener("abort",c),i.push({callback:n,wrapper:s,options:o,onAbort:c})}removeEventListener(t,n,r){const o=this.#e.get(t);if(o==null){super.removeEventListener(t,n??null,r);return}this.#e.set(t,o.filter(s=>s.callback===n&&rp(s.options,r)?(super.removeEventListener(t,s.wrapper,r),s.options?.signal?.removeEventListener("abort",s.onAbort),!1):!0))}safeDispatchEvent(t,n={}){return this.dispatchEvent(new CustomEvent(t,n))}}const ZE=Symbol.for("@libp2p/service-capabilities");function QE(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}function Oc(e){if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function e1(e){return new TextEncoder().encode(e)}function t1(e){return new TextDecoder().decode(e)}function n1(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<e.length;o++){var s=e.charAt(o),i=s.charCodeAt(0);if(n[i]!==255)throw new TypeError(s+" is ambiguous");n[i]=o}var a=e.length,c=e.charAt(0),d=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var m=0,b=0,y=0,k=g.length;y!==k&&g[y]===0;)y++,m++;for(var x=(k-y)*u+1>>>0,T=new Uint8Array(x);y!==k;){for(var _=g[y],A=0,E=x-1;(_!==0||A<b)&&E!==-1;E--,A++)_+=256*T[E]>>>0,T[E]=_%a>>>0,_=_/a>>>0;if(_!==0)throw new Error("Non-zero carry");b=A,y++}for(var v=x-b;v!==x&&T[v]===0;)v++;for(var S=c.repeat(m);v<x;++v)S+=e.charAt(T[v]);return S}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var m=0;if(g[m]!==" "){for(var b=0,y=0;g[m]===c;)b++,m++;for(var k=(g.length-m)*d+1>>>0,x=new Uint8Array(k);g[m];){var T=n[g.charCodeAt(m)];if(T===255)return;for(var _=0,A=k-1;(T!==0||_<y)&&A!==-1;A--,_++)T+=a*x[A]>>>0,x[A]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");y=_,m++}if(g[m]!==" "){for(var E=k-y;E!==k&&x[E]===0;)E++;for(var v=new Uint8Array(b+(k-E)),S=b;E!==k;)v[S++]=x[E++];return v}}}function p(g){var m=h(g);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:p}}var r1=n1,o1=r1;class s1{name;prefix;baseEncode;constructor(t,n,r){this.name=t,this.prefix=n,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class i1{name;prefix;baseDecode;prefixCodePoint;constructor(t,n,r){this.name=t,this.prefix=n;const o=n.codePointAt(0);if(o===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=o,this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return cb(this,t)}}class a1{decoders;constructor(t){this.decoders=t}or(t){return cb(this,t)}decode(t){const n=t[0],r=this.decoders[n];if(r!=null)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function cb(e,t){return new a1({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class c1{name;prefix;baseEncode;baseDecode;encoder;decoder;constructor(t,n,r,o){this.name=t,this.prefix=n,this.baseEncode=r,this.baseDecode=o,this.encoder=new s1(t,n,r),this.decoder=new i1(t,n,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function Mc({name:e,prefix:t,encode:n,decode:r}){return new c1(e,t,n,r)}function xi({name:e,prefix:t,alphabet:n}){const{encode:r,decode:o}=o1(n,e);return Mc({prefix:t,name:e,encode:r,decode:s=>Oc(o(s))})}function l1(e,t,n,r){let o=e.length;for(;e[o-1]==="=";)--o;const s=new Uint8Array(o*n/8|0);let i=0,a=0,c=0;for(let d=0;d<o;++d){const u=t[e[d]];if(u===void 0)throw new SyntaxError(`Non-${r} character`);a=a<<n|u,i+=n,i>=8&&(i-=8,s[c++]=255&a>>i)}if(i>=n||(255&a<<8-i)!==0)throw new SyntaxError("Unexpected end of data");return s}function d1(e,t,n){const r=t[t.length-1]==="=",o=(1<<n)-1;let s="",i=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],i+=8;i>n;)i-=n,s+=t[o&a>>i];if(i!==0&&(s+=t[o&a<<n-i]),r)for(;(s.length*n&7)!==0;)s+="=";return s}function u1(e){const t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function It({name:e,prefix:t,bitsPerChar:n,alphabet:r}){const o=u1(r);return Mc({prefix:t,name:e,encode(s){return d1(s,r,n)},decode(s){return l1(s,o,n,e)}})}const Dt=xi({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),f1=xi({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),h1=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Dt,base58flickr:f1},Symbol.toStringTag,{value:"Module"})),qs=It({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),p1=It({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),m1=It({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),g1=It({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),y1=It({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),w1=It({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),b1=It({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),v1=It({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),x1=It({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),S1=Object.freeze(Object.defineProperty({__proto__:null,base32:qs,base32hex:y1,base32hexpad:b1,base32hexpadupper:v1,base32hexupper:w1,base32pad:m1,base32padupper:g1,base32upper:p1,base32z:x1},Symbol.toStringTag,{value:"Module"})),ba=xi({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),E1=xi({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),k1=Object.freeze(Object.defineProperty({__proto__:null,base36:ba,base36upper:E1},Symbol.toStringTag,{value:"Module"}));var I1=lb,op=128,C1=-128,T1=Math.pow(2,31);function lb(e,t,n){t=t||[],n=n||0;for(var r=n;e>=T1;)t[n++]=e&255|op,e/=128;for(;e&C1;)t[n++]=e&255|op,e>>>=7;return t[n]=e|0,lb.bytes=n-r+1,t}var A1=Md,R1=128,sp=127;function Md(e,r){var n=0,r=r||0,o=0,s=r,i,a=e.length;do{if(s>=a)throw Md.bytes=0,new RangeError("Could not decode varint");i=e[s++],n+=o<28?(i&sp)<<o:(i&sp)*Math.pow(2,o),o+=7}while(i>=R1);return Md.bytes=s-r,n}var P1=Math.pow(2,7),N1=Math.pow(2,14),_1=Math.pow(2,21),L1=Math.pow(2,28),j1=Math.pow(2,35),D1=Math.pow(2,42),O1=Math.pow(2,49),M1=Math.pow(2,56),B1=Math.pow(2,63),F1=function(e){return e<P1?1:e<N1?2:e<_1?3:e<L1?4:e<j1?5:e<D1?6:e<O1?7:e<M1?8:e<B1?9:10},U1={encode:I1,decode:A1,encodingLength:F1},Ua=U1;function Bd(e,t=0){return[Ua.decode(e,t),Ua.decode.bytes]}function Ha(e,t,n=0){return Ua.encode(e,t,n),t}function $a(e){return Ua.encodingLength(e)}function Si(e,t){const n=t.byteLength,r=$a(e),o=r+$a(n),s=new Uint8Array(o+n);return Ha(e,s,0),Ha(n,s,r),s.set(t,o),new ff(e,n,t,s)}function db(e){const t=Oc(e),[n,r]=Bd(t),[o,s]=Bd(t.subarray(r)),i=t.subarray(r+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new ff(n,o,i,t)}function H1(e,t){if(e===t)return!0;{const n=t;return e.code===n.code&&e.size===n.size&&n.bytes instanceof Uint8Array&&QE(e.bytes,n.bytes)}}class ff{code;size;digest;bytes;constructor(t,n,r,o){this.code=t,this.size=n,this.digest=r,this.bytes=o}}function ip(e,t){const{bytes:n,version:r}=e;return r===0?z1(n,Fd(e),t??Dt.encoder):q1(n,Fd(e),t??qs.encoder)}const ap=new WeakMap;function Fd(e){const t=ap.get(e);if(t==null){const n=new Map;return ap.set(e,n),n}return t}class tt{code;version;multihash;bytes;"/";constructor(t,n,r,o){this.code=n,this.version=t,this.multihash=r,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:t,multihash:n}=this;if(t!==ps)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==K1)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return tt.createV0(n)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:t,digest:n}=this.multihash,r=Si(t,n);return tt.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return tt.equals(this,t)}static equals(t,n){const r=n;return r!=null&&t.code===r.code&&t.version===r.version&&H1(t.multihash,r.multihash)}toString(t){return ip(this,t)}toJSON(){return{"/":ip(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;const n=t;if(n instanceof tt)return n;if(n["/"]!=null&&n["/"]===n.bytes||n.asCID===n){const{version:r,code:o,multihash:s,bytes:i}=n;return new tt(r,o,s,i??cp(r,o,s.bytes))}else if(n[G1]===!0){const{version:r,multihash:o,code:s}=n,i=db(o);return tt.create(r,s,i)}else return null}static create(t,n,r){if(typeof n!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(n!==ps)throw new Error(`Version 0 CID must use dag-pb (code: ${ps}) block encoding`);return new tt(t,n,r,r.bytes)}case 1:{const o=cp(t,n,r.bytes);return new tt(t,n,r,o)}default:throw new Error("Invalid version")}}static createV0(t){return tt.create(0,ps,t)}static createV1(t,n){return tt.create(1,t,n)}static decode(t){const[n,r]=tt.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return n}static decodeFirst(t){const n=tt.inspectBytes(t),r=n.size-n.multihashSize,o=Oc(t.subarray(r,r+n.multihashSize));if(o.byteLength!==n.multihashSize)throw new Error("Incorrect length");const s=o.subarray(n.multihashSize-n.digestSize),i=new ff(n.multihashCode,n.digestSize,s,o);return[n.version===0?tt.createV0(i):tt.createV1(n.codec,i),t.subarray(n.size)]}static inspectBytes(t){let n=0;const r=()=>{const[f,h]=Bd(t.subarray(n));return n+=h,f};let o=r(),s=ps;if(o===18?(o=0,n=0):s=r(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const i=n,a=r(),c=r(),d=n+c,u=d-i;return{version:o,codec:s,multihashCode:a,digestSize:c,multihashSize:u,size:d}}static parse(t,n){const[r,o]=$1(t,n),s=tt.decode(o);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Fd(s).set(r,t),s}}function $1(e,t){switch(e[0]){case"Q":{const n=t??Dt;return[Dt.prefix,n.decode(`${Dt.prefix}${e}`)]}case Dt.prefix:{const n=t??Dt;return[Dt.prefix,n.decode(e)]}case qs.prefix:{const n=t??qs;return[qs.prefix,n.decode(e)]}case ba.prefix:{const n=t??ba;return[ba.prefix,n.decode(e)]}default:{if(t==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}}}function z1(e,t,n){const{prefix:r}=n;if(r!==Dt.prefix)throw Error(`Cannot string encode V0 in ${n.name} encoding`);const o=t.get(r);if(o==null){const s=n.encode(e).slice(1);return t.set(r,s),s}else return o}function q1(e,t,n){const{prefix:r}=n,o=t.get(r);if(o==null){const s=n.encode(e);return t.set(r,s),s}else return o}const ps=112,K1=18;function cp(e,t,n){const r=$a(e),o=r+$a(t),s=new Uint8Array(o+n.byteLength);return Ha(e,s,0),Ha(t,s,r),s.set(n,o),s}const G1=Symbol.for("@ipld/js-cid/CID"),ub=0,W1="identity",fb=Oc;function V1(e,t){if(t?.truncate!=null&&t.truncate!==e.byteLength){if(t.truncate<0||t.truncate>e.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${e.byteLength}`);e=e.subarray(0,t.truncate)}return Si(ub,fb(e))}const Ei={code:ub,name:W1,encode:fb,digest:V1};function hn(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}function Ht(e=0){return new Uint8Array(e)}function zn(e=0){return new Uint8Array(e)}function Ud(e,t){t==null&&(t=e.reduce((o,s)=>o+s.length,0));const n=zn(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}const hb=Symbol.for("@achingbrain/uint8arraylist");function lp(e,t){if(t==null||t<0)throw new RangeError("index is out of bounds");let n=0;for(const r of e){const o=n+r.byteLength;if(t<o)return{buf:r,index:t-n};n=o}throw new RangeError("index is out of bounds")}function Gi(e){return!!e?.[hb]}class qe{bufs;length;[hb]=!0;constructor(...t){this.bufs=[],this.length=0,t.length>0&&this.appendAll(t)}*[Symbol.iterator](){yield*this.bufs}get byteLength(){return this.length}append(...t){this.appendAll(t)}appendAll(t){let n=0;for(const r of t)if(r instanceof Uint8Array)n+=r.byteLength,this.bufs.push(r);else if(Gi(r)){n+=r.byteLength;for(const o of r.bufs)this.bufs.push(o)}else throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");this.length+=n}prepend(...t){this.prependAll(t)}prependAll(t){let n=0;for(const r of t.reverse())if(r instanceof Uint8Array)n+=r.byteLength,this.bufs.unshift(r);else if(Gi(r))n+=r.byteLength,this.bufs.unshift(...r.bufs);else throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");this.length+=n}get(t){const n=lp(this.bufs,t);return n.buf[n.index]}set(t,n){const r=lp(this.bufs,t);r.buf[r.index]=n}write(t,n=0){if(t instanceof Uint8Array)for(let r=0;r<t.length;r++)this.set(n+r,t[r]);else if(Gi(t))for(let r=0;r<t.length;r++)this.set(n+r,t.get(r));else throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList")}consume(t){if(t=Math.trunc(t),!(Number.isNaN(t)||t<=0)){if(t===this.byteLength){this.bufs=[],this.length=0;return}for(;this.bufs.length>0;)if(t>=this.bufs[0].byteLength)t-=this.bufs[0].byteLength,this.length-=this.bufs[0].byteLength,this.bufs.shift();else{this.bufs[0]=this.bufs[0].subarray(t),this.length-=t;break}}}slice(t,n){const{bufs:r,length:o}=this._subList(t,n);return Ud(r,o)}subarray(t,n){const{bufs:r,length:o}=this._subList(t,n);return r.length===1?r[0]:Ud(r,o)}sublist(t,n){const{bufs:r,length:o}=this._subList(t,n),s=new qe;return s.length=o,s.bufs=r,s}_subList(t,n){if(t=t??0,n=n??this.length,t<0&&(t=this.length+t),n<0&&(n=this.length+n),t<0||n>this.length)throw new RangeError("index is out of bounds");if(t===n)return{bufs:[],length:0};if(t===0&&n===this.length)return{bufs:[...this.bufs],length:this.length};const r=[];let o=0;for(let s=0;s<this.bufs.length;s++){const i=this.bufs[s],a=o,c=a+i.byteLength;if(o=c,t>=c)continue;const d=t>=a&&t<c,u=n>a&&n<=c;if(d&&u){if(t===a&&n===c){r.push(i);break}const f=t-a;r.push(i.subarray(f,f+(n-t)));break}if(d){if(t===0){r.push(i);continue}r.push(i.subarray(t-a));continue}if(u){if(n===c){r.push(i);break}r.push(i.subarray(0,n-a));break}r.push(i)}return{bufs:r,length:n-t}}indexOf(t,n=0){if(!Gi(t)&&!(t instanceof Uint8Array))throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array');const r=t instanceof Uint8Array?t:t.subarray();if(n=Number(n??0),isNaN(n)&&(n=0),n<0&&(n=this.length+n),n<0&&(n=0),t.length===0)return n>this.length?this.length:n;const o=r.byteLength;if(o===0)throw new TypeError("search must be at least 1 byte long");const s=256,i=new Int32Array(s);for(let f=0;f<s;f++)i[f]=-1;for(let f=0;f<o;f++)i[r[f]]=f;const a=i,c=this.byteLength-r.byteLength,d=r.byteLength-1;let u;for(let f=n;f<=c;f+=u){u=0;for(let h=d;h>=0;h--){const p=this.get(f+h);if(r[h]!==p){u=Math.max(1,h-a[p]);break}}if(u===0)return f}return-1}getInt8(t){const n=this.subarray(t,t+1);return new DataView(n.buffer,n.byteOffset,n.byteLength).getInt8(0)}setInt8(t,n){const r=zn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setInt8(0,n),this.write(r,t)}getInt16(t,n){const r=this.subarray(t,t+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt16(0,n)}setInt16(t,n,r){const o=Ht(2);new DataView(o.buffer,o.byteOffset,o.byteLength).setInt16(0,n,r),this.write(o,t)}getInt32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt32(0,n)}setInt32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setInt32(0,n,r),this.write(o,t)}getBigInt64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigInt64(0,n)}setBigInt64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setBigInt64(0,n,r),this.write(o,t)}getUint8(t){const n=this.subarray(t,t+1);return new DataView(n.buffer,n.byteOffset,n.byteLength).getUint8(0)}setUint8(t,n){const r=zn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setUint8(0,n),this.write(r,t)}getUint16(t,n){const r=this.subarray(t,t+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint16(0,n)}setUint16(t,n,r){const o=Ht(2);new DataView(o.buffer,o.byteOffset,o.byteLength).setUint16(0,n,r),this.write(o,t)}getUint32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint32(0,n)}setUint32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setUint32(0,n,r),this.write(o,t)}getBigUint64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigUint64(0,n)}setBigUint64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setBigUint64(0,n,r),this.write(o,t)}getFloat32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,n)}setFloat32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setFloat32(0,n,r),this.write(o,t)}getFloat64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,n)}setFloat64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setFloat64(0,n,r),this.write(o,t)}equals(t){if(t==null||!(t instanceof qe)||t.bufs.length!==this.bufs.length)return!1;for(let n=0;n<this.bufs.length;n++)if(!hn(this.bufs[n],t.bufs[n]))return!1;return!0}static fromUint8Arrays(t,n){const r=new qe;return r.bufs=t,n==null&&(n=t.reduce((o,s)=>o+s.byteLength,0)),r.length=n,r}}const Y1=xi({prefix:"9",name:"base10",alphabet:"0123456789"}),X1=Object.freeze(Object.defineProperty({__proto__:null,base10:Y1},Symbol.toStringTag,{value:"Module"})),J1=It({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Z1=It({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Q1=Object.freeze(Object.defineProperty({__proto__:null,base16:J1,base16upper:Z1},Symbol.toStringTag,{value:"Module"})),ek=It({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),tk=Object.freeze(Object.defineProperty({__proto__:null,base2:ek},Symbol.toStringTag,{value:"Module"})),pb=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),nk=pb.reduce((e,t,n)=>(e[n]=t,e),[]),rk=pb.reduce((e,t,n)=>{const r=t.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${t}`);return e[r]=n,e},[]);function ok(e){return e.reduce((t,n)=>(t+=nk[n],t),"")}function sk(e){const t=[];for(const n of e){const r=n.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${n}`);const o=rk[r];if(o==null)throw new Error(`Non-base256emoji character: ${n}`);t.push(o)}return new Uint8Array(t)}const ik=Mc({prefix:"🚀",name:"base256emoji",encode:ok,decode:sk}),ak=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ik},Symbol.toStringTag,{value:"Module"})),ck=It({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),lk=It({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),dk=It({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),uk=It({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),fk=Object.freeze(Object.defineProperty({__proto__:null,base64:ck,base64pad:lk,base64url:dk,base64urlpad:uk},Symbol.toStringTag,{value:"Module"})),hk=It({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),pk=Object.freeze(Object.defineProperty({__proto__:null,base8:hk},Symbol.toStringTag,{value:"Module"})),mk=Mc({prefix:"\0",name:"identity",encode:e=>t1(e),decode:e=>e1(e)}),gk=Object.freeze(Object.defineProperty({__proto__:null,identity:mk},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const yk=20;function wk({name:e,code:t,encode:n,minDigestLength:r,maxDigestLength:o}){return new bk(e,t,n,r,o)}class bk{name;code;encode;minDigestLength;maxDigestLength;constructor(t,n,r,o,s){this.name=t,this.code=n,this.encode=r,this.minDigestLength=o??yk,this.maxDigestLength=s}digest(t,n){if(n?.truncate!=null){if(n.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&n.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?dp(r,this.code,n?.truncate):r.then(o=>dp(o,this.code,n?.truncate))}else throw Error("Unknown type, must be binary type")}}function dp(e,t,n){if(n!=null&&n!==e.byteLength){if(n>e.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${e.byteLength}`);e=e.subarray(0,n)}return Si(t,e)}function vk(e){return async t=>new Uint8Array(await crypto.subtle.digest(e,t))}const hf=wk({name:"sha2-256",code:18,encode:vk("SHA-256")}),up={...gk,...tk,...pk,...X1,...Q1,...S1,...k1,...h1,...fk,...ak};function mb(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const fp=mb("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Cl=mb("ascii","a",e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},e=>{e=e.substring(1);const t=zn(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),gb={utf8:fp,"utf-8":fp,hex:up.base16,latin1:Cl,ascii:Cl,binary:Cl,...up};function ut(e,t="utf8"){const n=gb[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.decoder.decode(`${n.prefix}${e}`)}function Le(e,t="utf8"){const n=gb[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.encoder.encode(e).substring(1)}const xk=parseInt("11111",2),Hd=parseInt("10000000",2),Sk=parseInt("01111111",2),hp={0:ms,1:ms,2:Ek,3:Ck,4:Tk,5:Ik,6:kk,16:ms,22:ms,48:ms};function Qo(e,t={offset:0}){const n=e[t.offset]&xk;if(t.offset++,hp[n]!=null)return hp[n](e,t);throw new Error("No decoder for tag "+n)}function ki(e,t){let n=0;if((e[t.offset]&Hd)===Hd){const r=e[t.offset]&Sk;let o="0x";t.offset++;for(let s=0;s<r;s++,t.offset++)o+=e[t.offset].toString(16).padStart(2,"0");n=parseInt(o,16)}else n=e[t.offset],t.offset++;return n}function ms(e,t){ki(e,t);const n=[];for(;!(t.offset>=e.byteLength);){const r=Qo(e,t);if(r===null)break;n.push(r)}return n}function Ek(e,t){const n=ki(e,t),r=t.offset,o=t.offset+n,s=[];for(let i=r;i<o;i++)i===r&&e[i]===0||s.push(e[i]);return t.offset+=n,Uint8Array.from(s)}function kk(e,t){const n=ki(e,t),r=t.offset+n,o=e[t.offset];t.offset++;let s=0,i=0;o<40?(s=0,i=o):o<80?(s=1,i=o-40):(s=2,i=o-80);let a=`${s}.${i}`,c=[];for(;t.offset<r;){const d=e[t.offset];if(t.offset++,c.push(d&127),d<128){c.reverse();let u=0;for(let f=0;f<c.length;f++)u+=c[f]<<f*7;a+=`.${u}`,c=[]}}return a}function Ik(e,t){return t.offset++,null}function Ck(e,t){const n=ki(e,t),r=e[t.offset];t.offset++;const o=e.subarray(t.offset,t.offset+n-1);if(t.offset+=n,r!==0)throw new Error("Unused bits in bit string is unimplemented");return o}function Tk(e,t){const n=ki(e,t),r=e.subarray(t.offset,t.offset+n);return t.offset+=n,r}function Ak(e){let t=e.toString(16);t.length%2===1&&(t="0"+t);const n=new qe;for(let r=0;r<t.length;r+=2)n.append(Uint8Array.from([parseInt(`${t[r]}${t[r+1]}`,16)]));return n}function Bc(e){if(e.byteLength<128)return Uint8Array.from([e.byteLength]);const t=Ak(e.byteLength);return new qe(Uint8Array.from([t.byteLength|Hd]),t)}function Xt(e){const t=new qe,n=128;return(e.subarray()[0]&n)===n&&t.append(Uint8Array.from([0])),t.append(e),new qe(Uint8Array.from([2]),Bc(t),t)}function pf(e){const t=Uint8Array.from([0]),n=new qe(t,e);return new qe(Uint8Array.from([3]),Bc(n),n)}function Rk(e){return new qe(Uint8Array.from([4]),Bc(e),e)}function Bn(e,t=48){const n=new qe;for(const r of e)n.append(r);return new qe(Uint8Array.from([t]),Bc(n),n)}async function Pk(e,t,n){const r=await crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:e.crv??"P-256"},!1,["sign"]);n?.signal?.throwIfAborted();const o=await crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},r,t.subarray());return n?.signal?.throwIfAborted(),new Uint8Array(o,0,o.byteLength)}async function Nk(e,t,n,r){const o=await crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:e.crv??"P-256"},!1,["verify"]);r?.signal?.throwIfAborted();const s=await crypto.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},o,t,n.subarray());return r?.signal?.throwIfAborted(),s}const _k=Uint8Array.from([6,8,42,134,72,206,61,3,1,7]),Lk=Uint8Array.from([6,5,43,129,4,0,34]),jk=Uint8Array.from([6,5,43,129,4,0,35]),yb={ext:!0,kty:"EC",crv:"P-256"},wb={ext:!0,kty:"EC",crv:"P-384"},bb={ext:!0,kty:"EC",crv:"P-521"},Co=32,To=48,Ao=66;function Dk(e){const t=Qo(e);return Ok(t)}function Ok(e){const t=e[1],n=Le(t,"base64url"),r=e[2][1][0],o=1;let s,i;if(t.byteLength===Co)return s=Le(r.subarray(o,o+Co),"base64url"),i=Le(r.subarray(o+Co),"base64url"),new Tl({...yb,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===To)return s=Le(r.subarray(o,o+To),"base64url"),i=Le(r.subarray(o+To),"base64url"),new Tl({...wb,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===Ao)return s=Le(r.subarray(o,o+Ao),"base64url"),i=Le(r.subarray(o+Ao),"base64url"),new Tl({...bb,key_ops:["sign"],d:n,x:s,y:i});throw new fn(`Private key length was wrong length, got ${t.byteLength}, expected 32, 48 or 66`)}function vb(e){const t=Qo(e);return Mk(t)}function Mk(e){const t=e[1][1][0],n=1;let r,o;if(t.byteLength===Co*2+1)return r=Le(t.subarray(n,n+Co),"base64url"),o=Le(t.subarray(n+Co),"base64url"),new va({...yb,key_ops:["verify"],x:r,y:o});if(t.byteLength===To*2+1)return r=Le(t.subarray(n,n+To),"base64url"),o=Le(t.subarray(n+To),"base64url"),new va({...wb,key_ops:["verify"],x:r,y:o});if(t.byteLength===Ao*2+1)return r=Le(t.subarray(n,n+Ao),"base64url"),o=Le(t.subarray(n+Ao),"base64url"),new va({...bb,key_ops:["verify"],x:r,y:o});throw new fn(`coordinates were wrong length, got ${t.byteLength}, expected 65, 97 or 133`)}function Bk(e){return Bn([Xt(Uint8Array.from([1])),Rk(ut(e.d??"","base64url")),Bn([xb(e.crv)],160),Bn([pf(new qe(Uint8Array.from([4]),ut(e.x??"","base64url"),ut(e.y??"","base64url")))],161)]).subarray()}function Fk(e){return Bn([Xt(Uint8Array.from([1])),Bn([xb(e.crv)],160),Bn([pf(new qe(Uint8Array.from([4]),ut(e.x??"","base64url"),ut(e.y??"","base64url")))],161)]).subarray()}function xb(e){if(e==="P-256")return _k;if(e==="P-384")return Lk;if(e==="P-521")return jk;throw new fn(`Invalid curve ${e}`)}class va{type="ECDSA";jwk;_raw;constructor(t){this.jwk=t}get raw(){return this._raw==null&&(this._raw=Fk(this.jwk)),this._raw}toMultihash(){return Ei.digest(qc(this))}toCID(){return tt.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}async verify(t,n,r){return Nk(this.jwk,n,t,r)}}class Tl{type="ECDSA";jwk;publicKey;_raw;constructor(t){this.jwk=t,this.publicKey=new va({crv:t.crv,ext:t.ext,key_ops:["verify"],kty:"EC",x:t.x,y:t.y})}get raw(){return this._raw==null&&(this._raw=Bk(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}async sign(t,n){return Pk(this.jwk,t,n)}}const co=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ii(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function $d(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Vr(e,...t){if(!Ii(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Sb(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");$d(e.outputLen),$d(e.blockLen)}function za(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Uk(e,t){Vr(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function $o(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Al(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function yn(e,t){return e<<32-t|e>>>t}const Eb=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Hk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Pr(e){if(Vr(e),Eb)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Hk[e[n]];return t}const In={_0:48,_9:57,A:65,F:70,a:97,f:102};function pp(e){if(e>=In._0&&e<=In._9)return e-In._0;if(e>=In.A&&e<=In.F)return e-(In.A-10);if(e>=In.a&&e<=In.f)return e-(In.a-10)}function qa(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Eb)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=pp(e.charCodeAt(s)),a=pp(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function $k(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function mf(e){return typeof e=="string"&&(e=$k(e)),Vr(e),e}function vn(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Vr(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}class kb{}function Ib(e){const t=r=>e().update(mf(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function gf(e=32){if(co&&typeof co.getRandomValues=="function")return co.getRandomValues(new Uint8Array(e));if(co&&typeof co.randomBytes=="function")return Uint8Array.from(co.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function zk(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,d=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+d,a,r)}function qk(e,t,n){return e&t^~e&n}function Kk(e,t,n){return e&t^e&n^t&n}let Cb=class extends kb{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Al(this.buffer)}update(t){za(this),t=mf(t),Vr(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=Al(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){za(this),Uk(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,$o(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;zk(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=Al(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,u=this.get();if(d>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<d;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const Jn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),At=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Wi=BigInt(2**32-1),mp=BigInt(32);function Gk(e,t=!1){return t?{h:Number(e&Wi),l:Number(e>>mp&Wi)}:{h:Number(e>>mp&Wi)|0,l:Number(e&Wi)|0}}function Wk(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=Gk(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const gp=(e,t,n)=>e>>>n,yp=(e,t,n)=>e<<32-n|t>>>n,lo=(e,t,n)=>e>>>n|t<<32-n,uo=(e,t,n)=>e<<32-n|t>>>n,Vi=(e,t,n)=>e<<64-n|t>>>n-32,Yi=(e,t,n)=>e>>>n-32|t<<64-n;function Cn(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const Vk=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Yk=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Xk=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Jk=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,Zk=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),Qk=(e,t,n,r,o,s)=>t+n+r+o+s+(e/2**32|0)|0,eI=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zn=new Uint32Array(64);class tI extends Cb{constructor(t=32){super(64,t,8,!1),this.A=Jn[0]|0,this.B=Jn[1]|0,this.C=Jn[2]|0,this.D=Jn[3]|0,this.E=Jn[4]|0,this.F=Jn[5]|0,this.G=Jn[6]|0,this.H=Jn[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)Zn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=Zn[f-15],p=Zn[f-2],g=yn(h,7)^yn(h,18)^h>>>3,m=yn(p,17)^yn(p,19)^p>>>10;Zn[f]=m+Zn[f-7]+g+Zn[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:d,H:u}=this;for(let f=0;f<64;f++){const h=yn(a,6)^yn(a,11)^yn(a,25),p=u+h+qk(a,c,d)+eI[f]+Zn[f]|0,m=(yn(r,2)^yn(r,13)^yn(r,22))+Kk(r,o,s)|0;u=d,d=c,c=a,a=i+p|0,i=s,s=o,o=r,r=p+m|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,d,u)}roundClean(){$o(Zn)}destroy(){this.set(0,0,0,0,0,0,0,0),$o(this.buffer)}}const Tb=Wk(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),nI=Tb[0],rI=Tb[1],Qn=new Uint32Array(80),er=new Uint32Array(80);class oI extends Cb{constructor(t=64){super(128,t,16,!1),this.Ah=At[0]|0,this.Al=At[1]|0,this.Bh=At[2]|0,this.Bl=At[3]|0,this.Ch=At[4]|0,this.Cl=At[5]|0,this.Dh=At[6]|0,this.Dl=At[7]|0,this.Eh=At[8]|0,this.El=At[9]|0,this.Fh=At[10]|0,this.Fl=At[11]|0,this.Gh=At[12]|0,this.Gl=At[13]|0,this.Hh=At[14]|0,this.Hl=At[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:s,Cl:i,Dh:a,Dl:c,Eh:d,El:u,Fh:f,Fl:h,Gh:p,Gl:g,Hh:m,Hl:b}=this;return[t,n,r,o,s,i,a,c,d,u,f,h,p,g,m,b]}set(t,n,r,o,s,i,a,c,d,u,f,h,p,g,m,b){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=s|0,this.Cl=i|0,this.Dh=a|0,this.Dl=c|0,this.Eh=d|0,this.El=u|0,this.Fh=f|0,this.Fl=h|0,this.Gh=p|0,this.Gl=g|0,this.Hh=m|0,this.Hl=b|0}process(t,n){for(let x=0;x<16;x++,n+=4)Qn[x]=t.getUint32(n),er[x]=t.getUint32(n+=4);for(let x=16;x<80;x++){const T=Qn[x-15]|0,_=er[x-15]|0,A=lo(T,_,1)^lo(T,_,8)^gp(T,_,7),E=uo(T,_,1)^uo(T,_,8)^yp(T,_,7),v=Qn[x-2]|0,S=er[x-2]|0,I=lo(v,S,19)^Vi(v,S,61)^gp(v,S,6),R=uo(v,S,19)^Yi(v,S,61)^yp(v,S,6),C=Xk(E,R,er[x-7],er[x-16]),N=Jk(C,A,I,Qn[x-7],Qn[x-16]);Qn[x]=N|0,er[x]=C|0}let{Ah:r,Al:o,Bh:s,Bl:i,Ch:a,Cl:c,Dh:d,Dl:u,Eh:f,El:h,Fh:p,Fl:g,Gh:m,Gl:b,Hh:y,Hl:k}=this;for(let x=0;x<80;x++){const T=lo(f,h,14)^lo(f,h,18)^Vi(f,h,41),_=uo(f,h,14)^uo(f,h,18)^Yi(f,h,41),A=f&p^~f&m,E=h&g^~h&b,v=Zk(k,_,E,rI[x],er[x]),S=Qk(v,y,T,A,nI[x],Qn[x]),I=v|0,R=lo(r,o,28)^Vi(r,o,34)^Vi(r,o,39),C=uo(r,o,28)^Yi(r,o,34)^Yi(r,o,39),N=r&s^r&a^s&a,P=o&i^o&c^i&c;y=m|0,k=b|0,m=p|0,b=g|0,p=f|0,g=h|0,{h:f,l:h}=Cn(d|0,u|0,S|0,I|0),d=a|0,u=c|0,a=s|0,c=i|0,s=r|0,i=o|0;const j=Vk(I,C,P);r=Yk(j,S,R,N),o=j|0}({h:r,l:o}=Cn(this.Ah|0,this.Al|0,r|0,o|0)),{h:s,l:i}=Cn(this.Bh|0,this.Bl|0,s|0,i|0),{h:a,l:c}=Cn(this.Ch|0,this.Cl|0,a|0,c|0),{h:d,l:u}=Cn(this.Dh|0,this.Dl|0,d|0,u|0),{h:f,l:h}=Cn(this.Eh|0,this.El|0,f|0,h|0),{h:p,l:g}=Cn(this.Fh|0,this.Fl|0,p|0,g|0),{h:m,l:b}=Cn(this.Gh|0,this.Gl|0,m|0,b|0),{h:y,l:k}=Cn(this.Hh|0,this.Hl|0,y|0,k|0),this.set(r,o,s,i,a,c,d,u,f,h,p,g,m,b,y,k)}roundClean(){$o(Qn,er)}destroy(){$o(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ab=Ib(()=>new tI),sI=Ib(()=>new oI);const yf=BigInt(0),zd=BigInt(1);function Hr(e,t=""){if(typeof e!="boolean"){const n=t&&`"${t}"`;throw new Error(n+"expected boolean, got type="+typeof e)}return e}function dn(e,t,n=""){const r=Ii(e),o=e?.length,s=t!==void 0;if(!r||s&&o!==t){const i=n&&`"${n}" `,a=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`;throw new Error(i+"expected Uint8Array"+a+", got "+c)}return e}function Xi(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Rb(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?yf:BigInt("0x"+e)}function Fc(e){return Rb(Pr(e))}function oi(e){return Vr(e),Rb(Pr(Uint8Array.from(e).reverse()))}function wf(e,t){return qa(e.toString(16).padStart(t*2,"0"))}function Pb(e,t){return wf(e,t).reverse()}function st(e,t,n){let r;if(typeof t=="string")try{r=qa(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Ii(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function wp(e){return Uint8Array.from(e)}const Rl=e=>typeof e=="bigint"&&yf<=e;function iI(e,t,n){return Rl(e)&&Rl(t)&&Rl(n)&&t<=e&&e<n}function qd(e,t,n,r){if(!iI(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Nb(e){let t;for(t=0;e>yf;e>>=zd,t+=1);return t}const Ci=e=>(zd<<BigInt(e))-zd;function aI(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");const r=p=>new Uint8Array(p),o=p=>Uint8Array.of(p);let s=r(e),i=r(e),a=0;const c=()=>{s.fill(1),i.fill(0),a=0},d=(...p)=>n(i,s,...p),u=(p=r(0))=>{i=d(o(0),p),s=d(),p.length!==0&&(i=d(o(1),p),s=d())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const g=[];for(;p<t;){s=d();const m=s.slice();g.push(m),p+=s.length}return vn(...g)};return(p,g)=>{c(),u(p);let m;for(;!(m=g(f()));)u();return c(),m}}function Ti(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const a=e[o];if(i&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${c}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}function Ka(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}const $t=BigInt(0),kt=BigInt(1),Sr=BigInt(2),_b=BigInt(3),Lb=BigInt(4),jb=BigInt(5),cI=BigInt(7),Db=BigInt(8),lI=BigInt(9),Ob=BigInt(16);function ft(e,t){const n=e%t;return n>=$t?n:t+n}function ot(e,t,n){let r=e;for(;t-- >$t;)r*=r,r%=n;return r}function bp(e,t){if(e===$t)throw new Error("invert: expected non-zero number");if(t<=$t)throw new Error("invert: expected positive modulus, got "+t);let n=ft(e,t),r=t,o=$t,s=kt;for(;n!==$t;){const a=r/n,c=r%n,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==kt)throw new Error("invert: does not exist");return ft(o,t)}function bf(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Mb(e,t){const n=(e.ORDER+kt)/Lb,r=e.pow(t,n);return bf(e,r,t),r}function dI(e,t){const n=(e.ORDER-jb)/Db,r=e.mul(t,Sr),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,Sr),o),a=e.mul(s,e.sub(i,e.ONE));return bf(e,a,t),a}function uI(e){const t=Yr(e),n=Bb(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+cI)/Ob;return(a,c)=>{let d=a.pow(c,i),u=a.mul(d,r);const f=a.mul(d,o),h=a.mul(d,s),p=a.eql(a.sqr(u),c),g=a.eql(a.sqr(f),c);d=a.cmov(d,u,p),u=a.cmov(h,f,g);const m=a.eql(a.sqr(u),c),b=a.cmov(d,u,m);return bf(a,b,c),b}}function Bb(e){if(e<_b)throw new Error("sqrt is not defined for small field");let t=e-kt,n=0;for(;t%Sr===$t;)t/=Sr,n++;let r=Sr;const o=Yr(e);for(;vp(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Mb;let s=o.pow(r,t);const i=(t+kt)/Sr;return function(c,d){if(c.is0(d))return d;if(vp(c,d)!==1)throw new Error("Cannot find square root");let u=n,f=c.mul(c.ONE,s),h=c.pow(d,t),p=c.pow(d,i);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let g=1,m=c.sqr(h);for(;!c.eql(m,c.ONE);)if(g++,m=c.sqr(m),g===u)throw new Error("Cannot find square root");const b=kt<<BigInt(u-g-1),y=c.pow(f,b);u=g,f=c.sqr(y),h=c.mul(h,f),p=c.mul(p,y)}return p}}function fI(e){return e%Lb===_b?Mb:e%Db===jb?dI:e%Ob===lI?uI(e):Bb(e)}const hI=(e,t)=>(ft(e,t)&kt)===kt,pI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function mI(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=pI.reduce((r,o)=>(r[o]="function",r),t);return Ti(e,n),e}function gI(e,t,n){if(n<$t)throw new Error("invalid exponent, negatives unsupported");if(n===$t)return e.ONE;if(n===kt)return t;let r=e.ONE,o=t;for(;n>$t;)n&kt&&(r=e.mul(r,o)),o=e.sqr(o),n>>=kt;return r}function Fb(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function vp(e,t){const n=(e.ORDER-kt)/Sr,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function Ub(e,t){t!==void 0&&$d(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Yr(e,t,n=!1,r={}){if(e<=$t)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,i=!1,a;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const h=t;h.BITS&&(o=h.BITS),h.sqrt&&(s=h.sqrt),typeof h.isLE=="boolean"&&(n=h.isLE),typeof h.modFromBytes=="boolean"&&(i=h.modFromBytes),a=h.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:c,nByteLength:d}=Ub(e,o);if(d>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const f=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:d,MASK:Ci(c),ZERO:$t,ONE:kt,allowedLengths:a,create:h=>ft(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return $t<=h&&h<e},is0:h=>h===$t,isValidNot0:h=>!f.is0(h)&&f.isValid(h),isOdd:h=>(h&kt)===kt,neg:h=>ft(-h,e),eql:(h,p)=>h===p,sqr:h=>ft(h*h,e),add:(h,p)=>ft(h+p,e),sub:(h,p)=>ft(h-p,e),mul:(h,p)=>ft(h*p,e),pow:(h,p)=>gI(f,h,p),div:(h,p)=>ft(h*bp(p,e),e),sqrN:h=>h*h,addN:(h,p)=>h+p,subN:(h,p)=>h-p,mulN:(h,p)=>h*p,inv:h=>bp(h,e),sqrt:s||(h=>(u||(u=fI(e)),u(f,h))),toBytes:h=>n?Pb(h,d):wf(h,d),fromBytes:(h,p=!0)=>{if(a){if(!a.includes(h.length)||h.length>d)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+h.length);const m=new Uint8Array(d);m.set(h,n?0:m.length-h.length),h=m}if(h.length!==d)throw new Error("Field.fromBytes: expected "+d+" bytes, got "+h.length);let g=n?oi(h):Fc(h);if(i&&(g=ft(g,e)),!p&&!f.isValid(g))throw new Error("invalid field element: outside of range 0..ORDER");return g},invertBatch:h=>Fb(f,h),cmov:(h,p,g)=>g?p:h});return Object.freeze(f)}function Hb(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function $b(e){const t=Hb(e);return t+Math.ceil(t/2)}function yI(e,t,n=!1){const r=e.length,o=Hb(t),s=$b(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?oi(e):Fc(e),a=ft(i,t-kt)+kt;return n?Pb(a,o):wf(a,o)}const zo=BigInt(0),Er=BigInt(1);function Ga(e,t){const n=t.negate();return e?n:t}function kr(e,t){const n=Fb(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function zb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Pl(e,t){zb(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=Ci(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function xp(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=Er);const d=t*r,u=d+Math.abs(a)-1,f=a===0,h=a<0,p=t%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:h,isNegF:p,offsetF:d}}function wI(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function bI(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const Nl=new WeakMap,qb=new WeakMap;function _l(e){return qb.get(e)||1}function Sp(e){if(e!==zo)throw new Error("invalid wNAF")}class Kb{constructor(t,n){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=n}_unsafeLadder(t,n,r=this.ZERO){let o=t;for(;n>zo;)n&Er&&(r=r.add(o)),o=o.double(),n>>=Er;return r}precomputeWindow(t,n){const{windows:r,windowSize:o}=Pl(n,this.bits),s=[];let i=t,a=i;for(let c=0;c<r;c++){a=i,s.push(a);for(let d=1;d<o;d++)a=a.add(i),s.push(a);i=a.double()}return s}wNAF(t,n,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let o=this.ZERO,s=this.BASE;const i=Pl(t,this.bits);for(let a=0;a<i.windows;a++){const{nextN:c,offset:d,isZero:u,isNeg:f,isNegF:h,offsetF:p}=xp(r,a,i);r=c,u?s=s.add(Ga(h,n[p])):o=o.add(Ga(f,n[d]))}return Sp(r),{p:o,f:s}}wNAFUnsafe(t,n,r,o=this.ZERO){const s=Pl(t,this.bits);for(let i=0;i<s.windows&&r!==zo;i++){const{nextN:a,offset:c,isZero:d,isNeg:u}=xp(r,i,s);if(r=a,!d){const f=n[c];o=o.add(u?f.negate():f)}}return Sp(r),o}getPrecomputes(t,n,r){let o=Nl.get(n);return o||(o=this.precomputeWindow(n,t),t!==1&&(typeof r=="function"&&(o=r(o)),Nl.set(n,o))),o}cached(t,n,r){const o=_l(t);return this.wNAF(o,this.getPrecomputes(o,t,r),n)}unsafe(t,n,r,o){const s=_l(t);return s===1?this._unsafeLadder(t,n,o):this.wNAFUnsafe(s,this.getPrecomputes(s,t,r),n,o)}createCache(t,n){zb(n,this.bits),qb.set(t,n),Nl.delete(t)}hasCache(t){return _l(t)!==1}}function vI(e,t,n,r){let o=t,s=e.ZERO,i=e.ZERO;for(;n>zo||r>zo;)n&Er&&(s=s.add(o)),r&Er&&(i=i.add(o)),o=o.double(),n>>=Er,r>>=Er;return{p1:s,p2:i}}function Gb(e,t,n,r){wI(n,e),bI(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=Nb(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const d=Ci(c),u=new Array(Number(d)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let h=i;for(let p=f;p>=0;p-=c){u.fill(i);for(let m=0;m<s;m++){const b=r[m],y=Number(b>>BigInt(p)&d);u[y]=u[y].add(n[m])}let g=i;for(let m=u.length-1,b=i;m>0;m--)b=b.add(u[m]),g=g.add(b);if(h=h.add(g),p!==0)for(let m=0;m<c;m++)h=h.double()}return h}function Ep(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return mI(t),t}else return Yr(e,{isLE:n})}function Wb(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const c of["p","n","h"]){const d=t[c];if(!(typeof d=="bigint"&&d>zo))throw new Error(`CURVE.${c} must be positive bigint`)}const o=Ep(t.p,n.Fp,r),s=Ep(t.n,n.Fn,r),a=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(const c of a)if(!o.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:o,Fn:s}}const tr=BigInt(0),yt=BigInt(1),Ll=BigInt(2),xI=BigInt(8);function SI(e,t,n,r){const o=e.sqr(n),s=e.sqr(r),i=e.add(e.mul(t.a,o),s),a=e.add(e.ONE,e.mul(t.d,e.mul(o,s)));return e.eql(i,a)}function EI(e,t={}){const n=Wb("edwards",e,t,t.FpFnLE),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i}=s;Ti(t,{},{uvRatio:"function"});const a=Ll<<BigInt(o.BYTES*8)-yt,c=b=>r.create(b),d=t.uvRatio||((b,y)=>{try{return{isValid:!0,value:r.sqrt(r.div(b,y))}}catch{return{isValid:!1,value:tr}}});if(!SI(r,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function u(b,y,k=!1){const x=k?yt:tr;return qd("coordinate "+b,y,x,a),y}function f(b){if(!(b instanceof g))throw new Error("ExtendedPoint expected")}const h=Ka((b,y)=>{const{X:k,Y:x,Z:T}=b,_=b.is0();y==null&&(y=_?xI:r.inv(T));const A=c(k*y),E=c(x*y),v=r.mul(T,y);if(_)return{x:tr,y:yt};if(v!==yt)throw new Error("invZ was invalid");return{x:A,y:E}}),p=Ka(b=>{const{a:y,d:k}=s;if(b.is0())throw new Error("bad point: ZERO");const{X:x,Y:T,Z:_,T:A}=b,E=c(x*x),v=c(T*T),S=c(_*_),I=c(S*S),R=c(E*y),C=c(S*c(R+v)),N=c(I+c(k*c(E*v)));if(C!==N)throw new Error("bad point: equation left != right (1)");const P=c(x*T),j=c(_*A);if(P!==j)throw new Error("bad point: equation left != right (2)");return!0});class g{constructor(y,k,x,T){this.X=u("x",y),this.Y=u("y",k),this.Z=u("z",x,!0),this.T=u("t",T),Object.freeze(this)}static CURVE(){return s}static fromAffine(y){if(y instanceof g)throw new Error("extended point not allowed");const{x:k,y:x}=y||{};return u("x",k),u("y",x),new g(k,x,yt,c(k*x))}static fromBytes(y,k=!1){const x=r.BYTES,{a:T,d:_}=s;y=wp(dn(y,x,"point")),Hr(k,"zip215");const A=wp(y),E=y[x-1];A[x-1]=E&-129;const v=oi(A),S=k?a:r.ORDER;qd("point.y",v,tr,S);const I=c(v*v),R=c(I-yt),C=c(_*I-T);let{isValid:N,value:P}=d(R,C);if(!N)throw new Error("bad point: invalid y coordinate");const j=(P&yt)===yt,O=(E&128)!==0;if(!k&&P===tr&&O)throw new Error("bad point: x=0 and x_0=1");return O!==j&&(P=c(-P)),g.fromAffine({x:P,y:v})}static fromHex(y,k=!1){return g.fromBytes(st("point",y),k)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,k=!0){return m.createCache(this,y),k||this.multiply(Ll),this}assertValidity(){p(this)}equals(y){f(y);const{X:k,Y:x,Z:T}=this,{X:_,Y:A,Z:E}=y,v=c(k*E),S=c(_*T),I=c(x*E),R=c(A*T);return v===S&&I===R}is0(){return this.equals(g.ZERO)}negate(){return new g(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:y}=s,{X:k,Y:x,Z:T}=this,_=c(k*k),A=c(x*x),E=c(Ll*c(T*T)),v=c(y*_),S=k+x,I=c(c(S*S)-_-A),R=v+A,C=R-E,N=v-A,P=c(I*C),j=c(R*N),O=c(I*N),M=c(C*R);return new g(P,j,M,O)}add(y){f(y);const{a:k,d:x}=s,{X:T,Y:_,Z:A,T:E}=this,{X:v,Y:S,Z:I,T:R}=y,C=c(T*v),N=c(_*S),P=c(E*x*R),j=c(A*I),O=c((T+_)*(v+S)-C-N),M=j-P,F=j+P,B=c(N-k*C),U=c(O*M),q=c(F*B),z=c(O*B),ee=c(M*F);return new g(U,q,ee,z)}subtract(y){return this.add(y.negate())}multiply(y){if(!o.isValidNot0(y))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:k,f:x}=m.cached(this,y,T=>kr(g,T));return kr(g,[k,x])[0]}multiplyUnsafe(y,k=g.ZERO){if(!o.isValid(y))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return y===tr?g.ZERO:this.is0()||y===yt?this:m.unsafe(this,y,x=>kr(g,x),k)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}isTorsionFree(){return m.unsafe(this,s.n).is0()}toAffine(y){return h(this,y)}clearCofactor(){return i===yt?this:this.multiplyUnsafe(i)}toBytes(){const{x:y,y:k}=this.toAffine(),x=r.toBytes(k);return x[x.length-1]|=y&yt?128:0,x}toHex(){return Pr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(y){return kr(g,y)}static msm(y,k){return Gb(g,o,y,k)}_setWindowSize(y){this.precompute(y)}toRawBytes(){return this.toBytes()}}g.BASE=new g(s.Gx,s.Gy,yt,c(s.Gx*s.Gy)),g.ZERO=new g(tr,yt,yt,tr),g.Fp=r,g.Fn=o;const m=new Kb(g,o.BITS);return g.BASE.precompute(8),g}function kI(e,t,n={}){if(typeof t!="function")throw new Error('"hash" function param is required');Ti(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:o,Fp:s,Fn:i}=e,a=n.randomBytes||gf,c=n.adjustScalarBytes||(S=>S),d=n.domain||((S,I,R)=>{if(Hr(R,"phflag"),I.length||R)throw new Error("Contexts/pre-hash are not supported");return S});function u(S){return i.create(oi(S))}function f(S){const I=x.secretKey;S=st("private key",S,I);const R=st("hashed private key",t(S),2*I),C=c(R.slice(0,I)),N=R.slice(I,2*I),P=u(C);return{head:C,prefix:N,scalar:P}}function h(S){const{head:I,prefix:R,scalar:C}=f(S),N=o.multiply(C),P=N.toBytes();return{head:I,prefix:R,scalar:C,point:N,pointBytes:P}}function p(S){return h(S).pointBytes}function g(S=Uint8Array.of(),...I){const R=vn(...I);return u(t(d(R,st("context",S),!!r)))}function m(S,I,R={}){S=st("message",S),r&&(S=r(S));const{prefix:C,scalar:N,pointBytes:P}=h(I),j=g(R.context,C,S),O=o.multiply(j).toBytes(),M=g(R.context,O,P,S),F=i.create(j+M*N);if(!i.isValid(F))throw new Error("sign failed: invalid s");const B=vn(O,i.toBytes(F));return dn(B,x.signature,"result")}const b={zip215:!0};function y(S,I,R,C=b){const{context:N,zip215:P}=C,j=x.signature;S=st("signature",S,j),I=st("message",I),R=st("publicKey",R,x.publicKey),P!==void 0&&Hr(P,"zip215"),r&&(I=r(I));const O=j/2,M=S.subarray(0,O),F=oi(S.subarray(O,j));let B,U,q;try{B=e.fromBytes(R,P),U=e.fromBytes(M,P),q=o.multiplyUnsafe(F)}catch{return!1}if(!P&&B.isSmallOrder())return!1;const z=g(N,U.toBytes(),B.toBytes(),I);return U.add(B.multiplyUnsafe(z)).subtract(q).clearCofactor().is0()}const k=s.BYTES,x={secretKey:k,publicKey:k,signature:2*k,seed:k};function T(S=a(x.seed)){return dn(S,x.seed,"seed")}function _(S){const I=v.randomSecretKey(S);return{secretKey:I,publicKey:p(I)}}function A(S){return Ii(S)&&S.length===i.BYTES}function E(S,I){try{return!!e.fromBytes(S,I)}catch{return!1}}const v={getExtendedPublicKey:h,randomSecretKey:T,isValidSecretKey:A,isValidPublicKey:E,toMontgomery(S){const{y:I}=e.fromBytes(S),R=x.publicKey,C=R===32;if(!C&&R!==57)throw new Error("only defined for 25519 and 448");const N=C?s.div(yt+I,yt-I):s.div(I-yt,I+yt);return s.toBytes(N)},toMontgomerySecret(S){const I=x.secretKey;dn(S,I);const R=t(S.subarray(0,I));return c(R).subarray(0,I)},randomPrivateKey:T,precompute(S=8,I=e.BASE){return I.precompute(S,!1)}};return Object.freeze({keygen:_,getPublicKey:p,sign:m,verify:y,utils:v,Point:e,lengths:x})}function II(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=Yr(t.n,e.nBitLength,!0),o={Fp:n,Fn:r,uvRatio:e.uvRatio},s={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:o,hash:e.hash,eddsaOpts:s}}function CI(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}function TI(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:o}=II(e),s=EI(t,n),i=kI(s,r,o);return CI(e,i)}const AI=BigInt(1),kp=BigInt(2);BigInt(3);const RI=BigInt(5),PI=BigInt(8),vf=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Vb={p:vf,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:PI,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function NI(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=vf,a=e*e%s*e%s,c=ot(a,kp,s)*a%s,d=ot(c,AI,s)*e%s,u=ot(d,RI,s)*d%s,f=ot(u,t,s)*u%s,h=ot(f,n,s)*f%s,p=ot(h,r,s)*h%s,g=ot(p,o,s)*p%s,m=ot(g,o,s)*p%s,b=ot(m,t,s)*u%s;return{pow_p_5_8:ot(b,kp,s)*e%s,b2:a}}function _I(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ip=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function LI(e,t){const n=vf,r=ft(t*t*t,n),o=ft(r*r*t,n),s=NI(e*o).pow_p_5_8;let i=ft(e*r*s,n);const a=ft(t*i*i,n),c=i,d=ft(i*Ip,n),u=a===e,f=a===ft(-e,n),h=a===ft(-e*Ip,n);return u&&(i=c),(f||h)&&(i=d),hI(i,n)&&(i=ft(-i,n)),{isValid:u||f,value:i}}const jI=Yr(Vb.p,{isLE:!0}),DI={...Vb,Fp:jI,hash:sI,adjustScalarBytes:_I,uvRatio:LI},Wa=TI(DI);class Cp extends Error{constructor(t="An error occurred while signing a message"){super(t),this.name="SigningError"}}class Tp extends Error{constructor(t="An error occurred while verifying a message"){super(t),this.name="VerificationError"}}class OI extends Error{constructor(t="Missing Web Crypto API"){super(t),this.name="WebCryptoMissingError"}}const qn={get(e=globalThis){const t=e.crypto;if(t?.subtle==null)throw new OI("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p/blob/main/packages/crypto/README.md#web-crypto-api");return t}},Va=32,Pn=64,Kd=32;let Ro;const Yb=(async()=>{try{return await qn.get().subtle.generateKey({name:"Ed25519"},!0,["sign","verify"]),!0}catch{return!1}})();function MI(){const e=Wa.utils.randomPrivateKey(),t=Wa.getPublicKey(e);return{privateKey:qI(e,t),publicKey:t}}async function BI(e,t){let n;e.length===Pn?n=e.subarray(0,32):n=e;const r={crv:"Ed25519",kty:"OKP",x:Le(e.subarray(32),"base64url"),d:Le(n,"base64url"),ext:!0,key_ops:["sign"]},o=await qn.get().subtle.importKey("jwk",r,{name:"Ed25519"},!0,["sign"]),s=await qn.get().subtle.sign({name:"Ed25519"},o,t instanceof Uint8Array?t:t.subarray());return new Uint8Array(s,0,s.byteLength)}function FI(e,t){const n=e.subarray(0,Kd);return Wa.sign(t instanceof Uint8Array?t:t.subarray(),n)}async function UI(e,t){return Ro==null&&(Ro=await Yb),Ro?BI(e,t):FI(e,t)}async function HI(e,t,n){if(e.buffer instanceof ArrayBuffer){const r=await qn.get().subtle.importKey("raw",e.buffer,{name:"Ed25519"},!1,["verify"]);return await qn.get().subtle.verify({name:"Ed25519"},r,t,n instanceof Uint8Array?n:n.subarray())}throw new TypeError("WebCrypto does not support SharedArrayBuffer for Ed25519 keys")}function $I(e,t,n){return Wa.verify(t,n instanceof Uint8Array?n:n.subarray(),e)}async function zI(e,t,n){return Ro==null&&(Ro=await Yb),Ro?HI(e,t,n):$I(e,t,n)}function qI(e,t){const n=new Uint8Array(Pn);for(let r=0;r<Kd;r++)n[r]=e[r],n[Kd+r]=t[r];return n}function Uc(e){return e==null?!1:typeof e.then=="function"&&typeof e.catch=="function"&&typeof e.finally=="function"}class Xb{type="Ed25519";raw;constructor(t){this.raw=si(t,Va)}toMultihash(){return Ei.digest(qc(this))}toCID(){return tt.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}verify(t,n,r){r?.signal?.throwIfAborted();const o=zI(this.raw,n,t);return Uc(o)?o.then(s=>(r?.signal?.throwIfAborted(),s)):o}}class Gd{type="Ed25519";raw;publicKey;constructor(t,n){this.raw=si(t,Pn),this.publicKey=new Xb(n)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}sign(t,n){n?.signal?.throwIfAborted();const r=UI(this.raw,t);return Uc(r)?r.then(o=>(n?.signal?.throwIfAborted(),o)):(n?.signal?.throwIfAborted(),r)}}function KI(e){if(e.length>Pn){e=si(e,Pn+Va);const r=e.subarray(0,Pn),o=e.subarray(Pn,e.length);return new Gd(r,o)}e=si(e,Pn);const t=e.subarray(0,Pn),n=e.subarray(Va);return new Gd(t,n)}function Jb(e){return e=si(e,Va),new Xb(e)}async function GI(){const{privateKey:e,publicKey:t}=MI();return new Gd(e,t)}function si(e,t){if(e=Uint8Array.from(e??[]),e.length!==t)throw new fn(`Key must be a Uint8Array of length ${t}, got ${e.length}`);return e}const WI=Math.pow(2,7),VI=Math.pow(2,14),YI=Math.pow(2,21),xf=Math.pow(2,28),Sf=Math.pow(2,35),Ef=Math.pow(2,42),kf=Math.pow(2,49),Ue=128,Rt=127;function Xr(e){if(e<WI)return 1;if(e<VI)return 2;if(e<YI)return 3;if(e<xf)return 4;if(e<Sf)return 5;if(e<Ef)return 6;if(e<kf)return 7;if(Number.MAX_SAFE_INTEGER!=null&&e>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function Zb(e,t,n=0){switch(Xr(e)){case 8:t[n++]=e&255|Ue,e/=128;case 7:t[n++]=e&255|Ue,e/=128;case 6:t[n++]=e&255|Ue,e/=128;case 5:t[n++]=e&255|Ue,e/=128;case 4:t[n++]=e&255|Ue,e>>>=7;case 3:t[n++]=e&255|Ue,e>>>=7;case 2:t[n++]=e&255|Ue,e>>>=7;case 1:{t[n++]=e&255,e>>>=7;break}default:throw new Error("unreachable")}return t}function XI(e,t,n=0){switch(Xr(e)){case 8:t.set(n++,e&255|Ue),e/=128;case 7:t.set(n++,e&255|Ue),e/=128;case 6:t.set(n++,e&255|Ue),e/=128;case 5:t.set(n++,e&255|Ue),e/=128;case 4:t.set(n++,e&255|Ue),e>>>=7;case 3:t.set(n++,e&255|Ue),e>>>=7;case 2:t.set(n++,e&255|Ue),e>>>=7;case 1:{t.set(n++,e&255),e>>>=7;break}default:throw new Error("unreachable")}return t}function Qb(e,t){let n=e[t],r=0;if(r+=n&Rt,n<Ue||(n=e[t+1],r+=(n&Rt)<<7,n<Ue)||(n=e[t+2],r+=(n&Rt)<<14,n<Ue)||(n=e[t+3],r+=(n&Rt)<<21,n<Ue)||(n=e[t+4],r+=(n&Rt)*xf,n<Ue)||(n=e[t+5],r+=(n&Rt)*Sf,n<Ue)||(n=e[t+6],r+=(n&Rt)*Ef,n<Ue)||(n=e[t+7],r+=(n&Rt)*kf,n<Ue))return r;throw new RangeError("Could not decode varint")}function JI(e,t){let n=e.get(t),r=0;if(r+=n&Rt,n<Ue||(n=e.get(t+1),r+=(n&Rt)<<7,n<Ue)||(n=e.get(t+2),r+=(n&Rt)<<14,n<Ue)||(n=e.get(t+3),r+=(n&Rt)<<21,n<Ue)||(n=e.get(t+4),r+=(n&Rt)*xf,n<Ue)||(n=e.get(t+5),r+=(n&Rt)*Sf,n<Ue)||(n=e.get(t+6),r+=(n&Rt)*Ef,n<Ue)||(n=e.get(t+7),r+=(n&Rt)*kf,n<Ue))return r;throw new RangeError("Could not decode varint")}function ZI(e,t,n=0){return t==null&&(t=zn(Xr(e))),t instanceof Uint8Array?Zb(e,t,n):XI(e,t,n)}function ev(e,t=0){return e instanceof Uint8Array?Qb(e,t):JI(e,t)}const If=new Float32Array([-0]),ur=new Uint8Array(If.buffer);function QI(e,t,n){If[0]=e,t[n]=ur[0],t[n+1]=ur[1],t[n+2]=ur[2],t[n+3]=ur[3]}function eC(e,t){return ur[0]=e[t],ur[1]=e[t+1],ur[2]=e[t+2],ur[3]=e[t+3],If[0]}const Cf=new Float64Array([-0]),Pt=new Uint8Array(Cf.buffer);function tC(e,t,n){Cf[0]=e,t[n]=Pt[0],t[n+1]=Pt[1],t[n+2]=Pt[2],t[n+3]=Pt[3],t[n+4]=Pt[4],t[n+5]=Pt[5],t[n+6]=Pt[6],t[n+7]=Pt[7]}function nC(e,t){return Pt[0]=e[t],Pt[1]=e[t+1],Pt[2]=e[t+2],Pt[3]=e[t+3],Pt[4]=e[t+4],Pt[5]=e[t+5],Pt[6]=e[t+6],Pt[7]=e[t+7],Cf[0]}const rC=BigInt(Number.MAX_SAFE_INTEGER),oC=BigInt(Number.MIN_SAFE_INTEGER);class Nt{lo;hi;constructor(t,n){this.lo=t|0,this.hi=n|0}toNumber(t=!1){if(!t&&this.hi>>>31>0){const n=~this.lo+1>>>0;let r=~this.hi>>>0;return n===0&&(r=r+1>>>0),-(n+r*4294967296)}return this.lo+this.hi*4294967296}toBigInt(t=!1){if(t)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31){const n=~this.lo+1>>>0;let r=~this.hi>>>0;return n===0&&(r=r+1>>>0),-(BigInt(n)+(BigInt(r)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toString(t=!1){return this.toBigInt(t).toString()}zzEncode(){const t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this}zzDecode(){const t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this}length(){const t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?n===0?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}static fromBigInt(t){if(t===0n)return Nr;if(t<rC&&t>oC)return this.fromNumber(Number(t));const n=t<0n;n&&(t=-t);let r=t>>32n,o=t-(r<<32n);return n&&(r=~r|0n,o=~o|0n,++o>Ap&&(o=0n,++r>Ap&&(r=0n))),new Nt(Number(o),Number(r))}static fromNumber(t){if(t===0)return Nr;const n=t<0;n&&(t=-t);let r=t>>>0,o=(t-r)/4294967296>>>0;return n&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new Nt(r,o)}static from(t){return typeof t=="number"?Nt.fromNumber(t):typeof t=="bigint"?Nt.fromBigInt(t):typeof t=="string"?Nt.fromBigInt(BigInt(t)):t.low!=null||t.high!=null?new Nt(t.low>>>0,t.high>>>0):Nr}}const Nr=new Nt(0,0);Nr.toBigInt=function(){return 0n};Nr.zzEncode=Nr.zzDecode=function(){return this};Nr.length=function(){return 1};const Ap=4294967296n;function sC(e){let t=0,n=0;for(let r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320?(++r,t+=4):t+=3;return t}function iC(e,t,n){if(n-t<1)return"";let o;const s=[];let i=0,a;for(;t<n;)a=e[t++],a<128?s[i++]=a:a>191&&a<224?s[i++]=(a&31)<<6|e[t++]&63:a>239&&a<365?(a=((a&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,s[i++]=55296+(a>>10),s[i++]=56320+(a&1023)):s[i++]=(a&15)<<12|(e[t++]&63)<<6|e[t++]&63,i>8191&&((o??(o=[])).push(String.fromCharCode.apply(String,s)),i=0);return o!=null?(i>0&&o.push(String.fromCharCode.apply(String,s.slice(0,i))),o.join("")):String.fromCharCode.apply(String,s.slice(0,i))}function tv(e,t,n){const r=n;let o,s;for(let i=0;i<e.length;++i)o=e.charCodeAt(i),o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=o&63|128):(o&64512)===55296&&((s=e.charCodeAt(i+1))&64512)===56320?(o=65536+((o&1023)<<10)+(s&1023),++i,t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128);return n-r}function an(e,t){return RangeError(`index out of range: ${e.pos} + ${t??1} > ${e.len}`)}function Ji(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}class aC{buf;pos;len;_slice=Uint8Array.prototype.subarray;constructor(t){this.buf=t,this.pos=0,this.len=t.length}uint32(){let t=4294967295;if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,an(this,10);return t}int32(){return this.uint32()|0}sint32(){const t=this.uint32();return t>>>1^-(t&1)|0}bool(){return this.uint32()!==0}fixed32(){if(this.pos+4>this.len)throw an(this,4);return Ji(this.buf,this.pos+=4)}sfixed32(){if(this.pos+4>this.len)throw an(this,4);return Ji(this.buf,this.pos+=4)|0}float(){if(this.pos+4>this.len)throw an(this,4);const t=eC(this.buf,this.pos);return this.pos+=4,t}double(){if(this.pos+8>this.len)throw an(this,4);const t=nC(this.buf,this.pos);return this.pos+=8,t}bytes(){const t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw an(this,t);return this.pos+=t,n===r?new Uint8Array(0):this.buf.subarray(n,r)}string(){const t=this.bytes();return iC(t,0,t.length)}skip(t){if(typeof t=="number"){if(this.pos+t>this.len)throw an(this,t);this.pos+=t}else do if(this.pos>=this.len)throw an(this);while((this.buf[this.pos++]&128)!==0);return this}skipType(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type ${t} at offset ${this.pos}`)}return this}readLongVarint(){const t=new Nt(0,0);let n=0;if(this.len-this.pos>4){for(;n<4;++n)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw an(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,t}if(this.len-this.pos>4){for(;n<5;++n)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw an(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}readFixed64(){if(this.pos+8>this.len)throw an(this,8);const t=Ji(this.buf,this.pos+=4),n=Ji(this.buf,this.pos+=4);return new Nt(t,n)}int64(){return this.readLongVarint().toBigInt()}int64Number(){return this.readLongVarint().toNumber()}int64String(){return this.readLongVarint().toString()}uint64(){return this.readLongVarint().toBigInt(!0)}uint64Number(){const t=Qb(this.buf,this.pos);return this.pos+=Xr(t),t}uint64String(){return this.readLongVarint().toString(!0)}sint64(){return this.readLongVarint().zzDecode().toBigInt()}sint64Number(){return this.readLongVarint().zzDecode().toNumber()}sint64String(){return this.readLongVarint().zzDecode().toString()}fixed64(){return this.readFixed64().toBigInt()}fixed64Number(){return this.readFixed64().toNumber()}fixed64String(){return this.readFixed64().toString()}sfixed64(){return this.readFixed64().toBigInt()}sfixed64Number(){return this.readFixed64().toNumber()}sfixed64String(){return this.readFixed64().toString()}}function cC(e){return new aC(e instanceof Uint8Array?e:e.subarray())}function Hc(e,t,n){const r=cC(e);return t.decode(r,void 0,n)}function lC(e){let r,o=8192;return function(i){if(i<1||i>4096)return zn(i);o+i>8192&&(r=zn(8192),o=0);const a=r.subarray(o,o+=i);return(o&7)!==0&&(o=(o|7)+1),a}}class Ls{fn;len;next;val;constructor(t,n,r){this.fn=t,this.len=n,this.next=void 0,this.val=r}}function jl(){}class dC{head;tail;len;next;constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}}const uC=lC();function fC(e){return globalThis.Buffer!=null?zn(e):uC(e)}class Wd{len;head;tail;states;constructor(){this.len=0,this.head=new Ls(jl,0,0),this.tail=this.head,this.states=null}_push(t,n,r){return this.tail=this.tail.next=new Ls(t,n,r),this.len+=n,this}uint32(t){return this.len+=(this.tail=this.tail.next=new pC((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this}int32(t){return t<0?this._push(Zi,10,Nt.fromNumber(t)):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}uint64(t){const n=Nt.fromBigInt(t);return this._push(Zi,n.length(),n)}uint64Number(t){return this._push(Zb,Xr(t),t)}uint64String(t){return this.uint64(BigInt(t))}int64(t){return this.uint64(t)}int64Number(t){return this.uint64Number(t)}int64String(t){return this.uint64String(t)}sint64(t){const n=Nt.fromBigInt(t).zzEncode();return this._push(Zi,n.length(),n)}sint64Number(t){const n=Nt.fromNumber(t).zzEncode();return this._push(Zi,n.length(),n)}sint64String(t){return this.sint64(BigInt(t))}bool(t){return this._push(Dl,1,t?1:0)}fixed32(t){return this._push(gs,4,t>>>0)}sfixed32(t){return this.fixed32(t)}fixed64(t){const n=Nt.fromBigInt(t);return this._push(gs,4,n.lo)._push(gs,4,n.hi)}fixed64Number(t){const n=Nt.fromNumber(t);return this._push(gs,4,n.lo)._push(gs,4,n.hi)}fixed64String(t){return this.fixed64(BigInt(t))}sfixed64(t){return this.fixed64(t)}sfixed64Number(t){return this.fixed64Number(t)}sfixed64String(t){return this.fixed64String(t)}float(t){return this._push(QI,4,t)}double(t){return this._push(tC,8,t)}bytes(t){const n=t.length>>>0;return n===0?this._push(Dl,1,0):this.uint32(n)._push(mC,n,t)}string(t){const n=sC(t);return n!==0?this.uint32(n)._push(tv,n,t):this._push(Dl,1,0)}fork(){return this.states=new dC(this),this.head=this.tail=new Ls(jl,0,0),this.len=0,this}reset(){return this.states!=null?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ls(jl,0,0),this.len=0),this}ldelim(){const t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r!==0&&(this.tail.next=t.next,this.tail=n,this.len+=r),this}finish(){let t=this.head.next;const n=fC(this.len);let r=0;for(;t!=null;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}}function Dl(e,t,n){t[n]=e&255}function hC(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}class pC extends Ls{next;constructor(t,n){super(hC,t,n),this.next=void 0}}function Zi(e,t,n){for(;e.hi!==0;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo=e.lo>>>7;t[n++]=e.lo}function gs(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function mC(e,t,n){t.set(e,n)}globalThis.Buffer!=null&&(Wd.prototype.bytes=function(e){const t=e.length>>>0;return this.uint32(t),t>0&&this._push(gC,t,e),this},Wd.prototype.string=function(e){const t=globalThis.Buffer.byteLength(e);return this.uint32(t),t>0&&this._push(yC,t,e),this});function gC(e,t,n){t.set(e,n)}function yC(e,t,n){e.length<40?tv(e,t,n):t.utf8Write!=null?t.utf8Write(e,n):t.set(ut(e),n)}function wC(){return new Wd}function $c(e,t){const n=wC();return t.encode(e,n,{lengthDelimited:!1}),n.finish()}var Ya;(function(e){e[e.VARINT=0]="VARINT",e[e.BIT64=1]="BIT64",e[e.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",e[e.START_GROUP=3]="START_GROUP",e[e.END_GROUP=4]="END_GROUP",e[e.BIT32=5]="BIT32"})(Ya||(Ya={}));function nv(e,t,n,r){return{name:e,type:t,encode:n,decode:r}}function bC(e){function t(o){if(e[o.toString()]==null)throw new Error("Invalid enum value");return e[o]}const n=function(s,i){const a=t(s);i.int32(a)},r=function(s){const i=s.int32();return t(i)};return nv("enum",Ya.VARINT,n,r)}function zc(e,t){return nv("message",Ya.LENGTH_DELIMITED,e,t)}class Rp extends Error{code="ERR_MAX_LENGTH";name="MaxLengthError"}var nt;(function(e){e.RSA="RSA",e.Ed25519="Ed25519",e.secp256k1="secp256k1",e.ECDSA="ECDSA"})(nt||(nt={}));var Vd;(function(e){e[e.RSA=0]="RSA",e[e.Ed25519=1]="Ed25519",e[e.secp256k1=2]="secp256k1",e[e.ECDSA=3]="ECDSA"})(Vd||(Vd={}));(function(e){e.codec=()=>bC(Vd)})(nt||(nt={}));var $r;(function(e){let t;e.codec=()=>(t==null&&(t=zc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),nt.codec().encode(n.Type,r)),n.Data!=null&&(r.uint32(18),r.bytes(n.Data)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.Type=nt.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>$c(n,e.codec()),e.decode=(n,r)=>Hc(n,e.codec(),r)})($r||($r={}));var Xa;(function(e){let t;e.codec=()=>(t==null&&(t=zc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),nt.codec().encode(n.Type,r)),n.Data!=null&&(r.uint32(18),r.bytes(n.Data)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.Type=nt.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>$c(n,e.codec()),e.decode=(n,r)=>Hc(n,e.codec(),r)})(Xa||(Xa={}));const rv=Ab;class ov{type="RSA";jwk;_raw;_multihash;constructor(t,n){this.jwk=t,this._multihash=n}get raw(){return this._raw==null&&(this._raw=iv(this.jwk)),this._raw}toMultihash(){return this._multihash}toCID(){return tt.createV1(114,this._multihash)}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}verify(t,n,r){return jC(this.jwk,n,t,r)}}class vC{type="RSA";jwk;_raw;publicKey;constructor(t,n){this.jwk=t,this.publicKey=n}get raw(){return this._raw==null&&(this._raw=IC(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}sign(t,n){return LC(this.jwk,t,n)}}const xC=8192,sv=18,SC=1062,EC=Uint8Array.from([48,13,6,9,42,134,72,134,247,13,1,1,1,5,0]);function kC(e){return{n:Le(e[1],"base64url"),e:Le(e[2],"base64url"),d:Le(e[3],"base64url"),p:Le(e[4],"base64url"),q:Le(e[5],"base64url"),dp:Le(e[6],"base64url"),dq:Le(e[7],"base64url"),qi:Le(e[8],"base64url"),kty:"RSA"}}function IC(e){if(e.n==null||e.e==null||e.d==null||e.p==null||e.q==null||e.dp==null||e.dq==null||e.qi==null)throw new fn("JWK was missing components");return Bn([Xt(Uint8Array.from([0])),Xt(ut(e.n,"base64url")),Xt(ut(e.e,"base64url")),Xt(ut(e.d,"base64url")),Xt(ut(e.p,"base64url")),Xt(ut(e.q,"base64url")),Xt(ut(e.dp,"base64url")),Xt(ut(e.dq,"base64url")),Xt(ut(e.qi,"base64url"))]).subarray()}function CC(e){const t=Qo(e[1],{offset:0});return{kty:"RSA",n:Le(t[0],"base64url"),e:Le(t[1],"base64url")}}function iv(e){if(e.n==null||e.e==null)throw new fn("JWK was missing components");return Bn([EC,pf(Bn([Xt(ut(e.n,"base64url")),Xt(ut(e.e,"base64url"))]))]).subarray()}function TC(e){const t=Qo(e);return AC(t)}function AC(e){const t=kC(e);return NC(t)}function RC(e,t){if(e.byteLength>=SC)throw new sb("Key size is too large");const n=Qo(e,{offset:0});return PC(n,e,t)}function PC(e,t,n){const r=CC(e);if(n==null){const o=rv($r.encode({Type:nt.RSA,Data:t}));n=Si(sv,o)}return new ov(r,n)}function NC(e){if(DC(e)>xC)throw new fn("Key size is too large");const t=_C(e),n=rv($r.encode({Type:nt.RSA,Data:iv(t.publicKey)})),r=Si(sv,n);return new vC(t.privateKey,new ov(t.publicKey,r))}function _C(e){if(e==null)throw new fn("Missing key parameter");return{privateKey:e,publicKey:{kty:e.kty,n:e.n,e:e.e}}}async function LC(e,t,n){const r=await qn.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);n?.signal?.throwIfAborted();const o=await qn.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},r,t instanceof Uint8Array?t:t.subarray());return n?.signal?.throwIfAborted(),new Uint8Array(o,0,o.byteLength)}async function jC(e,t,n,r){const o=await qn.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);r?.signal?.throwIfAborted();const s=await qn.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},o,t,n instanceof Uint8Array?n:n.subarray());return r?.signal?.throwIfAborted(),s}function DC(e){if(e.kty!=="RSA")throw new fn("invalid key type");if(e.n==null)throw new fn("invalid key modulus");return ut(e.n,"base64url").length*8}class av extends kb{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Sb(t);const r=mf(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),$o(s)}update(t){return za(this),this.iHash.update(t),this}digestInto(t){za(this),Vr(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const cv=(e,t,n)=>new av(e,t).update(n).digest();cv.create=(e,t)=>new av(e,t);const Pp=(e,t)=>(e+(e>=0?t:-t)/lv)/t;function OC(e,t,n){const[[r,o],[s,i]]=t,a=Pp(i*e,n),c=Pp(-o*e,n);let d=e-a*r-c*s,u=-a*o-c*i;const f=d<Ln,h=u<Ln;f&&(d=-d),h&&(u=-u);const p=Ci(Math.ceil(Nb(n)/2))+Po;if(d<Ln||d>=p||u<Ln||u>=p)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:f,k1:d,k2neg:h,k2:u}}function Yd(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function Ol(e,t){const n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return Hr(n.lowS,"lowS"),Hr(n.prehash,"prehash"),n.format!==void 0&&Yd(n.format),n}class MC extends Error{constructor(t=""){super(t)}}const Nn={Err:MC,_tlv:{encode:(e,t)=>{const{Err:n}=Nn;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Xi(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?Xi(o.length/2|128):"";return Xi(e)+s+o+t},decode(e,t){const{Err:n}=Nn;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const d=t.subarray(r,r+c);if(d.length!==c)throw new n("tlv.decode: length bytes not complete");if(d[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of d)i=i<<8|u;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=Nn;if(e<Ln)throw new t("integer: negative integers are not allowed");let n=Xi(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Nn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Fc(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Nn,o=st("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:d,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(d)}},hexFromSig(e){const{_tlv:t,_int:n}=Nn,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}},Ln=BigInt(0),Po=BigInt(1),lv=BigInt(2),Qi=BigInt(3),BC=BigInt(4);function So(e,t){const{BYTES:n}=e;let r;if(typeof t=="bigint")r=t;else{let o=st("private key",t);try{r=e.fromBytes(o)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function FC(e,t={}){const n=Wb("weierstrass",e,t),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i,n:a}=s;Ti(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!r.is0(s.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const d=uv(r,o);function u(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function f(C,N,P){const{x:j,y:O}=N.toAffine(),M=r.toBytes(j);if(Hr(P,"isCompressed"),P){u();const F=!r.isOdd(O);return vn(dv(F),M)}else return vn(Uint8Array.of(4),M,r.toBytes(O))}function h(C){dn(C,void 0,"Point");const{publicKey:N,publicKeyUncompressed:P}=d,j=C.length,O=C[0],M=C.subarray(1);if(j===N&&(O===2||O===3)){const F=r.fromBytes(M);if(!r.isValid(F))throw new Error("bad point: is not on curve, wrong x");const B=m(F);let U;try{U=r.sqrt(B)}catch(ee){const ie=ee instanceof Error?": "+ee.message:"";throw new Error("bad point: is not on curve, sqrt error"+ie)}u();const q=r.isOdd(U);return(O&1)===1!==q&&(U=r.neg(U)),{x:F,y:U}}else if(j===P&&O===4){const F=r.BYTES,B=r.fromBytes(M.subarray(0,F)),U=r.fromBytes(M.subarray(F,F*2));if(!b(B,U))throw new Error("bad point: is not on curve");return{x:B,y:U}}else throw new Error(`bad point: got length ${j}, expected compressed=${N} or uncompressed=${P}`)}const p=t.toBytes||f,g=t.fromBytes||h;function m(C){const N=r.sqr(C),P=r.mul(N,C);return r.add(r.add(P,r.mul(C,s.a)),s.b)}function b(C,N){const P=r.sqr(N),j=m(C);return r.eql(P,j)}if(!b(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const y=r.mul(r.pow(s.a,Qi),BC),k=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(y,k)))throw new Error("bad curve params: a or b");function x(C,N,P=!1){if(!r.isValid(N)||P&&r.is0(N))throw new Error(`bad point coordinate ${C}`);return N}function T(C){if(!(C instanceof S))throw new Error("ProjectivePoint expected")}function _(C){if(!c||!c.basises)throw new Error("no endo");return OC(C,c.basises,o.ORDER)}const A=Ka((C,N)=>{const{X:P,Y:j,Z:O}=C;if(r.eql(O,r.ONE))return{x:P,y:j};const M=C.is0();N==null&&(N=M?r.ONE:r.inv(O));const F=r.mul(P,N),B=r.mul(j,N),U=r.mul(O,N);if(M)return{x:r.ZERO,y:r.ZERO};if(!r.eql(U,r.ONE))throw new Error("invZ was invalid");return{x:F,y:B}}),E=Ka(C=>{if(C.is0()){if(t.allowInfinityPoint&&!r.is0(C.Y))return;throw new Error("bad point: ZERO")}const{x:N,y:P}=C.toAffine();if(!r.isValid(N)||!r.isValid(P))throw new Error("bad point: x or y not field elements");if(!b(N,P))throw new Error("bad point: equation left != right");if(!C.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function v(C,N,P,j,O){return P=new S(r.mul(P.X,C),P.Y,P.Z),N=Ga(j,N),P=Ga(O,P),N.add(P)}class S{constructor(N,P,j){this.X=x("x",N),this.Y=x("y",P,!0),this.Z=x("z",j),Object.freeze(this)}static CURVE(){return s}static fromAffine(N){const{x:P,y:j}=N||{};if(!N||!r.isValid(P)||!r.isValid(j))throw new Error("invalid affine point");if(N instanceof S)throw new Error("projective point not allowed");return r.is0(P)&&r.is0(j)?S.ZERO:new S(P,j,r.ONE)}static fromBytes(N){const P=S.fromAffine(g(dn(N,void 0,"point")));return P.assertValidity(),P}static fromHex(N){return S.fromBytes(st("pointHex",N))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(N=8,P=!0){return R.createCache(this,N),P||this.multiply(Qi),this}assertValidity(){E(this)}hasEvenY(){const{y:N}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(N)}equals(N){T(N);const{X:P,Y:j,Z:O}=this,{X:M,Y:F,Z:B}=N,U=r.eql(r.mul(P,B),r.mul(M,O)),q=r.eql(r.mul(j,B),r.mul(F,O));return U&&q}negate(){return new S(this.X,r.neg(this.Y),this.Z)}double(){const{a:N,b:P}=s,j=r.mul(P,Qi),{X:O,Y:M,Z:F}=this;let B=r.ZERO,U=r.ZERO,q=r.ZERO,z=r.mul(O,O),ee=r.mul(M,M),ie=r.mul(F,F),Z=r.mul(O,M);return Z=r.add(Z,Z),q=r.mul(O,F),q=r.add(q,q),B=r.mul(N,q),U=r.mul(j,ie),U=r.add(B,U),B=r.sub(ee,U),U=r.add(ee,U),U=r.mul(B,U),B=r.mul(Z,B),q=r.mul(j,q),ie=r.mul(N,ie),Z=r.sub(z,ie),Z=r.mul(N,Z),Z=r.add(Z,q),q=r.add(z,z),z=r.add(q,z),z=r.add(z,ie),z=r.mul(z,Z),U=r.add(U,z),ie=r.mul(M,F),ie=r.add(ie,ie),z=r.mul(ie,Z),B=r.sub(B,z),q=r.mul(ie,ee),q=r.add(q,q),q=r.add(q,q),new S(B,U,q)}add(N){T(N);const{X:P,Y:j,Z:O}=this,{X:M,Y:F,Z:B}=N;let U=r.ZERO,q=r.ZERO,z=r.ZERO;const ee=s.a,ie=r.mul(s.b,Qi);let Z=r.mul(P,M),ae=r.mul(j,F),$=r.mul(O,B),Y=r.add(P,j),J=r.add(M,F);Y=r.mul(Y,J),J=r.add(Z,ae),Y=r.sub(Y,J),J=r.add(P,O);let we=r.add(M,B);return J=r.mul(J,we),we=r.add(Z,$),J=r.sub(J,we),we=r.add(j,O),U=r.add(F,B),we=r.mul(we,U),U=r.add(ae,$),we=r.sub(we,U),z=r.mul(ee,J),U=r.mul(ie,$),z=r.add(U,z),U=r.sub(ae,z),z=r.add(ae,z),q=r.mul(U,z),ae=r.add(Z,Z),ae=r.add(ae,Z),$=r.mul(ee,$),J=r.mul(ie,J),ae=r.add(ae,$),$=r.sub(Z,$),$=r.mul(ee,$),J=r.add(J,$),Z=r.mul(ae,J),q=r.add(q,Z),Z=r.mul(we,J),U=r.mul(Y,U),U=r.sub(U,Z),Z=r.mul(Y,ae),z=r.mul(we,z),z=r.add(z,Z),new S(U,q,z)}subtract(N){return this.add(N.negate())}is0(){return this.equals(S.ZERO)}multiply(N){const{endo:P}=t;if(!o.isValidNot0(N))throw new Error("invalid scalar: out of range");let j,O;const M=F=>R.cached(this,F,B=>kr(S,B));if(P){const{k1neg:F,k1:B,k2neg:U,k2:q}=_(N),{p:z,f:ee}=M(B),{p:ie,f:Z}=M(q);O=ee.add(Z),j=v(P.beta,z,ie,F,U)}else{const{p:F,f:B}=M(N);j=F,O=B}return kr(S,[j,O])[0]}multiplyUnsafe(N){const{endo:P}=t,j=this;if(!o.isValid(N))throw new Error("invalid scalar: out of range");if(N===Ln||j.is0())return S.ZERO;if(N===Po)return j;if(R.hasCache(this))return this.multiply(N);if(P){const{k1neg:O,k1:M,k2neg:F,k2:B}=_(N),{p1:U,p2:q}=vI(S,j,M,B);return v(P.beta,U,q,O,F)}else return R.unsafe(j,N)}multiplyAndAddUnsafe(N,P,j){const O=this.multiplyUnsafe(P).add(N.multiplyUnsafe(j));return O.is0()?void 0:O}toAffine(N){return A(this,N)}isTorsionFree(){const{isTorsionFree:N}=t;return i===Po?!0:N?N(S,this):R.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:N}=t;return i===Po?this:N?N(S,this):this.multiplyUnsafe(i)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}toBytes(N=!0){return Hr(N,"isCompressed"),this.assertValidity(),p(S,this,N)}toHex(N=!0){return Pr(this.toBytes(N))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(N=!0){return this.toBytes(N)}_setWindowSize(N){this.precompute(N)}static normalizeZ(N){return kr(S,N)}static msm(N,P){return Gb(S,o,N,P)}static fromPrivateKey(N){return S.BASE.multiply(So(o,N))}}S.BASE=new S(s.Gx,s.Gy,r.ONE),S.ZERO=new S(r.ZERO,r.ONE,r.ZERO),S.Fp=r,S.Fn=o;const I=o.BITS,R=new Kb(S,t.endo?Math.ceil(I/2):I);return S.BASE.precompute(8),S}function dv(e){return Uint8Array.of(e?2:3)}function uv(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function UC(e,t={}){const{Fn:n}=e,r=t.randomBytes||gf,o=Object.assign(uv(e.Fp,n),{seed:$b(n.ORDER)});function s(p){try{return!!So(n,p)}catch{return!1}}function i(p,g){const{publicKey:m,publicKeyUncompressed:b}=o;try{const y=p.length;return g===!0&&y!==m||g===!1&&y!==b?!1:!!e.fromBytes(p)}catch{return!1}}function a(p=r(o.seed)){return yI(dn(p,o.seed,"seed"),n.ORDER)}function c(p,g=!0){return e.BASE.multiply(So(n,p)).toBytes(g)}function d(p){const g=a(p);return{secretKey:g,publicKey:c(g)}}function u(p){if(typeof p=="bigint")return!1;if(p instanceof e)return!0;const{secretKey:g,publicKey:m,publicKeyUncompressed:b}=o;if(n.allowedLengths||g===m)return;const y=st("key",p).length;return y===m||y===b}function f(p,g,m=!0){if(u(p)===!0)throw new Error("first arg must be private key");if(u(g)===!1)throw new Error("second arg must be public key");const b=So(n,p);return e.fromHex(g).multiply(b).toBytes(m)}return Object.freeze({getPublicKey:c,getSharedSecret:f,keygen:d,Point:e,utils:{isValidSecretKey:s,isValidPublicKey:i,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:p=>So(n,p),precompute(p=8,g=e.BASE){return g.precompute(p,!1)}},lengths:o})}function HC(e,t,n={}){Sb(t),Ti(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||gf,o=n.hmac||((P,...j)=>cv(t,P,vn(...j))),{Fp:s,Fn:i}=e,{ORDER:a,BITS:c}=i,{keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p}=UC(e,n),g={prehash:!1,lowS:typeof n.lowS=="boolean"?n.lowS:!1,format:void 0,extraEntropy:!1},m="compact";function b(P){const j=a>>Po;return P>j}function y(P,j){if(!i.isValidNot0(j))throw new Error(`invalid signature ${P}: out of range 1..Point.Fn.ORDER`);return j}function k(P,j){Yd(j);const O=p.signature,M=j==="compact"?O:j==="recovered"?O+1:void 0;return dn(P,M,`${j} signature`)}class x{constructor(j,O,M){this.r=y("r",j),this.s=y("s",O),M!=null&&(this.recovery=M),Object.freeze(this)}static fromBytes(j,O=m){k(j,O);let M;if(O==="der"){const{r:q,s:z}=Nn.toSig(dn(j));return new x(q,z)}O==="recovered"&&(M=j[0],O="compact",j=j.subarray(1));const F=i.BYTES,B=j.subarray(0,F),U=j.subarray(F,F*2);return new x(i.fromBytes(B),i.fromBytes(U),M)}static fromHex(j,O){return this.fromBytes(qa(j),O)}addRecoveryBit(j){return new x(this.r,this.s,j)}recoverPublicKey(j){const O=s.ORDER,{r:M,s:F,recovery:B}=this;if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");if(a*lv<O&&B>1)throw new Error("recovery id is ambiguous for h>1 curve");const q=B===2||B===3?M+a:M;if(!s.isValid(q))throw new Error("recovery id 2 or 3 invalid");const z=s.toBytes(q),ee=e.fromBytes(vn(dv((B&1)===0),z)),ie=i.inv(q),Z=_(st("msgHash",j)),ae=i.create(-Z*ie),$=i.create(F*ie),Y=e.BASE.multiplyUnsafe(ae).add(ee.multiplyUnsafe($));if(Y.is0())throw new Error("point at infinify");return Y.assertValidity(),Y}hasHighS(){return b(this.s)}toBytes(j=m){if(Yd(j),j==="der")return qa(Nn.hexFromSig(this));const O=i.toBytes(this.r),M=i.toBytes(this.s);if(j==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return vn(Uint8Array.of(this.recovery),O,M)}return vn(O,M)}toHex(j){return Pr(this.toBytes(j))}assertValidity(){}static fromCompact(j){return x.fromBytes(st("sig",j),"compact")}static fromDER(j){return x.fromBytes(st("sig",j),"der")}normalizeS(){return this.hasHighS()?new x(this.r,i.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Pr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Pr(this.toBytes("compact"))}}const T=n.bits2int||function(j){if(j.length>8192)throw new Error("input is too large");const O=Fc(j),M=j.length*8-c;return M>0?O>>BigInt(M):O},_=n.bits2int_modN||function(j){return i.create(T(j))},A=Ci(c);function E(P){return qd("num < 2^"+c,P,Ln,A),i.toBytes(P)}function v(P,j){return dn(P,void 0,"message"),j?dn(t(P),void 0,"prehashed message"):P}function S(P,j,O){if(["recovered","canonical"].some(ae=>ae in O))throw new Error("sign() legacy options not supported");const{lowS:M,prehash:F,extraEntropy:B}=Ol(O,g);P=v(P,F);const U=_(P),q=So(i,j),z=[E(q),E(U)];if(B!=null&&B!==!1){const ae=B===!0?r(p.secretKey):B;z.push(st("extraEntropy",ae))}const ee=vn(...z),ie=U;function Z(ae){const $=T(ae);if(!i.isValidNot0($))return;const Y=i.inv($),J=e.BASE.multiply($).toAffine(),we=i.create(J.x);if(we===Ln)return;const ge=i.create(Y*i.create(ie+we*q));if(ge===Ln)return;let le=(J.x===we?0:2)|Number(J.y&Po),ce=ge;return M&&b(ge)&&(ce=i.neg(ge),le^=1),new x(we,ce,le)}return{seed:ee,k2sig:Z}}function I(P,j,O={}){P=st("message",P);const{seed:M,k2sig:F}=S(P,j,O);return aI(t.outputLen,i.BYTES,o)(M,F)}function R(P){let j;const O=typeof P=="string"||Ii(P),M=!O&&P!==null&&typeof P=="object"&&typeof P.r=="bigint"&&typeof P.s=="bigint";if(!O&&!M)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(M)j=new x(P.r,P.s);else if(O){try{j=x.fromBytes(st("sig",P),"der")}catch(F){if(!(F instanceof Nn.Err))throw F}if(!j)try{j=x.fromBytes(st("sig",P),"compact")}catch{return!1}}return j||!1}function C(P,j,O,M={}){const{lowS:F,prehash:B,format:U}=Ol(M,g);if(O=st("publicKey",O),j=v(st("message",j),B),"strict"in M)throw new Error("options.strict was renamed to lowS");const q=U===void 0?R(P):x.fromBytes(st("sig",P),U);if(q===!1)return!1;try{const z=e.fromBytes(O);if(F&&q.hasHighS())return!1;const{r:ee,s:ie}=q,Z=_(j),ae=i.inv(ie),$=i.create(Z*ae),Y=i.create(ee*ae),J=e.BASE.multiplyUnsafe($).add(z.multiplyUnsafe(Y));return J.is0()?!1:i.create(J.x)===ee}catch{return!1}}function N(P,j,O={}){const{prehash:M}=Ol(O,g);return j=v(j,M),x.fromBytes(P,"recovered").recoverPublicKey(j).toBytes()}return Object.freeze({keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p,Point:e,sign:I,verify:C,recoverPublicKey:N,Signature:x,hash:t})}function $C(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(i=>Math.ceil(i/2)))):void 0;const o=Yr(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),s={Fp:n,Fn:o,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:s}}function zC(e){const{CURVE:t,curveOpts:n}=$C(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function qC(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,Ub(n.Fn.ORDER,n.Fn.BITS))})}function KC(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:o}=zC(e),s=FC(t,n),i=HC(s,r,o);return qC(e,i)}function GC(e,t){const n=r=>KC({...e,hash:r});return{...n(t),create:n}}const Tf={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},WC={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Np=BigInt(2);function VC(e){const t=Tf.p,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),d=e*e*e%t,u=d*d*e%t,f=ot(u,n,t)*u%t,h=ot(f,n,t)*u%t,p=ot(h,Np,t)*d%t,g=ot(p,o,t)*p%t,m=ot(g,s,t)*g%t,b=ot(m,a,t)*m%t,y=ot(b,c,t)*b%t,k=ot(y,a,t)*m%t,x=ot(k,n,t)*u%t,T=ot(x,i,t)*g%t,_=ot(T,r,t)*d%t,A=ot(_,Np,t);if(!Xd.eql(Xd.sqr(A),e))throw new Error("Cannot find square root");return A}const Xd=Yr(Tf.p,{sqrt:VC}),hr=GC({...Tf,Fp:Xd,lowS:!0,endo:WC},Ab);function YC(e,t,n){const r=hf.digest(t instanceof Uint8Array?t:t.subarray());if(Uc(r))return r.then(({digest:o})=>(n?.signal?.throwIfAborted(),hr.sign(o,e).toDERRawBytes())).catch(o=>{throw o.name==="AbortError"?o:new Cp(String(o))});try{return hr.sign(r.digest,e).toDERRawBytes()}catch(o){throw new Cp(String(o))}}function XC(e,t,n,r){const o=hf.digest(n instanceof Uint8Array?n:n.subarray());if(Uc(o))return o.then(({digest:s})=>(r?.signal?.throwIfAborted(),hr.verify(t,s,e))).catch(s=>{throw s.name==="AbortError"?s:new Tp(String(s))});try{return r?.signal?.throwIfAborted(),hr.verify(t,o.digest,e)}catch(s){throw new Tp(String(s))}}class fv{type="secp256k1";raw;_key;constructor(t){this._key=tT(t),this.raw=QC(this._key)}toMultihash(){return Ei.digest(qc(this))}toCID(){return tt.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}verify(t,n,r){return XC(this._key,n,t,r)}}class JC{type="secp256k1";raw;publicKey;constructor(t,n){this.raw=eT(t),this.publicKey=new fv(n??nT(t))}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:hn(this.raw,t.raw)}sign(t,n){return YC(this.raw,t,n)}}function ZC(e){return new JC(e)}function hv(e){return new fv(e)}function QC(e){return hr.ProjectivePoint.fromHex(e).toRawBytes(!0)}function eT(e){try{return hr.getPublicKey(e,!0),e}catch(t){throw new ib(String(t))}}function tT(e){try{return hr.ProjectivePoint.fromHex(e),e}catch(t){throw new sb(String(t))}}function nT(e){try{return hr.getPublicKey(e,!0)}catch(t){throw new ib(String(t))}}async function rT(e,t){return GI()}function Jd(e,t){const{Type:n,Data:r}=$r.decode(e),o=r??new Uint8Array;switch(n){case nt.RSA:return RC(o,t);case nt.Ed25519:return Jb(o);case nt.secp256k1:return hv(o);case nt.ECDSA:return vb(o);default:throw new Dc}}function oT(e){const{Type:t,Data:n}=$r.decode(e.digest),r=n??new Uint8Array;switch(t){case nt.Ed25519:return Jb(r);case nt.secp256k1:return hv(r);case nt.ECDSA:return vb(r);default:throw new Dc}}function qc(e){return $r.encode({Type:nt[e.type],Data:e.raw})}function sT(e){const t=Xa.decode(e),n=t.Data??new Uint8Array;switch(t.Type){case nt.RSA:return TC(n);case nt.Ed25519:return KI(n);case nt.secp256k1:return ZC(n);case nt.ECDSA:return Dk(n);default:throw new Dc}}function iT(e){return Xa.encode({Type:nt[e.type],Data:e.raw})}const pv=Symbol.for("nodejs.util.inspect.custom"),aT=114;class Af{type;multihash;publicKey;string;constructor(t){this.type=t.type,this.multihash=t.multihash,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return`PeerId(${this.toString()})`}[ab]=!0;toString(){return this.string==null&&(this.string=Dt.encode(this.multihash.bytes).slice(1)),this.string}toMultihash(){return this.multihash}toCID(){return tt.createV1(aT,this.multihash)}toJSON(){return this.toString()}equals(t){if(t==null)return!1;if(t instanceof Uint8Array)return hn(this.multihash.bytes,t);if(typeof t=="string")return this.toString()===t;if(t?.toMultihash()?.bytes!=null)return hn(this.multihash.bytes,t.toMultihash().bytes);throw new Error("not valid Id")}[pv](){return`PeerId(${this.toString()})`}}class mv extends Af{type="RSA";publicKey;constructor(t){super({...t,type:"RSA"}),this.publicKey=t.publicKey}}class gv extends Af{type="Ed25519";publicKey;constructor(t){super({...t,type:"Ed25519"}),this.publicKey=t.publicKey}}class yv extends Af{type="secp256k1";publicKey;constructor(t){super({...t,type:"secp256k1"}),this.publicKey=t.publicKey}}const cT=2336;class wv{type="url";multihash;publicKey;url;constructor(t){this.url=t.toString(),this.multihash=Ei.digest(ut(this.url))}[pv](){return`PeerId(${this.url})`}[ab]=!0;toString(){return this.toCID().toString()}toMultihash(){return this.multihash}toCID(){return tt.createV1(cT,this.toMultihash())}toJSON(){return this.toString()}equals(t){return t==null?!1:(t instanceof Uint8Array&&(t=Le(t)),t.toString()===this.toString())}}const lT=114,_p=2336;function dT(e,t){let n;if(e.charAt(0)==="1"||e.charAt(0)==="Q")n=db(Dt.decode(`z${e}`));else{if(e.startsWith("k51qzi5uqu5")||e.startsWith("kzwfwjn5ji4")||e.startsWith("k2k4r8")||e.startsWith("bafz"))return uT(tt.parse(e));throw new fn('Please pass a multibase decoder for strings that do not start with "1" or "Q"')}return bv(n)}function qo(e){if(e.type==="Ed25519")return new gv({multihash:e.toCID().multihash,publicKey:e});if(e.type==="secp256k1")return new yv({multihash:e.toCID().multihash,publicKey:e});if(e.type==="RSA")return new mv({multihash:e.toCID().multihash,publicKey:e});throw new Dc}function bv(e){if(hT(e))return new mv({multihash:e});if(fT(e))try{const t=oT(e);if(t.type==="Ed25519")return new gv({multihash:e,publicKey:t});if(t.type==="secp256k1")return new yv({multihash:e,publicKey:t})}catch{const n=Le(e.digest);return new wv(new URL(n))}throw new WE("Supplied PeerID Multihash is invalid")}function uT(e){if(e?.multihash==null||e.version==null||e.version===1&&e.code!==lT&&e.code!==_p)throw new GE("Supplied PeerID CID is invalid");if(e.code===_p){const t=Le(e.multihash.digest);return new wv(new URL(t))}return bv(e.multihash)}function fT(e){return e.code===Ei.code}function hT(e){return e.code===hf.code}class vv extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}}class pT extends Error{static name="StreamResetError";constructor(t="The stream has been reset"){super(t),this.name="StreamResetError"}}class ys extends Error{static name="StreamStateError";constructor(t="The stream is in an invalid state"){super(t),this.name="StreamStateError"}}class Lp extends Error{static name="StreamBufferError";constructor(t="The stream buffer was full"){super(t),this.name="StreamBufferError"}}class mT extends Event{data;constructor(t,n){super("message",n),this.data=t}}class Rf extends Event{error;local;constructor(t,n,r){super("close",r),this.error=n,this.local=t}}class gT extends Rf{constructor(t,n){super(!0,t,n)}}class yT extends Rf{constructor(t,n){super(!1,t,n)}}const wT=e=>e/2**32|0,bT=e=>e>>>0;function vT(e,t,n,r){const o=wT(n),s=bT(n);e.setUint32(t,r?s:o,r),e.setUint32(t+4,r?o:s,r)}function Zd(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Qd=e=>e?`"${e}" `:"";function Kn(e,t=""){if(typeof e!="number")throw new TypeError(Qd(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Qd(t)+"expected integer >= 0, got "+e);return e}function Gn(e,t,n=""){if(Zd(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Kn(t,"length");const r=Zd(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=Qd(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}function Pf(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Kn(e.outputLen),Kn(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const xT=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},jp=(e,t)=>{xT(e,t);const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function Ja(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function xv(e,t){Gn(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function NB(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function _r(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ml(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function wn(e,t){return e<<32-t|e>>>t}function _B(e,t){return e<<t|e>>>32-t>>>0}const ST=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ET(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function kT(e){for(let t=0;t<e.length;t++)e[t]=ET(e[t]);return e}const LB=ST?e=>e:kT,Sv=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",IT=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Kc(e){if(Gn(e),Sv)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=IT[e[n]];return t}function Dp(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Ev(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(Sv)try{return Uint8Array.fromHex(e)}catch(o){throw o instanceof SyntaxError?new RangeError(o.message):o}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=Dp(e.charCodeAt(s)),a=Dp(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function CT(e){const t=globalThis;if(typeof t.scheduler?.yield=="function"){const n=t.scheduler.yield();return e&&n.catch(e),n}return new Promise(n=>t.setTimeout(n,0))}async function jB(e,t,n,r){if(Kn(e,"iters"),Kn(t,"tick"),typeof n!="function")throw new TypeError("callback must be a function");let o=Date.now();for(let s=0;s<e;s++){n(s);const i=Date.now()-o;i>=0&&i<t||(await CT(r),o=Date.now())}}function TT(e){if(typeof e!="string")throw new TypeError("string expected");const t=new TextEncoder().encode(e);try{return new Uint8Array(t)}finally{_r(t)}}function DB(e,t=""){return typeof e=="string"?TT(e):Gn(e,void 0,t)}function AT(e,t,n="opts"){return jp(e,"defaults"),t!==void 0&&jp(t,n),Object.assign(Object.create(null),e,t)}function RT(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=AT({},t,"info");const n=(o,s)=>e(s).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}function PT(e=32){Kn(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const NT=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function _T(e,t,n){return e&t^~e&n}function LT(e,t,n){return e&t^e&n^t&n}class jT{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,o){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Ml(this.buffer)}update(t){Ja(this),Gn(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;let i=!1;for(let a=0;a<s;){const c=Math.min(o-this.pos,s-a);if(c===o){const d=Ml(t);for(;o<=s-a;a+=o)this.process(d,a);i=!0;continue}r.set(a===0&&c===s?t:t.subarray(a,a+c),this.pos),this.pos+=c,a+=c,this.pos===o&&(this.process(n,0),this.pos=0,i=!0)}return this.length+=t.length,i&&this.roundClean(),this}digestInto(t){Ja(this),xv(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,n.fill(0,i),this.padOffset>o-i&&(this.process(r,0),n.fill(0)),vT(r,o-8,this.length*8,s),this.process(r,0),this.roundClean();const a=t===n?r:Ml(t),c=this.outputLen,d=c/4,u=this.get();if(c%4||d>u.length)throw new Error("invalid outputLen");for(let f=0;f<d;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneIntoMeta(t){const{buffer:n,length:r,finished:o,destroyed:s,pos:i}=this;return t.destroyed=s,t.finished=o,t.length=r,t.pos=i,i&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const DT=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),OT=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),nr=new Uint32Array(64);class MT extends jT{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(t,n){super(64,t,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}_cloneInto(t){return(t||=new this.constructor).set(...this.get()),this._cloneIntoMeta(t)}process(t,n){for(let f=0;f<16;f++,n+=4)nr[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=nr[f-15],p=nr[f-2],g=wn(h,7)^wn(h,18)^h>>>3,m=wn(p,17)^wn(p,19)^p>>>10;nr[f]=m+nr[f-7]+g+nr[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:d,H:u}=this;for(let f=0;f<64;f++){const h=wn(a,6)^wn(a,11)^wn(a,25),p=u+h+_T(a,c,d)+OT[f]+nr[f]|0,m=(wn(r,2)^wn(r,13)^wn(r,22))+LT(r,o,s)|0;u=d,d=c,c=a,a=i+p|0,i=s,s=o,o=r,r=p+m|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,d,u)}roundClean(){_r(nr)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),_r(this.buffer)}}class BT extends MT{constructor(){super(32,DT)}}const xa=RT(()=>new BT,NT(1));function kv(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}const No=(e,t,n)=>Gn(e,t,n),Iv=Kn;function _o(e,t="object"){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`);return e}function Ks(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const FT=Kc,UT=e=>Ev(e),Cv=Zd,Tv=e=>PT(e),Za=BigInt(0),Op=BigInt(1),HT=e=>e?`"${e}" `:"";function Gc(e,t=""){if(typeof e!="boolean")throw new TypeError(HT(t)+"expected boolean, got type="+typeof e);return e}function $T(e){if(typeof e=="bigint"){if(!Lr(e))throw new RangeError("positive bigint expected, got "+e)}else Iv(e);return e}function eu(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(n+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){const n=t&&`"${t}" `;throw new RangeError(n+"expected safe integer, got "+e)}}function Av(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Za:BigInt("0x"+e)}function Rv(e){return Av(Kc(e))}function Qa(e){return Av(Kc(ii(Gn(e)).reverse()))}function Pv(e,t){if(Kn(t),t===0)throw new Error("zero output length is invalid");e=$T(e);const n=t*2,r=e.toString(16);if(r.length>n)throw new RangeError("number is too large");return Ev(r.padStart(n,"0"))}function Nv(e,t){return Pv(e,t).reverse()}function ii(e){return Uint8Array.from(No(e))}function Lr(e){return typeof e=="bigint"&&Za<=e}function _v(e,t,n){return Lr(e)&&Lr(t)&&Lr(n)&&t<=e&&e<n}function Gs(e,t,n,r){if(!_v(t,n,r))throw new RangeError("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function zT(e){if(e<Za)throw new Error("expected non-negative bigint, got "+e);return e===Za?0:e.toString(2).length}const qT=e=>(eu(e,"n"),(Op<<BigInt(e))-Op);function ec(e,t={},n={},r="object"){_o(e,r),_o(t,"fields"),_o(n,"optFields");function o(i,a,c){const d=r==="object"?`param "${String(i)}"`:`"${r}.${String(i)}"`,u=e[i];if(!Object.hasOwn(e,i)&&(c?u!==void 0:a!=="function"))throw new TypeError(`${d} is invalid: expected own property`);if(c&&u===void 0)return;const f=typeof u;if(f!==a||u===null)throw new TypeError(`${d} is invalid: expected ${a}, got ${f}`)}const s=(i,a)=>Object.entries(i).forEach(([c,d])=>o(c,d,a));s(t,!1),s(n,!0)}const bt=BigInt(0),Ze=BigInt(1),Ir=BigInt(2),Lv=BigInt(3),Nf=BigInt(4),jv=BigInt(5),KT=BigInt(7),Dv=BigInt(8),GT=BigInt(9),WT=BigInt(15),Ov=BigInt(16),VT=BigInt("0x10000000000000000");function Je(e,t){if(t<=bt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=bt?n:t+n}function YT(e,t,n){if(n<=Ze)throw new Error("pow: expected modulus > 1, got "+n);if(typeof t!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof t);if(t<bt)throw new Error("invalid exponent, negatives unsupported");if(t===bt)return Ze;if(t===Ze)return e;let r=e%n;if(r<bt&&(r+=n),t<VT){let a=Ze;for(;t>bt;)t&Ze&&(a=a*r%n),r=r*r%n,t>>=Ze;return a}const o=[];for(;t>bt;)o.push(Number(t&WT)),t>>=Nf;const s=new Array(16);s[0]=Ze,s[1]=r;for(let a=2;a<16;a++)s[a]=s[a-1]*r%n;let i=s[o[o.length-1]];for(let a=o.length-2;a>=0;a--){i=i*i%n,i=i*i%n,i=i*i%n,i=i*i%n;const c=o[a];c!==0&&(i=i*s[c]%n)}return i}function cn(e,t,n){if(n<=Ze)throw new Error("pow2: expected modulus > 1, got "+n);if(t<bt)throw new Error("pow2: expected non-negative exponent, got "+t);let r=e;for(;t-- >bt;)r*=r,r%=n;return r}function Mp(e,t){if(e===bt)throw new Error("invert: expected non-zero number");if(t<=Ze)throw new Error("invert: expected modulus > 1, got "+t);let n=Je(e,t),r=t,o=bt,s=Ze;for(;n!==bt;){const a=r/n,c=r-n*a,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==Ze)throw new Error("invert: does not exist");return Je(o,t)}function _f(e,t,n){const r=e;if(!r.eql(r.sqr(t),n))throw new Error("Cannot find square root")}function Lf(e,t){if((e&Ze)===bt)throw new Error(t+": expected odd modulus, got "+e)}function Mv(e,t){const n=e,r=(n.ORDER+Ze)/Nf,o=n.pow(t,r);return _f(n,o,t),o}function XT(e,t){const n=e,r=(n.ORDER-jv)/Dv,o=n.mul(t,Ir),s=n.pow(o,r),i=n.mul(t,s),a=n.mul(n.mul(i,Ir),s),c=n.mul(i,n.sub(a,n.ONE));return _f(n,c,t),c}function JT(e){const t=jf(e),n=Bv(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+KT)/Ov;return((a,c)=>{const d=a;let u=d.pow(c,i),f=d.mul(u,r);const h=d.mul(u,o),p=d.mul(u,s),g=d.eql(d.sqr(f),c),m=d.eql(d.sqr(h),c);u=d.cmov(u,f,g),f=d.cmov(p,h,m);const b=d.eql(d.sqr(f),c),y=d.cmov(u,f,b);return _f(d,y,c),y})}function Bv(e){if(e<Lv)throw new Error("sqrt is not defined for small field");Lf(e,"tonelliShanks");let t=e-Ze,n=0;for(;t%Ir===bt;)t/=Ir,n++;let r=Ir;const o=jf(e);for(;tc(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Mv;let s=o.pow(r,t);const i=(t+Ze)/Ir;return function(c,d){const u=c;if(u.is0(d))return d;if(tc(u,d)!==1)throw new Error("Cannot find square root");let f=n,h=u.mul(u.ONE,s),p=u.pow(d,t),g=u.pow(d,i);for(;!u.eql(p,u.ONE);){if(u.is0(p))throw new Error("Cannot find square root: probably non-prime P");let m=1,b=u.sqr(p);for(;!u.eql(b,u.ONE);)if(m++,b=u.sqr(b),m===f)throw new Error("Cannot find square root");const y=Ze<<BigInt(f-m-1),k=u.pow(h,y);f=m,h=u.sqr(k),p=u.mul(p,h),g=u.mul(g,k)}return g}}function ZT(e){return Lf(e,"Fp.sqrt"),e%Nf===Lv?Mv:e%Dv===jv?XT:e%Ov===GT?JT(e):Bv(e)}const QT=(e,t)=>(Je(e,t)&Ze)===Ze,eA=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ai(e){if(_o(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);eu(e.BYTES,"BYTES"),eu(e.BITS,"BITS");for(const t of eA)Ks(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=Ze)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function Fv(e,t,n=!1){ai(e),kv(t,"nums"),Gc(n,"passZero");const r=e,o=new Array(t.length).fill(n?r.ZERO:void 0),s=t.reduce((a,c,d)=>r.is0(c)?a:(o[d]=a,r.mul(a,c)),r.ONE),i=r.inv(s);return t.reduceRight((a,c,d)=>r.is0(c)?a:(o[d]=r.mul(a,o[d]),r.mul(a,c)),i),o}function tc(e,t){ai(e);const n=e;Lf(n.ORDER,"FpLegendre");const r=(n.ORDER-Ze)/Ir,o=n.pow(t,r),s=n.eql(o,n.ONE),i=n.eql(o,n.ZERO),a=n.eql(o,n.neg(n.ONE));if(!s&&!i&&!a)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function tA(e,t){if(t!==void 0&&Iv(t),e<=bt)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);const n=zT(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const r=t!==void 0?t:n,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}const Bp=new WeakMap;class Fp{ORDER;BITS;BYTES;isLE;ZERO=bt;ONE=Ze;_lengths;_mod;constructor(t,n={}){if(t<=Ze)throw new Error("invalid field: expected ORDER > 1, got "+t);let r;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(r=n.BITS),typeof n.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:n.sqrt,enumerable:!0}),typeof n.isLE=="boolean"&&(this.isLE=n.isLE),n.allowedLengths&&(this._lengths=Object.freeze(n.allowedLengths.slice())),typeof n.modFromBytes=="boolean"&&(this._mod=n.modFromBytes));const{nBitLength:o,nByteLength:s}=tA(t,r);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=o,this.BYTES=s,Object.freeze(this)}create(t){return Je(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return bt<=t&&t<this.ORDER}is0(t){return t===bt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&Ze)===Ze}neg(t){return Je(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return Je(t*t,this.ORDER)}add(t,n){return Je(t+n,this.ORDER)}sub(t,n){return Je(t-n,this.ORDER)}mul(t,n){return Je(t*n,this.ORDER)}pow(t,n){return YT(t,n,this.ORDER)}div(t,n){return Je(t*Mp(n,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,n){return t+n}subN(t,n){return t-n}mulN(t,n){return t*n}inv(t){return Mp(t,this.ORDER)}sqrt(t){let n=Bp.get(this);return n||Bp.set(this,n=ZT(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?Nv(t,this.BYTES):Pv(t,this.BYTES)}fromBytes(t,n=!1){No(t);const{_lengths:r,BYTES:o,isLE:s,ORDER:i,_mod:a}=this;if(r){if(t.length<1||!r.includes(t.length)||t.length>o)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);const d=new Uint8Array(o);d.set(t,s?0:d.length-t.length),t=d}if(t.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+t.length);let c=s?Qa(t):Rv(t);if(a&&(c=Je(c,i)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return Fv(this,t,!0)}cmov(t,n,r){return Gc(r,"condition"),r?n:t}}function jf(e,t={}){return Object.freeze(Fp.prototype),new Fp(e,t)}const Df=BigInt(0),ci=BigInt(1),nA=BigInt(4),Bl=16,Up=128,rA=5,Hp=2**31;function Of(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Ks(t.fromAffine,"Point.fromAffine"),Ks(t.fromBytes,"Point.fromBytes"),Ks(t.fromHex,"Point.fromHex"),_o(t.BASE,"Point.BASE"),_o(t.ZERO,"Point.ZERO"),ai(t.Fp),ai(t.Fn)}function oA(e,t){Of(e),Uv(t,e);const n=Fv(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function sA(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw new Error("invalid window size, expected ["+n+".."+t+"], got W="+e)}function iA(e,t){const n=e*(4*t+128);if(n>Hp)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+Hp/2**20+" MiB")}function aA(e,t){if(e!==void 0){Ks(e,"randomBytes");try{const n=e(t);if(!Cv(n)||n.length!==t)return}catch{return}return e}}function Uv(e,t){kv(e,"points"),e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function cA(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!(n===void 0?t.isValid(r):Lr(r)&&r<n))throw new Error("invalid scalar at index "+o)})}const Hv=new WeakMap;function Fl(e){return Hv.get(e)||1}function lA(e,t){const n=e.double(),r=[e];for(let o=1;o<t;o++)r.push(r[o-1].add(n));return r}function dA(e,t){const n=2**t,r=n/2,o=BigInt(n-1),s=[];for(;e>Df;){let i=0;e&ci&&(i=Number(e&o),i>=r&&(i-=n),e-=BigInt(i)),s.push(i),e>>=ci}return s}function uA(e,t,n){const r=2**t,o=r/2,s=BigInt(r-1),i=BigInt(t),a=[];for(let c=0;c<n;c++){let d=Number(e&s);e>>=i,d>o&&(d-=r,e+=ci),a.push(d)}if(e!==Df)throw new Error("invalid wnaf");return a}function fA(e,t,n){let r=0;for(const s of n)r=Math.max(r,s.length);let o=e;for(let s=r-1;s>=0;s--){s!==r-1&&(o=o.double());for(let i=0;i<n.length;i++){const a=n[i][s];if(a){const c=t[i][Math.abs(a)-1>>1];o=o.add(a<0?c.negate():c)}}}return o}class hA{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(t,n){Of(t),this.randomBytes=aA(n,Bl),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,r){const o=Math.ceil(r/n)+1,s=2**(n-1),i=[];let a=t;for(let c=0;c<o;c++){let d=a;for(let u=0;u<s;u++)i.push(d),d=d.add(a);a=i[i.length-1].double()}return{W:n,bits:r,windows:o,comp:i}}wnafCachedCT(t,n){const{W:r,windows:o,comp:s}=t,i=2**(r-1),a=uA(n,r,o);let c=this.ZERO,d=this.BASE;for(let u=0;u<o;u++){const f=a[u],h=u*i,p=Math.abs(f)-1;let g=s[h];for(let b=1;b<i;b++)g=b===p?s[h+b]:g;const m=g.negate();f===0?d=d.add(s[h]):c=c.add(f<0?m:g)}return{p:c,f:d}}getWnafPrecomputes(t,n,r,o){let s=this.wnafPrecomputes.get(n),i=s?.find(a=>a.W===t&&a.bits===r);return i||(i=this.buildWnafTable(n,t,r),typeof o=="function"&&(i={...i,comp:o(i.comp)}),s||(s=[],this.wnafPrecomputes.set(n,s)),s.push(i)),i}assertPoint(t){if(!(t instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof t)}validateMulInput(t,n){if(this.assertPoint(t),!_v(n,ci,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,r,o){const s=Fl(t);return s===1?this.fixedWindowCT(t,n,r):this.wnafCachedCT(this.getWnafPrecomputes(s,t,r,o),n)}mulCT(t,n,r){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,r)}mulCTBlinded(t,n,r){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const o=this.Point.Fn.BITS+Up,s=this.randomBytes(Bl);if(!Cv(s)||s.length!==Bl)throw new Error("randomBytes returned invalid byte array");s[0]=s[0]&63|128;const i=n+Rv(s)*this.Point.Fn.ORDER;return this.runCT(t,i,o,r)}fixedWindowCT(t,n,r){const o=rA,s=1<<o,i=qT(o),a=new Array(s);a[0]=this.ZERO;for(let u=1;u<s;u++)a[u]=a[u-1].add(t);const c=Math.ceil(r/o);let d=this.ZERO;for(let u=c-1;u>=0;u--){if(u!==c-1)for(let p=0;p<o;p++)d=d.double();const f=Number(n>>BigInt(u*o)&i);let h=a[0];for(let p=1;p<s;p++)h=p===f?a[p]:h;d=d.add(h)}return{p:d,f:d}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===ci?!0:t!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(t,n,r,o){return this.shouldBlind(t,r)?this.mulCTBlinded(t,n,o):this.mulCT(t,n,o)}mulUnsafe(t,n,r){if(this.assertPoint(t),!Lr(n))throw new Error("invalid scalar");const o=Fl(t);if(o===1||n>=this.Point.Fn.ORDER)return pA(this.Point,[t],[n],!0);const s=this.getWnafPrecomputes(o,t,this.bits,r);return this.wnafCachedCT(s,n).p}setWindowSize(t,n){this.assertPoint(t),sA(n,this.bits);const r=Math.ceil((this.bits+Up)/n)+1;iA(r*2**(n-1),this.Point.Fp.BYTES),Hv.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return Fl(t)!==1}}function pA(e,t,n,r=!1){if(Of(e),Uv(t,e),Gc(r,"allowOversized"),cA(n,e.Fn,r?e.Fn.ORDER**nA:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const o=t.map(i=>lA(i,4)),s=n.map(i=>dA(i,4));return fA(e.ZERO,o,s)}function $p(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return ai(t),t}else return jf(e,{isLE:n})}function mA(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);ec(n);for(const c of["p","n","h"]){const d=t[c];if(!(Lr(d)&&d!==Df))throw new Error(`CURVE.${c} must be positive bigint`)}const o=$p(t.p,n.Fp,r),s=$p(t.n,n.Fn,r),a=["Gx","Gy","a","d"];for(const c of a)if(!o.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:o,Fn:s}}function gA(e,t){return function(r){const o=e(r);return{secretKey:o,publicKey:t(o)}}}const ea=BigInt(0),ta=BigInt(1),na=BigInt(2),yA=BigInt(4),zp=BigInt(8);function wA(e,t,n,r){const o=e.sqr(n),s=e.sqr(r),i=e.add(e.mul(t.a,o),s),a=e.add(e.ONE,e.mul(t.d,e.mul(o,s)));return e.eql(i,a)}function bA(e,t={}){ec(t,{},{},"extraOpts");const n=t,r=mA("edwards",e,n,n.FpFnLE),{Fp:o,Fn:s}=r;let i=r.CURVE;const{h:a}=i;if(tc(o,i.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(tc(o,i.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");ec(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?Tv:n.randomBytes,d=na<<BigInt(o.BYTES*8)-ta;function u(k){if(!o.isOdd)throw new Error("Field does not have .isOdd()");return o.isOdd(k)}const f=n.uvRatio===void 0?(k,x)=>{try{return{isValid:!0,value:o.sqrt(o.div(k,x))}}catch{return{isValid:!1,value:ea}}}:n.uvRatio;if(!wA(o,i,i.Gx,i.Gy))throw new Error("bad curve params: generator point");const h=o.eql(i.a,o.neg(o.ONE))?k=>o.neg(k):o.eql(i.a,o.ONE)?k=>k:k=>o.mul(i.a,k);function p(k,x,T=!1){const _=T?ta:ea;return Gs("coordinate "+k,x,_,d),x}function g(k){if(!(k instanceof m))throw new Error("EdwardsPoint expected")}class m{static BASE=new m(i.Gx,i.Gy,o.ONE,o.mul(i.Gx,i.Gy));static ZERO=new m(o.ZERO,o.ONE,o.ONE,o.ZERO);static Fp=o;static Fn=s;X;Y;Z;T;constructor(x,T,_,A){this.X=p("x",x),this.Y=p("y",T),this.Z=p("z",_,!0),this.T=p("t",A),Object.freeze(this)}static CURVE(){return i}static fromAffine(x){if(x instanceof m)throw new Error("extended point not allowed");const{x:T,y:_}=x||{};return p("x",T),p("y",_),new m(T,_,o.ONE,o.mul(T,_))}static fromBytes(x,T=!1){const _=o.BYTES,{a:A,d:E}=i;x=ii(No(x,_,"point")),Gc(T,"zip215");const v=ii(x),S=x[_-1];v[_-1]=S&-129;const I=Qa(v),R=T?d:o.ORDER;Gs("point.y",I,ea,R);const C=o.sqr(I),N=o.sub(C,o.ONE),P=o.sub(o.mulN(E,C),A);let{isValid:j,value:O}=f(N,P);if(!j)throw new Error("bad point: invalid y coordinate");const M=u(O),F=(S&128)!==0;if(!T&&o.is0(O)&&F)throw new Error("bad point: x=0 and x_0=1");return F!==M&&(O=o.neg(O)),m.fromAffine({x:O,y:I})}static fromHex(x,T=!1){return m.fromBytes(UT(x),T)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(x=6,T=!0){return y.setWindowSize(this,x),T||this.multiply(na),this}assertValidity(){const x=this,{a:T,d:_}=i;if(x.is0())throw new Error("bad point: ZERO");const{X:A,Y:E,Z:v,T:S}=x,I=o.sqr(A),R=o.sqr(E),C=o.sqr(v),N=o.sqr(C),P=o.mul(I,T),j=o.mul(o.add(P,R),C),O=o.add(N,o.mul(_,o.mul(I,R)));if(!o.eql(j,O))throw new Error("bad point: equation left != right (1)");const M=o.mul(A,E),F=o.mul(v,S);if(!o.eql(M,F))throw new Error("bad point: equation left != right (2)")}equals(x){g(x);const{X:T,Y:_,Z:A}=this,{X:E,Y:v,Z:S}=x,I=o.mul(T,S),R=o.mul(E,A),C=o.mul(_,S),N=o.mul(v,A);return o.eql(I,R)&&o.eql(C,N)}is0(){return this.equals(m.ZERO)}negate(){return new m(o.neg(this.X),this.Y,this.Z,o.neg(this.T))}double(){const{X:x,Y:T,Z:_}=this,A=o.sqr(x),E=o.sqr(T),v=o.mul(o.sqr(_),na),S=h(A),I=o.addN(x,T),R=o.sub(o.subN(o.sqr(I),A),E),C=o.addN(S,E),N=o.subN(C,v),P=o.subN(S,E),j=o.mul(R,N),O=o.mul(C,P),M=o.mul(R,P),F=o.mul(N,C);return new m(j,O,F,M)}add(x){g(x);const{d:T}=i,{X:_,Y:A,Z:E,T:v}=this,{X:S,Y:I,Z:R,T:C}=x,N=o.mul(_,S),P=o.mul(A,I),j=o.mul(o.mulN(v,T),C),O=o.mul(E,R),M=o.sub(o.subN(o.mulN(o.addN(_,A),o.addN(S,I)),N),P),F=o.subN(O,j),B=o.addN(O,j),U=o.sub(P,h(N)),q=o.mul(M,F),z=o.mul(B,U),ee=o.mul(M,U),ie=o.mul(F,B);return new m(q,z,ie,ee)}subtract(x){return g(x),this.add(x.negate())}multiply(x){if(!s.isValidNot0(x))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:T,f:_}=y.mulSecret(this,x,a,b);return b([T,_])[0]}multiplyUnsafe(x){if(!s.isValid(x))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return x===ea?m.ZERO:this.is0()||x===ta?this:y.mulUnsafe(this,x,b)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return y.mulUnsafe(this,i.n).is0()}toAffine(x){const T=this;let _=x;if(_!=null&&typeof _!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof _);const{X:A,Y:E,Z:v}=T,S=T.is0();_==null&&(_=S?o.create(zp):o.inv(v));const I=o.mul(A,_),R=o.mul(E,_),C=o.mul(v,_);if(S)return{x:o.ZERO,y:o.ONE};if(!o.eql(C,o.ONE))throw new Error("invZ was invalid");return{x:I,y:R}}clearCofactor(){return a===ta?this:a===na?this.double():a===yA?this.double().double():a===zp?this.double().double().double():this.multiplyUnsafe(a)}toBytes(){const{x,y:T}=this.toAffine(),_=o.toBytes(T);return _[_.length-1]|=u(x)?128:0,_}toHex(){return FT(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const b=k=>oA(m,k),y=new hA(m,c);return y.bits>=6&&m.BASE.precompute(6),Object.freeze(m.prototype),Object.freeze(m),m}const yr=BigInt(0),Qt=BigInt(1),ra=BigInt(2);function qp(e,t){return e+t-(t>>Qt<<Qt)}function vA(e){const t=BigInt(6)*e;return(n,r,o)=>{const s=r+o,a=((t+o-r)*n+r)%e;return{x_2:a,x_3:s-a}}}function xA(e){return ec(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function SA(e){const t=xA(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,a=t.scalarMultBase,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const d=i===void 0?Tv:i,u=c?255:448,f=vA(n),h=c?32:56,p=BigInt(c?9:5),g=BigInt(c?121665:39081),m=c?ra**BigInt(254):ra**BigInt(447),b=c?BigInt(8)*(ra**BigInt(251)-Qt):BigInt(4)*(ra**BigInt(445)-Qt),y=m+b+Qt,k=O=>Je(O,n),x=T(p);function T(O){return Nv(k(O),h)}function _(O){const M=ii(No(O,h,"uCoordinate"));return c&&(M[31]&=127),k(Qa(M))}function A(O){return Qa(o(ii(No(O,h,"scalar"))))}const E=new Set(c?[yr,Qt,n-Qt,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[yr,Qt,n-Qt]);function v(O,M){const F=_(M);if(E.has(F))throw new Error("invalid private or public key received");const B=C(F,A(O));if(B===yr)throw new Error("invalid private or public key received");return T(B)}function S(O){if(a===void 0)return v(O,x);const M=A(O);Gs("scalar",M,m,y);const F=k(a(M));if(F===yr)throw new Error("invalid private or public key received");return T(F)}const I=S,R=v;function C(O,M){Gs("u",O,yr,n),Gs("scalar",M,m,y);const F=M,B=O;let U=Qt,q=yr,z=O,ee=Qt;const ie=F^F>>Qt;for(let $=BigInt(u-1);$>=yr;$--){const Y=qp(n,ie>>$);({x_2:U,x_3:z}=f(Y,U,z)),{x_2:q,x_3:ee}=f(Y,q,ee);const J=U+q,we=k(J*J),ge=U-q,le=k(ge*ge),ce=we-le,be=z+ee,se=z-ee,ye=k(se*J),pe=k(be*ge),je=ye+pe,D=ye-pe;z=k(je*je),ee=k(B*k(D*D)),U=k(we*le),q=k(ce*(we+k(g*ce)))}const Z=qp(n,F);({x_2:U,x_3:z}=f(Z,U,z)),{x_2:q,x_3:ee}=f(Z,q,ee);const ae=s(q);return k(U*ae)}const N={secretKey:h,publicKey:h,seed:h},P=O=>(O=O===void 0?d(h):O,No(O,N.seed,"seed"),O),j={randomSecretKey:P};return Object.freeze(N),Object.freeze(j),Object.freeze({keygen:gA(P,I),getSharedSecret:R,getPublicKey:I,scalarMult:v,scalarMultBase:S,utils:j,GuBytes:x.slice(),lengths:N})}const Kp=BigInt(0),EA=BigInt(1),Gp=BigInt(2),kA=BigInt(3),IA=BigInt(5),CA=BigInt(8),Wc=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),TA={p:Wc,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:CA,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function $v(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Wc,a=e*e%s*e%s,c=cn(a,Gp,s)*a%s,d=cn(c,EA,s)*e%s,u=cn(d,IA,s)*d%s,f=cn(u,t,s)*u%s,h=cn(f,n,s)*f%s,p=cn(h,r,s)*h%s,g=cn(p,o,s)*p%s,m=cn(g,o,s)*p%s,b=cn(m,t,s)*u%s;return{pow_p_5_8:cn(b,Gp,s)*e%s,b2:a}}function AA(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Wp=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function RA(e,t){const n=Wc,r=Je(t*t*t,n),o=Je(r*r*t,n),s=$v(e*o).pow_p_5_8;let i=Je(e*r*s,n);const a=Je(t*i*i,n),c=i,d=Je(i*Wp,n),u=a===e,f=a===Je(-e,n),h=a===Je(-e*Wp,n);return u&&(i=c),(f||h)&&(i=d),QT(i,n)&&(i=Je(-i,n)),{isValid:u||f,value:i}}const Vp=bA(TA,{uvRatio:RA}),oa=(()=>{const e=Wc,t=n=>{const{pow_p_5_8:r,b2:o}=$v(n);return Je(cn(r,kA,e)*o,e)};return SA({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:AA,scalarMultBase:n=>{const r=Je(n,Vp.Fn.ORDER);if(r===Kp)return Kp;const o=Vp.BASE.multiply(r);return Je((o.Z+o.Y)*t(Je(o.Z-o.Y,e)),e)}})})();class Yp{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(t,n){if(Pf(t),Gn(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?t.create().update(n).digest():n);for(let s=0;s<o.length;s++)o[s]^=54;this.iHash.update(o),this.oHash=t.create();for(let s=0;s<o.length;s++)o[s]^=106;this.oHash.update(o),_r(o)}update(t){return Ja(this),this.iHash.update(t),this}digestInto(t){Ja(this),xv(t,this),this.finished=!0;const n=t.subarray(0,this.outputLen);this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||=Object.create(Object.getPrototypeOf(this),{});const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a,canXOF:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.canXOF=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const zv=(()=>{const e=((t,n,r)=>new Yp(t,n).update(r).digest());return e.create=(t,n)=>new Yp(t,n),e})();function Xp(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}class Jp{buffer;mask;top;btm;next;constructor(t){if(!(t>0)||(t-1&t)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}push(t){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(t!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}isEmpty(){return this.buffer[this.btm]===void 0}}class Ul{size;hwm;head;tail;constructor(t={}){this.hwm=t.splitLimit??16,this.head=new Jp(this.hwm),this.tail=this.head,this.size=0}calculateSize(t){return t?.byteLength!=null?t.byteLength:1}push(t){if(t?.value!=null&&(this.size+=this.calculateSize(t.value)),!this.head.push(t)){const n=this.head;this.head=n.next=new Jp(2*this.head.buffer.length),this.head.push(t)}}shift(){let t=this.tail.shift();if(t===void 0&&this.tail.next!=null){const n=this.tail.next;this.tail.next=null,this.tail=n,t=this.tail.shift()}return t?.value!=null&&(this.size-=this.calculateSize(t.value)),t}isEmpty(){return this.head.isEmpty()}}class PA extends Error{type;code;constructor(t,n){super(t??"The operation was aborted"),this.type="aborted",this.code=n??"ABORT_ERR"}}function NA(e={}){return _A(n=>{const r=n.shift();if(r==null)return{done:!0};if(r.error!=null)throw r.error;return{done:r.done===!0,value:r.value}},e)}function _A(e,t){t=t??{};let n=t.onEnd,r=new Ul,o,s,i,a=Xp();const c=async()=>{try{return r.isEmpty()?i?{done:!0}:await new Promise((b,y)=>{s=k=>{s=null,r.push(k);try{b(e(r))}catch(x){y(x)}return o}}):e(r)}finally{r.isEmpty()&&queueMicrotask(()=>{a.resolve(),a=Xp()})}},d=b=>s!=null?s(b):(r.push(b),o),u=b=>(r=new Ul,s!=null?s({error:b}):(r.push({error:b}),o)),f=b=>{if(i)return o;if(t?.objectMode!==!0&&b?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return d({done:!1,value:b})},h=b=>i?o:(i=!0,b!=null?u(b):d({done:!0})),p=()=>(r=new Ul,h(),{done:!0}),g=b=>(h(b),{done:!0});if(o={[Symbol.asyncIterator](){return this},next:c,return:p,throw:g,push:f,end:h,get readableLength(){return r.size},onEmpty:async b=>{const y=b?.signal;if(y?.throwIfAborted(),r.isEmpty())return;let k,x;y!=null&&(k=new Promise((T,_)=>{x=()=>{_(new PA)},y.addEventListener("abort",x)}));try{await Promise.race([a.promise,k])}finally{x!=null&&y!=null&&y?.removeEventListener("abort",x)}}},n==null)return o;const m=o;return o={[Symbol.asyncIterator](){return this},next(){return m.next()},throw(b){return m.throw(b),n!=null&&(n(b),n=void 0),{done:!0}},return(){return m.return(),n!=null&&(n(),n=void 0),{done:!0}},push:f,end(b){return m.end(b),n!=null&&(n(b),n=void 0),o},get readableLength(){return m.readableLength},onEmpty:b=>m.onEmpty(b)},o}class Mf extends Error{name="TimeoutError";constructor(t,n){super(t,n),Error.captureStackTrace?.(this,Mf)}}const Zp=e=>e.reason??new DOMException("This operation was aborted.","AbortError");function LA(e,t){const{milliseconds:n,fallback:r,message:o,customTimers:s={setTimeout,clearTimeout},signal:i}=t;let a,c;const u=new Promise((f,h)=>{if(typeof n!="number"||Math.sign(n)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(i?.aborted){h(Zp(i));return}if(i&&(c=()=>{h(Zp(i))},i.addEventListener("abort",c,{once:!0})),e.then(f,h),n===Number.POSITIVE_INFINITY)return;const p=new Mf;a=s.setTimeout.call(void 0,()=>{if(r){try{f(r())}catch(g){h(g)}return}typeof e.cancel=="function"&&e.cancel(),o===!1?f():o instanceof Error?h(o):(p.message=o??`Promise timed out after ${n} milliseconds`,h(p))},n)}).finally(()=>{u.clear(),c&&i&&i.removeEventListener("abort",c)});return u.clear=()=>{s.clearTimeout.call(void 0,a),a=void 0},u}const jA=e=>{const t=e.addEventListener||e.on||e.addListener,n=e.removeEventListener||e.off||e.removeListener;if(!t||!n)throw new TypeError("Emitter is not compatible");return{addListener:t.bind(e),removeListener:n.bind(e)}};function DA(e,t,n){let r;const o=new Promise((s,i)=>{if(n={rejectionEvents:["error"],multiArgs:!1,rejectionMultiArgs:!1,resolveImmediately:!1,...n},!(n.count>=0&&(n.count===Number.POSITIVE_INFINITY||Number.isInteger(n.count))))throw new TypeError("The `count` option should be at least 0 or more");n.signal?.throwIfAborted();const a=[t].flat(),c=[],{addListener:d,removeListener:u}=jA(e),f=async(...p)=>{const g=n.multiArgs?p:p[0];if(n.filter)try{if(!await n.filter(g))return}catch(m){r(),i(m);return}c.push(g),n.count===c.length&&(r(),s(c))},h=(...p)=>{r(),i(n.rejectionMultiArgs?p:p[0])};r=()=>{for(const p of a)u(p,f);for(const p of n.rejectionEvents)a.includes(p)||u(p,h)};for(const p of a)d(p,f);for(const p of n.rejectionEvents)a.includes(p)||d(p,h);n.signal&&n.signal.addEventListener("abort",()=>{h(n.signal.reason)},{once:!0}),n.resolveImmediately&&s(c)});if(o.cancel=r,typeof n.timeout=="number"){const s=LA(o,{milliseconds:n.timeout});return s.cancel=()=>{r(),s.clear()},s}return o}function OA(e,t,n){typeof n=="function"&&(n={filter:n}),n={...n,count:1,resolveImmediately:!1};const r=DA(e,t,n),o=r.then(s=>s[0]);return o.cancel=r.cancel,o}class nc extends Error{static name="UnexpectedEOFError";name="UnexpectedEOFError"}class MA extends Error{static name="StreamClosedError";name="StreamClosedError"}function BA(e){return e.reason}function qv(e,t,n){if(t==null||e==null)return e;const r=BA;if(t.aborted)return e.catch(()=>{}),Promise.reject(r(t));let o;return Promise.race([e,new Promise((s,i)=>{o=()=>{i(r(t))},t.addEventListener("abort",o)})]).finally(()=>{o!=null&&t.removeEventListener("abort",o)})}const FA=Math.pow(2,20)*4;class Kv extends JE{status;timeline;inactivityTimeout;maxReadBufferLength;maxWriteBufferLength;log;direction;maxMessageSize;readStatus;writeStatus;remoteReadStatus;remoteWriteStatus;writableNeedsDrain;readBuffer;writeBuffer;sendingData;onDrainPromise;constructor(t){super(),this.status="open",this.log=t.log,this.direction=t.direction??"outbound",this.inactivityTimeout=t.inactivityTimeout??12e4,this.maxReadBufferLength=t.maxReadBufferLength??FA,this.maxWriteBufferLength=t.maxWriteBufferLength,this.maxMessageSize=t.maxMessageSize,this.readBuffer=new qe,this.writeBuffer=new qe,this.readStatus="readable",this.remoteReadStatus="readable",this.writeStatus="writable",this.remoteWriteStatus="writable",this.sendingData=!1,this.writableNeedsDrain=!1,this.timeline={open:Date.now()},this.processSendQueue=this.processSendQueue.bind(this);const n=()=>{this.writableNeedsDrain&&(this.log.trace("drain event received, continue sending data"),this.writableNeedsDrain=!1,this.processSendQueue()),this.onDrainPromise?.resolve()};this.addEventListener("drain",n);const r=o=>{this.onDrainPromise?.reject(o.error??new MA)};this.addEventListener("close",r)}get readBufferLength(){return this.readBuffer.byteLength}get writeBufferLength(){return this.writeBuffer.byteLength}async onDrain(t){return this.writableNeedsDrain!==!0?Promise.resolve():(this.onDrainPromise==null&&(this.onDrainPromise=Promise.withResolvers()),qv(this.onDrainPromise.promise,t?.signal))}async*[Symbol.asyncIterator](){if(this.readStatus!=="readable"&&this.readStatus!=="paused")return;const t=NA(),n=s=>{t.push(s.data)};this.addEventListener("message",n);const r=s=>{t.end(s.error)};this.addEventListener("close",r);const o=()=>{t.end()};this.addEventListener("remoteCloseWrite",o);try{yield*t}finally{this.removeEventListener("message",n),this.removeEventListener("close",r),this.removeEventListener("remoteCloseWrite",o)}}isReadable(){return this.status==="open"}send(t){if(this.writeStatus==="closed"||this.writeStatus==="closing")throw new ys(`Cannot write to a stream that is ${this.writeStatus}`);return this.log.trace("append %d bytes to write buffer",t.byteLength),this.writeBuffer.append(t),this.processSendQueue()}abort(t){if(!(this.status==="aborted"||this.status==="reset"||this.status==="closed")){this.log.error("abort with error - %e",t),this.status="aborted",this.readBuffer.byteLength>0&&this.readBuffer.consume(this.readBuffer.byteLength),this.writeBuffer.byteLength>0&&(this.writeBuffer.consume(this.writeBuffer.byteLength),this.safeDispatchEvent("idle")),this.writeStatus="closed",this.remoteWriteStatus="closed",this.readStatus="closed",this.remoteReadStatus="closed",this.timeline.close=Date.now();try{this.sendReset(t)}catch(n){this.log("failed to send reset to remote - %e",n)}this.dispatchEvent(new gT(t))}}pause(){if(this.readStatus==="closed"||this.readStatus==="closing")throw new ys("Cannot pause a stream that is closing/closed");this.readStatus!=="paused"&&(this.readStatus="paused",this.sendPause())}resume(){if(this.readStatus==="closed"||this.readStatus==="closing")throw new ys("Cannot resume a stream that is closing/closed");this.readStatus!=="readable"&&(this.readStatus="readable",this.dispatchReadBuffer(),this.sendResume())}push(t){if(this.readStatus==="closed"||this.readStatus==="closing")throw new ys(`Cannot push data onto a stream that is ${this.readStatus}`);if(t.byteLength!==0){if(this.readBuffer.append(t),this.readStatus==="paused"||this.listenerCount("message")===0){this.checkReadBufferLength();return}setTimeout(()=>{this.dispatchReadBuffer()},0)}}unshift(t){if(this.readStatus==="closed"||this.readStatus==="closing")throw new ys(`Cannot push data onto a stream that is ${this.readStatus}`);if(t.byteLength!==0){if(this.readBuffer.prepend(t),this.readStatus==="paused"||this.listenerCount("message")===0){this.checkReadBufferLength();return}setTimeout(()=>{this.dispatchReadBuffer()},0)}}onData(t){if(t.byteLength!==0){if(this.readStatus==="closing"||this.readStatus==="closed"){this.log("ignoring data - read status %s",this.readStatus);return}this.readBuffer.append(t),this.dispatchReadBuffer()}}addEventListener(...t){super.addEventListener.apply(this,t),t[0]==="message"&&this.readBuffer.byteLength>0&&queueMicrotask(()=>{this.dispatchReadBuffer()})}onRemoteReset(){this.log("remote reset"),this.status="reset",this.writeStatus="closed",this.remoteWriteStatus="closed",this.remoteReadStatus="closed",this.timeline.close=Date.now(),this.readBuffer.byteLength===0&&(this.readStatus="closed");const t=new pT;this.dispatchEvent(new yT(t))}onTransportClosed(t){this.log("transport closed"),this.readStatus==="readable"&&this.readBuffer.byteLength===0&&(this.log("close readable end after transport closed and read buffer is empty"),this.readStatus="closed"),this.remoteReadStatus!=="closed"&&(this.remoteReadStatus="closed"),this.remoteWriteStatus!=="closed"&&(this.remoteWriteStatus="closed"),this.writeStatus!=="closed"&&(this.writeStatus="closed"),t!=null?this.abort(t):(this.status==="open"||this.status==="closing")&&(this.timeline.close=Date.now(),this.status="closed",this.writeStatus="closed",this.remoteWriteStatus="closed",this.remoteReadStatus="closed",this.dispatchEvent(new Rf))}onRemoteCloseWrite(){this.remoteWriteStatus!=="closed"&&(this.log.trace("on remote close write"),this.remoteWriteStatus="closed",this.safeDispatchEvent("remoteCloseWrite"),this.writeStatus==="closed"&&this.onTransportClosed())}onRemoteCloseRead(){this.log.trace("on remote close read"),this.remoteReadStatus="closed",this.writeBuffer.byteLength>0&&(this.writeBuffer.consume(this.writeBuffer.byteLength),this.safeDispatchEvent("idle"))}processSendQueue(){if(this.writableNeedsDrain)return this.log.trace("not processing send queue as drain is required"),this.checkWriteBufferLength(),!1;if(this.writeBuffer.byteLength===0)return this.log.trace("not processing send queue as no bytes to send"),!0;if(this.sendingData)return this.log.trace("not processing send queue as already sending data"),!0;this.sendingData=!0,this.log.trace("processing send queue with %d queued bytes",this.writeBuffer.byteLength);try{let t=!0;const n=this.writeBuffer.byteLength;let r=0;for(;this.writeBuffer.byteLength>0;){const o=Math.min(this.maxMessageSize??this.writeBuffer.byteLength,this.writeBuffer.byteLength);if(o===0){t=!1;break}const s=this.writeBuffer.sublist(0,o),i=new qe(s);this.writeBuffer.consume(s.byteLength);const a=this.sendData(s);if(t=a.canSendMore,r+=a.sentBytes,a.sentBytes!==i.byteLength&&(i.consume(a.sentBytes),this.writeBuffer.prepend(i)),!t)break}return t||(this.log.trace("sent %d/%d bytes, pausing sending because underlying stream is full, %d bytes left in the write buffer",r,n,this.writeBuffer.byteLength),this.writableNeedsDrain=!0,this.checkWriteBufferLength()),this.writeBuffer.byteLength===0&&this.safeDispatchEvent("idle"),t}finally{this.sendingData=!1}}dispatchReadBuffer(){try{if(this.listenerCount("message")===0){this.log.trace("not dispatching pause buffer as there are no listeners for the message event");return}if(this.readBuffer.byteLength===0){this.log.trace("not dispatching pause buffer as there is no data to dispatch");return}if(this.readStatus==="paused"){this.log.trace("not dispatching pause buffer we are paused");return}if(this.readStatus==="closing"||this.readStatus==="closed"){this.log("dropping %d bytes because the readable end is %s",this.readBuffer.byteLength,this.readStatus),this.readBuffer.consume(this.readBuffer.byteLength);return}const t=this.readBuffer.sublist();this.readBuffer.consume(t.byteLength),this.dispatchEvent(new mT(t))}finally{this.readBuffer.byteLength===0&&this.remoteWriteStatus==="closed"&&(this.log("close readable end after dispatching read buffer and remote writable end is closed"),this.readStatus="closed"),this.checkReadBufferLength()}}checkReadBufferLength(){this.readBuffer.byteLength>this.maxReadBufferLength&&this.abort(new Lp(`Read buffer length of ${this.readBuffer.byteLength} exceeded limit of ${this.maxReadBufferLength}, read status is ${this.readStatus}`))}checkWriteBufferLength(){this.maxWriteBufferLength!=null&&this.writeBuffer.byteLength>this.maxWriteBufferLength&&this.abort(new Lp(`Write buffer length of ${this.writeBuffer.byteLength} exceeded limit of ${this.maxWriteBufferLength}, write status is ${this.writeStatus}`))}onMuxerNeedsDrain(){this.writableNeedsDrain=!0}onMuxerDrain(){this.safeDispatchEvent("drain")}}const UA=4194304;class Qp extends Error{static name="UnwrappedError";name="UnwrappedError"}class Gv extends Error{name="InvalidMessageLengthError";code="ERR_INVALID_MSG_LENGTH"}class HA extends Error{name="InvalidDataLengthError";code="ERR_MSG_DATA_TOO_LONG"}class $A extends Error{name="InvalidDataLengthLengthError";code="ERR_MSG_LENGTH_TOO_LONG"}function zA(e){return typeof e?.closeRead=="function"}function qA(e){return typeof e?.close=="function"}function Hl(e){return zA(e)?e.remoteWriteStatus!=="writable"&&e.readBufferLength===0:qA(e)?e.status!=="open":!1}function KA(e){return e?.addEventListener!=null&&e?.removeEventListener!=null&&e?.send!=null&&e?.push!=null&&e?.log!=null}function GA(e,t){const n=t?.maxBufferSize??UA,r=new qe;let o,s=!1;if(!KA(e))throw new vv("Argument should be a Stream or a Multiaddr");const i=u=>{if(r.append(u.data),r.byteLength>n){const f=r.byteLength;r.consume(r.byteLength),o?.reject(new Error(`Read buffer overflow - ${f} > ${n}`))}o?.resolve()};e.addEventListener("message",i);const a=u=>{u.error!=null?o?.reject(u.error):o?.resolve()};e.addEventListener("close",a);const c=()=>{o?.resolve()};e.addEventListener("remoteCloseWrite",c);const d={readBuffer:r,async read(u){if(s===!0)throw new Qp("Stream was unwrapped");if(Hl(e)){if(u?.bytes==null)return null;if(r.byteLength<u.bytes)throw e.log.error("closed after reading %d/%d bytes",r.byteLength,u.bytes),new nc(`Unexpected EOF - stream closed after reading ${r.byteLength}/${u.bytes} bytes`)}const f=u?.bytes??1;for(o=Promise.withResolvers();;){if(r.byteLength>=f){o.resolve();break}if(await qv(o.promise,u?.signal),Hl(e)){if(r.byteLength===0&&u?.bytes==null)return null;break}o=Promise.withResolvers()}const h=u?.bytes??r.byteLength;if(r.byteLength<h){if(Hl(e))throw e.log.error("closed while reading %d/%d bytes",r.byteLength,h),new nc(`Unexpected EOF - stream closed while reading ${r.byteLength}/${h} bytes`);return d.read(u)}const p=r.sublist(0,h);return r.consume(h),p},async write(u,f){if(s===!0)throw new Qp("Stream was unwrapped");e.send(u)||await OA(e,"drain",{signal:f?.signal,rejectionEvents:["close"]})},unwrap(){return s||(s=!0,e.removeEventListener("message",i),e.removeEventListener("close",a),e.removeEventListener("remoteCloseWrite",c),r.byteLength>0&&(e.log("stream unwrapped with %d unread bytes",r.byteLength),e.push(r))),e}};return d}function em(e,t={}){const n=GA(e,t);t.maxDataLength!=null&&t.maxLengthLength==null&&(t.maxLengthLength=Xr(t.maxDataLength));const r=t?.lengthDecoder??ev,o=t?.lengthEncoder??ZI;return{async read(i){let a=-1;const c=new qe;for(;;){const u=await n.read({...i,bytes:1});if(u==null)break;c.append(u);try{a=r(c)}catch(f){if(f instanceof RangeError)continue;throw f}if(a<0)throw new Gv("Invalid message length");if(t?.maxLengthLength!=null&&c.byteLength>t.maxLengthLength)throw new $A(`Message length length too long - ${c.byteLength} > ${t.maxLengthLength}`);if(a>-1)break}if(t?.maxDataLength!=null&&a>t.maxDataLength)throw new HA(`Message length too long - ${a} > ${t.maxDataLength}`);const d=await n.read({...i,bytes:a});if(d==null)throw e.log.error("tried to read %d bytes but the stream closed",a),new nc(`Unexpected EOF - tried to read ${a} bytes but the stream closed`);if(d.byteLength!==a)throw e.log.error("read %d/%d bytes before the stream closed",d.byteLength,a),new nc(`Unexpected EOF - read ${d.byteLength}/${a} bytes before the stream closed`);return d},async write(i,a){await n.write(new qe(o(i.byteLength),i),a)},async writeV(i,a){const c=new qe(...i.flatMap(d=>[o(d.byteLength),d]));await n.write(c,a)},unwrap(){return n.unwrap()}}}const WA=1024*1024*4,VA=1024*1024*4;class YA{buffer;maxBufferSize;lengthDecoder;maxDataLength;encodingLength;constructor(t={}){this.buffer=new qe,this.maxBufferSize=t.maxBufferSize??WA,this.maxDataLength=t.maxDataLength??VA,this.lengthDecoder=t.lengthDecoder??ev,this.encodingLength=t.encodingLength??Xr}*decode(t){if(this.buffer.append(t),this.buffer.byteLength>this.maxBufferSize)throw new vv(`Buffer length limit exceeded - ${this.buffer.byteLength}/${this.maxBufferSize}`);for(;;){let n;try{n=this.lengthDecoder(this.buffer)}catch(s){if(s instanceof RangeError)break;throw s}if(n<0||n>this.maxDataLength)throw new Gv("Invalid message length");const r=this.encodingLength(n),o=r+n;if(this.buffer.byteLength>=o){const s=this.buffer.sublist(r,o);this.buffer.consume(o),s.byteLength>0&&(yield s)}else break}}}var XA={};const li=65535,tm=li-16,Ai=!!XA?.DUMP_SESSION_KEYS,nm=16;function tu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const rc=e=>e?`"${e}" `:"";function nu(e,t=""){if(typeof e!="boolean")throw new TypeError(rc(t)+"expected boolean, got type="+typeof e);return e}function Lo(e,t=""){if(typeof e!="number")throw new TypeError(rc(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(rc(t)+"expected integer >= 0, got "+e);return e}function wt(e,t,n=""){if(tu(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Lo(t,"length");const r=tu(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=rc(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}const rm=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`)};function om(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function JA(e,t){wt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function jn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function fr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ZA(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const jo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function QA(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function eR(e){for(let t=0;t<e.length;t++)e[t]=QA(e[t]);return e}const Cr=jo?e=>e:eR;function tR(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function nR(e,t){if(tR(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function rR(e,t){return rm(e,"defaults"),rm(t,"opts"),Object.assign(e,t)}function oR(e,t){if(e=wt(e),t=wt(t),e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function sR(e,t,n){const r=t,o=(()=>[]),s=(a,c)=>r(c,...o(a)).update(a).digest(),i=r(new Uint8Array(e),...o(new Uint8Array(0)));return s.outputLen=i.outputLen,s.blockLen=i.blockLen,s.create=(a,...c)=>r(a,...c),s}const iR=(e,t)=>{function n(r,...o){if(wt(r,void 0,"key"),e.nonceLength!==void 0){const f=o[0];wt(f,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const s=e.tagLength,i=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let f=i;f<o.length;f++)if(tu(o[f]))throw new Error("AAD not supported")}e.withAAD&&o[i]!==void 0&&wt(o[i],void 0,"AAD");const a=t(r,...o),c=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");wt(h,void 0,"output")}};let d=!1;return{encrypt(f,h){if(d)throw new Error("cannot encrypt() twice with same key + nonce");return d=!0,wt(f,void 0,"data"),c(a.encrypt.length,h),a.encrypt(f,h)},decrypt(f,h){if(wt(f,void 0,"data"),s&&f.length<s)throw new Error('"ciphertext" expected length >= tagLength='+s);return c(a.decrypt.length,h),a.decrypt(f,h)}}}return Object.assign(n,e),n};function ru(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(wt(t,e,"output"),n&&!oc(t))throw new Error("invalid output, must be aligned");return t}function aR(e,t,n){Lo(e),Lo(t),nu(n);const r=new Uint8Array(16),o=ZA(r);return o.setBigUint64(0,BigInt(t),n),o.setBigUint64(8,BigInt(e),n),r}function oc(e){return e.byteOffset%4===0}function sc(e){return Uint8Array.from(wt(e))}const Wv=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),cR=Cr(jn(Wv("expand 16-byte k"))),lR=Cr(jn(Wv("expand 32-byte k")));function Oe(e,t){return e<<t|e>>>32-t}const ws=64,dR=16,ou=2**32-1,sm=Uint32Array.of();function uR(e,t,n,r,o,s,i,a){const c=o.length,d=new Uint8Array(ws),u=jn(d),f=jo&&oc(o)&&oc(s),h=f?jn(o):sm,p=f?jn(s):sm;if(!jo){for(let g=0;g<c;i++){if(e(t,n,r,u,i,a),Cr(u),i>=ou)throw new Error("arx: counter overflow");const m=Math.min(ws,c-g);for(let b=0,y;b<m;b++)y=g+b,s[y]=o[y]^d[b];g+=m}return}for(let g=0;g<c;i++){if(e(t,n,r,u,i,a),i>=ou)throw new Error("arx: counter overflow");const m=Math.min(ws,c-g);if(f&&m===ws){const b=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let y=0,k;y<dR;y++)k=b+y,p[k]=h[k]^u[y];g+=ws;continue}for(let b=0,y;b<m;b++)y=g+b,s[y]=o[y]^d[b];g+=m}}function fR(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=rR({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Lo(o),Lo(i),nu(s),nu(n),(a,c,d,u,f=0)=>{wt(a,void 0,"key"),wt(c,void 0,"nonce"),wt(d,void 0,"data");const h=d.length,p=u!==void 0;if(u=ru(h,u,!1),p&&nR(d,u),Lo(f),f<0||f>=ou)throw new Error("arx: counter overflow");const g=[];let m=a.length,b,y;if(m===32)g.push(b=sc(a)),y=lR;else if(m===16&&n)b=new Uint8Array(32),b.set(a),b.set(a,16),y=cR,g.push(b);else throw wt(a,32,"arx key"),new Error("invalid key size");(!jo||!oc(c))&&g.push(c=sc(c));let k=jn(b);if(r){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const _=c.subarray(0,16);if(jo)r(y,k,jn(_),k);else{const A=Cr(Uint32Array.from(y));r(A,k,jn(_),k),fr(A),Cr(k)}c=c.subarray(16)}else jo||Cr(k);const x=16-o;if(x!==c.length)throw new Error(`arx: nonce must be ${x} or 16 bytes`);if(x!==12){const _=new Uint8Array(12);_.set(c,s?0:12-c.length),c=_,g.push(c)}const T=Cr(jn(c));try{return uR(e,y,k,T,d,u,f,i),u}finally{fr(...g)}}}function St(e,t){return e[t++]&255|(e[t++]&255)<<8}class hR{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;destroyed=!1;constructor(t){t=sc(wt(t,32,"key"));const n=St(t,0),r=St(t,2),o=St(t,4),s=St(t,6),i=St(t,8),a=St(t,10),c=St(t,12),d=St(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|d<<8)&8191,this.r[9]=d>>>5&127;for(let u=0;u<8;u++)this.pad[u]=St(t,16+2*u)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,a=i[0],c=i[1],d=i[2],u=i[3],f=i[4],h=i[5],p=i[6],g=i[7],m=i[8],b=i[9],y=St(t,n+0),k=St(t,n+2),x=St(t,n+4),T=St(t,n+6),_=St(t,n+8),A=St(t,n+10),E=St(t,n+12),v=St(t,n+14);let S=s[0]+(y&8191),I=s[1]+((y>>>13|k<<3)&8191),R=s[2]+((k>>>10|x<<6)&8191),C=s[3]+((x>>>7|T<<9)&8191),N=s[4]+((T>>>4|_<<12)&8191),P=s[5]+(_>>>1&8191),j=s[6]+((_>>>14|A<<2)&8191),O=s[7]+((A>>>11|E<<5)&8191),M=s[8]+((E>>>8|v<<8)&8191),F=s[9]+(v>>>5|o),B=0,U=B+S*a+I*(5*b)+R*(5*m)+C*(5*g)+N*(5*p);B=U>>>13,U&=8191,U+=P*(5*h)+j*(5*f)+O*(5*u)+M*(5*d)+F*(5*c),B+=U>>>13,U&=8191;let q=B+S*c+I*a+R*(5*b)+C*(5*m)+N*(5*g);B=q>>>13,q&=8191,q+=P*(5*p)+j*(5*h)+O*(5*f)+M*(5*u)+F*(5*d),B+=q>>>13,q&=8191;let z=B+S*d+I*c+R*a+C*(5*b)+N*(5*m);B=z>>>13,z&=8191,z+=P*(5*g)+j*(5*p)+O*(5*h)+M*(5*f)+F*(5*u),B+=z>>>13,z&=8191;let ee=B+S*u+I*d+R*c+C*a+N*(5*b);B=ee>>>13,ee&=8191,ee+=P*(5*m)+j*(5*g)+O*(5*p)+M*(5*h)+F*(5*f),B+=ee>>>13,ee&=8191;let ie=B+S*f+I*u+R*d+C*c+N*a;B=ie>>>13,ie&=8191,ie+=P*(5*b)+j*(5*m)+O*(5*g)+M*(5*p)+F*(5*h),B+=ie>>>13,ie&=8191;let Z=B+S*h+I*f+R*u+C*d+N*c;B=Z>>>13,Z&=8191,Z+=P*a+j*(5*b)+O*(5*m)+M*(5*g)+F*(5*p),B+=Z>>>13,Z&=8191;let ae=B+S*p+I*h+R*f+C*u+N*d;B=ae>>>13,ae&=8191,ae+=P*c+j*a+O*(5*b)+M*(5*m)+F*(5*g),B+=ae>>>13,ae&=8191;let $=B+S*g+I*p+R*h+C*f+N*u;B=$>>>13,$&=8191,$+=P*d+j*c+O*a+M*(5*b)+F*(5*m),B+=$>>>13,$&=8191;let Y=B+S*m+I*g+R*p+C*h+N*f;B=Y>>>13,Y&=8191,Y+=P*u+j*d+O*c+M*a+F*(5*b),B+=Y>>>13,Y&=8191;let J=B+S*b+I*m+R*g+C*p+N*h;B=J>>>13,J&=8191,J+=P*f+j*u+O*d+M*c+F*a,B+=J>>>13,J&=8191,B=(B<<2)+B|0,B=B+U|0,U=B&8191,B=B>>>13,q+=B,s[0]=U,s[1]=q,s[2]=z,s[3]=ee,s[4]=ie,s[5]=Z,s[6]=ae,s[7]=$,s[8]=Y,s[9]=J}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let a=2;a<10;a++)t[a]+=o,o=t[a]>>>13,t[a]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let a=1;a<10;a++)r[a]=t[a]+o,o=r[a]>>>13,r[a]&=8191;r[9]-=8192;let s=(o^1)-1;for(let a=0;a<10;a++)r[a]&=s;s=~s;for(let a=0;a<10;a++)t[a]=t[a]&s|r[a];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let a=1;a<8;a++)i=(t[a]+n[a]|0)+(i>>>16)|0,t[a]=i&65535;fr(r)}update(t){om(this),wt(t),t=sc(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,fr(this.h,this.r,this.buffer,this.pad)}digestInto(t){om(this),JA(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}const pR=sR(32,e=>new hR(e));function mR(e,t,n,r,o,s=20){let i=e[0],a=e[1],c=e[2],d=e[3],u=t[0],f=t[1],h=t[2],p=t[3],g=t[4],m=t[5],b=t[6],y=t[7],k=o,x=n[0],T=n[1],_=n[2],A=i,E=a,v=c,S=d,I=u,R=f,C=h,N=p,P=g,j=m,O=b,M=y,F=k,B=x,U=T,q=_;for(let ee=0;ee<s;ee+=2)A=A+I|0,F=Oe(F^A,16),P=P+F|0,I=Oe(I^P,12),A=A+I|0,F=Oe(F^A,8),P=P+F|0,I=Oe(I^P,7),E=E+R|0,B=Oe(B^E,16),j=j+B|0,R=Oe(R^j,12),E=E+R|0,B=Oe(B^E,8),j=j+B|0,R=Oe(R^j,7),v=v+C|0,U=Oe(U^v,16),O=O+U|0,C=Oe(C^O,12),v=v+C|0,U=Oe(U^v,8),O=O+U|0,C=Oe(C^O,7),S=S+N|0,q=Oe(q^S,16),M=M+q|0,N=Oe(N^M,12),S=S+N|0,q=Oe(q^S,8),M=M+q|0,N=Oe(N^M,7),A=A+R|0,q=Oe(q^A,16),O=O+q|0,R=Oe(R^O,12),A=A+R|0,q=Oe(q^A,8),O=O+q|0,R=Oe(R^O,7),E=E+C|0,F=Oe(F^E,16),M=M+F|0,C=Oe(C^M,12),E=E+C|0,F=Oe(F^E,8),M=M+F|0,C=Oe(C^M,7),v=v+N|0,B=Oe(B^v,16),P=P+B|0,N=Oe(N^P,12),v=v+N|0,B=Oe(B^v,8),P=P+B|0,N=Oe(N^P,7),S=S+I|0,U=Oe(U^S,16),j=j+U|0,I=Oe(I^j,12),S=S+I|0,U=Oe(U^S,8),j=j+U|0,I=Oe(I^j,7);let z=0;r[z++]=i+A|0,r[z++]=a+E|0,r[z++]=c+v|0,r[z++]=d+S|0,r[z++]=u+I|0,r[z++]=f+R|0,r[z++]=h+C|0,r[z++]=p+N|0,r[z++]=g+P|0,r[z++]=m+j|0,r[z++]=b+O|0,r[z++]=y+M|0,r[z++]=k+F|0,r[z++]=x+B|0,r[z++]=T+U|0,r[z++]=_+q|0}const gR=fR(mR,{counterRight:!1,counterLength:4,allowShortKeys:!1}),yR=new Uint8Array(16),im=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(yR.subarray(n))},wR=new Uint8Array(32);function am(e,t,n,r,o){o!==void 0&&wt(o,void 0,"AAD");const s=e(t,n,wR),i=aR(r.length,o?o.length:0,!0),a=pR.create(s);o&&im(a,o),im(a,r),a.update(i);const c=a.digest();return fr(s,i),c}const bR=e=>(t,n,r)=>({encrypt(s,i){const a=s.length;i=ru(a+16,i,!1),i.set(s);const c=i.subarray(0,-16);e(t,n,c,c,1);const d=am(e,t,n,c,r);return i.set(d,a),fr(d),i},decrypt(s,i){i=ru(s.length-16,i,!1);const a=s.subarray(0,-16),c=s.subarray(-16),d=am(e,t,n,a,r);if(!oR(c,d))throw fr(d),new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),fr(d),i}}),cm=iR({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},bR(gR));function vR(e,t,n){return Pf(e),n===void 0&&(n=new Uint8Array(e.outputLen)),zv(e,n,t)}const bs=Uint8Array.of(0),xR=Uint8Array.of();function SR(e,t,n,r=32,o){Pf(e),Kn(r,"length"),Gn(t,void 0,"prk");const s=e.outputLen;if(t.length<s)throw new Error('"prk" must be at least HashLen octets');if(r>255*s)throw new Error("Length must be <= 255*HashLen");const i=Math.ceil(r/s);if(n===void 0?n=xR:Gn(n,void 0,"info"),!i)return new Uint8Array;const a=new Uint8Array(i*s),{iHash:c,oHash:d}=zv.create(e,t),u=new Uint8Array(s),f=i>1?e.create():void 0;for(let p=0;p<i-1;p++){bs[0]=p+1;const g=c._cloneInto(f);p&&g.update(u),g.update(n).update(bs).digestInto(u),d._cloneInto(f).update(u).digestInto(u),a.set(u,s*p)}if(bs[0]=i,i>1&&c.update(u),c.update(n).update(bs).digestInto(u),d.update(u).digestInto(u),a.set(u,s*(i-1)),c.destroy(),d.destroy(),f?.destroy(),u!==a&&_r(u),_r(bs),r===a.length)return a;const h=a.slice(0,r);return _r(a),h}const Vv={hashSHA256(e){return xa(e.subarray())},getHKDF(e,t){const n=vR(xa,t,e),o=SR(xa,n,void 0,96),s=o.subarray(0,32),i=o.subarray(32,64),a=o.subarray(64,96);return[s,i,a]},generateX25519KeyPair(){const e=oa.utils.randomSecretKey();return{publicKey:oa.getPublicKey(e),privateKey:e}},generateX25519KeyPairFromSeed(e){return{publicKey:oa.getPublicKey(e),privateKey:e}},generateX25519SharedKey(e,t){return oa.getSharedSecret(e.subarray(),t.subarray())},chaCha20Poly1305Encrypt(e,t,n,r){return cm(r,t,n).encrypt(e.subarray())},chaCha20Poly1305Decrypt(e,t,n,r,o){return cm(r,t,n).decrypt(e.subarray(),o)}},ER=Vv;function kR(e){return{generateKeypair:e.generateX25519KeyPair,dh:(t,n)=>e.generateX25519SharedKey(t.privateKey,n).subarray(0,32),encrypt:e.chaCha20Poly1305Encrypt,decrypt:e.chaCha20Poly1305Decrypt,hash:e.hashSHA256,hkdf:e.getHKDF}}const ic=e=>{const t=zn(2);return t[0]=e>>8,t[1]=e,t};ic.bytes=2;const ac=e=>{if(e.length<2)throw RangeError("Could not decode int16BE");if(e instanceof Uint8Array){let t=0;return t+=e[0]<<8,t+=e[1],t}return e.getUint16(0)};ac.bytes=2;function IR(e){return{xxHandshakeSuccesses:e.registerCounter("libp2p_noise_xxhandshake_successes_total",{help:"Total count of noise xxHandshakes successes_"}),xxHandshakeErrors:e.registerCounter("libp2p_noise_xxhandshake_error_total",{help:"Total count of noise xxHandshakes errors"}),encryptedPackets:e.registerCounter("libp2p_noise_encrypted_packets_total",{help:"Total count of noise encrypted packets successfully"}),decryptedPackets:e.registerCounter("libp2p_noise_decrypted_packets_total",{help:"Total count of noise decrypted packets"}),decryptErrors:e.registerCounter("libp2p_noise_decrypt_errors_total",{help:"Total count of noise decrypt errors"})}}function Yv(e,t){!t.enabled||!Ai||(e?(t(`LOCAL_STATIC_PUBLIC_KEY ${Le(e.publicKey,"hex")}`),t(`LOCAL_STATIC_PRIVATE_KEY ${Le(e.privateKey,"hex")}`)):t("Missing local static keys."))}function Xv(e,t){!t.enabled||!Ai||(e?(t(`LOCAL_PUBLIC_EPHEMERAL_KEY ${Le(e.publicKey,"hex")}`),t(`LOCAL_PRIVATE_EPHEMERAL_KEY ${Le(e.privateKey,"hex")}`)):t("Missing local ephemeral keys."))}function CR(e,t){!t.enabled||!Ai||t(e?`REMOTE_STATIC_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote static public key.")}function Jv(e,t){!t.enabled||!Ai||t(e?`REMOTE_EPHEMERAL_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote ephemeral keys.")}function Zv(e,t,n){!n.enabled||!Ai||(n(`CIPHER_STATE_1 ${e.n.getUint64()} ${e.k&&Le(e.k,"hex")}`),n(`CIPHER_STATE_2 ${t.n.getUint64()} ${t.k&&Le(t.k,"hex")}`))}class Ws extends Error{code;constructor(t="Invalid crypto exchange"){super(t),this.code=Ws.code}static code="ERR_INVALID_CRYPTO_EXCHANGE"}const TR=0,AR=4294967295,RR="Cipherstate has reached maximum n, a new handshake must be performed";class PR{n;bytes;view;constructor(t=TR){this.n=t,this.bytes=Ht(12),this.view=new DataView(this.bytes.buffer,this.bytes.byteOffset,this.bytes.byteLength),this.view.setUint32(4,t,!0)}increment(){this.n++,this.view.setUint32(4,this.n,!0)}getBytes(){return this.bytes}getUint64(){return this.n}assertValue(){if(this.n>AR)throw new Error(RR)}}const Do=Ht(0);class sa{k;n;crypto;constructor(t,n=void 0,r=0){this.crypto=t,this.k=n,this.n=new PR(r)}hasKey(){return!!this.k}encryptWithAd(t,n){if(!this.hasKey())return n;this.n.assertValue();const r=this.crypto.encrypt(n,this.n.getBytes(),t,this.k);return this.n.increment(),r}decryptWithAd(t,n,r){if(!this.hasKey())return n;this.n.assertValue();const o=this.crypto.decrypt(n,this.n.getBytes(),t,this.k,r);return this.n.increment(),o}}class NR{cs;ck;h;crypto;constructor(t,n){this.crypto=t;const r=ut(n,"utf-8");this.h=LR(t,r),this.ck=this.h,this.cs=new sa(t)}mixKey(t){const[n,r]=this.crypto.hkdf(this.ck,t);this.ck=n,this.cs=new sa(this.crypto,r)}mixHash(t){this.h=this.crypto.hash(new qe(this.h,t))}encryptAndHash(t){const n=this.cs.encryptWithAd(this.h,t);return this.mixHash(n),n}decryptAndHash(t){const n=this.cs.decryptWithAd(this.h,t);return this.mixHash(t),n}split(){const[t,n]=this.crypto.hkdf(this.ck,Do);return[new sa(this.crypto,t),new sa(this.crypto,n)]}}class _R{ss;s;e;rs;re;initiator;crypto;constructor(t){const{crypto:n,protocolName:r,prologue:o,initiator:s,s:i,e:a,rs:c,re:d}=t;this.crypto=n,this.ss=new NR(n,r),this.ss.mixHash(o),this.initiator=s,this.s=i,this.e=a,this.rs=c,this.re=d}writeE(){if(this.e)throw new Error("ephemeral keypair is already set");const t=this.crypto.generateKeypair();return this.ss.mixHash(t.publicKey),this.e=t,t.publicKey}writeS(){if(!this.s)throw new Error("static keypair is not set");return this.ss.encryptAndHash(this.s.publicKey)}writeEE(){if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.re))}writeES(){if(this.initiator){if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.rs)throw new Error("remote static public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.rs))}else{if(!this.s)throw new Error("static keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.s,this.re))}}writeSE(){if(this.initiator){if(!this.s)throw new Error("static keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.s,this.re))}else{if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.rs)throw new Error("remote static public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.rs))}}readE(t,n=0){if(this.re)throw new Error("remote ephemeral public key is already set");if(t.byteLength<n+32)throw new Error("message is not long enough");this.re=t.sublist(n,n+32),this.ss.mixHash(this.re)}readS(t,n=0){if(this.rs)throw new Error("remote static public key is already set");const r=32+(this.ss.cs.hasKey()?16:0);if(t.byteLength<n+r)throw new Error("message is not long enough");const o=t.sublist(n,n+r);return this.rs=this.ss.decryptAndHash(o),r}readEE(){this.writeEE()}readES(){this.writeES()}readSE(){this.writeSE()}}class Qv extends _R{writeMessageA(t){return new qe(this.writeE(),this.ss.encryptAndHash(t))}writeMessageB(t){const n=this.writeE();this.writeEE();const r=this.writeS();return this.writeES(),new qe(n,r,this.ss.encryptAndHash(t))}writeMessageC(t){const n=this.writeS();return this.writeSE(),new qe(n,this.ss.encryptAndHash(t))}readMessageA(t){try{return this.readE(t),this.ss.decryptAndHash(t.sublist(32))}catch(n){throw new Ws(`handshake stage 0 validation fail: ${n.message}`)}}readMessageB(t){try{this.readE(t),this.readEE();const n=this.readS(t,32);return this.readES(),this.ss.decryptAndHash(t.sublist(32+n))}catch(n){throw new Ws(`handshake stage 1 validation fail: ${n.message}`)}}readMessageC(t){try{const n=this.readS(t);return this.readSE(),this.ss.decryptAndHash(t.sublist(n))}catch(n){throw new Ws(`handshake stage 2 validation fail: ${n.message}`)}}}function LR(e,t){if(t.length<=32){const n=Ht(32);return n.set(t),n}else return e.hash(t)}var cc;(function(e){let t;e.codec=()=>(t==null&&(t=zc((n,r,o={})=>{if(o.lengthDelimited!==!1&&r.fork(),n.webtransportCerthashes!=null)for(const s of n.webtransportCerthashes)r.uint32(10),r.bytes(s);if(n.streamMuxers!=null)for(const s of n.streamMuxers)r.uint32(18),r.string(s);o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={webtransportCerthashes:[],streamMuxers:[]},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{if(o.limits?.webtransportCerthashes!=null&&s.webtransportCerthashes.length===o.limits.webtransportCerthashes)throw new Rp('Decode error - map field "webtransportCerthashes" had too many elements');s.webtransportCerthashes.push(n.bytes());break}case 2:{if(o.limits?.streamMuxers!=null&&s.streamMuxers.length===o.limits.streamMuxers)throw new Rp('Decode error - map field "streamMuxers" had too many elements');s.streamMuxers.push(n.string());break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>$c(n,e.codec()),e.decode=(n,r)=>Hc(n,e.codec(),r)})(cc||(cc={}));var lc;(function(e){let t;e.codec=()=>(t==null&&(t=zc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.identityKey!=null&&n.identityKey.byteLength>0&&(r.uint32(10),r.bytes(n.identityKey)),n.identitySig!=null&&n.identitySig.byteLength>0&&(r.uint32(18),r.bytes(n.identitySig)),n.extensions!=null&&(r.uint32(34),cc.codec().encode(n.extensions,r)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={identityKey:Ht(0),identitySig:Ht(0)},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.identityKey=n.bytes();break}case 2:{s.identitySig=n.bytes();break}case 4:{s.extensions=cc.codec().decode(n,n.uint32(),{limits:o.limits?.extensions});break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>$c(n,e.codec()),e.decode=(n,r)=>Hc(n,e.codec(),r)})(lc||(lc={}));async function ex(e,t,n){const r=await e.sign(nx(t));return lc.encode({identityKey:qc(e.publicKey),identitySig:r,extensions:n})}async function tx(e,t,n){try{const r=lc.decode(e),o=Jd(r.identityKey);if(n?.equals(o)===!1)throw new Error(`Payload identity key ${o} does not match expected remote identity key ${n}`);if(!t)throw new Error("Remote static does not exist");const s=nx(t);if(!await o.verify(s,r.identitySig))throw new Error("Invalid payload signature");return r}catch(r){throw new qE(r.message)}}function nx(e){const t=ut("noise-libp2p-static-key:");return e instanceof Uint8Array?Ud([t,e],t.length+e.length):(e.prepend(t),e)}class jR extends Kv{stream;handshake;metrics;decoder;constructor(t,n,r){super({log:t.log,inactivityTimeout:t.inactivityTimeout,maxReadBufferLength:t.maxReadBufferLength,direction:t.direction}),this.stream=t,this.handshake=n,this.metrics=r,this.decoder=new YA({lengthDecoder:ac,maxBufferSize:16*1024*1024,encodingLength:()=>2});const o=c=>{try{for(const d of this.decoder.decode(c.data))this.onData(this.decrypt(d))}catch(d){this.abort(d)}};this.stream.addEventListener("message",o);const s=c=>{c.error!=null?c.local===!0?this.abort(c.error):this.onRemoteReset():this.onTransportClosed()};this.stream.addEventListener("close",s);const i=()=>{this.safeDispatchEvent("drain")};this.stream.addEventListener("drain",i);const a=()=>{this.onRemoteCloseWrite()};this.stream.addEventListener("remoteCloseWrite",a)}encrypt(t){const n=new qe;for(let r=0;r<t.byteLength;r+=tm){let o=r+tm;o>t.byteLength&&(o=t.byteLength);let s;t instanceof Uint8Array?s=this.handshake.encrypt(t.subarray(r,o)):s=this.handshake.encrypt(t.sublist(r,o)),this.metrics?.encryptedPackets.increment(),n.append(ic(s.byteLength)),n.append(s)}return n}decrypt(t){const n=new qe;for(let r=0;r<t.byteLength;r+=li){let o=r+li;if(o>t.byteLength&&(o=t.byteLength),o-nm<r)throw new Error("Invalid chunk");let s;t instanceof Uint8Array?s=t.subarray(r,o):s=t.sublist(r,o);const i=t.subarray(r,o-nm);try{const a=this.handshake.decrypt(s,i);this.metrics?.decryptedPackets.increment(),n.append(a)}catch(a){throw this.metrics?.decryptErrors.increment(),a}}return n}close(t){return this.stream.close(t)}sendPause(){this.stream.pause()}sendResume(){this.stream.resume()}sendReset(t){this.stream.abort(t)}sendData(t){return{sentBytes:t.byteLength,canSendMore:this.stream.send(this.encrypt(t))}}}function lm(e,t,n){return new jR(e,t,n)}async function DR(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await ex(s,a.publicKey,d),f=new Qv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!0,prologue:i,s:a});Yv(f.s,n),n.trace("Stage 0 - Initiator starting to send first message."),await r.write(f.writeMessageA(Do),t),n.trace("Stage 0 - Initiator finished sending first message."),Xv(f.e,n),n.trace("Stage 1 - Initiator waiting to receive first message from responder...");const h=f.readMessageB(await r.read(t));n.trace("Stage 1 - Initiator received the message."),Jv(f.re,n),CR(f.rs,n),n.trace("Initiator going to check remote's signature...");const p=await tx(h,f.rs,c);n.trace("All good with the signature!"),n.trace("Stage 2 - Initiator sending third handshake message."),await r.write(f.writeMessageC(u),t),n.trace("Stage 2 - Initiator sent message with signed payload.");const[g,m]=f.ss.split();return Zv(g,m,n),{payload:p,encrypt:b=>g.encryptWithAd(Do,b),decrypt:(b,y)=>m.decryptWithAd(Do,b,y)}}async function OR(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await ex(s,a.publicKey,d),f=new Qv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!1,prologue:i,s:a});Yv(f.s,n),n.trace("Stage 0 - Responder waiting to receive first message."),f.readMessageA(await r.read(t)),n.trace("Stage 0 - Responder received first message."),Jv(f.re,n),n.trace("Stage 1 - Responder sending out first message with signed payload and static key."),await r.write(f.writeMessageB(u),t),n.trace("Stage 1 - Responder sent the second handshake message with signed payload."),Xv(f.e,n),n.trace("Stage 2 - Responder waiting for third handshake message...");const h=f.readMessageC(await r.read(t));n.trace("Stage 2 - Responder received the message, finished handshake.");const p=await tx(h,f.rs,c),[g,m]=f.ss.split();return Zv(g,m,n),{payload:p,encrypt:b=>m.encryptWithAd(Do,b),decrypt:(b,y)=>g.decryptWithAd(Do,b,y)}}class MR{protocol="/noise";crypto;prologue;staticKey;extensions;metrics;components;log;constructor(t,n={}){const{staticNoiseKey:r,extensions:o,crypto:s,prologueBytes:i}=n,{metrics:a}=t;this.components=t,this.log=t.logger.forComponent("libp2p:noise");const c=s??ER;this.crypto=kR(c),this.extensions={webtransportCerthashes:[],...o},this.metrics=a?IR(a):void 0,r?this.staticKey=c.generateX25519KeyPairFromSeed(r):this.staticKey=c.generateX25519KeyPair(),this.prologue=i??Ht(0)}[Symbol.toStringTag]="@chainsafe/libp2p-noise";[ZE]=["@libp2p/connection-encryption","@chainsafe/libp2p-noise"];async secureOutbound(t,n){const r=t.log?.newScope("noise")??this.log,o=em(t,{lengthEncoder:ic,lengthDecoder:ac,maxDataLength:li}),s=await this.performHandshakeInitiator(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Jd(s.payload.identityKey);return{connection:lm(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:qo(i),streamMuxer:n?.skipStreamMuxerNegotiation===!0?void 0:this.getStreamMuxer(s.payload.extensions?.streamMuxers)}}getStreamMuxer(t){if(t==null||t.length===0)return;const n=this.components.upgrader.getStreamMuxers();if(n!=null)for(const r of t){const o=n.get(r);if(o!=null)return o}if(t.length)throw new KE("Early muxer negotiation was requested but the initiator and responder had no common muxers")}async secureInbound(t,n){const r=t.log?.newScope("noise")??this.log,o=em(t,{lengthEncoder:ic,lengthDecoder:ac,maxDataLength:li}),s=await this.performHandshakeResponder(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Jd(s.payload.identityKey);return{connection:lm(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:qo(i),streamMuxer:n?.skipStreamMuxerNegotiation===!0?void 0:this.getStreamMuxer(s.payload.extensions?.streamMuxers)}}async performHandshakeInitiator(t,n,r,o,s){let i;const a=s?.skipStreamMuxerNegotiation===!0?[]:[...this.components.upgrader.getStreamMuxers().keys()];try{i=await DR({connection:t,privateKey:n,remoteIdentityKey:o,log:r.newScope("xxhandshake"),crypto:this.crypto,prologue:this.prologue,s:this.staticKey,extensions:{streamMuxers:a,webtransportCerthashes:[],...this.extensions}},s),this.metrics?.xxHandshakeSuccesses.increment()}catch(c){throw this.metrics?.xxHandshakeErrors.increment(),c}return i}async performHandshakeResponder(t,n,r,o,s){let i;const a=s?.skipStreamMuxerNegotiation===!0?[]:[...this.components.upgrader.getStreamMuxers().keys()];try{i=await OR({connection:t,privateKey:n,remoteIdentityKey:o,log:r.newScope("xxhandshake"),crypto:this.crypto,prologue:this.prologue,s:this.staticKey,extensions:{streamMuxers:a,webtransportCerthashes:[],...this.extensions}},s),this.metrics?.xxHandshakeSuccesses.increment()}catch(c){throw this.metrics?.xxHandshakeErrors.increment(),c}return i}}function BR(e={}){return t=>new MR(t,e)}const FR="termdock-e2ee-v1",su=3600*1e3,dm=512*1024*1024,iu=4*1024*1024,Sa=()=>{},Vc=Object.assign(Sa,{enabled:!1,error:Sa,trace:Sa,newScope:()=>Vc});Object.freeze(Vc);async function rx(){const e=await rT();return{privateKey:e,peerId:qo(e.publicKey).toString()}}function UR(e){return btoa(String.fromCharCode(...iT(e.privateKey)))}function um(e){if(e.length>512||!/^[A-Za-z0-9+/]+={0,2}$/.test(e))throw new Error("Invalid identity encoding");const t=sT(Uint8Array.from(atob(e),n=>n.charCodeAt(0)));if(t.type!=="Ed25519")throw new Error("Only Ed25519 device identities are supported");return{privateKey:t,peerId:qo(t.publicKey).toString()}}class ox{constructor(t=Sa){this.consumed=t}consumed;chunks=[];size=0;ended=!1;error;wake;push(t){if(this.ended)throw this.error??new Error("Byte stream closed");if(this.size+t.byteLength>iu)throw new Error("Secure stream buffer limit exceeded");this.chunks.push(t.slice()),this.size+=t.byteLength,this.wake?.()}end(t){this.ended=!0,this.error??=t,this.wake?.()}async*[Symbol.asyncIterator](){for(;;){if(this.error)throw this.error;const t=this.chunks.shift();if(t)this.size-=t.byteLength,yield t,this.consumed();else{if(this.ended)return;await new Promise(n=>{this.wake=n})}}}}class HR extends Kv{constructor(t,n){super({log:Vc,direction:n?"outbound":"inbound",maxReadBufferLength:iu,maxWriteBufferLength:iu}),this.duplex=t,this.finished=t.sink(this.outgoing).catch(r=>{this.abort(Ko(r))}),this.readTransport()}duplex;outgoing=new ox(()=>this.onMuxerDrain());finished;async readTransport(){try{for await(const t of this.duplex.source)this.onData(t.slice());this.onTransportClosed()}catch(t){this.onTransportClosed(Ko(t))}}sendData(t){return this.outgoing.push(t.subarray()),{sentBytes:t.byteLength,canSendMore:!1}}sendReset(t){this.outgoing.end(t),this.duplex.close?.(t)}sendPause(){}sendResume(){}async close(){this.outgoing.end(),this.duplex.close?.(),this.onTransportClosed(),await this.finished}}function Ko(e){return e instanceof Error?e:new Error("Secure transport failed")}class $R extends Error{code="E2EE_REHANDSHAKE_REQUIRED";constructor(){super("Encrypted connection lifetime reached; establish a new handshake without replaying pending input")}}function zR(e){const t=e?.maxAgeMs??su,n=e?.maxBytesPerDirection??dm;if(!Number.isSafeInteger(t)||t<=0||t>su||!Number.isSafeInteger(n)||n<=0||n>dm)throw new Error("Encrypted connection limits cannot exceed the production maximum");return{maxAgeMs:t,maxBytesPerDirection:n}}async function sx(e){const{identity:t,duplex:n,initiator:r,targetPinnedPeerId:o,signal:s}=e,i=zR(e.limits);if(typeof Reflect.get(Promise,"withResolvers")!="function"||typeof globalThis.crypto?.getRandomValues!="function")throw new Error("End-to-end encryption requires Node.js 22+ or a modern browser with Promise.withResolvers and secure random support");if(r&&!o)throw new Error("A pinned target identity is required");const a=o?dT(o):void 0;if(a&&a.type!=="Ed25519")throw new Error("Only Ed25519 target identities are supported");if(t.peerId!==qo(t.privateKey.publicKey).toString())throw new Error("Local identity mismatch");if(s?.aborted)throw s.reason??new Error("Connection aborted");const c=new HR(n,r),d=new AbortController,u=setTimeout(()=>{const p=new Error("Encrypted handshake timed out");d.abort(p),c.abort(p)},15e3),f=()=>{d.abort(s?.reason),c.abort(Ko(s?.reason))};s?.addEventListener("abort",f,{once:!0}),c.addEventListener("close",()=>s?.removeEventListener("abort",f),{once:!0});const h=BR({crypto:Vv,prologueBytes:new TextEncoder().encode(FR)})({privateKey:t.privateKey,peerId:qo(t.privateKey.publicKey),logger:{forComponent:()=>Vc},upgrader:{getStreamMuxers:()=>new Map}});try{const p=await(r?h.secureOutbound(c,{remotePeer:a,signal:d.signal,skipStreamMuxerNegotiation:!0}):h.secureInbound(c,{remotePeer:a,signal:d.signal,skipStreamMuxerNegotiation:!0}));if(p.remotePeer.type!=="Ed25519")throw new Error("Unsupported remote identity");return{authenticatedPeerId:p.remotePeer.toString(),duplex:qR(p.connection,i)}}catch(p){throw c.abort(Ko(p)),p}finally{clearTimeout(u),s?.removeEventListener("abort",f)}}function qR(e,t){const n=new ox,r=performance.now(),o=Date.now();let s=0,i=0,a;const c=()=>(a??=new $R,n.end(a),e.abort(a),a),d=setTimeout(c,t.maxAgeMs);typeof d=="object"&&d.unref?.();const u=(h,p)=>{if(a)throw a;if(Math.max(performance.now()-r,Date.now()-o)>=t.maxAgeMs||h+p>=t.maxBytesPerDirection)throw c()};e.addEventListener("message",h=>{try{u(i,h.data.byteLength),i+=h.data.byteLength,n.push(h.data.subarray())}catch(p){e.abort(Ko(p))}}),e.addEventListener("close",h=>{clearTimeout(d),n.end(h.error)},{once:!0});let f=!1;return{source:n,async sink(h){if(f)throw new Error("Secure sink already consumed");f=!0;try{for await(const p of h)u(s,p.byteLength),s+=p.byteLength,e.send(p)||await e.onDrain()}catch(p){throw e.abort(Ko(p)),p}},close(h){h?e.abort(h):e.close()}}}const au=1012,cu="Encrypted transport renewed",ix=2*1024*1024,KR=new TextEncoder,GR=new TextDecoder("utf-8",{fatal:!0});async function ax(e,t){const r=new Blob([e]).stream().pipeThrough(t).getReader(),o=[];let s=0;try{for(;;){const{done:c,value:d}=await r.read();if(c)break;if(s+=d.byteLength,s>ix)throw new Error("Expanded record exceeds budget");o.push(d)}}catch(c){throw await r.cancel(c).catch(()=>{}),c}finally{r.releaseLock()}const i=new Uint8Array(s);let a=0;for(const c of o)i.set(c,a),a+=c.byteLength;return i}async function WR(e,t){if(e.byteLength<4096||typeof CompressionStream>"u")return e;const n=await ax(e.subarray(4),new CompressionStream("gzip"));let r="";for(let i=0;i<n.length;i+=8192)r+=String.fromCharCode(...n.subarray(i,i+8192));const o=KR.encode(JSON.stringify({type:"compressed",id:t,encoding:"gzip",data:btoa(r)}));if(o.byteLength+4>=e.byteLength*.9)return e;const s=new Uint8Array(o.byteLength+4);return new DataView(s.buffer).setUint32(0,o.byteLength),s.set(o,4),s}async function VR(e){if(typeof e!="string"||e.length>Math.ceil(ix/3)*4)throw new Error("Invalid compressed record");const t=Uint8Array.from(atob(e),r=>r.charCodeAt(0)),n=await ax(t,new DecompressionStream("gzip"));return JSON.parse(GR.decode(n))}const Bf=64*1024,cx=8;function YR(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=1?Math.min(e,cx):1}const XR=2147483648,JR=new TextEncoder,ZR=new TextDecoder("utf-8",{fatal:!0});function QR(e){if(!(e.bytes instanceof Uint8Array))return;if(!["upload","chunk"].includes(e.type))throw new Error("Invalid binary record type");const t=JR.encode(e.id);if(!t.length||t.length>128||e.bytes.length>Bf)throw new Error("Invalid binary record size");const n=new Uint8Array(2+t.length+e.bytes.length);return n[0]=e.type==="upload"?1:2,n[1]=t.length,n.set(t,2),n.set(e.bytes,2+t.length),n}function e2(e){const t=e[0],n=e[1];if(![1,2].includes(t)||!n||n>128||e.length<2+n||e.length-2-n>Bf)throw new Error("Invalid binary record");return{type:t===1?"upload":"chunk",id:ZR.decode(e.subarray(2,2+n)),bytes:e.slice(2+n)}}class Ff{constructor(t=64){this.limit=t}limit;items=[];wake;ended=!1;error;tryPush(t){if(this.ended)throw new Error("Channel closed");return this.items.length>=this.limit?!1:(this.items.push(t),this.wake?.(),!0)}push(t){if(this.ended)throw new Error("Channel closed");if(this.items.length>=this.limit)throw this.end(new Error("Channel queue exceeded")),this.error;this.items.push(t),this.wake?.()}get size(){return this.items.length}end(t){this.ended=!0,this.error??=t,this.wake?.()}clear(){this.items.length=0}async*[Symbol.asyncIterator](){for(;;){if(this.error)throw this.error;const t=this.items.shift();if(t!==void 0){yield t;continue}if(this.ended)return;await new Promise(n=>{this.wake=n}),this.wake=void 0}}}class ia extends Error{code="PACKET_QUEUE_BACKPRESSURE";constructor(t="Record queue capacity exceeded"){super(t),this.name="PacketQueueBackpressureError"}}const Ea=2*1024*1024,t2=Ea*2+8,fm=64*1024,n2=new TextEncoder,r2=new TextDecoder("utf-8",{fatal:!0});class lx{constructor(t){this.duplex=t;const n=this;this.done=t.sink((async function*(){for await(const r of n.outgoing)try{yield r.compress?await WR(r.bytes,r.id):r.bytes}finally{n.releaseQueuedPacket(r)}})()),this.done.then(()=>this.discardPending(),r=>this.discardPending(r instanceof Error?r:new Error("Transport failed")))}duplex;outgoing=new Ff(256);outgoingBytes=0;queuedBytesById=new Map;writeWaiters=new Set;closed=!1;get hasPendingWrites(){return this.outgoingBytes>0}queuedBytesFor(t){return this.queuedBytesById.get(t)??0}done;send(t,n=!1){if(this.closed)throw new Error("Channel closed");if(this.outgoing.size>=256)throw new ia("Record queue item limit exceeded");const r=QR(t),o=r??n2.encode(JSON.stringify(t));if(o.length>Ea)throw new Error("Record too large");const s=new Uint8Array(o.length+4);if(new DataView(s.buffer).setUint32(0,r?o.length+XR:o.length),s.set(o,4),this.outgoingBytes+s.byteLength>4*1024*1024)throw new ia("Record queue byte budget exceeded");const i={id:t.id,bytes:s,compress:n};if(!this.outgoing.tryPush(i))throw new ia("Record queue item limit exceeded");this.outgoingBytes+=s.byteLength,this.queuedBytesById.set(t.id,this.queuedBytesFor(t.id)+s.byteLength)}async sendBulk(t,n,r){const o=Date.now();for(;;){if(n.aborted)throw n.reason??new Error("CANCELLED");if(this.closed)throw new Error("Channel closed");if(this.outgoingBytes<512*1024&&this.outgoing.size<128){r?.();try{this.send(t);return}catch(s){if(!(s instanceof ia))throw s}}if(Date.now()-o>=3e4)throw new Error("Encrypted transport congested");await new Promise((s,i)=>{const a=()=>{clearTimeout(u),n.removeEventListener("abort",c),this.writeWaiters.delete(d)},c=()=>{a(),i(n.reason??new Error("CANCELLED"))},d=()=>{a(),s()},u=setTimeout(()=>{a(),i(new Error("Encrypted transport congested"))},Math.max(1,3e4-(Date.now()-o)));this.writeWaiters.add(d),n.addEventListener("abort",c,{once:!0}),n.aborted&&c()})}}releaseQueuedPacket(t){this.outgoingBytes=Math.max(0,this.outgoingBytes-t.bytes.byteLength);for(const o of this.writeWaiters)o();const n=this.queuedBytesById.get(t.id);if(n===void 0)return;const r=n-t.bytes.byteLength;r>0?this.queuedBytesById.set(t.id,r):this.queuedBytesById.delete(t.id)}close(t){this.discardPending(t)}abort(t){this.discardPending(t)}discardPending(t){if(!this.closed){this.closed=!0,this.outgoing.clear(),this.outgoing.end(t),this.outgoingBytes=0,this.queuedBytesById.clear();for(const n of this.writeWaiters)n();this.duplex.close?.(t)}}async*read(){const t=[];let n=0,r=0,o;const s=u=>{if(u[0]&128)return e2(u.subarray(4));const f=JSON.parse(r2.decode(u.subarray(4)));if(!f||typeof f!="object"||typeof f.id!="string"||typeof f.type!="string")throw new Error("Invalid record");return f},i=u=>{let f=0;for(;f<u.byteLength;){let h=t[t.length-1];(!h||h.end===h.bytes.byteLength)&&(h={bytes:o??new Uint8Array(fm),start:0,end:0},o=void 0,t.push(h));const p=Math.min(u.byteLength-f,h.bytes.byteLength-h.end);h.bytes.set(u.subarray(f,f+p),h.end),h.end+=p,f+=p}r+=u.byteLength},a=u=>{let f=n,h=u;for(;f<t.length;){const p=t[f];if(!p){f++;continue}const g=p.end-p.start;if(h<g)return p.bytes[p.start+h];h-=g,f++}throw new Error("Incomplete record header")},c=u=>{for(r-=u;u>0;){const f=t[n];if(!f){n++;continue}const h=Math.min(u,f.end-f.start);f.start+=h,u-=h,f.start===f.end&&(!o&&f.bytes.byteLength===fm&&(o=f.bytes),t[n]=void 0,n++)}r===0?(t.length=0,n=0,o=void 0):n>=64&&n*2>=t.length&&(t.splice(0,n),n=0)},d=u=>{const f=t[n];if(!f)throw new Error("Incomplete record body");if(f.end-f.start>=u){const b=f.bytes.subarray(f.start,f.start+u);return c(u),b}const p=new Uint8Array(u);let g=n,m=0;for(;m<u;){const b=t[g];if(!b){g++;continue}const y=Math.min(u-m,b.end-b.start);p.set(b.bytes.subarray(b.start,b.start+y),m),m+=y,g++}return c(u),p};for await(const u of this.duplex.source){if(r+u.byteLength>t2)throw new Error("Record buffer exceeded");if(r===0&&u.byteLength>=5){const f=(u[0]&127)*16777216+(u[1]<<16)+(u[2]<<8)+u[3]>>>0;if(f>Ea||f===0)throw new Error("Invalid record size");if(u.byteLength===f+4){yield s(u);continue}}for(u.byteLength&&i(u);r>=4;){const f=(a(0)&127)*16777216+(a(1)<<16)+(a(2)<<8)+a(3)>>>0;if(f>Ea||f===0)throw new Error("Invalid record size");if(r<f+4)break;const h=d(f+4);yield s(h)}}if(r)throw new Error("Truncated record")}}function dx(e){let t="";for(let n=0;n<e.length;n+=8192)t+=String.fromCharCode(...e.subarray(n,n+8192));return btoa(t)}function ux(e){const t=atob(e);return Uint8Array.from(t,n=>n.charCodeAt(0))}function o2(e){const t=new Ff(64);e.binaryType="arraybuffer";const n=r=>{t.end(r),e.close(1e3)};return e.addEventListener("message",r=>{try{if(!(r.data instanceof ArrayBuffer)||r.data.byteLength>1024*1024)throw new Error("Invalid encrypted frame");t.push(new Uint8Array(r.data))}catch{n(new Error("Encrypted transport rejected frame"))}}),e.addEventListener("close",()=>t.end(e.transportFailure)),e.addEventListener("error",()=>t.end(e.transportFailure||new Error("Encrypted transport disconnected"))),{source:t,close:n,async sink(r){try{for await(const o of r)for(let s=0;s<o.length;s+=64*1024){const i=Date.now();for(;e.bufferedAmount>256*1024;){if(e.readyState!==1||Date.now()-i>15e3)throw new Error("Encrypted transport congested");await new Promise(a=>setTimeout(a,10))}if(e.readyState!==1)throw e.transportFailure||new Error("Encrypted transport closed");e.send(o.subarray(s,s+64*1024))}}catch(o){throw n(o instanceof Error?o:new Error("Encrypted transport failed")),o}}}}const hm="/api/federation/transport",s2=4e3,i2=4e3;function a2(e,t=Date.now()){if(!e||typeof e!="object")return;const n=e;if(!(n.version!==1||n.path!==hm||!Number.isSafeInteger(n.port)||n.port<1||n.port>65535||typeof n.certificateHash!="string"||!/^[a-f0-9]{64}$/.test(n.certificateHash)||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=t||n.expiresAt>t+14*864e5))return{version:1,path:hm,port:n.port,certificateHash:n.certificateHash,expiresAt:n.expiresAt}}async function pm(e,t,n){return new Promise((r,o)=>{const s=()=>{n(),o(t.reason??new Error("Transport aborted"))};t.addEventListener("abort",s,{once:!0}),e.then(i=>{t.removeEventListener("abort",s),r(i)},i=>{t.removeEventListener("abort",s),o(i)}),t.aborted&&s()})}function mm(e){const t=e.readable.getReader(),n=e.writable.getWriter();let r=!1,o=0;const s=i=>{r||(r=!0,t.cancel(i).catch(()=>{}),(i?n.abort(i):n.close()).catch(()=>{}))};return{close:s,bufferedBytes:()=>o,source:{async*[Symbol.asyncIterator](){try{for(;!r;){const{done:i,value:a}=await t.read();if(i)return;if(!(a instanceof Uint8Array))throw new Error("Invalid transport stream bytes");yield a}}finally{t.releaseLock()}}},async sink(i){try{for await(const a of i)for(let c=0;c<a.byteLength;c+=64*1024){if(r)throw new Error("Transport stream closed");const d=a.subarray(c,c+64*1024);o=d.byteLength;try{await n.write(d)}finally{o=0}}await n.close()}catch(a){throw s(a instanceof Error?a:new Error("Transport stream failed")),a}finally{n.releaseLock()}}}}function c2(){const e=globalThis.WebTransport;return e?(t,n)=>new e(t,n):void 0}async function l2(e){const t=new URL(e.baseUrl);if(!["wss:","https:"].includes(t.protocol))throw new Error("QUIC requires a secure service origin");t.protocol="https:",t.port=String(e.descriptor.port),t.pathname=e.descriptor.path,t.search="",t.hash="",t.hostname==="localhost"&&(t.hostname="127.0.0.1");const n=Uint8Array.from(e.descriptor.certificateHash.match(/../g),h=>parseInt(h,16)),r=performance.now(),o=e.factory(t.href,{serverCertificateHashes:[{algorithm:"sha-256",value:n.buffer}]});let s=!1,i=!1;const a=new Set,c=new AbortController,d=()=>{if(!i){i=!0,s=!1,c.abort(new Error("QUIC session closed")),e.signal?.removeEventListener("abort",d);for(const h of a)h.close?.(new Error("QUIC session closed"));o.close({closeCode:0,reason:"Secure session closed"})}};o.closed.then(d,d),e.signal?.addEventListener("abort",d,{once:!0});const u=AbortSignal.any([c.signal,AbortSignal.timeout(s2),...e.signal?[e.signal]:[]]);try{await pm(o.ready,u,d)}catch(h){throw d(),h}s=!0;const f=performance.now()-r;return{get available(){return s&&!i&&e.descriptor.expiresAt>Date.now()},closed:o.closed.then(()=>{},()=>{}),close:d,async open(h,p){if(!s||i)throw new Error("QUIC session unavailable");const g=AbortSignal.any([c.signal,AbortSignal.timeout(i2),...p?[p]:[]]),m=o.createBidirectionalStream({sendOrder:h==="socket"?10:0});m.then(T=>{g.aborted&&mm(T).close?.(new Error("Stream cancelled"))},()=>{});const b=await pm(m,g,()=>{}),y=mm(b),k=y.close;y.close=T=>{a.delete(y),k?.(T)},a.add(y);const x=performance.now();try{const T=await sx({identity:e.identity,initiator:!0,targetPinnedPeerId:e.targetPeerId,duplex:y,signal:g});return{duplex:{...T.duplex,bufferedBytes:y.bufferedBytes},diagnostics:{endpoint:t.host,path:"direct",targetPeerId:T.authenticatedPeerId,transport:"webtransport",transportOpenMs:f,handshakeMs:performance.now()-x,establishedAt:Date.now(),bufferedBytes:0,pendingWrites:!1,activeRequests:0,waitingRequests:0}}}catch(T){throw y.close?.(T instanceof Error?T:new Error("Secure stream failed")),T}}}}class Ot extends pt{constructor(){super("TARGET_AUTHORIZATION_REQUIRED")}}const aa=new WeakMap;function Jr(e,t={}){const n=aa.get(e);if(!e.closed&&n&&(!n.settled||Date.now()-n.at<(t.maxAgeMs??1e3)))return n.pending;const r={at:Date.now(),settled:!1,pending:void 0},o=d2(e,t.timeoutMs??5e3).then(s=>(r.at=Date.now(),r.settled=!0,s),s=>{throw aa.get(e)===r&&aa.delete(e),s});return r.pending=o,aa.set(e,r),o}async function d2(e,t){const n=await e.request({type:"permissions"},{timeoutMs:t});if(n.type!=="result"||typeof n.fullService!="boolean"||!Array.isArray(n.grants))throw new Error("Invalid permission response");const r=n.grants,o=n.fullService===!0;if(!o&&r.length===0)throw new Ot;return{fullService:o,grants:r,canManage:o&&r.length>0||r.some(s=>s.actions.includes("authorization.manage"))}}const u2=rb+Dd+8,f2=256,ca=3e4,la=Bf;function Vt(e){return e instanceof Error?e:new Error(String(e??"Secure connection closed"))}function $l(e){if(!e.startsWith("/")||e.startsWith("//")||e.includes("#"))throw new Error("A local API path is required");return e}class lu extends EventTarget{constructor(t,n,r,o=()=>0){super(),this.url=t,this.transmit=n,this.disconnect=r,this.pendingBytes=o}url;transmit;disconnect;pendingBytes;CONNECTING=0;OPEN=1;CLOSING=2;CLOSED=3;binaryType="arraybuffer";get bufferedAmount(){return this.pendingBytes()}protocol="termdock-e2ee-v1";extensions="";getConnectionDiagnostics;createdAt=performance.now();openedAfterMs;readyState=0;onopen=null;onmessage=null;onerror=null;onclose=null;send(t){if(this.readyState!==1)throw new Error("Secure socket is not open");if(typeof t!="string"||new TextEncoder().encode(t).length>1024*1024)throw new Error("Unsupported socket payload");this.transmit(t)}close(t=1e3,n=""){this.readyState!==3&&(this.disconnect(),this.finish(t,n))}accept(t){if(this.readyState!==3)if(t.type==="ws-ready"){this.openedAfterMs=performance.now()-this.createdAt,this.readyState=1;const n=new Event("open");this.dispatchEvent(n),this.onopen?.(n)}else if(t.type==="ws-data"&&typeof t.data=="string"){const n=new MessageEvent("message",{data:t.data});this.dispatchEvent(n),this.onmessage?.(n)}else t.type==="ws-close"?this.finish(typeof t.code=="number"?t.code:1e3,typeof t.reason=="string"?t.reason:""):t.type==="error"&&this.fail(Vt(t.error))}fail(t){if(this.readyState===3)return;const n=new Event("error");this.dispatchEvent(n),this.onerror?.(n),this.finish(1006,t.message)}finish(t,n){if(this.readyState===3)return;this.readyState=3;const r=new CloseEvent("close",{code:t,reason:n,wasClean:t===1e3});this.dispatchEvent(r),this.onclose?.(r)}}class Uf{constructor(t,n,r){this.channel=t,this.identity=n,this.targetPeerId=r,this.read().catch(o=>this.sharedConnectionFailed(Vt(o))),t.done.catch(o=>this.sharedConnectionFailed(Vt(o)))}channel;identity;targetPeerId;transportDiagnostics;establishedAt=performance.now();establishedWallTime=Date.now();lastInputAt=-1/0;pending=new Map;waiting=[];stopped=!1;closeReason;httpWindow=1;binaryChunks=!1;streamConnector;streamPool;streamDescriptor;streamConnecting=!1;streamRetryAt=0;streamFailure;get webTransportFailure(){return this.streamFailure?.message}streamAbort=new AbortController;streamChildren=new Set;idleHttpStreams=[];operationGeneration=0;quicControl;sharedTransportClosed=!1;socketUpgradeTimer;idleHook;closedHook;get transport(){return this.streamPool?.available?"webtransport":this.transportDiagnostics?.().transport??"websocket"}get canSwitchTransport(){return!this.channel.hasPendingWrites&&performance.now()-this.lastInputAt>=2e3&&![...this.pending.values()].some(t=>t.kind!=="socket")&&!this.waiting.some(t=>t.kind!=="socket")&&[...this.streamChildren].every(t=>t.canSwitchTransport)}get renewalDue(){return!this.stopped&&Math.max(performance.now()-this.establishedAt,Date.now()-this.establishedWallTime)>=su-5*6e4}get closed(){return this.stopped}configureWebTransport(t){this.streamConnector=t}sharedConnectionFailed(t){if(!this.stopped){if(this.sharedTransportClosed=!0,!this.streamPool?.available||!this.quicControl||this.quicControl.closed){this.close(t);return}for(const[n,r]of this.pending)r.delegated||(r.queue.end(t),r.cancelUpload?.(),r.socket?.fail(t),this.release(n))}}streamClient(t){const n=new Uf(new lx(t.duplex),this.identity,this.targetPeerId);return n.httpWindow=this.httpWindow,n.binaryChunks=this.binaryChunks,n.transportDiagnostics=()=>({...t.diagnostics,bufferedBytes:t.duplex.bufferedBytes?.()??0}),this.streamChildren.add(n),n.closedHook=()=>{this.streamChildren.delete(n)},n}recordCapabilities(t){this.httpWindow=YR(t.httpWindow),this.binaryChunks=t.binaryChunks===!0;const n=a2(t.webTransport);n&&(this.streamDescriptor=n,this.startStreams())}startStreams(){if(!this.streamConnector||!this.streamDescriptor||this.stopped||this.streamPool?.available||this.streamConnecting||Date.now()<this.streamRetryAt)return;this.streamConnecting=!0;const t=this.streamDescriptor;(async()=>{let n,r;try{n=await this.streamConnector(t,this.streamAbort.signal),r=this.streamClient(await n.open("socket",this.streamAbort.signal));const o=await r.request({type:"permissions"},{timeoutMs:4e3});if(o.type!=="result"||typeof o.fullService!="boolean"||!Array.isArray(o.grants))throw new Error("Invalid permission response");if(!o.fullService&&!o.grants.length)throw new Ot;if(this.stopped)throw new Error("Secure connection closed");this.quicControl=r,this.streamPool=n,this.streamFailure=void 0;const s=n,i=r.closedHook;r.closedHook=()=>{i?.(),!this.stopped&&this.quicControl===r&&s.close()},n.closed.then(()=>{this.streamPool!==s||this.stopped||(this.streamPool=void 0,this.quicControl?.close(),this.quicControl=void 0,this.streamRetryAt=Date.now()+3e4,this.sharedTransportClosed&&this.close(new Error("Secure connection closed")))}),this.renewSharedSockets()}catch(o){this.streamFailure=Vt(o),r?.close(),n?.close(),this.streamRetryAt=Date.now()+3e4,(o instanceof Ot||o instanceof Error&&o.name==="UnexpectedPeerError")&&this.close(Vt(o))}finally{this.streamConnecting=!1}})()}renewSharedSockets(){if(!(this.stopped||!this.streamPool?.available)){if(performance.now()-this.lastInputAt<2e3||this.channel.hasPendingWrites){this.socketUpgradeTimer=setTimeout(()=>this.renewSharedSockets(),250);return}for(const[t,n]of this.pending)if(!(!n.socket||n.delegated)){n.socket.accept({type:"ws-close",id:t,code:au,reason:cu});try{this.channel.send({type:"ws-close",id:t})}catch{}this.release(t)}}}async operationStream(t,n){if(this.stopped)throw this.closeReason??new Error("Secure connection closed");this.startStreams();const r=this.streamPool;if(!r?.available){if(this.sharedTransportClosed)throw new Error("Secure connection closed");return}const o=await this.reserve(t,n);this.pending.get(o.id).delegated=!0;try{let s;if(t==="http")for(;this.idleHttpStreams.length;){const u=this.idleHttpStreams.pop();if(!u.closed&&!u.renewalDue){s=u;break}u.close()}if(s||(s=this.streamClient(await r.open(t,AbortSignal.any([this.streamAbort.signal,...n?[n]:[]])))),this.stopped||n?.aborted)throw s.close(),n?.reason??new Error("Secure connection closed");const i=s,a=i.operationGeneration+1;let c=!1;const d=()=>{c||(c=!0,this.release(o.id))};return i.closedHook=()=>{this.streamChildren.delete(i),this.idleHttpStreams=this.idleHttpStreams.filter(u=>u!==i),d()},i.idleHook=()=>{queueMicrotask(()=>{c||i.pending.size||i.operationGeneration<a||(d(),t==="http"&&!i.closed&&!i.renewalDue&&r===this.streamPool&&r.available&&this.idleHttpStreams.length<Dd?this.idleHttpStreams.push(i):i.close())})},s}catch(s){if(this.release(o.id),s instanceof Error&&s.name==="UnexpectedPeerError"&&this.close(s),n?.aborted||this.stopped||s instanceof Error&&s.name==="UnexpectedPeerError"||this.sharedTransportClosed)throw s;return}}hasCapacity(t){if(this.pending.size>=u2)return!1;const n=[...this.pending.values()].filter(r=>r.kind===t).length;return t==="http"?n<Dd:t==="socket"?n<rb:!0}allocate(t){if(this.stopped)throw this.closeReason??new Error("Secure connection closed");const n=crypto.randomUUID(),r=new Ff(t==="http"?cx+4:4);return this.operationGeneration++,this.pending.set(n,{queue:r,kind:t}),{id:n,queue:r}}reserve(t,n){return n?.aborted?Promise.reject(n.reason):this.stopped?Promise.reject(this.closeReason??new Error("Secure connection closed")):this.hasCapacity(t)?Promise.resolve(this.allocate(t)):this.waiting.length>=f2?Promise.reject(new Error("连接繁忙,请稍后重试。")):new Promise((r,o)=>{const s=d=>{this.waiting=this.waiting.filter(u=>u!==c),c.cleanup(),o(d)},i=()=>s(n?.reason??new Error("Request aborted")),a=setTimeout(()=>s(new Error("连接等待超时,请重试。")),ca),c={kind:t,resolve:r,reject:o,cleanup:()=>{clearTimeout(a),n?.removeEventListener("abort",i)}};this.waiting.push(c),n?.addEventListener("abort",i,{once:!0})})}dispatchWaiting(){if(!this.stopped)for(let t=0;t<this.waiting.length;){const n=this.waiting[t];if(!this.hasCapacity(n.kind)){t++;continue}this.waiting.splice(t,1),n.cleanup(),n.resolve(this.allocate(n.kind))}}async read(){try{for await(let t of this.channel.read()){if(t.type==="compressed"){if(t.encoding!=="gzip")throw new Error("Invalid record encoding");const r=await VR(t.data);if(!r||r.type!=="ws-data"||r.id!==t.id||typeof r.data!="string")throw new Error("Invalid compressed socket record");t=r}const n=this.pending.get(t.id);n&&(n.socket?(n.socket.accept(t),(t.type==="ws-close"||t.type==="error")&&this.release(t.id)):(n.queue.push(t),(t.type==="end"||t.type==="error")&&(n.cancelUpload?.(),this.release(t.id))))}}catch(t){this.sharedConnectionFailed(Vt(t))}finally{this.sharedConnectionFailed(new Error("Secure connection closed"))}}release(t){this.pending.get(t)?.queue.end(),this.pending.delete(t),this.dispatchWaiting(),this.idleHook?.()}async request(t,n){if(this.quicControl&&!this.quicControl.closed){const i=await this.quicControl.request(t,n);return t.type==="permissions"&&i.type==="result"&&this.recordCapabilities(i),i}const{id:r,queue:o}=await this.reserve("request"),s=setTimeout(()=>this.close(new Error("Secure connection timed out")),Math.max(1e3,Math.min(ca,n?.timeoutMs??ca)));try{if(this.stopped)throw this.closeReason;this.channel.send({...t,id:r});const i=(await o[Symbol.asyncIterator]().next()).value;if(!i)throw new Error("Secure request closed");if(i.type==="error")throw i.error==="AUTHORIZATION_DENIED"?new pt("PERMISSION_DENIED",{targetServiceId:this.targetPeerId}):Vt(i.error);return t.type==="permissions"&&i.type==="result"&&this.recordCapabilities(i),i}finally{clearTimeout(s),this.release(r)}}openSocket(t){if($l(t),!this.streamPool?.available)return this.startStreams(),this.openSharedSocket(t);const n=new AbortController;let r;const o=new lu(t,s=>r?.send(s),()=>{n.abort(),r?.close()},()=>r?.bufferedAmount??0);return this.operationStream("socket",n.signal).then(s=>{if(o.readyState===3){s?.close();return}r=(s??this).openSharedSocket(t),o.getConnectionDiagnostics=()=>r?.getConnectionDiagnostics?.(),r.onopen=()=>o.accept({type:"ws-ready",id:""}),r.onmessage=i=>o.accept({type:"ws-data",id:"",data:i.data}),r.onclose=i=>o.accept({type:"ws-close",id:"",code:i.code,reason:i.reason}),r.onerror=()=>o.fail(new Error("Encrypted stream unavailable"))}).catch(s=>o.fail(Vt(s))),o}openSharedSocket(t){$l(t);let n;const r=new AbortController,o=new lu(t,i=>{if(n){try{JSON.parse(i)?.type==="input"&&(this.lastInputAt=performance.now())}catch{}this.channel.send({id:n,type:"ws-data",data:i})}},()=>{if(r.abort(),n)try{this.channel.send({id:n,type:"ws-close"})}finally{this.release(n)}},()=>n?this.channel.queuedBytesFor(n):0);let s;return o.getConnectionDiagnostics=()=>{const i=this.transportDiagnostics?.();return i?{...i,socketOpenMs:o.openedAfterMs,socketQueueMs:s,pendingWrites:this.channel.hasPendingWrites,activeRequests:[...this.pending.values()].filter(a=>a.kind!=="socket").length,waitingRequests:this.waiting.length}:void 0},this.reserve("socket",r.signal).then(i=>{if(s=performance.now()-o.createdAt,n=i.id,o.readyState===3){this.release(n);return}const a=this.pending.get(n);if(!a)throw new Error("Secure connection closed");a.socket=o,this.channel.send({id:n,type:"ws-open",path:t,compression:typeof DecompressionStream<"u"?"gzip":void 0})}).catch(i=>{n&&this.release(n),o.fail(Vt(i))}),o}async fetch(t,n){const r=typeof location>"u"?"https://termdock.invalid":location.origin,o=t instanceof Request?t:null,s=new URL(o?.url??String(t),r);if(s.origin!==r)throw new Error("Only current-service API requests are supported");const i=new Request(s,o?new Request(o,n):n),a=i.method.toUpperCase(),c=$l(s.pathname+s.search),d=zE(s.pathname);if(i.signal.aborted)throw i.signal.reason;const u=await this.operationStream("http",i.signal);if(u)try{return await u.fetch(i,{onUploadProgress:n?.onUploadProgress})}catch(_){throw u.close(Vt(_)),_}const f={};i.headers.forEach((_,A)=>{["cookie","authorization","host","connection","content-length"].includes(A)||(f[A]=_)});const{id:h,queue:p}=await this.reserve("http",i.signal),g=p[Symbol.asyncIterator]();let m;const b=()=>{m?.cancel().catch(()=>{})},y=this.pending.get(h);if(!y)throw new Error("Secure connection closed");y.cancelUpload=b;const k=()=>{b();try{this.channel.send({id:h,type:"cancel"})}catch{}p.end(Vt(i.signal.reason??"Request aborted")),this.release(h)};i.signal.addEventListener("abort",k,{once:!0});const x=()=>{i.signal.removeEventListener("abort",k),this.release(h)},T=async()=>{let _;try{const A=(await Promise.race([g.next(),new Promise((E,v)=>{_=setTimeout(()=>v(new Error("服务响应超时,请重试。")),ca)})])).value;if(!A)throw new Error("Secure response ended unexpectedly");if(A.type==="error")throw Vt(A.error);return A}finally{clearTimeout(_)}};try{if(i.signal.aborted)throw i.signal.reason;const _=this.httpWindow,A=this.binaryChunks;if(this.channel.send({id:h,type:"http",method:a,path:c,headers:f,window:_,binaryChunks:A}),i.body){const R=i.body.getReader();m=R;let C=0,N=0;const P=[],j=async()=>{if((await T()).type!=="upload-ack")throw new Error("Invalid upload acknowledgement");N+=P.shift(),n?.onUploadProgress?.(N)};try{for(;;){const{done:O,value:M}=await R.read();if(O)break;if(C+=M.byteLength,C>d)throw new Error("Request body exceeds upload limit");for(let F=0;F<M.byteLength;F+=la){P.length>=_&&await j();const B=M.subarray(F,F+la);await this.channel.sendBulk({id:h,type:"upload",...A?{bytes:B}:{data:dx(B)}},i.signal),P.push(B.byteLength)}}for(;P.length;)await j()}catch(O){throw await R.cancel(O).catch(()=>{}),O}finally{m=void 0,R.releaseLock()}}if(i.signal.aborted||this.stopped)throw new Error("Request aborted");this.channel.send({id:h,type:"upload-end"});const E=await T();if(E.type!=="head"||typeof E.status!="number")throw new Error("Invalid response header");const v=new Headers(E.headers);if(a==="HEAD"||[204,205,304].includes(E.status)){if((await T()).type!=="end")throw new Error("Unexpected response body");return x(),new Response(null,{status:E.status,headers:v})}let S=!1;const I=new ReadableStream({pull:async R=>{try{S&&(this.channel.send({id:h,type:"ack"}),S=!1);const C=await T();if(C.type==="end"){R.close(),x();return}if(C.type!=="chunk"||!(A&&C.bytes instanceof Uint8Array)&&typeof C.data!="string")throw new Error("Invalid response chunk");const N=A&&C.bytes instanceof Uint8Array?C.bytes:ux(C.data);if(N.length>la)throw new Error("Response chunk exceeds budget");R.enqueue(N),S=!0}catch(C){R.error(C),k(),x()}},cancel:()=>{k(),x()}},{highWaterMark:la,size:R=>R.byteLength});return new Response(I,{status:E.status,headers:v})}catch(_){throw k(),x(),_}}retire(){for(const t of this.streamChildren)t.retire();for(const t of this.pending.values())t.socket?.accept({id:"",type:"ws-close",code:au,reason:cu});this.close()}close(t=new Error("Secure connection closed")){if(!this.stopped){this.stopped=!0,this.closeReason=t,clearTimeout(this.socketUpgradeTimer),this.streamAbort.abort(t);for(const n of this.streamChildren)n.close(t);this.streamPool?.close();for(const n of this.waiting.splice(0))n.cleanup(),n.reject(t);for(const n of this.pending.values())n.queue.end(t),n.cancelUpload?.(),n.socket?.fail(t);this.pending.clear(),this.channel.close(t),this.closedHook?.()}}}async function zr(e){const t=new URL(e.url);if(!["wss:","ws:"].includes(t.protocol))throw new Error("A WebSocket endpoint is required");const n=typeof location<"u"&&location.protocol==="http:"&&location.host===t.host;if(t.protocol==="ws:"&&!["127.0.0.1","localhost","[::1]"].includes(t.hostname)&&!n)throw new Error("Remote WS requires its explicit same-origin HTTP page");const r=e.identity??await rx(),o=performance.now(),s=(e.socketFactory??(u=>new WebSocket(u)))(t.href),i=o2(s),a=new AbortController,c=setTimeout(()=>a.abort(new Error("Secure handshake timed out")),2e4),d=e.signal?AbortSignal.any([e.signal,a.signal]):a.signal;try{await new Promise((y,k)=>{if(d.aborted){k(d.reason);return}const x=()=>{d.removeEventListener("abort",A),s.removeEventListener("open",T),s.removeEventListener("error",_),s.removeEventListener("close",_)},T=()=>{x(),y()},_=()=>{x(),k(s.transportFailure||new Error("Secure transport unavailable"))},A=()=>{x(),k(d.reason)};d.addEventListener("abort",A,{once:!0}),s.addEventListener("open",T),s.addEventListener("error",_),s.addEventListener("close",_),s.readyState===1&&T()});const u=performance.now(),f=await sx({identity:r,duplex:i,initiator:!0,targetPinnedPeerId:e.targetPeerId,signal:d}),h=new Uf(new lx(f.duplex),r,f.authenticatedPeerId),p=performance.now(),g=Date.now(),m=s.connectionTimings;h.transportDiagnostics=()=>({endpoint:t.host,path:m?"relay":"direct",targetPeerId:f.authenticatedPeerId,transport:"websocket",transportOpenMs:u-o,handshakeMs:p-u,establishedAt:g,relay:m?{...m}:void 0,bufferedBytes:s.bufferedAmount,pendingWrites:!1,activeRequests:0,waitingRequests:0});const b=e.webTransportFactory??c2();if(e.webTransport!==!1&&!m&&t.protocol==="wss:"&&b&&h.configureWebTransport((y,k)=>l2({baseUrl:t.href,descriptor:y,identity:r,targetPeerId:f.authenticatedPeerId,factory:b,signal:k})),e.pairingCode)try{await h.request({type:"pair",code:e.pairingCode})}catch(y){throw h.close(Vt(y)),y}return h}catch(u){throw s.close(),u}finally{clearTimeout(c)}}const gm=FE,h2=UE;class p2 extends EventTarget{constructor(t,n,r,o={}){if(super(),this.url=t,!/^[a-zA-Z0-9_.:-]{1,160}$/.test(n))throw new Error("Invalid target identity");if(o.entryServiceId===n)throw new pt("RELAY_SELF_TARGET",{...o,targetServiceId:n});const s=performance.now();let i;this.upstream=r(t),this.upstream.addEventListener("open",()=>{this.connectionTimings.entryOpenMs=performance.now()-s}),this.deadline=setTimeout(()=>this.fail("Relay connection timed out"),uf),this.upstream.addEventListener("message",a=>{if(this.readyState!==3)try{if(typeof a.data!="string"||new TextEncoder().encode(a.data).length>gm)throw new Error("Invalid relay envelope");const c=JSON.parse(a.data);if(c.type==="ready"){if(this.requested||this.readyState!==0)throw new Error("Repeated relay handshake");i=performance.now(),this.requested=!0,this.transmit({type:"open",streamId:this.streamId,serviceId:n});return}if(c.streamId!==this.streamId)return;if(c.type==="opened"&&this.readyState===0){this.connectionTimings.routeOpenMs=i===void 0?null:performance.now()-i,clearTimeout(this.deadline),this.readyState=1;const h=new Event("open");this.dispatchEvent(h),this.onopen?.(h);return}if(c.type==="close"){(c.code==="RELAY_AUTHORIZATION_REQUIRED"||c.reason==="Authorization revoked")&&(this.transportFailure=new pt("RELAY_AUTHORIZATION_REQUIRED",{...o,targetServiceId:n})),c.code==="RELAY_SELF_TARGET"&&(this.transportFailure=new pt("RELAY_SELF_TARGET",{...o,targetServiceId:n})),(c.code==="TARGET_PASSWORD_REQUIRED"||c.code==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(this.transportFailure=new pt(c.code,{...o,targetServiceId:n})),this.finish(1001,this.transportFailure?.message||"Relay route closed"),this.upstream.close();return}if(c.type!=="data"||this.readyState!==1||c.encoding!=="base64"||typeof c.payload!="string"||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c.payload))throw new Error("Invalid ciphertext relay frame");const d=ux(c.payload),u=this.binaryType==="blob"?new Blob([d]):d.buffer,f=new MessageEvent("message",{data:u});this.dispatchEvent(f),this.onmessage?.(f)}catch{this.fail("Relay protocol rejected frame")}}),this.upstream.addEventListener("close",a=>this.finish(a.code||1006,"Relay disconnected")),this.upstream.addEventListener("error",()=>this.fail("Relay transport unavailable"))}url;CONNECTING=0;OPEN=1;CLOSING=2;CLOSED=3;protocol="";extensions="";binaryType="arraybuffer";readyState=0;transportFailure;onopen=null;onmessage=null;onerror=null;onclose=null;connectionTimings={entryOpenMs:null,routeOpenMs:null};upstream;streamId=crypto.randomUUID();requested=!1;deadline;get bufferedAmount(){return this.upstream.bufferedAmount}transmit(t){const n=JSON.stringify(t);if(this.upstream.readyState!==1||this.upstream.bufferedAmount+n.length>h2||n.length>gm)throw new Error("Relay unavailable or congested");this.upstream.send(n)}send(t){if(this.readyState!==1)throw new Error("Relay socket is not open");let n;if(ArrayBuffer.isView(t))n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(t instanceof ArrayBuffer)n=new Uint8Array(t);else throw new Error("Relay secure transport requires binary bytes");try{this.transmit({type:"data",streamId:this.streamId,encoding:"base64",payload:dx(n)})}catch(r){throw this.fail("Relay transport congested"),r}}close(t=1e3,n=""){if(this.readyState!==3){try{this.requested&&this.transmit({type:"close",streamId:this.streamId})}catch{}this.finish(t,n),this.upstream.close()}}fail(t){if(this.readyState===3)return;const n=new Event("error");this.dispatchEvent(n),this.onerror?.(n),this.finish(1006,t),this.upstream.close()}finish(t,n){if(this.readyState===3)return;clearTimeout(this.deadline),this.readyState=3;const r=Object.assign(new Event("close"),{code:t,reason:n,wasClean:t===1e3});this.dispatchEvent(r),this.onclose?.(r)}}class m2 extends p2{constructor(t,n,r=s=>new WebSocket(s),o={}){super(t,n,r,o)}}function fx(e,t={}){return n=>new m2(n,e,void 0,t)}function g2(e){if(typeof e!="string"||!e.startsWith("/api/")||/[\\\x00-\x20\x7f#]/.test(e))return null;const t=e.split("?")[0];if(t.includes("//"))return null;try{const r=t.split("/").map((o,s)=>{if(s===0||o===""&&s===t.split("/").length-1)return o;const i=decodeURIComponent(o);if(!i||i==="."||i===".."||/[\\/\x00-\x1f\x7f]/.test(i)||/%[a-f0-9]{2}/i.test(i))throw new Error("Ambiguous API path");return i}).join("/");return r.endsWith("/")&&!r.startsWith("/api/terminal/fs/preview/")?null:r}catch{return null}}function y2(e){if(!("serviceWorker"in navigator))return()=>{};const t=new Set,n=r=>{if(r.source!==navigator.serviceWorker.controller||r.data?.type!=="termdock-secure-fetch"||r.ports.length!==1)return;const o=r.ports[0],{path:s,method:i,headers:a,body:c,expectedTargetPeerId:d,previewPrefix:u}=r.data;let f;try{f=new URL(s,location.origin)}catch{o.close();return}if(f.origin!==location.origin||!f.pathname.startsWith("/api/")||t.size>=32||typeof i!="string"||c!==void 0&&(!(c instanceof ArrayBuffer)||c.byteLength>5*1024*1024)){o.postMessage({type:"error"}),o.close();return}if(u!==void 0&&(typeof u!="string"||!u.endsWith("/")||!/^\/api\/terminal\/fs\/preview\/[a-f0-9]{32}\//.test(u)||!["GET","HEAD"].includes(i)||!g2(f.pathname)?.startsWith(u))){o.postMessage({type:"error"}),o.close();return}const h=new AbortController;let p,g,m=!1,b=!1;const y=()=>{b||(b=!0,t.delete(y),h.abort(),p?.cancel().catch(()=>{}),o.close())};t.add(y),o.onmessage=k=>{if(k.data?.type==="cancel"){y();return}k.data?.type!=="pull"||m||b||(m=!0,(async()=>{if(!p){o.postMessage({type:"end"}),y();return}if(!g?.length){const T=await p.read();if(T.done){o.postMessage({type:"end"}),y();return}g=T.value}const x=g.slice(0,64*1024);g=g.subarray(x.length),o.postMessage({type:"chunk",data:x.buffer},[x.buffer])})().catch(()=>{o.postMessage({type:"error"}),y()}).finally(()=>{m=!1}))},o.onmessageerror=y,o.start(),(async()=>{const k=await e();if(b)return;if(d&&d!==k.targetPeerId)throw new Error("Preview target changed");const x=await k.fetch(f.pathname+f.search,{method:i,headers:a,body:["GET","HEAD"].includes(i)?void 0:c,signal:h.signal});if(b){await x.body?.cancel();return}p=x.body?.getReader();const T={};x.headers.forEach((_,A)=>{T[A]=_}),o.postMessage({type:"head",status:x.status,headers:T,bodyless:!p,targetPeerId:k.targetPeerId})})().catch(()=>{b||(o.postMessage({type:"error"}),y())})};return navigator.serviceWorker.addEventListener("message",n),()=>{navigator.serviceWorker.removeEventListener("message",n);for(const r of[...t])r()}}function hx(e){const t=e instanceof Error?e.message:"";if(["INVITATION_EXPIRED","ROUTE_INVITATION_EXPIRED"].includes(t))return"expired";if(["INVITATION_USED","ROUTE_INVITATION_USED"].includes(t))return"used";if(["PAIRING_DENIED","ROUTE_PAIRING_DENIED"].includes(t))return"invalid"}function px(e){const t=hx(e);return t==="expired"?{kind:t,title:"邀请已过期",description:"此链接已超过有效期。请联系分享者重新生成邀请,再使用新的链接连接。",retryable:!1}:t==="used"?{kind:t,title:"邀请已被使用",description:"此链接只能用于一台设备。已接受邀请的设备可从服务列表进入;其他设备需要分享者提供新的邀请链接。",retryable:!1}:t==="invalid"?{kind:t,title:"邀请已失效",description:"此链接已不可用,可能已过期、被使用或被撤销。请联系分享者重新生成邀请。",retryable:!1}:Br(e)?.code==="TARGET_IDENTITY_MISMATCH"||e instanceof Error&&e.message==="PEER_IDENTITY_MISMATCH"?{kind:"identity",title:"连接的服务不匹配",description:"实际连接的服务与邀请链接不一致。请核对链接,或联系分享者获取新的邀请。",retryable:!1}:{kind:"connection",title:"暂时无法连接",description:"未能连接到分享服务。请检查网络,并确认分享者的服务正在运行后重试。",retryable:!0}}const mx="termdock-secure-last-path:",w2=10*6e4;function gx(e){try{const t=JSON.parse(sessionStorage.getItem(mx+e)||"null");return t&&typeof t.key=="string"&&Date.now()-t.at<w2?t.key:void 0}catch{return}}function du(e,t){try{sessionStorage.setItem(mx+e,JSON.stringify({key:t,at:Date.now()}))}catch{}}function yx(e,t,n=!1,r={}){return new Promise((o,s)=>{let i=0,a=0,c=!1,d,u,f,h;const p=new Set,g=()=>{clearTimeout(h),clearTimeout(y),r.signal?.removeEventListener("abort",b);for(const x of p)x.abort();p.clear()},m=x=>{c||(c=!0,g(),s(x))},b=()=>m(r.signal?.reason),y=setTimeout(()=>m(u||f||new Error("连接路线尝试超时")),r.timeoutMs??HE);if(r.signal?.addEventListener("abort",b,{once:!0}),r.signal?.aborted){b();return}const k=()=>{if(c)return;if(i>=e.length){a||(c=!0,g(),s(u||f||d||new Error("没有可用的连接路线。")));return}if(a>=(n?1:2))return;const x=e[i++],T=performance.now(),_=v=>{try{performance.getEntriesByName("termdock:connection-path").length>64&&performance.clearMeasures("termdock:connection-path"),performance.measure("termdock:connection-path",{start:T,end:performance.now(),detail:{path:x.key.startsWith("relay:")?"relay":"direct",ok:v}})}catch{}},A=new AbortController;p.add(A),a++;let E;try{E=x.run(A.signal)}catch(v){E=Promise.reject(v)}E.then(v=>{if(_(!0),p.delete(A),c){t(v);return}c=!0,g(),o({value:v,key:x.key})},v=>{if(_(!1),p.delete(A),a--,!c){if(d=v,v instanceof Error&&v.name==="UnexpectedPeerError"&&(u=v),v instanceof pt&&["TARGET_IDENTITY_MISMATCH","RELAY_SELF_TARGET"].includes(v.code)&&(u=v),v instanceof pt&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(v.code)&&(f=v),hx(v)||v instanceof Ot||v instanceof pt&&v.code==="TARGET_AUTHORIZATION_REQUIRED"){c=!0,g(),s(v);return}k()}}),clearTimeout(h),!n&&i<e.length&&(h=setTimeout(k,400))};k()})}const b2=3,v2=1/0,x2=10,wx="termdock-secure-workspace-limit";function bx(e){return e===1/0||Number.isInteger(e)&&e>=3&&e<=x2}function S2(){try{const e=localStorage.getItem(wx),t=e==="unlimited"?1/0:Number(e);if(bx(t))return t}catch{}return navigator.maxTouchPoints>0?b2:v2}function E2(e,t,n,r){if(e.length<=r)return e;const o=new Set(["root",t,...n?[n]:[]]),s=[...e].reverse().sort((i,a)=>a.touchedAt-i.touchedAt);for(const i of s){if(o.size>=r)break;o.add(i.key)}return e.filter(i=>o.has(i.key))}const vx="termdock-workspace",qr="termdock:workspace-visibility",uu="termdock:workspace-activate";function Yc(){return window.parent!==window&&location.pathname==="/workspace.html"&&new URLSearchParams(location.search).get(vx)||"root"}let ym,wm;function Sn(){try{if(window.parent===window)return window.__termdockWorkspaceHost;const e=window.parent.__termdockWorkspaceHost;return e&&e!==ym&&(ym=e,wm={...e,subscribe(t){const n=e.subscribe(t,Yc()),r=o=>{o.persisted||n()};return window.addEventListener("pagehide",r),()=>{n(),window.removeEventListener("pagehide",r)}}}),e?wm:void 0}catch{return}}function jr(){const e=Sn();return!e||e.snapshot().activeKey===Yc()}function dc(e,t=!0){return Sn()?.activate(e,t)??!1}function vo(e){Sn()?.report(Yc(),e)}const fu="termdock-secure-workspace-session:",xx="termdock-secure-last-workspace";function k2(){for(const e of["sessionStorage","localStorage"])try{const t=window[e].getItem(xx);if(t)return t}catch{}return null}function I2(e){for(const t of["sessionStorage","localStorage"])try{window[t].setItem(xx,e)}catch{}}function OB(e){if(e)try{const t=JSON.parse(localStorage.getItem(fu+e)||"null");return localStorage.removeItem(fu+e),t&&typeof t.sessionId=="string"&&Date.now()-t.at<6e4?t.sessionId:void 0}catch{return}}function C2(e){if(window.parent!==window||window.termdockDesktop)return;if(window.__termdockWorkspaceHost)return window.__termdockWorkspaceHost;let t={activeKey:"root",items:[{key:"root",service:e,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()}]};try{const f=k2(),h=e&&f!==e.targetPeerId?Ur().find(p=>p.targetPeerId===f):void 0;h?.targetPeerId&&(t={activeKey:h.targetPeerId,items:[...t.items,{key:h.targetPeerId,service:h,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()}]})}catch{}let n=S2(),r=t.activeKey==="root"?"root":null;const o=new Map,s=new Map([["root",window]]),i=new Set,a=()=>{for(const f of[...o.keys()])f()},c=()=>{const f=E2(t.items,t.activeKey,r,n),h=new Set(f.map(p=>p.key));t={...t,items:f};for(const[p,g]of o)g&&!h.has(g)&&o.delete(p);for(const p of s.keys())h.has(p)||s.delete(p);for(const p of i)h.has(p)||i.delete(p)},d=(f,h)=>{try{const p=h.document.createEvent("CustomEvent");if(p.initCustomEvent(qr,!1,!1,{active:t.activeKey===f}),h.dispatchEvent(p),t.activeKey===f){const g=h.document.createEvent("Event");if(g.initEvent("resize",!1,!1),h.dispatchEvent(g),i.delete(f)){const m=h.document.createEvent("Event");m.initEvent(uu,!1,!1),h.dispatchEvent(m)}}else h.document.activeElement?.blur?.()}catch{}},u={snapshot:()=>t,subscribe:(f,h)=>(o.set(f,h),()=>{o.delete(f)}),present(f){r=f},retentionLimit:()=>n,setRetentionLimit(f){if(bx(f)){n=f;try{localStorage.setItem(wx,f===1/0?"unlimited":String(f))}catch{}c(),a()}},activate(f,h=!0){const p=Hn(f);if(!p?.targetPeerId)return!1;const g=t.items.find(y=>y.service?.targetPeerId===p.targetPeerId),m=g?.key||p.targetPeerId,b=g?{...g,service:p,touchedAt:Date.now()}:{key:m,service:p,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()};t={activeKey:m,items:g?t.items.map(y=>y===g?b:y):[...t.items,b]},c(),I2(p.targetPeerId),h&&i.add(m),a();for(const[y,k]of s)d(y,k);return!0},report(f,h){const p=t.items.find(m=>m.key===f);if(!p||h.service&&p.service?.targetPeerId&&h.service.targetPeerId!==p.service.targetPeerId)return;const g={...p,...h};JSON.stringify(g)!==JSON.stringify(p)&&(t={...t,items:t.items.map(m=>m===p?g:m)},a())},attach(f,h){h&&t.items.some(p=>p.key===f)?(s.set(f,h),d(f,h)):s.delete(f)},focusSession(f,h){const p=Ur().find(m=>m.targetPeerId===f);if(!p)return!1;try{localStorage.setItem(fu+f,JSON.stringify({sessionId:h,at:Date.now()}))}catch{return!1}u.activate(p,!1);const g=s.get(t.activeKey);if(g){const m=g.document.createEvent("CustomEvent");m.initCustomEvent("termdock:workspace-session",!1,!1,null),g.dispatchEvent(m)}return!0}};return window.__termdockWorkspaceHost=u,u}let zl;async function on(){return zl||(zl=(async()=>{const e=await new Promise((t,n)=>{const r=indexedDB.open("termdock-device-identity",1);r.onupgradeneeded=()=>r.result.createObjectStore("keys"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error)});try{const t=await new Promise((o,s)=>{const i=e.transaction("keys").objectStore("keys").get("identity");i.onsuccess=()=>o(i.result),i.onerror=()=>s(i.error)});if(t)return um(t);const n=await rx();let r=n;return await new Promise((o,s)=>{const i=e.transaction("keys","readwrite"),a=i.objectStore("keys"),c=a.get("identity");c.onsuccess=()=>{typeof c.result=="string"?r=um(c.result):a.put(UR(n),"identity")},i.oncomplete=()=>o(),i.onerror=()=>s(i.error)}),r}finally{e.close()}})()),zl}const uc={CONNECTION_FAILED:{reason:"connectionFailed",status:503,message:"暂时连不上这台服务,请检查地址和网络后重试。"},INVALID_PASSWORD:{reason:"invalidPassword",status:401,message:"密码不正确,或服务身份无法验证。请检查后重试。"},IDENTITY_MISMATCH:{reason:"identityMismatch",status:409,message:"服务身份与已保存的记录不一致,请确认目标服务。"},RATE_LIMITED:{reason:"rateLimited",status:429,message:"尝试次数较多,请稍后再试。"},LOGIN_UNAVAILABLE:{reason:"unavailable",status:503,message:"暂时无法登录这台服务,请稍后重试。"},PASSWORD_NOT_CONFIGURED:{reason:"passwordNotConfigured",status:403,message:"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。"},TARGET_PASSWORD_REQUIRED:{reason:"targetPasswordRequired",status:403,message:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。"},TARGET_SECURITY_UPGRADE_REQUIRED:{reason:"securityUpgradeRequired",status:403,message:"无法核验中转的密码保护,已禁用中转。请更新目标服务和中继程序。"},DEVICE_AUTHORIZATION_REQUIRED:{reason:"authorizationRequired",status:403,message:"请检查目标服务与入口的设备授权后重试。"}};function bm(e){return typeof e=="string"&&Object.hasOwn(uc,e)?uc[e].reason:void 0}class Ft extends Error{constructor(t,n){super(uc[t].message),this.code=t,this.retryAfterMs=n,this.status=uc[t].status}code;retryAfterMs;status}function Wn(e){if(e instanceof Ft)return e;if(e instanceof Ot)return new Ft("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof pt)return new Ft(e.code==="TARGET_IDENTITY_MISMATCH"?"IDENTITY_MISMATCH":e.code==="TARGET_PASSWORD_REQUIRED"||e.code==="TARGET_SECURITY_UPGRADE_REQUIRED"?e.code:"DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof Error){if(e.message==="PASSWORD_NOT_CONFIGURED")return new Ft("PASSWORD_NOT_CONFIGURED");if(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")return new Ft(e.message);if(e.name==="UnexpectedPeerError"||e.message==="PEER_IDENTITY_MISMATCH")return new Ft("IDENTITY_MISMATCH");if(e.message==="LOGIN_RATE_LIMIT"||e.message==="Too many password login attempts")return new Ft("RATE_LIMITED");if(e.message==="AUTHORIZATION_DENIED")return new Ft("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof TypeError||["TimeoutError","AbortError"].includes(e.name)||Gw(e)||e.message==="Encrypted handshake timed out"||e.message==="Encrypted transport failed")return new Ft("CONNECTION_FAILED");if(e.message==="Password authentication failed"||e.message==="Password login expired"||e.message==="INVALID_LOGIN")return new Ft("INVALID_PASSWORD")}return new Ft("LOGIN_UNAVAILABLE")}const Et="termdock:secure-state";let Ae,_t,Lt,Kr="direct",ka=!1,vm=0,Ia=!1,xm=-1/0;const zt=new Map,Xc=e=>!!e&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(e.code),xn=new Map;function Sx(e){const{targetServiceId:t,entryServiceId:n}=e.context;if(!Xc(e)||!t||!n)return;xn.size>32&&xn.clear();const r=xn.get(t)||new Set;r.add(n),xn.set(t,r)}function Hf(e,t){return!xn.get(e)?.has(t)}function di(e){Sx(e);const t=e.context.targetServiceId||oe()?.targetPeerId;t&&(zt.size>32&&zt.clear(),zt.set(t,e))}function T2(){const e=oe()?.targetPeerId;e&&(zt.delete(e),xn.delete(e))}const Go=globalThis.fetch.bind(globalThis);function oe(){return ht()}function He(){return Ae}function A2(){return Lt}function fc(){Ae?.close(),Lt?.close(),Ae=void 0,Lt=void 0}class ql extends Error{constructor(){super("Secure read target changed"),this.name="SecureReadTargetChanged"}}function R2(e){if(Gw(e))return!0;if(!e||typeof e!="object")return!1;const t=e;return t.name==="UnexpectedEOFError"&&typeof t.message=="string"&&/^Unexpected EOF - stream closed while reading \d+\/\d+ bytes$/.test(t.message)}async function P2(e,t){const n=oe(),r=n?.targetPeerId,o=JSON.stringify(n),s=()=>JSON.stringify(oe())===o,i=He(),a=c=>{if(!s())throw new ql;if(t?.aborted)throw new DOMException("The operation was aborted","AbortError");return c};try{return a(await e())}catch(c){if(c instanceof ql||t?.aborted||c instanceof Error&&c.name==="AbortError"||c&&typeof c=="object"&&"status"in c||!r||!s()||!i?.closed&&!R2(c))throw c;if(zs(navigator.onLine===!1?"offline":"reconnecting"),i&&He()===i&&fc(),window.dispatchEvent(new Event(Et)),await Cx(t),!s())throw new ql;const d=a(await e());return zs("ready"),d}}async function Ex(){const e=await Go("/api/auth/status",{signal:AbortSignal.timeout(5e3)});if(!e.ok)throw new Error("Failed to query auth status");return e.json()}async function N2(){if(oe()){await Jt();return}if((await Ex()).enabled)return;const e=await Go("/api/auth/open/parameters",{cache:"no-store"});if(!e.ok)throw new Error("Open service unavailable");const{serviceIdentity:t}=await e.json();if(typeof t!="string"||!t)throw new Error("Invalid service identity");await Zt({url:location.origin,targetPeerId:t,serviceName:location.hostname})}async function _2(e,t){const{startPasswordBootstrap:n,finishPasswordBootstrap:r}=await tn(async()=>{const{startPasswordBootstrap:f,finishPasswordBootstrap:h}=await import("./passwordBootstrap-SIs7oJj5.js");return{startPasswordBootstrap:f,finishPasswordBootstrap:h}},__vite__mapDeps([0,1,2])),o=typeof window<"u"?window.termdockDesktop:void 0;let s=location.origin;if(o?.previewCapabilities&&o.passwordBootstrapOrigin){const f=o.passwordBootstrapOrigin(e),h=new URL(f);if(h.origin!==f||e!==location.origin&&h.origin!==e||!["http:","https:"].includes(h.protocol)||h.username||h.password)throw new Ft("LOGIN_UNAVAILABLE");s=f}const i=f=>e===location.origin?f:new URL(f,e).href,a=async(f,h)=>{const p=await Go(i(f),{credentials:"omit",cache:"no-store",signal:AbortSignal.timeout(15e3),...h?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}:{}});if(!p.ok){const g=await p.json().catch(()=>null),m=typeof g?.retryAfterMs=="number"&&Number.isFinite(g.retryAfterMs)&&g.retryAfterMs>=0?g.retryAfterMs:void 0;throw new Ft(p.status===429?"RATE_LIMITED":g?.code==="PASSWORD_NOT_CONFIGURED"?"PASSWORD_NOT_CONFIGURED":p.status===401?"INVALID_PASSWORD":"LOGIN_UNAVAILABLE",m)}return p.json()},{saltHex:c}=await a("/api/auth/password/parameters"),d=await on(),u=await n(t,c);try{const f=await a("/api/auth/password/start",{startLoginRequest:u.startLoginRequest,clientIdentity:d.peerId}),h=await r(u,f,{clientIdentity:d.peerId,origin:s});await a("/api/auth/password/finish",{attemptId:h.attemptId,finishLoginRequest:h.finishLoginRequest});const p=s===location.origin?e:s;return{url:p,targetPeerId:h.serverIdentity,serviceName:new URL(p).host,serviceOrigin:p}}finally{u.passwordKey=""}}async function $f(e,t){const n=oe();if(n&&Mt(n).includes(e))return await hc(n,t),n;try{return await _2(e,t)}catch(r){if(!(r instanceof TypeError)&&!(r instanceof DOMException))throw r;const o=(await gt()).find(i=>i.targetPeerId&&Mt({...i,targetPeerId:i.targetPeerId}).includes(e));if(!o?.targetPeerId)throw Wn(r);const s={...o,targetPeerId:o.targetPeerId,serviceName:o.label};return await hc(s,t),s}}async function hc(e,t){const n=await Ri(e),{startPasswordBootstrap:r,finishPasswordBootstrap:o}=await tn(async()=>{const{startPasswordBootstrap:i,finishPasswordBootstrap:a}=await import("./passwordBootstrap-SIs7oJj5.js");return{startPasswordBootstrap:i,finishPasswordBootstrap:a}},__vite__mapDeps([0,1,2]));let s;try{const i=await n.request({type:"password-parameters"},{timeoutMs:5e3});s=await r(t,String(i.saltHex));const a=await n.request({type:"password-start",startLoginRequest:s.startLoginRequest,origin:location.origin}),c=await o(s,a,{clientIdentity:(await on()).peerId,origin:location.origin});if(c.serverIdentity!==e.targetPeerId)throw new Ft("IDENTITY_MISMATCH");await n.request({type:"password-finish",attemptId:c.attemptId,finishLoginRequest:c.finishLoginRequest})}catch(i){throw Wn(i)}finally{s&&(s.passwordKey=""),n.close()}}async function L2(e){try{const t=oe();t&&await hc(t,e);const n=t||await $f(location.origin,e);return await Zt(n),Response.json({ok:!0})}catch(t){const n=Wn(t);return Response.json({error:n.message,code:n.code,retryAfterMs:n.retryAfterMs},{status:n.status})}}async function Sm(e,t){const n=ze(e),r=(await gt()).find(i=>i.targetPeerId&&Mt({...i,targetPeerId:i.targetPeerId}).includes(n));if(t===void 0&&r?.targetPeerId)try{return await Zt({...r,targetPeerId:r.targetPeerId,serviceName:r.label}),{}}catch(i){if(!(i instanceof Ot))throw i}if(t!==void 0){const i=await $f(n,t);if(r?.targetPeerId&&r.targetPeerId!==i.targetPeerId)throw new Error("这台服务的身份已改变。请先移除旧记录,再重新添加。");return await Zt({...i,routes:r?.routes,serviceName:r?.label||i.serviceName}),{}}const o=await Go(new URL("/api/auth/open/parameters",n).href,{credentials:"omit",cache:"no-store",signal:AbortSignal.timeout(1e4)}).catch(()=>{throw new Error("暂时连不上这台服务,请检查地址和网络后重试。")});if(o.status===403)return{passwordRequired:!0};if(!o.ok)throw new Error("这台服务暂时不可用,请稍后重试。");const{serviceIdentity:s}=await o.json();if(typeof s!="string"||!s)throw new Error("这不是可连接的 Termdock 服务。");if(r?.targetPeerId&&r.targetPeerId!==s)throw new Error("这台服务的身份已改变。请先移除旧记录,再重新添加。");return await Zt({url:n,targetPeerId:s,serviceName:r?.label||new URL(n).host,serviceOrigin:n}),{}}function nn(e){const t=[...e.routes||[]];if(e.entryServiceId&&e.entryServiceId!==e.targetPeerId&&t.unshift({url:e.url,targetPeerId:e.entryServiceId}),!t.length&&e.routes===void 0)try{const n=JSON.parse(localStorage.getItem(Yu)||"null");n&&n.targetPeerId!==e.targetPeerId&&new URL(n.url).host===new URL(e.url).host&&t.push(n)}catch{}return Yw({...e,routes:t})}const Vs=e=>`relay:${e.targetPeerId}:${e.url}`;async function kx(e){const t=nn(e),n=new Set(t.map(Vs)),r=[],o=await gt(),s=o.some(i=>i.targetPeerId===e.targetPeerId);for(const i of o)if(!(!i.targetPeerId||i.targetPeerId===e.targetPeerId||!s&&!nn({...i,targetPeerId:i.targetPeerId}).some(a=>a.targetPeerId===e.targetPeerId)))for(const a of Mt({...i,targetPeerId:i.targetPeerId})){const c={url:a,targetPeerId:i.targetPeerId};n.has(Vs(c))||(n.add(Vs(c)),r.push(c))}return r.slice(0,Math.max(0,Fr-Math.max(e.routes?.length??0,t.length)))}function Mt(e){const t=nn(e);return Xw({...e,routes:[...t,...e.routes||[]]})}function Gr(e){return IE(e).href}async function Ix(e,t){return zr({url:Gr(e.url),targetPeerId:e.targetPeerId,identity:await on(),signal:t?AbortSignal.any([t,AbortSignal.timeout(5e3)]):AbortSignal.timeout(5e3)})}async function Ri(e,t,n){const r=await on(),o=Mt(e).map(c=>({key:`direct:${c}`,run:d=>zr({url:Gr(c),targetPeerId:e.targetPeerId,identity:r,signal:AbortSignal.any([d,AbortSignal.timeout(8e3),...t?[t]:[]])})})),s=n?[]:await kx(e);for(const c of[...nn(e),...s].filter(d=>Hf(e.targetPeerId,d.targetPeerId)))o.push({key:Vs(c),run:async d=>{t&&(d=AbortSignal.any([d,t]));const u=[Ae,Lt].find(h=>h&&!h.closed&&h.targetPeerId===c.targetPeerId),f=u||await Ix(c,d);try{if(d.aborted)throw d.reason;const h=await f.request({type:"route-ticket",serviceId:e.targetPeerId},{timeoutMs:5e3}).catch(g=>{throw sf(g,{targetServiceId:e.targetPeerId,entryServiceId:c.targetPeerId,entryUrl:c.url})});if(d.aborted)throw d.reason;if(typeof h.routeToken!="string")throw new Error("入口未允许此设备连接该服务。");const p=new URL(Gr(c.url));return p.pathname="/api/federation/relay",p.searchParams.set("routeToken",h.routeToken),await zr({url:p.href,targetPeerId:e.targetPeerId,identity:r,socketFactory:fx(e.targetPeerId,{entryServiceId:c.targetPeerId,entryUrl:c.url}),signal:AbortSignal.any([d,AbortSignal.timeout(uf)])})}finally{u||f.close()}}});const i=gx(e.targetPeerId);o.sort((c,d)=>+(d.key===i)-+(c.key===i));const a=await yx(o,c=>c.close(),!1,{signal:t});return n?n.connected(a.key):du(e.targetPeerId,a.key),a.value}async function j2(e,t){const n=await Ri(e,t);try{const o=(await n.request({type:"collaboration-descriptor"},{timeoutMs:5e3})).node;if(o?.serviceId!==e.targetPeerId)throw new Error("PEER_IDENTITY_MISMATCH");return{...o,serviceId:e.targetPeerId}}finally{n.close()}}async function D2(e,t){const n=await Ri(e,t),r=()=>n.close();t.addEventListener("abort",r,{once:!0});try{if(t.aborted||(await Jr(n,{timeoutMs:3e3}),t.aborted))throw t.reason;return n}catch(o){throw n.close(),o}finally{t.removeEventListener("abort",r)}}async function hu(e,t){let n=!1;const r=await Ri(e,t,{connected(s){n=s.startsWith("relay:")}}),o=()=>r.close();t?.addEventListener("abort",o,{once:!0});try{if(t?.aborted)throw t.reason;let s=!1;try{await Jr(r),s=!0}catch(i){if(!(i instanceof Ot))throw i}if(s&&!n)return"authorized";try{return await r.request({type:"password-parameters"},{timeoutMs:5e3}),s?"authorized":"passwordRequired"}catch(i){if(Wn(i).code==="PASSWORD_NOT_CONFIGURED"){if(n)throw new pt("TARGET_PASSWORD_REQUIRED",{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId});return"invitationRequired"}throw i}}catch(s){throw sf(s,{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId})}finally{t?.removeEventListener("abort",o),r.close()}}async function Zt(e,t={}){e.entryServiceId&&Wo(e.entryServiceId,e.targetPeerId);const n=Ae,r=Lt,o=await on(),s=ze(e.serviceOrigin||e.url),i=(await gt()).find(k=>k.targetPeerId===e.targetPeerId),a={...e,routes:e.routes??i?.routes};e.routeCode&&e.entryServiceId&&xn.get(e.targetPeerId)?.delete(e.entryServiceId);const c=t.directOnly||Xc(zt.get(e.targetPeerId))?[]:await kx(a),d=t.directOnly?[]:[...nn(a),...c].filter(k=>Hf(e.targetPeerId,k.targetPeerId)),u=Mt(a);let f,h,p=e.pairingCode,g="direct";const m=new Set,b=new Map,y=async(k,x)=>{if(n&&!n.closed&&n.targetPeerId===k.targetPeerId)return n;if(r&&!r.closed&&r.targetPeerId===k.targetPeerId)return r;const T=JSON.stringify([k.targetPeerId,k.url]),_=b.get(T);if(_&&!_.closed)return _;const A=await Ix(k,x);return m.add(A),b.set(T,A),A};try{if(e.routeCode&&e.entryServiceId){const C=d.find(j=>j.targetPeerId===e.entryServiceId);if(!C)throw new Error("邀请缺少入口信息。");if((await(await y(C)).request({type:"route-pair",code:e.routeCode})).serviceId!==e.targetPeerId)throw new Error("邀请的目标服务不一致。");e.routeOnly&&await $n({id:e.targetPeerId,url:s,label:e.serviceName||new URL(s).host,targetPeerId:e.targetPeerId,serviceOrigin:s,routes:d})}const k=[],x=async(C,N)=>{const P=()=>C.close();N.addEventListener("abort",P,{once:!0});try{if(N.aborted||(await Jr(C),N.aborted))throw N.reason}catch(j){throw C.close(),j}finally{N.removeEventListener("abort",P)}};for(const C of u)k.push({key:`direct:${C}`,run:async N=>{const P=await zr({url:Gr(C),targetPeerId:e.targetPeerId,pairingCode:p,identity:o,signal:AbortSignal.any([N,AbortSignal.timeout(8e3)])});return p=void 0,await x(P,N),{client:P,path:"direct"}}});for(const C of d)k.push({key:`relay:${C.targetPeerId}:${C.url}`,run:async N=>{let P,j;try{if(P=await y(C,N),N.aborted)throw N.reason;const O=await P.request({type:"route-ticket",serviceId:e.targetPeerId},{timeoutMs:5e3}).catch(F=>{throw sf(F,{targetServiceId:e.targetPeerId,entryServiceId:C.targetPeerId,entryUrl:C.url})});if(N.aborted)throw N.reason;if(typeof O.routeToken!="string"||!O.routeToken)throw new Error("入口未允许此设备连接该服务。");const M=new URL(Gr(C.url));return M.pathname="/api/federation/relay",M.searchParams.set("routeToken",O.routeToken),j=await zr({url:M.href,targetPeerId:e.targetPeerId,pairingCode:p,identity:o,socketFactory:fx(e.targetPeerId,{entryServiceId:C.targetPeerId,entryUrl:C.url}),signal:AbortSignal.any([N,AbortSignal.timeout(uf)])}),p=void 0,await x(j,N),{client:j,entry:P,path:"relay"}}catch(O){j?.close(),P&&P!==r&&P!==n&&P.close();const M=Br(O,{targetServiceId:e.targetPeerId,entryServiceId:C.targetPeerId,entryUrl:C.url});throw M&&Sx(M),M||O}}});const T=gx(e.targetPeerId);k.sort((C,N)=>+(N.key===T)-+(C.key===T));const _=await yx(k,C=>{C.client.close(),C.entry&&C.entry!==n&&C.entry!==r&&C.entry.close()},!!p);if(f=_.value.client,h=_.value.entry,g=_.value.path,t.renewIfCurrent){if(Ae!==t.renewIfCurrent||n!==t.renewIfCurrent||n.closed||!n.canSwitchTransport||oe()?.targetPeerId!==e.targetPeerId){f.close();for(const C of m)C!==Lt&&C!==Ae&&C.close();return Ae??n}Ae=f,Kr=g,Lt=h,du(e.targetPeerId,_.key),n.retire();for(const C of new Set([r,...m]))C&&C!==n&&C!==f&&C!==h&&C.close();return window.dispatchEvent(new Event(Et)),f}if(du(e.targetPeerId,_.key),Ae!==n&&Ae&&!Ae.closed&&Ae.targetPeerId===e.targetPeerId){f.close();for(const C of m)C!==Lt&&C.close();return Ae}g==="direct"&&new URL(s).host===location.host&&JS(e.targetPeerId);const A=(await gt()).find(C=>C.targetPeerId===e.targetPeerId||!C.targetPeerId&&(C.serviceOrigin||C.url)===s),E=A?.label||e.serviceName||new URL(s).host,v=c.find(C=>Vs(C)===_.key),S=a.routes??nn(a),I=Mt(a)[0],R={url:I||s,targetPeerId:e.targetPeerId,serviceName:E,...e.viewMode?{viewMode:e.viewMode}:{},...e.viewLayout?{viewLayout:e.viewLayout}:{},...I?{serviceOrigin:I}:{entryServiceId:h?.targetPeerId||e.entryServiceId},routes:v?[...S,v]:S};if(await(t.rememberOnly?CE:$n)({id:A?.id||e.targetPeerId,...R,label:E}),ko!=="unpaired"&&ko!==e.targetPeerId&&Sn()&&dc({id:A?.id||e.targetPeerId,...R,label:E})){f.close();for(const C of m)C!==n&&C!==r&&C.close();return n||f}Xu(R),zt.delete(e.targetPeerId),Ae=f,Kr=g,Lt=h;for(const C of new Set([n,r,...m]))C&&C!==f&&C!==h&&C.close();return ko!==e.targetPeerId?(location.reload(),new Promise(()=>{})):(window.dispatchEvent(new Event(Et)),f)}catch(k){f?.close();for(const x of m)x!==r&&x.close();throw k}}async function O2(){const e=Ae,t=oe();if(!(t&&zt.has(t.targetPeerId))&&!(Ia||ka||_t||!e?.renewalDue||!e.canSwitchTransport||!t||performance.now()-xm<3e4)){xm=performance.now(),Ia=!0;try{await Zt(t,{renewIfCurrent:e})}catch(n){console.debug("[connection] renewal deferred",{reason:n instanceof Error?n.message:"unknown"})}finally{Ia=!1}}}async function M2(){const e=Ae,t=oe();if(t&&zt.has(t.targetPeerId)||Date.now()-vm<6e4||Ia||ka||Kr!=="relay"||!e||e.closed||!e.canSwitchTransport||!t?.serviceOrigin)return;ka=!0,vm=Date.now();let n;try{for(const o of Mt(t))try{n=await zr({url:Gr(o),targetPeerId:t.targetPeerId,identity:await on(),signal:AbortSignal.timeout(3e3)}),await Jr(n);break}catch(s){if(n?.close(),n=void 0,s instanceof Ot)throw s}if(!n||Ae!==e||!e.canSwitchTransport)return;const r=Lt;Ae=n,n=void 0,Lt=void 0,Kr="direct",e.close(),r?.close(),window.dispatchEvent(new Event(Et))}catch(r){r instanceof Ot&&Ae===e&&(fc(),window.dispatchEvent(new Event("auth:unauthorized")))}finally{n?.close(),ka=!1}}function B2(){return Kr}async function Cx(e){return e?(e.throwIfAborted(),new Promise((t,n)=>{const r=()=>n(e.reason);e.addEventListener("abort",r,{once:!0}),Jt().then(o=>{e.removeEventListener("abort",r),e.aborted?n(e.reason):t(o)},o=>{e.removeEventListener("abort",r),n(o)})})):Jt()}async function Jt(){const e=zt.get(oe()?.targetPeerId||"");if(e)throw e;if(Ae&&!Ae.closed){const n=Ae;return O2(),n}if(Ae=void 0,_t)return _t;const t=oe();if(!t)throw new Error("DEVICE_PAIRING_REQUIRED");return _t=Zt(t,{rememberOnly:!0}).catch(n=>{if(Ae&&!Ae.closed&&Ae.targetPeerId===t.targetPeerId)return Ae;const r=Br(n,{targetServiceId:t.targetPeerId});throw r?(di(r),r):n}).finally(()=>{_t=void 0}),_t}async function Em(){const e=oe(),t=zt.get(e?.targetPeerId||"");if(!e||!Xc(t)||!Mt(e).length)throw t||new Error("没有可用的直连地址。");return _t||(_t=Zt(e,{rememberOnly:!0,directOnly:!0}).then(n=>{if(oe()?.targetPeerId!==e.targetPeerId||Ae!==n||Kr!=="direct")throw t;return zt.delete(e.targetPeerId),n}).catch(n=>{const r=Br(n,{targetServiceId:e.targetPeerId});throw r?(di(r),r):n}).finally(()=>{_t=void 0}),_t)}function pu(e=oe(),t=zt.get(e?.targetPeerId||"")){return e&&Xc(t)&&t?.code!=="RELAY_AUTHORIZATION_REQUIRED"?Mt(e).length>0:!!e&&t?.code==="RELAY_AUTHORIZATION_REQUIRED"&&kE(e,t.context.entryServiceId,xn.get(e.targetPeerId))}async function F2(){const e=oe(),t=zt.get(e?.targetPeerId||"");if(!e||!pu(e,t))throw t||new Error("没有独立的已保存连接路线。");return t?.code!=="RELAY_AUTHORIZATION_REQUIRED"||!nn(e).filter(r=>Hf(e.targetPeerId,r.targetPeerId)).length?Em():_t||(_t=Zt(e,{rememberOnly:!0}).catch(r=>{const o=Br(r,{targetServiceId:e.targetPeerId});throw o&&di(o),o||r}).finally(()=>{_t=void 0}),_t)}function Tx(e){const t=new URL(e,location.href);if(Ae&&!Ae.closed&&!zt.has(Ae.targetPeerId))return Ae.openSocket(t.pathname+t.search);let n;const r=new lu(e,o=>n?.send(o),()=>n?.close(),()=>n?.bufferedAmount??0);return Jt().then(o=>{r.readyState!==3&&(n=o.openSocket(t.pathname+t.search),r.getConnectionDiagnostics=()=>{const s=n?.getConnectionDiagnostics?.();return s?{...s,socketOpenMs:r.openedAfterMs}:void 0},n.onopen=()=>r.accept({type:"ws-ready",id:""}),n.onmessage=s=>r.accept({type:"ws-data",id:"",data:s.data}),n.onclose=s=>r.accept({type:"ws-close",id:"",code:s.code,reason:s.reason}),n.onerror=()=>r.fail(new Error("Encrypted connection unavailable")))}).catch(o=>r.fail(o)),r}function U2(){y2(Jt),window.fetch=async(e,t)=>{const n=new URL(e instanceof Request?e.url:String(e),location.href);if(!n.pathname.startsWith("/api/"))return Go(e,t);if(n.origin!==location.origin)throw new Error("Remote business API requires a paired encrypted service");if(n.pathname==="/api/meta")return Go(e,t);if(n.pathname==="/api/auth/status"){if(!oe()){const s=await Ex();return Response.json({enabled:s.enabled,authenticated:!1})}try{const s=await Jr(await Jt());return Response.json({enabled:s.grants.length>0,authenticated:!0})}catch(s){if(s instanceof Ot)return Response.json({enabled:!0,authenticated:!1});throw s}}if(n.pathname==="/api/auth/login"){const i=await new Request(e instanceof Request?e:n.href,t).json();return L2(typeof i.password=="string"?i.password:"")}if(n.pathname==="/api/csrf-token")return Response.json({csrfToken:"encrypted-device-channel"});if(n.pathname==="/api/auth/logout")return Ae&&!Ae.closed&&await Ae.request({type:"logout"}),Ae?.close(),Lt?.close(),Ae=void 0,Lt=void 0,XS(),location.reload(),Response.json({ok:!0});const r=t?.signal!==void 0?t.signal:e instanceof Request?e.signal:void 0,o=await Cx(r);return e instanceof Request?o.fetch(e,t):o.fetch(n.pathname+n.search,t)}}function Wo(e,t){if(e===t)throw new pt("RELAY_SELF_TARGET",{entryServiceId:e,targetServiceId:t})}async function es(e,t){const n=ze(e.url),r=[Ae,Lt].find(c=>c&&!c.closed&&c.targetPeerId===e.targetPeerId);if(r)return{client:r,route:{...e,url:n},release(){}};const o=t??(await gt()).find(c=>c.targetPeerId===e.targetPeerId),s=[...o?.routes??[]];o?.targetPeerId&&ze(o.serviceOrigin||o.url)!==n&&s.push({url:o.serviceOrigin||o.url,targetPeerId:e.targetPeerId});let i={...e,url:n};const a=await Ri({url:n,targetPeerId:e.targetPeerId,routes:s},AbortSignal.timeout(15e3),{connected(c){c.startsWith("direct:")&&(i={...e,url:c.slice(7)})}});return{client:a,route:i,release(){a.close()}}}async function H2(e){if(!e.targetPeerId)throw new Error("请先连接这台服务,再查看可中转的服务。");const t=await es({url:e.serviceOrigin||e.url,targetPeerId:e.targetPeerId},e);try{const n=await t.client.request({type:"route-targets"},{timeoutMs:5e3});if(!Array.isArray(n.items))throw new Error("入口服务需要更新后才能查看中转列表。");const r=new Set,o=n.items.filter(s=>!s||typeof s.serviceId!="string"||!s.serviceId||s.serviceId===t.client.targetPeerId||r.has(s.serviceId)?!1:(r.add(s.serviceId),!0));return{route:t.route,canManage:n.canManage===!0,items:o}}catch(n){throw n instanceof Error&&/UNKNOWN|UNSUPPORTED/i.test(n.message)?new Error("入口服务需要更新后才能查看中转列表。",{cause:n}):n}finally{t.release()}}async function $2(e,t){Wo(e.targetPeerId,t);const n=await es(e),r=n.client;try{Wo(r.targetPeerId,t);const o=await r.request({type:"route-targets"},{timeoutMs:5e3}),s=(Array.isArray(o.items)?o.items:[]).find(u=>u.serviceId===t);if(!s)throw new Error("该服务已不可见,请刷新列表或请入口管理员授权。");if(!s.available)throw new Error(xr(s));const i=(await gt()).find(u=>u.targetPeerId===s.serviceId),a=[e,...(i?.routes||[]).filter(u=>u.targetPeerId!==e.targetPeerId||ze(u.url)!==ze(e.url))];if(a.length>Fr)throw new Error(`这台服务已保存 ${Fr} 个备用连接,请先移除一个后重试。`);if(!s.authorized){if(!o.canManage)throw new Error("请先让入口管理员授权此设备。");await r.request({type:"route-grant",serviceId:s.serviceId,subjectId:(await on()).peerId})}xn.get(t)?.delete(e.targetPeerId);const d=(i?Mt({...i,targetPeerId:s.serviceId})[0]:void 0)||(s.url&&ze(s.url)!==ze(e.url)?s.url:void 0);return{url:d||e.url,...d?{serviceOrigin:d}:{entryServiceId:e.targetPeerId},targetPeerId:s.serviceId,serviceName:i?.label||ob(s),routes:a}}finally{n.release()}}async function Kl(e,t){Wo(e.targetPeerId,t);const n=await es(e),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await on()).peerId;return{canManage:o.canManage===!0,grants:(Array.isArray(o.grants)?o.grants:[]).filter(i=>i.subjectId===s&&i.targetServiceId===t)}}finally{n.release()}}async function km(e,t,n){if(Wo(t.targetPeerId,e.targetPeerId),n!==void 0&&(await $f(ze(t.url),n)).targetPeerId!==t.targetPeerId)throw new Error("入口服务的身份已改变,请重新连接并确认。");const r=await es(t),o=r.client;try{await o.request({type:"route-grant",serviceId:e.targetPeerId,subjectId:(await on()).peerId,url:ze(e.serviceOrigin||e.url)}),xn.get(e.targetPeerId)?.delete(t.targetPeerId)}finally{r.release()}}async function z2(e,t){const n=await es(t),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await on()).peerId,i=(Array.isArray(o.grants)?o.grants:[]).filter(a=>a.subjectId===s&&a.targetServiceId===e&&a.active);for(const a of i)await r.request({type:"route-revoke",grantId:a.id})}finally{n.release()}}async function Ax(e,t,n={}){Wo(t.targetPeerId,e.targetPeerId);const r=await es(t),o=r.client;try{const s=await o.request({type:"route-invite-create",serviceId:e.targetPeerId,...n});if(typeof s.routeCode!="string"||typeof s.expiresAt!="number"&&s.expiresAt!==null)throw new Error("暂时无法生成备用连接邀请。");if(n.reusable&&s.reusable!==!0||n.linkExpiresAt!==void 0&&s.expiresAt!==n.linkExpiresAt)throw new Error("入口服务需要更新后才能使用所选的链接有效期和重复使用设置。");let i;try{const a=await o.fetch("/api/terminal/settings");if(a.ok){const c=(await a.json()).localAccess;c?.status!=="loopback-only"&&typeof c?.onboardingUrl=="string"&&typeof c?.caFingerprint=="string"&&new URL(c.onboardingUrl).protocol==="http:"&&(i={url:c.onboardingUrl,fingerprint:c.caFingerprint})}}catch{}return{routeCode:s.routeCode,expiresAt:s.expiresAt,...i?{onboarding:i}:{}}}finally{r.release()}}async function Ca(e,t){const n=(await gt()).find(o=>o.id===e.id||e.targetPeerId&&o.targetPeerId===e.targetPeerId)||e;await $n({...n,url:n.serviceOrigin||n.url,entryServiceId:void 0,routes:t});const r=oe();r&&r.targetPeerId===e.targetPeerId&&Xu({...r,url:r.serviceOrigin||r.url,entryServiceId:void 0,routes:t})}async function q2(e,t){const n=e.targetPeerId;if(!n)throw new Error("请先连接这台服务,再添加备用地址。");let r;try{r=ze(t)}catch{throw new Error("请输入有效的 HTTPS 地址,例如 https://电脑地址:9834。")}const o=new URL(r);if(o.protocol!=="https:"&&!["localhost","127.0.0.1","[::1]"].includes(o.hostname))throw new Error("备用地址需要 HTTPS,请使用服务的 HTTPS 地址。");const s=async()=>(await gt()).find(c=>c.targetPeerId===n)||e,i=c=>{const d=c.routes??nn({...c,targetPeerId:n});if(ze(c.serviceOrigin||c.url)===r||d.some(u=>ze(u.url)===r))throw new Error("这个地址已经在连接列表中。");if(d.length>=Fr)throw new Error(`最多保存 ${Fr} 个备用地址或入口,请先移除不再使用的连接。`);return[...d,{url:r,targetPeerId:n}]};i(await s());let a;try{try{a=await zr({url:Gr(r),targetPeerId:n,identity:await on(),signal:AbortSignal.timeout(5e3)}),await Jr(a)}catch(u){throw u instanceof Ot?new Error("这台服务尚未授权当前设备,请先恢复设备授权。"):new Error("无法验证这个地址。请确认能访问该地址、HTTPS 证书受信任,且运行的是同一台 Termdock 服务。")}const c=await s(),d=i(c);if(await Ca(c,d),oe()?.targetPeerId===n&&ko===n&&(!Ae||Ae.closed)){const u=Ae,f=Lt;Ae=a,a=void 0,Lt=void 0,Kr="direct",u?.close(),f?.close(),window.dispatchEvent(new Event(Et))}return d}finally{a?.close()}}async function Im(e,t){await hc(e,t),await Zt({...e,pairingCode:void 0,routeCode:void 0})}const An=new Map,cr=new Map,K2=32*1024*1024,G2=8*1024*1024,W2=48;let js=0,mu=0;function zf(){mu+=1,An.clear(),js=0;for(const e of cr.values())e.controller.abort();cr.clear()}typeof window<"u"&&window.addEventListener("auth:unauthorized",zf);function V2(e,t){const n=An.get(e);if(n&&(js-=n.blob.size,An.delete(e)),!(t.blob.size>G2))for(An.set(e,t),js+=t.blob.size;An.size>W2||js>K2;){const r=An.keys().next().value;js-=An.get(r).blob.size,An.delete(r)}}async function Rx(e,t={}){const n=new URL(e,typeof location<"u"?location.origin:"http://localhost");if(!/^\/api\/terminal\/fs\/(read|blob)$/.test(n.pathname))return fetch(e,{signal:t.signal});if(t.signal?.aborted)throw t.signal.reason??new DOMException("Aborted","AbortError");n.searchParams.delete("requestSlotId"),n.searchParams.delete("action"),n.searchParams.sort();const r=n.href;let o=cr.get(r);if(!o){const i=new AbortController,a=mu,c=An.get(r),d=new Headers,u=c?.headers.get("ETag");u&&d.set("If-None-Match",u);const f=setTimeout(()=>i.abort(new DOMException("File preview timed out. Please retry.","TimeoutError")),t.timeoutMs??15e3),h={controller:i,readers:0,promise:Promise.resolve(null)};h.promise=(async()=>{const p=await fetch(r,{headers:d,signal:i.signal,cache:"no-cache"});let g;return p.status===304&&c?g=c:g={blob:await p.blob(),headers:new Headers(p.headers),status:p.status},mu===a&&!i.signal.aborted&&g.status===200&&g.headers.has("ETag")&&V2(r,g),p.status===401&&zf(),g})().finally(()=>{clearTimeout(f),cr.get(r)===h&&cr.delete(r)}),o=h,cr.set(r,o)}const s=o;return s.readers+=1,new Promise((i,a)=>{let c=!1;const d=()=>c?!1:(c=!0,t.signal?.removeEventListener("abort",u),s.readers-=1,s.readers===0&&cr.get(r)===s&&(cr.delete(r),s.controller.abort()),!0),u=()=>{d()&&a(t.signal?.reason??new DOMException("Aborted","AbortError"))};if(t.signal?.addEventListener("abort",u,{once:!0}),t.signal?.aborted){u();return}s.promise.then(f=>{d()&&i(new Response(f.blob,{status:f.status,headers:f.headers}))},f=>{d()&&a(f)})})}const qf="auth:unauthorized";let Eo=null;class $e extends Error{constructor(t,n,r){super(t),this.status=n,this.code=r,this.name="TerminalApiError"}status;code}class Wr extends Error{code="TERMINAL_INPUT_REJECTED";constructor(t){super(t),this.name="TerminalInputError"}}async function Px(){const e=await fetch("/api/terminal/update");if(!e.ok)throw new $e("Failed to load update state",e.status);return e.json()}async function Y2(){const e=await ve(),t=await fetch("/api/terminal/update/check",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to check for updates",t.status);return t.json()}async function X2(e,t){if(e&&!e())throw new $e("Update confirmation expired");const n=await ve();if(e&&!e())throw new $e("Update confirmation expired");const r=await fetch("/api/terminal/update/restart",{method:"POST",headers:{"X-XSRF-TOKEN":n,...t===void 0?{}:{"Content-Type":"application/json"}},...t===void 0?{}:{body:JSON.stringify({version:t})}});if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to restart Termdock"}));if(r.status===409){if(e&&!e())throw new $e("Update confirmation expired");if(o.code==="UPDATE_STATE_CHANGED"&&o.state){if(o.state.status==="error")throw new $e(o.state.error||o.error,r.status);return o.state}if(!o.code){const s=await Px().catch(()=>null);if(e&&!e())throw new $e("Update confirmation expired");if(s&&s.status!=="error"&&(s.status!=="ready"||t!==void 0&&s.latestVersion!==t))return s}}throw new $e(o.error||"Failed to restart Termdock",r.status)}return r.json()}async function J2(){const e=await ve(),t=await fetch("/api/terminal/server-health/enable-supervision",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to enable automatic recovery",t.status)}async function Z2(){const e=await fetch("/api/terminal/server-health");if(!e.ok)throw new $e("Failed to load server health",e.status);return e.json()}async function Q2(){const e=await ve(),t=await fetch("/api/terminal/server-health/dismiss",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to dismiss server health",t.status);return t.json()}async function eP(){const e=await fetch("/api/terminal/quota");if(!e.ok)throw new $e("Failed to fetch quota",e.status);return e.json()}async function tP(){const e=await ve(),t=await fetch("/api/terminal/quota/refresh",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to refresh quota",t.status);return t.json()}const Zr=8e3,Nx=6e4,nP=32e3,_x=125e3,Fn=1e4,rP=65e3,Oo=45e3,oP=18e4,Lx=8e3,jx=8e3,Dx=15e3,sP=1e4,Vo=5e3;let iP=0;const Ta=[];let Gl=!1;function Tn(e,t={}){if(typeof window>"u")return;const n=JSON.stringify({level:e==="error"||e==="timeout_or_abort"||e==="response_body_timeout"||e==="response_body_parse_error"?"warn":"info",message:`DIFF_API ${e}`,data:{seq:++iP,ts:Date.now(),...t}});Ta.push(n),aP()}async function aP(){if(!Gl){Gl=!0;try{for(;Ta.length>0;){const e=Ta[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),Ta.shift()}catch{break}}}finally{Gl=!1}}}function Kf(e,t,n){const r=new AbortController;let o=setTimeout(()=>{r.abort(new DOMException(n,"TimeoutError"))},t);const s=()=>r.abort(e?.reason);return e&&(e.aborted?s():e.addEventListener("abort",s,{once:!0})),{signal:r.signal,cleanup:()=>{o&&(clearTimeout(o),o=null),e?.removeEventListener("abort",s)}}}async function at(e,t,n,r){const{signal:o,cleanup:s}=Kf(t?.signal??void 0,n,r);try{return await fetch(e,{...t,signal:o})}catch(i){throw i instanceof DOMException&&i.name==="TimeoutError"?new Error(r):i}finally{s()}}async function Ox(e,t,n){let r=null;const o=new Promise((s,i)=>{r=setTimeout(()=>i(new Error(n)),t)});try{return await Promise.race([e.text(),o])}finally{r&&clearTimeout(r)}}async function Yo(e,t,n){const r=await Ox(e,t,n);return JSON.parse(r)}if(typeof window<"u"&&!window.__termdockFetchPatched){window.__termdockFetchPatched=!0;const e=window.fetch.bind(window);window.fetch=async(...t)=>{const n=await e(...t);if(n.status===401){Eo=null,Ni();try{window.dispatchEvent(new CustomEvent(qf))}catch{}}return n}}async function ve(){if(Eo)return Eo;const e=await at("/api/csrf-token",void 0,Lx,"CSRF token request timed out");if(!e.ok)throw new Error("Failed to get CSRF token");const t=await Yo(e,Vo,"CSRF token response timed out");if(!t.csrfToken)throw new Error("Invalid CSRF token response");return Eo=t.csrfToken,Eo}function Gf(){Ni(),Eo=null}const cP=2e4,Cm=8e3,Mx=1500,Bx=Mx,it=new Map,Wf=new Map;function lP(e){return xE(it.get(e)?.ws)}const dP=24,uP=40,fP=40,hP=1024*1024,pP=1024*1024,mP=2*1024*1024,gP=36,Fx=50,yP=1e3,wP=20,Ux=new TextEncoder;function Hx(e){return e.items.length-e.head}function Tm(e){e.head===e.items.length?(e.items.length=0,e.head=0):e.head>=64&&e.head*2>=e.items.length&&(e.items.splice(0,e.head),e.head=0)}function bP(e){const t=JSON.stringify({id:"0".repeat(gP),type:"ws-data",data:e});return Ux.encode(t).byteLength<=mP}function vP(e){return typeof e=="object"&&e!==null&&e.code==="PACKET_QUEUE_BACKPRESSURE"}function Wl(e,t){const n=t instanceof Wr?t:new Wr(t.message),r=e.pendingInputs;r.items.length=0,r.head=0,r.bytes=0,e.inputFlushTimer&&(clearTimeout(e.inputFlushTimer),e.inputFlushTimer=null);try{e.onError?.(n,!0)}finally{e.disconnect()}return n}function xP(e){const t=Hx(e.pendingInputs);return e.retryState.retryCount>=2||t>=fP?"congested":e.retryState.retryCount>=1||t>=8?"degraded":"good"}function Am(e){const t=e.pendingInputs;if(!(Hx(t)===0||e.ws.readyState!==WebSocket.OPEN))for(;t.head<t.items.length;){const n=t.items[t.head];if(!n){t.head++,Tm(t);continue}if(n.requiresCopyModeExit&&e.copyModeInput!==!0)return e.copyModeInput===void 0?void 0:Wl(e,new Wr("The reconnected server cannot safely resume this input; please type it again"));try{e.ws.send(n.message)}catch(r){if(!vP(r))return Wl(e,r instanceof Error?r:new Error(String(r)));if(e.inputRetryAttempts++,e.inputRetryAttempts>=wP)return Wl(e,new Wr("Terminal input was not accepted after repeated encrypted-channel backpressure"));const o=e.inputRetryDelayMs;e.inputRetryDelayMs=Math.min(yP,o*2),!e.inputFlushTimer&&!e.retryState.isClosed&&(e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,pc(e)},o));return}t.bytes-=n.bytes,t.items[t.head]=void 0,t.head++,Tm(t),e.inputRetryDelayMs=Fx,e.inputRetryAttempts=0}}function pc(e){if(e.ws.readyState!==WebSocket.OPEN||e.inputFlushTimer)return;const t=xP(e);if(t==="good")return Am(e);const n=t==="congested"?uP:dP;e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,Am(e)},n)}const Ys=new Map;function SP(e,t,n,r,o,s){const i=Ys.get(e);!i||i.connection!==s||(Ys.delete(e),t?i.resolve({success:!0,layout:n,selection:o}):i.reject(new Error(r||"Tmux action failed")))}const xo=new Map;function EP(e,t,n,r){const s=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/terminal/${e}/ws`,i=new URLSearchParams({flow:"2",transport:"tmux-client",active:Wf.get(e)===!1?"0":"1"});t>0&&i.set("since",String(t)),n&&i.set("epoch",n);const a=r===void 0?xo.get(e):r;return a&&(i.set("cols",String(a.cols)),i.set("rows",String(a.rows))),`${s}?${i}`}const gu=new Map,yu=new Map;function kP(e,t,n){gu.set(e,t),yu.set(e,n)}function IP(e){const t=it.get(e);return t?.streamEpoch&&t.appliedSeq===t.lastSeq&&t.lastSeq>0?{seq:t.lastSeq,epoch:t.streamEpoch}:null}async function CP(e){const t=await ve(),n=await fetch("/api/terminal/create",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({cols:e.cols||80,rows:e.rows||24,mode:e.mode||"shell",tmuxSessionName:e.tmuxSessionName,cwd:e.cwd,termType:e.termType})});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to create terminal"}));throw new Error(r.error||"Failed to create terminal session")}return n.json()}function TP(e,t,n,r={}){const{maxRetries:o=10,initialRetryDelay:s=1e3,maxRetryDelay:i=2e4,connectionTimeout:a=15e3}=r,c={maxRetries:o,initialDelayMs:s,maxDelayMs:i,connectionTimeoutMs:a,retryCount:0,retryTimeout:null,connectionTimeoutId:null,isClosed:!1,isSuspended:!1};let d=null,u=gu.get(e)??0,f=yu.get(e);yu.delete(e),gu.delete(e);const h={items:[],head:0,bytes:0};let p=!1,g=null;const m=new WeakSet,b=()=>{c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null),c.connectionTimeoutId&&(clearTimeout(c.connectionTimeoutId),c.connectionTimeoutId=null),g&&(clearTimeout(g),g=null)},y=A=>{A.wakeProbe&&(clearTimeout(A.wakeProbe.timer),A.wakeProbe=void 0),A.heartbeatTimer&&(clearInterval(A.heartbeatTimer),A.heartbeatTimer=null),A.pongTimer&&(clearTimeout(A.pongTimer),A.pongTimer=null),A.inputFlushTimer&&(clearTimeout(A.inputFlushTimer),A.inputFlushTimer=null)},k=A=>{y(A),A.heartbeatTimer=setInterval(()=>{if(A.ws.readyState===WebSocket.OPEN){try{A.ws.send(JSON.stringify({type:"ping"}))}catch{}A.pongTimer&&clearTimeout(A.pongTimer),A.pongTimer=setTimeout(()=>{if(Date.now()-A.lastInboundAt>=Cm){p=!0,y(A);try{A.ws.close()}catch{}_(new Error("WebSocket heartbeat timeout"),!1)}},Cm)}},cP)},x=()=>{if(c.isClosed=!0,b(),h.items.length=0,h.head=0,h.bytes=0,d){y(d),it.delete(e);try{d.ws.close()}catch{}d=null}},T=()=>{if(c.isClosed)return;if(d){m.add(d.ws),y(d);try{d.ws.close()}catch{}}const A=EP(e,u,f,r.getDimensions?.()),E=Tx(A);p=!1,c.connectionTimeoutId=setTimeout(()=>{E.readyState!==WebSocket.OPEN&&(p=!0,E.close(),_(new Error("WebSocket connection timeout"),!1))},a);const v={ws:E,onEvent:t,onError:n,disconnect:x,reconnectNow:S=>{if(!c.isClosed&&(c.isSuspended=!1,!g)){if(b(),d){m.add(d.ws),y(d);try{d.ws.close()}catch{}}S?.silent||t({type:"reconnecting",attempt:Math.min(c.retryCount+1,o),maxAttempts:o}),c.retryCount=Math.min(c.retryCount+1,o),p=!0,g=setTimeout(()=>{g=null,p=!1,T()},0)}},suspendReconnect:()=>{c.isClosed||(c.isSuspended=!0,c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null))},retryState:c,lastSeq:u,pendingInputs:h,inputRetryDelayMs:Fx,inputRetryAttempts:0,inputFlushTimer:null,heartbeatTimer:null,pongTimer:null,lastInboundAt:Date.now(),inboundSequence:0};E.onopen=()=>{c.isClosed||m.has(E)||p||(b(),c.retryCount=0,v.lastInboundAt=Date.now(),v.inboundSequence+=1,k(v),pc(v))},E.onmessage=S=>{if(!(c.isClosed||m.has(E)||p)){v.lastInboundAt=Date.now(),v.inboundSequence+=1;try{const I=JSON.parse(S.data);if(v.wakeProbe&&it.get(e)===v){const C=v.wakeProbe;v.wakeProbe=void 0,clearTimeout(C.timer);for(const N of C.listeners)N()}if(I.type==="pong"){vE(E,I.qualityProbeId,I.handlerMs),v.pongTimer&&(clearTimeout(v.pongTimer),v.pongTimer=null);return}if(I.type==="tmux-result"&&I.reqId){SP(I.reqId,I.success!==!1,I.layout,I.error,I.selection,E);return}if(I.type==="tmux-layout"&&I.layout){t({type:"tmux-layout",layout:I.layout});return}if(I.type==="tmux-screen-sync"&&Array.isArray(I.chunks)){t({type:"tmux-screen-sync",chunks:I.chunks.filter(C=>typeof C=="string"),cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,generation:typeof I.generation=="number"?I.generation:void 0});return}if(I.type==="active-program"){t({type:"active-program",activeProgram:I.activeProgram,activeProgramRaw:I.activeProgramRaw,activeProgramSource:I.activeProgramSource});return}if(I.type==="cwd"){t({type:"cwd",cwd:I.cwd});return}if(I.type==="agent-status"){t({type:"agent-status",agentStatus:I.agentStatus??null,agentIndicator:I.agentIndicator??null,agentStatusDetail:I.agentStatusDetail??null,agent:I.agent??null,agentMessage:I.agentMessage??null,agentNativeSessionId:I.agentNativeSessionId??null,agentResumeRecovered:I.agentResumeRecovered===!0,agentRich:I.agentRich===!0,agentActivity:typeof I.agentActivity=="number"?I.agentActivity:0,agentCwd:I.agentCwd??null,reviewed:typeof I.reviewed=="boolean"?I.reviewed:null});return}if(I.type==="git-status"){t({type:"git-status",gitStatus:I.gitStatus??null});return}if(I.type==="quota-status"&&Array.isArray(I.providers)){window.dispatchEvent(new CustomEvent("termdock:quota-update",{detail:I.providers}));return}if(I.type==="focus-mode"){t({type:"focus-mode",focusTrackingRequested:I.focusTrackingRequested===!0});return}if(I.type==="resize-ack"){t({type:"resize-ack",seq:typeof I.seq=="number"?I.seq:void 0,cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,ok:I.ok!==!1,error:typeof I.error=="string"?I.error:void 0,screenSyncPending:I.screenSyncPending===!0,screenSyncGeneration:typeof I.screenSyncGeneration=="number"?I.screenSyncGeneration:void 0});return}if(I.type==="pty-size"){t({type:"pty-size",cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,source:typeof I.source=="string"?I.source:void 0});return}if(I.type==="shell-title"){t({type:"shell-title",title:typeof I.title=="string"?I.title:""});return}if(I.type==="prompt-state"){t({type:"prompt-state",state:I.state==="running"?"running":"idle",exitCode:typeof I.exitCode=="number"?I.exitCode:void 0});return}const R=I;if(R.type==="connected"){if(v.appliedSeq=void 0,f=R.streamEpoch,v.streamEpoch=f,v.outputProtocol=R.outputProtocol,v.copyModeInput=R.copyModeInput===!0,pc(v))return;typeof R.replayLastSeq=="number"&&R.replayLastSeq>=0&&(u=R.replayLastSeq,v.lastSeq=u),t(R),zx(e,Wf.get(e)??!0);return}if(R.type==="exit"){x(),t(R);return}if(R.type==="data"){if(v.appliedSeq=void 0,typeof R.seq=="number"&&R.seq<=u)return;typeof R.flowSeq=="number"&&(v.flowSeq=R.flowSeq)}t(R),R.type==="data"&&typeof R.seq=="number"&&Number.isFinite(R.seq)&&R.seq>u&&(u=R.seq,v.lastSeq=u)}catch(I){n?.(I,!1)}}},E.onerror=()=>{c.isClosed||m.has(E)||p||(b(),y(v),p||(p=!0,_(new Error("WebSocket connection error"),!1)))},E.onclose=S=>{if(!(c.isClosed||m.has(E)||p)){if(S.code===au&&S.reason===cu){v.reconnectNow({silent:!0});return}if(b(),y(v),p=!0,S.code===4001){console.warn("[Terminal] WS 4001: Session not found on server",{code:S.code,reason:S.reason,stack:new Error().stack}),_(new Error("Session not found on server"),!0);return}if(S.code===4003||S.code===4401){try{window.dispatchEvent(new CustomEvent(qf))}catch{}_(new Error("Authentication required"),!0);return}_(new Error("WebSocket connection closed"),!1)}},d=v,it.set(e,d)},_=(A,E)=>{if(!c.isClosed)if(E)n?.(A,!0),x();else{c.retryCount=Math.min(c.retryCount+1,Math.max(1,o));const v=Math.min(s*Math.pow(2,c.retryCount-1),i);if(t({type:"reconnecting",attempt:c.retryCount,maxAttempts:o}),c.isSuspended)return;c.retryTimeout=setTimeout(()=>{c.isClosed||T()},v)}};return T(),x}function $x(e,t,n=!1){const r=JSON.stringify({type:"input",data:t,...n?{exitCopyMode:!0}:{}}),o=Ux.encode(r).byteLength;if(o>hP||!bP(r))throw new Wr("Terminal input exceeds the encrypted socket frame limit");const s=e.pendingInputs;if(s.bytes+o>pP)throw new Wr("Terminal input queue is full; retry after the connection recovers");if(s.items.push({message:r,bytes:o,...n?{requiresCopyModeExit:!0}:{}}),s.bytes+=o,e.ws.readyState===WebSocket.OPEN){const i=pc(e);if(i)throw i}}function AP(e,t){const n=it.get(e);return!n||n.ws.readyState!==WebSocket.OPEN||n.copyModeInput!==!0?!1:($x(n,t,!0),!0)}async function RP(e,t,n){const r=await ve(),o=await fetch(`/api/terminal/${encodeURIComponent(e)}/agent-launch`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify({command:t,idempotencyKey:n})});if(!o.ok){const s=await o.json().catch(()=>({}));throw new $e(s.error||"Could not prepare the original conversation for recovery",o.status,s.code)}}async function PP(e,t){const n=it.get(e);if(n&&(n.ws.readyState===WebSocket.OPEN||n.ws.readyState===WebSocket.CONNECTING)){$x(n,t);return}const r=await ve(),o=await fetch(`/api/terminal/${e}/input`,{method:"POST",headers:{"Content-Type":"text/plain","X-XSRF-TOKEN":r},body:t});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to send input"}));throw new $e(s.error||"Failed to send terminal input",o.status,s.code)}}function NP(e,t,n={}){const r=it.get(e);if(!r)return!1;if(r.retryState.isSuspended=!1,r.ws.readyState!==WebSocket.OPEN)return r.reconnectNow(),!0;const o=n.visible?Bx:Mx,s=Date.now()+o,i=r.wakeProbe,a=i?.listeners??new Set;if(t&&a.add(t),i&&i.deadline<=s)return!0;i&&clearTimeout(i.timer);const c=setTimeout(()=>{it.get(e)!==r||r.retryState.isClosed||(r.wakeProbe=void 0,r.reconnectNow())},o);if(r.wakeProbe={timer:c,listeners:a,deadline:s},i)return!0;try{r.ws.send(JSON.stringify({type:"ping"}))}catch{clearTimeout(c),r.wakeProbe=void 0,r.reconnectNow()}return!0}function _P(e){const t=it.get(e);return t?(t.reconnectNow(),!0):!1}function LP(){for(const e of it.values())e.suspendReconnect()}function jP(e,t,n){const r=it.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"focus",focused:t,reason:n}))}catch{}}function zx(e,t){Wf.set(e,t);const n=it.get(e);!n||n.ws.readyState!==WebSocket.OPEN||n.outputProtocol!==2||n.ws.send(JSON.stringify({type:"output-subscription",active:t,since:n.lastSeq,epoch:n.streamEpoch}))}function DP(e){const t=it.get(e);!t||t.ws.readyState!==WebSocket.OPEN||t.outputProtocol!==2||(t.appliedSeq=t.lastSeq,!(!t.flowSeq||t.flowSeq===t.acknowledgedFlowSeq)&&(t.acknowledgedFlowSeq=t.flowSeq,t.ws.send(JSON.stringify({type:"output-ack",flowSeq:t.flowSeq,since:t.appliedSeq,epoch:t.streamEpoch}))))}function OP(e,t,n){const r=it.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"viewing",viewing:t,reason:n}))}catch{}}function qx(e){const t=it.get(e);if(!(!t||t.ws.readyState!==WebSocket.OPEN))try{t.ws.send(JSON.stringify({type:"agent-review-ack"}))}catch{}}function MP(e,t,n){const r=it.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"flow-control",paused:t,reason:n}))}catch{}}async function BP(e,t,n,r){Number.isFinite(t)&&Number.isFinite(n)&&t>=1&&n>=1&&(xo.delete(e),xo.set(e,{cols:Math.floor(t),rows:Math.floor(n)}),xo.size>256&&xo.delete(xo.keys().next().value));const o=it.get(e);if(o&&o.ws.readyState===WebSocket.OPEN)try{o.ws.send(JSON.stringify({type:"resize",cols:t,rows:n,seq:r}));return}catch{}const s=await ve(),i=await fetch(`/api/terminal/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":s},body:JSON.stringify({cols:t,rows:n,seq:r})});if(!i.ok){const c=await i.json().catch(()=>({error:"Failed to resize terminal"}));throw new Error(c.error||"Failed to resize terminal")}const a=await i.json().catch(()=>({success:!0}));if(a?.success===!1||a?.ok===!1)throw new Error(a?.error||"Failed to resize terminal")}async function Kx(e,t){const n=it.get(e);if(n&&n.ws.readyState===WebSocket.OPEN)return t.action==="scroll"?(n.ws.send(JSON.stringify({type:"tmux",...t})),{success:!0}):new Promise((s,i)=>{const a=Math.random().toString(36).substring(7);Ys.set(a,{resolve:s,reject:i,connection:n.ws}),n.ws.send(JSON.stringify({type:"tmux",reqId:a,...t})),setTimeout(()=>{Ys.has(a)&&(Ys.delete(a),i(new Error("Tmux action timed out")))},3e4)});const r=await ve(),o=await fetch(`/api/terminal/${e}/tmux`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(t)});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to execute tmux action"}));throw new $e(s.error||"Failed to execute tmux action",o.status,s.code)}return o.json()}async function FP(e){const t=await ve(),n=await fetch(`/api/terminal/${e}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok&&n.status!==404){const o=await n.json().catch(()=>({error:"Failed to close terminal"}));throw new Error(o.error||"Failed to close terminal")}it.get(e)?.disconnect()}async function UP(e,t){const n=it.get(e);if(n){n.retryState.isClosed=!0;try{n.ws.close()}catch{}it.delete(e)}const r=await ve(),o=await fetch(`/api/terminal/${e}/restart`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify({...t.cwd?{cwd:t.cwd}:{},cols:t.cols??80,rows:t.rows??24,mode:t.mode,tmuxSessionName:t.tmuxSessionName})});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to restart terminal"}));throw new Error(s.error||"Failed to restart terminal session")}return o.json()}async function HP(e){const t=await at(`/api/terminal/${e}/health`,{method:"GET"},jx,"Terminal health check timed out");if(!t.ok){if(t.status===404)return{healthy:!1,sessionId:e};const n=await Yo(t,Vo,"Terminal health error response timed out").catch(()=>({error:"Failed to check terminal health"}));throw new Error(n.error||"Failed to check terminal health")}return Yo(t,Vo,"Terminal health response timed out")}async function $P(e){const t=await ve(),n=await at("/api/terminal/force-kill",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},sP,"Terminal force-kill request timed out");if(!n.ok){const r=await Yo(n,Vo,"Terminal force-kill error response timed out").catch(()=>({error:"Failed to force kill terminal"}));throw new Error(r.error||"Failed to force kill terminal")}}async function zP(){const e=await fetch("/api/terminal/tmux/sessions",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to list tmux sessions"}));throw new Error(n.error||"Failed to list tmux sessions")}const t=await e.json();return Array.isArray(t.sessions)?t.sessions:[]}async function qP(){const e=await fetch("/api/terminal/tmux/status",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to get tmux status"}));throw new Error(t.error||"Failed to get tmux status")}return e.json()}async function KP(e){const t=e.trim();if(!t)throw new Error("tmux session name is required");const n=await ve(),r=await fetch(`/api/terminal/tmux/sessions/${encodeURIComponent(t)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":n}});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to kill tmux session"}));throw new Error(s.error||"Failed to kill tmux session")}const o=await r.json();return{cleanedSessions:Array.isArray(o.cleanedSessions)?o.cleanedSessions:[],alreadyGone:!!o.alreadyGone}}async function GP(e){const t=await ve(),n=`ui-restore:${e??"current"}:${Date.now()}:${Math.random().toString(36).slice(2)}`,r=await fetch("/api/terminal/tmux/recovery/restore-all",{method:"POST",headers:{"X-XSRF-TOKEN":t,"Content-Type":"application/json"},body:JSON.stringify({idempotencyKey:n})}),o=await r.json().catch(()=>({}));if(!r.ok)throw new $e(o.error||"Failed to restore tmux Agent sessions",r.status);return o}async function WP(e,t){const n=await ve(),r=await fetch(`/api/terminal/tmux/recovery/operations/${encodeURIComponent(e)}/${t?"pause":"resume"}`,{method:"POST",headers:{"X-XSRF-TOKEN":n}});if(!r.ok)throw new $e("Failed to update recovery operation",r.status)}async function VP(e){const t=await ve(),n=await fetch("/api/terminal/tmux/recovery",{method:"DELETE",...e?{body:JSON.stringify({incidentId:e})}:{},headers:{"X-XSRF-TOKEN":t,...e?{"Content-Type":"application/json"}:{}}});if(!n.ok)throw new $e("Failed to dismiss tmux recovery",n.status)}const da=new Map;function YP(e){return JSON.stringify({preferredFrontendSessionId:e.preferredFrontendSessionId??null,mode:e.mode??null,tmuxSessionName:e.tmuxSessionName??null,cwd:e.cwd??null,termType:e.termType??null,createIfEmpty:e.createIfEmpty===!0,requireExisting:e.requireExisting===!0})}async function XP(){const e=await fetch("/api/terminal/session-inventory",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load session inventory"}));throw new Error(t.error||"Failed to load session inventory")}return e.json()}async function JP(e){const t=YP(e),n=da.get(t);if(n)return n;const r=await ve(),o=at("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(e)},Dx,"Terminal session open request timed out").then(async s=>{if(!s.ok){const i=await Yo(s,Vo,"Terminal session open error response timed out").catch(()=>({error:"Failed to open session"}));throw new $e(i.error||"Failed to open session",s.status,typeof i.code=="string"?i.code:void 0)}return Yo(s,Vo,"Terminal session open response timed out")}).finally(()=>{da.get(t)===o&&da.delete(t)});return da.set(t,o),o}async function ZP(e,t){const n=await ve(),r=await fetch(`/api/terminal/session-inventory/sessions/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":n},body:JSON.stringify(t)});if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to update session"}));throw new Error(o.error||"Failed to update session")}return r.json()}async function QP(e){const t=await ve(),n=await fetch("/api/terminal/session-inventory/reorder",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({sessionIds:e})});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to reorder sessions"}));throw new Error(r.error||"Failed to reorder sessions")}return n.json()}async function eN(e){const t=await ve(),n=await fetch(`/api/terminal/session-inventory/sessions/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to remove session"}));throw new Error(r.error||"Failed to remove session")}}async function tN(){const e=await ve(),t=await fetch("/api/terminal/session-inventory/sessions",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to clear sessions"}));throw new Error(n.error||"Failed to clear sessions")}}async function nN(){const e=await fetch("/api/terminal/toolbar-presets",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load toolbar presets"}));throw new Error(t.error||"Failed to load toolbar presets")}return e.json()}async function rN(e){const t=await ve(),n=await fetch("/api/terminal/toolbar-presets",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to save toolbar presets"})),o=new Error(r.error||"Failed to save toolbar presets");throw o.current=r.current,o.code=r.code,o}return n.json()}let vs=null,Ds=null;const Gx=1500;function lr(){return Ds&&Date.now()-Ds.readAt<Gx?Promise.resolve(Ds.value):vs||(vs=(async()=>{const e=await fetch("/api/terminal/settings",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to load settings"}));throw new Error(n.error||"Failed to load settings")}const t=await e.json();return Ds={value:t,readAt:Date.now()},t})().finally(()=>{vs=null}),vs)}async function Yt(e){const t=await ve(),n=await fetch("/api/terminal/settings",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const o=await n.json().catch(()=>({error:"Failed to update settings"}));throw new Error(o.error||"Failed to update settings")}const r=await n.json();return Ds={value:r,readAt:Date.now()},r}async function oN(e=!1){const t=await fetch(`/api/terminal/auto-title/catalog${e?"?refresh=1":""}`);if(!t.ok)throw new Error("Failed to discover title models");const n=await t.json();return Array.isArray(n?.namers)?n.namers:[]}let xs=null,Os=null;function sN(){return Os&&Date.now()-Os.readAt<Gx?Promise.resolve(Os.value):xs||(xs=(async()=>{const e=await fetch("/api/terminal/context-draft",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to load context draft"}));throw new Error(n.error||"Failed to load context draft")}const t=await e.json();return Os={value:t,readAt:Date.now()},t})().finally(()=>{xs=null}),xs)}async function iN(e,t){const n=await ve(),r=await fetch("/api/terminal/context-draft",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":n},body:JSON.stringify({text:e,origin:t})});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to update context draft"}));throw new Error(s.error||"Failed to update context draft")}const o=await r.json();return Os={value:o,readAt:Date.now()},o}async function Wx(e){let t;try{t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})})}catch(r){const o=Wn(r);return{ok:!1,reason:bm(o.code),error:o.message}}if(t.ok)return Gf(),{ok:!0};const n=await t.json().catch(()=>null);return t.status===429?{ok:!1,reason:"rateLimited",rateLimited:!0,retryAfterMs:typeof n?.retryAfterMs=="number"?n.retryAfterMs:void 0,error:n?.error||"Too many failed attempts. Please wait and try again."}:{ok:!1,reason:bm(n?.code)||(t.status===401?"invalidPassword":"unavailable"),error:n?.error||"Login failed"}}async function aN(){zf(),nb();const e=await ve();await fetch("/api/auth/logout",{method:"POST",headers:{"X-XSRF-TOKEN":e}}),Gf()}async function cN(){const e=await fetch("/api/terminal/agent-launchers");if(!e.ok)throw new Error("Failed to detect agent launchers");const t=await e.json();return Array.isArray(t?.agents)?t.agents:[]}async function lN(){const e=await fetch("/api/terminal/agent-hooks");if(!e.ok)throw new Error("Failed to get agent hooks");const t=await e.json();return Array.isArray(t?.agents)?t.agents:[]}async function dN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-hooks/${encodeURIComponent(e)}/install`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to install agent hooks");return{summary:r.summary??"Installed",devMode:r.devMode===!0}}async function uN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-hooks/${encodeURIComponent(e)}/uninstall`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to uninstall agent hooks");return r.summary??"Removed"}class Vf extends Error{constructor(t,n,r){super(t),this.code=n,this.migration=r,this.name="AgentPluginManifestError"}code;migration}async function fN(){const e=await fetch("/api/terminal/agent-plugins");if(!e.ok)throw new Error("Failed to get agent plugins");return await e.json()}async function hN(e){const t=await ve(),n=await fetch("/api/terminal/agent-plugins",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Vf(r.error||"Failed to create agent plugin",r.code,r.migration);return r}async function pN(e){const t=await ve(),n=await fetch("/api/terminal/agent-plugins/install",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({source:e})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Vf(r.error||"Failed to install agent plugin",r.code,r.migration);return r}async function mN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/check-update`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to check plugin updates");return r}async function gN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/update`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to update plugin");return r}async function yN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/doctor`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to diagnose plugin");return r}async function wN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||"Failed to delete agent plugin")}}async function bN(e){const t=await ve(),n=await fetch(`/api/terminal/${encodeURIComponent(e)}/agent-resume`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new $e(r.error||"Failed to resume agent session",n.status,typeof r.code=="string"?r.code:void 0);return{command:r.command??""}}async function vN(){const e=await fetch("/api/terminal/agent-resume-history",{method:"GET"});if(!e.ok)throw new Error("Failed to load Agent resume history");const t=await e.json().catch(()=>({entries:[]}));return Array.isArray(t.entries)?t.entries:[]}async function xN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-resume-history/${encodeURIComponent(e)}/prepare`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new $e(r.error||"Failed to prepare Agent session resume",n.status,typeof r.code=="string"?r.code:void 0);return r}async function SN(e){const t=await ve(),n=await fetch(`/api/terminal/agent-resume-history/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok&&n.status!==404)throw new Error("Failed to remove Agent resume history")}async function EN(e){const t=await ve(),n=await fetch("/api/terminal/program-rules",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to update program rules"}));throw new Error(r.error||"Failed to update program rules")}return n.json()}async function kN(){const e=await ve(),t=await fetch("/api/terminal/program-rules",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new Error("Failed to reset program rules");return t.json()}async function IN(){const e=await fetch("/api/terminal/program-detection");if(!e.ok)throw new Error("Failed to get program detection config");return e.json()}async function CN(e){const t=await ve(),n=await fetch("/api/terminal/program-detection",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok)throw new Error("Failed to save program detection config");return n.json()}async function TN(){const e=await ve(),t=await fetch("/api/terminal/program-detection",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new Error("Failed to reset program detection config");return t.json()}const AN={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".bmp":"image/bmp",".ico":"image/x-icon",".svg":"image/svg+xml",".heic":"image/heic",".heif":"image/heif"};function Jc(e){const t=e.lastIndexOf(".");return t<0?null:AN[e.slice(t).toLowerCase()]??null}function RN(e){return Jc(e)!==null}function Vx(e){const t=Jc(e);return t==="image/heic"||t==="image/heif"}const PN={".mp4":"video/mp4",".m4v":"video/x-m4v",".webm":"video/webm",".mov":"video/quicktime",".ogv":"video/ogg",".mpeg":"video/mpeg",".mpg":"video/mpeg"};function Yx(e){const t=e.lastIndexOf(".");return t<0?null:PN[e.slice(t).toLowerCase()]??null}function Xx(e){return Yx(e)!==null}function NN(e){return`/api/terminal/fs/video?path=${encodeURIComponent(e)}&action=view_file`}const Jx=[".stl",".glb",".gltf"];function Yf(e){const t=e.lastIndexOf(".");if(t<0)return null;const n=e.slice(t).toLowerCase();return Jx.includes(n)?n:null}function Zx(e){return Yf(e)!==null}function Xf(e){const t=e.toLowerCase();return t.endsWith(".kicad_sch")?".kicad_sch":t.endsWith(".kicad_pcb")?".kicad_pcb":null}function _N(e){return Xf(e)!==null}function LN(e){return Xf(e)===".kicad_pcb"?"pcb-front":"schematic"}const Qx=[".html",".htm"];function jN(e){const t=e.lastIndexOf(".");if(t<0)return!1;const n=e.slice(t).toLowerCase();return Qx.includes(n)}function DN(e){return`/api/terminal/fs/preview/${e.split(/[\\/]+/).filter(Boolean).map(n=>encodeURIComponent(n)).join("/")}`}const ON={".stl":"model/stl",".glb":"model/gltf-binary",".gltf":"model/gltf+json"};async function e0(e,t,n,r="list_directory",o,s="name",i){const a=new URLSearchParams({path:e});n&&a.set("showHidden","true"),s!=="name"&&a.set("sort",s),i&&a.set("gitIgnoreRoot",i),a.set("action",r),o&&a.set("requestSlotId",o);const c=await at(`/api/terminal/fs/list?${a}`,{signal:t},Zr,"Directory listing took too long. The folder may be on slow storage or blocked by another process.");if(!c.ok){const d=await c.json().catch(()=>({error:"Failed to list directory"}));throw new Error(d.error||"Failed to list directory")}return c.json()}async function t0(e,t,n,r,o,s="name",i,a={}){const c=new URLSearchParams({path:e,query:t,stream:"true"});o&&c.set("showHidden","true"),s==="content"&&c.set("mode","content"),i&&c.set("requestSlotId",i);for(const g of a.excludePatterns??[])c.append("exclude",g);a.caseSensitive&&c.set("caseSensitive","true"),a.wholeWord&&c.set("wholeWord","true"),a.regex&&c.set("regex","true");const d=await fetch(`/api/terminal/fs/search?${c}`,{signal:r});if(!d.ok||!d.body){const g=await d.json().catch(()=>({error:"Failed to search files"}));throw new Error(g.error||"Failed to search files")}const u=d.body.getReader(),f=new TextDecoder;let h="";const p=g=>{if(!g.trim())return;const m=JSON.parse(g);if(m.type==="meta")n({path:m.path,query:m.query,engine:m.engine,mode:m.mode,limited:m.limited});else if(m.type==="batch")n({entries:m.entries??[]});else if(m.type==="content-batch")n({contentEntries:m.contentEntries??[]});else{if(m.type==="error")throw new Error(m.message||"Search failed");m.type==="done"&&n({total:m.total,truncated:m.truncated,limited:m.limited,engine:m.engine,mode:m.mode,done:!0})}};for(;;){const{value:g,done:m}=await u.read();if(m)break;h+=f.decode(g,{stream:!0});let b=h.indexOf(`
|
|
3
|
+
`);for(;b>=0;)p(h.slice(0,b)),h=h.slice(b+1),b=h.indexOf(`
|
|
4
|
+
`)}h+=f.decode(),p(h)}async function MN(e,t,n){const r=new URLSearchParams;for(const u of e)r.append("root",u);const o=await fetch(`/api/terminal/fs/watch?${r}`,{signal:n});if(!o.ok||!o.body){const u=await o.json().catch(()=>({error:"Failed to watch files"}));throw new Error(u.error||"Failed to watch files")}const s=o.body.getReader(),i=new TextDecoder;let a="",c=null;const d=u=>{if(!u.trim())return;const f=JSON.parse(u);if(f.type==="events"&&f.events?.length){t(f.events);const h=f.events.find(p=>p.type==="rescan-required"&&p.reason!=="event-storm"&&p.reason!=="reconnected"&&p.reason!=="directory-rescan"&&p.reason!=="polling-fallback");h?.reason&&(c=h.reason)}};for(;;){const{value:u,done:f}=await s.read();if(f)break;a+=i.decode(u,{stream:!0});let h=a.indexOf(`
|
|
5
|
+
`);for(;h>=0;)d(a.slice(0,h)),a=a.slice(h+1),h=a.indexOf(`
|
|
6
|
+
`)}if(a+=i.decode(),d(a),c)throw new Error(c)}function Jf(e){if(!e)return;const t=new URLSearchParams({requestSlotId:e,action:"cancel_io_slot"});fetch(`/api/terminal/fs/cancel-slot?${t}`,{method:"GET",keepalive:!0}).catch(()=>{})}async function BN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await Rx(`/api/terminal/fs/read?${o}`,{signal:t,timeoutMs:Zr});if(!s.ok){const i=await s.json().catch(()=>({error:"Failed to read file"}));throw new Error(i.error||"Failed to read file")}return s.json()}async function FN(e,t,n="HEAD",r,o="ref"){const s=new URLSearchParams({path:e,cwd:t,ref:n,action:"git_blob"});o!=="ref"&&s.set("source",o);const i=await at(`/api/terminal/fs/git-blob?${s}`,{signal:r},Zr,"Git blob preview took too long.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to read git blob"}));throw new Error(a.error||"Failed to read git blob")}return i.json()}async function UN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await Rx(`/api/terminal/fs/blob?${o}`,{signal:t,timeoutMs:Vx(e)?nP:Zr});if(!s.ok){const c=await s.json().catch(()=>({error:"Failed to load image preview"}));throw new Error(c.error||"Failed to load image preview")}const i=await s.blob(),a=s.headers.get("Content-Length");return{blob:i,path:e,size:a?Number(a):null,modified:s.headers.get("Last-Modified"),mimeType:s.headers.get("Content-Type")||i.type||Jc(e)||"application/octet-stream"}}function Zf(e,t){try{const n=decodeURIComponent(e.headers.get("X-Termdock-Source-Path")||"");return n.startsWith("/")&&!/[\r\n\0]/.test(n)?n:t}catch{return t}}async function HN(e,t,n,r="view_file",o){const s=new URLSearchParams({path:e,view:t,action:r});o&&s.set("requestSlotId",o);const i="KiCad preview rendering or transfer timed out.",a=Kf(n,_x,i);try{const c=await fetch(`/api/terminal/fs/eda-preview?${s}`,{signal:a.signal});if(!c.ok){const f=await c.json().catch(()=>({error:"Failed to render KiCad preview"}));throw new Error(f.error||"Failed to render KiCad preview")}const d=await c.blob(),u=c.headers.get("Content-Length");return{blob:d,path:Zf(c,e),view:t,size:u?Number(u):null,modified:c.headers.get("Last-Modified"),mimeType:c.headers.get("Content-Type")||d.type||"image/svg+xml"}}catch(c){throw a.signal.aborted&&!n?.aborted?new Error(i):c}finally{a.cleanup()}}async function $N(e,t,n,r,o){const s=new URLSearchParams({path:e,view:t,x:String(n),y:String(r)}),i=await at(`/api/terminal/fs/eda-inspect?${s}`,{signal:o},8e3,"KiCad point inspection timed out.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to inspect KiCad point"}));throw new Error(a.error||"Failed to inspect KiCad point")}return i.json()}async function zN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const i=Kf(t,Nx,"3D model transfer timed out. Please retry.");try{const a=await fetch(`/api/terminal/fs/download?${o}`,{signal:i.signal});if(!a.ok){const f=await a.json().catch(()=>({error:"Failed to load 3D model preview"}));throw new Error(f.error||"Failed to load 3D model preview")}const c=await a.blob(),d=a.headers.get("Content-Length"),u=Yf(e)??"";return{blob:c,path:Zf(a,e),size:d?Number(d):null,modified:a.headers.get("Last-Modified"),ext:u,mimeType:a.headers.get("Content-Type")||c.type||ON[u]||"application/octet-stream"}}finally{i.cleanup()}}function Rm(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}async function n0(e,t){if(t?.aborted)return"canceled";const n=ht()?.targetPeerId,r=`/api/terminal/fs/download?path=${encodeURIComponent(e)}`;try{const o=t?await fetch(r,{signal:t}):await fetch(r);if(t?.aborted)return"canceled";if(!o.ok){const c=await o.json().catch(()=>({error:"Failed to download file"}));if(t?.aborted)return"canceled";throw new Error(c.error||"Failed to download file")}const s=i0(o.headers?.get?.("Content-Disposition")||"")??e.split("/").pop()?.split("\\").pop()??"download",i=ct()?.saveDownloadStream;if(i&&o.body){const c=o.headers?.get?.("Content-Length"),d=c!=null&&/^\d+$/.test(c)?Number(c):void 0;if(t?.aborted||ht()?.targetPeerId!==n)return"canceled";const u=await i(o.body,s,{signal:t,expectedBytes:Number.isSafeInteger(d)?d:void 0});return t?.aborted||ht()?.targetPeerId!==n?"canceled":u}const a=await o.blob();return t?.aborted||ht()?.targetPeerId!==n?"canceled":await r0(a,s,t)}catch(o){if(t?.aborted)return"canceled";throw o}}async function r0(e,t,n){if(n?.aborted)return"canceled";const r=ct()?.saveDownloadBlob;if(r)return r(e,t,n);const o=window.showSaveFilePicker;if(typeof o=="function"){let a;try{a=await o({suggestedName:t})}catch(c){if(n?.aborted||c instanceof DOMException&&c.name==="AbortError")return"canceled"}if(n?.aborted)return"canceled";if(a){let c;try{c=await a.createWritable()}catch(u){if(n?.aborted)return"canceled";throw u}const d=()=>{c.abort?.().catch(()=>{})};n?.addEventListener("abort",d,{once:!0});try{return n?.aborted?(d(),"canceled"):(await c.write(e),n?.aborted?"canceled":(await c.close(),"saved"))}catch(u){if(n?.aborted)return"canceled";throw d(),u}finally{n?.removeEventListener("abort",d)}}}if(Rm()){const a=new File([e],t,{type:e.type||"application/octet-stream"});if(typeof navigator<"u"&&"share"in navigator&&(!navigator.canShare||navigator.canShare({files:[a]})))try{return await navigator.share({files:[a]}),"started"}catch(d){if(n?.aborted||d instanceof DOMException&&d.name==="AbortError")return"canceled"}}if(Rm()){if(n?.aborted)return"canceled";const a=await DE(e,t);if(n?.aborted)return"canceled";if(a)return window.location.assign(a),"started"}if(n?.aborted)return"canceled";const s=URL.createObjectURL(e),i=document.createElement("a");return i.href=s,i.download=t,i.rel="noopener",i.style.display="none",document.body.appendChild(i),i.click(),setTimeout(()=>{URL.revokeObjectURL(s),i.remove()},4e3),"started"}async function o0(e,t){if(t&&!t())throw new Error("File deletion context changed");const n=await ve();if(t&&!t())throw new Error("File deletion context changed");const r=new URLSearchParams({path:e,confirm:"true"}),o=await at(`/api/terminal/fs/file?${r}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":n}},Zr,"File deletion took too long.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to delete file"}));throw new Error(s.error||"Failed to delete file")}}class wu extends Error{constructor(t,n,r){super(t),this.result=n,this.code=r,this.name="UploadFilesError"}result;code}const bu=50;async function Pi(e,t,n,r,o,s){if(t.length>bu)throw new wu(`Choose up to ${bu} files per upload. None were uploaded.`,{files:[],results:t.map((m,b)=>({index:b,name:m.name,status:"rejected",code:"UPLOAD_LIMIT"}))},"UPLOAD_LIMIT");const i=ht(),a=()=>{if(n?.aborted)throw n.reason??new DOMException("Upload cancelled","AbortError");if(ht()!==i||o?.()===!1)throw new Error("Upload target changed")};a();const c=new FormData;for(const m of t)c.append("files",m);const d=s?`/api/terminal/${encodeURIComponent(s)}/chat/attachments?fileCount=${t.length}`:`/api/terminal/fs/upload?dir=${encodeURIComponent(e)}&fileCount=${t.length}`,u=await ve();a(),r?.(0);const f={"X-XSRF-TOKEN":u};let h=c;if(r){const m=new Response(c);f["Content-Type"]=m.headers.get("Content-Type"),h=await m.blob()}a();const p=await at(d,{method:"POST",headers:f,body:h,signal:n,onUploadProgress:h instanceof Blob&&r?m=>r(Math.min(99,Math.floor(m/Math.max(1,h.size)*100))):void 0},12e4,"Upload timed out");if(!p.ok){const m=await p.json().catch(()=>({error:"Upload failed"}));throw new wu(m.error||"Upload failed",m,m.code)}const g=await p.json();return a(),r?.(100),g}function s0(e,t,n,r,o){return Pi("",t,n,r,o,e)}async function qN(e){const t=await at("/api/terminal/fs/local-open-availability",{signal:e},Zr,"Local file browser availability check timed out");return t.ok?t.json():{available:!1}}async function KN(e){const t=await ve(),n=await at("/api/terminal/fs/open-in-file-browser",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({path:e})},Zr,"Opening file browser timed out");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to open file browser"}));throw new Error(r.error||"Failed to open file browser")}}function i0(e){if(!e)return null;const t=/(?:^|;)\s*filename\*=\s*(?:UTF-8'')?([^;]+)/i.exec(e);if(t){const r=t[1].trim().replace(/^"|"$/g,"");try{return decodeURIComponent(r)}catch{return r}}const n=/(?:^|;)\s*filename=\s*(?:"([^"]*)"|([^;]+))/i.exec(e);return n?(n[1]??n[2]).trim():null}function GN(e,t){t?.algorithm&&t.algorithm!=="default"&&e.set("algorithm",t.algorithm),t?.whitespace&&t.whitespace!=="default"&&e.set("whitespace",t.whitespace),t?.context==="all"?e.set("context","all"):typeof t?.context=="number"&&e.set("context",String(t.context))}async function WN(e,t,n,r,o=e?"view_diff":"view_all_changes",s,i,a,c){const d=ht()?.targetPeerId;for(let u=0;;u++){r?.throwIfAborted();const f=He();try{return await VN(e,t,n,r,o,s,i,a,c)}catch(h){const p=h instanceof Error?h.message:String(h),g=f?.closed||/^(Secure connection closed|Secure response ended unexpectedly)$/.test(p);if(u>=1||r?.aborted||!g||!d||ht()?.targetPeerId!==d)throw h;Tn("connection_retry",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,message:p})}}}async function VN(e,t,n,r,o=e?"view_diff":"view_all_changes",s,i,a,c){const d=new URLSearchParams;e&&d.set("path",e),n&&d.set("cwd",n),d.set("action",o),GN(d,c),s&&d.set("traceId",s),i&&d.set("interactionId",i);const u=!!e&&o==="view_diff",f=typeof performance<"u"?performance.now():Date.now();Tn("request_start",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,cached:!!t,algorithm:c?.algorithm??"default",whitespace:c?.whitespace??"default",context:c?.context===void 0?"default":String(c.context),timeoutMs:u?Oo:Fn});const h=await at(`/api/terminal/fs/diff?${d}`,{signal:r},u?Oo:Fn,u?"Git diff is still running for this file. It may be blocked by repository IO or another Git process.":"Git diff took too long. The repository may be busy, on slow storage, or locked by another Git process.").catch(m=>{throw Tn("timeout_or_abort",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),message:m instanceof Error?m.message:String(m),signalAborted:!!r?.aborted,signalReason:r?.aborted?String(r.reason??""):void 0}),m});if(Tn("response_headers",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,status:h.status,ok:h.ok,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f)}),!h.ok){const m=await h.json().catch(()=>({error:"Failed to get diff"}));throw Tn("error",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,status:h.status,message:m.error||"Failed to get diff"}),new Error(m.error||"Failed to get diff")}Tn("response_body_start",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),contentLength:h.headers.get("Content-Length")});let p;try{p=await Ox(h,u?Oo:Fn,u?"Git diff response body is still loading for this file.":"Git diff response body took too long.")}catch(m){throw Tn("response_body_timeout",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),message:m instanceof Error?m.message:String(m),signalAborted:!!r?.aborted,signalReason:r?.aborted?String(r.reason??""):void 0}),m}let g;try{g=JSON.parse(p)}catch(m){throw Tn("response_body_parse_error",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),bytes:p.length,snippet:p.slice(0,160),message:m instanceof Error?m.message:String(m)}),m}return Tn("response_body",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),bytes:g.diff?.length??0,error:g.error??null,truncated:!!g.truncated,tooLarge:!!g.tooLarge}),g}async function YN(e,t,n="load_git_details",r){const o=new URLSearchParams;e&&o.set("cwd",e),o.set("action",n),r&&o.set("requestSlotId",r);const s=o.toString(),i=await at(`/api/terminal/fs/git-context${s?`?${s}`:""}`,{signal:t},Fn,"Git details took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to get git context"}));throw new Error(a.error||"Failed to get git context")}return i.json()}async function XN(e={},t){const n=new URLSearchParams;e.workspaceRoot&&n.set("workspaceRoot",e.workspaceRoot),e.repoRoot&&n.set("repoRoot",e.repoRoot);const r=n.toString(),o=await at(`/api/terminal/fs/change-audit${r?`?${r}`:""}`,{signal:t},Fn,"Change audit explanations took too long to load.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to get change audit explanations"}));throw new Error(s.error||"Failed to get change audit explanations")}return o.json()}async function JN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("base",e.base),e.head&&n.set("head",e.head),e.includeUncommitted===!1&&n.set("includeUncommitted","0"),e.filePath&&n.set("filePath",e.filePath),e.comparisonBase&&n.set("comparisonBase",e.comparisonBase),n.set("action","load_branch_diff"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await at(`/api/terminal/fs/branch-diff?${n}`,{signal:t},e.filePath&&e.comparisonBase?Oo:oP,"Branch diff took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get branch diff"}));throw new Error(o.error||"Failed to get branch diff")}return r.json()}async function ZN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("commit",e.commit),n.set("action","load_commit_diff"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await at(`/api/terminal/fs/commit-diff?${n}`,{signal:t},Oo,"Commit diff took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get commit diff"}));throw new Error(o.error||"Failed to get commit diff")}return r.json()}async function QN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("limit",String(e.limit)),typeof e.skip=="number"&&n.set("skip",String(e.skip)),e.query&&n.set("query",e.query),n.set("action","load_recent_commits"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await at(`/api/terminal/fs/git-recent-commits?${n}`,{signal:t},rP,"Recent commits took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get recent commits"}));throw new Error(o.error||"Failed to get recent commits")}return r.json()}async function e_(e={},t){const n=new URLSearchParams;e.workspaceRoot&&n.set("workspaceRoot",e.workspaceRoot),e.repoRoot&&n.set("repoRoot",e.repoRoot),e.baseRef&&n.set("baseRef",e.baseRef),e.branchName&&n.set("branchName",e.branchName);const r=n.toString(),o=await at(`/api/terminal/fs/branch-audit${r?`?${r}`:""}`,{signal:t},Fn,"Branch explanations took too long to load.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to get branch explanations"}));throw new Error(s.error||"Failed to get branch explanations")}return o.json()}async function t_(e={}){const t=await ve(),n=await at("/api/terminal/fs/change-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},Fn,"Change audit explanations took too long to clear.");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to clear change audit explanations"}));throw new Error(r.error||"Failed to clear change audit explanations")}return n.json()}async function n_(e={}){const t=await ve(),n=await at("/api/terminal/fs/branch-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},Fn,"Branch explanations took too long to clear.");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to clear branch explanations"}));throw new Error(r.error||"Failed to clear branch explanations")}return n.json()}async function r_(e,t,n){const r=new URLSearchParams;e&&r.set("cwd",e),r.set("action","load_untracked_files"),n&&r.set("requestSlotId",n);const o=r.toString();return(await at(`/api/terminal/fs/untracked-files${o?`?${o}`:""}`,{signal:t},Oo,"Untracked file scan took too long. The repository may be busy, on slow storage, or locked by another Git process.")).json()}async function o_(e,t,n={}){const r=new URLSearchParams;e&&r.set("cwd",e),n.includeNested&&r.set("includeNested","true"),n.refresh&&r.set("refresh","true"),n.cacheOnly&&r.set("cacheOnly","true"),n.discoverOnly&&r.set("discoverOnly","true"),r.set("action",n.action??(n.refresh?"manual_git_refresh":"open_sidebar_git_refresh")),n.requestSlotId&&r.set("requestSlotId",n.requestSlotId);const o=r.toString(),s=`/api/terminal/fs/git-bundle${o?`?${o}`:""}`,i=n.requestTimeoutMs===null?await fetch(s,{signal:t}):await at(s,{signal:t},n.requestTimeoutMs??Fn,"Git status refresh took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to get git bundle"}));throw new Error(a.error||"Failed to get git bundle")}return i.json()}async function s_(e){const t=await ve(),n=await fetch("/api/terminal/fs/git-action",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Git action failed"})),o=r.confirmationPhrase?`${r.error||"Git action failed"} (${r.confirmationPhrase})`:r.error||"Git action failed";throw new Error(o)}return n.json()}async function i_(e){const t=new URLSearchParams;e.cwd&&t.set("cwd",e.cwd),e.action&&t.set("action",e.action),e.jobId&&t.set("jobId",e.jobId);const n=await fetch(`/api/terminal/fs/git-action/status?${t}`);if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to get Git action status"}));throw new Error(r.error||"Failed to get Git action status")}return n.json()}async function a_(e){const t=await ve(),n=await fetch("/api/terminal/fs/apply-hunk",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to apply diff hunk"}));throw new Error(r.error||"Failed to apply diff hunk")}return n.json()}async function Ke(e,t){const n=t?.method?.toUpperCase()??"GET",r=new Headers(t?.headers);n!=="GET"&&n!=="HEAD"&&r.set("X-XSRF-TOKEN",await ve()),t?.body&&r.set("Content-Type","application/json");const o=async()=>{const s=await fetch(`/api/terminal/operations${e}`,{...t,headers:r});if(!s.ok){const i=await s.json().catch(()=>({error:"操作失败"}));throw new $e(i.error||"操作失败",s.status)}return s.status===204?void 0:await s.json()};return n==="GET"||n==="HEAD"?P2(o,t?.signal):o()}function c_(e,t){return Ke(`/collaboration-tasks${e?`?group=${encodeURIComponent(e)}`:""}`,t?{signal:t}:void 0)}function l_(e){return Ke(`/collaboration-tasks/${encodeURIComponent(e)}`)}function d_(e){return Ke("/collaboration-tasks",{method:"POST",body:JSON.stringify({input:e})})}function u_(e,t){return Ke(`/collaboration-tasks/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({input:t})})}function f_(){return Ke("/automations")}function h_(e){return Ke("/automations",{method:"POST",body:JSON.stringify(e)})}function p_(e){return Ke(`/automations/${encodeURIComponent(e)}/run`,{method:"POST"})}function m_(e,t){return Ke(`/automations/${encodeURIComponent(e)}/enabled`,{method:"POST",body:JSON.stringify({enabled:t})})}function g_(e){return Ke(`/automations/${encodeURIComponent(e)}`,{method:"DELETE"})}let dr=null,Pm="";const vu=new Set;typeof window<"u"&&vi(()=>dr?.refreshPeers(!0));function Qf(){return Ke("/collaboration-groups",{signal:AbortSignal.timeout(1e4)})}function pn(){const e=ht(),t=e?.serviceOrigin??window.location?.origin??"",n=`${e?.targetPeerId??""}:${t}`;return(!dr||n!==Pm)&&(dr?.dispose(),Pm=n,dr=new AE({origin:t,readLocal:Qf,readPeers:async()=>{const r=await Ke("/collaboration-directory",{signal:AbortSignal.timeout(1e4)});let o;const s=await Promise.race([gt().catch(()=>[]),new Promise(d=>{o=setTimeout(()=>d([]),1e3)})]).finally(()=>clearTimeout(o)),i=d=>{const u=s.find(h=>d.serviceId&&h.targetPeerId===d.serviceId)??s.find(h=>!d.serviceId&&(h.serviceOrigin||h.url)===d.origin),f=EE({serviceLabel:u?.label||d.label,serviceOrigin:d.origin});return{...d,label:f,...u?{accessUrl:u.url}:{}}},a=r.services?.map(i),c=new Map(a?.map(d=>[d.origin,d.label]));return{...r,origin:t,services:a,removedServices:r.removedServices?.map(i),sessions:r.sessions.map(d=>({...d,serviceLabel:c.get(d.serviceOrigin??"")??d.serviceLabel}))}},peerProtocol:"v2"}),dr.subscribe(r=>{for(const o of vu)o(r)})),dr}function Ni(){dr?.dispose(),dr=null}function y_(e){return vu.add(e),()=>{vu.delete(e)}}function w_(){window.dispatchEvent(new Event("termdock:collaboration-enroll")),pn().refreshPeers(!0)}async function b_(e){await Ke(`/collaboration-connections/${encodeURIComponent(e)}`,{method:"DELETE"}),Ni(),await eh()}async function v_(e){await Ke(`/collaboration-connections/${encodeURIComponent(e)}/restore`,{method:"POST"}),Ni(),await eh()}function x_(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/rules`,{method:"POST",body:JSON.stringify(t)})}function eh(){return pn().load()}async function S_(e,t){const n=await Ke(`/collaboration-groups/${encodeURIComponent(e.id)}/${t?"archive":"unarchive"}`,{method:"POST",body:JSON.stringify({expectedUpdatedAt:e.updatedAt,idempotencyKey:crypto.randomUUID()})});return pn().invalidate(),n.group}async function E_(e){const t=await Qf(),n=e.id?t.groups.find(c=>c.id===e.id):void 0;if(e.id&&!n)throw new $e("协作组已删除,请刷新列表",404);if(n&&e.expectedUpdatedAt!==void 0&&e.expectedUpdatedAt!==n.updatedAt)throw new $e("协作组已被修改,请重新打开成员管理后再保存",409);const r=[...new Set(e.sessionIds)];if(!e.name.trim())throw new $e("请填写协作组名称",400);const o=new Set([...t.sessions.map(c=>c.sessionId),...n?.sessionIds??[]]);if(r.filter(c=>!o.has(c)).some(c=>!_s(c)))throw new $e("所选会话已变化,请刷新后重新选择;尚未保存任何修改",409);const i={...e,sessionIds:r,...n?{expectedUpdatedAt:e.expectedUpdatedAt??n.updatedAt}:{}},a=await Ke("/collaboration-groups",{method:"POST",body:JSON.stringify(i)});return pn().invalidate(),a}async function k_(e){if((await Qf()).capabilities?.groupMove!==1)throw new $e("当前服务需要升级后才能在协作组之间移动成员;原成员关系未修改",409);await Ke("/collaboration-groups/move-member",{method:"POST",body:JSON.stringify(e)}),pn().invalidate()}function I_(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/spawn`,{method:"POST",body:JSON.stringify(t)}).then(n=>(pn().invalidate(),n))}function C_(e,t,n){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/role`,{method:"POST",body:JSON.stringify({sessionId:t,role:n})}).then(r=>(pn().invalidate(),r))}function T_(e,t){const n=t===void 0?"":`?expectedUpdatedAt=${encodeURIComponent(t)}`;return Ke(`/collaboration-groups/${encodeURIComponent(e)}${n}`,{method:"DELETE"}).then(()=>{pn().invalidate()})}function A_(e){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/messages`)}function R_(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/messages`,{method:"POST",body:JSON.stringify(t)})}function P_(e,t=50,n){return Ke(`/session-search?q=${encodeURIComponent(e)}&limit=${t}`,{signal:n})}function N_(e,t){return Ke("/session-search/prepare",{method:"POST",body:JSON.stringify({nativeKey:e,terminalSessionId:t})})}let Rn=null;function __(){const e=ht()?.targetPeerId??location.origin;if(Rn?.scope===e&&(Rn.pending||Date.now()-Rn.at<5e3))return Rn.result;const t={scope:e,at:Date.now(),pending:!0,result:Ke("/execution-archives")};return Rn=t,t.result.then(()=>{t.pending=!1,t.at=Date.now()},()=>{Rn===t&&(Rn=null)}),t.result}async function L_(e){const t=await Ke(`/execution-archives/${encodeURIComponent(e)}/archive`,{method:"POST"});return Rn=null,pn().invalidate(),t}async function j_(e,t){const n=await Ke(`/execution-archives/${encodeURIComponent(e)}/restore`,{method:"POST",body:JSON.stringify({mode:t})});return Rn=null,pn().invalidate(),n}async function D_(e,t){const n=await Ke(`/collaboration-groups/${encodeURIComponent(e)}/team`,{method:"POST",body:JSON.stringify(t)});return pn().invalidate(),n}const O_=Object.freeze(Object.defineProperty({__proto__:null,AUTH_UNAUTHORIZED_EVENT:qf,AgentPluginManifestError:Vf,EDA_PREVIEW_REQUEST_TIMEOUT_MS:_x,HTML_EXTENSIONS:Qx,MAX_UPLOAD_FILES:bu,MODEL_3D_EXTS:Jx,MODEL_PREVIEW_REQUEST_TIMEOUT_MS:Nx,TERMINAL_CSRF_REQUEST_TIMEOUT_MS:Lx,TERMINAL_HEALTH_REQUEST_TIMEOUT_MS:jx,TERMINAL_SESSION_OPEN_REQUEST_TIMEOUT_MS:Dx,TerminalApiError:$e,TerminalInputError:Wr,UploadFilesError:wu,VISIBLE_WAKEUP_PROBE_TIMEOUT_MS:Bx,acknowledgeTerminalOutput:DP,applyDiffHunk:a_,archiveExecutionSession:L_,buildHtmlPreviewUrl:DN,buildVideoPreviewUrl:NN,cancelIoSlot:Jf,checkAgentPluginUpdate:mN,checkTermdockUpdate:Y2,checkTerminalHealth:HP,clearBranchAuditRecords:n_,clearChangeAuditRecords:t_,clearSessionInventoryEntries:tN,closeTerminal:FP,confirmTermdockUpdateRestart:X2,connectTerminalStream:TP,createAgentPlugin:hN,createCollaborationTask:d_,createTerminalSession:CP,deleteAgentPlugin:wN,deleteFile:o0,dismissServerHealthIncident:Q2,dismissTmuxRecovery:VP,doctorAgentPlugin:yN,downloadFile:n0,enableServerSupervision:J2,ensureCollaborationTeam:D_,fetchQuota:eP,forceKillTerminal:$P,getAgentHooks:lN,getAgentLaunchers:cN,getAgentPlugins:fN,getAppliedTerminalCursor:IP,getBranchAuditRecords:e_,getBranchDiff:JN,getChangeAuditRecords:XN,getCollaborationTask:l_,getCommitDiff:ZN,getContextDraft:sN,getCsrfToken:ve,getDefaultEdaPreviewView:LN,getEdaExtForPath:Xf,getFileDiff:WN,getGitActionStatus:i_,getGitBlobContent:FN,getGitBundle:o_,getGitContext:YN,getImageMimeTypeForPath:Jc,getLocalFileBrowserAvailability:qN,getModel3dExtForPath:Yf,getProgramDetection:IN,getRecentCommits:QN,getServerHealth:Z2,getSessionInventory:XP,getSettings:lr,getTermdockUpdateState:Px,getTerminalConnectionQuality:lP,getTitleNamerCatalog:oN,getTmuxStatus:qP,getToolbarPresetsDoc:nN,getUntrackedFiles:r_,getVideoMimeTypeForPath:Yx,inspectEdaPoint:$N,installAgentHooks:dN,installAgentPluginSource:pN,isHeicImagePath:Vx,isPreviewableEdaPath:_N,isPreviewableHtmlPath:jN,isPreviewableImagePath:RN,isPreviewableModel3dPath:Zx,isPreviewableVideoPath:Xx,killTmuxSession:KP,launchRecoverableTerminalAgent:RP,listAgentAutomations:f_,listAgentResumeHistory:vN,listCollaborationGroups:eh,listCollaborationMessages:A_,listCollaborationTasks:c_,listDirectory:e0,listExecutionArchives:__,listTmuxSessions:zP,loginWithPassword:Wx,logout:aN,moveCollaborationMember:k_,openInFileBrowser:KN,openSessionInventoryEntry:JP,operationsRequest:Ke,parseFilenameFromContentDisposition:i0,prepareAgentResumeHistory:xN,prepareSearchSession:N_,probeTerminalConnection:NP,readEdaPreviewBlob:HN,readFileContent:BN,readImagePreviewBlob:UN,readModel3dBlob:zN,readPreviewSourcePath:Zf,reconnectTerminalConnectionNow:_P,refreshQuota:tP,removeAgentAutomation:g_,removeAgentResumeHistory:SN,removeCollaborationConnection:b_,removeCollaborationGroup:T_,removeSessionInventoryEntry:eN,reorderSessionInventoryEntries:QP,replaceProgramDetection:CN,replaceProgramRules:EN,replaceToolbarPresetsDoc:rN,resetCollaborationDirectory:Ni,resetCsrfTokenCache:Gf,resetProgramDetection:TN,resetProgramRules:kN,resizeTerminal:BP,restartTerminalSession:UP,restoreAllTmuxAgentSessions:GP,restoreCollaborationConnection:v_,restoreExecutionSession:j_,resumeAgentSession:bN,retryCollaborationPeers:w_,runAgentAutomation:p_,runGitAction:s_,saveAgentAutomation:h_,saveCollaborationGroup:E_,saveDownloadBlob:r0,searchFilesStream:t0,searchTerminalSessions:P_,sendAgentReviewAck:qx,sendCollaborationMessage:R_,sendTerminalFlowControlState:MP,sendTerminalFocusState:jP,sendTerminalInput:PP,sendTerminalViewingState:OP,sendTmuxAction:Kx,setAgentAutomationEnabled:m_,setCollaborationGroupArchived:S_,setCollaborationGroupRules:x_,setCollaborationMemberRole:C_,setTerminalOutputSubscription:zx,setTerminalSnapshotCursor:kP,setTmuxRecoveryOperationPaused:WP,spawnCollaborationAgent:I_,subscribeCollaborationGroups:y_,suspendTerminalConnectionReconnects:LP,trySendInputExitingCopyMode:AP,uninstallAgentHooks:uN,updateAgentPlugin:gN,updateCollaborationTask:u_,updateContextDraft:iN,updateSessionInventoryEntry:ZP,updateSettings:Yt,uploadFiles:Pi,uploadSessionAttachments:s0,watchFileSystem:MN},Symbol.toStringTag,{value:"Module"})),xu="termdock:locale",Aa={en:gE,zh:yE};function M_(e){return typeof e=="string"&&wE.includes(e)}function B_(){if(typeof window>"u")return Ho;try{const t=window.localStorage.getItem(xu);if(M_(t))return t}catch{}return(window.navigator?.language?.toLowerCase()??"").startsWith("zh")?"zh":Ho}const a0=w.createContext(null);function Su(e,t){const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object"&&o in r)r=r[o];else return;return r}function Eu(e,t){return typeof e=="function"?e(t??{}):typeof e!="string"?String(e):t?e.replace(/\{(\w+)\}/g,(n,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):n):e}function F_({children:e}){const[t,n]=w.useState(()=>B_()),r=Ut.useRef(!1);w.useEffect(()=>{typeof window>"u"||lr().then(c=>{if(c?.locale==="zh"||c?.locale==="en"){if(c.locale===t||c.locale==="en"&&t!=="en")return;n(c.locale);try{window.localStorage.setItem(xu,c.locale)}catch{}}}).catch(()=>{})},[]),w.useEffect(()=>{if(!(typeof window>"u")){try{window.localStorage.setItem(xu,t)}catch{}r.current&&(r.current=!1,Yt({locale:t}).catch(()=>{})),document.documentElement.lang=t==="zh"?"zh-CN":"en"}},[t]);const o=w.useCallback(c=>{r.current=!0,n(c)},[]),s=Aa[t]??Aa[Ho],i=w.useCallback((c,d)=>{const u=Su(s,c);if(u===void 0){const f=Su(Aa[Ho],c);return f===void 0?c:Eu(f,d)}return Eu(u,d)},[s]),a=w.useMemo(()=>({locale:t,setLocale:o,t:i}),[t,o,i]);return l.jsx(a0.Provider,{value:a,children:e})}function jt(){const e=w.useContext(a0);return e||{locale:Ho,setLocale:()=>{},t:(t,n)=>{const r=Su(Aa[Ho],t);return r===void 0?t:Eu(r,n)}}}const U_=()=>document.getElementById("termdock-startup")?.hidden===!1;function H_(e){const t=document.getElementById("termdock-startup");if(!t)return()=>{};const n=new MutationObserver(e);return n.observe(t,{attributes:!0,attributeFilter:["hidden"]}),()=>n.disconnect()}function $_(){return w.useSyncExternalStore(H_,U_)}const Ra=new Map;let Vl=0,Ss;function Pa(){const e=++Vl;requestAnimationFrame(()=>{if(e!==Vl)return;const t=document.getElementById("termdock-startup");if(!t)return;const n=[...Ra].find(([r])=>r.isConnected&&!r.closest('[aria-hidden="true"], [hidden]')&&getComputedStyle(r).visibility!=="hidden");if(n){t.hidden=!1;const r=t.querySelector("[data-startup-status]"),o=n[1];r&&r.textContent!==o.status&&(r.textContent=o.status);const s=t.querySelector("[data-startup-detail]");s&&(s.hidden=!o.detail,s.textContent=o.detail??"");const i=t.querySelector("[data-startup-action]");i&&(i.hidden=!o.actionLabel||!o.onAction,i.textContent=o.actionLabel??"",i.onclick=o.onAction??null);return}requestAnimationFrame(()=>{if(e!==Vl)return;t.hidden=!0;const r=t.querySelector("[data-startup-action]");r&&(r.onclick=null)})})}function z_(){return w.useLayoutEffect(()=>{Pa()},[]),null}function th({status:e="Loading Termdock",detail:t,actionLabel:n,onAction:r}){const o=Kw(),{locale:s}=jt();o!=="ready"&&(e=s==="zh"?o==="offline"?"网络已断开,等待恢复…":"正在恢复连接…":o==="offline"?"Offline. Waiting for network…":"Reconnecting…");const i=w.useRef(null);return w.useLayoutEffect(()=>{const a=i.current;if(Ra.set(a,{status:e,detail:t,actionLabel:n,onAction:r}),!Ss){Ss=new MutationObserver(Pa);const c=document.getElementById("root");c&&Ss.observe(c,{attributes:!0,subtree:!0,attributeFilter:["style","aria-hidden","hidden"]})}return Pa(),()=>{Ra.delete(a),Ra.size||(Ss?.disconnect(),Ss=void 0),Pa()}},[e,t,n,r]),l.jsx("span",{ref:i,"data-startup-pending":"",style:{position:"absolute",width:0,height:0,pointerEvents:"none"}})}const mc=pr(()=>({items:[]}));function q_(e){const t=w.useId(),n=e?.message,r=e?.tone??"error",o=e?.actionLabel,s=e?.onAction,i=e?.duration??(r==="recovering"?0:r==="success"?4e3:8e3);w.useEffect(()=>{if(!n)return;let a;const c=()=>mc.setState(f=>({items:f.items.filter(h=>h.id!==t)})),d=()=>{mc.setState(f=>({items:[...f.items.filter(h=>h.id!==t),{id:t,message:n,tone:r,actionLabel:o,onAction:s}]})),i&&(a=setTimeout(c,i))},u=r==="recovering"?setTimeout(d,2500):void 0;return r!=="recovering"&&d(),()=>{clearTimeout(u),clearTimeout(a),c()}},[t,n,r,o,s,i])}function K_(){const{locale:e,t}=jt(),n=Kw(),r=$_(),o=e==="zh"?n==="offline"?"网络已断开,恢复后会自动连接":"正在恢复连接…":n==="offline"?"Offline. Reconnecting when the network returns.":"Reconnecting…";q_(n==="ready"?null:{tone:"recovering",message:o});const i=mc(u=>u.items).filter(u=>!u.dismissed),a=n!=="ready"?i.find(u=>u.tone==="recovering"):i.find(u=>u.tone==="error")??i.at(-1);if(!a)return null;const c=a.tone==="recovering";if(c&&r)return null;const d=c?uw:a.tone==="success"?Uy:By;return Vn.createPortal(l.jsx("div",{"data-app-feedback":!0,className:"pointer-events-none fixed inset-x-3 top-[calc(var(--safe-top-inset)+3rem)] z-toast mx-auto w-auto max-w-md",children:l.jsxs("div",{role:c||a.tone==="success"?"status":"alert","aria-live":c?"polite":void 0,"aria-atomic":"true",className:"pointer-events-auto flex items-center gap-2 rounded-xl border border-border bg-surface-elevated px-3 py-1.5 text-xs leading-5 text-foreground shadow-lg",children:[l.jsx(d,{size:15,"aria-hidden":"true",className:`shrink-0 ${c?"animate-spin text-muted-foreground motion-reduce:animate-none":a.tone==="success"?"text-primary":"text-[color:var(--warning)]"}`}),l.jsx("span",{className:"min-w-0 flex-1 break-words",children:n!=="ready"?o:c&&i.filter(u=>u.tone==="recovering").length>1?e==="zh"?"正在恢复服务同步…":"Restoring service updates…":a.message}),a.onAction&&l.jsx("button",{type:"button",className:"min-h-11 shrink-0 rounded-lg px-2 text-primary hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:a.onAction,children:a.actionLabel??t("common.retry")}),l.jsx("button",{type:"button","aria-label":t("common.close"),className:"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>mc.setState(u=>({items:u.items.map(f=>f.id===a.id||c&&f.tone==="recovering"||f.message===a.message?{...f,dismissed:!0}:f)})),children:l.jsx(wi,{size:14})})]})}),document.body)}function G_(){let e=!1,t=!1,n=!1,r;const o=new Map,s=new Set,i=new Map,a=new Map,c=async(p,g,m)=>{const b=JSON.stringify(m);if(o.get(g.serviceId)===b)return;const y=AbortSignal.timeout(1e4),k=await p.fetch("/api/csrf-token",{signal:y});if(!k.ok)throw new Error("CONNECTION_AUTHORIZATION_REQUIRED");const x=await k.json();if(typeof x.csrfToken!="string")throw new Error("INVALID_CSRF_TOKEN");const T=await p.fetch("/api/terminal/operations/collaboration-connections",{method:"POST",signal:y,headers:{"Content-Type":"application/json","X-XSRF-TOKEN":x.csrfToken},body:JSON.stringify({origin:g.origin,nodes:m})});if(!T.ok){const _=await T.json().catch(()=>({}));throw new Error(_.error||`HTTP_${T.status}`)}o.set(g.serviceId,b)},d=async()=>{if(e){n=!0;return}const p=oe(),g=He();if(!(t||!p||!g||g.closed)){e=!0,n=!1;try{let m;const b=await Promise.race([gt(),new Promise((v,S)=>{m=setTimeout(()=>S(new Error("SERVICE_DIRECTORY_TIMEOUT")),8e3)})]).finally(()=>clearTimeout(m));b.some(v=>v.targetPeerId===p.targetPeerId)||b.push({...p,id:p.targetPeerId,label:p.serviceName||p.url});const y=[...new Map(b.filter(v=>!!v.targetPeerId).map(v=>[v.targetPeerId,v])).values()].slice(0,64),k=window.termdockDesktop,x=await k?.collaborationDescriptors?.().catch(()=>({}))??{},T=[];for(const v of y)try{const S=`${v.targetPeerId}:${v.serviceOrigin||v.url}`;let I=i.get(S);if(!I){const R=v.targetPeerId===p.targetPeerId?(await g.request({type:"collaboration-descriptor"},{timeoutMs:5e3})).node:x[v.targetPeerId]??await j2({...v,targetPeerId:v.targetPeerId},AbortSignal.timeout(8e3));if(R?.serviceId!==v.targetPeerId)throw new Error("PEER_IDENTITY_MISMATCH");const C=R.origin||v.serviceOrigin||v.url,N=new URL(C);if(N.protocol!=="https:"||N.origin!==C)throw new Error("INVALID_SERVICE_ORIGIN");I={serviceId:R.serviceId,origin:C,...R.caFingerprint256?{caFingerprint256:R.caFingerprint256}:{}},i.set(S,I)}if(v.targetPeerId===p.targetPeerId&&k?.rememberCollaborationDescriptor){const R=JSON.stringify(I);a.get(I.serviceId)!==R&&(await k.rememberCollaborationDescriptor(I),a.set(I.serviceId,R))}T.push({service:v,node:I})}catch{}if(t||He()!==g||oe()?.targetPeerId!==p.targetPeerId)return;const _=T.find(v=>v.node.serviceId===p.targetPeerId);if(!_||T.length<2){u(3e4);return}const A=T.map(v=>v.node).sort((v,S)=>v.serviceId.localeCompare(S.serviceId));await c(g,_.node,A);let E=T.length<y.length;for(const v of T){if(v===_||o.get(v.node.serviceId)===JSON.stringify(A))continue;let S;try{S=await D2({...v.service,targetPeerId:v.node.serviceId},AbortSignal.timeout(8e3)),await c(S,v.node,A)}catch{let I=s.has(v.node.serviceId);if(!I&&S)try{(await S.request({type:"collaboration-scoped-peer",origin:v.node.origin,node:_.node},{timeoutMs:8e3})).type==="result"&&(s.add(v.node.serviceId),I=!0)}catch{}I||(E=!0)}finally{S?.close()}}window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!0}})),E&&u(3e4)}catch(m){window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!1,error:m instanceof Error?m.message:"CONNECTION_ENROLLMENT_FAILED"}})),u(3e4)}finally{e=!1,n&&u(100)}}};function u(p=100){t||(clearTimeout(r),r=setTimeout(()=>{d()},p))}const f=()=>{u()},h=vi(f);window.addEventListener(Et,f),window.addEventListener("termdock:collaboration-enroll",f),window.addEventListener("online",f),window.addEventListener("pageshow",f),window.addEventListener("pagehide",p=>{p.persisted||(t=!0,clearTimeout(r),h(),window.removeEventListener("termdock:collaboration-enroll",f),window.removeEventListener(Et,f),window.removeEventListener("online",f),window.removeEventListener("pageshow",f))}),u()}var ua={},Nm;function W_(){if(Nm)return ua;Nm=1;var e=FS();return ua.createRoot=e.createRoot,ua.hydrateRoot=e.hydrateRoot,ua}var V_=W_();const Y_=fy(V_),ku="#termdock-invite=";function nh(e){const t=new URL(e.entryUrl);t.hash="",t.search="",t.pathname="/";const n=new TextEncoder().encode(JSON.stringify(e));return t.hash=ku.slice(1)+btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),t.href}function _m(e,t){un(e);const n=new URL(e),r=new URL(t);if(n.protocol!=="https:"||r.protocol!=="http:"||r.username||r.password)throw new Error("证书引导地址无效");return r.hostname=n.hostname,r.pathname="/connect",r.search="",r.hash=n.hash,r.href}function un(e,t={}){const n=new URL(e);if(!["https:","http:"].includes(n.protocol)||!n.hash.startsWith(ku))throw new Error("这不是有效的 Termdock 邀请链接");const r=n.hash.slice(ku.length);if(r.length>8192)throw new Error("邀请链接过长");let o;try{const u=r.replace(/-/g,"+").replace(/_/g,"/");o=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(atob(u),f=>f.charCodeAt(0))))}catch{throw new Error("邀请链接不完整,请重新复制")}if(o.v!==1||typeof o.serviceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(o.serviceId)||o.routeOnly!==!0&&(typeof o.code!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(o.code)))throw new Error("邀请信息无效或版本不兼容");if(o.viewLayout!==void 0&&o.viewLayout!=="split")throw new Error("邀请布局无效");if(o.viewMode!==void 0&&!["terminal","chat"].includes(o.viewMode))throw new Error("邀请视图无效");if(o.showAccessGuide!==void 0&&typeof o.showAccessGuide!="boolean")throw new Error("邀请引导选项无效");const s=new URL(o.entryUrl),i=n.protocol==="http:"&&n.pathname==="/connect"&&!n.search&&!n.username&&!n.password&&s.protocol==="https:"&&s.hostname===n.hostname;if(!i&&s.origin!==n.origin||s.username||s.password||!["https:","http:"].includes(s.protocol))throw new Error("邀请地址与服务不一致");if(o.entryServiceId!==void 0&&(typeof o.entryServiceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(o.entryServiceId)))throw new Error("邀请入口身份无效");if(o.routeCode!==void 0&&(typeof o.routeCode!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(o.routeCode)||!o.entryServiceId))throw new Error("邀请入口权限无效");if(o.routeOnly===!0&&(!o.entryServiceId||!o.routeCode||o.code!==void 0))throw new Error("备用连接邀请不完整");let a=s.origin;if(o.serviceUrl!==void 0){const u=new URL(o.serviceUrl);if(!["https:","http:"].includes(u.protocol)||u.username||u.password)throw new Error("目标服务地址无效");a=o.entryServiceId&&o.entryServiceId!==o.serviceId?u.origin:s.origin}const c=t.httpTransport&&i,d=!!o.entryServiceId&&o.entryServiceId!==o.serviceId;return{...o.showAccessGuide===void 0?{}:{showAccessGuide:o.showAccessGuide},viewMode:o.viewMode,viewLayout:o.viewLayout,url:c?n.origin:s.origin,targetPeerId:o.serviceId,pairingCode:o.code,...o.routeOnly===!0?{routeOnly:!0}:{},serviceOrigin:c&&!d?n.origin:a,...c?{nativeOrigin:s.origin,certificateUrl:n.origin+"/certificates"+n.hash}:{},serviceName:typeof o.name=="string"?o.name.slice(0,120):void 0,entryServiceId:o.entryServiceId,routeCode:o.routeCode}}function _i(e){const{targetPeerId:t,routes:n}=e,r=!e.pairingCode&&!e.routeCode&&!e.entryServiceId?n?.find(d=>d.targetPeerId!==t):void 0,o=r?.url||e.nativeOrigin||e.url,s=r?.targetPeerId||e.entryServiceId,i=e.nativeOrigin&&(!e.entryServiceId||e.entryServiceId===t)?e.nativeOrigin:e.serviceOrigin||(r&&e.url!==o?e.url:void 0),a={id:t,url:o,targetPeerId:t,serviceOrigin:i,entryServiceId:s,routes:n,label:e.serviceName||new URL(i||o).host},c=e.pairingCode||e.routeCode?nh({...e.showAccessGuide===void 0?{}:{showAccessGuide:e.showAccessGuide},v:1,serviceId:t,entryUrl:o,serviceUrl:i,name:e.serviceName,entryServiceId:s,code:e.pairingCode,routeCode:e.routeCode,routeOnly:e.routeOnly,viewMode:e.viewMode,viewLayout:e.viewLayout}):void 0;return{connection:a,invitation:c}}function X_(e){if(e.includes("#termdock-invite=")){const n=un(e),{url:r,targetPeerId:o,serviceOrigin:s,entryServiceId:i}=n;return{connection:{id:o,url:r,targetPeerId:o,serviceOrigin:s,entryServiceId:i,label:n.serviceName||new URL(s||r).host},invitation:new URL(e).protocol==="http:"&&r.startsWith("https:")?_i(n).invitation:e}}const t=ze(e);return{connection:{id:t,url:t,label:new URL(t).host}}}async function J_(e,t){const{connection:n,invitation:r}=X_(t);if(e.reviewServiceConnection){await e.reviewServiceConnection(n,r);return}await Iu(e,n,r)}async function Iu(e,t,n){try{const r=await e.openServiceConnection(t,n);if(!r.ok)throw new Error(r.error||"暂时无法打开服务,请检查地址和网络。")}catch(r){if(e.reviewServiceConnection&&["PREVIEW_DISCOVERY_FAILED","PREVIEW_CERTIFICATE_REJECTED"].includes(r?.code||"")){await e.reviewServiceConnection(t,n);return}throw r}}const Tr="termdock-secure-desktop-invitation-handoff-v1";function Z_(e){if(!rh()||!e.pairingCode)return()=>{};try{const t=_i(e).invitation;if(!t||new URL(t).protocol!=="https:")return()=>{};const n=JSON.stringify({at:Date.now(),invitation:t});return sessionStorage.setItem(Tr,n),()=>{try{sessionStorage.getItem(Tr)===n&&sessionStorage.removeItem(Tr)}catch{}}}catch{return()=>{}}}function Q_(e){try{for(const o of Object.keys(sessionStorage))o.startsWith("termdock-service:")&&o.endsWith(":termdock-desktop-invitation-handoff-v1")&&delete sessionStorage[o];const t=sessionStorage.getItem(Tr);if(!t||t.length>12e3)return;const n=JSON.parse(t);if(typeof n.at!="number"||Date.now()-n.at<0||Date.now()-n.at>12e4||typeof n.invitation!="string"){sessionStorage.removeItem(Tr);return}const r=un(n.invitation);return e&&r.targetPeerId!==e?void 0:(sessionStorage.removeItem(Tr),new URL(r.url).protocol==="https:"?r:void 0)}catch{try{sessionStorage.removeItem(Tr)}catch{}return}}function rh(){return typeof window<"u"&&typeof navigator<"u"&&/Mac/.test(navigator.platform)&&(navigator.maxTouchPoints||0)<2&&!window.termdockDesktop}function eL(e){const t=_i(e).invitation;if(!t)throw new Error("请使用尚未失效的邀请链接");return`termdock://invite/${new URL(t).hash}`}function Yl(e,t){if(!e.pairingCode)return!1;const n=Kc(xa(new TextEncoder().encode(`termdock-invitation-v1:${e.targetPeerId}:${e.pairingCode}`)));return t.some(r=>r.invitationId===n)}function Qe({size:e=16,className:t="",...n}){const r=!!(n["aria-label"]||n["aria-labelledby"]);return l.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:"false",...n,className:`td-loading-spinner animate-spin ${t.replace(/\b(?:animate-spin|service-spinning)\b/g,"")}`,children:l.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"18 44.8",strokeLinecap:"round"})})}function tL(){return l.jsx("span",{className:"td-loading-dots","aria-hidden":"true",children:[0,1,2].map(e=>l.jsx("span",{style:{animationDelay:`${(e-3)*400}ms`}},e))})}function Lm({label:e,className:t="",dots:n=!1}){return l.jsxs("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:`flex items-center justify-center gap-2 text-sm text-muted-foreground ${t}`,children:[n?l.jsx(tL,{}):l.jsx(Qe,{size:18}),l.jsx("span",{children:e})]})}function c0(e=navigator.userAgent,t=navigator.maxTouchPoints){const n=/iPad/.test(e)||/Macintosh/.test(e)&&t>1?"iPad":/iPhone/.test(e)?"iPhone":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Macintosh|Mac OS X/.test(e)?"Mac":/Linux/.test(e)?"Linux":"设备",r=/Electron/.test(e)?"Termdock":/Edg\//.test(e)?"Edge":/Firefox|FxiOS/.test(e)?"Firefox":/Chrome|CriOS/.test(e)?"Chrome":/Safari/.test(e)?"Safari":"浏览器";return`${n} · ${r}`}let nL;function rL(){return nL??=(async()=>{const e=navigator.userAgent,[t,n]=c0().split(" · "),r=/(?:Edg|Firefox|FxiOS|Chrome|CriOS|Version)\/([\d.]+)/g,o=[...e.matchAll(r)],s=/(?:CPU (?:iPhone )?OS |Mac OS X |Android )([\d._]+)/.exec(e)?.[1]?.replaceAll("_","."),i={system:`${t}${s?` ${s}`:""}`,client:`${n}${o.length?` ${o.at(-1)[1]}`:""}`,mode:matchMedia("(display-mode: standalone)").matches||navigator.standalone?"已安装的网页应用":"网页"},a=ct();if(a){i.mode="桌面客户端";const d=/Electron\/([\d.]+)/.exec(e)?.[1];i.client=d?`Termdock(Electron ${d})`:"Termdock";try{Object.assign(i,await a.deviceInfo?.())}catch{}return i}const c=navigator.userAgentData;try{const d=await c?.getHighEntropyValues(["model","architecture","bitness","platformVersion"]);typeof d?.model=="string"&&d.model&&(i.model=d.model),typeof d?.architecture=="string"&&d.architecture&&(i.arch=`${d.architecture}${d.bitness?` ${d.bitness} 位`:""}`)}catch{}return i})()}async function jm(e){const t=Promise.resolve(e);t.catch(()=>{});try{return typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"?await navigator.clipboard.write([new ClipboardItem({"text/plain":t.then(n=>new Blob([n],{type:"text/plain"}))})]):await navigator.clipboard.writeText(await t),!0}catch{return!1}}function gc(e){if(!e?.isConnected||e.matches(':disabled, [aria-disabled="true"]'))return!1;let t=e;for(;t;){if(t.matches('[hidden], [inert], [aria-hidden="true"]'))return!1;const n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden"||n?.visibility==="collapse")return!1;if(t.parentElement)t=t.parentElement;else try{t=t.ownerDocument.defaultView?.frameElement??null}catch{return!1}}return!0}function MB(e=document){const t=e.activeElement;return!e.hidden&&e.hasFocus()&&(!t||t===e.body||t===e.documentElement)}function oL(e,t){if(!gc(e))return!1;const n=e.ownerDocument;if(n.hidden||!n.hasFocus())return!1;const r=n.activeElement;return!r||r===n.body||r===n.documentElement||r===e||!!t?.contains(r)}function sL(e,t){oL(e,t)&&e.ownerDocument.activeElement!==e&&e.focus({preventScroll:!0})}const wr=[],Ms=new Set,br=()=>Ms.forEach(e=>e()),Dm=new WeakMap;let Ar;function Cu(){if(!Ar)return;Ar.disconnect(),Ar.observe(document.body,{childList:!0});const e=new Set;for(const t of wr)for(let n=t.element;n&&!e.has(n);n=n.parentElement)e.add(n),Ar.observe(n,{childList:n===document.body,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","style","class"]})}function iL(e){return Ms.add(e),Ms.size===1&&(Ar=new MutationObserver(br),Cu(),window.addEventListener(qr,br),document.addEventListener("visibilitychange",br)),()=>{Ms.delete(e),Ms.size||(Ar?.disconnect(),Ar=void 0,window.removeEventListener(qr,br),document.removeEventListener("visibilitychange",br))}}function l0(e){if(typeof document>"u"||document.hidden||!jr())return null;const t=document.querySelector('[data-desktop-confirmation="true"]');if(gc(t)){let n=Dm.get(t);return n||(n={element:t},Dm.set(t,n)),n}return[...wr].reverse().find(n=>n===e||gc(n.element))??null}const en=()=>l0(),aL=()=>en()!==null;function oh(e){if(!jr()||!gc(e))return!1;const t=en(),n=t?yc(t.element):[document.body];return e.isConnected&&!e.closest('[hidden], [inert], [aria-hidden="true"]')&&(!t||n.some(r=>r.contains(e)))&&d0(e,n)}function BB(){return w.useSyncExternalStore(iL,aL,()=>!1)}function yc(e){const t=Array.from(document.querySelectorAll("[data-sidebar-composer-popover]")).filter(n=>e.id&&n.dataset.sidebarComposerPopover===e.id);return[e,...t]}function d0(e,t){for(let n=e;n;n=n.parentElement){const r=getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;if(t.includes(n))break}return!0}function Om(e){const t=yc(e);return t.flatMap(n=>Array.from(n.querySelectorAll("button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], summary, iframe, [tabindex]"))).filter(n=>{const r=n.closest("details:not([open])"),o=r?.querySelector("summary");return n.tabIndex>=0&&!n.matches(":disabled")&&!n.closest('[hidden], [inert], [aria-hidden="true"]')&&(!r||!!o?.contains(n))&&d0(n,t)})}function Li(e,t,n,r){const o=w.useRef(n);o.current=n;const s=w.useRef(r);s.current=r,w.useLayoutEffect(()=>{const i=e.current;if(!t||!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,c={element:i},d=wr.findIndex(b=>i.contains(b.element));d<0?wr.push(c):wr.splice(d,0,c),Cu(),br();const u=()=>en()===c,f=b=>b instanceof Node&&yc(i).some(y=>y.contains(b)),h=()=>(Om(i)[0]??i).focus({preventScroll:!0});u()&&!f(document.activeElement)&&h();const p=b=>{document.hasFocus()&&u()&&!f(b.target)&&h()},g=b=>{if(!u()||b.key!=="Tab"||b.defaultPrevented)return;const y=Om(i),k=y[0],x=y[y.length-1];(!k||!f(document.activeElement)||(b.shiftKey?document.activeElement===k:document.activeElement===x))&&(b.preventDefault(),(b.shiftKey?x:k)?.focus({preventScroll:!0}))},m=b=>{!u()||b.key!=="Escape"||b.defaultPrevented||b.isComposing||(b.preventDefault(),b.stopImmediatePropagation(),o.current())};return document.addEventListener("focusin",p,!0),document.addEventListener("keydown",g,!0),document.addEventListener("keydown",m),()=>{const b=l0(i.isConnected?void 0:c)===c;if(wr.splice(wr.indexOf(c),1),Cu(),br(),document.removeEventListener("focusin",p,!0),document.removeEventListener("keydown",g,!0),document.removeEventListener("keydown",m),b){const y=en();queueMicrotask(()=>{if(en()!==y||!jr())return;const k=a?.isConnected&&a!==document.body?a:s.current?.();k&&y&&!yc(y.element).some(x=>x.contains(k))||sL(k,i)})}}},[t,e])}function cL(e){return!e||e.length>128||!/^(?:[0-9a-zA-Z_.:\-]+|\[[0-9a-fA-F:.]+\]:\d{1,5})$/.test(e)?!1:e.startsWith("[")||/^[^:]+:\d+$/.test(e)?lL(e)!==null:!0}function lL(e){let t=e.trim();const n=/^[a-z]+:\/\/([^/]+)/i.exec(t);n&&(t=n[1]),t=t.replace(/^\/+|\/+$/g,"");const r=/^\[([^\]]+)\](?::(\d{1,5}))?$/.exec(t);if(r){try{new URL(`http://[${r[1]}]`)}catch{return null}const i=r[2]??"5555";return Number(i)>=1&&Number(i)<=65535?`[${r[1]}]:${i}`:null}if(!/^[0-9a-zA-Z_.\-]+(?::\d{1,5})?$/.test(t))return null;const[o,s="5555"]=t.split(":");return/^\d+\.\d+\.\d+\.\d+$/.test(o)&&o.split(".").some(i=>Number(i)>255)?null:Number(s)>=1&&Number(s)<=65535?`${o}:${s}`:null}function dL(e){return e.physicalId?`physical:${e.physicalId}`:`serial:${e.serial}`}function u0(e,t=""){const n=new Map,r=o=>(o.state==="device"?0:10)+(o.serial===t?0:o.isNetwork?o.serial.startsWith("[")?3:2:1);for(const o of e){const s=dL(o),i=n.get(s);i?(i.routes.push(o),r(o)<r(i.device)&&(i.device=o)):n.set(s,{key:s,device:o,routes:[o]})}return[...n.values()]}function FB(e,t,n){const r=u0(e,t),o=e.find(a=>a.serial===t),s=n||o?.physicalId;if(s)return r.find(a=>a.device.physicalId===s)?.device;if(t)return o;const i=r.filter(a=>a.device.state==="device");return i.length===1?i[0].device:void 0}function UB(e,t){const n=e?.filter(r=>r.serial===t)||[];return n.some(r=>r.access==="control")?"control":n.length?"view":void 0}async function Qr(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",Accept:"application/json",...t?.headers??{}}}),r=await n.json().catch(()=>null);if(!n.ok||!r){const o=r?.error||r?.code||`ANDROID_REQUEST_FAILED_${n.status}`;throw new Error(o)}return r}async function f0(){return Qr("/api/android/devices")}async function HB(e){return Qr("/api/android/connect",{method:"POST",body:JSON.stringify({address:e})})}const h0=[{id:"low",maxSize:720,bitRate:12e5,maxFps:30},{id:"medium",maxSize:1080,bitRate:4e6,maxFps:30},{id:"high",maxSize:1600,bitRate:8e6,maxFps:60}],Mm=h0[1];function $B(e){if(!e||typeof e!="object")return Mm;const t=e;if(t.id==="auto")return{id:"auto",maxSize:1600,bitRate:4e6,maxFps:30};const n=h0.find(i=>i.id===t.id);if(n)return n;if(t.id!=="custom")return Mm;const r=typeof t.maxSize=="number"?Math.max(360,Math.min(2160,Math.round(t.maxSize))):1080,o=typeof t.bitRate=="number"?Math.max(3e5,Math.min(3e7,Math.round(t.bitRate))):4e6,s=typeof t.maxFps=="number"?Math.max(0,Math.min(60,Math.round(t.maxFps))):30;return{id:"custom",maxSize:r,bitRate:o,maxFps:s}}function zB(e,t){if(!cL(e))throw new Error("INVALID_SERIAL");const n=new URLSearchParams;t&&(n.set("max_size",String(t.maxSize)),n.set("bit_rate",String(t.bitRate)),t.maxFps>0&&n.set("max_fps",String(t.maxFps)));const r=n.toString();return`/api/android/${e}/ws${r?`?${r}`:""}`}function qB(e){const t={ADB_UNAVAILABLE:"本机没有可用的 adb,请先安装 Android platform-tools。",ADB_NOT_FOUND:"找不到 adb 可执行文件,可用 TERMDOCK_ADB_BIN 指定路径。",SCRCPY_NOT_FOUND:"本机没有 scrcpy,请先安装(含 scrcpy-server)。",SCRCPY_SERVER_NOT_FOUND:"找不到 scrcpy-server,可用 TERMDOCK_SCRCPY_SERVER 指定路径。",SCRCPY_VERSION_UNKNOWN:"无法读取 scrcpy 版本,请确认 scrcpy --version 可执行。",SCRCPY_CONNECT_TIMEOUT:"设备连接超时,请确认已授权 USB 调试并保持解锁。",SCRCPY_UNSUPPORTED_CODEC:"设备返回了不支持的视频编码。",INVALID_ADDRESS:"地址格式不正确,应为 ip:port。",API_NOT_ALLOWED:"当前邀请未授权这台手机或此项操作。"};for(const[n,r]of Object.entries(t))if(e.includes(n))return r;return e}function KB(e){return Qr(`/api/android/recordings?serial=${encodeURIComponent(e)}`)}function GB(e){return Qr("/api/android/recordings",{method:"POST",body:JSON.stringify({serial:e})})}function WB(e){return Qr(`/api/android/recordings/${encodeURIComponent(e)}/stop`,{method:"POST"})}function VB(e,t){return Qr(`/api/android/recordings/${encodeURIComponent(e)}/save`,{method:"POST",body:JSON.stringify({directory:t})})}function YB(e){return Qr(`/api/android/recordings/${encodeURIComponent(e)}`,{method:"DELETE"})}function p0(e,t=[]){const n=new Map(e.map(o=>[o.serial,o]));for(const o of t)n.has(o.serial)||n.set(o.serial,{serial:o.serial,state:"unknown"});const r=[...n.values()];return u0(r).map(({device:o,routes:s})=>{const i=s.map(c=>c.serial),a=t.filter(c=>i.includes(c.serial));return{device:o,serials:i,access:a.some(c=>c.access==="control")?"control":a.length?"view":void 0}})}function Bm(e=[],t,n){return[...e.filter(r=>!t.includes(r.serial)),...n?t.map(r=>({serial:r,access:n})):[]]}function uL(e){const t=e==="darwin"?"mac":e==="win32"?"windows":"linux",n={host:"127.0.0.1",platform:t,protocol:t==="mac"?"vnc":"rdp",port:"3389",username:"",domain:"",ignoreCert:!1,rememberLogin:!0};return{target:"local",local:n,remote:{...n,host:""},viewOnly:!1,fit:!0,autoConnect:!0}}function fL(e,t){const n=uL(t);if(!e||typeof e!="object")return n;const r=e,o=(s,i)=>{const a=s&&typeof s=="object"?s:{},c=(d,u)=>typeof a[d]=="string"&&a[d].length<=u&&!/[\x00-\x1f]/.test(a[d])?a[d]:i[d];return{host:c("host",253),username:c("username",255),domain:c("domain",255),platform:["mac","linux","windows"].includes(String(a.platform))?a.platform:i.platform,protocol:a.protocol==="rdp"||a.protocol==="vnc"?a.protocol:i.protocol,port:typeof a.port=="string"&&/^\d{0,5}$/.test(a.port)&&Number(a.port)<=65535?a.port:i.port,ignoreCert:a.ignoreCert===!0,rememberLogin:a.rememberLogin!==!1}};return{target:r.target==="remote"?"remote":"local",local:{...o(r.local,n.local),host:"127.0.0.1"},remote:o(r.remote,n.remote),viewOnly:r.viewOnly===!0,fit:r.fit!==!1,autoConnect:r.autoConnect!==!1}}function XB(e){return JSON.stringify([e.host.trim().toLowerCase(),e.protocol,e.protocol==="vnc"?5900:Number(e.port),e.username.trim(),e.domain.trim()])}function m0({status:e,error:t}){const{t:n}=jt();return e==="error"?`${n("rightSidebar.downloadFailed")}: ${t||""}`:n(e==="saved"?"rightSidebar.downloadSaved":e==="canceled"?"rightSidebar.downloadCanceled":e==="started"?"rightSidebar.downloadStarted":e==="pending"?"common.cancel":"rightSidebar.downloadFile")}function g0({status:e,error:t,cancel:n,className:r="mt-2 text-xs"}){const o=m0({status:e,error:t});return e==="idle"?null:e==="pending"?n?l.jsx("button",{type:"button",className:"min-h-9 rounded-md px-2 text-xs text-muted-foreground hover:bg-surface-2",onClick:s=>{s.stopPropagation(),n()},children:o}):null:l.jsx("div",{role:e==="error"?"alert":"status",className:`${r} ${e==="error"?"text-destructive":"text-muted-foreground"}`,children:o})}const Fm={status:"idle",error:null,result:null};function hL(e,t,n=!0){const[r,o]=w.useState(Fm),s=w.useRef(null);w.useEffect(()=>YS(c=>{const d=s.current;!d||d.targetPeerId===c?.targetPeerId||(s.current=null,d.controller.abort(new DOMException("Download target changed","AbortError")),o({status:"canceled",error:null,result:"canceled"}))}),[]),w.useLayoutEffect(()=>(o(Fm),()=>{const c=s.current;s.current=null,c?.controller.abort()}),[t,n]);const i=w.useCallback(()=>{const c=s.current;c&&(s.current=null,c.controller.abort(),o({status:"canceled",error:null,result:"canceled"}))},[]),a=w.useCallback(async()=>{if(!n||s.current)return;const c=new AbortController,d=ht()?.targetPeerId;s.current={controller:c,targetPeerId:d},o({status:"pending",error:null,result:null});try{const u=await e(c.signal);if(s.current?.controller!==c)return;s.current=null;const f=c.signal.aborted?"canceled":u;o({status:f,error:null,result:f})}catch(u){if(s.current?.controller!==c)return;s.current=null,c.signal.aborted?o({status:"canceled",error:null,result:"canceled"}):o({status:"error",error:u instanceof Error?u.message:String(u),result:null})}},[e,n]);return{...r,start:a,cancel:i}}function sh(e,t=!0){const n=w.useCallback(r=>n0(e,r),[e]);return hL(n,e,t&&!!e)}function pL(e){if(!e||typeof e!="object")return!1;const t=e;if(!["file","directory","code"].includes(t.kind)||typeof t.path!="string"||!t.path.startsWith("/")||t.path.length>4096||/[\r\n\0]/.test(t.path)||typeof t.text!="string"||!t.text||t.text.length>32e3||t.id!==void 0&&(typeof t.id!="string"||!/^[a-f\d-]{36}$/i.test(t.id)))return!1;const n=t.lines;return n&&(!Number.isSafeInteger(n.start)||!Number.isSafeInteger(n.end)||n.start<1||n.end<n.start)?!1:t.kind!=="code"||!!n}function JB(e){const t=e.path.replace(/\/$/,"").split("/").pop()||"/";return e.lines?`${t} · L${e.lines.start}${e.lines.end===e.lines.start?"":`–${e.lines.end}`}`:t}const ih="application/x-termdock-file-reference",y0=()=>oe()?.targetPeerId||location.origin;function mL(e,t,n){e.setData("text/plain",t),e.setData(ih,JSON.stringify({service:y0(),text:t,...n?{reference:{...n,text:t}}:{}}))}function w0(e){const t=e.getData(ih);if(!t)return null;try{const n=JSON.parse(t);if(n.service!==y0())throw new Error("请在文件所属的服务中引用");return typeof n.text!="string"||!n.text?null:n.text}catch(n){if(n instanceof SyntaxError)return null;throw n}}function ZB(e){const t=w0(e);if(!t)return null;const n=JSON.parse(e.getData(ih));return pL(n.reference)&&n.reference.text===t?n.reference:null}function gL(e,t){if(!e||e.startsWith("/"))return e;const n=e.replace(/^\.\//,"");return t?`${t.replace(/\/+$/,"")}/${n}`:n}function b0(e,t){return gL(e,t).replace(/ /g,"\\ ")}function yL(e,t){return`${b0(e,t)} `}function Um(e,t){return b0(e,t)}function QB(e,t,n){if(!n)return Um(e,t);const r=n.start===n.end?`${n.start}`:`${n.start}-${n.end}`;return`${Um(e,t)}:${r}`}const wL=new Set,bL=new Set(["session.view","session.input","session.resize","session.owner-menu","session.share","todo.guidance","session.chat-view","session.chat-send","session.terminal-view","session.chat-clear","resource.android","resource.computer","resource.files","collaboration.mention"]);function v0(e){const t=[];return e.android?.length&&t.push("android"),e.computers?.length&&t.push("computer"),e.directories?.length&&t.push("files"),t}function vL(e,t={}){const n=new Set;e&&n.add("session.view"),e&&e.canViewChat!==!1&&n.add("session.chat-view"),e&&e.canViewTerminal!==!1&&n.add("session.terminal-view"),(e?.canSendChat===!0||e?.canSendChat===void 0&&e?.canWrite===!0)&&n.add("session.chat-send"),e?.canClearChat===!0&&n.add("session.chat-clear"),e?.canWrite===!0&&n.add("session.input"),e?.canResize===!0&&n.add("session.resize");for(const r of v0(t))n.add(`resource.${r}`);return n}const x0=w.createContext(void 0),ah=()=>w.useContext(x0),S0=w.createContext(void 0);function e3(){const e=w.useContext(S0),t=ah();return e??(t===void 0?bL:wL)}function xL(e){e.stopPropagation();const t=e.target;!((t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement)&&t.selectionStart!==null&&t.selectionStart!==t.selectionEnd)&&!window.getSelection()?.toString()&&e.preventDefault()}async function SL(e){const t=ct();return t?.confirmationUI==="page-v1"&&t.confirm?await t.confirm(e):window.confirm(e.message)}function EL(e){const t=ct();t?.confirmationUI==="page-v1"&&t.alert?t.alert(e):window.alert(e)}async function kL(e,t){if(!e.busy){e.busy=!0,t.pending(!0);try{if(!await t.confirm())return;if(!t.current())throw new Error(t.expiredMessage);const n=await t.submit(t.current);t.current()&&t.apply(n)}catch(n){t.current()&&t.failure(n instanceof Error?n.message:String(n))}finally{e.busy=!1,t.pending(!1)}}}function IL(){const{t:e}=jt();return l.jsxs("div",{role:"status",className:"td-loading-skeleton overflow-hidden px-3 py-2",children:[l.jsx("span",{className:"sr-only",children:e("common.loading")}),l.jsx("div",{"aria-hidden":"true",children:["w-2/5","w-3/5","w-1/3","w-1/2","w-2/5","w-1/3"].map((t,n)=>l.jsxs("div",{className:"flex h-8 items-center gap-2",style:{paddingLeft:n>1&&n<5?20:0},children:[l.jsx("div",{className:"h-3 w-3 shrink-0 rounded-sm bg-surface-2"}),l.jsx("div",{className:`h-2 rounded bg-surface-2 ${t}`})]},n))})]})}function Na(e,t,n=new Set){for(const r of e.keys()){if(e.size<=t)break;n.has(r)||e.delete(r)}return e}function ui(e){return e.replace(/\/+$/,"")||"/"}function CL(e){const t=ui(e);return t.slice(0,t.lastIndexOf("/"))||"/"}function E0(e,t){const n=ui(e),r=ui(t);return n===r||n.startsWith(r==="/"?"/":`${r}/`)}function t3(e,t){if(!E0(e,t))return null;const n=ui(e),r=ui(t);return n===r?"":n.slice(r==="/"?1:r.length+1)}function k0(e){return{setDirectoryCache:(t,n)=>e(r=>{const o=new Map(r.directoryCache);return o.delete(t),o.set(t,n),Na(o,128,new Set([...r.expandedPaths,t,r.explorerRoot??r.rootPath??""])),{directoryCache:o}}),invalidateDirectoryCache:(t,n=!1)=>e(r=>{const o=new Map(r.directoryCache);for(const s of o.keys())(s===t||n&&E0(s,t))&&o.delete(s);return{directoryCache:o}}),toggleExpanded:t=>e(n=>{const r=new Set(n.expandedPaths);return r.has(t)?r.delete(t):r.add(t),{expandedPaths:r}})}}const Xo=320,I0=280,Tu=5,TL="(min-width: 1024px)";function rr(){return typeof window>"u"||window.matchMedia?.(TL).matches===!0}function n3(e,t,n){const r=t-I0-(n?Xo+Tu*2:Tu);return Math.min(Math.max(200,Math.min(500,r)),Math.max(200,e))}function En(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(e);if(n===null||n==="")return null;const r=JSON.parse(n);return t(r)?r:null}catch{return null}}function rn(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function fo(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}const Xs=new Map,Mo=new Map,_a=new Map;function r3(e,t,n){if(typeof window>"u")return;const r=Date.now(),o=_a.get(e)??0,s=r-o;if(s>=n){_a.set(e,r),rn(e,t);return}if(Mo.set(e,t),Xs.has(e))return;const i=n-s,a=setTimeout(()=>{Xs.delete(e);const c=Mo.get(e);Mo.delete(e),_a.set(e,Date.now()),c!==void 0&&rn(e,c)},i);Xs.set(e,a)}function AL(e){const t=Xs.get(e);t&&(clearTimeout(t),Xs.delete(e));const n=Mo.get(e);n!==void 0&&(Mo.delete(e),_a.set(e,Date.now()),rn(e,n))}function o3(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}if(typeof window<"u"){const e=()=>{for(const t of Mo.keys())AL(t)};window.addEventListener("pagehide",e),window.addEventListener("termdock:before-update",e),document.addEventListener("visibilitychange",()=>{document.hidden&&e()})}const RL=600;function s3(e,t,n=0){const r=Math.max(Xo,t-Math.max(0,n)-Tu*(n>0?2:1)-I0);return Math.min(r,Math.max(Xo,e))}const C0="termdock:right-sidebar:tabs-by-session:v2",T0="termdock:right-sidebar:explorer-roots-by-session:v2",ch="termdock:right-sidebar:pinned-explorer-roots:v1",A0="termdock:right-sidebar:selected-files-by-session:v2",R0="termdock:right-sidebar:show-hidden-files:v1",Au="termdock:right-sidebar:file-sort-modes:v1",Ru="termdock:right-sidebar:nested-git-scan-roots:v1",P0="termdock:right-sidebar:active-git-repo:v2",PL="termdock:right-sidebar:active-git-repo:v1",Hm="termdock-sidebar-group-by-folder",N0="termdock-sidebar-collapsed-folder-groups",NL="termdock-left-sidebar-pinned",_0="termdock-left-sidebar-width",_L="termdock-right-sidebar-pinned",L0="termdock:desktop-sidebar-open:v1",j0="termdock-right-sidebar-width",lh="termdock:right-sidebar:widths-by-session:v1",D0="termdock:right-sidebar:split-state-initialized:v1",O0="termdock-right-sidebar-layout-preference";function $m(e){const t=e==="left";if(typeof window>"u")return t;try{const n=window.localStorage.getItem(`${L0}:${e}`);if(n==="1"||n==="0")return n==="1";const r=window.localStorage.getItem(e==="left"?NL:_L);return r==="1"||r==="0"?r==="1":t}catch{return t}}function or(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(`${L0}:${e}`,t?"1":"0")}catch{}}function LL(){if(typeof window>"u")return 300;try{const e=window.localStorage.getItem(_0);if(!e)return 300;const t=parseInt(e,10);return Number.isFinite(t)&&t>=200&&t<=500?t:300}catch{return 300}}function jL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(_0,String(e))}catch{}}function La(){if(typeof window>"u")return 760;try{const e=window.localStorage.getItem(j0);if(!e)return 760;const t=parseInt(e,10);return Number.isFinite(t)&&t>=Xo?t:760}catch{return 760}}function DL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(j0,String(e))}catch{}}function OL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="number"&&Number.isFinite(t)&&t>=Xo)}function wc(){return En(lh,OL)??{}}function fa(e,t){if(!e){DL(t);return}rn(lh,{...wc(),[e]:t})}function ML(){if(typeof window>"u")return"auto";try{const e=window.localStorage.getItem(O0);return e==="narrow"||e==="wide"?e:"auto"}catch{return"auto"}}function BL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(O0,e)}catch{}}function i3(e,t,n){return!t||n==="auto"?e<RL:n==="narrow"}function FL(){return!0}function zm(e){if(!(typeof window>"u"))try{e?window.localStorage.setItem(Hm,"1"):window.localStorage.setItem(Hm,"0")}catch{}}function UL(){if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(N0);if(!e)return new Set;const t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function HL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(N0,JSON.stringify([...e]))}catch{}}function $L(e){return e==="git"||e==="files"||e==="diff"||e==="android"||e==="computer"||e==="architecture"}function zL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every($L)}function Pu(){return En(C0,zL)??{}}function ho(e,t){e&&rn(C0,{...Pu(),[e]:t})}function qL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function qm(){return En(T0,qL)??{}}function ha(e){rn(T0,e)}function KL(e){return e!==null&&typeof e=="object"&&typeof e.path=="string"&&(e.kind==="file"||e.kind==="directory")}function GL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>Array.isArray(t)&&t.every(n=>typeof n=="string"||KL(n)))}function M0(e){const t=new Set,n=[];for(const r of e){const o=typeof r=="string"?{path:r,kind:"directory"}:r;!o.path||t.has(o.path)||(t.add(o.path),n.push(o))}return n}function WL(){const e=En(ch,GL)??{},t={};for(const[n,r]of Object.entries(e))t[n]=M0(r);return t}function Km(e){rn(ch,e)}function VL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function Nu(){return En(A0,VL)??{}}function Es(e,t){if(!e)return;const n={...Nu()};t?n[e]=t:delete n[e],rn(A0,n)}function Js(e,t){return t?e?`${e}\0${t}`:t:null}function _u(e,t,n){return n?`split-workspace\0${n}`:Js(e,t)}function a3(e,t,n){const r=wc(),o=_u(e,t,n);if(o&&r[o]!==void 0)return r[o];if(n){const s=Js(e,t);if(s&&r[s]!==void 0)return r[s]}return La()}function B0(){const e=En(D0,t=>Array.isArray(t)&&t.every(n=>typeof n=="string"));return new Set(e??[])}function YL(e){const t=B0();t.has(e)||(t.add(e),rn(D0,[...t]))}function XL(e){return typeof e=="boolean"}function JL(){return En(R0,XL)??!1}function ZL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t==="modified")}function QL(){return En(Au,ZL)??{}}function ej(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t===!0)}function tj(){return En(Ru,ej)??{}}function nj(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.entries(e).every(([t,n])=>t.length>0&&typeof n=="string"&&n.length>0)}function rj(){return En(P0,nj)??{}}function Gm(e){rn(P0,e)}let ks=null,Is=null;const Xl=new Map;let Cs=null;const pa=new Map;let Ts=null;const Jl=new Set;let As=null;const Zl=globalThis.crypto?.randomUUID?.()??`pins-${Math.random().toString(36).slice(2)}`;function po(e,t){const n=e.replace(/\/+$/,"")||"/";return t===n||t.startsWith(`${n}/`)}function Wm(e,t="name"){return[...e].sort((n,r)=>{if(n.type==="directory"&&r.type!=="directory")return-1;if(n.type!=="directory"&&r.type==="directory")return 1;if(t==="modified"){const o=Date.parse(r.modified??"")-Date.parse(n.modified??"");if(Number.isFinite(o)&&o!==0)return o}return n.name.localeCompare(r.name)})}function oj(e){return e.entry?{name:e.entry.name,path:e.entry.path,type:e.entry.type,isSymlink:e.entry.isSymlink,modified:e.entry.modified,expanded:!1,loaded:!1,children:e.entry.type==="directory"?[]:void 0}:null}const _e=pr(e=>({...k0(e),leftOpen:!1,rightOpen:!1,desktopLeftOpen:$m("left"),leftSidebarWidth:LL(),desktopRightOpen:$m("right"),rightSidebarWidth:La(),rightSidebarLayoutPreference:ML(),initialRightSidebarStateBySession:new Map,rightTab:"files",rightSearchOpen:!1,pendingTerminalPath:null,rootPath:null,contextKey:null,rightSidebarWidthContextKey:null,explorerRoot:null,explorerRootCache:qm(),pinnedExplorerRootsCache:WL(),pinnedExplorerRootsHydrated:!1,expandedPaths:new Set,selectedFilePath:null,directoryCache:new Map,fileSortModes:QL(),fileSortModesHydrated:!1,hideGitIgnoredRoots:{},gitIgnoreExceptions:{},hideGitIgnoredRootsHydrated:!1,nestedGitScanRoots:tj(),nestedGitScanRootsHydrated:!1,activeGitRepos:rj(),activeGitReposHydrated:!1,showHiddenFiles:JL(),groupByFolder:FL(),collapsedGroups:UL(),changedFiles:new Map,fileChangeVersions:new Map,fileWatchEpoch:0,gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null,gitBundleError:null,gitBundleLastLoadedAt:null,gitBundleCacheInfo:null,projectStateCache:new Map,rootDataCache:new Map,openLeft:()=>e(()=>rr()?(or("left",!0),{desktopLeftOpen:!0}):{leftOpen:!0,rightOpen:!1}),closeLeft:()=>e(()=>rr()?(or("left",!1),{desktopLeftOpen:!1}):{leftOpen:!1}),toggleLeft:()=>e(t=>rr()?(or("left",!t.desktopLeftOpen),{desktopLeftOpen:!t.desktopLeftOpen}):{leftOpen:!t.leftOpen,rightOpen:t.leftOpen?t.rightOpen:!1}),setDesktopSidebarOpen:(t,n)=>e(()=>(or(t,n),t==="left"?{desktopLeftOpen:n}:{desktopRightOpen:n})),setLeftSidebarWidth:t=>e(n=>{const r=Math.min(Math.max(t,200),500);return n.leftSidebarWidth===r?n:(jL(r),{leftSidebarWidth:r})}),setRightSidebarWidth:t=>e(n=>{const r=Math.max(t,Xo);return n.rightSidebarWidth===r?n:(fa(n.rightSidebarWidthContextKey,r),{rightSidebarWidth:r})}),setRightSidebarLayoutPreference:t=>e(n=>n.rightSidebarLayoutPreference===t?n:(BL(t),{rightSidebarLayoutPreference:t})),openTerminalPath:t=>e(n=>(ho(n.contextKey,"files"),rr()&&or("right",!0),{pendingTerminalPath:{...t},rightTab:"files",...rr()?{desktopRightOpen:!0}:{rightOpen:!0,leftOpen:!1}})),openRight:()=>e(()=>rr()?(or("right",!0),{desktopRightOpen:!0}):{rightOpen:!0,leftOpen:!1}),closeRight:()=>e(()=>rr()?(or("right",!1),{desktopRightOpen:!1}):{rightOpen:!1}),toggleRight:()=>e(t=>rr()?(or("right",!t.desktopRightOpen),{desktopRightOpen:!t.desktopRightOpen}):{rightOpen:!t.rightOpen,leftOpen:t.rightOpen?t.leftOpen:!1}),closeAll:()=>e({leftOpen:!1,rightOpen:!1}),setRightTab:t=>e(n=>(ho(n.contextKey,t),{rightTab:t})),openRightSearch:()=>e({rightSearchOpen:!0}),closeRightSearch:()=>e({rightSearchOpen:!1}),setRightSearchOpen:t=>e({rightSearchOpen:t}),initializeRightSidebarForSession:(t,n,r)=>e(o=>{const s=Js(t,n);s&&(fa(s,r.rightSidebarWidth),ho(s,r.rightTab));const i=new Map(o.initialRightSidebarStateBySession);return i.set(t,{...r}),{initialRightSidebarStateBySession:i}}),setRootPath:(t,n=null,r=null)=>e(o=>{const s=Js(n,t),i=_u(n,t,r),a=r?i:s,c=n&&!r?o.initialRightSidebarStateBySession.get(n):void 0;if(!c&&o.contextKey===a&&o.rightSidebarWidthContextKey===i)return t===o.rootPath?o:{rootPath:t};const d=new Map(o.initialRightSidebarStateBySession);c&&s&&n&&(fa(s,c.rightSidebarWidth),ho(s,c.rightTab),d.delete(n));const u=new Map(o.rootDataCache);o.rootPath&&u.set(o.rootPath,{directoryCache:o.directoryCache,changedFiles:o.changedFiles,gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo}),Na(u,12,new Set(t?[t]:[]));const f=t?u.get(t):void 0,h=t===o.rootPath,p=new Map(o.projectStateCache);o.contextKey&&p.set(o.contextKey,{rightTab:o.rightTab,explorerRoot:o.explorerRoot,expandedPaths:new Set(o.expandedPaths),selectedFilePath:o.selectedFilePath,directoryCache:new Map(o.directoryCache),changedFiles:new Map(o.changedFiles),gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo});const g=r?B0().has(r):!1;let m={...qm(),...o.explorerRootCache};const b=!!r&&!g,y=b&&s?o.contextKey===s?{rightTab:o.rightTab,explorerRoot:o.explorerRoot,expandedPaths:new Set(o.expandedPaths),selectedFilePath:o.selectedFilePath,directoryCache:new Map(o.directoryCache),changedFiles:new Map(o.changedFiles),gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo}:p.get(s):void 0;if(b&&r){const v=y?.rightTab??(s?Pu()[s]:void 0)??"files",S=y?.explorerRoot??(s?o.explorerRootCache[s]:void 0)??t,I=y?.selectedFilePath??(s?Nu()[s]:void 0)??null,R={rightTab:v,explorerRoot:S,expandedPaths:new Set(y?.expandedPaths??[]),selectedFilePath:I,directoryCache:new Map(y?.directoryCache??[]),changedFiles:new Map(y?.changedFiles??[]),gitBundleError:y?.gitBundleError??null,gitBundleLastLoadedAt:y?.gitBundleLastLoadedAt??null,gitBundleCacheInfo:y?.gitBundleCacheInfo??null};a&&(p.set(a,R),ho(a,v),Es(a,I),S&&(m={...m,[a]:S},ha(m))),YL(r)}Na(p,12,new Set(a?[a]:[]));const k=a?p.get(a):void 0,x=a?Pu()[a]:void 0,T=wc();let _=i?T[i]:void 0;r&&i&&_===void 0&&(_=(s?T[s]:void 0)??La(),fa(i,_));const A=a?m[a]:void 0,E=a?Nu()[a]:void 0;return{rootPath:t,pendingTerminalPath:null,contextKey:a,rightSidebarWidthContextKey:i,initialRightSidebarStateBySession:d,rightSidebarWidth:c?.rightSidebarWidth??_??La(),rightOpen:c?.rightOpen??(o.rightSidebarWidthContextKey===i?o.rightOpen:!1),rightTab:c?.rightTab??k?.rightTab??x??"files",explorerRoot:k?.explorerRoot??A??t,expandedPaths:k?new Set(k.expandedPaths):new Set,selectedFilePath:k?.selectedFilePath??E??null,explorerRootCache:m,directoryCache:f?.directoryCache??new Map,changedFiles:f?.changedFiles??new Map,gitBundleLoading:h?o.gitBundleLoading:!1,gitBundleSlow:h?o.gitBundleSlow:!1,gitBundleLoadingOwner:h?o.gitBundleLoadingOwner:null,gitBundleError:f?.gitBundleError??null,gitBundleLastLoadedAt:f?.gitBundleLastLoadedAt??null,gitBundleCacheInfo:f?.gitBundleCacheInfo??null,rootDataCache:u,projectStateCache:p}}),inheritRightSidebarStateFromSplitWorkspace:(t,n)=>e(r=>{if(!t||n.length===0)return r;const o=wc(),s=_u(null,null,t);if(!s)return r;const i=o[s]??(r.rightSidebarWidthContextKey===s?r.rightSidebarWidth:void 0),a=r.contextKey===s?{rightTab:r.rightTab,explorerRoot:r.explorerRoot,expandedPaths:new Set(r.expandedPaths),selectedFilePath:r.selectedFilePath,directoryCache:new Map(r.directoryCache),changedFiles:new Map(r.changedFiles),gitBundleError:r.gitBundleError,gitBundleLastLoadedAt:r.gitBundleLastLoadedAt,gitBundleCacheInfo:r.gitBundleCacheInfo}:r.projectStateCache.get(s);if(i===void 0&&!a)return r;const c={...o},d=new Map(r.projectStateCache),u={...r.explorerRootCache},f=new Map(r.initialRightSidebarStateBySession);for(const h of n){f.delete(h.sessionId);const p=Js(h.sessionId,h.rootPath);p&&(i!==void 0&&(c[p]=i),a&&(d.set(p,{...a,expandedPaths:new Set(a.expandedPaths),directoryCache:new Map(a.directoryCache),changedFiles:new Map(a.changedFiles)}),ho(p,a.rightTab),Es(p,a.selectedFilePath),a.explorerRoot?u[p]=a.explorerRoot:delete u[p]))}return i!==void 0&&rn(lh,c),a&&ha(u),Na(d,12,new Set(r.contextKey?[r.contextKey]:[])),{projectStateCache:d,explorerRootCache:u,initialRightSidebarStateBySession:f}}),setExplorerRoot:t=>e(n=>{if(n.explorerRoot===t)return n;const r={...n.explorerRootCache};return n.contextKey&&t&&(r[n.contextKey]=t,ha(r)),{explorerRoot:t,explorerRootCache:r}}),resetExplorerToProject:()=>e(t=>{if(t.explorerRoot===t.rootPath)return t;const n={...t.explorerRootCache};return t.contextKey&&t.rootPath&&(n[t.contextKey]=t.rootPath,ha(n)),{explorerRoot:t.rootPath,explorerRootCache:n}}),pinExplorerRoot:(t,n="directory")=>e(r=>{if(!r.rootPath||!t)return r;const o=r.rootPath,s=r.pinnedExplorerRootsCache[r.rootPath]??[];if(s.some(a=>a.path===t))return r;const i={...r.pinnedExplorerRootsCache,[r.rootPath]:[{path:t,kind:n},...s].slice(0,12)};return Km(i),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const a=await Yt({pinnedExplorerRoot:{rootPath:o,path:t,kind:n,pinned:!0},pinnedExplorerRootsOrigin:Zl});_e.getState().syncPinnedExplorerRoots(a.pinnedExplorerRoots??{})}catch{}})(),{pinnedExplorerRootsCache:i}}),unpinExplorerRoot:t=>e(n=>{if(!n.rootPath||!t)return n;const r=n.rootPath,o=n.pinnedExplorerRootsCache[n.rootPath]??[],s=o.find(c=>c.path===t);if(!o.some(c=>c.path===t))return n;const i=o.filter(c=>c.path!==t),a={...n.pinnedExplorerRootsCache};return i.length>0?a[n.rootPath]=i:delete a[n.rootPath],Km(a),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const c=await Yt({pinnedExplorerRoot:{rootPath:r,path:t,kind:s?.kind??"directory",pinned:!1},pinnedExplorerRootsOrigin:Zl});_e.getState().syncPinnedExplorerRoots(c.pinnedExplorerRoots??{})}catch{}})(),{pinnedExplorerRootsCache:a}}),hydratePinnedExplorerRoots:async()=>{if(!_e.getState().pinnedExplorerRootsHydrated)return As||(As=(async()=>{const t=_e.getState().pinnedExplorerRootsCache;let r=(await lr()).pinnedExplorerRoots??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await Yt({pinnedExplorerRoots:t,pinnedExplorerRootsOrigin:Zl})).pinnedExplorerRoots??t),_e.getState().syncPinnedExplorerRoots(r)})().finally(()=>{As=null}),As)},syncPinnedExplorerRoots:t=>e(()=>{const n={};for(const[r,o]of Object.entries(t)){const s=M0(o);s.length>0&&(n[r]=s.slice(0,12))}return fo(ch),{pinnedExplorerRootsCache:n,pinnedExplorerRootsHydrated:!0}}),selectFile:t=>e(n=>(Es(n.contextKey,t),{selectedFilePath:t})),toggleShowHiddenFiles:()=>e(t=>{const n=!t.showHiddenFiles;rn(R0,n);const r=new Map(t.projectStateCache);for(const[o,s]of r)r.set(o,{...s,directoryCache:new Map});return{showHiddenFiles:n,directoryCache:new Map,projectStateCache:r}}),toggleGroupByFolder:()=>e(t=>{const n=!t.groupByFolder;return zm(n),{groupByFolder:n}}),setGroupByFolder:t=>e(n=>n.groupByFolder===t?n:(zm(t),{groupByFolder:t})),toggleGroupCollapsed:t=>e(n=>{const r=new Set(n.collapsedGroups);return r.has(t)?r.delete(t):r.add(t),HL(r),{collapsedGroups:r}}),reconcileDirectoryCache:(t,n)=>e(r=>{const o=r.directoryCache.get(t);if(!o)return r;const s=new Map(o.map(u=>[u.path,u])),i=new Set(n.map(u=>u.path)),a=new Map(r.directoryCache),c=n.map(u=>{const f=s.get(u.path);return{name:u.name,path:u.path,type:u.type,isSymlink:u.isSymlink,modified:u.modified,expanded:f?.expanded??!1,loaded:f?.loaded??!1,children:u.type==="directory"?f?.children??[]:void 0}});a.set(t,Wm(c,r.fileSortModes[t]??"name"));for(const u of o)if(!i.has(u.path))for(const f of a.keys())po(u.path,f)&&a.delete(f);let d=r.selectedFilePath;return d&&o.find(f=>!i.has(f.path)&&po(f.path,d))&&(d=null,Es(r.rootPath,null)),{directoryCache:a,selectedFilePath:d}}),hydrateHideGitIgnoredRoots:async()=>{if(!_e.getState().hideGitIgnoredRootsHydrated)return ks||(ks=(async()=>{const t=await lr();e({hideGitIgnoredRoots:t.hideGitIgnoredRoots??{},gitIgnoreExceptions:t.gitIgnoreExceptions??{},hideGitIgnoredRootsHydrated:!0})})().finally(()=>{ks=null}),ks)},setHideGitIgnoredRoot:async(t,n)=>{const r=await Yt({hideGitIgnoredRoot:{rootPath:t,enabled:n}});e(o=>{const s=new Map(o.projectStateCache);for(const[i,a]of s)s.set(i,{...a,directoryCache:new Map});return{hideGitIgnoredRoots:r.hideGitIgnoredRoots??{},gitIgnoreExceptions:r.gitIgnoreExceptions??{},hideGitIgnoredRootsHydrated:!0,directoryCache:new Map,projectStateCache:s}})},setGitIgnoreExceptions:async(t,n)=>{const r=await Yt({gitIgnoreExceptions:{rootPath:t,paths:n}});e(o=>{const s=new Map(o.projectStateCache);for(const[i,a]of s)s.set(i,{...a,directoryCache:new Map});return{gitIgnoreExceptions:r.gitIgnoreExceptions??{},directoryCache:new Map,projectStateCache:s}})},hydrateFileSortModes:async()=>{if(!_e.getState().fileSortModesHydrated)return Is||(Is=(async()=>{const t=_e.getState().fileSortModes;let r=(await lr()).fileSortModes??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await Yt({fileSortModes:t})).fileSortModes??t),fo(Au),e({fileSortModes:r,fileSortModesHydrated:!0,directoryCache:new Map})})().finally(()=>{Is=null}),Is)},setDirectorySortMode:async(t,n)=>{try{await _e.getState().hydrateFileSortModes()}catch{}const r=_e.getState().fileSortModes[t]??"name",o=(Xl.get(t)??0)+1;Xl.set(t,o),e(s=>{const i={...s.fileSortModes};n==="modified"?i[t]=n:delete i[t];const a=new Map(s.directoryCache);return a.delete(t),{fileSortModes:i,fileSortModesHydrated:!0,directoryCache:a}});try{await Yt({fileSortMode:{path:t,mode:n}}),fo(Au)}catch{if(Xl.get(t)!==o)return;e(s=>{const i={...s.fileSortModes};r==="modified"?i[t]=r:delete i[t];const a=new Map(s.directoryCache);return a.delete(t),{fileSortModes:i,directoryCache:a}})}},hydrateNestedGitScanRoots:async()=>{if(!_e.getState().nestedGitScanRootsHydrated)return Cs||(Cs=(async()=>{const n=(await lr()).nestedGitScanRoots??{};fo(Ru),e({nestedGitScanRoots:n,nestedGitScanRootsHydrated:!0})})().finally(()=>{Cs=null}),Cs)},setNestedGitScanRoot:async(t,n)=>{try{await _e.getState().hydrateNestedGitScanRoots()}catch{}const r=!!_e.getState().nestedGitScanRoots[t],o=(pa.get(t)??0)+1;pa.set(t,o),e(s=>{const i={...s.nestedGitScanRoots};return n?i[t]=!0:delete i[t],{nestedGitScanRoots:i,nestedGitScanRootsHydrated:!0}});try{const s=await Yt({nestedGitScanRoot:{rootPath:t,enabled:n}});if(pa.get(t)!==o)return;e({nestedGitScanRoots:s.nestedGitScanRoots??{}}),fo(Ru)}catch{if(pa.get(t)!==o)return;e(s=>{const i={...s.nestedGitScanRoots};return r?i[t]=!0:delete i[t],{nestedGitScanRoots:i}})}},hydrateActiveGitRepos:async()=>{if(!_e.getState().activeGitReposHydrated)return Ts||(Ts=(async()=>{const n=(await lr()).activeGitRepos??{},r={...n};for(const s of Jl){const i=_e.getState().activeGitRepos[s];i?r[s]=i:delete r[s]}const o=Object.entries(r).filter(([s])=>n[s]===void 0);for(const[s]of o)Jl.add(s);o.length>0&&await Promise.all(o.map(([s,i])=>Yt({activeGitRepo:{contextKey:s,repoRoot:i}}).catch(()=>{}))),Gm(r),fo(PL),e({activeGitRepos:r,activeGitReposHydrated:!0})})().finally(()=>{Ts=null}),Ts)},setActiveGitRepo:t=>{const{contextKey:n,activeGitRepos:r}=_e.getState();if(!n||(r[n]??null)===t)return;Jl.add(n);const o={...r};t?o[n]=t:delete o[n],e({activeGitRepos:o}),Gm(o),Yt({activeGitRepo:{contextKey:n,repoRoot:t??null}}).catch(()=>{})},applyFileWatchEvents:t=>e(n=>{if(t.length===0)return n;const r=new Map(n.directoryCache),o=new Map(n.fileChangeVersions);let s=n.selectedFilePath,i=!1,a=!1,c=!1;const d=u=>{o.set(u,(o.get(u)??0)+1),a=!0};for(const u of t){if(u.type==="rescan-required"){c=!0,s&&po(u.path,s)&&d(s);continue}const f=CL(u.path),h=r.get(f);if(u.type==="deleted"){if(d(u.path),s&&po(u.path,s)&&(s=null,Es(n.rootPath,null)),h){const y=h.filter(k=>k.path!==u.path);y.length!==h.length&&(r.set(f,y),i=!0)}for(const y of r.keys())po(u.path,y)&&(r.delete(y),i=!0);continue}d(u.path);const p=oj(u);if(!p||!h)continue;const g=h.find(y=>y.path===p.path),m=n.explorerRoot??n.rootPath;if(!g&&m&&n.hideGitIgnoredRoots[m]&&po(m,f))continue;const b=Wm(g?h.map(y=>y.path===p.path?{...y,...p,children:y.children}:y):[...h,p],n.fileSortModes[f]??"name");r.set(f,b),i=!0}return!i&&!a&&!c?n:{directoryCache:i?r:n.directoryCache,selectedFilePath:s,fileChangeVersions:a?o:n.fileChangeVersions,fileWatchEpoch:c?n.fileWatchEpoch+1:n.fileWatchEpoch}}),bumpFileWatchEpoch:()=>e(t=>({fileWatchEpoch:t.fileWatchEpoch+1})),setChangedFiles:t=>e({changedFiles:t}),beginGitBundleLoading:t=>e({gitBundleLoading:!0,gitBundleSlow:!1,gitBundleLoadingOwner:t}),setGitBundleSlowFor:(t,n)=>e(r=>r.gitBundleLoadingOwner===t?{gitBundleSlow:n}:r),finishGitBundleLoading:t=>e(n=>n.gitBundleLoadingOwner===t?{gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null}:n),resetGitBundleLoading:()=>e({gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null}),setGitBundleError:t=>e({gitBundleError:t}),markGitBundleLoaded:(t=null)=>e({gitBundleLastLoadedAt:Date.now(),gitBundleCacheInfo:t})}));async function dh(e,t=()=>!0){if(!t())return!1;const n=ct();if(n?.writeClipboardText)try{return await n.writeClipboardText(e),t()}catch{return!1}try{return await navigator.clipboard.writeText(e),t()}catch{if(!t())return!1;const r=document.activeElement,o=document.createElement("textarea");o.value=e,o.readOnly=!0,o.style.position="fixed",o.style.left="-9999px",document.body.append(o);try{return o.select(),t()&&document.execCommand("copy")}catch{return!1}finally{o.remove(),r instanceof HTMLElement&&r.isConnected&&r.focus({preventScroll:!0})}}}const sj=450,ij=10,Vm=88,Ym=36,ma=10,Xm=14;function Jm(e){if(typeof document>"u")return 0;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(e)||"0");return Number.isFinite(t)?t:0}function aj(e,t){if(typeof window>"u")return{left:0,top:0};const n=window.visualViewport,r=n?.offsetLeft??0,o=n?.offsetTop??0,s=n?.width??window.innerWidth,i=n?.height??window.innerHeight,a=Jm("--safe-top-inset"),c=Jm("--safe-bottom-inset"),d=r+ma,u=r+s-Vm-ma,f=o+a+ma,h=o+i-c-Ym-ma,p=Math.max(d,Math.min(e-Vm/2,Math.max(d,u))),g=t-Ym-Xm,m=t+Xm,b=g>=f?g:m,y=Math.max(f,Math.min(b,Math.max(f,h)));return{left:Math.round(p),top:Math.round(y)}}function Zm(e){return dh(e)}function uh(e,t=!1){const n=w.useRef(null),r=w.useRef(null),o=w.useRef(!1),s=w.useRef(!1),i=w.useRef(!1),[a,c]=w.useState(null);w.useEffect(()=>{if(!a)return;const g=m=>{const b=m.target;b instanceof HTMLElement&&b.closest('[data-reference-copy-popover="true"]')||(c(null),o.current=!1,s.current=!1)};return document.addEventListener("pointerdown",g,{capture:!0}),()=>document.removeEventListener("pointerdown",g,!0)},[a]);const d=w.useCallback(()=>{n.current!=null&&(window.clearTimeout(n.current),n.current=null)},[]),u=w.useCallback(()=>{d(),r.current=null,o.current=!1},[d]),f=w.useCallback((g,m)=>({onPointerDown:b=>{b.pointerType==="mouse"&&b.button!==0||(u(),r.current={pointerId:b.pointerId,pointerType:b.pointerType,startX:b.clientX,startY:b.clientY,text:g,key:m},n.current=window.setTimeout(()=>{const y=r.current;if(y){if(o.current=!0,s.current=!0,i.current=!1,y.pointerType==="mouse"){Zm(y.text).then(k=>{k&&e?.(y.key)}),n.current=null;return}c({text:y.text,key:y.key,...aj(y.startX,y.startY)}),n.current=null}},sj))},onPointerMove:b=>{const y=r.current;if(!y||y.pointerId!==b.pointerId||o.current)return;const k=b.clientX-y.startX,x=b.clientY-y.startY;Math.hypot(k,x)>ij&&u()},onPointerUp:b=>{const y=r.current;if(!y||y.pointerId!==b.pointerId){u();return}o.current&&(b.preventDefault(),b.stopPropagation(),s.current=!0),u()},onPointerCancel:u,onPointerLeave:b=>{r.current?.pointerId===b.pointerId&&!o.current&&u()},onClickCapture:b=>{s.current&&(s.current=!1,b.preventDefault(),b.stopPropagation())},onContextMenu:b=>{!o.current&&!s.current||(b.preventDefault(),b.stopPropagation())}}),[e,u]),h=w.useCallback(g=>{if(g.preventDefault(),g.stopPropagation(),!a||i.current)return;i.current=!0;const m=a;c(null),o.current=!1,s.current=!1,Zm(m.text).then(b=>{b&&e?.(m.key)})},[e,a]),p=a&&typeof document<"u"?Vn.createPortal(w.createElement("button",{type:"button","data-reference-copy-popover":"true","data-sidebar-composer-popover":t?en()?.element.id:void 0,className:`fixed ${t?"z-popover":"z-modal-backdrop"} inline-flex h-9 w-[88px] select-none items-center justify-center gap-1.5 rounded-full border border-white/15 bg-[rgb(28_28_30_/_0.92)] px-3 text-[13px] font-semibold text-white shadow-[0_10px_28px_rgb(0_0_0_/_0.32),0_2px_8px_rgb(0_0_0_/_0.18)] backdrop-blur-xl transition-transform duration-100 ease-out active:scale-[0.96]`,style:{left:a.left,top:a.top,WebkitBackdropFilter:"blur(18px)"},onPointerDown:g=>{g.stopPropagation()},onPointerUp:h,onTouchStart:g=>{g.stopPropagation()},onTouchEnd:h,onClick:h},w.createElement(mi,{size:14,strokeWidth:2.4}),w.createElement("span",null,"Copy")),document.body):null;return w.useMemo(()=>Object.assign(f,{popoverNode:p}),[f,p])}function F0({path:e,enabled:t=!0,showHidden:n=!1,action:r="list_directory",requestSlotId:o,sortMode:s="name",gitIgnoreRoot:i,onLoad:a}){const c=w.useId(),d=o??`directory-list:${c}`,[u,f]=w.useState(0),h=JSON.stringify([e,n,r,d,s,i,u]),[p,g]=w.useState(),m=w.useRef(a),b=w.useRef(0);m.current=a,w.useEffect(()=>{if(!t||!e)return;const k=new AbortController,x=`${d}:${++b.current}`;return g({key:h,result:null,error:null,loading:!0}),e0(e,k.signal,n,r,x,s,i).then(T=>{k.signal.aborted||(g({key:h,result:T,error:null,loading:!1}),m.current?.(T))}).catch(T=>{k.signal.aborted||g({key:h,result:null,error:T instanceof Error?T.message:"Failed to load directory",loading:!1})}),()=>{k.abort(),Jf(x)}},[t,e,n,r,d,s,i,h]);const y=p?.key===h?p:void 0;return{result:y?.result??null,error:t?y?.error??null:null,loading:t&&!!e&&(y?.loading??!0),reload:()=>f(k=>k+1)}}const U0=w.createContext(null);function cj({children:e}){const[t]=w.useState(()=>py(n=>({directoryCache:new Map,expandedPaths:new Set,...k0(n)})));return l.jsx(U0.Provider,{value:t,children:e})}function fh(){return w.useContext(U0)??_e}function Rr(e){return gy(fh(),e)}const lj=new Set([".ts",".tsx",".js",".jsx",".py",".rs",".go",".java",".c",".cpp",".h",".rb",".php",".swift",".kt",".sh",".css",".scss",".html",".json",".yaml",".yml",".toml",".md"]),Qm=120,eg=120,dj=new Set,uj=[],fj={added:{label:"A",className:"text-[color:var(--diff-insert-strong)]",title:"Added"},modified:{label:"M",className:"text-[color:var(--diff-hunk-accent)]",title:"Modified"},deleted:{label:"D",className:"text-[color:var(--diff-delete-strong)]",title:"Deleted"},renamed:{label:"R",className:"text-muted-foreground",title:"Renamed"},copied:{label:"C",className:"text-[color:var(--diff-insert-strong)]",title:"Copied"},untracked:{label:"U",className:"text-[color:var(--diff-insert-strong)]",title:"Untracked (new file)"},conflicted:{label:"!",className:"text-destructive",title:"Conflicted"},unknown:{label:"?",className:"text-muted-foreground",title:"Unknown"}};function hh(e,t){if(t==="directory")return null;if(Zx(e))return l.jsx(Ry,{size:14});if(Xx(e))return l.jsx(Hw,{size:14});const n=e.lastIndexOf(".")>=0?e.slice(e.lastIndexOf(".")):"";return lj.has(n)?l.jsx(Xy,{size:14}):l.jsx(Qu,{size:14})}function H0({path:e}){const n=_e(o=>o.changedFiles.get(e))?.status;if(!n)return null;const r=fj[n]??{label:"?",className:"text-muted-foreground",title:n};return l.jsx("span",{className:`w-4 shrink-0 text-center text-[10px] font-mono font-bold ${r.className}`,title:r.title,children:r.label})}function Jo(e){return e?"ml-1 w-6 opacity-100":"ml-1 w-6 opacity-100 sm:ml-0 sm:w-0 sm:overflow-hidden sm:opacity-0 sm:group-hover:ml-1 sm:group-hover:w-6 sm:group-hover:opacity-100 sm:group-focus-within:ml-1 sm:group-focus-within:w-6 sm:group-focus-within:overflow-visible sm:group-focus-within:opacity-100"}function ph(e){return Jo(e)}const hj=w.memo(function({path:t}){const{t:n}=jt(),r=sh(t),o=r.status,s=m0(r),i=w.useCallback(a=>{a.stopPropagation(),r.status==="pending"?r.cancel():r.start()},[r.status,r.cancel,r.start]);return l.jsxs("button",{type:"button","aria-label":n(o==="pending"?"common.cancel":"rightSidebar.downloadFile"),onClick:a=>{i(a)},className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${Jo(o==="pending")} ${o==="pending"?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,title:o==="pending"?n("common.cancel"):s,children:[o==="pending"?l.jsx(Qe,{size:12,className:"animate-spin"}):l.jsx(Ac,{size:12}),o!=="idle"&&o!=="pending"&&l.jsx("span",{role:o==="error"?"alert":"status",className:"sr-only",children:s})]})});function pj(e){return e instanceof DOMException&&e.name==="AbortError"}function bc(){if(typeof window>"u")return!1;const e=window.getSelection();return!!(e&&!e.isCollapsed&&e.toString().trim())}function $0(e){return e.button===2||e.ctrlKey}const mj=176,gj=160,Rs=8;function tg(e,t,n,r){const o=window.visualViewport,s=o?.offsetLeft??0,i=o?.offsetTop??0,a=s+(o?.width??window.innerWidth),c=i+(o?.height??window.innerHeight),d=s+Rs,u=i+Rs,f=Math.max(d,a-n-Rs),h=Math.max(u,c-r-Rs),p=t+r<=c-Rs?t:t-r;return{anchorX:e,anchorY:t,left:Math.min(Math.max(e,d),f),top:Math.min(Math.max(p,u),h)}}function z0(e){const[t,n]=w.useState(null),r=w.useRef(null),o=w.useCallback((s,i)=>{n(tg(s,i,mj,gj))},[]);return w.useLayoutEffect(()=>{if(!e||!t||!r.current)return;const s=r.current.getBoundingClientRect();if(s.width<=0||s.height<=0)return;const i=tg(t.anchorX,t.anchorY,s.width,s.height);i.left===t.left&&i.top===t.top||n(i)},[e,t]),{position:t,menuRef:r,openAt:o,clearPosition:()=>n(null)}}function q0(e,t){return t&&typeof document<"u"?Vn.createPortal(e,document.body):e}function yj(e,t){return t?`${e.name} ${e.path}`.toLowerCase().includes(t):!0}function mh(e,t,n){if(!t||yj(e,t))return!0;const r=n.get(e.path);return r?r.some(o=>mh(o,t,n)):!1}function Lu(e){return e.map(t=>({name:t.name,path:t.path,type:t.type,isSymlink:t.isSymlink,modified:t.modified,expanded:!1,loaded:!1,children:t.type==="directory"?[]:void 0}))}function ju(e,t){return!e||!t.startsWith(e)?t:t.slice(e.length).replace(/^\/+/,"")||t}const wj=w.memo(function e({node:t,depth:n,onFileSelect:r,directoriesOnly:o=!1,onPathReference:s,referenceSelection:i,getReferenceText:a,onReferenceCopied:c,insertedReferenceKey:d,copiedReferenceKey:u,onDirectoryRoot:f,onSearchFromDirectory:h,onDirectoryPinToggle:p,onFilePinToggle:g,onOpenInFileBrowser:m,canOpenInFileBrowser:b,pinnedPaths:y,selectedFilePath:k,queryLower:x,onDirectoryDropFiles:T,onFileDeleteRequest:_,deletingFilePath:A,revealedDirectoryPath:E,gitIgnoreRoot:v}){const S=fh(),I=ah(),R=!I||I.directories?.some(H=>H.access==="write"&&(t.path===H.path||t.path.startsWith(H.path.replace(/\/+$/,"")+"/"))),{t:C}=jt(),N=Rr(H=>H.expandedPaths.has(t.path)),P=Rr(H=>H.directoryCache.get(t.path)),j=_e(H=>H.showHiddenFiles),O=Rr(H=>H.toggleExpanded),M=Rr(H=>H.setDirectoryCache),F=_e(H=>H.fileSortModes[t.path]??"name"),B=_e(H=>H.setDirectorySortMode),U=w.useRef(F);w.useLayoutEffect(()=>{U.current!==F&&S.getState().invalidateDirectoryCache(t.path),U.current=F},[F,S,t.path]);const[q,z]=w.useState(!1),{position:ee,menuRef:ie,openAt:Z,clearPosition:ae}=z0(q),[$,Y]=w.useState(!1),J=w.useRef(0),we=`file-tree:${w.useId()}:${t.path}`;Li(ie,q&&!!i,()=>z(!1));const ge=w.useRef(null),le=t.path===k||t.path===E,ce=t.type==="directory"&&(N||!!x),be=t.type==="directory",se=y.has(t.path),ye=!be&&!!g,pe=!!(b&&m),je=`path:${t.path}`,D=d===je||!!i?.paths.has(t.path),V=u===je,de=a?.(t.path)??t.path,De=uh(c,!!i),Re=sh(t.path),Ge=Re.start,Se=A===t.path,rt=be&&!o&&!!(f||h||p||pe),We=w.useMemo(()=>{if(!P)return;if(!x)return P;const H=S.getState().directoryCache;return P.filter(he=>(!o||he.type==="directory")&&mh(he,x,H))},[P,o,x,S]),{loading:Ct}=F0({path:t.path,enabled:t.type==="directory"&&N&&!P&&!o,showHidden:j,action:"expand_directory",requestSlotId:we,sortMode:F,gitIgnoreRoot:v,onLoad:H=>M(t.path,Lu(H.entries))}),ke=w.useCallback(()=>{if(t.type!=="directory"){r(t.path);return}if(o&&f){f(t.path);return}O(t.path)},[o,t.path,t.type,f,O,r]),Pe=w.useCallback(H=>{H.stopPropagation(),s?.(t.path,je,H.currentTarget)},[s,t.path,je]),et=w.useCallback(H=>{H.stopPropagation(),f?.(t.path),z(!1)},[t.path,f]),mt=w.useCallback(H=>{H.stopPropagation(),h?.(t.path),z(!1)},[t.path,h]),vt=w.useCallback(H=>{H.stopPropagation(),p?.(t.path),z(!1)},[t.path,p]),Tt=w.useCallback(H=>{H.stopPropagation(),B(t.path,F==="modified"?"name":"modified"),z(!1)},[t.path,B,F]),xt=w.useCallback(H=>{H.stopPropagation(),g?.(t.path),z(!1)},[t.path,g]),sn=w.useCallback(H=>{H.stopPropagation(),z(!1),Ge()},[t.path,Ge]),G=w.useCallback(H=>{H.stopPropagation(),z(!1),_(t)},[t,_]),ne=w.useCallback(H=>{H.stopPropagation(),m?.(t.path),z(!1)},[t.path,m]),te=w.useCallback(H=>{!be||!T||!H.dataTransfer.types.includes("Files")||(H.preventDefault(),H.stopPropagation(),J.current+=1,Y(!0))},[be,T]),K=w.useCallback(H=>{!be||!T||!H.dataTransfer.types.includes("Files")||(H.preventDefault(),H.stopPropagation(),H.dataTransfer.dropEffect="copy",Y(!0))},[be,T]),re=w.useCallback(H=>{!be||!T||(H.preventDefault(),H.stopPropagation(),J.current-=1,J.current<=0&&(J.current=0,Y(!1)))},[be,T]),fe=w.useCallback(H=>{if(!be||!T)return;H.preventDefault(),H.stopPropagation(),J.current=0,Y(!1);const he=Array.from(H.dataTransfer.files);he.length>0&&T(t.path,he)},[be,t.path,T]),W=w.useCallback(H=>{H.stopPropagation(),i?Z(H.clientX,H.clientY):ae(),z(he=>!he)},[ae,Z,!!i]),Q=w.useCallback(H=>{!rt||!$0(H)||(H.preventDefault(),H.stopPropagation(),Z(H.clientX,H.clientY),z(!0))},[rt,Z]);return w.useEffect(()=>{if(!q)return;const H=ue=>{const xe=ue.target;xe instanceof Node&&(ge.current?.contains(xe)||ie.current?.contains(xe))||z(!1)},he=ue=>{ue.key==="Escape"&&z(!1)};return document.addEventListener("pointerdown",H),document.addEventListener("keydown",he),()=>{document.removeEventListener("pointerdown",H),document.removeEventListener("keydown",he)}},[q,ie]),l.jsxs("div",{style:!ce&&!q?{contentVisibility:"auto",containIntrinsicSize:"auto 32px"}:void 0,children:[l.jsxs("div",{ref:ge,className:"relative",children:[De.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,draggable:!!s&&!o,onDragStart:H=>{if(!s||o||H.target.closest("button")){H.preventDefault();return}H.dataTransfer.effectAllowed="copy";const he=a?.(t.path)||yL(t.path,null);mL(H.dataTransfer,he,{kind:t.type==="directory"?"directory":"file",path:t.path,text:he})},"data-sort-mode":F,role:"button",tabIndex:0,onClick:()=>{bc()||ke()},onContextMenu:Q,onKeyDown:H=>{H.target!==H.currentTarget||H.key!=="Enter"&&H.key!==" "||(H.preventDefault(),ke())},onDragEnter:te,onDragOver:K,onDragLeave:re,onDrop:fe,className:`group relative flex w-full cursor-pointer items-center gap-1 rounded px-2 py-1 text-[13px] transition ${$?"scale-[1.015] bg-primary/15 text-foreground shadow-[0_0_0_1px_rgb(var(--primary-rgb)_/_0.45)]":le?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[n>0&&l.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:`${n*14-4}px`}}),$&&l.jsx("span",{className:"pointer-events-none absolute right-2 top-1/2 z-10 -translate-y-1/2 rounded-full bg-primary px-2 py-0.5 text-[10px] font-semibold text-primary-foreground shadow-md",children:C("fileTree.dropToUploadHere")}),t.type==="directory"?l.jsxs(l.Fragment,{children:[ce?l.jsx(Or,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(Un,{size:14,className:"shrink-0 text-muted-foreground/80"}),ce?l.jsx($s,{size:14,className:"shrink-0 text-[color:var(--folder)]"}):l.jsx(Pc,{size:14,className:"shrink-0 text-[color:var(--folder)]"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx("span",{className:le?"text-primary":"text-muted-foreground/80",children:hh(t.name,t.type)})]}),l.jsxs("span",{className:`flex-1 select-text whitespace-nowrap text-left leading-snug ${le?"font-medium":""}`,children:[t.name,F==="modified"&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-primary",title:C("fileTree.sortedByModified"),"aria-label":C("fileTree.sortedByModified"),children:l.jsx(Da,{size:11})}),t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:C("fileTree.symbolicLink"),children:l.jsx(Uo,{size:11})})]}),l.jsxs("div",{className:`sticky right-0 z-20 flex shrink-0 items-center rounded pl-1 ${le?"bg-surface-elevated":"bg-surface group-hover:bg-surface-2"}`,onClick:H=>H.stopPropagation(),children:[Ct&&l.jsx(Qe,{size:12,className:"shrink-0 animate-spin text-muted-foreground"}),l.jsx(H0,{path:t.path}),rt&&l.jsx("button",{type:"button",onClick:W,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${Jo(q)} ${q?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreDirActions"),"aria-expanded":q,title:C("fileTree.moreDirActions"),children:l.jsx(Mr,{size:13})}),!be&&!i&&l.jsx("button",{type:"button",onClick:W,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${Jo(q||Re.status==="pending"||Se||se)} ${q?"bg-surface-elevated text-foreground":se?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreFileActions"),"aria-expanded":q,title:Re.status==="error"?Re.error??C("rightSidebar.downloadFailed"):C("fileTree.moreFileActions"),children:Re.status==="pending"||Se?l.jsx(Qe,{size:13,className:"animate-spin"}):l.jsx(Mr,{size:13})}),s&&l.jsx("button",{type:"button",onClick:Pe,...De(de,je),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${i?"ml-1 min-h-11 min-w-11":ph(D||V)} ${D||V?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":i?`${i.label}: ${t.name}`:C(V?"rightSidebar.copied":D?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":i?D:void 0,disabled:!!i?.disabled&&!D,title:i?`${i.label}: ${t.name}`:C(V?"rightSidebar.copied":D?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:V||D?l.jsx(Mn,{size:12}):l.jsx(Uo,{size:12})}),l.jsx(g0,{status:Re.status,error:Re.error,cancel:Re.cancel,className:"ml-1 text-[10px]"}),rt&&q&&q0(l.jsxs("div",{ref:ie,className:`${ee?i?"fixed z-popover":"fixed z-menu-panel":"absolute right-2 top-[calc(100%+2px)] z-30"} w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in`,style:ee?{left:ee.left,top:ee.top}:void 0,children:[pe&&l.jsxs("button",{type:"button",onClick:ne,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("fileTree.openInFileBrowserTitle"),children:[l.jsx($s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.openInFileBrowser")})]}),f&&l.jsxs("button",{type:"button",onClick:et,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("fileTree.openDirRootTitle"),children:[l.jsx($s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.openDirRoot")})]}),h&&l.jsxs("button",{type:"button",onClick:mt,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("fileTree.searchFromDirTitle"),children:[l.jsx(Rc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.searchFromDir")})]}),p&&l.jsxs("button",{type:"button",onClick:vt,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${se?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(se?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[se?l.jsx(ri,{size:13,className:"shrink-0"}):l.jsx(ni,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(se?"fileTree.unpinDir":"fileTree.pinDir")})]}),l.jsxs("button",{type:"button",onClick:Tt,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",children:[F==="modified"?l.jsx(by,{size:13,className:"shrink-0"}):l.jsx(Da,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(F==="modified"?"fileTree.sortByName":"fileTree.sortByModified")})]})]}),!!ee),!be&&!i&&q&&l.jsxs("div",{className:"absolute right-2 top-[calc(100%+2px)] z-30 w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in",children:[pe&&l.jsxs("button",{type:"button",onClick:ne,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("fileTree.openInFileBrowserTitle"),children:[l.jsx(Qu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.openInFileBrowser")})]}),l.jsxs("button",{type:"button",onClick:sn,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("rightSidebar.downloadFile"),children:[l.jsx(Ac,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("rightSidebar.downloadFile")})]}),ye&&l.jsxs("button",{type:"button",onClick:xt,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${se?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(se?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[se?l.jsx(ri,{size:13,className:"shrink-0"}):l.jsx(ni,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(se?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!R,onClick:G,disabled:Se,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-destructive transition hover:bg-destructive/10 active:scale-[0.99] disabled:opacity-50",title:C("fileTree.deleteFile"),children:[Se?l.jsx(Qe,{size:13,className:"shrink-0 animate-spin"}):l.jsx(rf,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.deleteFile")})]})]})]})]})]}),ce&&We&&We.length>0&&l.jsx("div",{className:n===0?"mt-0.5":"",children:We.map(H=>l.jsx(e,{node:H,depth:n+1,onFileSelect:r,directoriesOnly:o,onPathReference:s,referenceSelection:i,getReferenceText:a,onReferenceCopied:c,onDirectoryRoot:f,onSearchFromDirectory:h,onDirectoryPinToggle:p,onFilePinToggle:g,onOpenInFileBrowser:m,canOpenInFileBrowser:b,pinnedPaths:y,selectedFilePath:k,queryLower:x,insertedReferenceKey:d,copiedReferenceKey:u,onDirectoryDropFiles:T,onFileDeleteRequest:_,deletingFilePath:A,gitIgnoreRoot:v,revealedDirectoryPath:E},H.path))})]})}),bj=w.memo(function({node:t,rootPath:n,onFileSelect:r,onPathReference:o,referenceSelection:s,getReferenceText:i,onReferenceCopied:a,insertedReferenceKey:c,copiedReferenceKey:d,onDirectoryRoot:u,onSearchFromDirectory:f,onDirectoryPinToggle:h,onFilePinToggle:p,pinnedPaths:g,selectedFilePath:m,onFileDeleteRequest:b,deletingFilePath:y}){const k=ah(),x=!k||k.directories?.some(ce=>ce.access==="write"&&(t.path===ce.path||t.path.startsWith(ce.path.replace(/\/+$/,"")+"/"))),{t:T}=jt(),_=t.path===m,A=t.type==="directory",E=g.has(t.path),v=!A&&!!p,S=`path:${t.path}`,I=c===S||!!s?.paths.has(t.path),R=d===S,C=i?.(t.path)??t.path,N=uh(a,!!s),P=sh(t.path),j=P.start,[O,M]=w.useState(!1),{position:F,menuRef:B,openAt:U,clearPosition:q}=z0(O);Li(B,O&&!!s,()=>M(!1));const z=w.useRef(null),ee=y===t.path,ie=A&&!!(u||f||h),Z=w.useCallback(()=>{bc()||(t.type==="directory"?u?.(t.path):r(t.path))},[t.path,t.type,u,r]),ae=w.useCallback(ce=>{ce.stopPropagation(),o?.(t.path,S,ce.currentTarget)},[o,t.path,S]),$=w.useCallback(ce=>{ce.stopPropagation(),h?.(t.path),M(!1)},[t.path,h]),Y=w.useCallback(ce=>{ce.stopPropagation(),p?.(t.path),M(!1)},[t.path,p]),J=w.useCallback(ce=>{ce.stopPropagation(),M(!1),j()},[t.path,j]),we=w.useCallback(ce=>{ce.stopPropagation(),M(!1),b(t)},[t,b]),ge=w.useCallback(ce=>{ce.stopPropagation(),s?U(ce.clientX,ce.clientY):q(),M(be=>!be)},[q,U,!!s]),le=w.useCallback(ce=>{!ie||!$0(ce)||(ce.preventDefault(),ce.stopPropagation(),U(ce.clientX,ce.clientY),M(!0))},[ie,U]);return w.useEffect(()=>{if(!O)return;const ce=se=>{const ye=se.target;ye instanceof Node&&(z.current?.contains(ye)||B.current?.contains(ye))||M(!1)},be=se=>{se.key==="Escape"&&M(!1)};return document.addEventListener("pointerdown",ce),document.addEventListener("keydown",be),()=>{document.removeEventListener("pointerdown",ce),document.removeEventListener("keydown",be)}},[O,B]),l.jsxs("div",{ref:z,className:"relative border-b border-border/10 last:border-b-0",children:[N.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,role:"button",tabIndex:0,onClick:Z,onContextMenu:le,onKeyDown:ce=>{ce.target!==ce.currentTarget||ce.key!=="Enter"&&ce.key!==" "||(ce.preventDefault(),Z())},className:`group flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-[13px] transition ${_?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[t.type==="directory"?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx(Pc,{size:14,className:"shrink-0 text-[color:var(--folder)]"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx("span",{className:_?"text-primary":"text-muted-foreground/80",children:hh(t.name,t.type)})]}),l.jsxs("span",{className:"min-w-0 flex-1 select-text",children:[l.jsxs("span",{className:`block whitespace-normal break-all font-medium leading-snug ${_?"text-primary":"text-foreground"}`,children:[t.name,t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:T("fileTree.symbolicLink"),children:l.jsx(Uo,{size:11})})]}),l.jsx("span",{className:"mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/80",children:ju(n,t.path)})]}),l.jsx(H0,{path:t.path}),t.type==="directory"&&(h||f)&&l.jsx("button",{type:"button",onClick:ge,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${Jo(O)} ${O?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":T("fileTree.moreDirActions"),"aria-expanded":O,title:T("fileTree.moreDirActions"),children:l.jsx(Mr,{size:13})}),!A&&!s&&l.jsx("button",{type:"button",onClick:ge,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${Jo(O||P.status==="pending"||ee||E)} ${O?"bg-surface-elevated text-foreground":E?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":T("fileTree.moreFileActions"),"aria-expanded":O,title:P.status==="error"?P.error??T("rightSidebar.downloadFailed"):T("fileTree.moreFileActions"),children:P.status==="pending"||ee?l.jsx(Qe,{size:13,className:"animate-spin"}):l.jsx(Mr,{size:13})}),o&&l.jsx("button",{type:"button",onClick:ae,...N(C,S),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${s?"ml-1 min-h-11 min-w-11":ph(I||R)} ${I||R?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":s?`${s.label}: ${t.name}`:T(R?"rightSidebar.copied":I?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":s?I:void 0,disabled:!!s?.disabled&&!I,title:s?`${s.label}: ${t.name}`:T(R?"rightSidebar.copied":I?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:R||I?l.jsx(Mn,{size:12}):l.jsx(Uo,{size:12})})]}),l.jsx(g0,{status:P.status,error:P.error,cancel:P.cancel,className:"ml-1 text-[10px]"}),ie&&O&&q0(l.jsxs("div",{ref:B,className:`${F?s?"fixed z-popover":"fixed z-menu-panel":"absolute right-2 top-[calc(100%+2px)] z-30"} w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in`,style:F?{left:F.left,top:F.top}:void 0,children:[u&&l.jsxs("button",{type:"button",onClick:ce=>{ce.stopPropagation(),u(t.path),M(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("fileTree.openDirRootTitle"),children:[l.jsx($s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.openDirRoot")})]}),f&&l.jsxs("button",{type:"button",onClick:ce=>{ce.stopPropagation(),f(t.path),M(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",children:[l.jsx(Rc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.searchFromDir")})]}),h&&l.jsxs("button",{type:"button",onClick:$,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${E?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:T(E?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[E?l.jsx(ri,{size:13,className:"shrink-0"}):l.jsx(ni,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(E?"fileTree.unpinDir":"fileTree.pinDir")})]})]}),!!F),!A&&!s&&O&&l.jsxs("div",{className:"absolute right-2 top-[calc(100%+2px)] z-30 w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in",children:[l.jsxs("button",{type:"button",onClick:J,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("rightSidebar.downloadFile"),children:[l.jsx(Ac,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("rightSidebar.downloadFile")})]}),v&&l.jsxs("button",{type:"button",onClick:Y,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${E?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:T(E?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[E?l.jsx(ri,{size:13,className:"shrink-0"}):l.jsx(ni,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(E?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!x,onClick:we,disabled:ee,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-destructive transition hover:bg-destructive/10 active:scale-[0.99] disabled:opacity-50",title:T("fileTree.deleteFile"),children:[ee?l.jsx(Qe,{size:13,className:"shrink-0 animate-spin"}):l.jsx(rf,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.deleteFile")})]})]})]})}),vj=60,ng=60,xj=20;function rg({count:e,loading:t,engine:n,limited:r,scope:o,content:s}){const{t:i}=jt();return l.jsxs("div",{className:"sticky top-0 z-10 -mx-2 -mt-2 mb-2 border-b border-border/15 bg-surface/95 px-3 py-2.5 backdrop-blur",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 text-[12px] font-semibold text-foreground",children:[l.jsx(Rc,{size:14,className:"shrink-0 text-primary"}),l.jsx("span",{children:s?i("fileTree.contentMatchesCount",{count:e}):i("fileTree.searchResults",{count:e})})]}),n&&l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[9px] uppercase tracking-[0.12em] text-muted-foreground",children:[t&&l.jsx(Qe,{size:9,className:"animate-spin"}),n,r?" · limited":""]})]}),l.jsxs("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-[10px] text-muted-foreground",children:[l.jsx("span",{className:"shrink-0",children:i("fileTree.searchScope")}),l.jsx("span",{className:"min-w-0 truncate font-mono text-foreground/75",title:o,children:o}),t&&l.jsx("span",{className:"ml-auto shrink-0",children:i("fileTree.searching")})]})]})}function Sj(e,t){if(!t)return e;const n=e.toLowerCase(),r=t.toLowerCase(),o=[];let s=0,i=n.indexOf(r,s),a=0;for(;i>=0&&r;)i>s&&o.push(e.slice(s,i)),o.push(l.jsx("mark",{className:"rounded-sm bg-[rgb(var(--warning-rgb)_/_0.30)] px-0.5 text-foreground",children:e.slice(i,i+r.length)},`m-${a++}`)),s=i+r.length,i=n.indexOf(r,s);return s<e.length&&o.push(e.slice(s)),o.length>0?o:e}const Ej=w.memo(function({entry:t,rootPath:n,selectedFilePath:r,query:o,onContentMatchSelect:s,onPathReference:i,referenceSelection:a,getReferenceText:c,onReferenceCopied:d,insertedReferenceKey:u,copiedReferenceKey:f}){const{t:h}=jt(),[p,g]=w.useState(!0),m=t.path===r,b=p?t.matches.slice(0,xj):[],y=t.matches.length-b.length,k=`path:${t.path}`,x=u===k||!!a?.paths.has(t.path),T=f===k,_=c?.(t.path)??t.path,A=uh(d,!!a);return l.jsxs("div",{className:"border-b border-border/10 last:border-b-0",children:[A.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":"file",role:"button",tabIndex:0,onClick:()=>{bc()||g(E=>!E)},onKeyDown:E=>{E.target!==E.currentTarget||E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),g(v=>!v))},className:`group flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-[13px] transition ${m?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[p?l.jsx(Or,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(Un,{size:14,className:"shrink-0 text-muted-foreground/80"}),l.jsx("span",{className:m?"text-primary":"text-muted-foreground/80",children:hh(t.name,"file")}),l.jsxs("span",{className:"min-w-0 flex-1 select-text",children:[l.jsx("span",{className:"block whitespace-normal break-all font-medium leading-snug",children:t.name}),l.jsx("span",{className:"mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/80",children:ju(n,t.path)})]}),l.jsx("span",{className:"shrink-0 select-none rounded-full bg-surface-2 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:t.matches.length}),!a&&l.jsx(hj,{path:t.path}),i&&l.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),i(t.path,k,E.currentTarget)},...A(_,k),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${a?"ml-1 min-h-11 min-w-11":ph(x||T)} ${x||T?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":a?`${a.label}: ${t.name}`:h(T?"rightSidebar.copied":x?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":a?x:void 0,disabled:!!a?.disabled&&!x,title:a?`${a.label}: ${t.name}`:h(T?"rightSidebar.copied":x?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:T||x?l.jsx(Mn,{size:12}):l.jsx(Uo,{size:12})})]}),p&&l.jsxs("div",{className:"mb-1 ml-3 border-l border-border/20 pl-1",children:[b.map((E,v)=>l.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{bc()||s?.(t.path,E.line)},onKeyDown:S=>{S.target!==S.currentTarget||S.key!=="Enter"&&S.key!==" "||(S.preventDefault(),s?.(t.path,E.line))},className:"flex w-full cursor-pointer items-start gap-2 rounded px-2 py-1 text-left font-mono text-[11px] text-muted-foreground transition hover:bg-surface-2 hover:text-foreground",title:`${ju(n,t.path)}:${E.line}`,children:[l.jsx("span",{className:"shrink-0 select-none tabular-nums text-muted-foreground/60",children:E.line}),l.jsx("span",{className:"min-w-0 flex-1 truncate whitespace-pre select-text",children:Sj(E.text,o)})]},`${E.line}-${v}`)),y>0&&l.jsx("div",{className:"px-2 py-1 text-[10px] text-muted-foreground/70",children:h("fileTree.moreMatches",{count:y})})]})]})});function kj(e){const t=l.jsx(Ij,{...e});return e.directoriesOnly||e.referenceSelection?l.jsx(cj,{children:t}):t}function Ij({rootPath:e,onFileSelect:t,directoriesOnly:n=!1,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,insertedReferenceKey:a,copiedReferenceKey:c,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,onOpenInFileBrowser:p,canOpenInFileBrowser:g=!1,pinnedPaths:m=dj,selectedFilePath:b,query:y="",searchRootPath:k,searchOptions:x={},searchMode:T="name",onContentMatchSelect:_,onDirectoryDropFiles:A,revealDirectory:E}){const{t:v}=jt(),S=fh(),I=w.useId(),R=`${o?"file-tree-reference-root":"file-tree-root"}:${I}:${e}`,C=Rr(K=>e?K.directoryCache.get(e):void 0),N=Rr(K=>K.setDirectoryCache),P=_e(K=>K.showHiddenFiles),j=_e(K=>K.fileSortModesHydrated),O=_e(K=>K.fileSortModes[e]??"name"),M=_e(K=>K.hydrateFileSortModes),F=_e(K=>K.hydrateHideGitIgnoredRoots),B=_e(K=>!!K.hideGitIgnoredRoots[e]),U=_e(K=>K.hideGitIgnoredRootsHydrated),q=_e(K=>JSON.stringify(K.gitIgnoreExceptions[e]??[])),z=Rr(K=>K.invalidateDirectoryCache),ee=`${e}:${O}:${P}:${B}:${q}`,[ie,Z]=w.useState("");w.useLayoutEffect(()=>{e&&z(e,!0),Z(ee)},[e,B,q,z,ee]);const[ae,$]=w.useState(!1),[Y,J]=w.useState(!1),[we,ge]=w.useState(null),[le,ce]=w.useState(j&&U),be=j&&U||le;w.useEffect(()=>{let K=!1;return Promise.all([M(),F()]).catch(()=>{}).finally(()=>{K||ce(!0)}),()=>{K=!0}},[M,F]);const[se,ye]=w.useState([]),[pe,je]=w.useState(null),[D,V]=w.useState(Qm),[de,De]=w.useState([]),[Re,Ge]=w.useState(null),Se=w.useRef({busy:!1}),rt=w.useRef(0),We=w.useRef(e);We.current=e,w.useEffect(()=>{const K=()=>{rt.current++};for(const re of["pagehide","auth:unauthorized",Et])window.addEventListener(re,K);return()=>{K();for(const re of["pagehide","auth:unauthorized",Et])window.removeEventListener(re,K)}},[]);const Ct=w.useRef(null),ke=w.useRef(0),Pe=y.trim().toLowerCase(),et=T==="content",mt=k||e,vt=x.excludePatterns??uj,Tt=vt.join(`
|
|
7
|
+
`);w.useEffect(()=>{const K=E?.path;if(!K||!K.startsWith(`${e}/`)&&K!==e)return;const re=K.slice(e.length).replace(/^\/+/,""),fe=re?re.split("/"):[],W=fe.map((Me,Fe)=>`${e}/${fe.slice(0,Fe+1).join("/")}`),Q=S.getState(),H=W.filter(Me=>!Q.expandedPaths.has(Me));H.length>0&&S.setState(Me=>({expandedPaths:new Set([...Me.expandedPaths,...H])}));let he=!1,ue=0;const xe=()=>{if(he)return;const Me=Array.from(document.querySelectorAll("[data-file-tree-path]")).find(Fe=>Fe.dataset.fileTreePath===K);if(Me){Me.scrollIntoView({block:"center",behavior:"smooth"});return}ue+=1,ue<80&&window.setTimeout(xe,50)},Ee=window.requestAnimationFrame(xe);return()=>{he=!0,window.cancelAnimationFrame(Ee)}},[E?.nonce,E?.path,e,S]);const xt=w.useCallback(async K=>{if(Se.current.busy||K.type==="directory")return;const re=rt.current,fe=oe(),W=He(),Q=e,H=K.path.slice(0,K.path.lastIndexOf("/"))||"/",he=()=>S.getState().directoryCache.get(H)?.find(Ie=>Ie.path===K.path),ue=Ie=>JSON.stringify([Ie.path,Ie.name,Ie.type,Ie.isSymlink,Ie.modified]),xe=ue(K),Ee=he(),Me=Ee?ue(Ee):null;let Fe=!1;const Ce=()=>{const Ie=he();return re===rt.current&&Q===We.current&&fe===oe()&&W===He()&&!W?.closed&&ue(K)===xe&&(Ie?ue(Ie)===(Me??xe):Me===null||Fe)};await kL(Se.current,{current:Ce,confirm:()=>SL({title:v("fileTree.deleteFile"),message:v("fileTree.deleteFileConfirm",{name:K.name}),confirmLabel:v("fileTree.deleteFile"),cancelLabel:v("common.cancel")}),submit:async Ie=>{await o0(K.path,Ie),Fe=!0},apply:()=>{_e.getState().applyFileWatchEvents([{type:"deleted",path:K.path}]),ye(Ie=>Ie.filter(Ye=>Ye.path!==K.path)),De(Ie=>Ie.filter(Ye=>Ye.path!==K.path)),m.has(K.path)&&h?.(K.path)},pending:Ie=>{re===rt.current&&Ge(Ie?K.path:null)},failure:Ie=>EL(v("fileTree.deleteFileFailed",{message:Ie})),expiredMessage:"File deletion context changed"})},[e,h,m,v,S]),{loading:sn,error:G,reload:ne}=F0({path:e,enabled:be&&ie===ee&&!Pe&&!C,showHidden:P,action:"load_file_tree_root",requestSlotId:R,sortMode:O,gitIgnoreRoot:e,onLoad:K=>{$(!!K.truncated),N(e,Lu(K.entries))}});w.useEffect(()=>{if(!mt||!Pe){J(!1),ge(null),ye([]),De([]),je(null);return}let K=!1;const re=new AbortController,fe=new Set;J(!0),ge(null),ye([]),De([]),V(et?vj:Qm),je({truncated:!1,total:0,engine:"rg",limited:!1,done:!1});const W=`file-search:${I}:${mt}:${++ke.current}`;let Q=!1;const H=()=>t0(mt,y.trim(),ue=>{if(!K){if(ue.engine&&je(xe=>({truncated:xe?.truncated??!1,total:xe?.total??0,engine:ue.engine,limited:ue.limited??xe?.limited??!1,done:xe?.done??!1})),ue.entries?.length){const xe=ue.entries.filter(Ee=>fe.has(Ee.path)?!1:(fe.add(Ee.path),!0));xe.length>0&&(ye(Ee=>[...Ee,...Lu(xe)]),je(Ee=>Ee?{...Ee,total:fe.size}:{truncated:!1,total:fe.size,engine:"rg",limited:!1,done:!1}))}if(ue.contentEntries?.length){const xe=ue.contentEntries.filter(Ee=>fe.has(Ee.path)?!1:(fe.add(Ee.path),!0));xe.length>0&&(De(Ee=>[...Ee,...xe]),je(Ee=>Ee?{...Ee,total:fe.size}:{truncated:!1,total:fe.size,engine:"rg",limited:!1,done:!1}))}ue.done&&je(xe=>({truncated:!!ue.truncated,total:typeof ue.total=="number"?ue.total:fe.size,engine:ue.engine??xe?.engine??"rg",limited:!!ue.limited,done:!0}))}},re.signal,P,T,W,{excludePatterns:vt,caseSensitive:x.caseSensitive,wholeWord:x.wholeWord,regex:x.regex}).catch(ue=>{K||pj(ue)||(ge(ue instanceof Error?ue.message:"Failed to search files"),ye([]),De([]),je(null))}).finally(()=>{K||J(!1)}),he=window.setTimeout(()=>{Q=!0,H()},180);return()=>{K=!0,window.clearTimeout(he),re.abort(),Q&&Jf(W)}},[mt,Tt,et,y,Pe,T,x.caseSensitive,x.regex,x.wholeWord,P,!!o,I]),w.useEffect(()=>{if(!Pe)return;const K=Ct.current;if(!K)return;const re=et?de.length:se.length,fe=et?ng:eg,W=new IntersectionObserver(Q=>{Q.some(H=>H.isIntersecting)&&V(H=>Math.min(H+fe,re))},{rootMargin:"160px 0px"});return W.observe(K),()=>W.disconnect()},[Pe,se.length,de.length,et]);const te=w.useMemo(()=>{if(!C)return;if(!Pe)return n?C.filter(re=>re.type==="directory"):C;const K=S.getState().directoryCache;return C.filter(re=>(!n||re.type==="directory")&&mh(re,Pe,K))},[n,Pe,C,S]);if(!e)return l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:v("fileTree.noWorkingDir")});if(sn||!be)return l.jsx(IL,{});if(Pe&&et){const K=pe?.total??de.length,re=de.slice(0,D),fe=D<de.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(rg,{count:K,loading:Y,engine:pe?.engine,limited:pe?.limited,scope:mt,content:!0}),we?l.jsxs("div",{className:"mx-1 mt-3 rounded-xl border border-border/15 bg-surface-2 px-4 py-5 text-center text-sm text-muted-foreground",children:[v("fileTree.contentSearchNeedsRipgrep"),l.jsx("div",{className:"mt-1 break-words text-[11px] text-muted-foreground/70",children:we})]}):Y&&de.length===0?l.jsx(Lm,{label:v("fileTree.searching"),className:"py-8"}):de.length===0?l.jsx("div",{className:"mx-1 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:v("fileTree.noContentMatches")}):l.jsxs(l.Fragment,{children:[pe?.limited&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:v("fileTree.searchTruncatedHint",{count:pe.total})}),re.map(W=>l.jsx(Ej,{entry:W,rootPath:mt,selectedFilePath:b,query:y.trim(),onContentMatchSelect:_,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,insertedReferenceKey:a,copiedReferenceKey:c},W.path)),l.jsx("div",{ref:Ct,className:"py-2 text-center text-[11px] text-muted-foreground",children:fe?l.jsx("button",{type:"button",onClick:()=>V(W=>Math.min(W+ng,de.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:v("fileTree.loadMoreSearchResults",{shown:re.length,total:de.length})}):Y?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Qe,{size:10,className:"animate-spin"}),v("fileTree.searchStillRunning")]}):re.length>0?l.jsx("span",{children:v("fileTree.showingSearchResults",{shown:re.length,total:K})}):null})]})]})}if(Pe){const K=pe?.total??se.length,re=se.slice(0,D),fe=D<se.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(rg,{count:K,loading:Y,engine:pe?.engine,limited:pe?.limited,scope:mt,content:!1}),Y&&se.length===0?l.jsx(Lm,{label:v("fileTree.searching"),className:"py-8"}):we?l.jsx("div",{className:"px-4 py-4 text-sm text-destructive",children:we}):se.length===0?l.jsx("div",{className:"mx-1 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:v("fileTree.noMatchingFiles")}):l.jsxs(l.Fragment,{children:[pe?.limited&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:v("fileTree.searchTruncatedHint",{count:pe.total})}),re.map(W=>l.jsx(bj,{node:W,rootPath:mt,onFileSelect:t,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,pinnedPaths:m,selectedFilePath:b,insertedReferenceKey:a,copiedReferenceKey:c,onFileDeleteRequest:xt,deletingFilePath:Re},W.path)),l.jsx("div",{ref:Ct,className:"py-2 text-center text-[11px] text-muted-foreground",children:fe?l.jsx("button",{type:"button",onClick:()=>V(W=>Math.min(W+eg,se.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:v("fileTree.loadMoreSearchResults",{shown:re.length,total:se.length})}):Y?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Qe,{size:10,className:"animate-spin"}),v("fileTree.searchStillRunning")]}):re.length>0?l.jsx("span",{children:v("fileTree.showingSearchResults",{shown:re.length,total:K})}):null})]})]})}return G?l.jsxs("div",{role:o?"alert":void 0,className:"px-4 py-4 text-sm text-destructive",children:[G,l.jsx("button",{type:"button",onClick:ne,className:"mt-2 block rounded-md bg-surface-2 px-3 py-2 text-foreground hover:bg-surface-elevated",children:v("common.retry")})]}):!C||C.length===0?l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:v("fileTree.emptyDir")}):!te||te.length===0?l.jsx("div",{className:"mx-3 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:v("fileTree.noMatchingFiles")}):l.jsxs("div",{className:"termdock-native-select w-max min-w-full space-y-px px-2 py-2",children:[ae&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:v("fileTree.truncatedHint")}),te.map(K=>l.jsx(wj,{node:K,gitIgnoreRoot:e,depth:0,onFileSelect:t,directoriesOnly:n,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,onOpenInFileBrowser:p,canOpenInFileBrowser:g,pinnedPaths:m,selectedFilePath:b,queryLower:Pe,insertedReferenceKey:a,copiedReferenceKey:c,onDirectoryDropFiles:A,onFileDeleteRequest:xt,deletingFilePath:Re,revealedDirectoryPath:E?.path},K.path))]})}const ga="min-h-11 rounded-lg border border-border bg-background px-2 text-sm",mo="min-h-11 rounded-lg px-3 text-sm hover:bg-surface-2 disabled:opacity-50";function Cj({value:e,onChange:t,expanded:n=!1}){const[r,o]=w.useState([]),[s,i]=w.useState([]),[a,c]=w.useState(!0),[d,u]=w.useState(""),[f,h]=w.useState(""),[p,g]=w.useState(!1),m=w.useRef(null);Li(m,p,()=>g(!1));const[b,y]=w.useState(()=>_e.getState().rootPath||"/"),[k,x]=w.useState(0),T=p0(r,e.android),_=T.filter(E=>E.access).length;w.useEffect(()=>{let E=!0;return c(!0),u(""),Promise.allSettled([f0(),fetch("/api/computer/preferences").then(async v=>{if(!v.ok)throw new Error;return v.json()})]).then(([v,S])=>{if(E){if(v.status==="fulfilled"&&o(v.value.devices),S.status==="fulfilled"){const I=fL(S.value.preferences);i([I.local,I.remote].filter((R,C,N)=>R.host&&N.findIndex(P=>P.host===R.host&&P.protocol===R.protocol&&P.port===R.port)===C))}(v.status==="rejected"||S.status==="rejected")&&u("部分设备暂时无法读取,可重试;目录分享仍可配置。"),c(!1)}}),()=>{E=!1}},[k]);const A=()=>{const E=f.trim().replace(/\/+$/,"")||(f.trim()==="/"?"/":"");if(!E||!E.startsWith("/")&&!/^[A-Za-z]:[\\/]/.test(E)){u("请填写完整目录路径。");return}e.directories?.some(v=>v.path===E)||t({...e,directories:[...e.directories??[],{path:E,access:"read"}]}),h(""),u("")};return p?Vn.createPortal(l.jsx("div",{className:"fixed inset-0 z-popover flex items-end justify-center bg-[var(--app-backdrop)] p-3 backdrop-blur-sm sm:items-center",onMouseDown:E=>{E.target===E.currentTarget&&g(!1)},children:l.jsxs("div",{ref:m,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"选择共享目录",className:"flex max-h-[min(80dvh,640px)] w-full max-w-lg flex-col overflow-hidden rounded-2xl border border-border bg-surface text-foreground shadow-xl outline-none",children:[l.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"选择共享目录"}),l.jsx("button",{type:"button",className:mo,onClick:()=>g(!1),children:"取消"})]}),l.jsx("p",{className:"shrink-0 break-all px-4 py-3 text-xs text-muted-foreground",children:b}),l.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:l.jsx(kj,{rootPath:b,directoriesOnly:!0,selectedFilePath:null,onFileSelect:()=>{},onDirectoryRoot:y})}),l.jsx("div",{className:"shrink-0 border-t border-border p-3 pb-[max(12px,env(safe-area-inset-bottom))]",children:l.jsx("button",{type:"button",className:`${mo} w-full bg-primary text-primary-foreground`,onClick:()=>{e.directories?.some(E=>E.path===b)||t({...e,directories:[...e.directories??[],{path:b,access:"read"}]}),g(!1)},children:"共享此目录及其子目录"})})]})}),document.body):l.jsxs("fieldset",{className:"space-y-2",children:[l.jsxs("legend",{className:"mb-2 text-sm font-medium",children:["附带侧栏功能 ",l.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"可选"})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(_c,{size:15,className:"mr-2 inline"}),"手机设备 ",l.jsx("span",{className:"text-muted-foreground",children:_?`已选 ${_} 台`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[T.map(({device:E,serials:v,access:S})=>{const I=!!S;return l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("label",{className:"flex min-h-11 min-w-0 flex-1 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:I,onChange:R=>t({...e,android:Bm(e.android,v,R.target.checked?"view":void 0)})}),l.jsxs("span",{className:"min-w-0 break-all",children:[E.model||E.serial,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[E.state==="device"?"已连接":"离线或尚未授权",v.length>1?` · ${v.length} 个连接地址`:""]})]})]}),I&&l.jsxs("select",{className:ga,"aria-label":`${E.model||E.serial}权限`,value:S,onChange:R=>t({...e,android:Bm(e.android,v,R.target.value)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},E.serial)}),!T.length&&l.jsx("p",{className:"py-2 text-xs text-muted-foreground",children:a?"正在查找设备…":"暂无手机设备,请先在手机侧栏连接设备。"})]})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(Nc,{size:15,className:"mr-2 inline"}),"电脑 ",l.jsx("span",{className:"text-muted-foreground",children:e.computers?.length?`已选 ${e.computers.length} 台`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[s.map(E=>{const v=E.protocol==="vnc"?5900:Number(E.port||3389),S=`${E.host}:${v}`,I=e.computers?.find(R=>R.host===E.host&&R.protocol===E.protocol&&R.port===v);return l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("label",{className:"flex min-h-11 min-w-0 flex-1 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:!!I,onChange:R=>t({...e,computers:R.target.checked?[...e.computers??[],{host:E.host,protocol:E.protocol,port:v,access:"view"}]:e.computers?.filter(C=>C!==I)})}),l.jsxs("span",{className:"break-all",children:[E.host==="127.0.0.1"?"服务所在电脑":E.host,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[E.protocol.toUpperCase()," · ",v]})]})]}),I&&l.jsxs("select",{className:ga,"aria-label":`${E.host}权限`,value:I.access,onChange:R=>t({...e,computers:e.computers?.map(C=>C===I?{...C,access:R.target.value}:C)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},S)}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"接收者需使用自己的系统登录凭据。仅查看会在服务端阻止键盘、鼠标和剪贴板输入。"})]})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(Pc,{size:15,className:"mr-2 inline"}),"文件目录 ",l.jsx("span",{className:"text-muted-foreground",children:e.directories?.length?`已选 ${e.directories.length} 个`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[e.directories?.map(E=>l.jsxs("div",{className:"rounded-lg bg-surface-2 p-2",children:[l.jsx("p",{className:"break-all text-xs",children:E.path}),l.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[l.jsxs("select",{className:ga,"aria-label":`${E.path}权限`,value:E.access,onChange:v=>t({...e,directories:e.directories?.map(S=>S.path===E.path?{...S,access:v.target.value}:S)}),children:[l.jsx("option",{value:"read",children:"仅查看与下载"}),l.jsx("option",{value:"write",children:"可修改、上传与删除"})]}),l.jsx("button",{type:"button",className:mo,"aria-label":`移除${E.path}`,onClick:()=>t({...e,directories:e.directories?.filter(v=>v.path!==E.path)}),children:l.jsx(wi,{size:16})})]})]},E.path)),l.jsx("label",{className:"block text-xs text-muted-foreground",htmlFor:"share-directory",children:"目录及其所有子目录"}),l.jsx("input",{id:"share-directory",className:`${ga} w-full`,placeholder:"例如 /home/user/project",value:f,onChange:E=>h(E.target.value),onKeyDown:E=>{E.key==="Enter"&&(E.preventDefault(),A())}}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:mo,onClick:()=>g(!0),children:"浏览目录"}),l.jsx("button",{type:"button",className:mo,disabled:!f.trim(),onClick:A,children:"添加目录"})]}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"仅开放所选目录及其子目录。跳转到目录外的符号链接不可访问。"})]})]}),d&&l.jsxs("div",{role:"status",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:d}),l.jsx("button",{type:"button",className:mo,"aria-label":"重新读取设备",onClick:()=>x(E=>E+1),children:l.jsx(tf,{size:14})})]})]})}function Ql({resources:e}){const[t,n]=w.useState([]),r=!!e?.android?.length;if(w.useEffect(()=>{if(!r)return;let s=!0;return f0().then(i=>{s&&n(i.devices)}).catch(()=>{}),()=>{s=!1}},[r]),!e)return null;const o=p0(t,e.android).filter(s=>s.access);return l.jsxs("ul",{className:"space-y-1 text-xs leading-5 text-muted-foreground",children:[o.map(({device:s,serials:i,access:a})=>l.jsxs("li",{title:i.join(`
|
|
8
|
+
`),children:["手机 · ",s.model||s.serial," · ",a==="control"?"可操作":"仅查看"]},`a${s.serial}`)),e.computers?.map((s,i)=>l.jsxs("li",{children:["电脑 · ",s.host,":",s.port," · ",s.access==="control"?"可操作":"仅查看"]},`c${i}`)),e.directories?.map((s,i)=>l.jsxs("li",{className:"break-all",children:["文件 · ",s.path," · ",s.access==="write"?"可修改":"仅查看"]},`f${i}`))]})}const Du=["message","sparkles","bot","code","file","briefcase","lightbulb","rocket"],ed=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function gh(e){return typeof e=="string"&&e.length<=32&&(Du.includes(e)||new RegExp("^(?:\\p{Regional_Indicator}{2}|[#*0-9]\\uFE0F?\\u20E3|\\p{Extended_Pictographic}[\\uFE0F\\p{Emoji_Modifier}]*(?:\\u200D\\p{Extended_Pictographic}[\\uFE0F\\p{Emoji_Modifier}]*)*)$","u").test(e))}function Tj(e,t){if(!ed(t)||t.kind!=="sessions"||!Array.isArray(t.sessionIds))return!1;const n=t.sessionIds;return ed(e)&&Object.keys(e).length<=256&&Object.entries(e).every(([r,o])=>n.includes(r)&&ed(o)&&Object.keys(o).length>0&&Object.keys(o).every(s=>["name","icon"].includes(s))&&(o.name===void 0||typeof o.name=="string"&&o.name.trim().length>0&&o.name.length<=80&&!/[\x00-\x1f\x7f\u202a-\u202e\u2066-\u2069]/.test(o.name))&&(o.icon===void 0||gh(o.icon)))}const Aj={message:gi,sparkles:Dw,bot:Ty,code:zy,file:Zy,briefcase:Ny,lightbulb:iw,rocket:Rw},og={message:"对话",sparkles:"灵感",bot:"智能体",code:"代码",file:"文档",briefcase:"工作",lightbulb:"想法",rocket:"项目"};function fi({icon:e,size:t=20}){const n=Aj[e];return n?l.jsx(n,{size:t,"aria-hidden":"true"}):e&&gh(e)?l.jsx("span",{"aria-hidden":"true",className:"leading-none",style:{fontSize:t},children:e}):l.jsx(gi,{size:t,"aria-hidden":"true"})}function Rj({sessions:e,value:t,onChange:n}){const[r,o]=w.useState();return l.jsxs("div",{className:"space-y-3",children:[e.map(s=>{const i=t[s.sessionId]||{},a=i.icon||"message",c=d=>n({...t,[s.sessionId]:d});return l.jsxs("div",{className:"rounded-xl border border-border bg-background/40 p-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{type:"button","aria-label":`更改${s.name}的分享图标`,"aria-expanded":r===s.sessionId,className:"flex h-12 w-12 shrink-0 items-center justify-center gap-0.5 rounded-xl bg-surface-2 text-primary hover:bg-surface-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>o(d=>d===s.sessionId?void 0:s.sessionId),children:[l.jsx(fi,{icon:a,size:23}),l.jsx(Or,{size:11})]}),l.jsxs("label",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"mb-1 block text-xs text-muted-foreground",children:"分享显示名称"}),l.jsx("input",{"aria-label":e.length===1?"分享显示名称":`${s.name}的分享显示名称`,maxLength:80,className:"min-h-9 w-full min-w-0 border-b border-transparent bg-transparent text-base font-medium outline-none placeholder:text-muted-foreground focus:border-primary",placeholder:s.name,value:i.name??s.name,onChange:d=>c({...i,name:d.target.value})})]}),(i.name!==void 0||i.icon!==void 0)&&l.jsx("button",{type:"button","aria-label":`重置${s.name}的分享外观`,title:"恢复会话默认名称与图标",className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2",onClick:()=>n(Object.fromEntries(Object.entries(t).filter(([d])=>d!==s.sessionId))),children:l.jsx(Nw,{size:14})})]}),r===s.sessionId&&l.jsxs("fieldset",{className:"mt-3 space-y-3 border-t border-border pt-3",children:[l.jsx("legend",{className:"sr-only",children:"分享图标"}),l.jsx("div",{className:"grid grid-cols-8 gap-1",children:Du.map(d=>l.jsx("button",{type:"button",title:og[d],"aria-label":`使用${og[d]}图标`,"aria-pressed":a===d,className:`flex min-h-11 items-center justify-center rounded-lg border ${a===d?"border-primary bg-primary/10 text-primary":"border-transparent text-muted-foreground hover:bg-surface-2"}`,onClick:()=>{c({...i,icon:d}),o(void 0)},children:l.jsx(fi,{icon:d,size:20})},d))}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{children:"自定义 Emoji"}),l.jsx("input",{"aria-label":`${s.name}的自定义Emoji`,className:"min-h-11 w-24 rounded-lg border border-border bg-background px-3 text-center text-xl text-foreground outline-none focus:ring-2 focus:ring-ring",placeholder:"例如 🚀",maxLength:32,value:Du.includes(a)?"":a,onChange:d=>c({...i,icon:d.target.value||void 0})})]}),i.icon&&!gh(i.icon)&&l.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"请输入一个 Emoji,或选择上方图标。"})]})]},s.sessionId)}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"接收者看到的会话名称与图标,可单独设置。"})]})}function Pj(e,t){const n=e.url||t?.serviceOrigin||(t?.entryServiceId?void 0:t?.url);if(n)try{const r=new URL(n);if(["https:","http:"].includes(r.protocol)&&!r.username&&!r.password&&!r.search&&!r.hash)return r.origin}catch{}}function Nj({target:e,saved:t,entry:n,access:r,busy:o,choose:s}){const i=t?.label||ob(e),a=Pj(e,t),c=e.available?r?.error:xr(e),d=!e.authorized||!e.available?"未核验":r?.status==="authorized"?"已授权":r?.status==="passwordRequired"?"待登录":r?.error?"未确认":"核验中",u=!e.available||r?.blocked?"暂不可连接":e.authorized?r?.status==="passwordRequired"?"登录目标服务":r?.status==="authorized"?"连接":r?.error?"重试连接":"正在核验…":"授权并连接",f=e.platform&&{darwin:"macOS",linux:"Linux",win32:"Windows",freebsd:"FreeBSD",openbsd:"OpenBSD",aix:"AIX",sunos:"SunOS",android:"Android"}[e.platform];return l.jsxs("article",{className:"service-relay-item","aria-label":i,children:[l.jsxs("button",{type:"button",className:"service-row-open service-full-width service-relay-open",disabled:o||!e.available||r?.blocked||e.authorized&&!r,onClick:s,children:[l.jsx("span",{className:"service-icon",children:l.jsx(yi,{size:19})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsxs("span",{className:"service-relay-heading",children:[l.jsx("span",{className:"service-name",children:i}),l.jsx("span",{className:"service-relay-status",children:e.available?"中转可用":"中转不可用"})]}),l.jsx("span",{className:"service-relay-copy",children:a||"仅中转连接 · 未提供直连地址"}),l.jsxs("span",{className:"service-relay-copy",children:["中转:",e.authorized?"已授权":"待授权"," · 目标访问:",d]}),c&&l.jsx("span",{className:"service-relay-failure",children:c}),l.jsxs("span",{className:"service-relay-action",children:[u,l.jsx(Un,{size:14})]})]})]}),l.jsxs("details",{className:"service-relay-details",children:[l.jsx("summary",{"aria-label":`${i}的服务详情`,children:"服务详情"}),l.jsxs("dl",{children:[l.jsx("dt",{children:"连接路径"}),l.jsxs("dd",{children:["此设备 → ",n.label," → ",i]}),l.jsx("dt",{children:"入口地址"}),l.jsx("dd",{children:n.serviceOrigin||n.url}),l.jsx("dt",{children:"目标地址"}),l.jsx("dd",{children:a||"目标未提供直连地址,通过入口中转连接"}),l.jsx("dt",{children:"机器名称"}),l.jsx("dd",{children:e.hostname||"目标服务尚未提供"}),l.jsx("dt",{children:"系统 / 版本"}),l.jsx("dd",{children:[f,e.version&&`Termdock ${e.version}`].filter(Boolean).join(" · ")||"目标服务尚未提供"}),l.jsx("dt",{children:"服务标识"}),l.jsx("dd",{children:l.jsx("code",{children:e.serviceId})}),e.error&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{children:"诊断代码"}),l.jsx("dd",{children:l.jsx("code",{children:e.error})})]})]})]})]})}function sg(e){const t=e&&typeof e=="object"&&"code"in e?e.code:void 0;return t==="TARGET_PASSWORD_REQUIRED"||t==="TARGET_SECURITY_UPGRADE_REQUIRED"||t==="TARGET_IDENTITY_MISMATCH"?{error:xr({error:t}),blocked:!0}:{error:Wn(e).message}}function _j({service:e,onBusyChange:t,onConnect:n,onConnectWithPassword:r}){const[o,s]=w.useState(),[i,a]=w.useState(!0),[c,d]=w.useState(!1),[u,f]=w.useState(""),[h,p]=w.useState(0),[g,m]=w.useState(),[b,y]=w.useState(""),[k,x]=w.useState({}),[T,_]=w.useState([]);w.useEffect(()=>{let v=!1,S=0;const I=async()=>{const C=++S;try{const N=await gt();!v&&C===S&&_(N)}catch{}};I();const R=vi(()=>{I()});return()=>{v=!0,R()}},[]),w.useEffect(()=>{let v=!1,S=!1,I;const R=new AbortController,C=new Map;a(!0),f(""),s(void 0),x({}),m(void 0),y("");const N=async P=>{try{const j=await H2(e);if(v)return;S=!0,s(j),f(""),a(!1);const O=j.items.filter(F=>F.available&&F.authorized);let M=0;await Promise.all(Array.from({length:Math.min(3,O.length)},async()=>{for(;!v&&M<O.length;){const F=O[M++],B=C.get(F.serviceId);if(B&&Date.now()-B.at<1e4)continue;let U;try{const q=await hu({url:j.route.url,entryServiceId:j.route.targetPeerId,targetPeerId:F.serviceId,routes:[j.route]},R.signal);U=q==="invitationRequired"?{error:xr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}:{status:q}}catch(q){U=sg(q)}if(v)return;C.set(F.serviceId,{at:Date.now(),value:U}),x(q=>({...q,[F.serviceId]:U}))}}))}catch(j){!v&&(!S||P)&&f(j instanceof Error?j.message:"暂时无法读取中转列表,请重试。")}finally{v||(a(!1),I=setTimeout(()=>{N(!1)},2e3))}};return N(!0),()=>{v=!0,R.abort(),clearTimeout(I)}},[e.id,e.url,h]),w.useEffect(()=>{const v=g&&o?.items.find(S=>S.serviceId===g.targetPeerId);g&&o&&(!v||!v.available)&&(m(void 0),y(""),f(v?xr(v):"该服务已不可见,请刷新列表或联系入口管理员。"))},[o,g]);const A=async v=>{if(!c){d(!0),t(!0),f("");try{await v()}catch(S){f(S instanceof Error?S.message:"暂时无法连接,请重试。")}finally{d(!1),t(!1)}}},E=async v=>{const S=await $2(o.route,v.serviceId);try{const I=await hu({...S,url:o.route.url,serviceOrigin:void 0,entryServiceId:o.route.targetPeerId,routes:[o.route]});if(I==="invitationRequired"){x(R=>({...R,[v.serviceId]:{error:xr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}}));return}if(I==="passwordRequired"){m(S);return}await n(S)}catch(I){if(!(I instanceof Ot)){const R=sg(I);throw x(C=>({...C,[v.serviceId]:R})),new Error(R.error)}m(S)}};return l.jsxs("div",{className:"service-form",children:[g?l.jsxs("form",{className:"service-form",onSubmit:v=>{v.preventDefault(),A(async()=>{try{await r?.(g,b)}catch(S){const I=Wn(S).code;throw(I==="PASSWORD_NOT_CONFIGURED"||I==="TARGET_PASSWORD_REQUIRED"||I==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(x(R=>({...R,[g.targetPeerId]:{error:xr({error:I==="TARGET_SECURITY_UPGRADE_REQUIRED"?I:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}})),m(void 0)),S}finally{y("")}})},children:[l.jsxs("p",{className:"service-help",children:["已通过“",e.label,"”连接到“",g.serviceName,"”。请登录目标服务,完成此设备的访问授权。"]}),r?l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"目标服务密码"}),l.jsx("input",{type:"password",autoFocus:!0,required:!0,autoComplete:"current-password",value:b,disabled:c,onChange:v=>y(v.target.value)})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:c||!b,children:c?"正在登录…":"登录并连接"})]}):l.jsx("p",{className:"service-help",children:"请让目标服务管理员邀请此设备后再连接。"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:c,onClick:()=>{m(void 0),y(""),f(""),p(v=>v+1)},children:"返回中转列表"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"service-help",children:["通过“",e.label,"”连接其他电脑。",o?.canManage?"首次连接会授权此设备使用中转;目标服务仍需单独登录。":"仅显示此设备可用的中转;目标服务仍需单独登录。"]}),i?l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在读取可中转的服务…"]}):o&&l.jsxs("div",{className:"service-list",children:[o.items.map(v=>l.jsx(Nj,{target:v,saved:T.find(S=>S.targetPeerId===v.serviceId),entry:e,access:k[v.serviceId],busy:c,choose:()=>{A(()=>E(v))}},v.serviceId)),o.items.length===0&&l.jsx("p",{className:"service-empty",children:o.canManage?"暂无可中转的服务。可在本机 Mac 客户端连接目标服务,或在目标服务的“备用连接”中启用本入口。":"暂无已授权的中转服务,请让入口管理员分享备用连接邀请。"})]}),c&&l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在授权并连接目标服务…"]}),!i&&l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:c,onClick:()=>p(v=>v+1),children:"刷新列表"})]}),u&&l.jsx("p",{className:"service-error",role:"alert",children:u})]})}function K0({service:e,onBusyChange:t,recoverEntry:n,onRecovered:r,onCancelRecovery:o}){const s={...e,targetPeerId:e.targetPeerId,serviceName:e.label},[i,a]=w.useState(()=>e.routes??nn(s)),[c,d]=w.useState([]),[u,f]=w.useState(!0),[h,p]=w.useState(!1),[g,m]=w.useState(""),b=$=>{p($),t($)},[y,k]=w.useState(),[x,T]=w.useState(""),[_,A]=w.useState(""),[E,v]=w.useState(""),[S,I]=w.useState(!1),[R,C]=w.useState(),N=async()=>{const $=await Kl(n,s.targetPeerId),Y={canManage:$.canManage,active:$.grants.some(J=>J.active)};return C(Y),Y};w.useEffect(()=>{if(!n)return;let $=!1;return Kl(n,s.targetPeerId).then(Y=>{$||C({canManage:Y.canManage,active:Y.grants.some(J=>J.active)})}).catch(()=>{$||m("无法核对入口授权,请检查连接或联系入口管理员。")}),()=>{$=!0}},[n?.targetPeerId,n?.url,s.targetPeerId]);const[P,j]=w.useState(),[O,M]=w.useState(),[F,B]=w.useState(!1);w.useEffect(()=>{let $=!1;return gt().then(Y=>{$||d(Y.filter(J=>J.targetPeerId&&J.targetPeerId!==e.targetPeerId))}).catch(()=>{$||m("暂时无法读取可用服务。")}).finally(()=>{$||f(!1)}),()=>{$=!0}},[e.targetPeerId]);const U=$=>c.find(Y=>Y.targetPeerId===$.targetPeerId)?.label||new URL($.url).host,q=async $=>{b(!0),m(""),v("");try{await $()}catch(Y){const J=Y instanceof Error?Y.message:"";m(/AUTHORIZATION|DENIED/.test(J)?"当前设备没有入口管理权限。请让管理员分享备用连接邀请,或使用入口密码授权。":"暂时无法完成。请确认入口能连接目标服务,且目标地址、证书和授权有效。")}finally{b(!1)}},z=async($,Y)=>{const J={url:$.serviceOrigin||$.url,targetPeerId:$.targetPeerId};await q(async()=>{const we=await Kl(J,s.targetPeerId);if(!we.grants.some(le=>le.active)){if(!we.canManage&&Y===void 0){k($);return}await km(s,J,Y)}const ge=[...i.filter(le=>le.targetPeerId!==J.targetPeerId||le.url!==J.url),J];await Ca(e,ge),a(ge),k(void 0),T("")})};if(n)return l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["仅恢复此设备通过“",U(n),"”连接“",e.label,"”的中转权限。目标服务会单独验证访问权限。"]}),!R&&!g&&l.jsx("p",{role:"status",children:"正在核对入口授权…"}),R&&!R.active&&!R.canManage&&l.jsxs("p",{role:"status",className:"service-help",children:["当前设备没有此入口的授权管理权限。请让入口管理员授予此设备到“",e.label,"”的中转权限或分享对应的备用连接邀请。"]}),R&&(R.active||R.canManage)&&l.jsx("button",{className:"service-button service-primary",disabled:h,onClick:()=>{q(async()=>{const $=await N();if(!$.active){if(!$.canManage)throw new Error("AUTHORIZATION_DENIED");await km(s,n)}if(!(await N()).active)throw new Error("AUTHORIZATION_DENIED");await r?.()})},children:h?"正在核对并连接…":R.active?"核对授权并重新连接":"授权此设备并重新连接"}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g}),l.jsx("button",{className:"service-button service-secondary",disabled:h,onClick:o,children:"取消"})]});if(O)return l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["把链接发给需要使用此备用连接的人。它只允许通过入口连接“",e.label,"”,对方仍需获得目标服务的访问权限。"]}),l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"备用连接邀请"}),l.jsx("input",{readOnly:!0,value:O,onFocus:$=>$.target.select()})]}),l.jsxs("button",{type:"button",className:"service-button service-primary",onClick:()=>{dh(O).then($=>{B($),$||m("无法自动复制,请长按链接复制。")})},children:[l.jsx(mi,{size:16}),F?"已复制":"复制邀请链接"]}),l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:()=>{M(void 0),B(!1)},children:"返回备用连接"}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g})]});if(y)return l.jsxs("form",{className:"service-form",onSubmit:$=>{$.preventDefault(),z(y,x).finally(()=>T(""))},children:[l.jsxs("p",{className:"service-help",children:["需要“",y.label,"”的管理员授权。若这是你的服务,可以使用它的密码;否则请管理员分享备用连接邀请。"]}),l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"入口服务密码"}),l.jsx("input",{type:"password",required:!0,value:x,onChange:$=>T($.target.value),autoComplete:"current-password",disabled:h,autoFocus:!0})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:h||!x,children:h?"正在授权…":"授权并启用"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>{k(void 0),T("")},children:"取消"}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g})]});const ee=i.filter($=>$.targetPeerId===s.targetPeerId),ie=i.filter($=>$.targetPeerId!==s.targetPeerId),Z=c.flatMap($=>Mt({...$,targetPeerId:$.targetPeerId}).map(Y=>({...$,id:JSON.stringify([$.id,Y]),url:Y,serviceOrigin:Y}))),ae=async()=>{if(!h){b(!0),I(!0),m(""),v("");try{a(await q2({...e,routes:i},_)),A(""),v("备用地址已验证并保存。")}catch($){m($ instanceof Error?$.message:"暂时无法添加地址,请重试。")}finally{b(!1),I(!1)}}};return l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"电脑换了网络?添加它在新网络下的地址,原地址连不上时会自动尝试。只接受同一台服务。"}),l.jsxs("form",{className:"service-form",onSubmit:$=>{$.preventDefault(),ae()},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"备用地址"}),l.jsx("input",{value:_,onChange:$=>{A($.target.value),m(""),v("")},required:!0,disabled:h||i.length>=4,inputMode:"url",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:"例如:192.168.10.20:9834"})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:h||i.length>=4||!_.trim(),children:S?l.jsxs(l.Fragment,{children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在验证…"]}):"验证并添加"})]}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g}),E&&l.jsx("p",{role:"status",className:"service-help",children:E}),i.length>=4&&l.jsx("p",{className:"service-help",children:"已保存 4 个备用连接。移除不再使用的地址或入口后,可以继续添加。"}),l.jsxs("div",{children:[l.jsx("p",{className:"service-help",children:"首选地址"}),l.jsx("p",{className:"service-address",children:e.serviceOrigin||e.url})]}),ee.length>0&&l.jsx("div",{className:"service-list",children:ee.map($=>l.jsxs("div",{className:"service-route-item",children:[l.jsxs("div",{className:"service-route-line",children:[l.jsx("span",{className:"service-address service-route-address",children:$.url}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`移除地址 ${$.url}`,disabled:h,onClick:()=>j($),children:"移除"})]}),P?.targetPeerId===$.targetPeerId&&P.url===$.url&&l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"从备用连接中移除此地址?不会停止正在运行的终端。"}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>j(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{q(async()=>{const Y=i.filter(J=>J.targetPeerId!==$.targetPeerId||J.url!==$.url);await Ca(e,Y),a(Y),j(void 0)})},children:"确认移除"})]})]})]},$.url))}),l.jsxs("details",{className:"service-relay-options",children:[l.jsxs("summary",{children:["通过其他服务中转",ie.length?`(${ie.length})`:""]}),l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"所有直连地址都不可用时,尝试下方已授权入口;直连恢复后自动切回。"}),ie.length>0&&l.jsx("div",{className:"service-list",children:ie.map($=>l.jsxs("div",{className:"service-route-item",children:[l.jsxs("div",{className:"service-route-line",children:[l.jsx("span",{className:"service-icon",children:l.jsx(yi,{size:18})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:U($)}),l.jsx("span",{className:"service-description",children:$.url})]}),l.jsx(Mn,{size:16,className:"service-selected"})]}),P?.targetPeerId===$.targetPeerId&&P.url===$.url?l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["撤销此设备经“",U($),"”所有地址连接目标的权限?如当前无法直连,目标服务将断开。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>j(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{q(async()=>{await z2(s.targetPeerId,$);const Y=i.filter(J=>J.targetPeerId!==$.targetPeerId);await Ca(e,Y),a(Y),j(void 0)})},children:"确认撤销"})]})]}):l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>{q(async()=>{const Y=await Ax(s,$);M(nh({v:1,routeOnly:!0,serviceId:s.targetPeerId,name:e.label,serviceUrl:e.serviceOrigin||e.url,entryUrl:$.url,entryServiceId:$.targetPeerId,routeCode:Y.routeCode}))})},children:"分享备用连接"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>j($),children:"撤销授权"})]})]},JSON.stringify([$.targetPeerId,$.url])))}),u?l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{children:[l.jsx("p",{className:"service-help",children:"添加中转入口"}),Z.filter($=>!i.some(Y=>Y.targetPeerId===$.targetPeerId&&Y.url===$.url)).map($=>l.jsxs("button",{type:"button",className:"service-row-open service-full-width",disabled:h||i.length>=4,onClick:()=>{z($)},children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:$.label}),l.jsx("span",{className:"service-description",children:$.url})]}),l.jsx(Un,{size:16})]},$.id)),c.length===0&&l.jsx("p",{className:"service-empty",children:"添加并登录另一台服务后,可以将它设为中转入口。"})]})]})]}),h&&!S&&l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在验证连接与授权…"]})]})}function ig(e){if(e instanceof Error){if(e.name==="TimeoutError"||/^(The operation timed out\.?|The operation was aborted due to timeout\.?|signal timed out|Secure handshake timed out|Secure connection timed out)$/i.test(e.message))return"连接超时。请确认分享电脑已唤醒、Termdock 正在运行,且当前设备能访问这个地址。";if(["Secure transport unavailable","Failed to fetch","Load failed","NetworkError when attempting to fetch resource."].includes(e.message))return"未能建立安全连接。请先检查服务地址和网络;如果浏览器提示证书错误,再完成证书信任设置。"}}function Lj({current:e,renderRoutes:t,renderRelayServices:n,onOpen:r,onAdd:o,onInvite:s,hideHeader:i,onNavigation:a,onBusyChange:c,initiallyAdding:d=!1,initialInput:u,autoConnect:f=!1,initialServicePage:h,certificateTrust:p}){const{t:g}=jt(),m=D=>{try{D.includes("#termdock-invite=")?un(D):ze(D)}catch{throw new Error(g(D.includes("#termdock-invite=")?"login.invalidInvitation":"login.invalidAddress"))}},b=D=>{try{return m(D),!0}catch(V){return R(V.message),!1}},[y,k]=w.useState([]),[x,T]=w.useState(!0),[_,A]=w.useState(h||(d?{kind:"add",input:u}:{kind:"list"})),[E,v]=w.useState(!1),S=w.useCallback(D=>{v(D),c?.(D)},[c]),[I,R]=w.useState(""),[C,N]=w.useState(),[P,j]=w.useState(),[O,M]=w.useState({}),F=w.useRef(0),B=w.useRef(),U=w.useRef(!0),q=w.useRef(!1),z=D=>U.current&&F.current===D,ee=D=>{(!D||B.current===D)&&(B.current=void 0)},ie=()=>{const D=B.current;D&&p?.discard(D).catch(()=>{}).finally(()=>ee(D))},Z=()=>{F.current++,ie(),j(void 0)},ae=w.useRef(Z);ae.current=Z;const $=w.useCallback(()=>{ae.current(),A(D=>D.kind==="routes"||D.kind==="relay-services"?{kind:"edit",service:D.service}:{kind:"list"}),R(""),N(void 0)},[]),Y=_.kind==="add"?"添加服务":_.kind==="edit"?"服务设置":_.kind==="routes"?"备用连接":_.kind==="relay-services"?"可中转的服务":void 0;w.useEffect(()=>{a?.({title:Y,...Y?{back:$}:{}})},[Y,$,a]),w.useEffect(()=>{let D=!1,V=0;const de=async()=>{const Re=++V;try{const Ge=await gt();!D&&V===Re&&(k(Ge),R(""))}catch{!D&&V===Re&&R("暂时无法读取服务列表,请重试。")}finally{!D&&V===Re&&T(!1)}};de();const De=vi(()=>{de()});return()=>{D=!0,De()}},[]),w.useEffect(()=>(U.current=!0,()=>{U.current=!1,F.current++,ie()}),[]),w.useEffect(()=>{Z()},[e?.id,e?.url,e?.targetPeerId]),w.useEffect(()=>{const D=F.current;p&&p.listPins().then(V=>{z(D)&&M(V)}).catch(()=>{})},[p]);const J=async(D,V,de=D)=>{Z();const De=F.current,Re={certificateReviewRequired:!0};try{const Ge=await V();return z(De)?Ge:Re}catch(Ge){if(!z(De))return Re;if(!p||!["PREVIEW_DISCOVERY_FAILED","PREVIEW_CERTIFICATE_REJECTED"].includes(Ge?.code||""))throw Ge;try{const Se=await p.inspect(D);if(Se.origin!==D||!/^[a-f0-9]{64}$/i.test(Se.fingerprint)||!Se.receipt)throw new Error("Invalid certificate inspection result");z(De)?(B.current=Se.receipt,j({origin:D,fingerprint:Se.fingerprint,trustedFingerprint:Se.trustedFingerprint,receipt:Se.receipt,retry:V,retryInput:de,changed:!!Se.trustedFingerprint&&Se.trustedFingerprint.toLowerCase()!==Se.fingerprint.toLowerCase(),confirmed:!1,generation:De})):p.discard(Se.receipt).catch(()=>{})}catch{z(De)&&R("无法读取此地址的 HTTPS 证书。请检查地址和网络后重试。")}return{certificateReviewRequired:!0}}},we=async()=>{const D=P;!D||!D.confirmed||!p||await ge(async()=>{try{if(!z(D.generation)||(await p.trust(D.origin,D.fingerprint,D.receipt),ee(D.receipt),!z(D.generation)))return;const V=await p.listPins();if(!z(D.generation)||(M(V),j(void 0),!z(D.generation)))return;const de=await D.retry();if(!z(D.generation))return;de?.passwordRequired?A({kind:"add",input:D.retryInput,passwordRequired:!0}):A({kind:"list"})}catch(V){if(ee(D.receipt),V?.code==="PREVIEW_CERTIFICATE_CHANGED"&&z(D.generation)){j(void 0);try{const de=await p.inspect(D.origin);if(de.origin!==D.origin||!/^[a-f0-9]{64}$/i.test(de.fingerprint)||!de.receipt)throw new Error("Invalid certificate inspection result");z(D.generation)?(B.current=de.receipt,j({...D,fingerprint:de.fingerprint,trustedFingerprint:de.trustedFingerprint,receipt:de.receipt,changed:!0,confirmed:!1})):p.discard(de.receipt).catch(()=>{}),z(D.generation)&&R("证书在确认期间发生变化。请重新核对新指纹后再决定是否信任。")}catch{z(D.generation)&&R("证书在确认期间发生变化,且无法重新读取。请稍后重试。")}return}if(z(D.generation))throw j(void 0),V}})},ge=async D=>{if(q.current||!U.current)return;q.current=!0,S(!0),R("");let V=F.current;try{const de=D();V=F.current,await de}catch(de){z(V)&&R(ig(de)||(de instanceof Error?de.message:"暂时无法完成,请重试。"))}finally{q.current=!1,U.current&&S(!1)}},le=async(D,V)=>{let de;return await ge(async()=>{N(void 0);const De=D.includes("#termdock-invite=")?un(D):void 0,Re=De?.url||ze(D);try{de=await J(Re,()=>o(D,V),D)}catch(Ge){const Se=ig(Ge),rt=De?px(Ge):void 0;if(Se||rt?.kind==="connection"){const We=De?new URL(D):void 0;We&&(We.hash="",We.search=""),N({origin:Re,...We?.protocol==="http:"&&We.pathname==="/connect"?{setupUrl:We.href}:{}})}throw rt?new Error(Se||`${rt.title}。${rt.description}`):Ge}de?.passwordRequired?A({kind:"add",input:D,passwordRequired:!0}):de?.certificateReviewRequired||$()}),de},ce=w.useRef(!1);w.useEffect(()=>{!f||!u||ce.current||(ce.current=!0,le(u))},[f,u]);const be=_.kind==="edit"||_.kind==="routes"||_.kind==="relay-services"?y.find(D=>ln(D,_.service))||_.service:void 0,se=e?y.find(D=>ln(D,e))||e:void 0,ye=y.filter(D=>!e||!ln(D,e)),pe=se?[se,...ye]:ye,je=l.jsxs(l.Fragment,{children:[x?l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{className:"service-list",children:[pe.map(D=>{const V=!!e&&ln(D,e);return l.jsxs("div",{className:"service-row",children:[l.jsxs("button",{type:"button",className:"service-row-open",disabled:E||V,onClick:()=>{ge(async()=>{(await J(D.url,()=>r(D)))?.passwordRequired&&A({kind:"add",input:D.serviceOrigin||D.url,passwordRequired:!0})})},"aria-label":V?`当前服务 ${D.label}`:`打开 ${D.label}`,children:[l.jsx("span",{className:"service-icon",children:l.jsx(yi,{size:20})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:D.label}),l.jsx("span",{className:"service-description",children:V?"当前服务":new URL(D.serviceOrigin||D.url).host})]}),V?l.jsx(Mn,{size:17,className:"service-selected"}):l.jsx(Un,{size:16,className:"service-muted"})]}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`管理 ${D.label}`,disabled:E,onClick:()=>{Z(),A({kind:"edit",service:D}),R("")},children:l.jsx(Mr,{size:19})})]},D.id)}),pe.length===0&&l.jsx("p",{className:"service-empty",children:"还没有添加服务。连接你的电脑,或粘贴收到的邀请链接。"})]}),l.jsxs("div",{className:`service-actions${s?" service-actions-pair":""}`,children:[l.jsxs("button",{type:"button",className:"service-button service-secondary",disabled:E,onClick:()=>{Z(),A({kind:"add"}),R("")},children:[l.jsx(ef,{size:16}),"添加服务"]}),s&&l.jsxs("button",{type:"button",className:"service-button service-secondary",disabled:E,onClick:s,children:[l.jsx(_c,{size:16}),"邀请设备"]})]})]});return l.jsxs("div",{className:"service-manager",children:[!i&&l.jsxs("div",{className:"service-heading",children:[Y&&l.jsx("button",{type:"button",className:"service-icon-button","aria-label":"返回服务",disabled:E,onClick:$,children:l.jsx(Ju,{size:20})}),l.jsx("h2",{children:Y||"服务"})]}),l.jsx("div",{hidden:!!P,children:_.kind==="relay-services"?n?.(be,S):_.kind==="routes"?t?.(be,S):_.kind==="list"?je:_.kind==="add"?l.jsx(jj,{onValidate:b,onSave:D=>ge(async()=>{Z();const V=ze(D);k(await $n({id:V,url:V,label:new URL(V).host})),$()}),onTargetChange:()=>{Z(),N(void 0),R("")},initialInput:_.input,passwordRequired:_.passwordRequired,busy:E,onSubmit:le}):l.jsx(Dj,{onRelayServices:n&&_.service.targetPeerId?()=>A({kind:"relay-services",service:_.service}):void 0,onRoutes:t&&_.service.targetPeerId?()=>A({kind:"routes",service:_.service}):void 0,service:be,busy:E,canRemove:!e||!ln(_.service,e),onSave:D=>{ge(async()=>{k(await $n({...be,label:D})),$()})},onRemove:()=>{ge(async()=>{k(await TE(_.service.id)),$()})}})}),P&&l.jsxs("section",{className:"service-certificate-review","aria-label":"HTTPS 证书确认",children:[l.jsx("h3",{children:"检查 HTTPS 证书"}),l.jsx("p",{children:P.origin}),P.changed&&l.jsx("p",{role:"alert",children:"当前证书与已保存的信任指纹不同。请通过独立可信渠道重新核对,再决定是否更新信任。"}),l.jsx("p",{children:"请通过独立可信渠道向服务管理员核对以下 SHA-256 指纹。仅查看指纹不会信任证书。"}),l.jsx("code",{children:P.fingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()}),P.trustedFingerprint&&l.jsxs("p",{children:["已保存的指纹:",l.jsx("code",{children:P.trustedFingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:P.confirmed,disabled:E,onChange:D=>j(V=>V&&{...V,confirmed:D.target.checked})}),"我已通过独立可信渠道核对该指纹,并明确同意仅对此精确 HTTPS 地址信任。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:Z,children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-primary",disabled:E||!P.confirmed,onClick:()=>{we()},children:"信任此指纹并重试一次"})]})]}),!P&&p&&Object.keys(O).length>0&&l.jsxs("details",{className:"service-certificate-pins",children:[l.jsxs("summary",{children:["已信任的 HTTPS 证书(",Object.keys(O).length,")"]}),Object.entries(O).map(([D,V])=>l.jsxs("div",{children:[l.jsxs("p",{children:[D,l.jsx("br",{}),l.jsx("code",{children:V.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:E,onClick:()=>{ge(async()=>{const de=F.current;if(await p.revoke(D),!z(de))return;const De=await p.listPins();z(de)&&M(De)})},children:"撤销信任"})]},D))]}),I&&l.jsx("p",{className:"service-error",role:"alert",children:I}),I&&C&&l.jsxs("section",{className:"service-connection-help","aria-label":"连接帮助",children:[l.jsxs("p",{className:"service-address",children:["连接地址:",C.origin]}),l.jsx("p",{className:"service-help",children:"局域网地址通常需要在同一网络内访问。请先确认分享电脑上的服务可以打开。"}),C.setupUrl&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"service-help",children:"若浏览器提示证书错误,可先打开引导完成信任设置,再回到这里点“继续”。打开引导不会接受邀请。"}),l.jsx("a",{className:"service-button service-secondary",href:C.setupUrl,target:"_blank",rel:"noopener noreferrer",children:"打开证书连接引导"})]})]})]})}function jj({onValidate:e,busy:t,onSubmit:n,onSave:r,onTargetChange:o,initialInput:s="",passwordRequired:i=!1}){const a=w.useRef(null),c=()=>e(d.trim())?!0:(a.current?.focus(),!1),[d,u]=w.useState(s),[f,h]=w.useState(""),[p,g]=w.useState(i);return w.useEffect(()=>{g(i)},[i]),l.jsxs("form",{className:"service-form",onSubmit:async m=>{if(m.preventDefault(),t||!c())return;(await n(d.trim(),p?f:void 0))?.passwordRequired&&g(!0),h("")},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务地址或邀请链接"}),l.jsx("input",{ref:a,value:d,onChange:m=>{o(),u(m.target.value),g(!1),h("")},disabled:t,required:!0,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:"例如:电脑地址:9834 或 https://…"})]}),p?l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务密码"}),l.jsx("input",{type:"password",value:f,onChange:m=>h(m.target.value),disabled:t,required:!0,autoFocus:!0,autoComplete:"current-password",placeholder:"输入这台服务的密码"})]}):l.jsx("p",{className:"service-help",children:"连接自己的服务,输入地址即可;收到邀请时,粘贴完整链接。"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:t||!d.trim()||d.includes("#termdock-invite="),onClick:()=>{c()&&r(d.trim())},children:"仅保存,不连接"}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:t||!d.trim()||p&&!f,children:t?l.jsxs(l.Fragment,{children:[l.jsx(Qe,{size:16,className:"service-spinning"}),"正在连接…"]}):p?"登录并连接":"继续"})]})}function Dj({service:e,busy:t,canRemove:n,onSave:r,onRemove:o,onRoutes:s,onRelayServices:i}){const[a,c]=w.useState(e.label),[d,u]=w.useState(!1);return l.jsxs("form",{className:"service-form",onSubmit:f=>{f.preventDefault(),r(a.trim())},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务名称"}),l.jsx("input",{value:a,onChange:f=>c(f.target.value),disabled:t,required:!0,maxLength:120,placeholder:"例如:办公室电脑"})]}),l.jsx("p",{className:"service-address",children:e.serviceOrigin||e.url}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:t||!a.trim(),children:"保存名称"}),i&&l.jsxs("button",{type:"button",className:"service-row-open",disabled:t,onClick:i,children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:"可中转的服务"}),l.jsx("span",{className:"service-description",children:"通过这台服务连接其他电脑"})]}),l.jsx(Un,{size:16})]}),s&&l.jsxs("button",{type:"button",className:"service-row-open",disabled:t,onClick:s,children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:"备用连接"}),l.jsx("span",{className:"service-description",children:"添加其他网络地址或授权入口"})]}),l.jsx(Un,{size:16})]}),n&&l.jsx("div",{className:"service-remove",children:d?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"service-help",children:["从列表移除“",e.label,"”?不会停止服务或删除终端。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:t,onClick:()=>u(!1),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:t,onClick:o,children:"确认移除"})]})]}):l.jsx("button",{type:"button",className:"service-button service-danger",disabled:t,onClick:()=>u(!0),children:"移除服务"})})]})}var go={},td,ag;function Oj(){return ag||(ag=1,td=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),td}var nd={},sr={},cg;function eo(){if(cg)return sr;cg=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return sr.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},sr.getSymbolTotalCodewords=function(r){return t[r]},sr.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},sr.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},sr.isKanjiModeEnabled=function(){return typeof e<"u"},sr.toSJIS=function(r){return e(r)},sr}var rd={},lg;function yh(){return lg||(lg=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(rd)),rd}var od,dg;function Mj(){if(dg)return od;dg=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},od=e,od}var sd,ug;function Bj(){if(ug)return sd;ug=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const s=t*this.size+n;this.data[s]=r,o&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},sd=e,sd}var id={},fg;function Fj(){return fg||(fg=1,(function(e){const t=eo().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,s=t(r),i=s===145?26:Math.ceil((s-13)/(2*o-2))*2,a=[s-7];for(let c=1;c<o-1;c++)a[c]=a[c-1]-i;return a.push(6),a.reverse()},e.getPositions=function(r){const o=[],s=e.getRowColCoords(r),i=s.length;for(let a=0;a<i;a++)for(let c=0;c<i;c++)a===0&&c===0||a===0&&c===i-1||a===i-1&&c===0||o.push([s[a],s[c]]);return o}})(id)),id}var ad={},hg;function Uj(){if(hg)return ad;hg=1;const e=eo().getSymbolSize,t=7;return ad.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},ad}var cd={},pg;function Hj(){return pg||(pg=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const s=o.size;let i=0,a=0,c=0,d=null,u=null;for(let f=0;f<s;f++){a=c=0,d=u=null;for(let h=0;h<s;h++){let p=o.get(f,h);p===d?a++:(a>=5&&(i+=t.N1+(a-5)),d=p,a=1),p=o.get(h,f),p===u?c++:(c>=5&&(i+=t.N1+(c-5)),u=p,c=1)}a>=5&&(i+=t.N1+(a-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){const s=o.size;let i=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const d=o.get(a,c)+o.get(a,c+1)+o.get(a+1,c)+o.get(a+1,c+1);(d===4||d===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){const s=o.size;let i=0,a=0,c=0;for(let d=0;d<s;d++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|o.get(d,u),u>=10&&(a===1488||a===93)&&i++,c=c<<1&2047|o.get(u,d),u>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){let s=0;const i=o.data.length;for(let c=0;c<i;c++)s+=o.data[c];return Math.abs(Math.ceil(s*100/i/5)-10)*t.N4};function n(r,o,s){switch(r){case e.Patterns.PATTERN000:return(o+s)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(o+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return o*s%2+o*s%3===0;case e.Patterns.PATTERN110:return(o*s%2+o*s%3)%2===0;case e.Patterns.PATTERN111:return(o*s%3+(o+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,s){const i=s.size;for(let a=0;a<i;a++)for(let c=0;c<i;c++)s.isReserved(c,a)||s.xor(c,a,n(o,c,a))},e.getBestMask=function(o,s){const i=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let d=0;d<i;d++){s(d),e.applyMask(d,o);const u=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),u<c&&(c=u,a=d)}return a}})(cd)),cd}var ya={},mg;function G0(){if(mg)return ya;mg=1;const e=yh(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return ya.getBlocksCount=function(o,s){switch(s){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},ya.getTotalCodewordsCount=function(o,s){switch(s){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},ya}var ld={},Ps={},gg;function $j(){if(gg)return Ps;gg=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Ps.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Ps.exp=function(r){return e[r]},Ps.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Ps}var yg;function zj(){return yg||(yg=1,(function(e){const t=$j();e.mul=function(r,o){const s=new Uint8Array(r.length+o.length-1);for(let i=0;i<r.length;i++)for(let a=0;a<o.length;a++)s[i+a]^=t.mul(r[i],o[a]);return s},e.mod=function(r,o){let s=new Uint8Array(r);for(;s.length-o.length>=0;){const i=s[0];for(let c=0;c<o.length;c++)s[c]^=t.mul(o[c],i);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let s=0;s<r;s++)o=e.mul(o,new Uint8Array([1,t.exp(s)]));return o}})(ld)),ld}var dd,wg;function qj(){if(wg)return dd;wg=1;const e=zj();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const s=e.mod(o,this.genPoly),i=this.degree-s.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(s,i),a}return s},dd=t,dd}var ud={},fd={},hd={},bg;function W0(){return bg||(bg=1,hd.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),hd}var bn={},vg;function V0(){if(vg)return bn;vg=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
9
|
+
]))+`;bn.KANJI=new RegExp(n,"g"),bn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),bn.BYTE=new RegExp(r,"g"),bn.NUMERIC=new RegExp(e,"g"),bn.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return bn.testKanji=function(c){return o.test(c)},bn.testNumeric=function(c){return s.test(c)},bn.testAlphanumeric=function(c){return i.test(c)},bn}var xg;function to(){return xg||(xg=1,(function(e){const t=W0(),n=V0();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,i){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?s.ccBits[0]:i<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return n.testNumeric(s)?e.NUMERIC:n.testAlphanumeric(s)?e.ALPHANUMERIC:n.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(s,i){if(e.isValid(s))return s;try{return r(s)}catch{return i}}})(fd)),fd}var Sg;function Kj(){return Sg||(Sg=1,(function(e){const t=eo(),n=G0(),r=yh(),o=to(),s=W0(),i=7973,a=t.getBCHDigit(i);function c(h,p,g){for(let m=1;m<=40;m++)if(p<=e.getCapacity(m,g,h))return m}function d(h,p){return o.getCharCountIndicator(h,p)+4}function u(h,p){let g=0;return h.forEach(function(m){const b=d(m.mode,p);g+=b+m.getBitsLength()}),g}function f(h,p){for(let g=1;g<=40;g++)if(u(h,g)<=e.getCapacity(g,p,o.MIXED))return g}e.from=function(p,g){return s.isValid(p)?parseInt(p,10):g},e.getCapacity=function(p,g,m){if(!s.isValid(p))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=o.BYTE);const b=t.getSymbolTotalCodewords(p),y=n.getTotalCodewordsCount(p,g),k=(b-y)*8;if(m===o.MIXED)return k;const x=k-d(m,p);switch(m){case o.NUMERIC:return Math.floor(x/10*3);case o.ALPHANUMERIC:return Math.floor(x/11*2);case o.KANJI:return Math.floor(x/13);case o.BYTE:default:return Math.floor(x/8)}},e.getBestVersionForData=function(p,g){let m;const b=r.from(g,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,b);if(p.length===0)return 1;m=p[0]}else m=p;return c(m.mode,m.getLength(),b)},e.getEncodedBits=function(p){if(!s.isValid(p)||p<7)throw new Error("Invalid QR Code version");let g=p<<12;for(;t.getBCHDigit(g)-a>=0;)g^=i<<t.getBCHDigit(g)-a;return p<<12|g}})(ud)),ud}var pd={},Eg;function Gj(){if(Eg)return pd;Eg=1;const e=eo(),t=1335,n=21522,r=e.getBCHDigit(t);return pd.getEncodedBits=function(s,i){const a=s.bit<<3|i;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},pd}var md={},gd,kg;function Wj(){if(kg)return gd;kg=1;const e=to();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,s,i;for(o=0;o+3<=this.data.length;o+=3)s=this.data.substr(o,3),i=parseInt(s,10),r.put(i,10);const a=this.data.length-o;a>0&&(s=this.data.substr(o),i=parseInt(s,10),r.put(i,a*3+1))},gd=t,gd}var yd,Ig;function Vj(){if(Ig)return yd;Ig=1;const e=to(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let s;for(s=0;s+2<=this.data.length;s+=2){let i=t.indexOf(this.data[s])*45;i+=t.indexOf(this.data[s+1]),o.put(i,11)}this.data.length%2&&o.put(t.indexOf(this.data[s]),6)},yd=n,yd}var wd,Cg;function Yj(){if(Cg)return wd;Cg=1;const e=to();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},wd=t,wd}var bd,Tg;function Xj(){if(Tg)return bd;Tg=1;const e=to(),t=eo();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let s=t.toSJIS(this.data[o]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
10
|
+
Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},bd=n,bd}var vd={exports:{}},Ag;function Jj(){return Ag||(Ag=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var s={},i={};i[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,d,u,f,h,p,g,m,b;!a.empty();){c=a.pop(),d=c.value,f=c.cost,h=n[d]||{};for(u in h)h.hasOwnProperty(u)&&(p=h[u],g=f+p,m=i[u],b=typeof i[u]>"u",(b||m>g)&&(i[u]=g,a.push(u,g),s[u]=d))}if(typeof o<"u"&&typeof i[o]>"u"){var y=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(y)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],s=r;s;)o.push(s),n[s],s=n[s];return o.reverse(),o},find_path:function(n,r,o){var s=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(s,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(vd)),vd.exports}var Rg;function Zj(){return Rg||(Rg=1,(function(e){const t=to(),n=Wj(),r=Vj(),o=Yj(),s=Xj(),i=V0(),a=eo(),c=Jj();function d(y){return unescape(encodeURIComponent(y)).length}function u(y,k,x){const T=[];let _;for(;(_=y.exec(x))!==null;)T.push({data:_[0],index:_.index,mode:k,length:_[0].length});return T}function f(y){const k=u(i.NUMERIC,t.NUMERIC,y),x=u(i.ALPHANUMERIC,t.ALPHANUMERIC,y);let T,_;return a.isKanjiModeEnabled()?(T=u(i.BYTE,t.BYTE,y),_=u(i.KANJI,t.KANJI,y)):(T=u(i.BYTE_KANJI,t.BYTE,y),_=[]),k.concat(x,T,_).sort(function(E,v){return E.index-v.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function h(y,k){switch(k){case t.NUMERIC:return n.getBitsLength(y);case t.ALPHANUMERIC:return r.getBitsLength(y);case t.KANJI:return s.getBitsLength(y);case t.BYTE:return o.getBitsLength(y)}}function p(y){return y.reduce(function(k,x){const T=k.length-1>=0?k[k.length-1]:null;return T&&T.mode===x.mode?(k[k.length-1].data+=x.data,k):(k.push(x),k)},[])}function g(y){const k=[];for(let x=0;x<y.length;x++){const T=y[x];switch(T.mode){case t.NUMERIC:k.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:k.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:k.push([T,{data:T.data,mode:t.BYTE,length:d(T.data)}]);break;case t.BYTE:k.push([{data:T.data,mode:t.BYTE,length:d(T.data)}])}}return k}function m(y,k){const x={},T={start:{}};let _=["start"];for(let A=0;A<y.length;A++){const E=y[A],v=[];for(let S=0;S<E.length;S++){const I=E[S],R=""+A+S;v.push(R),x[R]={node:I,lastCount:0},T[R]={};for(let C=0;C<_.length;C++){const N=_[C];x[N]&&x[N].node.mode===I.mode?(T[N][R]=h(x[N].lastCount+I.length,I.mode)-h(x[N].lastCount,I.mode),x[N].lastCount+=I.length):(x[N]&&(x[N].lastCount=I.length),T[N][R]=h(I.length,I.mode)+4+t.getCharCountIndicator(I.mode,k))}}_=v}for(let A=0;A<_.length;A++)T[_[A]].end=0;return{map:T,table:x}}function b(y,k){let x;const T=t.getBestModeForData(y);if(x=t.from(k,T),x!==t.BYTE&&x.bit<T.bit)throw new Error('"'+y+'" cannot be encoded with mode '+t.toString(x)+`.
|
|
11
|
+
Suggested mode is: `+t.toString(T));switch(x===t.KANJI&&!a.isKanjiModeEnabled()&&(x=t.BYTE),x){case t.NUMERIC:return new n(y);case t.ALPHANUMERIC:return new r(y);case t.KANJI:return new s(y);case t.BYTE:return new o(y)}}e.fromArray=function(k){return k.reduce(function(x,T){return typeof T=="string"?x.push(b(T,null)):T.data&&x.push(b(T.data,T.mode)),x},[])},e.fromString=function(k,x){const T=f(k,a.isKanjiModeEnabled()),_=g(T),A=m(_,x),E=c.find_path(A.map,"start","end"),v=[];for(let S=1;S<E.length-1;S++)v.push(A.table[E[S]].node);return e.fromArray(p(v))},e.rawSplit=function(k){return e.fromArray(f(k,a.isKanjiModeEnabled()))}})(md)),md}var Pg;function Qj(){if(Pg)return nd;Pg=1;const e=eo(),t=yh(),n=Mj(),r=Bj(),o=Fj(),s=Uj(),i=Hj(),a=G0(),c=qj(),d=Kj(),u=Gj(),f=to(),h=Zj();function p(A,E){const v=A.size,S=s.getPositions(E);for(let I=0;I<S.length;I++){const R=S[I][0],C=S[I][1];for(let N=-1;N<=7;N++)if(!(R+N<=-1||v<=R+N))for(let P=-1;P<=7;P++)C+P<=-1||v<=C+P||(N>=0&&N<=6&&(P===0||P===6)||P>=0&&P<=6&&(N===0||N===6)||N>=2&&N<=4&&P>=2&&P<=4?A.set(R+N,C+P,!0,!0):A.set(R+N,C+P,!1,!0))}}function g(A){const E=A.size;for(let v=8;v<E-8;v++){const S=v%2===0;A.set(v,6,S,!0),A.set(6,v,S,!0)}}function m(A,E){const v=o.getPositions(E);for(let S=0;S<v.length;S++){const I=v[S][0],R=v[S][1];for(let C=-2;C<=2;C++)for(let N=-2;N<=2;N++)C===-2||C===2||N===-2||N===2||C===0&&N===0?A.set(I+C,R+N,!0,!0):A.set(I+C,R+N,!1,!0)}}function b(A,E){const v=A.size,S=d.getEncodedBits(E);let I,R,C;for(let N=0;N<18;N++)I=Math.floor(N/3),R=N%3+v-8-3,C=(S>>N&1)===1,A.set(I,R,C,!0),A.set(R,I,C,!0)}function y(A,E,v){const S=A.size,I=u.getEncodedBits(E,v);let R,C;for(R=0;R<15;R++)C=(I>>R&1)===1,R<6?A.set(R,8,C,!0):R<8?A.set(R+1,8,C,!0):A.set(S-15+R,8,C,!0),R<8?A.set(8,S-R-1,C,!0):R<9?A.set(8,15-R-1+1,C,!0):A.set(8,15-R-1,C,!0);A.set(S-8,8,1,!0)}function k(A,E){const v=A.size;let S=-1,I=v-1,R=7,C=0;for(let N=v-1;N>0;N-=2)for(N===6&&N--;;){for(let P=0;P<2;P++)if(!A.isReserved(I,N-P)){let j=!1;C<E.length&&(j=(E[C]>>>R&1)===1),A.set(I,N-P,j),R--,R===-1&&(C++,R=7)}if(I+=S,I<0||v<=I){I-=S,S=-S;break}}}function x(A,E,v){const S=new n;v.forEach(function(P){S.put(P.mode.bit,4),S.put(P.getLength(),f.getCharCountIndicator(P.mode,A)),P.write(S)});const I=e.getSymbolTotalCodewords(A),R=a.getTotalCodewordsCount(A,E),C=(I-R)*8;for(S.getLengthInBits()+4<=C&&S.put(0,4);S.getLengthInBits()%8!==0;)S.putBit(0);const N=(C-S.getLengthInBits())/8;for(let P=0;P<N;P++)S.put(P%2?17:236,8);return T(S,A,E)}function T(A,E,v){const S=e.getSymbolTotalCodewords(E),I=a.getTotalCodewordsCount(E,v),R=S-I,C=a.getBlocksCount(E,v),N=S%C,P=C-N,j=Math.floor(S/C),O=Math.floor(R/C),M=O+1,F=j-O,B=new c(F);let U=0;const q=new Array(C),z=new Array(C);let ee=0;const ie=new Uint8Array(A.buffer);for(let J=0;J<C;J++){const we=J<P?O:M;q[J]=ie.slice(U,U+we),z[J]=B.encode(q[J]),U+=we,ee=Math.max(ee,we)}const Z=new Uint8Array(S);let ae=0,$,Y;for($=0;$<ee;$++)for(Y=0;Y<C;Y++)$<q[Y].length&&(Z[ae++]=q[Y][$]);for($=0;$<F;$++)for(Y=0;Y<C;Y++)Z[ae++]=z[Y][$];return Z}function _(A,E,v,S){let I;if(Array.isArray(A))I=h.fromArray(A);else if(typeof A=="string"){let j=E;if(!j){const O=h.rawSplit(A);j=d.getBestVersionForData(O,v)}I=h.fromString(A,j||40)}else throw new Error("Invalid data");const R=d.getBestVersionForData(I,v);if(!R)throw new Error("The amount of data is too big to be stored in a QR Code");if(!E)E=R;else if(E<R)throw new Error(`
|
|
12
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
13
|
+
Minimum version required to store current data is: `+R+`.
|
|
14
|
+
`);const C=x(E,v,I),N=e.getSymbolSize(E),P=new r(N);return p(P,E),g(P),m(P,E),y(P,v,0),E>=7&&b(P,E),k(P,C),isNaN(S)&&(S=i.getBestMask(P,y.bind(null,P,v))),i.applyMask(S,P),y(P,v,S),{modules:P,version:E,errorCorrectionLevel:v,maskPattern:S,segments:I}}return nd.create=function(E,v){if(typeof E>"u"||E==="")throw new Error("No input text");let S=t.M,I,R;return typeof v<"u"&&(S=t.from(v.errorCorrectionLevel,t.M),I=d.from(v.version),R=i.from(v.maskPattern),v.toSJISFunc&&e.setToSJISFunction(v.toSJISFunc)),_(E,I,S,R)},nd}var xd={},Sd={},Ng;function Y0(){return Ng||(Ng=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:s,scale:s?4:i,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const s=e.getScale(r,o);return Math.floor((r+o.margin*2)*s)},e.qrToImageData=function(r,o,s){const i=o.modules.size,a=o.modules.data,c=e.getScale(i,s),d=Math.floor((i+s.margin*2)*c),u=s.margin*c,f=[s.color.light,s.color.dark];for(let h=0;h<d;h++)for(let p=0;p<d;p++){let g=(h*d+p)*4,m=s.color.light;if(h>=u&&p>=u&&h<d-u&&p<d-u){const b=Math.floor((h-u)/c),y=Math.floor((p-u)/c);m=f[a[b*i+y]?1:0]}r[g++]=m.r,r[g++]=m.g,r[g++]=m.b,r[g]=m.a}}})(Sd)),Sd}var _g;function eD(){return _g||(_g=1,(function(e){const t=Y0();function n(o,s,i){o.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=i,s.width=i,s.style.height=i+"px",s.style.width=i+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,i,a){let c=a,d=i;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),i||(d=r()),c=t.getOptions(c);const u=t.getImageWidth(s.modules.size,c),f=d.getContext("2d"),h=f.createImageData(u,u);return t.qrToImageData(h.data,s,c),n(f,d,u),f.putImageData(h,0,0),d},e.renderToDataURL=function(s,i,a){let c=a;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),c||(c={});const d=e.render(s,i,c),u=c.type||"image/png",f=c.rendererOpts||{};return d.toDataURL(u,f.quality)}})(xd)),xd}var Ed={},Lg;function tD(){if(Lg)return Ed;Lg=1;const e=Y0();function t(o,s){const i=o.a/255,a=s+'="'+o.hex+'"';return i<1?a+" "+s+'-opacity="'+i.toFixed(2).slice(1)+'"':a}function n(o,s,i){let a=o+s;return typeof i<"u"&&(a+=" "+i),a}function r(o,s,i){let a="",c=0,d=!1,u=0;for(let f=0;f<o.length;f++){const h=Math.floor(f%s),p=Math.floor(f/s);!h&&!d&&(d=!0),o[f]?(u++,f>0&&h>0&&o[f-1]||(a+=d?n("M",h+i,.5+p+i):n("m",c,0),c=0,d=!1),h+1<s&&o[f+1]||(a+=n("h",u),u=0)):c++}return a}return Ed.render=function(s,i,a){const c=e.getOptions(i),d=s.modules.size,u=s.modules.data,f=d+c.margin*2,h=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",p="<path "+t(c.color.dark,"stroke")+' d="'+r(u,d,c.margin)+'"/>',g='viewBox="0 0 '+f+" "+f+'"',b='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+g+' shape-rendering="crispEdges">'+h+p+`</svg>
|
|
15
|
+
`;return typeof a=="function"&&a(null,b),b},Ed}var jg;function nD(){if(jg)return go;jg=1;const e=Oj(),t=Qj(),n=eD(),r=tD();function o(s,i,a,c,d){const u=[].slice.call(arguments,1),f=u.length,h=typeof u[f-1]=="function";if(!h&&!e())throw new Error("Callback required as last argument");if(h){if(f<2)throw new Error("Too few arguments provided");f===2?(d=a,a=i,i=c=void 0):f===3&&(i.getContext&&typeof d>"u"?(d=c,c=void 0):(d=c,c=a,a=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(a=i,i=c=void 0):f===2&&!i.getContext&&(c=a,a=i,i=void 0),new Promise(function(p,g){try{const m=t.create(a,c);p(s(m,i,c))}catch(m){g(m)}})}try{const p=t.create(a,c);d(null,s(p,i,c))}catch(p){d(p)}}return go.create=t.create,go.toCanvas=o.bind(null,n.render),go.toDataURL=o.bind(null,n.renderToDataURL),go.toString=o.bind(null,function(s,i,a){return r.render(s,a)}),go}var rD=nD();function X0({invitation:e,compact:t=!1}){const[n,r]=w.useState(!1);if(!rh())return null;let o;try{o=eL(e)}catch{return null}return l.jsxs("div",{className:t?"text-xs":"space-y-2 text-center",children:[l.jsxs("a",{href:o,onClick:()=>r(!0),className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 py-2 ${t?"text-xs":"text-sm"} text-primary hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring ${t?"":"w-full border border-border"}`,children:[l.jsx(Nc,{size:15,"aria-hidden":"true"}),"在客户端打开"]}),n&&l.jsxs("p",{role:"status",className:"text-xs leading-5 text-muted-foreground",children:["未打开?",l.jsx("a",{href:"https://github.com/Jovines/termdock/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"安装或更新 Mac 客户端"})]})]})}const Gt="w-full rounded-lg border border-border bg-background px-3 py-2.5 text-base text-foreground focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm",dt="appearance-none min-h-11 rounded-lg px-3 py-2 text-sm hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",ir=`${dt.replace("hover:bg-surface-2","")} bg-primary text-primary-foreground hover:opacity-90`;function oD(e){return e.serviceName||new URL(e.url).hostname}function Ns(e){return e.includes("service:*")?"完整权限":e.includes("session.input")?"可操作":e.includes("session.view")?"只读":[e.includes("session.chat-view")?e.includes("session.chat-send")?"对话可发送":"对话只读":"",e.includes("session.terminal-view")?e.includes("session.terminal-input")?"终端可操作":"终端只读预览":"",e.includes("route.use")?"仅中转":""].filter(Boolean).join(" · ")||"自定义权限"}function sD({profile:e,subjectId:t}){return l.jsxs("details",{className:"mt-2 text-xs text-muted-foreground",children:[l.jsx("summary",{className:"cursor-pointer leading-relaxed",children:[e?.model||e?.hostname||e?.system,e?.route,`ID ${t.slice(-8)}`].filter(Boolean).join(" · ")}),l.jsxs("dl",{className:"mt-2 space-y-2 rounded-lg bg-surface-2 p-3",children:[[["设备型号",e?.model],["主机名称",e?.hostname],["操作系统",e?.system],["客户端",e?.client],["打开方式",e?.mode],["处理器",e?.cpu],["架构",e?.arch],["最近连接路径",e?.route],["首次记录",e?.firstSeenAt?new Date(e.firstSeenAt).toLocaleString():void 0],["最近连接",e?.lastSeenAt?new Date(e.lastSeenAt).toLocaleString():void 0],["设备标识",t]].filter(([,n])=>n).map(([n,r])=>l.jsxs("div",{children:[l.jsx("dt",{children:n}),l.jsx("dd",{className:"mt-0.5 select-text break-all text-foreground",children:r})]},n)),l.jsx("p",{className:"leading-relaxed",children:e?"系统、硬件与路径由设备报告;连接时间由服务记录。":"此设备尚未报告详情,更新客户端并重新连接后可补齐。"})]})]})}function iD(){const e=getComputedStyle(document.documentElement),t=e.getPropertyValue("--background").trim(),n=e.getPropertyValue("--foreground").trim(),r=o=>{const s=o.replace("#","");return parseInt(s.slice(0,2),16)*.299+parseInt(s.slice(2,4),16)*.587+parseInt(s.slice(4,6),16)*.114};if(!t||!n)throw new Error("Theme unavailable");return r(t)<r(n)?{dark:t,light:n}:{dark:n,light:t}}function aD({onConnect:e,onClose:t,onConnectWithPassword:n,onAddService:r,onOpenService:o,currentIdentity:s,currentServiceName:i,currentServiceId:a,currentServiceOrigin:c,hasBackup:d=!1,inviteAddresses:u=[],paired:f=!1,initialInvite:h,initialServicePage:p,initialShareSessionId:g,initialShareSessionIds:m,initialViewLayout:b,initialViewMode:y,sessions:k=[],grants:x=[],invitations:T=[],onCreateInvite:_,onRevokeInvitation:A,onRevoke:E,onRename:v,loading:S=!1,loadError:I,onRetry:R}){const[C,N]=w.useState(!1),[P,j]=w.useState(""),[O,M]=w.useState(!1),[F,B]=w.useState(),[U,q]=w.useState(),[z,ee]=w.useState(!1),[ie,Z]=w.useState(""),ae=F||(O?void 0:h),$=(()=>{if(!(!ae?.certificateUrl||!ae.nativeOrigin))try{const L=_i({...ae,showAccessGuide:!1}).invitation;return L&&new URL(L).protocol==="https:"?L:void 0}catch{return}})(),Y=!!$&&ae?.showAccessGuide!==!1&&!window.termdockDesktop?.openServiceConnection&&!U&&!C;w.useEffect(()=>{M(!1),B(void 0),q(void 0),N(!1),j(""),ee(!1),Z("")},[h?.url,h?.targetPeerId,h?.pairingCode,h?.routeCode]);const[J,we]=w.useState({}),[ge,le]=w.useState(""),[ce,be]=w.useState(""),[se,ye]=w.useState(!1),[pe,je]=w.useState(!!g||!!m?.length),[D,V]=w.useState(!f),[de,De]=w.useState(!0),[Re,Ge]=w.useState(!0),[Se,rt]=w.useState(),[We,Ct]=w.useState(""),[ke,Pe]=w.useState("read"),[et,mt]=w.useState(!0),[vt,Tt]=w.useState(!0),[xt,sn]=w.useState(!1),[G,ne]=w.useState(!1),[te,K]=w.useState(!1),[re,fe]=w.useState(!1),[W,Q]=w.useState("600000"),[H,he]=w.useState("selected"),[ue,xe]=w.useState(()=>{const L=k.find(X=>X.sessionId===g||X.sourceSessionId===g);return L?[L.sessionId]:k.length===1?[k[0].sessionId]:[]}),[Ee,Me]=w.useState(y||"chat"),[Fe,Ce]=w.useState({}),[Ie,Ye]=w.useState({}),[Ve,qt]=w.useState(),[Yn,kS]=w.useState(Date.now);w.useEffect(()=>{const L=setInterval(()=>kS(Date.now()),1e3);return()=>clearInterval(L)},[]);const[rl,Di]=w.useState(!1),[ol,sl]=w.useState(!1),[ts,no]=w.useState(!1),[Ch,mr]=w.useState("idle"),[Th,IS]=w.useState("never"),mn=w.useRef(0);w.useEffect(()=>()=>{mn.current++},[]);const[Oi,Ah]=w.useState(""),[ns,Mi]=w.useState(""),[Xe,rs]=w.useState(),[Rh,Ph]=w.useState(""),[CS,Bi]=w.useState(),[TS,Fi]=w.useState(),[Xn,AS]=w.useState("services"),[ro,il]=w.useState(),[al,Nh]=w.useState(""),[os,_h]=w.useState(!1),[Lh,ss]=w.useState(),[gn,Ui]=w.useState(!1),[oo,cl]=w.useState([]),jh=w.useRef(new Map);w.useEffect(()=>{for(const Te of k)jh.current.set(Te.sessionId,Te.sourceSessionId||Te.sessionId);const L=Te=>{const lt=jh.current.get(Te);return k.find(Bt=>Bt.sessionId===Te||lt&&Bt.sourceSessionId===lt)?.sessionId||Te},X=Te=>{const lt=[...new Set(Te.map(L))];return lt.every((Bt,io)=>Bt===Te[io])&<.length===Te.length?Te:lt};xe(X),cl(X),Ye(Te=>Object.keys(Te).some(lt=>L(lt)!==lt)?Object.fromEntries(Object.entries(Te).map(([lt,Bt])=>[L(lt),Bt])):Te)},[k]);const Hi=m?.length?m:g?[g]:[],ll=JSON.stringify(Hi),Dh=w.useRef(),is=Hi.filter(L=>!k.some(X=>X.sessionId===L||X.sourceSessionId===L));w.useEffect(()=>{!Hi.length||Dh.current===ll||is.length||(Dh.current=ll,xe([...new Set(Hi.map(L=>k.find(X=>X.sessionId===L||X.sourceSessionId===L).sessionId))]),he("selected"),je(!0),V(!1))},[ll,k]);const dl=c||location.origin,Oh=L=>{try{return["localhost","127.0.0.1","[::1]"].includes(new URL(L).hostname)}catch{return!1}},Mh=u.filter(L=>!Oh(L.url)),RS=Oh(dl)&&(Mh.find(L=>!new URL(L.url).hostname.endsWith(".local"))||Mh[0])?.url||"",gr=Se??RS;let ul;try{ul=new URL(gr==="custom"?ze(We):gr||dl).hostname}catch{}const PS=!!ul&&["localhost","127.0.0.1","[::1]"].includes(ul),as=k.filter(L=>ue.includes(L.sessionId)),fl=ke==="chat"||ke==="custom"&&!xt?"chat":ke==="custom"&&!et?"terminal":Ee,NS=H==="all"||ke==="full"?"全部终端":as.map(L=>Ie[L.sessionId]?.name||L.name).join("、"),_S=L=>{if(IS(L),L==="never")Mi("");else if(L!=="custom"){const X=new Date(Date.now()+Number(L));Mi(new Date(X.getTime()-X.getTimezoneOffset()*6e4).toISOString().slice(0,16))}},hl=x.filter(L=>L.revokedAt===void 0&&(!L.expiresAt||L.expiresAt>Date.now())),pl=x.filter(L=>!hl.includes(L)),cs=[...new Set(hl.map(L=>L.subjectId))].map(L=>{const X=hl.filter(Te=>Te.subjectId===L);return{subjectId:L,grants:X,name:L===s?"此设备":X.find(Te=>Te.label)?.label||"未命名设备"}}).sort((L,X)=>+(X.subjectId===s)-+(L.subjectId===s)),so=!ro&&!os&&f&&!D&&!pe&&!ae,LS=()=>{il(void 0),_h(!1),V(!1),je(!1),rs(void 0),Di(!1),le(""),be(""),ss(void 0),Bi(void 0),Fi(void 0),rt(void 0),Ct(""),sl(!1),no(!1),mr("idle"),mn.current++},Bh=()=>{sl(!1),no(!1),mr("idle"),mn.current++,rs(void 0),qt(void 0),je(!0),V(!1),Di(!1),le(""),be("")},jS=L=>L.subjectId===s?"此设备":L.label||"未命名设备",ml=()=>{gn?Ui(!1):z?(ee(!1),Z(""),le("")):t()},gl=w.useRef(null);Li(gl,!0,()=>{se||ml()}),w.useLayoutEffect(()=>{gl.current?.focus({preventScroll:!0})},[]),w.useEffect(()=>{let L=!1;if(Ph(""),Xe&&ts)try{rD.toDataURL(Xe.url,{width:220,margin:3,errorCorrectionLevel:"M",color:iD()}).then(X=>{L||Ph(X)}).catch(()=>{})}catch{}return()=>{L=!0}},[Xe,ts]);async function ls(L){ye(!0),le(""),be(""),q(void 0);try{await e(L);const{url:X,targetPeerId:Te,serviceName:lt,serviceOrigin:Bt}=L;await $n({id:Te,url:X,targetPeerId:Te,label:lt||new URL(X).host,serviceOrigin:Bt,entryServiceId:L.entryServiceId}),B(void 0),M(!0),V(!1),be("已连接。")}catch(X){L.routeOnly&&X instanceof Ot?(B(L),N(!0)):L.pairingCode||L.routeCode?(B(L),q(px(X))):le("暂时无法连接,请检查网络后重试。")}finally{ye(!1)}}async function Fh(L){if(L?.preventDefault(),!_||is.length)return;le(""),be("");const X=ue.filter(Kt=>k.some(kn=>kn.sessionId===Kt));if(ke!=="full"&&H==="selected"&&!X.length){le("请选择至少一个 Session。");return}const Te=X.map(Kt=>k.find(kn=>kn.sessionId===Kt)?.sourceSessionId||Kt),lt=Object.fromEntries(X.flatMap(Kt=>{const kn=Ie[Kt],ds=k.find(us=>us.sessionId===Kt),ao=kn?.name?.trim(),$i=kn?.icon,zi={...ao&&ao!==ds.name?{name:ao}:{},...$i?{icon:$i}:{}};return Object.keys(zi).length?[[ds.sourceSessionId||Kt,zi]]:[]}));if(ke!=="full"&&H==="selected"&&!Tj(lt,{kind:"sessions",sessionIds:Te})){le("请检查分享名称和图标。");return}const Bt=ns?new Date(ns).getTime():void 0;if(Bt!==void 0&&(!Number.isFinite(Bt)||Bt<=Date.now())){le("授权到期时间必须晚于现在。");return}let io;if(gr==="custom")try{io=ze(We)}catch{le("请输入有效的接入地址,例如 https://192.168.1.23:9834。");return}else gr&&(io=gr);ye(!0);try{const Kt=[...et?["session.chat-view"]:[],...vt&&et?["session.chat-send"]:[],...xt?["session.terminal-view"]:[],...G&&xt?["session.terminal-input","session.resize"]:[]];if(ke==="custom"&&!et&&!xt)throw new Error("请至少开放一种查看方式");const kn={viewMode:fl,...Re?{}:{showAccessGuide:!1},...re?{reusable:!0}:{},...W!=="600000"?{linkExpiresAt:W==="never"?null:Date.now()+Number(W)}:{},...b==="split"&&Te.length>1?{viewLayout:"split"}:{},...ke!=="full"&&H==="selected"&&Object.keys(lt).length?{sessionAppearance:lt}:{},...ke!=="full"&&(Fe.android?.length||Fe.computers?.length||Fe.directories?.length)?{resources:Fe}:{},...d?{includeBackup:de}:{},...io?{entryAddress:io}:{},scope:ke==="full"||H==="all"?{kind:"service"}:{kind:"sessions",sessionIds:Te},actions:ke==="full"?["service:*"]:[...ke==="write"?["session.view","session.input","session.resize"]:ke==="chat"?["session.chat-view","session.chat-send"]:ke==="custom"?Kt:["session.view"],...te?["session.chat-clear"]:[]],...Oi.trim()?{label:Oi.trim()}:{},...Bt===void 0?{}:{expiresAt:Bt}},ds=++mn.current,ao=_(kn),$i=jm(ao.then(us=>us.url)),zi=await ao;if(ds!==mn.current)return;qt(kn),rs(zi),no(!1),mr("idle"),$i.then(us=>{ds===mn.current&&mr(us?"copied":"failed")})}catch(Kt){le(Kt instanceof Error&&Kt.message.startsWith("无法分享备用连接:")?"无法分享备用连接:需要入口管理员授权。你也可以关闭“包含备用连接”,生成直连邀请。":"暂时无法生成邀请,请确认当前设备有授权管理权限。")}finally{ye(!1)}}async function DS(){if(!Xe||Xe.expiresAt!==null&&Xe.expiresAt<=Date.now())return;const L=mn.current,X=await jm(Xe.url);L===mn.current&&mr(X?"copied":"failed")}const yl=(L,X)=>L.kind==="service"?"全部终端":L.sessionIds.map(Te=>X?.[Te]?.name||k.find(lt=>lt.sessionId===Te||lt.sourceSessionId===Te)?.name||Te).join("、"),Uh=L=>A?CS===L?l.jsxs("div",{className:"mt-2 rounded-lg border border-border bg-background p-3 text-left",children:[l.jsx("p",{className:"text-xs leading-relaxed",children:"撤销后,原邀请链接和二维码将立即失效。可重复链接产生的访问授权也会同时撤销。"}),l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${dt} text-xs text-muted-foreground`,disabled:se,onClick:()=>Bi(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${dt} text-xs text-destructive`,disabled:se,onClick:async()=>{ye(!0),le(""),be("");try{await A(L),Xe?.id===L&&(mn.current++,rs(void 0),mr("idle"),no(!1)),Bi(void 0),be("邀请已撤销,原链接和二维码已失效。")}catch{le("暂时无法撤销。如果邀请已被接受,请在设备列表撤销访问权限。")}finally{ye(!1)}},children:"确认撤销邀请"})]})]}):l.jsx("button",{type:"button",className:`${dt} text-xs text-destructive`,disabled:se,onClick:()=>{Bi(L),be("")},children:"撤销邀请"}):null,OS=z?"输入新的邀请链接":J.title||(ro?"设备名称":os?Xn==="devices"?"授权详情":"连接详情":gn?"选择终端":pe?"分享":D&&f?"添加服务":f?"服务与设备":"连接 Termdock"),MS=z||!!J.back||!!ro||os||gn||f&&(D||pe),BS=()=>{if(z){ee(!1),Z(""),le("");return}if(J.back){J.back();return}gn?Ui(!1):LS()},Hh=L=>L.every(X=>X.routeTargetServiceId)?`${new Set(L.map(X=>X.routeTargetServiceId)).size} 台服务`:L.some(X=>X.scope.kind==="service")?"全部终端":`${new Set(L.flatMap(X=>X.scope.kind==="sessions"?X.scope.sessionIds:[])).size} 个终端`;return Vn.createPortal(l.jsx("div",{className:"fixed inset-0 z-modal-backdrop flex items-end justify-center bg-[var(--app-backdrop)] backdrop-blur-sm sm:items-center sm:p-6","data-sidebar-gesture-ignore":!0,onMouseDown:L=>{L.target===L.currentTarget&&!se&&ml()},children:l.jsxs("div",{ref:gl,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"federation-title",className:"z-modal-panel flex max-h-[calc(100dvh-env(safe-area-inset-top)-12px)] w-full max-w-lg flex-col overflow-hidden rounded-t-2xl border border-border bg-surface font-sans text-foreground shadow-xl outline-none sm:max-h-[min(800px,92dvh)] sm:rounded-2xl",children:[l.jsxs("header",{className:"shrink-0 border-b border-border px-5 pt-3",children:[l.jsxs("div",{className:"flex min-h-12 items-center gap-2 pb-2",children:[MS&&l.jsx("button",{type:"button",className:`${dt} -ml-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:se,onClick:BS,"aria-label":z?"返回邀请":gn?"取消选择终端":Xn==="devices"?"返回设备":"返回服务",children:l.jsx(Ju,{size:20})}),l.jsx("h2",{id:"federation-title",className:"min-w-0 flex-1 text-base font-semibold",children:OS}),l.jsx("button",{type:"button",className:`${dt} -mr-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:se,onClick:ml,"aria-label":"关闭",children:l.jsx(wi,{size:20})})]}),so&&!J.title&&l.jsx("div",{className:"flex gap-6",role:"tablist","aria-label":"管理内容",children:[["services","服务"],["devices","设备"]].map(([L,X])=>l.jsxs("button",{type:"button",role:"tab","aria-selected":Xn===L,"aria-controls":`federation-${L}`,id:`federation-tab-${L}`,className:`min-h-11 border-b-2 px-1 text-sm transition ${Xn===L?"border-primary font-medium text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,onClick:()=>{AS(L),Di(!1),ss(void 0),le(""),be("")},children:[X,L==="devices"&&cs.length>0&&l.jsx("span",{className:"ml-1.5 text-xs text-muted-foreground",children:cs.length})]},L))})]}),l.jsxs("div",{className:"min-h-0 overflow-y-auto overscroll-contain px-5 py-4 pb-[max(20px,env(safe-area-inset-bottom))]",children:[(so&&Xn==="services"||D&&!pe&&!ae)&&l.jsx(Lj,{initialServicePage:p,renderRelayServices:(L,X)=>l.jsx(_j,{service:L,onBusyChange:X,onConnect:e,onConnectWithPassword:n}),renderRoutes:(L,X)=>l.jsx(K0,{service:L,onBusyChange:X}),hideHeader:!0,initiallyAdding:D,current:a?{id:a,targetPeerId:a,url:c||location.origin,label:i||"当前服务"}:void 0,onNavigation:we,onBusyChange:ye,onInvite:_?Bh:void 0,onOpen:async L=>{if(o)return o(L);L.targetPeerId?await ls({...L,targetPeerId:L.targetPeerId,serviceName:L.label}):r&&await r(L.url)},onAdd:async(L,X)=>{if(r)return r(L,X);await ls(un(L))}}),so&&Xn==="devices"&&l.jsxs("section",{role:"tabpanel",id:"federation-devices","aria-labelledby":"federation-tab-devices",children:[l.jsx("p",{className:"mb-2 text-xs leading-relaxed text-muted-foreground",children:"可访问此服务的设备"}),S?l.jsxs("p",{role:"status",className:"flex items-center gap-2 py-5 text-sm text-muted-foreground",children:[l.jsx(Qe,{size:16,className:"animate-spin"}),"正在读取设备…"]}):l.jsxs("div",{className:"divide-y divide-border",children:[cs.map(L=>l.jsxs("div",{className:"py-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-2 text-muted-foreground",children:/iPhone|iPad|Android|手机|平板/i.test(L.grants.find(X=>X.label)?.label||(L.subjectId===s?navigator.userAgent:""))?l.jsx(_c,{size:19}):l.jsx(Nc,{size:19})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[l.jsx("p",{className:"truncate text-sm font-medium",children:L.name}),v&&(E||L.subjectId===s)&&l.jsx("button",{type:"button","aria-label":`重命名 ${L.name}`,className:"inline-flex h-9 w-9 shrink-0 appearance-none items-center justify-center rounded-lg bg-transparent text-muted-foreground hover:bg-surface-2",onClick:()=>{il(L.subjectId),Nh(L.grants.find(X=>X.label)?.label||"")},children:l.jsx(xw,{size:14})})]}),L.subjectId===s&&L.grants.find(X=>X.label)?.label&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:L.grants.find(X=>X.label)?.label}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[Ns(L.grants.flatMap(X=>X.actions))," · ",Hh(L.grants)]})]}),E&&L.subjectId!==s&&Lh!==L.subjectId&&l.jsx("button",{type:"button",className:`${dt} -mr-2 text-xs text-muted-foreground hover:text-destructive`,disabled:se,"aria-label":`撤销 ${L.name} 的访问权限`,onClick:()=>ss(L.subjectId),children:"撤销"})]}),l.jsx(sD,{profile:L.grants.find(X=>X.deviceProfile)?.deviceProfile,subjectId:L.subjectId}),Lh===L.subjectId&&l.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-background p-3",children:[l.jsx("p",{className:"text-xs leading-relaxed",children:"撤销后,这台设备将断开连接,需重新邀请才能访问。"}),l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${dt} text-xs text-muted-foreground`,disabled:se,onClick:()=>ss(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${dt} text-xs text-destructive`,disabled:se,onClick:async()=>{ye(!0),le("");try{for(const X of L.grants)await E?.(X.id);ss(void 0),be("设备访问权限已撤销。")}catch{le("暂时无法撤销,请重试。")}finally{ye(!1)}},children:"确认撤销"})]})]})]},L.subjectId)),cs.length===0&&!I&&l.jsxs("p",{className:"py-5 text-sm text-muted-foreground",children:["暂无设备授权。",_?"可通过邀请添加设备。":""]})]}),_&&l.jsxs("button",{type:"button",className:`${dt} mt-4 inline-flex w-full items-center justify-center gap-2 border border-border text-sm`,disabled:se,onClick:Bh,children:[l.jsx(ef,{size:16}),"邀请设备"]}),T.length>0&&l.jsxs("section",{className:"mt-5 border-t border-border pt-4","aria-label":"待接受的邀请",children:[l.jsx("h3",{className:"text-sm font-medium",children:"待接受的邀请"}),l.jsx("div",{className:"divide-y divide-border",children:T.map(L=>l.jsxs("div",{className:"py-3",children:[l.jsx("p",{className:"text-sm",children:L.label||"设备邀请"}),l.jsxs("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:[Ns(L.actions)," · ",yl(L.scope,L.sessionAppearance)]}),l.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[L.reusable?"可重复使用 · ":"单次使用 · ",L.invitationExpiresAt===null?"直到撤销有效":new Date(L.invitationExpiresAt).toLocaleString()+" 前有效"]}),l.jsx(Ql,{resources:L.resources}),Uh(L.id)]},L.id))})]}),pl.length>0&&l.jsxs("details",{className:"mt-4 text-xs text-muted-foreground",children:[l.jsxs("summary",{className:"cursor-pointer py-2",children:["已失效的授权(",pl.length,")"]}),l.jsx("div",{className:"mt-1 space-y-2 border-l border-border pl-3",children:pl.map(L=>l.jsxs("p",{className:"flex gap-3",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate",children:jS(L)}),l.jsx("span",{className:"shrink-0",children:L.revokedAt!==void 0?"已撤销":"已到期"})]},L.id))})]})]}),ro&&l.jsxs("form",{className:"space-y-4",onSubmit:async L=>{L.preventDefault(),ye(!0),le("");try{await v?.(ro,al.trim()),il(void 0)}catch{le("暂时无法保存设备名称,请重试。")}finally{ye(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"设备名称"}),l.jsx("input",{autoFocus:!0,className:Gt,maxLength:80,required:!0,value:al,onChange:L=>Nh(L.target.value),placeholder:"例如:我的 iPhone、办公室电脑"})]}),l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"为设备起一个容易辨认的名字,会同步显示在此服务的设备列表中。"}),l.jsx("button",{type:"submit",className:`${ir} w-full`,disabled:se||!al.trim(),children:se?"正在保存…":"保存名称"})]}),os&&l.jsx("section",{className:"space-y-5",children:Xn==="devices"?cs.map(L=>l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-sm font-medium",children:L.name}),l.jsxs("dl",{className:"space-y-3 rounded-xl bg-surface-2 p-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"访问权限"}),l.jsxs("dd",{className:"mt-1",children:[Ns(L.grants.flatMap(X=>X.actions))," · ",Hh(L.grants)]})]}),L.grants.map(X=>l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:X.routeTargetServiceId?"允许经此入口访问":Ns(X.actions)}),l.jsxs("dd",{className:"mt-1 leading-relaxed",children:[X.routeTargetServiceId?X.routeTargetName||"指定服务":yl(X.scope,X.sessionAppearance),!X.routeTargetServiceId&&l.jsx("span",{className:"mt-1 block text-muted-foreground",children:X.expiresAt?new Date(X.expiresAt).toLocaleString():"保留至撤销"}),l.jsx(Ql,{resources:X.resources})]}),E&&(X.routeTargetServiceId||L.subjectId!==s)&&(TS===X.id?l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"leading-relaxed",children:"确认撤销此项授权?此设备的其他授权将保留。"}),l.jsxs("div",{className:"mt-1 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${dt} text-xs text-muted-foreground`,disabled:se,onClick:()=>Fi(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${dt} text-xs text-destructive`,disabled:se,onClick:async()=>{ye(!0),le("");try{await E(X.id),Fi(void 0),be("此项授权已撤销。")}catch{le("暂时无法撤销,请重试。")}finally{ye(!1)}},children:"确认撤销此项授权"})]})]}):l.jsx("button",{type:"button",className:`${dt} mt-1 -ml-3 text-xs text-destructive`,disabled:se,onClick:()=>Fi(X.id),children:X.routeTargetServiceId?"撤销此中转权限":"撤销此项授权"}))]},X.id)),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"设备标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed text-muted-foreground select-text",children:L.subjectId})]})]})]},L.subjectId)):l.jsxs("dl",{className:"space-y-4 text-xs",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"当前服务"}),l.jsx("dd",{className:"mt-1 text-sm",children:i||"当前服务"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"服务标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed select-text",children:a})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"本设备标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed select-text",children:s})]})]})}),z&&l.jsxs("form",{className:"space-y-4 py-1",onSubmit:async L=>{L.preventDefault(),le("");let X;try{X=un(ie.trim())}catch{le("请输入完整的 Termdock 邀请链接。");return}ee(!1),Z(""),await ls(X)},children:[l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:"请粘贴分享者重新生成的邀请链接。"}),l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"新的邀请链接"}),l.jsx("input",{className:Gt,type:"text",required:!0,autoFocus:!0,autoComplete:"off",spellCheck:!1,placeholder:"粘贴完整链接",value:ie,onChange:L=>{Z(L.target.value),le("")}})]}),l.jsx("button",{type:"submit",className:`${ir} w-full text-sm`,disabled:se||!ie.trim(),children:"接受新邀请"})]}),ae&&!pe&&!z&&l.jsxs("section",{className:"space-y-5 py-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-surface-2 text-muted-foreground",children:l.jsx(yi,{size:22})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"受邀连接的服务"}),l.jsx("p",{className:"mt-1 break-words text-base font-medium",children:oD(ae)})]})]}),U&&l.jsxs("div",{role:"alert",className:"flex gap-3 rounded-xl border border-border bg-surface-2 p-4",children:[U.kind==="connection"?l.jsx(zw,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}):U.kind==="expired"?l.jsx(Da,{size:20,className:"mt-0.5 shrink-0 text-warning"}):l.jsx(cw,{size:20,className:"mt-0.5 shrink-0 text-warning"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-sm font-medium",children:U.title}),l.jsx("p",{className:"mt-1.5 text-sm leading-6 text-muted-foreground",children:U.description})]})]}),ae.routeOnly&&!U&&l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"此邀请提供备用连接,目标服务仍会验证你的访问权限。"}),Y?l.jsxs("div",{className:"grid grid-cols-2 gap-3","aria-label":"选择打开方式",children:[l.jsxs("a",{href:$,"aria-disabled":se||void 0,onClick:L=>{se&&L.preventDefault()},className:"min-w-0 rounded-xl border border-primary bg-primary/10 p-3 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:p-4",children:[l.jsxs("span",{className:"mb-3 flex items-center justify-between gap-2 text-primary",children:[l.jsx(hw,{size:21,"aria-hidden":"true"}),l.jsx("span",{className:"rounded bg-primary/10 px-1.5 py-0.5 text-[10px]",children:"推荐"})]}),l.jsx("span",{className:"block text-base font-medium",children:"HTTPS 打开 ↗"}),l.jsx("span",{className:"mt-2 block text-xs leading-5",children:"功能完整,无需安装 CA"}),l.jsx("span",{className:"mt-2 block text-xs leading-5 text-muted-foreground",children:"若提示不安全,选择继续访问即可。"})]}),l.jsxs("button",{type:"button",disabled:se,onClick:()=>{ls(ae)},className:"min-w-0 rounded-xl border border-border bg-surface-2 p-3 text-left hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 sm:p-4",children:[l.jsx(ow,{size:21,className:"mb-3 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:"block text-base font-medium",children:se?"正在连接…":"HTTP 打开 ↗"}),l.jsx("span",{className:"mt-2 block text-xs leading-5",children:"直接访问,部分功能缺失"}),l.jsx("span",{className:"mt-2 block text-xs leading-5 text-muted-foreground",children:"如主动读取剪贴板、视频预览等可能不可用。"})]})]}):C?l.jsxs("form",{className:"space-y-3",onSubmit:async L=>{L.preventDefault(),ye(!0),le("");try{await n?.(ae,P)}catch(X){le(X instanceof Error?X.message:"暂时无法登录,请重试。")}finally{j(""),ye(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"目标服务密码"}),l.jsx("input",{className:Gt,type:"password",required:!0,autoFocus:!0,autoComplete:"current-password",value:P,onChange:L=>j(L.target.value)})]}),l.jsx("button",{className:`${ir} w-full`,disabled:se||!P,children:se?"正在登录…":"登录并连接"})]}):U&&!U.retryable?l.jsx("button",{type:"button",className:`${ir} w-full text-sm`,onClick:()=>{ee(!0),le("")},children:"输入新的邀请链接"}):l.jsx("button",{type:"button",className:`${ir} w-full text-sm`,disabled:se,onClick:()=>{ls(ae)},children:se?"正在连接…":U?"重试连接":"接受邀请"}),(!U||U.retryable)&&!C&&l.jsx(X0,{invitation:ae,compact:!0}),Y&&l.jsxs("details",{className:"border-t border-border pt-3 text-xs leading-6 text-muted-foreground",children:[l.jsx("summary",{className:"cursor-pointer",children:"不想看到证书提示?"}),l.jsx("p",{className:"mt-2",children:"可选安装本地 CA 证书,之后通过 HTTPS 打开。只信任你认识的分享方。"}),l.jsx("a",{className:"inline-flex min-h-11 items-center text-primary underline underline-offset-2",href:ae.certificateUrl,target:"_blank",rel:"noopener noreferrer",children:"安装本地 CA 证书"})]})]}),pe&&!gn&&l.jsxs("section",{children:[!S&&is.length>0&&l.jsxs("p",{role:"alert",className:"mb-3 text-xs text-destructive",children:["有 ",is.length," 个会话尚未加载或不属于此服务,暂不能生成完整分享。跨服务协作组请分别在所属服务创建邀请。"]}),Xe?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:l.jsx(Mn,{size:20})}),l.jsxs("div",{children:[l.jsx("p",{role:"status",className:"text-base font-medium",children:Xe.expiresAt!==null&&Xe.expiresAt<=Yn?"邀请链接已过期":Ch==="copied"?"链接已复制":"链接已生成"}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:Xe.expiresAt!==null&&Xe.expiresAt<=Yn?"重新生成即可获得新链接":`${re?"可重复使用":"单次使用"} · ${Xe.expiresAt===null?"直到撤销有效":W==="600000"?"10 分钟内有效":new Date(Xe.expiresAt).toLocaleString()+" 前有效"}`})]})]}),Ve&&l.jsxs("div",{className:"rounded-xl border border-border p-3",children:[l.jsx("p",{className:"break-words text-sm font-medium",children:yl(Ve.scope,Ve.sessionAppearance)}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[Ns(Ve.actions)," · ",Ve.viewMode==="chat"?"普通对话":"终端"," · 访问",Ve.expiresAt?`至 ${new Date(Ve.expiresAt).toLocaleString()}`:"保留至撤销"]}),l.jsx(Ql,{resources:Ve.resources})]}),l.jsxs("label",{className:"block space-y-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"分享链接"}),l.jsx("input",{"aria-label":"分享链接",readOnly:!0,value:Xe.url,onFocus:L=>L.currentTarget.select(),className:`${Gt} text-sm`})]}),Xe.certificateFingerprint&&l.jsxs("div",{className:"text-xs leading-relaxed text-muted-foreground",children:[l.jsx("p",{children:"接收方可直接接受邀请,通过 HTTP 进入;安装 CA 证书是可选的 HTTPS 方式。"}),l.jsxs("details",{className:"mt-2",children:[l.jsx("summary",{className:"min-h-9 cursor-pointer",children:"向接收方核对证书指纹"}),l.jsx("p",{className:"mt-1",children:"通过你们已信任的对话渠道发送此 SHA-256 指纹,确认引导页证书属于你的设备。"}),l.jsx("code",{className:"mt-2 block select-all break-all rounded-lg bg-background p-2 text-foreground",children:Xe.certificateFingerprint})]})]}),Ch==="failed"&&l.jsx("p",{role:"status",className:"text-xs text-muted-foreground",children:"未能自动复制,请点击下方按钮或选中链接复制。"}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"HTTP 入口无需安装证书;选择 HTTPS 时需信任服务证书。"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1",children:[l.jsxs("button",{type:"button","aria-expanded":ts,className:`${dt} inline-flex items-center gap-2 text-xs text-muted-foreground`,onClick:()=>no(L=>!L),children:[l.jsx(Cw,{size:15}),ts?"隐藏二维码":"显示二维码"]}),l.jsx("button",{type:"button",className:`${dt} text-xs text-muted-foreground`,onClick:()=>{mn.current++,rs(void 0),no(!1),mr("idle"),be(""),le("")},children:"调整分享内容 / 重新生成"})]}),ts&&(Rh?l.jsx("img",{src:Rh,width:220,height:220,className:"mx-auto max-w-full rounded-xl",alt:"设备邀请二维码"}):l.jsx("div",{className:"mx-auto flex h-48 w-48 items-center justify-center",children:l.jsx(Qe,{size:22,className:"animate-spin text-muted-foreground"})})),Xe.id&&Uh(Xe.id)]}):l.jsxs("form",{id:"federation-invite-form",className:"space-y-3",onSubmit:Fh,children:[l.jsxs("fieldset",{disabled:S||se||ke==="full",children:[l.jsx("legend",{className:"mb-2 text-xs text-muted-foreground",children:"分享范围"}),l.jsx("div",{className:"grid grid-cols-2 gap-2",children:[["selected","指定会话"],["all","全部终端"]].map(([L,X])=>{const Te=(ke==="full"?"all":H)===L;return l.jsxs("label",{className:`flex min-h-11 cursor-pointer items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm transition focus-within:ring-2 focus-within:ring-ring ${Te?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:bg-surface-2"}`,children:[l.jsx("input",{type:"radio",name:"federation-scope",value:L,checked:Te,onChange:()=>he(L),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${Te?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:Te&&l.jsx(Mn,{size:11})}),X]},L)})})]}),H==="selected"&&ke!=="full"?l.jsxs("section",{"aria-label":"分享会话",className:"flex min-h-14 items-center gap-3 rounded-xl bg-surface-2 px-3 py-2",children:[l.jsx("span",{className:"shrink-0 text-primary",children:l.jsx(fi,{icon:as.length===1?Ie[as[0].sessionId]?.icon:void 0,size:22})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"已选会话"}),l.jsx("p",{className:"line-clamp-2 break-words text-sm font-medium",children:NS||(S?"正在准备当前会话…":"选择要分享的会话")})]}),l.jsx("button",{type:"button","aria-label":ue.length?`已选 ${ue.length} 个`:"选择终端",className:`${dt} shrink-0 text-xs text-primary`,disabled:S||se,onClick:()=>{cl(ue),Ui(!0)},children:ue.length?"更改":"选择"})]}):l.jsx("p",{className:"text-xs text-muted-foreground",children:"包含以后新建的终端"}),l.jsxs("fieldset",{children:[l.jsx("legend",{className:"sr-only",children:"访问权限"}),l.jsx("div",{className:"grid grid-cols-2 gap-2",children:[["read","仅查看","不能输入或发送消息"],["write","可操作","允许对话和终端输入"],["chat","仅对话","可发消息,不控制终端"]].map(([L,X,Te])=>l.jsxs("label",{className:`flex min-h-14 cursor-pointer items-center gap-2 rounded-xl border px-3 py-2 transition focus-within:ring-2 focus-within:ring-ring ${ke===L?"border-primary bg-primary/10":"border-border hover:bg-surface-2"}`,children:[l.jsx("input",{type:"radio",name:"federation-permission",value:L,checked:ke===L,onChange:()=>Pe(L),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${ke===L?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:ke===L&&l.jsx(Mn,{size:11})}),l.jsxs("span",{children:[l.jsx("span",{className:"block text-sm font-medium",children:X}),l.jsx("span",{className:"mt-0.5 block text-[11px] leading-4 text-muted-foreground",children:Te})]})]},L))})]}),l.jsx("button",{type:"button",className:`${dt} w-full border border-border text-left text-xs`,"aria-expanded":ke==="custom",onClick:()=>Pe("custom"),children:"按功能自定义权限"}),ke==="custom"&&l.jsxs("fieldset",{className:"space-y-1 rounded-xl border border-border p-3",children:[l.jsx("legend",{className:"px-1 text-xs text-muted-foreground",children:"开放给接收者的功能"}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:et,onChange:L=>{mt(L.target.checked),L.target.checked||Tt(!1)}}),"查看对话"]}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:vt,onChange:L=>{Tt(L.target.checked),L.target.checked&&mt(!0)}}),"发送对话消息"]}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:xt,onChange:L=>{sn(L.target.checked),L.target.checked||ne(!1)}}),"查看终端预览(未授权控制时只读)"]}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:G,onChange:L=>{ne(L.target.checked),L.target.checked&&sn(!0)}}),"终端输入与控制"]})]}),(ke==="chat"||ke==="custom"&&vt&&!G)&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"只向运行中的 tmux Agent 投递普通消息,不支持退出命令或终端按键。Agent 自身的工具权限不受此开关隔离。"}),l.jsxs("fieldset",{className:"flex items-center gap-3",children:[l.jsx("legend",{className:"sr-only",children:"打开后的默认视图"}),l.jsx("span",{className:"w-[72px] shrink-0 text-xs text-muted-foreground",children:"打开方式"}),l.jsx("div",{className:"grid flex-1 grid-cols-2 gap-2",children:[["chat","普通对话",gi],["terminal","终端",nf]].map(([L,X,Te])=>l.jsxs("button",{type:"button",disabled:ke==="chat"&&L==="terminal"||ke==="custom"&&(L==="chat"?!et:!xt),"aria-pressed":fl===L,className:`${dt} inline-flex items-center justify-center gap-2 border ${fl===L?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground"}`,onClick:()=>Me(L),children:[l.jsx(Te,{size:15}),X]},L))})]}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"链接使用"}),l.jsxs("select",{"aria-label":"链接使用",className:`${Gt} min-w-0 flex-1 text-sm`,value:re?"multiple":"single",onChange:L=>fe(L.target.value==="multiple"),children:[l.jsx("option",{value:"single",children:"仅接受一次"}),l.jsx("option",{value:"multiple",children:"可重复使用"})]})]}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"链接有效期"}),l.jsxs("select",{"aria-label":"链接有效期",className:`${Gt} min-w-0 flex-1 text-sm`,value:W,onChange:L=>Q(L.target.value),children:[l.jsx("option",{value:"600000",children:"10 分钟"}),l.jsx("option",{value:"86400000",children:"1 天"}),l.jsx("option",{value:"604800000",children:"7 天"}),l.jsx("option",{value:"never",children:"直到撤销"})]})]}),re&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"持链接者可接受邀请;撤销此链接会同时撤销由它产生的访问授权。"}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"访问有效期"}),l.jsxs("select",{"aria-label":"访问有效期",className:`${Gt} min-w-0 flex-1 text-sm`,value:Th,onChange:L=>_S(L.target.value),children:[l.jsx("option",{value:"never",children:"直到撤销"}),l.jsx("option",{value:"3600000",children:"1 小时"}),l.jsx("option",{value:"86400000",children:"1 天"}),l.jsx("option",{value:"604800000",children:"7 天"}),l.jsx("option",{value:"custom",children:"自定义时间"})]})]}),Th==="custom"&&l.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"授权到期时间"}),l.jsx("input",{type:"datetime-local",className:Gt,value:ns,onChange:L=>Mi(L.target.value)})]}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"链接地址"}),l.jsxs("select",{"aria-label":"接入地址",className:`${Gt} min-w-0 flex-1 text-sm`,value:gr,onChange:L=>rt(L.target.value),children:[l.jsxs("option",{value:"",children:["当前地址 · ",new URL(dl).host]}),u.map(L=>l.jsxs("option",{value:L.url,children:[L.label," · ",new URL(L.url).host]},L.url)),l.jsx("option",{value:"custom",children:"自定义地址"})]})]}),gr==="custom"&&l.jsx("input",{"aria-label":"自定义接入地址",type:"text",className:Gt,inputMode:"url",placeholder:"例如:https://192.168.1.23:9834",value:We,onChange:L=>Ct(L.target.value)}),PS&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"当前地址仅供这台电脑使用。其他设备需选择能访问的域名或 IP 地址。"}),ke==="write"&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"终端命令可读写该系统用户有权访问的文件。"}),ke==="full"&&l.jsx("p",{className:"text-xs leading-5 text-destructive",children:"当前为完整服务权限,包含设置和权限管理。"}),l.jsxs("label",{className:"flex min-h-11 cursor-pointer items-start gap-3 rounded-xl border border-border p-3 text-sm",children:[l.jsx("input",{type:"checkbox",className:"mt-1 shrink-0 accent-primary",checked:Re,onChange:L=>Ge(L.target.checked)}),l.jsxs("span",{children:[l.jsx("span",{className:"block",children:"显示访问方式引导"}),l.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:"可信 HTTPS 域名可关闭,访客直接接受邀请。"})]})]}),l.jsxs("button",{type:"button","aria-expanded":ol,className:"flex min-h-9 w-full items-center justify-between text-xs text-muted-foreground",onClick:()=>sl(L=>!L),children:["更多选项",l.jsxs("span",{className:"flex items-center gap-1",children:["名称、图标与附带资源",l.jsx(Or,{size:13,className:ol?"rotate-180":""})]})]}),ol&&l.jsxs("div",{className:"space-y-4 border-t border-border pt-3",children:[ke!=="full"&&H==="selected"&&as.length>0&&l.jsx(Rj,{sessions:as,value:Ie,onChange:Ye}),l.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:Gt,value:Oi,onChange:L=>Ah(L.target.value),placeholder:"例如:项目协作"})]}),d&&l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:de,onChange:L=>De(L.target.checked)}),"让新设备也能使用备用连接"]}),l.jsxs("fieldset",{className:"space-y-2",children:[l.jsx("legend",{className:"text-xs text-muted-foreground",children:"管理权限"}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:ke==="full",onChange:L=>Pe(L.target.checked?"full":"read")}),"授予完整服务权限"]}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"完整权限包含所有终端、文件、设备、设置和权限管理。"})]}),ke!=="full"&&l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:te,onChange:L=>K(L.target.checked)}),"允许接收者清空自己的聊天显示"]}),ke!=="full"&&l.jsx(Cj,{value:Fe,onChange:Ce,expanded:!0})]})]})]}),gn&&l.jsxs("section",{children:[l.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"仅允许访问勾选的终端。"}),l.jsxs("div",{className:"space-y-1",children:[k.map(L=>l.jsxs("label",{className:"flex min-h-12 cursor-pointer items-center gap-3 rounded-lg px-2 py-2 text-sm hover:bg-surface-2",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:oo.includes(L.sessionId),onChange:X=>cl(X.target.checked?[...oo,L.sessionId]:oo.filter(Te=>Te!==L.sessionId))}),l.jsx("span",{className:"min-w-0 break-words",children:L.name})]},L.sessionId)),!k.length&&l.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"当前没有可共享的终端。"})]})]}),I&&l.jsxs("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:[I,R&&l.jsx("button",{type:"button",className:`${dt} ml-1 text-sm underline`,onClick:R,children:"重试"})]}),!ae&&!J.title&&!D&&!ro&&!os&&!gn&&!Xe&&!pe&&l.jsxs("div",{className:"mt-4 border-t border-border pt-2",children:[l.jsxs("button",{type:"button",className:`${dt} -ml-3 inline-flex items-center gap-1 bg-transparent text-xs text-muted-foreground`,"aria-expanded":so?void 0:rl,onClick:()=>so?_h(!0):Di(L=>!L),children:[pe?"有效期与备注":D?"手动连接":Xn==="devices"?"授权详情":"连接详情",so?l.jsx(Un,{size:14}):l.jsx(Or,{size:13,className:rl?"rotate-180":""})]}),rl&&l.jsxs("section",{className:"space-y-3 pb-1 pt-2",children:[pe&&l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"block space-y-1 text-sm",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:Gt,value:Oi,onChange:L=>Ah(L.target.value),placeholder:"例如:工作电脑"})]}),l.jsxs("label",{className:"block space-y-1 text-sm",children:[l.jsx("span",{children:"授权到期时间"}),l.jsx("input",{type:"datetime-local",className:Gt,value:ns,onChange:L=>Mi(L.target.value)})]})]}),!pe&&s&&l.jsxs("p",{className:"break-all text-xs leading-relaxed text-muted-foreground",children:["本设备身份:",s]})]})]}),ge&&l.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:ge}),ce&&l.jsx("p",{role:"status",className:"mt-3 text-sm text-muted-foreground",children:ce})]}),pe&&!gn&&l.jsx("footer",{className:"shrink-0 border-t border-border bg-surface px-5 pt-3 pb-[max(12px,env(safe-area-inset-bottom))]",children:Xe?l.jsxs("button",{type:"button",className:`${ir} inline-flex w-full items-center justify-center gap-2`,disabled:se,onClick:()=>{Xe.expiresAt!==null&&Xe.expiresAt<=Yn?Fh():DS()},children:[l.jsx(mi,{size:16}),se?"正在生成…":Xe.expiresAt!==null&&Xe.expiresAt<=Yn?"重新生成链接":"复制邀请链接"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"submit",form:"federation-invite-form",className:`${ir} inline-flex w-full items-center justify-center gap-2`,disabled:se||S||is.length>0||ke==="custom"&&!et&&!xt,children:[se&&l.jsx(Qe,{size:16,className:"animate-spin"}),se?"正在生成…":S?"正在准备分享…":"生成并复制链接"]}),l.jsxs("p",{className:"mt-2 text-center text-[11px] leading-4 text-muted-foreground",children:[re?"链接可重复接受":"链接单次接受"," · ",W==="never"?"直到撤销有效":W==="600000"?"10 分钟内有效":"按所选时间到期"," · 接收后",ns?"按所选时间到期":"可访问至撤销"]})]})}),gn&&l.jsx("footer",{className:"shrink-0 border-t border-border px-5 pt-3 pb-[max(16px,env(safe-area-inset-bottom))]",children:l.jsxs("button",{type:"button",className:`${ir} w-full text-sm`,disabled:!oo.length,onClick:()=>{xe(oo),he("selected"),Ui(!1)},children:["使用所选终端(",oo.length,")"]})})]})}),document.body)}const Zo=pr(()=>({modes:{},errors:{}})),Dg=e=>Zo.setState(t=>({errors:{...t.errors,[e]:void 0}})),_n=new Map,vc=e=>e==="terminal"||e==="chat";function Bo(e,t){Zo.setState(n=>({modes:{...n.modes,[e]:t}}));try{localStorage.setItem(e,t)}catch{}}const Ou=()=>oe()?.targetPeerId||location.origin,J0=e=>`termdock:session-view:${Ou()}:${e}`;function c3(e){const t=J0(e),n=Zo.getState().modes[t];if(n)return n;try{const r=localStorage.getItem(t);if(vc(r))return r}catch{}return"terminal"}function l3(e,t){const n=Ou(),r=J0(e);Bo(r,t);let o=_n.get(r);o||(o={key:r,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>Ou()===n&&!He()?.closed},_n.set(r,o)),xc(o,t)}async function xc(e,t){if(e.queued=t,e.epoch++,e.writing)return;e.writing=!0;let n=He();try{for(;e.queued&&e.current();){const r=e.queued;e.queued=void 0,n=He();const o=await fetch(e.url,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:r})});if(!o.ok)throw new Error("模式保存失败");const s=await o.json();if(!vc(s.mode))throw new Error("模式保存失败");He()===n&&e.current()&&(e.confirmed=s.mode,e.queued||Bo(e.key,s.mode))}}catch{!e.queued&&e.current()&&He()===n&&(e.confirmed&&Bo(e.key,e.confirmed),Zo.setState(r=>({errors:{...r.errors,[e.key]:"显示模式未保存,请检查连接后重新切换"}})))}finally{e.writing=!1,e.queued&&e.current()?xc(e,e.queued):!e.refs&&_n.get(e.key)===e&&_n.delete(e.key)}}function cD(e,t=!0,n="terminal",r=!1){const o=oe()?.targetPeerId||location.origin,s=`termdock:session-view:${o}:${e}`,i=Zo(u=>u.modes[s]),a=Zo(u=>u.errors[s]);let c,d=n;try{const u=localStorage.getItem(s);vc(u)&&(c=u),sessionStorage.getItem(`termdock:shared-view:${o}`)==="chat"&&(d="chat")}catch{}return w.useEffect(()=>{if(!e||!t)return;let u=_n.get(s);u||(u={key:s,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>(oe()?.targetPeerId||location.origin)===o&&!He()?.closed},_n.set(s,u)),u.refs++;const f=u,h=async()=>{if(f.writing||f.reading||!f.current()||document.visibilityState==="hidden")return;const g=f.epoch,m=He();f.reading=!0;try{const b=await fetch(f.url);if(!b.ok)return;const y=await b.json();if(f.epoch!==g||f.writing||!f.current()||He()!==m||_n.get(s)!==f)return;if(vc(y.mode))f.confirmed=y.mode,Bo(s,y.mode);else if(y.mode===null&&(r||c)){const k=r?n:c;Bo(s,k),xc(f,k)}}catch{}finally{f.reading=!1}};u.timer||(h(),u.timer=setInterval(()=>{h()},2500));const p=()=>{document.visibilityState==="visible"&&h()};return window.addEventListener("online",p),document.addEventListener("visibilitychange",p),()=>{window.removeEventListener("online",p),document.removeEventListener("visibilitychange",p),--f.refs===0&&(clearInterval(f.timer),f.timer=void 0,f.writing||_n.delete(s))}},[e,t,s,o,n,r]),[i||(r?d:c||d),u=>{if(!e)return;Dg(s),Bo(s,u);const f=_n.get(s);f&&xc(f,u)},a,()=>Dg(s)]}function Be(){try{if(window.parent!==window&&location.pathname==="/workspace.html"&&window.parent.location.origin===location.origin&&window.parent.__termdockWorkspaceHost)return window.parent}catch{}return window}const lD="debug",dD="termdock:debug";function Og(e){return e?new Set(e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean)):new Set}function uD(){if(typeof window>"u")return new Set;const e=Og(new URLSearchParams(window.location.search).get(lD));let t=new Set;try{t=Og(window.localStorage.getItem(dD))}catch{t=new Set}const n=new Set([...e,...t]);return n.has("1")||n.has("true")||n.has("*")||n.has("all")?new Set(["*"]):n}function fD(e){const t=uD();return t.has("*")||t.has(e)}function hD(e){const t=fD(e);return(...n)=>{t&&console.log(`[debug:${e}]`,...n)}}function Zc(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function d3(){if(typeof window>"u")return!1;const e=Be().navigator;return/iPhone|iPod/.test(e.userAgent)||/Android.*Mobile/.test(e.userAgent)||e.userAgentData?.mobile===!0}function Z0(){if(typeof window>"u")return!1;const e=Be(),t=e.navigator.maxTouchPoints>0||"ontouchstart"in e;return Zc()||t&&Math.min(e.innerWidth,e.innerHeight)<768}function Zs(){return Zc()}function u3(e){Zs()?e?.focus():e?.focus({preventScroll:!0})}function Mg(){const e=document.getElementById("root");if(!e)return 0;let t=e.getBoundingClientRect().top,n=window;const r=Be();try{for(;n!==r&&n.frameElement;)t+=n.frameElement.getBoundingClientRect().top,n=n.parent}catch{}return Math.round(-t*100)/100||0}const Bg=80,pD=60,mD="termdock:viewport-keyboard-change",gD="termdock:viewport-layout-change",Dn=240,Fg=640,Ug=360,yD=1500;function wD({measuredHeight:e,documentVisible:t,editableFocused:n}){return t&&n&&e>0}function Hg(){if(typeof document>"u")return!1;const e=document.activeElement;return e instanceof HTMLElement&&e.matches('input:not([type="hidden"]), textarea, select, [contenteditable]:not([contenteditable="false"])')}const Sc=e=>{const t=typeof e=="number"?e:Number.parseFloat(typeof e=="string"?e:"0");return Number.isFinite(t)&&t>0?Math.round(t):0},Q0=(e,t)=>{const n=e.map(Sc).filter(r=>r>0);return n.find(r=>r>=Dn)??n[0]??t},Qs=()=>typeof window>"u"?Fg:Q0([Be().innerHeight,document.documentElement?.clientHeight,document.body?.clientHeight,Be().visualViewport?.height,window.screen?.availHeight,window.screen?.height],Fg),eS=()=>typeof window>"u"?Ug:Q0([Be().innerWidth,document.documentElement?.clientWidth,document.body?.clientWidth,Be().visualViewport?.width,window.screen?.availWidth,window.screen?.width],Ug),ar=e=>{const t=Number.parseFloat(e||"0");return Number.isFinite(t)?Math.max(0,Math.round(t)):0},tS=Zc,nS=()=>typeof window>"u"?!1:Be().navigator.standalone===!0||Be().matchMedia?.("(display-mode: standalone)").matches===!0,rS=()=>{if(typeof window>"u"||!tS()||!nS())return{top:0,right:0,bottom:0,left:0};const e=Qs()>=eS(),t=window.screen?.width||window.innerWidth,n=window.screen?.height||window.innerHeight,r=Math.min(t,n),o=Math.max(t,n);return r>=700?{top:Be().document.documentElement.dataset.termdockPwaStatusBar==="default"?0:20,right:0,bottom:20,left:0}:e?o<780?{top:20,right:0,bottom:0,left:0}:{top:o>=852?59:o>=844?47:44,right:0,bottom:34,left:0}:{top:0,right:0,bottom:0,left:0}};function bD(e="--app-vh"){if(typeof window>"u"||typeof document>"u")return;document.documentElement.dataset.termdockTouchViewport=String(Z0()||Be().innerWidth<=768),document.documentElement.dataset.termdockNativeKeyboard=String(Zs()),document.documentElement.dataset.termdockNativePan="false",document.documentElement.dataset.termdockIpadPwa=String(document.documentElement.dataset.termdockPwaStatusBar==="default"&&nS());const t=Sc(Be().visualViewport?.height),n=Math.max(0,Math.round(Be().visualViewport?.offsetTop??0)),r=Qs(),o=t>=Dn,s=o?Math.min(r,t+n):r,i=Math.max(r,o?t:r),a=document.documentElement.style;a.setProperty(e,`${Math.max(s,Dn)}px`),a.setProperty("--app-base-vh",`${Math.max(i,Dn)}px`),a.setProperty("--app-visible-vh",`${Math.max(s,Dn)}px`),a.setProperty("--app-visual-vh",`${o?Math.min(r,t):r}px`),a.setProperty("--app-vv-offset-top",`${n}px`),a.setProperty("--kb-translate-y","0px"),a.setProperty("--kb-margin-top","0px"),a.setProperty("--kb-height","0px"),a.setProperty("--app-native-pan","0px");const c=rS();c.top>0&&a.setProperty("--safe-top-inset",`${c.top}px`),c.right>0&&a.setProperty("--safe-right-inset",`${c.right}px`),c.bottom>0&&a.setProperty("--safe-bottom-inset",`${c.bottom}px`),c.left>0&&a.setProperty("--safe-left-inset",`${c.left}px`)}function vD(e={}){const{cssVarName:t="--app-vh"}=e,n=Ut.useMemo(()=>hD("viewport"),[]),r=Ut.useCallback(()=>{if(typeof window>"u")return 0;const u=Be().visualViewport,f=Qs();if(!u)return f;const h=Sc(u.height);if(h<Dn&&f>=Dn)return f;const p=u.offsetTop,m=h<f-1&&p>0&&p<=96?h+p:h,b=Math.max(0,Math.min(f,m));return b>0?Math.round(b):f},[]),[o,s]=Ut.useState(r),i=Ut.useRef(0),a=Ut.useRef(0),c=Ut.useRef(0),d=Ut.useRef(!1);return Ut.useEffect(()=>{if(typeof window>"u")return;let u=null,f=0,h=null,p="",g=null;const m=()=>{if(g?.isConnected)return g;try{return g=document.createElement("div"),g.setAttribute("aria-hidden","true"),g.style.cssText=["position:fixed","top:0","left:0","width:0","height:0","visibility:hidden","pointer-events:none","padding-top:constant(safe-area-inset-top)","padding-top:env(safe-area-inset-top,0px)","padding-right:constant(safe-area-inset-right)","padding-right:env(safe-area-inset-right,0px)","padding-bottom:constant(safe-area-inset-bottom)","padding-bottom:env(safe-area-inset-bottom,0px)","padding-left:constant(safe-area-inset-left)","padding-left:env(safe-area-inset-left,0px)"].join(";"),(document.body||document.documentElement).appendChild(g),g}catch{}return null},b=()=>{let M={top:0,right:0,bottom:0,left:0};try{const q=m();if(q){const z=getComputedStyle(q);M={top:ar(z.paddingTop),right:ar(z.paddingRight),bottom:ar(z.paddingBottom),left:ar(z.paddingLeft)}}}catch{}const F=Be();if(F!==window){const q=F.getComputedStyle(F.document.documentElement);M={top:Math.max(M.top,ar(q.getPropertyValue("--safe-top-inset"))),right:Math.max(M.right,ar(q.getPropertyValue("--safe-right-inset"))),bottom:Math.max(M.bottom,ar(q.getPropertyValue("--safe-bottom-inset"))),left:Math.max(M.left,ar(q.getPropertyValue("--safe-left-inset")))}}const B=rS(),U={top:Math.max(M.top,B.top),right:Math.max(M.right,B.right),bottom:Math.max(M.bottom,B.bottom),left:Math.max(M.left,B.left)};return document.documentElement.style.setProperty("--safe-top-inset",`${U.top}px`),document.documentElement.style.setProperty("--safe-right-inset",`${U.right}px`),document.documentElement.style.setProperty("--safe-bottom-inset",`${U.bottom}px`),document.documentElement.style.setProperty("--safe-left-inset",`${U.left}px`),U},y=(M,F,B,U)=>{const q=Math.max(F,B);if(i.current===0){i.current=q,a.current=M,document.documentElement.style.setProperty("--app-base-vh",`${q}px`);return}const z=Math.abs(M-a.current),ee=U<=Bg;(z>pD||ee)&&(i.current=q,a.current=M,document.documentElement.style.setProperty("--app-base-vh",`${q}px`))},k=(M="event")=>{u=null,document.documentElement.dataset.termdockNativeKeyboard=String(Zs());const F=Zs()?Mg():0;document.documentElement.style.setProperty("--app-native-pan",`${F}px`),document.documentElement.dataset.termdockNativePan=String(F>0),document.documentElement.dataset.termdockTouchViewport=String(Z0()||Be().innerWidth<=768);const B=r(),U=Math.round(Be().visualViewport?.offsetTop??0),q=Sc(Be().visualViewport?.height),z=q>=Dn?q:B,ee=Qs(),ie=eS(),Z=Math.max(0,z+U),ae=b(),$=ae.bottom,Y=Math.max(0,i.current-z-$);y(ie,ee,z,Y),s(Re=>Re===B?Re:B);const J=Number.parseInt(document.documentElement.style.getPropertyValue(t)||"0",10);document.documentElement.style.setProperty(t,`${B}px`),document.documentElement.style.setProperty("--app-vv-offset-top",`${U}px`),document.documentElement.style.setProperty("--app-visual-vh",`${z}px`);const we=i.current,ge=Math.min(B,z),le=Math.max(0,Math.min(we,Z)),ce=Math.max(0,Math.round(we-ge-$)),be=Hg(),se=wD({measuredHeight:ce,documentVisible:document.visibilityState==="visible",editableFocused:be}),ye=se?ce:0,pe=ye>=Bg,je=-ye,D=ye;document.documentElement.style.setProperty("--kb-translate-y",`${je}px`),document.documentElement.style.setProperty("--kb-margin-top",`${D}px`),document.documentElement.style.setProperty("--kb-height",`${ye}px`),document.documentElement.style.setProperty("--app-visible-vh",`${le}px`);const V=Math.abs(ye-c.current)>1,de=pe!==d.current;(V||de)&&(c.current=ye,d.current=pe,document.dispatchEvent(new CustomEvent(mD,{detail:{baseHeight:we,visibleHeight:le,visualViewportHeight:z,offsetTop:U,keyboardHeight:ye,isOpen:pe,source:M}}))),(J!==B||U>0||V||de)&&n("sync",{cssVarName:t,innerHeight:ee,baseHeight:we,rawViewportHeight:z,offsetTop:U,visibleHeight:le,rawHeight:B,appliedHeight:B,keyboardViewportHeight:ge,measuredKeyboardHeight:ce,editableFocused:be,applyKeyboardInset:se,keyboardHeight:ye,isKeyboardOpen:pe,safeAreaInsets:ae,source:M}),document.dispatchEvent(new CustomEvent(gD,{detail:{height:B,baseHeight:we,visibleHeight:le,offsetTop:U,source:M}}))},x=()=>{u===null&&(u=window.requestAnimationFrame(()=>{u=null;const M=Be(),F=M.visualViewport,B=[M.innerWidth,M.innerHeight,F?.width,F?.height,F?.offsetTop,F?.offsetLeft,document.visibilityState,Hg(),Zs()?Mg():0].join(":"),U=h;h=null,(U||B!==p)&&(p=B,k(U||"viewport.settle")),performance.now()<f&&x()}))},T=(M="event")=>{(M.includes("visibilitychange")||M.includes("pageshow"))&&n("schedule",{source:M}),h=M,tS()&&document.visibilityState==="visible"&&(f=performance.now()+yD),x()};T("mount");const _=()=>T("resize"),A=()=>T("native.scroll"),E=()=>T("orientationchange"),v=()=>T("visualViewport.resize"),S=()=>T("visualViewport.scroll"),I=()=>T("focusin"),R=()=>T("focusout"),C=M=>{f=0,c.current=0,d.current=!1;const F=Math.max(i.current,Qs(),Dn),B=document.documentElement.style;B.setProperty(t,`${F}px`),B.setProperty("--app-visible-vh",`${F}px`),B.setProperty("--app-vv-offset-top","0px"),B.setProperty("--kb-translate-y","0px"),B.setProperty("--kb-margin-top","0px"),B.setProperty("--kb-height","0px"),s(U=>U===F?U:F),n("keyboard session reset",{source:M,baseHeight:F})};window.addEventListener("resize",_),window.addEventListener("scroll",A,{passive:!0}),Be()!==window&&Be().addEventListener("scroll",A,{passive:!0}),window.addEventListener("orientationchange",E),Be().visualViewport?.addEventListener("resize",v),Be().visualViewport?.addEventListener("scroll",S),document.addEventListener("focusin",I),document.addEventListener("focusout",R);const N=M=>{n("resume",{source:M,innerHeight:Math.round(window.innerHeight),visualViewport:Be().visualViewport?{width:Math.round(Be().visualViewport.width),height:Math.round(Be().visualViewport.height),offsetTop:Math.round(Be().visualViewport.offsetTop)}:null,hidden:document.hidden}),T(M)},P=()=>{document.hidden?C("visibilitychange:hidden"):N("visibilitychange")},j=()=>N("pageshow"),O=()=>C("pagehide");return document.addEventListener("visibilitychange",P),window.addEventListener("pageshow",j),window.addEventListener("pagehide",O),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",A),Be()!==window&&Be().removeEventListener("scroll",A),window.removeEventListener("orientationchange",E),Be().visualViewport?.removeEventListener("resize",v),Be().visualViewport?.removeEventListener("scroll",S),document.removeEventListener("focusin",I),document.removeEventListener("focusout",R),document.removeEventListener("visibilitychange",P),window.removeEventListener("pageshow",j),window.removeEventListener("pagehide",O),u!==null&&window.cancelAnimationFrame(u),g?.remove()}},[t,n,r]),o}function xD(e){const t=new Map,n=new Map,r=new Map;for(const o of e){for(const s of o?.android??[])t.get(s.serial)?.access!=="control"&&t.set(s.serial,s);for(const s of o?.computers??[]){const i=JSON.stringify([s.host.toLowerCase(),s.protocol,s.port]);n.get(i)?.access!=="control"&&n.set(i,s)}for(const s of o?.directories??[])r.get(s.path)?.access!=="write"&&r.set(s.path,s)}return{android:[...t.values()],computers:[...n.values()],directories:[...r.values()]}}const $g=2,SD=new Set(["mount","init-fit","resize","layout-visible","dpr-change","session-key-change","session-reset","tmux-layout"]);function ED(e){const t=e.reason.replace(/^refresh:/,""),n=SD.has(t),r=Math.abs(e.proposedCols-e.currentCols),o=Math.abs(e.proposedRows-e.currentRows);return{accept:n?r>0||o>0:r>=$g||o>=$g,isRealResize:n,colsDelta:r,rowsDelta:o}}function f3(e){return e.before.cols!==e.after.cols||e.before.rows!==e.after.rows||e.lastServerSize===null||e.reconcileServerSize===!0&&(e.lastServerSize.cols!==e.after.cols||e.lastServerSize.rows!==e.after.rows)}function h3(e,t){return!e||t}function kD(e,t,n){return e!=="alternate"&&n>=t}function p3(e,t,n){return!n&&(e||t)}function zg(e,t){if(!e||e.lines.length===0||!Number.isFinite(t)||t<=0)return 0;const n=Math.floor(t),r=Number.isFinite(e.lines.maxLength)&&e.lines.maxLength>0?Math.floor(e.lines.maxLength):null;let o=0;if(r!==null){const c=Math.max(0,r-n);e.ybase>c&&(e.ybase=c,Number.isFinite(e.ydisp)&&(e.ydisp=Math.min(e.ydisp,c)),o++)}let s=Math.max(0,Math.floor(e.ybase)+n),i=r===null?s:Math.min(s,r),a=Math.max(0,i-e.lines.length);if(a>n){const c=Math.max(0,e.lines.length-n);e.ybase>c&&(e.ybase=c,Number.isFinite(e.ydisp)&&(e.ydisp=Math.min(e.ydisp,c)),o++),s=Math.max(0,Math.floor(e.ybase)+n),i=r===null?s:Math.min(s,r),a=Math.max(0,i-e.lines.length)}for(let c=0;c<a;c++){const d=e.lines.length;if(e.lines.push(e.getBlankLine(void 0)),e.lines.length<=d)break;o++}return o}function qg(e,t=e.rows){const r=e._core?._bufferService?.buffers;return r?zg(r.normal,t)+zg(r.alt,t):0}let yo=null;const ID=[{font:'400 14px "Termdock Maple"',text:"Termdock 0123456789 ~!@#$%^&*()[]{}"},{font:'700 14px "Termdock Maple"',text:"Termdock 0123456789 ~!@#$%^&*()[]{}"},{font:'400 14px "Termdock Prompt Icons"',text:""},{font:'700 14px "Termdock Prompt Icons"',text:""},{font:'400 13px "Noto Sans Mono CJK SC"',text:"终端中文路径"},{font:'700 13px "Noto Sans Mono CJK SC"',text:"终端中文路径"},{font:'400 13px "Termdock Star Symbol"',text:"✦✧"},{font:'400 13px "Noto Sans Symbols 2"',text:"⏺⏸⏹✓✗"}],CD=()=>{if(yo)return yo;if(typeof document>"u"||!("fonts"in document))return yo=Promise.resolve(),yo;const e=document.fonts;return yo=Promise.allSettled(ID.map(({font:n,text:r})=>e.load(n,r))).then(()=>e.ready).then(()=>{}).catch(()=>{}),yo};async function TD(e,t=()=>!0){return await CD(),t()?new US(typeof e=="function"?e():e):null}class AD{constructor(t,n,r,o){this.terminal=t,this.fitAddon=n,this.container=r,this.options=o}terminal;fitAddon;container;options;measured=null;layout=null;get dimensions(){return this.measured&&this.measured.cols===this.terminal.cols&&this.measured.rows===this.terminal.rows?{...this.measured}:null}fit(t,n,r=t){if(this.options.authority==="server"||!n&&t!=="initialize")return null;const o=this.container.getBoundingClientRect();if(o.width<24||o.height<24)return null;const s=this.fitAddon.proposeDimensions();if(!Kg(s))return null;const i=this.terminal,a={cols:i.cols,rows:i.rows},c=this.measured?t:"initialize",d=i.dimensions?.device.cell,u=d?JSON.stringify([o.width,o.height,d.width,d.height,window.devicePixelRatio]):null,f=u!==null&&u===this.layout,h=ED({reason:f?"stable-layout":c==="initialize"?"init-fit":c==="reveal"?"layout-visible":r,currentCols:a.cols,currentRows:a.rows,proposedCols:s.cols,proposedRows:s.rows}),p=qg(i,a.rows);let g=0;if(h.accept){c==="update"&&this.options.beforeLiveResize?.();const b=i.buffer.active,y=kD(b.type,b.baseY,b.viewportY),k=i.options.smoothScrollDuration;try{i.options.smoothScrollDuration=0,i.resize(s.cols,s.rows),g=qg(i,s.rows),y&&i.scrollToBottom()}finally{i.options.smoothScrollDuration=k}}(p||g)&&i.refresh(0,i.rows-1);const m={cols:i.cols,rows:i.rows};return this.measured=m,this.layout=u,{reason:r,backend:"xterm",width:Math.round(o.width),height:Math.round(o.height),before:a,proposed:s,next:m,hysteresis:h,repairedBeforeResize:p,repairedAfterResize:g,changed:a.cols!==m.cols||a.rows!==m.rows}}applyRemoteSize(t){return this.options.authority!=="server"||!Kg(t)?!1:(this.terminal.resize(t.cols,t.rows),this.measured=null,!0)}}function Kg(e){const t=e;return!!t&&Number.isSafeInteger(t.cols)&&Number.isSafeInteger(t.rows)&&t.cols>0&&t.rows>0}function Gg(){return{confirmed:null,pending:null,nextSeq:1}}function Wg(e,t){return e?.cols===t.cols&&e.rows===t.rows}function oS(e,t,n){const r={...t,seq:e.nextSeq,attempt:n};return{state:{...e,pending:r,nextSeq:e.nextSeq+1},request:r}}function RD(e,t){return Wg(e.pending,t)||!e.pending&&Wg(e.confirmed,t)?{state:e,request:null}:oS(e,t,0)}function PD(e,t){const n=e.pending;if(!n||t.seq!==n.seq)return{state:e,accepted:!1};const r=t.ok&&Number.isFinite(t.cols)&&Number.isFinite(t.rows)&&(t.cols??0)>0&&(t.rows??0)>0?{cols:Math.floor(t.cols),rows:Math.floor(t.rows)}:null;return{state:{...e,confirmed:r,pending:null},accepted:!0}}function m3(e,t,n=1){const r=e.pending;return!r||r.seq!==t?{state:e,request:null,exhausted:!1}:r.attempt>=n?{state:{...e,confirmed:null,pending:null},request:null,exhausted:!0}:{...oS(e,r,r.attempt+1),exhausted:!1}}function Vg(e,t){return!Number.isFinite(t.cols)||!Number.isFinite(t.rows)||t.cols<=0||t.rows<=0?e:{...e,confirmed:{cols:Math.floor(t.cols),rows:Math.floor(t.rows)}}}function g3(e){return{...e,pending:null}}const ND=150;function y3(e=0){return{lastPushAt:e}}function w3(e,t,n=ND){return t-e.lastPushAt>=n?(e.lastPushAt=t,{action:"send"}):{action:"hold",readyAt:e.lastPushAt+n}}function b3(e){return{lastPushAt:e}}const _D={background:"#1C1B1A",foreground:"#CECDC3",cursor:"#CECDC3",cursorAccent:"#1C1B1A",selectionBackground:"#403E3C",selectionForeground:"#CECDC3",selectionInactiveBackground:"#403E3C50",black:"#6F6E69",red:"#AF3029",green:"#66800B",yellow:"#AD8301",blue:"#205EA6",magenta:"#A02F6F",cyan:"#24837B",white:"#CECDC3",brightBlack:"#6F6E69",brightRed:"#D14D41",brightGreen:"#879A39",brightYellow:"#D0A215",brightBlue:"#4385BE",brightMagenta:"#CE5D97",brightCyan:"#3AA99F",brightWhite:"#FFFCF0"},LD={background:"#FFFCF0",foreground:"#100F0F",cursor:"#100F0F",cursorAccent:"#FFFCF0",selectionBackground:"#CECDC3",selectionForeground:"#100F0F",selectionInactiveBackground:"#CECDC350",black:"#100F0F",red:"#AF3029",green:"#66800B",yellow:"#AD8301",blue:"#205EA6",magenta:"#A02F6F",cyan:"#24837B",white:"#575653",brightBlack:"#6F6E69",brightRed:"#D14D41",brightGreen:"#879A39",brightYellow:"#D0A215",brightBlue:"#4385BE",brightMagenta:"#CE5D97",brightCyan:"#3AA99F",brightWhite:"#100F0F"};function jD(e){return e==="light"?LD:_D}const Mu=new Map;function DD(){for(const e of["mousemove","pointermove","mouseup","pointerup","pointercancel","blur","pagehide","keydown","visibilitychange"]){if(Mu.has(e))continue;const t=new Set;Mu.set(e,t),(e==="visibilitychange"?document:window).addEventListener(e,r=>{for(const o of[...t])o(r)},!0)}}function OD(e){DD();let t=!1,n;const r=[],o=(d,u,f)=>{const h=Mu.get(u);h&&(d===window||d===document)?(h.add(f),r.push(()=>{h.delete(f)})):(d.addEventListener(u,f,!0),r.push(()=>d.removeEventListener(u,f,!0)))},s=(d,u)=>{if(!t){t=!0,clearTimeout(n),r.forEach(f=>f());try{e.onFinish(d,u)}finally{const{captureTarget:f,pointerId:h}=e;if(f&&h!==void 0)try{f.hasPointerCapture?.(h)&&f.releasePointerCapture(h)}catch{}}}},i=d=>d.pointerId===e.pointerId,a=d=>{(d.buttons&1)===0&&s("buttons-lost",d)},c=d=>{e.deferRelease?n??=setTimeout(()=>s("release",d),0):s("release",d)};return e.pointerId===void 0?(o(window,"mousemove",d=>a(d)),o(window,"pointermove",d=>{d.pointerType==="mouse"&&a(d)}),o(window,"mouseup",d=>{const u=d;u.button===0&&c(u)}),o(window,"pointercancel",d=>{d.pointerType==="mouse"&&s("cancel",d)})):(o(window,"pointermove",d=>{const u=d;i(u)&&(e.pointerType==="mouse"||e.pointerType==="pen")&&a(u)}),o(window,"pointerup",d=>{i(d)&&c(d)}),o(window,"pointercancel",d=>{i(d)&&s("cancel",d)}),e.captureTarget&&o(e.captureTarget,"lostpointercapture",d=>{d.target===e.captureTarget&&i(d)&&s("capture-lost",d)})),o(window,"blur",d=>{d.target===d.currentTarget&&s("blur")}),o(window,"pagehide",()=>s("hidden")),o(document,"visibilitychange",()=>{document.hidden&&s("hidden")}),o(window,"keydown",d=>{d.key==="Escape"&&s("escape")}),()=>s("dispose")}function MD(e,t,n,r,o,s=1){let i=t,a=null,c=!1;const d=e.style.width,u=document.body.style.cursor,f=document.body.style.userSelect,h=()=>r(n+(i-t)*s),p=()=>{a=null,e.style.width=`${h()}px`},g=y=>{i=y.clientX,a===null&&(a=requestAnimationFrame(p))},m=y=>{c||(c=!0,window.removeEventListener("mousemove",g),b(),a!==null&&cancelAnimationFrame(a),a=null,document.body.style.cursor=u,document.body.style.userSelect=f,y?(p(),h()!==n&&o(h())):e.style.width=d)},b=OD({onFinish:(y,k)=>{y==="release"&&k&&(i=k.clientX),m(y!=="dispose"&&y!=="escape")}});return document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",g),()=>m(!1)}function Bs(e,t){const n=e.replace(/\r?\n/g,"\r");return`\x1B[200~${(t&&n.endsWith("\r")?n.slice(0,-1):n).replace(/\x1b/g,"␛")}\x1B[201~${t?"\r":""}`}function v3(e,t,n){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r+=1;let o=0;const s=e.length-r,i=t.length-r;for(;o<s&&o<i&&e[e.length-1-o]===t[t.length-1-o];)o+=1;const a=t.slice(r,t.length-o);return a&&(n==="insertFromPaste"||n==="insertFromPasteAsQuotation"||/[\r\n]/.test(a))?a:null}const ji=new Map;function BD(e,t,n,r=!1){if(!n||!t||!oh(e))return null;const o=`owned-paste-${crypto.randomUUID()}`;return ji.set(o,{source:e,layer:en(),sessionId:t,text:n,token:{nonce:o,submitAfterPaste:r}}),{nonce:o,text:n,sessionId:t,paste:!0,submitAfterPaste:r,focus:!1,ownedPaste:!0}}function FD(e){ji.delete(e)}function wh(e){return e.layer===en()&&oh(e.source)}function x3(e,t){const n=e.nonce?ji.get(e.nonce):void 0;return n&&wh(n)&&e.ownedPaste===!0&&e.paste===!0&&e.submitAfterPaste===n.token.submitAfterPaste&&n.sessionId===t&&e.sessionId===t&&e.text===n.text?n.token:null}function S3(e,t,n){const r=ji.get(e.nonce);return!r||r.token!==e||r.consumed?!1:(r.consumed=!0,wh(r)&&r.sessionId===t&&n===Bs(r.text,r.token.submitAfterPaste===!0))}function E3(e,t){const n=ji.get(e.nonce);return!!n&&n.token===e&&n.sessionId===t&&wh(n)}function k3(e){const t=en(),n=oe(),r=He();return()=>{const o=oe();return en()===t&&(!e||oh(e))&&o?.url===n?.url&&o?.targetPeerId===n?.targetPeerId&&He()===r&&!r?.closed}}function UD(e,t,n,r,o){if(!e||!t||!n())return Promise.resolve(!1);const s=r?BD(r,t,e,o?.submitAfterPaste===!0):null;if(r&&!s)return Promise.resolve(!1);const i=s?.nonce??`reference-${crypto.randomUUID()}`;return new Promise(a=>{let c=!1;const d=h=>{c||(c=!0,window.clearTimeout(f),window.removeEventListener("termdock-insert-reference-ack",u),s&&FD(i),a(h&&n()))},u=h=>{const p=h.detail;p?.nonce===i&&d(p.ok===!0)},f=window.setTimeout(()=>d(!1),1500);window.addEventListener("termdock-insert-reference-ack",u),window.dispatchEvent(new CustomEvent("termdock-insert-reference",{detail:s?{...s,...o?.reference?{reference:{...o.reference,text:e}}:{},focus:o?.focus??s.focus}:{text:e,sessionId:t,nonce:i,focus:!1,paste:!0,submitAfterPaste:!1,...o,...o?.reference?{reference:{...o.reference,text:e}}:{}}}))})}class ja extends Error{}function sS(e){if(!e.type.startsWith("image/")||e.size===0)throw new Error("Clipboard image is empty");const t=e.type==="image/jpeg"?"jpg":e.type.split("/")[1].replace(/[^a-z0-9]/gi,"")||"png";return new File([e],`termdock-clipboard-${Date.now()}-${crypto.randomUUID()}.${t}`,{type:e.type})}async function I3(e,t){const{files:n}=await Pi("/tmp",[sS(e)],t);if(!n[0]?.path)throw new Error("Upload did not return an image path");return n[0].path}async function Yg(e){const t=ct();if(t?.readClipboardImage){const n=await t.readClipboardImage();return n?.byteLength?new File([n],"clipboard.png",{type:"image/png"}):null}if(typeof e?.read!="function")return null;for(const n of await e.read()){const r=n.types.find(i=>i.startsWith("image/"));if(!r)continue;const o=await n.getType(r),s=r==="image/jpeg"?"jpg":r.split("/")[1].replace(/[^a-z0-9]/gi,"")||"png";return new File([o],`termdock-clipboard-${Date.now()}.${s}`,{type:r})}return null}async function HD(e){if(typeof e?.read!="function")return[];const t=[],n={"video/mp4":"mp4","video/quicktime":"mov","video/x-m4v":"m4v","video/webm":"webm","video/ogg":"ogv","video/mpeg":"mpeg","video/x-msvideo":"avi","video/x-matroska":"mkv","video/3gpp":"3gp","video/3gpp2":"3g2"};for(const r of await e.read()){const o=r.types.find(c=>c.startsWith("video/"));if(!o)continue;const s=await r.getType(o);if(!s.size)throw new Error("Clipboard video is empty");const i=o.split(";")[0].toLowerCase(),a=n[i]||i.slice(6).replace(/[^a-z0-9]/g,"")||"mp4";t.push(new File([s],`termdock-clipboard-${Date.now()}-${crypto.randomUUID()}.${a}`,{type:o}))}return t}async function $D(){const e=ht()?.targetPeerId;let t;try{t=await ct()?.readClipboardFiles?.({localServiceId:e})}catch(o){const s=o instanceof Error?o.message:String(o),i="TERMDOCK_CLIPBOARD_VIDEO_ERROR:",a=s.indexOf(i);if(a!==-1)throw new ja(s.slice(a+i.length).trim());const c=s.match(/execution error: Error: (复制来源未提供可读取的视频数据[^\r\n]*|无法读取剪贴板视频)(?:\s*\(-\d+\))?\s*$/);throw c?new ja(c[1]):o}if(ht()?.targetPeerId!==e)throw new Error("目标服务已切换,请重新粘贴");const n=[],r=[];for(const o of t??[])if(o.path&&e)r.push(o.path);else if(o.bytes){if(o.type?.startsWith("video/")&&o.bytes.byteLength===0)throw new ja("复制来源未提供可读取的视频数据,请重新复制视频或选择文件上传");n.push(new File([o.bytes],o.name,{type:o.type||"application/octet-stream"}))}else throw new Error("剪贴板未提供可读取的文件");return{files:n,paths:r}}async function C3(e,t){if(!e.length)return[];const{files:n}=await Pi("/tmp",e,t);if(n.length!==e.length||n.some(r=>!r.path))throw new Error("Upload did not return every file path");return n.map(r=>r.path)}function iS(){const e=ct();return!!(e?.readClipboardFiles||e?.readClipboardImage||navigator.clipboard?.read||navigator.clipboard?.readText)}function zD(e){return{files:e.files.length?Array.from(e.files):Array.from(e.items||[]).filter(n=>n.kind==="file").map(n=>n.getAsFile()).filter(n=>!!n),text:e.getData("text/plain")}}async function qD(e,t=()=>!0){const n=s=>{if(!t())throw new DOMException("目标服务已切换或粘贴操作已取消,请重新粘贴","AbortError");return s};n(null);const r=ct();if(!e&&!iS()&&globalThis.isSecureContext===!1)throw new Error("HTTP 页面无法主动读取剪贴板。请使用 Ctrl/Cmd+V、选择文件,或切换 HTTPS / Mac 客户端。");let o;if(r?.readClipboardFiles)try{const s=n(await $D());if(s.files.length||s.paths.length)return{kind:"files",...s}}catch(s){if(n(null),s instanceof ja)throw s;o=s}if(e?.files.length)return n({kind:"files",files:e.files,paths:[]});if(e?.text)return n({kind:"text",text:e.text});if(!r?.readClipboardImage&&typeof navigator.clipboard?.read=="function"){const s=n(await navigator.clipboard.read()),i={read:async()=>s},a=n(await HD(i));if(a.length)return{kind:"files",files:a,paths:[]};const c=n(await Yg(i));if(c)return{kind:"files",files:[c],paths:[]};for(const d of s)if(d.types.includes("text/plain"))return{kind:"text",text:n(await n(await d.getType("text/plain")).text())}}else if(r?.readClipboardImage){const s=n(await Yg());if(s)return{kind:"files",files:[s],paths:[]}}if(navigator.clipboard?.readText){const s=n(await navigator.clipboard.readText());if(s)return{kind:"text",text:s}}if(o)throw o;return{kind:"empty"}}const KD=[640,960,1280,1600,2048,2560,3072,4096],GD=[240,360,480,540,720,1080,1440,2160],Xg={min:.1,max:1,step:.01},Jg={min:25e4,max:2e7,step:25e4},bh="termdock:mobile-media-compression-v1",wo={showResultToast:!0,imageEnabled:!1,imageMaxDimension:2048,imageQuality:.8,videoEnabled:!1,videoMaxHeight:720,videoBitrate:25e5};function aS(){try{const e=JSON.parse(localStorage.getItem(bh)||"null");return!e||typeof e!="object"?wo:{showResultToast:e.showResultToast!==!1,imageEnabled:e.imageEnabled===!0,imageMaxDimension:KD.includes(e.imageMaxDimension)?e.imageMaxDimension:wo.imageMaxDimension,imageQuality:typeof e.imageQuality=="number"&&e.imageQuality>=Xg.min&&e.imageQuality<=Xg.max?e.imageQuality:wo.imageQuality,videoEnabled:e.videoEnabled===!0,videoMaxHeight:GD.includes(e.videoMaxHeight)?e.videoMaxHeight:wo.videoMaxHeight,videoBitrate:typeof e.videoBitrate=="number"&&e.videoBitrate>=Jg.min&&e.videoBitrate<=Jg.max?e.videoBitrate:wo.videoBitrate}}catch{return wo}}const cS=pr((e,t)=>({preferences:aS(),saveFailed:!1,update:n=>{const r={...t().preferences,...n};let o=!1;try{localStorage.setItem(bh,JSON.stringify(r))}catch{o=!0}e({preferences:r,saveFailed:o})}}));typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===bh||e.key===null)&&cS.setState({preferences:aS(),saveFailed:!1})});function lS(e,t){return t.videoEnabled&&e.type.startsWith("video/")?"video":t.imageEnabled&&(/\.(?:jpe?g|png|heic|heif)$/i.test(e.name)||/^(?:image\/jpeg|image\/png|image\/heic|image\/heif)$/i.test(e.type))?"image":null}async function WD(e,t,n,r){const o=lS(e,t);if(!o)throw new Error("此文件不需要媒体压缩");const s=()=>{if(!n())throw new DOMException("Cancelled","AbortError")};s();const i=o==="video"?await(await tn(async()=>{const{compressVideoLocally:a}=await import("./videoCompression-Bd2D9ZoI.js");return{compressVideoLocally:a}},__vite__mapDeps([3,1,2]))).compressVideoLocally(e,{maxHeight:t.videoMaxHeight,videoBitrate:t.videoBitrate,onProgress:a=>{n()&&r(a)}}):await(await tn(async()=>{const{compressImageLocally:a}=await import("./imageCompression-DaUBNTq-.js");return{compressImageLocally:a}},[])).compressImageLocally(e,{maxDimension:t.imageMaxDimension,quality:t.imageQuality});return s(),{file:i,kind:o,originalSize:e.size,uploadedSize:i.size,originalRetained:i===e}}function VD(e){const t=w.useRef(e);t.current=e;const[n,r]=w.useState(null),[o,s]=w.useState(null);w.useEffect(()=>s(null),[e.sessionId,e.active]);const i=w.useRef(null),a=w.useRef(!0),c=w.useCallback(()=>{i.current?.controller.abort();const m=t.current,b=ht(),y=He(),k=en(),x=document.activeElement,T=new AbortController,_=m.input.current,A={controller:T,at:t.current.selection?.()??{value:_?.textContent??"",start:(_?.textContent??"").length,end:(_?.textContent??"").length},current:()=>a.current&&!T.signal.aborted&&i.current===A&&t.current.active&&t.current.canWrite&&t.current.sessionId===m.sessionId&&ht()===b&&He()===y&&!y?.closed&&en()===k,focus:()=>document.activeElement===x||document.activeElement===m.input.current||document.activeElement===document.body};return i.current=A,A},[]);w.useEffect(()=>{const m=()=>{i.current&&!i.current.current()&&(i.current.controller.abort(),i.current=null,r(null))};m();const b=()=>{i.current?.controller.abort(),i.current=null,r(null),s(null)};return window.addEventListener("termdock:secure-state",m),window.addEventListener("auth:unauthorized",b),document.addEventListener("focusin",m),()=>{window.removeEventListener("termdock:secure-state",m),window.removeEventListener("auth:unauthorized",b),document.removeEventListener("focusin",m)}},[e.active,e.canWrite,e.sessionId]),w.useEffect(()=>(a.current=!0,()=>{a.current=!1,i.current?.controller.abort()}),[]);const d=w.useCallback(async(m,b,y=[],k)=>{if(!m.current())return;const x=cS.getState().preferences,T=k&&JSON.stringify(k.preferences)===JSON.stringify(x),_=T?[...k.prepared]:[],A=T?[...k.results]:[],E=(v,S={})=>{m.current()&&r({stage:v,files:b,paths:y,preferences:x,prepared:[..._],results:[...A],...S})};t.current.error(""),s(null);try{if(b.length&&!t.current.directory&&!t.current.sessionAttachments)throw new Error("附件上传暂不可用,请重试");for(let R=_.length;R<b.length;R++){const C=b[R];if(t.current.mediaCompression&&lS(C,x)){E("compressing",{fileName:C.name,fileIndex:R+1});const N=await WD(C,x,m.current,P=>E("compressing",{percent:Math.round(P),fileName:C.name,fileIndex:R+1}));if(!m.current())return;_.push(N.file),A.push(N)}else _.push(C)}if(!m.current())return;E("uploading",{percent:b.length?0:void 0});const v=R=>E("uploading",{percent:Math.round(R)}),S=b.length?t.current.sessionAttachments?await s0(t.current.sessionId,_,m.controller.signal,v,m.current):await Pi(t.current.directory,_,m.controller.signal,v,m.current):{files:[]};if(!m.current())return;if(S.files.length!==b.length||S.files.some(R=>!R.path))throw new Error("部分文件未上传成功,请重试");const I=[...y,...S.files.map(R=>R.path)];if(!I.length)throw new Error("没有可添加的文件");t.current.attach?t.current.attach([...y.map(R=>({path:R,name:R.split("/").pop()||R})),...S.files.map((R,C)=>({path:R.path,name:_[C].name,type:_[C].type,size:_[C].size}))],m.focus(),m.at):t.current.insert(`${I.map(tb).join(" ")} `,m.focus()),s(A.at(-1)??null),r(null),i.current=null}catch(v){if(!m.current())return;const S=v instanceof Error?v.message:"文件处理或上传失败,请重试";E("failed",{error:S}),t.current.error(S)}},[]),u=w.useCallback(m=>{!t.current.active||!t.current.canWrite||!m.length||d(c(),m)},[c,d]),f=w.useCallback(async m=>{if(!t.current.active||!t.current.canWrite)return;const b=c();r({stage:"reading"}),t.current.error("");const y=k=>{b.current()&&(t.current.insert(k,b.focus()),r(null),i.current=null)};try{const k=await qD(m,b.current);if(k.kind==="text"){y(k.text);return}if(k.kind==="files"){const x=k.files.length===1&&k.files[0].type.startsWith("image/")?[sS(k.files[0])]:k.files;return await d(b,x,k.paths)}throw new Error("剪贴板没有可读取的内容,请使用系统粘贴或选择文件")}catch(k){b.current()&&(r(null),t.current.error(k instanceof Error?k.message:"粘贴失败,请重试"))}},[c,d]),h=()=>{i.current?.controller.abort(),i.current=null,r(m=>m?{...m,stage:"cancelled"}:null)},p=()=>{(n?.files?.length||n?.paths?.length)&&d(c(),n.files||[],n.paths,n.prepared&&n.results&&n.preferences?{prepared:n.prepared,results:n.results,preferences:n.preferences}:void 0)},g=w.useCallback(()=>s(null),[]);return{transfer:n,addFiles:u,paste:f,cancel:h,retry:p,dismiss:()=>r(null),mediaResult:o,dismissMediaResult:g,busy:n?.stage==="reading"||n?.stage==="compressing"||n?.stage==="uploading"}}function vh(e,t=()=>!0){return e?dh(e,t):Promise.resolve(!1)}async function YD(e,t,n=()=>Kx(e,{action:"copy-selection"})){if(!t())return!1;const r=await n();if(!t())return!1;const o=r.selection;if(!r.success||!o||!["copied","empty"].includes(o.status)||typeof o.text!="string"||typeof o.paneId!="string"||!/^%[0-9]+$/.test(o.paneId)||new TextEncoder().encode(o.text).length!==o.bytes||o.bytes>262144)throw new Error("服务未返回有效的终端选区,请更新服务后重试。");if(o.status==="empty")return!1;if(!o.bytes)throw new Error("终端选区为空。");return vh(o.text,t)}const Zg=262144;function XD(e,t){return n=>{if(!e())return!0;const r=n.indexOf(";");if(r<0)return!0;const o=n.slice(r+1);if(!o||o==="?"||o.length>4*Math.ceil(Zg/3))return!0;let s;try{const i=atob(o);if(i.length>Zg)return!0;s=new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(i,a=>a.charCodeAt(0)))}catch{return!0}return s&&vh(s,e).then(i=>{!i&&e()&&t()}),!0}}function kd(e){return e.replace(/\r\n|\r|\n/g,"\r").replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"")}const JD=w.lazy(()=>tn(()=>import("./SessionResourceSidebar-xG752lqP.js"),__vite__mapDeps([4,1,5,6,7,8,2,9,10])).then(e=>({default:e.SessionResourceSidebar}))),ZD=w.lazy(()=>tn(()=>import("./SessionChatView-Cx0hPmQ-.js").then(e=>e.S),__vite__mapDeps([11,12,1,13,14,15,16,6,17,18,2,19,20,21,22,23])).then(e=>({default:e.SessionChatView})));function Qg({client:e,initialSessionId:t,initialViewMode:n,sessions:r,resources:o,directoryError:s}){const[i,a]=w.useState(),c=w.useRef(null),d=w.useRef(null),u=w.useRef(null),f=_e(D=>D.rightSidebarWidth),[h,p]=w.useState(()=>window.innerWidth>=1024),[g,m]=w.useState(()=>window.innerWidth>=1024),[b]=w.useState(()=>{try{return sessionStorage.getItem(`termdock:shared-view:${e.targetPeerId}`)}catch{return null}}),y=n||(b==="chat"?"chat":b==="terminal"?"terminal":oe()?.viewMode)||"terminal",k=i?.canViewTerminal!==!1,x=i?.canViewChat!==!1,T=i?.canViewChat!==void 0||i?.canViewTerminal!==void 0,[_,A,E]=cD(i?.sourceSessionId||i?.sessionId||"",!T&&k&&x,y,!!(n||b||oe()?.viewMode)),v=k?x?_:"terminal":"chat",S=D=>{(D==="terminal"?k:x)&&A(D)};w.useLayoutEffect(()=>{let D=window.innerWidth>=1024;const V=()=>{const Re=(c.current?.getBoundingClientRect().width||window.innerWidth)>=1024;m(Re),D&&!Re&&p(!1),D=Re};V();const de=typeof ResizeObserver>"u"?void 0:new ResizeObserver(V);return c.current&&de?.observe(c.current),window.addEventListener("resize",V),()=>{de?.disconnect(),window.removeEventListener("resize",V)}},[]);const[I,R]=w.useState(y==="terminal");w.useEffect(()=>{v==="terminal"&&R(!0)},[v]);const C=w.useRef(v);C.current=v;const N=w.useRef(()=>{});w.useLayoutEffect(()=>{v==="terminal"&&N.current("reveal")},[v]),w.useEffect(()=>()=>u.current?.(),[]);const P=w.useRef(()=>!1),j=i?.attachmentRoot?{...o,directories:[...o.directories??[],{path:i.attachmentRoot,access:"read"}]}:o,O=vL(i,j),M=O.has("session.terminal-view"),F=O.has("session.input"),B=O.has("session.resize"),U=O.has("session.chat-send"),q=O.has("session.chat-view"),z=v0(o).length>0,ee=async(D,V)=>{if(!i||!(v==="chat"?U:F))return!1;const de=v==="chat"?await UD(D,i.sourceSessionId||i.sessionId,()=>!e.closed,V):P.current(Bs(D,!1));return de&&!g&&p(!1),de},ie=w.useRef();w.useEffect(()=>{if(!t||ie.current===t)return;const D=r.find(V=>V.sessionId===t||V.sourceSessionId===t);D&&(ie.current=t,a(D))},[r,t]);const[Z,ae]=w.useState(0),[$,Y]=w.useState("正在读取会话…"),[J,we]=w.useState(()=>document.documentElement.dataset.theme==="light"?"light":"dark");w.useEffect(()=>{const D=new MutationObserver(()=>we(document.documentElement.dataset.theme==="light"?"light":"dark"));return D.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>D.disconnect()},[]);const ge=w.useRef(null),le=w.useRef(null),ce=w.useRef(()=>""),be=w.useRef(async()=>!1),[se,ye]=w.useState(""),pe=VD({sessionId:i?.sourceSessionId||i?.sessionId||"",active:v==="terminal",canWrite:F,input:ge,sessionAttachments:!0,error:ye,insert:D=>{if(!P.current(Bs(kd(D),!1)))throw new Error("终端未连接,内容尚未插入,请重连后重试")}}),je=async()=>{const D=be.current;try{const V=await D();D===be.current&&ye(V?"":"请先选择需要复制的终端内容")}catch(V){D===be.current&&ye(V instanceof Error?V.message:"复制失败,请重试")}};return w.useEffect(()=>{a(D=>{if(!D)return r.length===1?r[0]:(Y(s||(r.length?"请选择会话":"暂无可用会话")),D);const V=r.find(de=>de.sessionId===D.sessionId);if(!V){Y(s||"会话已不可用,请联系分享者");return}return V.name===D.name&&V.icon===D.icon&&V.attachmentRoot===D.attachmentRoot&&V.canWrite===D.canWrite&&V.canResize===D.canResize&&V.canViewChat===D.canViewChat&&V.canViewTerminal===D.canViewTerminal&&V.canSendChat===D.canSendChat&&V.canClearChat===D.canClearChat?D:V})},[r,s]),w.useEffect(()=>{if(!i||!M||!ge.current||!I)return;let D=!1;const V=[],de=()=>{N.current=()=>{},P.current=()=>!1,ce.current=()=>"",be.current=async()=>!1;for(const Re of V.splice(0).reverse())Re()};return(async()=>{let Re=0,Ge;const Se=await TD({theme:jD(J),cursorBlink:F,disableStdin:!F,mouseEventsRequireAlt:!F,convertEol:!1},()=>!D&&!!ge.current);if(!Se||!ge.current)return;V.push(()=>Se.dispose()),ce.current=()=>Se.getSelection(),Se.attachCustomKeyEventHandler(W=>{if(W.type==="keydown"&&(W.ctrlKey||W.metaKey)&&!W.altKey){if(W.key.toLowerCase()==="v")return(!F||iS())&&(W.preventDefault(),F&&pe.paste()),!1;if(W.key.toLowerCase()==="c"&&(Se.hasSelection()||W.metaKey||W.shiftKey))return W.preventDefault(),je(),!1}return!0});const rt=new HS;Se.loadAddon(rt),Se.open(ge.current);const We=new AD(Se,rt,ge.current,{authority:B?"viewport":"server"});B&&We.fit("initialize",C.current==="terminal");const Ct=We.dimensions;Y("正在连接…");const ke=new URLSearchParams({flow:"2",...B?{transport:"tmux-client",...Ct?{cols:String(Ct.cols),rows:String(Ct.rows)}:{}}:{}}),Pe=e.openSocket(`/api/terminal/${encodeURIComponent(i.sessionId)}/ws?${ke}`);let et=!1,mt=0;const vt=()=>!D&&!e.closed&&C.current==="terminal",Tt=new Map,xt=()=>{for(const W of Tt.values())clearTimeout(W.timer),W.reject(new Error("连接已断开,请重连后复制"));Tt.clear()};V.push(xt);const sn=()=>new Promise((W,Q)=>{if(!vt()||Pe.readyState!==1){Q(new Error("终端未连接,请重连后复制"));return}const H=crypto.randomUUID(),he=setTimeout(()=>{Tt.delete(H),Q(new Error("复制超时,请重试"))},1e4);Tt.set(H,{resolve:W,reject:Q,timer:he});try{Pe.send(JSON.stringify({type:"tmux",action:"copy-selection",reqId:H}))}catch(ue){clearTimeout(he),Tt.delete(H),Q(ue)}});be.current=async()=>{const W=Se.getSelection();return W?vh(W,vt):F?YD(i.sessionId,vt,sn):!1};const G=Se.parser.registerOscHandler(52,XD(()=>vt()&&mt===0,()=>{vt()&&ye("复制失败,请重试")}));V.push(()=>G.dispose());let ne=Gg();V.push(()=>{Pe.onclose=null,Pe.onerror=null,Pe.close()});const te=(W="update")=>{if(D||C.current!=="terminal"||!ge.current?.clientWidth||!ge.current?.clientHeight)return;if(!B){const H=ge.current.querySelector(".xterm-screen"),he=ge.current.querySelector(".xterm");if(H&&he&&H.offsetWidth&&H.offsetHeight){const ue=Math.min(1,(ge.current.clientWidth-16)/H.offsetWidth,(ge.current.clientHeight-16)/H.offsetHeight);he.style.transformOrigin="top left",he.style.transform=`scale(${Math.max(.1,ue)})`}return}We.fit(W,!0,"resize");const Q=We.dimensions;if(Q&&et&&Pe.readyState===1){const H=RD(ne,Q);ne=H.state,H.request&&Pe.send(JSON.stringify({type:"resize",...Q,seq:H.request.seq}))}};N.current=te,Pe.onopen=()=>{Y(F?"":"只读"),te()},Pe.onmessage=W=>{try{const Q=JSON.parse(W.data);if(D)return;if(Q.type==="connected"){et=!0,ne=Vg(Gg(),Q),Ge=typeof Q.streamEpoch=="string"?Q.streamEpoch:void 0,Re=Number.isSafeInteger(Q.replayLastSeq)?Q.replayLastSeq:0,B||We.applyRemoteSize(Q);const H=Array.isArray(Q.replayChunks)?Q.replayChunks.filter(he=>typeof he=="string").join(""):"";mt++,Se.write((Q.replayOutOfWindow?"\x1Bc":"")+H,()=>{mt--,te()})}else if(Q.type==="tmux-result"){const H=Tt.get(Q.reqId);H&&(Tt.delete(Q.reqId),clearTimeout(H.timer),Q.success===!0?H.resolve(Q):H.reject(new Error(Q.error||"复制失败,请重试")))}else Q.type==="resize-ack"?ne=PD(ne,{...Q,ok:Q.ok!==!1}).state:Q.type==="data"&&typeof Q.data=="string"?Se.write(Q.data,()=>{D||(Number.isSafeInteger(Q.seq)&&(Re=Math.max(Re,Q.seq)),Pe.readyState===1&&Number.isSafeInteger(Q.flowSeq)&&Pe.send(JSON.stringify({type:"output-ack",flowSeq:Q.flowSeq,since:Re,epoch:Ge})))}):Q.type==="pty-size"&&Number.isSafeInteger(Q.cols)&&Number.isSafeInteger(Q.rows)&&Q.cols>0&&Q.rows>0?(ne=Vg(ne,Q),B||(We.applyRemoteSize(Q),requestAnimationFrame(()=>te()))):Q.type==="error"&&Y("无法连接,请联系分享者")}catch{Y("终端数据无效"),Pe.close()}},Pe.onclose=()=>{xt(),Y("连接已断开,请重连")},Pe.onerror=()=>Y("连接失败,请重试"),P.current=W=>!F||Pe.readyState!==1?!1:(Pe.send(JSON.stringify({type:"input",data:W})),!0);const K=Se.onData(W=>{F&&Pe.readyState===1&&Pe.send(JSON.stringify({type:"input",data:W}))});V.push(()=>K.dispose());const re=setInterval(()=>{Pe.readyState===1&&Pe.send(JSON.stringify({type:"ping"}))},2e4);V.push(()=>clearInterval(re));const fe=new ResizeObserver(()=>te());V.push(()=>fe.disconnect()),fe.observe(ge.current)})().catch(()=>{D||(de(),Y("终端初始化失败,请重试"))}),()=>{D=!0,de()}},[e,i?.sessionId,M,F,B,J,I,Z]),l.jsx(x0.Provider,{value:j,children:l.jsx(S0.Provider,{value:O,children:l.jsxs("div",{ref:c,className:"flex h-full min-h-0 flex-col bg-[var(--chrome-bg)] text-foreground",children:[l.jsxs("header",{className:"flex min-h-14 shrink-0 flex-wrap items-center gap-2 border-b border-border/40 px-3 pt-[env(safe-area-inset-top)] text-sm",children:[l.jsx("span",{"data-session-icon":!0,className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-2 text-primary",children:l.jsx(fi,{icon:i?.icon})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate font-medium",children:i?.name||"共享工作空间"}),l.jsx("p",{className:"truncate text-[10px] text-muted-foreground",role:"status",children:i&&!(v==="chat"?U:F)?"只读":v==="terminal"?$:""})]}),k&&x&&l.jsxs("button",{type:"button",onClick:()=>S(v==="chat"?"terminal":"chat"),className:"inline-flex min-h-11 items-center gap-1.5 rounded-lg px-3 text-xs hover:bg-surface-2",children:[v==="chat"?l.jsx(nf,{size:15}):l.jsx(gi,{size:15}),v==="chat"?"终端":"对话"]}),l.jsx("button",{type:"button","aria-label":"重新连接会话",onClick:()=>ae(D=>D+1),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2",children:l.jsx(tf,{size:15})}),v==="terminal"&&i&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"复制终端选区",title:"选择终端内容后复制",onClick:()=>{je()},className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(mi,{size:15})}),F&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"粘贴到终端",onClick:()=>{pe.paste()},className:"min-h-11 rounded-lg px-3 text-xs hover:bg-surface-2",children:"粘贴"}),l.jsx("button",{type:"button","aria-label":"上传文件到终端",onClick:()=>le.current?.click(),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(bw,{size:15})}),l.jsx("input",{ref:le,type:"file",multiple:!0,className:"hidden","aria-label":"选择终端附件",onChange:D=>{pe.addFiles(Array.from(D.target.files||[])),D.target.value=""}})]})]}),z&&l.jsxs("button",{type:"button","aria-expanded":h,onClick:()=>p(D=>!D),className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",children:[l.jsx(yw,{size:15}),"侧栏"]})]}),se&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:se}),pe.transfer&&l.jsxs("div",{role:"status",className:"flex shrink-0 items-center gap-2 px-3 py-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:"min-w-0 flex-1",children:pe.transfer.stage==="reading"?"正在读取剪贴板…":pe.transfer.stage==="uploading"?`正在上传文件 · ${pe.transfer.percent??0}%`:pe.transfer.stage==="cancelled"?"已取消上传":"上传未完成,内容尚未插入"}),pe.busy?l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:pe.cancel,children:"取消"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:pe.retry,children:"重试上传"}),l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:pe.dismiss,children:"关闭上传提示"})]})]}),E&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:E}),r.length>1&&l.jsx("div",{className:"flex shrink-0 gap-2 overflow-x-auto border-b border-border/30 p-2",children:r.map(D=>l.jsxs("button",{"aria-pressed":i?.sessionId===D.sessionId,className:`inline-flex min-h-11 shrink-0 items-center gap-2 rounded-lg px-3 text-xs ${i?.sessionId===D.sessionId?"bg-surface-2":"text-muted-foreground hover:bg-surface-2"}`,onClick:()=>a({...D}),children:[l.jsx(fi,{icon:D.icon,size:15}),D.name,D.canWrite?"":" · 只读"]},`${e.targetPeerId}:${D.sessionId}`))}),l.jsxs("div",{className:"flex min-h-0 flex-1",children:[l.jsxs("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",onContextMenuCapture:D=>{v==="terminal"&&ce.current()?D.stopPropagation():xL(D)},children:[l.jsx("div",{ref:ge,"aria-label":"共享终端",onCopyCapture:D=>{const V=ce.current();D.preventDefault(),D.stopPropagation(),V?D.clipboardData.setData("text/plain",V):je()},onPasteCapture:D=>{v==="terminal"&&(D.preventDefault(),D.stopPropagation(),F&&pe.paste(zD(D.clipboardData)))},onDragOver:D=>{D.preventDefault(),D.dataTransfer.dropEffect=F?"copy":"none"},onDrop:D=>{if(D.preventDefault(),D.stopPropagation(),!!F)try{const V=w0(D.dataTransfer);if(V){P.current(Bs(kd(V),!1));return}const de=Array.from(D.dataTransfer.files);if(de.length)pe.addFiles(de);else{const De=D.dataTransfer.getData("text/plain");De&&P.current(Bs(kd(De),!1))}}catch(V){ye(V instanceof Error?V.message:"文件引用无效")}},className:`min-h-0 flex-1 overflow-auto p-2 ${v!=="terminal"?"hidden":""}`}),i&&q&&v==="chat"&&l.jsx("div",{className:"min-h-0 flex-1",children:l.jsx(w.Suspense,{fallback:l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"正在打开对话…"}),children:l.jsx(ZD,{sessionId:i.sourceSessionId||i.sessionId,name:i.name,terminalLink:!1,canWrite:U,onTerminal:()=>S("terminal")},i.sourceSessionId||i.sessionId)})}),!i&&l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:$})]}),z&&l.jsxs("div",{ref:d,className:g?h?"relative shrink-0 border-l border-border":"hidden":"",style:g&&h?{width:Math.max(280,Math.min(f,window.innerWidth-360))}:void 0,children:[g&&h&&l.jsx("button",{type:"button",role:"separator","aria-label":"调整侧栏宽度","aria-orientation":"vertical",className:"absolute inset-y-0 -left-0.5 z-20 w-[5px] cursor-col-resize bg-transparent transition hover:bg-primary/30 focus-visible:bg-primary/30",onMouseDown:D=>{d.current&&(D.preventDefault(),u.current?.(),u.current=MD(d.current,D.clientX,d.current.getBoundingClientRect().width,V=>Math.max(280,Math.min(V,window.innerWidth-360)),V=>_e.getState().setRightSidebarWidth(V),-1))},onKeyDown:D=>{(D.key==="ArrowLeft"||D.key==="ArrowRight")&&(D.preventDefault(),_e.getState().setRightSidebarWidth(Math.max(280,Math.min(f+(D.key==="ArrowLeft"?24:-24),window.innerWidth-360))))}}),l.jsx(w.Suspense,{fallback:l.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"正在打开侧栏…"}),children:l.jsx(JD,{resources:o,canWrite:v==="chat"?U:F,sessionId:i?.sourceSessionId||i?.sessionId,pinned:g,open:h,onClose:()=>p(!1),onInsert:ee})})]})]})]})})})}function QD({client:e,initialSessionId:t,initialViewMode:n,initialViewLayout:r,desktopInvitation:o}){vD();const[s,i]=w.useState([]),[a,c]=w.useState({}),[d,u]=w.useState(""),[f,h]=w.useState(()=>{try{const b=sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`);if(b)return b==="split"}catch{}return r==="split"});w.useEffect(()=>{if(r==="split"){try{if(sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`))return}catch{}h(!0)}},[r,e.targetPeerId]),w.useEffect(()=>{let b=!0,y=!1;const k=async()=>{if(!y){y=!0;try{const T=await e.request({type:"session-list"});b&&(i(T.items),u(""))}catch{b&&(i([]),u("连接暂时中断,请重试"))}try{const T=await e.request({type:"permissions"});b&&c(Array.isArray(T.grants)?xD(T.grants.map(_=>_.resources)):{})}catch{b&&c({})}finally{y=!1}}};k();const x=setInterval(()=>{k()},15e3);return()=>{b=!1,clearInterval(x)}},[e]);const p=s.find(b=>b.sessionId===t||b.sourceSessionId===t)||s[0],g=s.find(b=>b.sessionId!==p?.sessionId),m=f&&!!g;return l.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-[var(--chrome-bg)] text-foreground",children:[o&&rh()&&l.jsx("div",{className:"flex shrink-0 justify-end border-b border-border/30 px-2",children:l.jsx(X0,{invitation:o,compact:!0})}),s.length>1&&l.jsx("div",{className:"flex shrink-0 justify-end border-b border-border/30 px-2",children:l.jsxs("button",{type:"button","aria-pressed":m,className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",onClick:()=>{h(!m);try{sessionStorage.setItem(`termdock:shared-layout:${e.targetPeerId}`,m?"single":"split")}catch{}},children:[l.jsx(Ky,{size:15}),m?"单会话":"分屏查看"]})}),l.jsxs("div",{className:`flex min-h-0 flex-1 ${m?"flex-col lg:flex-row":""}`,children:[l.jsx("section",{className:"min-h-0 min-w-0 flex-1","aria-label":m?"第一个共享会话":"共享会话",children:l.jsx(Qg,{client:e,initialSessionId:m?p?.sessionId:t,initialViewMode:n,sessions:m?s.filter(b=>b.sessionId!==g?.sessionId):s,resources:a,directoryError:d})}),m&&l.jsx("section",{className:"min-h-0 min-w-0 flex-1 border-t border-border lg:border-l lg:border-t-0","aria-label":"第二个共享会话",children:l.jsx(Qg,{client:e,initialSessionId:g.sessionId,initialViewMode:n,sessions:s.filter(b=>b.sessionId!==p?.sessionId),resources:a,directoryError:d})})]})]})}const eO=String.raw`
|
|
16
|
+
████████ ███████ ██████ ███ ███ ██████ ██████ ██████ ██ ██
|
|
17
|
+
██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██
|
|
18
|
+
██ █████ ██████ ██ ████ ██ ██ ██ ██ ██ ██ █████
|
|
19
|
+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
20
|
+
██ ███████ ██ ██ ██ ██ ██████ ██████ ██████ ██ ██
|
|
21
|
+
`;function dS({onLoginSuccess:e,focusEnabled:t=!0,serviceOrigin:n,serviceName:r,entryOrigin:o,entryName:s,onManageServices:i}){const{t:a}=jt(),[c,d]=w.useState(""),[u,f]=w.useState(!1),[h,p]=w.useState(null),[g,m]=w.useState(0),b=w.useRef(null);w.useEffect(()=>{t&&!u&&g===0&&b.current?.focus()},[t,u,g]),w.useEffect(()=>{if(g<=0)return;const A=setInterval(()=>{m(E=>E>1?E-1:0)},1e3);return()=>clearInterval(A)},[g]);const y=g>0,k=h==="login.passwordNotConfigured"||h==="login.targetPasswordRequired"||h==="login.securityUpgradeRequired",x=t&&!u&&!y&&!k&&c.length>0,T=async A=>{if(A.preventDefault(),!!x){f(!0),p(null);try{const E=await Wx(c);if(E.ok){d(""),e();return}p(E.rateLimited||E.reason==="rateLimited"?"login.rateLimited":E.reason==="connectionFailed"?"login.failed":E.reason==="identityMismatch"?"login.identityMismatch":E.reason==="unavailable"?"login.unavailable":E.reason==="authorizationRequired"?"login.authorizationRequired":E.reason==="passwordNotConfigured"?"login.passwordNotConfigured":E.reason==="targetPasswordRequired"?"login.targetPasswordRequired":E.reason==="securityUpgradeRequired"?"login.securityUpgradeRequired":"login.invalidPassword"),E.reason==="passwordNotConfigured"&&d(""),E.rateLimited&&typeof E.retryAfterMs=="number"&&m(Math.max(1,Math.ceil(E.retryAfterMs/1e3)))}catch{p("login.failed")}finally{f(!1)}}},_=y?a("login.placeholderBlocked",{s:g}):a("login.placeholder");return l.jsxs("div",{className:"flex w-screen flex-col items-center justify-center bg-background px-4 text-foreground",style:{height:"var(--app-vh, 100vh)",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"20vh",gap:"clamp(20px, 4vh, 40px)"},children:[l.jsx("pre",{"aria-hidden":!0,className:"max-w-full select-none overflow-hidden whitespace-pre leading-[1.05] text-primary/80 font-mono",style:{fontSize:"clamp(5px, 2vw, 14px)"},children:eO}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground font-mono",children:[l.jsx("span",{className:"text-primary",children:"$"}),l.jsx("span",{children:a("login.prompt")}),l.jsx("span",{className:"terminal-cursor","aria-hidden":!0,children:"▍"})]}),l.jsxs("form",{onSubmit:T,className:"w-full max-w-xs",children:[!k&&l.jsxs("div",{className:`flex items-center gap-1 rounded-full border bg-surface-2 p-1 pl-4 transition ${h?"border-destructive/60":"border-border"}`,children:[l.jsx("input",{ref:b,type:"password",autoComplete:"current-password",value:c,placeholder:_,"aria-label":a("login.placeholder"),onChange:A=>{d(A.target.value),h&&p(null)},disabled:!t||u||y,className:"flex-1 bg-transparent text-foreground placeholder:text-muted-foreground/70 focus:outline-none disabled:opacity-60",style:{minWidth:0,fontSize:"16px"}}),l.jsx("button",{type:"submit",disabled:!x,"aria-label":a("login.submit"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-40",children:u?l.jsx(Qe,{size:16,className:"animate-spin"}):l.jsx(Sy,{size:16})})]}),h&&!y?l.jsx("div",{role:"alert",className:"mt-3 text-center text-xs text-destructive",children:a(h)}):null]}),(r||n)&&l.jsxs("div",{className:"w-full max-w-xs text-center text-xs leading-5 text-muted-foreground",children:[l.jsx("p",{className:"break-all",title:n,children:a("login.currentTarget",{address:r||new URL(n).host})}),r&&n&&l.jsx("p",{className:"break-all",children:new URL(n).host}),o&&l.jsx("p",{className:"break-all",children:a("login.viaEntry",{entry:s||new URL(o).host,address:new URL(o).host})}),i&&l.jsx("button",{type:"button",disabled:!t||u,className:"mt-1 min-h-11 rounded-lg px-3 text-xs underline underline-offset-4 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:opacity-50",onClick:i,children:a("login.manageServices")})]}),l.jsx("style",{children:`
|
|
22
|
+
@keyframes terminal-blink {
|
|
23
|
+
0%, 49% { opacity: 1; }
|
|
24
|
+
50%, 100% { opacity: 0; }
|
|
25
|
+
}
|
|
26
|
+
.terminal-cursor {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
animation: terminal-blink 1.05s steps(1, end) infinite;
|
|
29
|
+
color: var(--primary);
|
|
30
|
+
}
|
|
31
|
+
`})]})}const Ec="termdock:open-services";function tO(){window.dispatchEvent(new Event(Ec))}function T3(e){window.dispatchEvent(new CustomEvent(Ec,{detail:e}))}const nO={activeKey:"root",items:[]},rO=()=>()=>{},oO=()=>nO,Bu="termdock:open-saved-service";function sO(e,t){try{const n=new URL(e.serviceOrigin||e.url);return e.label!==n.host&&e.label!==n.origin?e.label:!t.some(o=>{const s=new URL(o.serviceOrigin||o.url);return s.hostname===n.hostname&&s.port!==n.port})&&n.port==="9834"?n.hostname:n.host}catch{return e.label}}function A3(e,t,n){w.useEffect(()=>{window.termdockDesktop?.reportServiceActivity?.({runningCount:e,reviewCount:t})},[e,t]),w.useEffect(()=>{vo({runningCount:e,reviewCount:t,attentionSessions:n})},[e,t,n])}function iO({onReselect:e}){return window.termdockDesktop?null:l.jsx(aO,{onReselect:e})}function aO({onReselect:e}){const[t,n]=w.useState([]),[r,o]=w.useState([]),[s,i]=w.useState(oe()?.targetPeerId),[a,c]=w.useState(""),[d,u]=w.useState(!1),[f,h]=w.useState(!1),p=w.useRef(0),g=w.useRef(!1);w.useEffect(()=>{let A=!1;const E=()=>{const v=p.current;lr().then(S=>{!A&&!g.current&&v===p.current&&u(S.serviceSwitcherExpanded===!0)}).catch(()=>{})};return E(),window.addEventListener(Et,E),()=>{A=!0,window.removeEventListener(Et,E)}},[]);const m=async()=>{if(g.current)return;const A=d;p.current+=1,g.current=!0,h(!0),u(!A),c("");try{const E=await Yt({serviceSwitcherExpanded:!A});u(E.serviceSwitcherExpanded===!0)}catch{u(A),c("展开状态保存失败,请重试")}finally{g.current=!1,h(!1)}},b=w.useRef(null),y=Sn(),k=w.useSyncExternalStore(y?.subscribe||rO,y?.snapshot||oO);w.useEffect(()=>{let A=!1,E=0;const v=()=>{const R=++E;i(oe()?.targetPeerId),gt().then(C=>{if(!(A||R!==E)){try{const N="termdock-secure-service-order",P=JSON.parse(localStorage.getItem(N)||"[]"),j=Array.isArray(P)?P.filter(B=>typeof B=="string"):[],O=B=>B.targetPeerId||B.id,M=[...j.filter(B=>C.some(U=>O(U)===B)),...C.map(O).filter(B=>!j.includes(B))];C.sort((B,U)=>M.indexOf(O(B))-M.indexOf(O(U)));const F=JSON.stringify(M);F!==localStorage.getItem(N)&&localStorage.setItem(N,F)}catch{}n(C)}}).catch(()=>{})};v();const S=vi(v),I=window.termdockDesktop?.onServiceActivity?.(o);return window.addEventListener(Et,v),()=>{A=!0,S(),I?.(),window.removeEventListener(Et,v)}},[]),w.useEffect(()=>{const A=b.current,E=A?.querySelector('[aria-current="page"]');if(!A||!E)return;const v=E.offsetLeft,S=v+E.offsetWidth;v<A.scrollLeft?A.scrollLeft=v:S>A.scrollLeft+A.clientWidth&&(A.scrollLeft=S-A.clientWidth)},[s,t,d]);const x=async A=>{if(c(""),A.targetPeerId&&A.targetPeerId===s){e?.();return}try{const E=window.termdockDesktop;if(E?.openServiceConnection){const v=await E.openServiceConnection(A);if(!v.ok)throw new Error(v.error||"暂时无法打开服务")}else dc(A)||window.dispatchEvent(new CustomEvent(Bu,{detail:A}))}catch(E){c(E instanceof Error?E.message:"暂时无法切换服务")}},T=A=>{const E=k.items.find(S=>S.service?.targetPeerId===A.targetPeerId),v=r.find(S=>S.targetPeerId&&S.targetPeerId===A.targetPeerId||S.origin===(A.serviceOrigin||A.url));return{phase:E?.phase,running:E?.runningCount??v?.runningCount??0,review:E?.reviewCount??v?.reviewCount??0}},_=A=>{const E=T(A);return E.review?l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-0.5 text-[color:var(--warning)]",title:"等待处理",children:[l.jsx(Zu,{size:11}),E.review]}):E.phase==="connecting"||E.phase==="reconnecting"?l.jsx(Qe,{size:12,className:"shrink-0 animate-spin","aria-label":"正在连接"}):E.phase==="offline"||E.phase==="login"?l.jsx("span",{className:"shrink-0 text-[color:var(--warning)]",title:E.phase==="login"?"需要登录":"连接已断开",children:"!"}):E.running?l.jsx("span",{className:"shrink-0 text-[color:var(--success)]",title:"运行中",children:E.running}):null};return t.length<=1?null:l.jsxs("div",{className:"min-w-0 shrink-0 bg-[var(--chrome-bg)] px-3 pb-1 md:order-first md:bg-transparent md:pb-0 md:pt-1","data-sidebar-gesture-ignore":!0,children:[l.jsx("button",{type:"button",onClick:()=>{m()},disabled:f,"aria-expanded":d,"aria-label":d?"收起服务切换":"展开服务切换",title:d?"收起服务切换":"展开服务切换",className:"flex h-6 w-full items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:opacity-60",children:d?l.jsx(Or,{size:16}):l.jsx(Oy,{size:16})}),d&&l.jsxs("div",{className:"flex w-full items-center gap-1 md:gap-0 md:rounded-xl md:bg-surface md:p-1",children:[l.jsx("nav",{ref:b,"aria-label":"切换服务",className:"relative flex min-w-0 flex-1 gap-0.5 overflow-x-auto overscroll-x-contain md:gap-1 md:rounded-lg [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:t.map(A=>l.jsx("button",{type:"button",onClick:()=>{x(A)},"aria-current":A.targetPeerId===s?"page":void 0,"aria-label":A.label,title:A.label,className:`inline-flex min-h-11 min-w-0 flex-[1_0_auto] items-center justify-center rounded-lg text-[11px] leading-4 transition-colors motion-reduce:transition-none md:min-h-8 ${t.length>3?"md:flex-[0_0_30%]":"md:flex-[1_1_0%]"} focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${A.targetPeerId===s?"font-medium text-foreground md:bg-surface-elevated":"text-muted-foreground hover:bg-surface hover:text-foreground md:hover:bg-surface-2"}`,children:l.jsxs("span",{className:`inline-flex min-w-0 items-center justify-center gap-1 rounded-lg px-2 py-1.5 ${A.targetPeerId===s?"bg-surface-elevated md:bg-transparent":""}`,children:[l.jsx("span",{className:"max-w-[11rem] truncate md:hidden",children:sO(A,t)}),l.jsx("span",{className:"hidden truncate md:inline",children:A.label}),_(A)]})},A.id))}),l.jsx("button",{type:"button",onClick:tO,"aria-label":"管理服务",title:"管理服务",className:"inline-flex h-11 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-surface hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary md:hidden",children:l.jsx(Mr,{size:18})})]}),a&&l.jsx("p",{role:"alert",className:"mt-1 text-[11px] text-[color:var(--warning)]",children:a})]})}function cO({failure:e,target:t,onSettings:n,onRecovered:r,settingsOpen:o=!1}){const[s,i]=w.useState("notice"),[a,c]=w.useState([]),[d,u]=w.useState(""),[f,h]=w.useState(!1),[p,g]=w.useState("checking"),[m,b]=w.useState(""),[y,k]=w.useState(0),x=w.useRef(null),T=w.useRef(s);T.current=s,w.useLayoutEffect(()=>{x.current?.toggleAttribute("inert",o)},[o]),w.useEffect(()=>()=>{T.current="cancelled"},[]),Li(x,!o,()=>{f||i(s==="notice"?"cancelled":"notice")}),w.useEffect(()=>{let M=!1;return gt().then(F=>{M||c(F)}).catch(()=>{}),()=>{M=!0}},[]);const _=t?.serviceName||a.find(M=>M.targetPeerId===e.context.targetServiceId)?.label||"目标服务",A=e.context.entryServiceId||t?.entryServiceId,E=e.context.entryUrl||(t?.entryServiceId?t.url:void 0),S=a.find(M=>M.targetPeerId===A)?.label||"已保存的入口",I=e.code==="RELAY_AUTHORIZATION_REQUIRED",R=e.code==="TARGET_AUTHORIZATION_REQUIRED",C=e.code==="TARGET_PASSWORD_REQUIRED"||e.code==="TARGET_SECURITY_UPGRADE_REQUIRED",N=JSON.stringify(t);w.useEffect(()=>{if(!R||!N||N==="null")return;const M=new AbortController;return g("checking"),b(""),hu(JSON.parse(N),M.signal).then(F=>{M.signal.aborted||g(F)}).catch(F=>{M.signal.aborted||b(Wn(F).message)}),()=>M.abort()},[R,N,y]);const P=I?`通过“${S}”连接“${_}”需要中转授权`:C?`“${_}”已禁用中转`:R?`“${_}”需要设备访问授权`:e.code==="TARGET_IDENTITY_MISMATCH"?`“${_}”的服务身份不一致`:e.code==="RELAY_SELF_TARGET"?`“${_}”的中转配置指向自身`:`当前权限无法访问“${_}”`,j=async()=>{if(T.current!=="route"&&T.current!=="login")throw new Error("RECOVERY_CANCELLED");await r()},O=async()=>{if(T.current==="login"){u("");try{await j()}catch{u("授权尚未核验通过,请检查连接设置或联系对应服务管理员。")}}};return l.jsx("div",{ref:x,style:o?{visibility:"hidden"}:void 0,"aria-hidden":o?!0:void 0,className:`fixed inset-0 z-modal-panel flex items-center justify-center overflow-auto bg-[var(--chrome-bg)] ${s==="login"?"":"px-6 py-[max(24px,env(safe-area-inset-top))]"}`,children:s==="login"?l.jsxs("div",{className:"h-full w-full",children:[l.jsx(dS,{serviceOrigin:t?Mt(t)[0]:void 0,serviceName:_,entryOrigin:E,entryName:S,focusEnabled:!o,onLoginSuccess:()=>{O()},onManageServices:n}),l.jsx("button",{className:"absolute bottom-[max(24px,env(safe-area-inset-bottom))] left-1/2 min-h-11 -translate-x-1/2 px-4 text-sm text-muted-foreground",onClick:()=>i("notice"),children:"取消"}),d&&l.jsx("p",{role:"alert",className:"absolute bottom-20 left-0 right-0 px-6 text-center text-sm text-destructive",children:d})]}):l.jsxs("section",{className:"w-full max-w-sm","aria-label":"恢复服务访问",children:[l.jsx("h1",{className:"text-base font-medium",role:"alert",children:P}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s==="cancelled"?I?"已取消中转授权操作。直连恢复后会自动连接;保存的服务、终端和草稿保持不变。":"连接已暂停。保存的服务、终端和草稿保持不变。":I?"此中转路线没有有效授权,已暂停中转重试。直连恢复后会自动连接,不会自动重新授权。":C?e.message:R?m||(p==="checking"?"正在核验目标服务的设备授权与登录方式…":p==="invitationRequired"?"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。":p==="authorized"?"已核验目标服务的设备访问授权,可以重新连接。":"此设备尚未获得目标服务的访问授权。请使用目标服务的密码登录,或让目标服务管理员发送邀请。"):"连接已暂停。请核对保存的身份或联系管理员确认具体权限;不会替换身份或扩大授权。"}),(R||C)&&E&&l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["目标:“",_,"”;经入口“",S,"”(",new URL(E).host,")中转。入口的中转授权不能代替目标服务的访问授权。"]}),s==="route"&&t&&e.context.entryServiceId&&e.context.entryUrl?l.jsx("div",{className:"mt-5",children:l.jsx(K0,{service:{...t,id:t.targetPeerId,label:_},onBusyChange:h,recoverEntry:{targetPeerId:e.context.entryServiceId,url:e.context.entryUrl},onRecovered:j,onCancelRecovery:()=>i("notice")})}):l.jsxs("div",{className:"mt-5 flex flex-col gap-2",children:[s!=="cancelled"&&I&&e.context.entryServiceId&&e.context.entryUrl&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("route"),children:"重新授权"}),s!=="cancelled"&&R&&p==="passwordRequired"&&!m&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("login"),children:"登录目标服务"}),s!=="cancelled"&&(C||R&&p==="authorized"&&!m)&&l.jsx("button",{className:"service-button service-primary",disabled:f,onClick:()=>{h(!0),u(""),r().catch(M=>{u(C?Wn(M).message:"授权尚未核验通过,请重新检查或联系目标服务管理员。"),k(F=>F+1)}).finally(()=>h(!1))},children:C?"重新检查中转":"重新连接"}),s!=="cancelled"&&R&&(m||p==="invitationRequired")&&l.jsx("button",{className:"service-button service-secondary",disabled:f,onClick:()=>k(M=>M+1),children:"重新检查授权"}),d&&l.jsx("p",{role:"alert",className:"text-sm text-destructive",children:d}),l.jsx("button",{className:"service-button service-secondary",onClick:n,children:"查看连接设置"}),s==="cancelled"&&l.jsx("button",{className:"service-button service-secondary",onClick:()=>i("notice"),children:"返回恢复选项"}),s!=="cancelled"&&l.jsx("button",{className:"service-button service-secondary",onClick:()=>i("cancelled"),children:"取消"})]})]})})}const bo=(()=>{if(location.hash.startsWith("#termdock-invite="))try{return un(location.href,{httpTransport:location.protocol==="http:"&&!window.termdockDesktop?.openServiceConnection})}catch{return}finally{history.replaceState(null,"",location.pathname+location.search)}})(),Fu="termdock-secure-open-session",lO=Q_(oe()?.targetPeerId??"unpaired");let Id;function dO(){try{const e=JSON.parse(sessionStorage.getItem(Fu)??"null");return e?.serviceId===oe()?.targetPeerId?e.sessionId:void 0}catch{return}}function uO({children:e}){const{t}=jt(),n=w.useRef(),r=w.useRef(0),o=w.useRef(!1);w.useEffect(()=>{const G=()=>{r.current++};return window.addEventListener("pagehide",G),()=>{G(),window.removeEventListener("pagehide",G)}},[]);const[s,i]=w.useState(),[a,c]=w.useState(bo),[d,u]=w.useState(),f=w.useRef(bo?void 0:lO),[h,p]=w.useState(!1),[g,m]=w.useState(),[b,y]=w.useState(!!bo),k=w.useRef(!!bo),x=w.useRef(0);k.current=!!a&&b;const[T,_]=w.useState(!bo),[A,E]=w.useState(!1),[v,S]=w.useState(),I=w.useRef(),[R,C]=w.useState("正在连接服务…"),[N,P]=w.useState([]),[j,O]=w.useState([]),[M,F]=w.useState([]),[B,U]=w.useState(),[q,z]=w.useState(bo?.viewLayout),[ee,ie]=w.useState(!1),[Z,ae]=w.useState(!1),[$,Y]=w.useState(""),[J,we]=w.useState(!1),[ge,le]=w.useState(""),[ce,be]=w.useState(oe()?.serviceName??location.hostname),se=oe(),ye=se?.serviceOrigin||se?.url||s?.serviceOrigin||s?.url||location.origin,pe=!se||se.targetPeerId===s?.targetPeerId&&(se.serviceOrigin||se.url)===(s?.serviceOrigin||s?.url),je=se?.serviceName||(pe?s?.label:void 0)||ce,[D,V]=w.useState(dO),[de,De]=w.useState(!1),Re=G=>{if(o.current)return!0;const ne=oe(),te=Hn(G);return!window.termdockDesktop||!te?.targetPeerId||!ne||ne.targetPeerId===te.targetPeerId?!1:(o.current=!0,r.current++,p(!1),_(!0),E(!1),y(!1),C("正在恢复此窗口的服务…"),fc(),Xu({...te,targetPeerId:te.targetPeerId,serviceName:te.label}),location.reload(),!0)};w.useEffect(()=>{const G=window.termdockDesktop;if(!G?.getServiceConnection)return;let ne=!1;const te=async()=>{const re=JSON.stringify(oe()),fe=r.current;n.current??=G.getServiceConnection();const W=await n.current;ne||fe!==r.current||re!==JSON.stringify(oe())||Re(W)},K=()=>{te().catch(()=>{})};return K(),window.addEventListener("focus",K),window.addEventListener("pageshow",K),window.addEventListener(Et,K),()=>{ne=!0,window.removeEventListener("focus",K),window.removeEventListener("pageshow",K),window.removeEventListener(Et,K)}},[]),w.useEffect(()=>{if(!T||A)return;const G=window.setTimeout(()=>De(!0),8e3);return()=>window.clearTimeout(G)},[T,A]),w.useEffect(()=>{(!h&&!T||h&&(!ee||D))&&vo({rendered:!0})},[h,T,ee,D]),w.useEffect(()=>{on().then(G=>Y(G.peerId)).catch(()=>E(!0))},[]),w.useEffect(()=>{let G=!1,ne=0;const te=K=>{const{origin:re,sessionId:fe}=K.detail,W=++ne;(async()=>{const Q=(await gt()).filter(Ee=>!!Ee.targetPeerId);let H=Q.find(Ee=>Mt(Ee).some(Me=>new URL(Me).origin===new URL(re).origin));if(!H){const Ee=await(await Jt()).fetch("/api/terminal/operations/collaboration-directory",{signal:AbortSignal.timeout(5e3)});if(!Ee.ok)throw new Error("暂时无法读取协作服务目录,请重试。");const Fe=(await Ee.json()).services?.find(Ce=>Ce.origin===re&&Ce.serviceId);H=Q.find(Ce=>Ce.targetPeerId===Fe?.serviceId)}if(G||W!==ne)return;if(!H){y(!0);return}const he=window.termdockDesktop;if(he?.collaborationFocus){const Ee=`remote:${encodeURIComponent(re)}:${encodeURIComponent(fe)}`;if(await he.collaborationFocus(Ee,H.targetPeerId))return;if(he.openServiceConnection){const Me=await he.openServiceConnection(H);if(G||W!==ne||Me?.ok&&await he.collaborationFocus(Ee,H.targetPeerId))return;throw new Error("目标服务窗口尚未就绪,请重试切换会话。")}}if(Sn()?.focusSession(H.targetPeerId,fe))return;const ue={...H,serviceName:H.label};sessionStorage.setItem(Fu,JSON.stringify({serviceId:ue.targetPeerId,sessionId:fe}));const xe=await Zt(ue);!G&&W===ne&&(m(xe),V(fe),p(!0))})().catch(Q=>{G||W!==ne||(le(Q instanceof Error?Q.message:"暂时无法打开远程会话"),y(!0))})};return window.addEventListener("termdock:open-remote-session",te),()=>{G=!0,window.removeEventListener("termdock:open-remote-session",te)}},[]);const Ge=async(G=5e3)=>{const ne=r.current,te=oe(),K=Ce=>Ce?JSON.stringify([Ce.targetPeerId,Ce.serviceOrigin||Ce.url]):"",re=K(te),fe=He(),W=await Jt().catch(Ce=>{throw ne!==r.current||re!==K(oe())||fe!==He()?new Error("SERVICE_SELECTION_CHANGED"):Ce}),Q=()=>ne===r.current&&re===K(oe())&&W===He();let H;try{H=await Jr(W,{timeoutMs:G})}catch(Ce){throw Q()?Ce:new Error("SERVICE_SELECTION_CHANGED")}if(!Q())throw new Error("SERVICE_SELECTION_CHANGED");const he=f.current;he&&he.targetPeerId===W.targetPeerId?(f.current=void 0,u(Yl(he,H.grants)?he:void 0)):u(Ce=>Ce&&Ce.targetPeerId===W.targetPeerId&&Yl(Ce,H.grants)?Ce:void 0);const ue=window.termdockDesktop?.acknowledgeServiceInvitation,xe=n.current;if(ue&&xe){const Ce=await xe,Ie=()=>ne===r.current&&xe===n.current&&W===He()&&!W.closed&&te===oe()&&te?.targetPeerId===W.targetPeerId&&Ce?.targetPeerId===W.targetPeerId;if(Ce?.invitation&&Ie())try{const Ye=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(Ce.invitation)),Ve=Array.from(new Uint8Array(Ye),qt=>qt.toString(16).padStart(2,"0")).join("");Ie()&&await ue({targetPeerId:W.targetPeerId,fingerprint:Ve},Ie)&&Ie()&&(n.current=Promise.resolve({...Ce,invitation:void 0}),c(void 0))}catch{}}const Ee=B2(),Me=A2()?.targetPeerId;Promise.all([rL(),gt()]).then(([Ce,Ie])=>{const Ye=Ie.find(qt=>qt.targetPeerId===Me),Ve=Ee==="relay"?`经 ${Ye?.label||Me?.slice(-12)||"入口服务"} 中转`:"直连";return W.request({type:"device-name",name:c0(),onlyIfMissing:!0,profile:{...Ce,route:Ve}})}).catch(()=>{}),m(W),ie(H.fullService),ae(H.canManage),p(!0),_(!1),E(!1),zs("ready");const Fe=oe();return vo({phase:"ready",...Fe?{service:{...Fe,id:Fe.targetPeerId,label:Fe.serviceName||location.host}}:{}}),jr()&&M2(),H};w.useEffect(()=>{let G=!1,ne=!1,te=0,K,re;const fe=async()=>{if(G||o.current||ne||k.current||x.current)return;const Ee=oe();if(K&&!pu(Ee,K)||te&&(document.hidden||!jr()))return;if(!navigator.onLine){zs("offline"),_(!0),E(!0),C("网络已断开,恢复后会自动连接"),vo({phase:"offline"});return}ne=!0,clearTimeout(re);const Me=performance.now(),Fe=He();try{if(Tc&&!oe())throw new Error("工作区的服务记录已移除,请重新添加服务。");const Ce=()=>{const Ve=oe();return Ve?JSON.stringify([Ve.targetPeerId,Ve.url,Ve.serviceOrigin]):void 0},Ie=Ce();n.current??=window.termdockDesktop?.getServiceConnection?.();const Ye=await n.current;if(G||o.current)return;if(Ye&&Ie===Ce()&&(!oe()||oe()?.targetPeerId===Ye.targetPeerId))try{const Ve=ze(Ye.serviceOrigin||Ye.url);i({url:Ve,serviceOrigin:Ve,label:Ye.label,targetPeerId:Ye.targetPeerId})}catch{}if(Ye?.invitation){c(un(Ye.invitation)),y(!0),_(!1);return}if(!oe()){if(a){_(!1);return}if(Id??=(async()=>{if(Ye?.targetPeerId){await Zt({...Ye,targetPeerId:Ye.targetPeerId,serviceName:Ye.label});return}await N2()})(),await Id,!oe()){G||(p(!1),_(!1),E(!1));return}}if(K&&await F2(),G)return;await Ge(Fe?.canSwitchTransport?2500:5e3),K&&(K=void 0,S(void 0)),te=0,performance.measure("termdock:connection-ready",{start:Me,end:performance.now()})}catch(Ce){if(G||k.current||x.current||Ce instanceof Error&&Ce.message==="SERVICE_SELECTION_CHANGED")return;const Ie=Br(Ce,{targetServiceId:oe()?.targetPeerId});if(Ie?.context.targetServiceId&&Ie.context.targetServiceId!==oe()?.targetPeerId)return;Ie?(K=Ie,clearTimeout(re),di(Ie),S(Ie),_(!1),y(!1),E(!1),vo({phase:"login",rendered:!0}),pu(oe(),Ie)&&(re=setTimeout(()=>{fe()},300))):(Fe&&He()===Fe&&fc(),E(!0),_(!0),Id=void 0,C("连接暂未恢复,正在重试…"),zs(navigator.onLine?"reconnecting":"offline"),vo({phase:"reconnecting"}),te++,re=setTimeout(()=>{fe()},Math.min(5e3,300*2**Math.min(te-1,5))),console.debug("[connection] retry",{elapsedMs:Math.round(performance.now()-Me),attempt:te,reason:Ce instanceof Error?Ce.message:"unknown"}))}finally{ne=!1}};I.current=()=>{K=void 0,te=0};const W=()=>{document.visibilityState==="visible"&&jr()&&fe()},Q=W,H=()=>{te=0,W()},he=()=>{_e.getState().openLeft(),W()};window.addEventListener(qr,W),window.addEventListener(uu,he),Sn()?.attach(Yc(),window),fe(),document.addEventListener("visibilitychange",Q),window.addEventListener("focus",W),window.addEventListener("online",H),window.addEventListener("offline",W),window.addEventListener("pageshow",W);const ue=navigator.connection;ue?.addEventListener("change",H),window.addEventListener("auth:unauthorized",W),window.addEventListener(Et,W);const xe=setInterval(W,3e4);return()=>{G=!0,clearTimeout(re),clearInterval(xe),I.current=void 0,window.removeEventListener(qr,W),window.removeEventListener(uu,he),document.removeEventListener("visibilitychange",Q),window.removeEventListener("focus",W),window.removeEventListener("online",H),window.removeEventListener("offline",W),window.removeEventListener("pageshow",W),ue?.removeEventListener("change",H),window.removeEventListener("auth:unauthorized",W),window.removeEventListener(Et,W)}},[]);const Se=async(G=[])=>{const ne=He();if(ne){we(!0),le("");try{let te=await ne.request({type:"session-list"});if(Z&&G.length){const K=te.items,re=[...new Set(G)].filter(fe=>!K.some(W=>W.sessionId===fe||W.sourceSessionId===fe));for(const fe of re)if(!(await ne.fetch("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferredFrontendSessionId:fe,requireExisting:!0})})).ok)throw new Error("SHARE_SESSION_UNAVAILABLE");re.length&&(te=await ne.request({type:"session-list"}))}F(te.items)}catch(te){le(te instanceof Error&&te.message==="SHARE_SESSION_UNAVAILABLE"?"此会话暂时无法分享,请确认终端仍在运行后重试。":"暂时无法读取终端列表,请重试。")}try{if(Z){const te=await ne.request({type:"grants-list"});O(te.invitations??[]);const K=te.subjectLabels??{},re=await ne.request({type:"route-access"}),fe=await gt(),W=(Array.isArray(re.grants)?re.grants:[]).map(Q=>({id:`route:${Q.id}`,subjectId:Q.subjectId,scope:{kind:"service"},actions:["route.use"],routeTargetServiceId:Q.targetServiceId,routeTargetName:fe.find(H=>H.targetPeerId===Q.targetServiceId)?.label||"指定服务",...Q.active?{}:{revokedAt:Q.revokedAt??0}}));P([...te.grants,...W].map(Q=>({...Q,label:K[Q.subjectId],deviceProfile:te.deviceProfiles?.[Q.subjectId]})))}else{O([]);const te=await ne.request({type:"permissions"});P(te.grants??[])}}catch{le("暂时无法读取设备权限,请重试。")}finally{we(!1)}}};w.useEffect(()=>{const G=ne=>{const te=ne.detail;U(te),y(!0),h&&Se(te?.inviteSessionIds||(te?.inviteSessionId?[te.inviteSessionId]:[]))};return window.addEventListener(Ec,G),()=>window.removeEventListener(Ec,G)},[h,Z]);const[rt,We]=w.useState([]),Ct=w.useRef(),ke=w.useRef();w.useEffect(()=>{if(!b||!Z)return;let G=!1;return Ct.current=void 0,We([]),ke.current=(async()=>{const ne=await Jt(),K=await(await ne.fetch("/api/terminal/settings")).json();if(G)return;const re=K.localAccess??{},fe=[],W=[],Q=(H,he)=>{try{const ue=new URL(H);if(ue.protocol==="http:"&&!["localhost","127.0.0.1","[::1]"].includes(ue.hostname))return;const xe=ue.origin;if(W.push(xe),xe===location.origin||fe.some(Ee=>Ee.url===xe))return;fe.push({url:xe,label:he})}catch{}};if(re.status==="active"&&typeof re.url=="string"&&Q(re.url,"服务域名"),Array.isArray(re.interfaces))for(const H of re.interfaces){const he=H;typeof he.url=="string"&&Q(he.url,typeof he.label=="string"&&he.label||typeof he.name=="string"&&he.name||"IP 地址")}We(fe),Ct.current=typeof re.onboardingUrl=="string"&&typeof re.caFingerprint=="string"&&re.status!=="loopback-only"?{serviceId:ne.targetPeerId,url:re.onboardingUrl,fingerprint:re.caFingerprint,origins:W}:void 0})().catch(()=>{}),()=>{G=!0}},[b,Z,ye]);const Pe=async G=>{const ne=window.termdockDesktop;if(!ne?.openServiceConnection||!G.targetPeerId)return!1;const te=r.current;n.current??=ne.getServiceConnection?.();const K=await n.current;if(te!==r.current)throw new Error("SERVICE_SELECTION_CHANGED");if(Re(K))return!0;const re=_i(G),fe=oe(),W=K||(fe?{...fe,id:fe.targetPeerId,label:fe.serviceName||""}:void 0);return!W||ln(W,re.connection)?!1:(await Iu(ne,re.connection,re.invitation),y(!1),!0)};w.useEffect(()=>window.termdockDesktop?.onIncomingInvitation?.(G=>{try{const ne=un(G);r.current++,k.current=!0,n.current=window.termdockDesktop?.getServiceConnection?.(),c(ne),u(void 0),y(!0),E(!1)}catch{le("邀请链接无效,请重新复制。"),y(!0)}}),[]);const et=async G=>{x.current++;const ne=Z_(G);try{if(await Pe(G))return;if(!G.pairingCode&&!G.routeCode&&oe()?.targetPeerId!==G.targetPeerId&&Sn()){const K={...G,id:G.targetPeerId,label:G.serviceName||new URL(G.serviceOrigin||G.url).host};if(await $n(K),dc(K)){y(!1);return}}await Zt(G),z(G.viewLayout);try{sessionStorage.setItem(`termdock:shared-layout:${G.targetPeerId}`,G.viewLayout||"single")}catch{}if(G.viewMode)try{sessionStorage.setItem(`termdock:shared-view:${G.targetPeerId}`,G.viewMode)}catch{}V(void 0),sessionStorage.removeItem(Fu),be(G.serviceName??new URL(G.url).hostname);const te=await Ge();u(Yl(G,te.grants)?G:void 0),S(void 0),I.current?.(),n.current&&(n.current=n.current.then(K=>K?{...K,invitation:void 0}:null)),c(void 0),y(!1),E(!1)}finally{ne(),x.current--}},mt=async(G,ne)=>{await Pe(G)||(await Im(G,ne),v?await sn():await Ge(),y(!1))},vt=async G=>{const ne=window.termdockDesktop;if(ne?.openServiceConnection){n.current??=ne.getServiceConnection?.();const te=await n.current;if(te&&ln(te,G)&&Re(te))return;await Iu(ne,G),y(!1);return}if(dc(G)){y(!1);return}if(G.targetPeerId)try{await et({...G,targetPeerId:G.targetPeerId,serviceName:G.label});return}catch(te){if(!(te instanceof Ot))throw te}return Sm(G.serviceOrigin||G.url)};w.useEffect(()=>{const G=ne=>{vt(ne.detail).catch(te=>{y(!0),le(te instanceof Error?te.message:"暂时无法打开服务")})};return window.addEventListener(Bu,G),()=>window.removeEventListener(Bu,G)});const Tt=async(G,ne)=>{if(window.termdockDesktop?.openServiceConnection){await J_(window.termdockDesktop,G),y(!1);return}if(G.includes("#termdock-invite=")){if(new URL(G).protocol==="http:"&&new URL(G).origin!==location.origin){location.assign(G);return}const te=un(G,{httpTransport:location.protocol==="http:"});if(ne!==void 0&&te.routeOnly){await Im(te,ne),await Ge(),y(!1);return}try{await et(te)}catch(K){if(te.routeOnly&&K instanceof Ot)return{passwordRequired:!0};throw K}return}return Sm(ze(G),ne)},xt=async G=>{const ne=await Jt();await ke.current;const{includeBackup:te=!0,showAccessGuide:K,entryAddress:re,viewMode:fe,viewLayout:W,...Q}=G,H=oe(),he=H?nn(H):[];let ue;if(te&&he.length){for(const Ve of he)try{const qt=await Ax({...H,targetPeerId:ne.targetPeerId},Ve,{...G.reusable?{reusable:!0}:{},...G.linkExpiresAt===void 0?{}:{linkExpiresAt:G.linkExpiresAt}});ue={...Ve,routeCode:qt.routeCode,onboarding:qt.onboarding};break}catch{}if(!ue)throw new Error("无法分享备用连接:需要入口管理员授权。也可以关闭此选项,生成直接连接邀请。")}let xe=H?.serviceOrigin||H?.url||location.origin;const Ee=Ct.current;if(!re&&new URL(xe).protocol==="http:"&&Ee?.serviceId===ne.targetPeerId){const Ve=new URL(xe).hostname,qt=Ee.origins.filter(Yn=>new URL(Yn).protocol==="https:");xe=qt.find(Yn=>new URL(Yn).hostname===Ve)||qt[0]||xe}if(re)try{xe=new URL(re).origin}catch{throw new Error("邀请接入地址无效。")}if(fe&&Q.scope.kind==="sessions"){for(const Ve of Q.scope.sessionIds)if(!(await ne.fetch(`/api/terminal/${encodeURIComponent(Ve)}/view-mode`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:fe})})).ok)throw new Error("无法保存邀请的默认显示方式,请重试")}const Me=await ne.request({type:"invite-create",...Q});if(typeof Me.code!="string"||typeof Me.expiresAt!="number"&&Me.expiresAt!==null)throw new Error("暂时无法生成邀请。");window.dispatchEvent(new Event("termdock:sharing-changed")),await Se();let Fe=nh({showAccessGuide:K,viewMode:fe,viewLayout:W,v:1,serviceId:ne.targetPeerId,code:Me.code,entryUrl:ue?.url||xe,serviceUrl:xe,name:ce,entryServiceId:ue?.targetPeerId,routeCode:ue?.routeCode});const Ce=new URL(xe).hostname,Ie=Ce.endsWith(".local")||/^(?:192\.168\.|10\.|172\.(?:1[6-9]|2\d|3[01])\.)/.test(Ce)||Ce.startsWith("[fd")||Ce.startsWith("[fc");if(K!==!1&&!ue&&Ie&&Ee?.serviceId===ne.targetPeerId&&Ee.origins.includes(new URL(xe).origin))try{Fe=_m(Fe,Ee.url)}catch{throw new Error("证书引导地址暂不可用,请重新打开分享后重试。")}K!==!1&&ue?.onboarding&&(Fe=_m(Fe,ue.onboarding.url));const Ye=ue?.onboarding?.fingerprint||Ee?.fingerprint;return{id:typeof Me.invitationId=="string"?Me.invitationId:void 0,url:Fe,...Fe.startsWith("http:")&&Ye?{certificateFingerprint:Ye}:{},expiresAt:Me.expiresAt}},sn=async(G=oe()?.targetPeerId)=>{if(G!==oe()?.targetPeerId)throw new Error("SERVICE_SELECTION_CHANGED");T2();try{await Ge(),I.current?.(),S(void 0)}catch(ne){const te=Br(ne,{targetServiceId:oe()?.targetPeerId});throw te&&(di(te),S(te)),ne}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"h-full min-h-0",style:v?{visibility:"hidden"}:void 0,ref:G=>G?.toggleAttribute("inert",!!v),"aria-hidden":v?!0:void 0,children:h?ee&&!D?e:l.jsx(QD,{client:g,desktopInvitation:d,initialSessionId:D,initialViewLayout:q||oe()?.viewLayout,initialViewMode:oe()?.viewMode}):v?null:T&&!A&&!b?l.jsx(th,{status:de?"连接时间较长,仍在等待服务…":R,detail:de?je:void 0,actionLabel:de?"管理服务":void 0,onAction:()=>y(!0)}):T?l.jsx("div",{className:"flex h-full min-h-0 flex-col items-center justify-center bg-[var(--chrome-bg)] px-6 text-foreground",children:l.jsxs("div",{className:"flex w-full max-w-xs flex-col items-center text-center",children:[l.jsx("div",{className:"mb-5 flex h-12 w-12 items-center justify-center rounded-2xl bg-surface-2 text-muted-foreground","aria-hidden":"true",children:l.jsx(Bw,{size:24,strokeWidth:1.5})}),l.jsx("h1",{className:"max-w-full truncate text-base font-medium tracking-tight",title:je,children:je}),l.jsxs("div",{role:"status",className:"mt-2 flex max-w-full items-center justify-center gap-2 text-xs leading-5 text-muted-foreground",children:[!A&&l.jsx(Qe,{size:13,className:"shrink-0 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),l.jsx("span",{children:R})]}),A&&l.jsx("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:t(oe()?"login.savedConnectionRetained":"login.continueAfterReconnect")}),l.jsx("button",{type:"button",className:"mt-6 min-h-11 rounded-lg px-4 text-xs text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",onClick:()=>y(!0),children:"管理服务"})]})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed left-0 right-0 top-[var(--safe-top-inset)] z-chrome sm:right-auto sm:w-72",children:l.jsx(iO,{})}),l.jsx(dS,{serviceOrigin:ye,onManageServices:()=>y(!0),focusEnabled:!b,onLoginSuccess:()=>{Ge().catch(()=>E(!0))}})]})}),v&&l.jsx(cO,{failure:v,target:oe(),settingsOpen:b,onRecovered:()=>sn(v.context.targetServiceId),onSettings:()=>y(!0)},JSON.stringify([v.code,v.context])),b&&l.jsx(aD,{initialShareSessionId:B?.inviteSessionId,initialShareSessionIds:B?.inviteSessionIds,initialViewLayout:B?.viewLayout,initialViewMode:B?.viewMode,onConnect:et,onClose:()=>{a&&(window.termdockDesktop?.dismissServiceInvitation?.().catch(()=>{}),n.current&&(n.current=n.current.then(G=>G&&{...G,invitation:void 0})),c(void 0)),y(!1),U(void 0)},onAddService:Tt,onOpenService:vt,onConnectWithPassword:mt,paired:h||!!oe(),initialInvite:a,initialServicePage:v&&oe()?{kind:v.code==="RELAY_AUTHORIZATION_REQUIRED"?"routes":"edit",service:{...oe(),id:oe().targetPeerId,label:je}}:void 0,currentServiceName:je,currentServiceId:He()?.targetPeerId||oe()?.targetPeerId,currentServiceOrigin:ye,currentIdentity:$,grants:N,sessions:M,loading:J,loadError:ge,onRetry:()=>{Se()},onRename:async(G,ne)=>{await(await Jt()).request({type:"device-name",subjectId:G,name:ne}),await Se()},hasBackup:!!oe()&&nn(oe()).length>0,inviteAddresses:rt,onCreateInvite:Z?xt:void 0,invitations:Z?j:[],onRevokeInvitation:Z?async G=>{try{if((await(await Jt()).request({type:"invite-revoke",invitationId:G})).revoked!==!0)throw new Error("INVITATION_NOT_PENDING")}finally{await Se()}}:void 0,onRevoke:Z?async G=>{await(await Jt()).request(G.startsWith("route:")?{type:"route-revoke",grantId:G.slice(6)}:{type:"revoke",grantId:G}),await Se()}:void 0})]})}function fO(e,t,n){const r=e?.name||"Error",o=e?.message||"Unexpected error";return["Termdock error report",`Time: ${n.capturedAt}`,`URL: ${n.url}`,`User agent: ${n.userAgent}`,"",`${r}: ${o}`,e?.stack?`
|
|
32
|
+
Stack:
|
|
33
|
+
${e.stack}`:"",t?`
|
|
34
|
+
React component stack:
|
|
35
|
+
${t.trim()}`:""].filter(Boolean).join(`
|
|
36
|
+
`)}async function hO(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}catch{return!1}finally{t.remove()}}function pO({error:e,componentStack:t}){const{t:n}=jt(),[r,o]=Ut.useState("idle"),s=async()=>{const i=fO(e,t,{url:window.location.href,userAgent:navigator.userAgent,capturedAt:new Date().toISOString()});o(await hO(i)?"copied":"failed")};return l.jsx("div",{className:"flex h-full items-center justify-center p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 text-center max-w-md",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-destructive/10 flex items-center justify-center",children:l.jsx("svg",{className:"w-6 h-6 text-destructive",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-medium text-foreground",children:n("errorBoundary.title")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e?.message||n("errorBoundary.unexpected")})]}),l.jsxs("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>{s()},className:"rounded-full bg-surface-2 px-5 py-2.5 text-sm font-medium text-foreground ring-1 ring-border/15 transition hover:bg-surface-elevated active:scale-[0.97]",children:n(r==="copied"?"errorBoundary.copied":r==="failed"?"errorBoundary.copyFailed":"errorBoundary.copyDetails")}),l.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-full bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground shadow-sm transition-all hover:bg-primary/90 active:scale-[0.97]",children:n("errorBoundary.retry")})]})]})})}class mO extends Ut.Component{state={hasError:!1,error:null,componentStack:""};static getDerivedStateFromError(t){return{hasError:!0,error:t,componentStack:""}}componentDidCatch(t,n){console.error("Terminal error caught by boundary:",t,n),this.setState({componentStack:n.componentStack??""})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:l.jsx(pO,{error:this.state.error,componentStack:this.state.componentStack}):this.props.children}}const gO=1e3,yO=2e4,wO=9e4,bO=5e3,Ne={ws:null,listeners:new Set,reconnectAttempt:0,reconnectTimer:null,idleCloseTimer:null,closing:!1};let wa=0,Fo=null;function vO(){return typeof window>"u"?null:`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/control/ws`}function uS(){Ne.idleCloseTimer&&(clearTimeout(Ne.idleCloseTimer),Ne.idleCloseTimer=null)}function xO(){uS(),!(Ne.ws&&Ne.ws.readyState===WebSocket.OPEN)&&(Ne.idleCloseTimer=setTimeout(()=>{Ne.idleCloseTimer=null,Ne.listeners.size===0&&SO()},bO))}function SO(){if(Ne.ws){try{Ne.ws.close()}catch{}Ne.ws=null}Fo&&(clearInterval(Fo),Fo=null)}function ey(){if(Ne.reconnectTimer)return;const e=Math.min(gO*Math.pow(2,Ne.reconnectAttempt),yO);Ne.reconnectAttempt+=1,Ne.reconnectTimer=setTimeout(()=>{Ne.reconnectTimer=null,fS()},e)}function fS(){const e=vO();if(!e||Ne.ws&&Ne.ws.readyState===WebSocket.OPEN)return;let t;try{t=Tx(e)}catch{ey();return}Ne.ws=t,t.onopen=()=>{Ne.reconnectAttempt=0,wa=Date.now(),Fo||(Fo=setInterval(()=>{if(!(!Ne.ws||Ne.ws.readyState!==WebSocket.OPEN)&&wa>0&&Date.now()-wa>wO)try{Ne.ws.close()}catch{}},3e4),Fo.unref?.())},t.onmessage=n=>{wa=Date.now();let r=null;try{r=JSON.parse(n.data)}catch{return}if(!r)return;if(r.type==="session-notice"){if(typeof r.id!="string"||typeof r.sessionId!="string"||typeof r.sessionName!="string"||typeof r.message!="string"||!r.message.trim()||r.message.length>4e3||r.title!==void 0&&(typeof r.title!="string"||r.title.length>120)||typeof r.createdAt!="number")return;const i=r;for(const a of Ne.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="chat-attention"&&Array.isArray(r.sessions)){const i={type:"chat-attention",sessions:r.sessions};for(const a of Ne.listeners)try{a(i)}catch{}return}if(r.type==="update-state"){const i=r.state;if(!i||typeof i.status!="string"||typeof i.currentVersion!="string")return;const a={type:"update-state",state:i};for(const c of Ne.listeners)try{c(a)}catch(d){console.error("[clientStateSync] listener threw:",d)}return}if(r.type==="server-health"){const i=r.state;if(!i||typeof i.attention!="boolean"||typeof i.supervised!="boolean")return;const a={type:"server-health",state:i};for(const c of Ne.listeners)try{c(a)}catch(d){console.error("[clientStateSync] listener threw:",d)}return}if(r.type==="context-draft"){if(typeof r.text!="string")return;const i={type:"context-draft",text:r.text,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:Date.now(),origin:typeof r.origin=="string"?r.origin:null};for(const a of Ne.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="pinned-explorer-roots"){if(!r.pinnedExplorerRoots||typeof r.pinnedExplorerRoots!="object"||Array.isArray(r.pinnedExplorerRoots))return;const i={type:"pinned-explorer-roots",pinnedExplorerRoots:r.pinnedExplorerRoots,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:Date.now(),origin:typeof r.origin=="string"?r.origin:null};for(const a of Ne.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="config-updated"){if(r.key!=="toolbar-presets"&&r.key!=="agent-rules"&&r.key!=="program-detection")return;const i={type:"config-updated",key:r.key,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:void 0};for(const a of Ne.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type!=="client-state"||!r.state)return;const o=r.state,s={type:"client-state",clientState:{sessions:Array.isArray(o.sessions)?o.sessions:[],updatedAt:typeof o.updatedAt=="number"?o.updatedAt:Date.now()},inventory:r.inventory,seq:typeof r.seq=="number"?r.seq:void 0};for(const i of Ne.listeners)try{i(s)}catch(a){console.error("[clientStateSync] listener threw:",a)}},t.onclose=()=>{Ne.ws===t&&(Ne.ws=null),Ne.listeners.size>0&&ey()},t.onerror=()=>{}}function EO(e){return Ne.listeners.add(e),uS(),Ne.ws||fS(),()=>{Ne.listeners.delete(e),Ne.listeners.size===0&&xO()}}const Cd=pr(e=>({unread:{},viewing:null,receive:(t,n)=>e(r=>{const o=r.unread[t]??[];return r.viewing===t||o.includes(n)?r:{unread:{...r.unread,[t]:[...o,n]}}}),view:t=>e(n=>{if(!t||!n.unread[t])return n.viewing===t?n:{viewing:t};const r={...n.unread};return delete r[t],{viewing:t,unread:r}})}));function kO(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:IO}=Ut;function CO(e){const t=IO();return n=>{const r=e(n);return kO(t.current,r)?t.current:t.current=r}}function hS(e,t){return`termdock:chat-viewed:${oe()?.targetPeerId||location.origin}:${e}:${t}`}function ty(e,t){try{const n=JSON.parse(localStorage.getItem(hS(e,t.conversationId))||"[]");return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function ny(e,t,n){try{localStorage.setItem(hS(e,t.conversationId),JSON.stringify(t.messageIds.filter(r=>n.has(r))))}catch{}}const On=new Map,ei=()=>oe()?.targetPeerId||location.origin;async function xh(e,t){if(t.running||!t.ids.size||ei()!==t.scope)return;clearTimeout(t.timer),t.timer=void 0,t.running=!0;const n=[...t.ids].slice(0,100),r=He();try{const o=await fetch(`/api/terminal/${encodeURIComponent(t.sessionId)}/chat/viewed`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t.conversationId,messageIds:n}),signal:AbortSignal.timeout(15e3)});if(!o.ok){if([400,401,403,404,409].includes(o.status)){On.delete(e);return}throw new Error("Viewing acknowledgement unavailable")}const s=await o.json();if(On.get(e)!==t)return;if(ei()!==t.scope||He()!==r)throw new Error("Viewing context changed");if(!s.chatIndex||s.chatIndex.conversationId!==t.conversationId||!Array.isArray(s.chatIndex.viewedMessageIds))throw new Error("Invalid viewing acknowledgement");const i=new Set(s.chatIndex.viewedMessageIds),a=new Set(s.chatIndex.messageIds);let c=!1;for(const d of n)i.has(d)||!a.has(d)?t.ids.delete(d):c=!0;t.failures=c?t.failures+1:0,ei()===t.scope&&t.apply(s.chatIndex)}catch{t.failures++}finally{t.running=!1,On.get(e)===t&&(t.ids.size?t.timer=setTimeout(()=>{t.timer=void 0,xh(e,t)},t.failures?Math.min(3e4,1e3*2**Math.min(5,t.failures-1)):0):On.delete(e))}}function ry(e,t,n,r){if(!n.length||t.viewedMessageIds===void 0)return;const o=ei(),s=`${o}:${e}:${t.conversationId}`;let i=On.get(s);i||(i={sessionId:e,conversationId:t.conversationId,scope:o,ids:new Set,apply:r,running:!1,failures:0},On.set(s,i)),i.apply=r;for(const a of n)i.ids.add(a);if(!i.running&&!i.timer){const a=i;i.timer=setTimeout(()=>{a.timer=void 0,xh(s,a)},0)}}function TO(){for(const e of On.values())clearTimeout(e.timer);On.clear()}if(typeof window<"u"){const e=()=>{for(const[t,n]of On)ei()===n.scope&&xh(t,n)};window.addEventListener("online",e),window.addEventListener("termdock:secure-ready",e),window.addEventListener("auth:unauthorized",TO)}const AO=256*1024,RO=256*1024,PO=128;function oy(e,t=AO){if(!e)return[];if(e.length<=t)return[e];const n=[];let r=0;for(;r<e.length;){let o=Math.min(r+t,e.length);if(o<e.length){const s=e.lastIndexOf(`
|
|
37
|
+
`,o);s>r&&(o=s+1)}n.push(e.slice(r,o)),r=o}return n}function NO(e,t=RO,n=PO){const r=new Map;let o=0,s=0;for(const i of[...e.keys()]){const a=e.get(i);if(!a||a.length===0){e.delete(i);continue}const c=[];for(;a.length>0;){const d=a[0];if(s>0&&(s>=n||o+d.length>t))break;a.shift(),c.push(d),o+=d.length,s+=1}if(c.length>0&&r.set(i,c),e.delete(i),a.length>0&&e.set(i,a),s>=n||o>=t)break}return r}async function pS(e,t=!1,n="termdock-encrypted-background"){const r=await new Promise((o,s)=>{const i=indexedDB.open(n,1);i.onupgradeneeded=()=>i.result.createObjectStore("state"),i.onsuccess=()=>o(i.result),i.onerror=()=>s(i.error)});try{return await new Promise((o,s)=>{const i=r.transaction("state",t?"readwrite":"readonly"),a=e(i.objectStore("state"));i.oncomplete=()=>o(a.result),i.onabort=i.onerror=()=>s(i.error)})}finally{r.close()}}const _O=e=>pS(t=>t.put(e,e.targetPeerId),!0),LO=e=>pS(t=>t.delete(e),!0),mS="termdock-pwa-notifications-enabled",gS="termdock-pwa-ai-notifications-enabled",yS="termdock-pwa-exit-notifications-enabled",wS="termdock-pwa-notification-alert-style",jO="termdock-notification-claim:",Uu=5e3,DO=1500,Hu="termdock-push-last-sync",sy=360*60*1e3,OO=10080*60*1e3,ti=new Map;function Sh(){return ct()?!0:typeof window<"u"&&typeof Notification<"u"&&"serviceWorker"in navigator&&window.isSecureContext}function MO(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function BO(){return typeof window>"u"?!1:!!(window.matchMedia("(display-mode: standalone)").matches||"standalone"in navigator&&navigator.standalone===!0)}function FO(){return ct()?!0:!(!Sh()||MO()&&!BO())}function R3(){return ct()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function Eh(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(mS)==="true"}catch{return!1}}function P3(e){if(!(typeof window>"u"))try{window.localStorage.setItem(mS,String(e))}catch{}}function kc(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(gS);return e===null?!0:e==="true"}catch{return!0}}function N3(e){if(!(typeof window>"u"))try{window.localStorage.setItem(gS,String(e))}catch{}}function $u(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(yS)==="true"}catch{return!1}}function _3(e){if(!(typeof window>"u"))try{window.localStorage.setItem(yS,String(e))}catch{}}function hi(){if(typeof window>"u")return"normal";try{const e=window.localStorage.getItem(wS);if(e==="quiet"||e==="persistent")return e}catch{}return"normal"}function L3(e){if(!(typeof window>"u"))try{window.localStorage.setItem(wS,e)}catch{}}async function j3(){return ct()?"granted":Sh()?Notification.permission==="default"?Notification.requestPermission():Notification.permission:"unsupported"}function UO(){return typeof document>"u"?!0:document.visibilityState==="visible"&&document.hasFocus()}function HO(e){for(const[t,n]of ti)e-n>Uu&&ti.delete(t)}function $O(e){return e.dedupKey?.trim()?e.dedupKey.trim():e.tag?.trim()?e.tag.trim():[e.data?.sessionId,e.title,e.body].filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim()).join("|")}function zO(e){const t=$O(e);if(!t)return!0;const n=Date.now();HO(n);const r=ti.get(t)??0;if(n-r<Uu)return!1;try{if(typeof window<"u"&&window.localStorage){const o=`${jO}${t}`,s=Number(window.localStorage.getItem(o)??"0");if(Number.isFinite(s)&&n-s<Uu)return ti.set(t,s),!1;Number.isFinite(s)&&s>0&&window.localStorage.removeItem(o),window.localStorage.setItem(o,String(n))}}catch{}return ti.set(t,n),!0}async function Qc(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{const e=await navigator.serviceWorker.getRegistration()??null;return e?.active?e:await Promise.race([navigator.serviceWorker.ready,new Promise(n=>{window.setTimeout(()=>n(null),DO)})])??e}catch{return null}}function qO(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(new ArrayBuffer(r.length));for(let s=0;s<r.length;s+=1)o[s]=r.charCodeAt(s);return o}async function kh(e,t){const n=await fetch("/api/csrf-token");if(!n.ok)throw new Error("Unable to get notification security token");const{csrfToken:r}=await n.json();return fetch(`/api/notifications/${e}`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(t)})}async function KO(e=!1,t=!1){if(ct())return!0;if(!Eh()||!FO()||Notification.permission!=="granted")return!1;const n=await Qc();if(!n?.pushManager)return!1;try{const r=await fetch("/api/notifications/status");if(!r.ok)return!1;const o=await r.json();let s=await n.pushManager.getSubscription();const i=!!(s?.expirationTime&&s.expirationTime-Date.now()<OO);if(!s)try{s=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qO(o.publicKey)})}catch(u){return console.warn(`[PWA notifications] Push subscription missing; re-subscribe failed${t?" (user gesture)":""}:`,u),!1}const a=Number(window.localStorage.getItem(Hu)??"0"),c=!o.subscription||o.subscription.endpoint!==s.endpoint||Date.now()-(o.subscription.updatedAt??0)>=sy;if(e||c||Date.now()-a>=sy||i){if(!(await kh("subscribe",{subscription:s.toJSON(),aiEnabled:kc(),exitEnabled:$u(),alertStyle:hi(),locale:navigator.language})).ok)return!1;window.localStorage.setItem(Hu,String(Date.now()))}const d=oe();return d&&await _O({targetPeerId:d.targetPeerId,addresses:Mt(d),routes:nn(d),publicKey:o.publicKey,preferences:{aiEnabled:kc(),exitEnabled:$u(),alertStyle:hi(),locale:navigator.language}}),!0}catch(r){return console.warn("[PWA notifications] Push subscription sync failed:",r),!1}}async function D3(){if(ct())return;const t=await(await Qc())?.pushManager?.getSubscription();try{await kh("unsubscribe",{endpoint:t?.endpoint})}finally{const n=oe();n&&await LO(n.targetPeerId),await t?.unsubscribe();try{window.localStorage.removeItem(Hu)}catch{}}}async function O3(){if(ct()||!Eh())return;(await kh("preferences",{aiEnabled:kc(),exitEnabled:$u(),alertStyle:hi(),locale:navigator.language})).status===404&&await KO(!0)}async function M3(){if(!ct())try{const e=navigator;typeof e.clearAppBadge=="function"&&await e.clearAppBadge()}catch{}}async function B3(e){if(!ct())try{const t=await Qc();if(!t||typeof t.getNotifications!="function")return;const n=await Promise.all(["agent","exit"].map(o=>t.getNotifications({tag:`${o}:${e}`})));for(const o of n.flat())o.close();const r=navigator;if(typeof r.setAppBadge=="function"){const o=await t.getNotifications();await r.setAppBadge(o.length)}}catch{}}async function Td(e){if(!Eh()||!Sh())return!1;if(e.requireHidden!==!1&&UO())return!0;const t=ct();if(t){const s=e.alertStyle??hi(),i=await t.showNotification({title:e.title,body:e.body,tag:e.tag,sessionId:e.data?.sessionId,silent:s==="quiet",persistent:s==="persistent"});return t.notificationDeliveryConfirmation===!0&&i}if(Notification.permission!=="granted")return!1;const n=await Qc();if(e.deferToPush&&await n?.pushManager?.getSubscription())return!0;if(e.requireHidden!==!1){if(await n?.pushManager?.getSubscription())return!0}if(!zO(e))return!0;const r=e.alertStyle??hi(),o={body:e.body,tag:e.tag,icon:"/pwa-192x192.png",badge:"/maskable-icon-512x512.png",requireInteraction:r==="persistent",renotify:r==="persistent"?!!e.tag:!1,silent:r==="quiet",vibrate:r==="quiet"?[]:[80,40,80],data:{url:e.data?.url??"/",sessionId:e.data?.sessionId}};try{if(n&&typeof n.showNotification=="function")return await n.showNotification(e.title,o),!0;const s=new Notification(e.title,o);return s.onclick=()=>{window.focus(),e.data?.url&&window.location.href!==e.data.url&&window.location.assign(e.data.url),s.close()},!0}catch(s){if(s instanceof DOMException&&s.name==="NotSupportedError"&&o.renotify)try{const i={...o,renotify:!1};return n&&typeof n.showNotification=="function"?await n.showNotification(e.title,i):new Notification(e.title,i),!0}catch(i){return console.warn("[PWA notifications] Failed to show notification (renotify fallback):",i),!1}return console.warn("[PWA notifications] Failed to show notification:",s),!1}}function GO(){try{return localStorage.getItem("termdock:locale")||"en"}catch{return"en"}}function WO(e,t){return e==="zh"?{waitingTitle:`${t} 需要你的处理`,waitingBody:`${t} 需要你的处理。`,doneTitle:`${t} 已完成`,doneBody:`${t} 已完成,点按查看结果。`,exitedTitle:`${t} 已退出`,exitedBody:`${t} 已退出,点按查看结果。`}:{waitingTitle:`${t} needs your input`,waitingBody:`${t} is waiting for your input.`,doneTitle:`${t} finished`,doneBody:"Tap to see the result.",exitedTitle:`${t} exited`,exitedBody:"Tap to see the result."}}const iy=1e6;function Wt(e){return{sessionId:e,directory:"",terminalSessionId:null,mode:"shell",tmuxSessionName:null,activeProgram:null,activeProgramRaw:null,activeProgramSource:null,cwd:null,inCopyMode:!1,isConnecting:!1,agentStatus:null,agentIndicator:null,agentStatusDetail:null,agent:null,agentMessage:null,agentNativeSessionId:null,agentResumeRecovered:!1,agentRich:!1,agentActivity:0,agentCwd:null,agentNeedsReview:!1,shellTitle:null,promptState:null,shellExitCode:null,tuiProgress:null,gitStatus:null,bufferChunks:[],bufferLength:0,lastOutputAt:null,terminalOutputActive:!1,updatedAt:Date.now()}}const el="termdock-shell-titles-v1";function tl(){if(typeof window>"u")return{};try{const e=localStorage.getItem(el);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function ay(e){return tl()[e]??null}function VO(e,t){if(!(typeof window>"u"))try{const n=tl();t?n[e]=t:delete n[e],localStorage.setItem(el,JSON.stringify(n))}catch{}}function YO(e){if(!(typeof window>"u"))try{const t=tl();delete t[e],localStorage.setItem(el,JSON.stringify(t))}catch{}}const nl="termdock-agent-cache-v1";function Ih(){if(typeof window>"u")return{};try{const e=localStorage.getItem(nl);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function cy(e,t){if(!(typeof window>"u"))try{const n=Ih();t?n[e]=t:delete n[e],localStorage.setItem(nl,JSON.stringify(n))}catch{}}function XO(e){if(!(typeof window>"u"))try{const t=Ih();delete t[e],localStorage.setItem(nl,JSON.stringify(t))}catch{}}function JO(){if(!(typeof window>"u"))try{localStorage.removeItem(nl)}catch{}}function zu(e){return Ih()[e]??null}function ZO(){if(!(typeof window>"u"))try{localStorage.removeItem(el)}catch{}}const Ic=pr((e,t)=>{const n={pendingChunksBySession:new Map,outputAtBySession:new Map,batchFlushRafRef:null},r=(i,a)=>{const c=new Map;return e(d=>{const u=new Map(d.sessions);let f=d.nextChunkId;const h=Date.now();for(const p of new Set([...i.keys(),...a.keys()])){const g=i.get(p)??[],m=u.get(p)??Wt(p),b=g.length>0?[...m.bufferChunks]:m.bufferChunks;let y=m.bufferLength;for(const k of g){const x=f++;b.push({id:x,data:k}),c.set(p,x),y+=k.length}for(;g.length>0&&m.mode!=="tmux"&&y>iy&&b.length>1;){const k=b.shift();if(!k)break;y-=k.data.length}u.set(p,{...m,bufferChunks:b,bufferLength:y,lastOutputAt:a.get(p)??m.lastOutputAt,updatedAt:h})}return{sessions:u,nextChunkId:f}}),c},o=()=>{if(n.batchFlushRafRef===null){if(typeof window>"u"){s();return}n.batchFlushRafRef=window.requestAnimationFrame(()=>{n.batchFlushRafRef=null,s()})}},s=()=>{if(n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0)return;const i=NO(n.pendingChunksBySession),a=new Map(n.outputAtBySession);n.outputAtBySession.clear(),r(i,a),n.pendingChunksBySession.size>0&&o()};return{sessions:new Map,nextChunkId:1,activeSessionId:null,getTerminalSession:i=>t().sessions.get(i),setActiveSessionId:i=>{e({activeSessionId:i}),i&&t().clearAgentNeedsReview(i)},setTerminalSession:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i),f=!u||u.terminalSessionId!==a.sessionId;f&&n.outputAtBySession.delete(i);const h=f?Wt(i):u??Wt(i),p=(a.mode??h.mode)==="tmux"?[]:a.history??u?.history??[];return d.set(i,{...h,terminalSessionId:a.sessionId,mode:a.mode??h.mode,tmuxSessionName:a.tmuxSessionName??h.tmuxSessionName,activeProgram:a.activeProgram??u?.activeProgram??h.activeProgram,activeProgramRaw:a.activeProgramRaw??u?.activeProgramRaw??h.activeProgramRaw,activeProgramSource:a.activeProgramSource??u?.activeProgramSource??h.activeProgramSource,cwd:a.cwd??u?.cwd??h.cwd,agent:u?.agent??zu(i)??h.agent,agentResumeRecovered:u?.agentResumeRecovered??h.agentResumeRecovered,chatAttention:u?.chatAttention,shellTitle:u?.shellTitle??tl()[i]??h.shellTitle,sessionId:i,isConnecting:!1,history:p,updatedAt:Date.now()}),{sessions:d}})},setSessionHistory:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??Wt(i);return d.set(i,{...u,history:a,updatedAt:Date.now()}),{sessions:d}})},setSessionActiveProgram:(i,a,c=null,d=null)=>{e(u=>{const f=new Map(u.sessions),h=f.get(i)??Wt(i);return f.set(i,{...h,activeProgram:a,activeProgramRaw:d,activeProgramSource:c,updatedAt:Date.now()}),{sessions:f}})},setSessionCwd:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??Wt(i);return d.set(i,{...u,cwd:a,updatedAt:Date.now()}),{sessions:d}})},setSessionShellTitle:(i,a)=>{e(c=>{const d=c.sessions.get(i)??Wt(i);if(d.shellTitle===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,shellTitle:a,updatedAt:Date.now()}),{sessions:u}}),VO(i,a)},setSessionPromptState:(i,a,c)=>{e(d=>{const u=d.sessions.get(i);if(!u||u.promptState===a)return d;const f=new Map(d.sessions);return f.set(i,{...u,promptState:a,shellExitCode:c??u.shellExitCode,updatedAt:Date.now()}),{sessions:f}})},setSessionTuiProgress:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(!d)return c;const u=a?.state==="remove"?null:a;if(d.tuiProgress?.state===u?.state&&d.tuiProgress?.progress===u?.progress&&d.tuiProgress?.source===u?.source&&d.tuiProgress?.app===u?.app&&d.tuiProgress?.message===u?.message&&d.tuiProgress?.kind===u?.kind&&d.tuiProgress?.reviewed===u?.reviewed)return c;const f=new Map(c.sessions);return f.set(i,{...d,tuiProgress:u,updatedAt:Date.now()}),{sessions:f}})},setSessionGitStatus:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i);return!u||JSON.stringify(u.gitStatus)===JSON.stringify(a)?c:(d.set(i,{...u,gitStatus:a,updatedAt:Date.now()}),{sessions:d})})},setSessionCopyMode:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i);return!u||u.inCopyMode===a?c:(d.set(i,{...u,inCopyMode:a,updatedAt:Date.now()}),{sessions:d})})},setSessionAgentIdentity:(i,a)=>{cy(i,a),e(c=>{const d=c.sessions.get(i)??Wt(i);if(JSON.stringify(d.agent)===JSON.stringify(a))return c;const u=new Map(c.sessions);return u.set(i,{...d,agent:a,updatedAt:Date.now()}),{sessions:u}})},setSessionAgentStatus:(i,a)=>{const c=t(),d=c.sessions.get(i);if(!d)return;const u=a.agentStatus??null,f=u&&u!=="idle"?a.agentIndicator??d.agentIndicator??null:null,h=u&&u!=="idle"?a.agentStatusDetail??null:null,p=a.agent!==void 0?a.agent:d.agent,g=a.agentMessage!==void 0?a.agentMessage:u?d.agentMessage:null,m=a.agentNativeSessionId!==void 0?a.agentNativeSessionId:d.agentNativeSessionId,b=a.agentResumeRecovered!==void 0?a.agentResumeRecovered:d.agentResumeRecovered,y=a.agentRich??d.agentRich,k=a.agentActivity??d.agentActivity,x=a.agentCwd!==void 0?a.agentCwd:d.agentCwd,T=c.activeSessionId!==i,_=d.agentStatus==="working"||d.agentStatus==="waiting"||d.agentStatus==="done",A=a.reviewed===!1||a.reviewed===null&&u===null&&_&&T;if(d.agentStatus===u&&d.agentIndicator===f&&d.agentStatusDetail===h&&d.agent===p&&d.agentMessage===g&&d.agentNativeSessionId===m&&d.agentResumeRecovered===b&&d.agentRich===y&&d.agentActivity===k&&d.agentCwd===x&&d.agentNeedsReview===A)return;const E=new Map(c.sessions);if(E.set(i,{...d,agentStatus:u,agentIndicator:f,agentStatusDetail:h,agent:p,agentMessage:g,agentNativeSessionId:m,agentResumeRecovered:b,agentRich:y,agentActivity:k,agentCwd:x,agentNeedsReview:A,updatedAt:Date.now()}),e({sessions:E}),p&&cy(i,p),!kc())return;const v=p?.displayName??d.agent?.displayName??"Agent",S=GO(),I=WO(S,v);if(u==="waiting"&&d.agentStatus!=="waiting"&&T){Td({title:I.waitingTitle,body:g??I.waitingBody,tag:`agent:${i}`,dedupKey:`agent:${i}:waiting:${k}`,data:{url:"/",sessionId:i},deferToPush:!0});return}if(u==="done"&&d.agentStatus!=="done"&&T){Td({title:I.doneTitle,body:I.doneBody,tag:`agent:${i}`,dedupKey:`agent:${i}:done:${k}`,data:{url:"/",sessionId:i},deferToPush:!0});return}u===null&&(d.agentStatus==="working"||d.agentStatus==="waiting")&&T&&Td({title:I.exitedTitle,body:I.exitedBody,tag:`agent:${i}`,dedupKey:`agent:${i}:exited:${k}`,data:{url:"/",sessionId:i},deferToPush:!0})},setAgentResumeRecovered:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??Wt(i);return u.agentResumeRecovered===a?c:(d.set(i,{...u,agentResumeRecovered:a,updatedAt:Date.now()}),{sessions:d})})},clearAgentNeedsReview:i=>{const a=t().sessions.get(i),c=a?.tuiProgress?.source==="osc7501"&&a.tuiProgress.state==="done"&&!a.tuiProgress.reviewed;!a||!a.agentNeedsReview&&!c||(e(d=>{const u=new Map(d.sessions),f=u.get(i);return f?(u.set(i,{...f,agentNeedsReview:!1,tuiProgress:c&&f.tuiProgress?{...f.tuiProgress,reviewed:!0}:f.tuiProgress,updatedAt:Date.now()}),{sessions:u}):d}),a.terminalSessionId&&qx(a.terminalSessionId))},setSessionChatIndex:(i,a)=>{if(!a||typeof a.conversationId!="string"||!Array.isArray(a.messageIds)||a.messageIds.some(f=>typeof f!="string")||a.viewedMessageIds!==void 0&&(!Array.isArray(a.viewedMessageIds)||a.viewedMessageIds.some(f=>typeof f!="string")))return;const c=t().sessions.get(i)?.chatAttention?.index;a.viewedMessageIds&&c?.conversationId===a.conversationId&&c.viewedMessageIds&&(a={...a,viewedMessageIds:[...new Set([...a.viewedMessageIds,...c.viewedMessageIds])]});const d=ty(i,a),u=a.viewedMessageIds!==void 0;if(e(f=>{const h=f.sessions.get(i)??{...Wt(i),isConnecting:!1},p=h.chatAttention,g=u?new Set(a.viewedMessageIds):d,m=new Set(p?.unreadIds);if(!u&&p?.index?.conversationId===a.conversationId)for(const k of p.index.messageIds)m.has(k)||g.add(k);const b=a.messageIds.filter(k=>!g.has(k));if(JSON.stringify(p?.index)===JSON.stringify(a)&&JSON.stringify(p?.unreadIds)===JSON.stringify(b))return f;const y=new Map(f.sessions);return y.set(i,{...h,chatAttention:{...p,mode:p?.mode??!1,index:a,unreadIds:b}}),{sessions:y}}),u){const f=new Set(a.viewedMessageIds);for(const p of f)d.add(p);ny(i,a,d);const h=a.messageIds.filter(p=>d.has(p)&&!f.has(p));ry(i,a,h,p=>{const g=t().sessions.get(i)?.chatAttention?.index;g?.conversationId===p.conversationId&&t().setSessionChatIndex(i,{...g,viewedMessageIds:[...new Set([...g.viewedMessageIds??[],...p.viewedMessageIds??[]])]})})}},setSessionChatMode:(i,a)=>e(c=>{const d=c.sessions.get(i)??{...Wt(i),isConnecting:!1};if(d.chatAttention?.mode===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,chatAttention:{...d.chatAttention,mode:a,unreadIds:d.chatAttention?.unreadIds??[]}}),{sessions:u}}),setSessionChatHasMessages:(i,a)=>e(c=>{const d=c.sessions.get(i)??{...Wt(i),isConnecting:!1};if(d.chatAttention?.hasMessages===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,chatAttention:{...d.chatAttention,mode:d.chatAttention?.mode??!1,unreadIds:d.chatAttention?.unreadIds??[],hasMessages:a}}),{sessions:u}}),markChatMessagesViewed:(i,a)=>{const c=t().sessions.get(i),d=c?.chatAttention;if(!c||!d?.index)return;const u=new Set(a),f=d.unreadIds.filter(m=>!u.has(m));if(f.length===d.unreadIds.length)return;const h=new Set(f),p=ty(i,d.index);for(const m of d.index.messageIds)h.has(m)||p.add(m);if(ny(i,d.index,p),d.index.viewedMessageIds!==void 0){ry(i,d.index,a.filter(m=>d.unreadIds.includes(m)),m=>{const b=t().sessions.get(i)?.chatAttention?.index;b?.conversationId===m.conversationId&&t().setSessionChatIndex(i,{...b,viewedMessageIds:[...new Set([...b.viewedMessageIds??[],...m.viewedMessageIds??[]])]})});return}const g=new Map(t().sessions);g.set(i,{...c,chatAttention:{...d,unreadIds:f}}),e({sessions:g})},setConnecting:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??Wt(i);return d.set(i,{...u,isConnecting:a,updatedAt:Date.now()}),{sessions:d}})},recordTerminalOutput:i=>{t().sessions.get(i)?.terminalSessionId&&(n.outputAtBySession.set(i,Date.now()),o())},setTerminalOutputActivity:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(!d?.terminalSessionId||d.terminalOutputActive===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,terminalOutputActive:a}),{sessions:u}})},clearTerminalOutputActivity:i=>{n.outputAtBySession.delete(i),e(a=>{const c=a.sessions.get(i);if(!c||c.lastOutputAt===null&&!c.terminalOutputActive)return a;const d=new Map(a.sessions);return d.set(i,{...c,lastOutputAt:null,terminalOutputActive:!1}),{sessions:d}})},appendToBuffer:(i,a,c)=>{if(!a)return;let d=n.pendingChunksBySession.get(i);d||(d=[],n.pendingChunksBySession.set(i,d)),d.push(...oy(a)),c?.markActivity!==!1&&n.outputAtBySession.set(i,Date.now()),o()},hasPendingBufferWrites:i=>(n.pendingChunksBySession.get(i)?.length??0)>0,flushPendingBufferWrites:i=>{const a=n.pendingChunksBySession.get(i)??[],c=n.outputAtBySession.get(i);return!a.length&&c===void 0?t().sessions.get(i)?.bufferChunks.at(-1)?.id??null:(n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),r(new Map([[i,a]]),c===void 0?new Map:new Map([[i,c]])).get(i)??null)},releaseWrittenTmuxOutput:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(d?.mode!=="tmux"||!d.bufferChunks.some(h=>h.id<=a))return c;const u=d.bufferChunks.filter(h=>h.id>a),f=new Map(c.sessions);return f.set(i,{...d,bufferChunks:u,bufferLength:u.reduce((h,p)=>h+p.data.length,0)}),{sessions:f}})},replaceBuffer:(i,a)=>{n.pendingChunksBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null);let c=null;return e(d=>{const u=new Map(d.sessions),f=u.get(i);if(!f)return d;if(!a||a.length===0)return u.set(i,{...f,bufferChunks:[],bufferLength:0,updatedAt:Date.now()}),{sessions:u};let h=d.nextChunkId;const p=[];let g=0;for(const m of a)if(m)for(const b of oy(m)){const y=h++;p.push({id:y,data:b}),c=y,g+=b.length}for(;f.mode!=="tmux"&&g>iy&&p.length>1;){const m=p.shift();if(!m)break;g-=m.data.length}return u.set(i,{...f,bufferChunks:p,bufferLength:g,updatedAt:Date.now()}),{sessions:u,nextChunkId:h}}),c},clearTerminalSession:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e(a=>{const c=new Map(a.sessions),d=c.get(i);return d&&c.set(i,{...d,terminalSessionId:null,lastOutputAt:null,terminalOutputActive:!1,isConnecting:!1,agentStatus:null,agentIndicator:null,agentStatusDetail:null,agent:null,agentMessage:null,agentNeedsReview:!1,updatedAt:Date.now()}),{sessions:c}})},clearBuffer:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e(a=>{const c=new Map(a.sessions),d=c.get(i);return d?(c.set(i,{...d,bufferChunks:[],bufferLength:0,updatedAt:Date.now()}),{sessions:c}):a})},removeTerminalSession:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),e(a=>{const c=new Map(a.sessions);return c.delete(i),{sessions:c}}),YO(i),XO(i)},clearAllTerminalSessions:()=>{n.pendingChunksBySession.clear(),n.outputAtBySession.clear(),n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e({sessions:new Map,nextChunkId:1}),ZO(),JO()}}}),Cc=pr(e=>({records:[],shellNames:Lc,setShellNames:t=>e({shellNames:new Set(t)}),replace:t=>e({records:t})})),F3=e=>Cc.getState().setShellNames(e);function QO(e,t,n=Lc){const r=t&&(!e.backendSessionId||!t.terminalSessionId||e.backendSessionId===t.terminalSessionId),o={...e,shellTitle:e.shellTitle??(!t||r?ay(e.sessionId):null),agent:e.agent??(!t||r?zu(e.sessionId):null),...r?{activeProgram:t.activeProgram??e.activeProgram,cwd:t.cwd??e.cwd,shellTitle:t.shellTitle??e.shellTitle??ay(e.sessionId),promptState:t.promptState??e.promptState,agent:t.agent??e.agent??zu(e.sessionId)}:{}};return{sessionId:e.sessionId,mode:e.mode??null,collectionRunId:e.collectionRunId??null,...Ww(o,n),cwd:o.cwd??null,agent:o.agent??null,lastActivity:e.lastActivity}}function bS(){const e=Ic.getState().sessions,{records:t,shellNames:n}=Cc.getState();return t.map(r=>QO(r,e.get(r.sessionId),n))}function eM(){const e=Cc(r=>r.records),t=Cc(r=>r.shellNames),n=Ic(CO(r=>e.flatMap(o=>{const s=r.sessions.get(o.sessionId);return[s?.terminalSessionId,s?.activeProgram,s?.cwd,s?.shellTitle,s?.promptState,s?.agent]})));return w.useMemo(()=>bS(),[e,n,t])}function U3(e){const t=eM();return w.useMemo(()=>{const n=new Map(t.map(r=>[r.sessionId,r]));return e.map(r=>{const o=r.sessionId?n.get(r.sessionId):void 0,{displayName:s,displaySubtitle:i}=o??of(r);return{...r,displayName:s,displaySubtitle:i}})},[e,t])}const qu="termdock:session-notice";function tM(){return w.useEffect(()=>{const e=()=>Cd.getState().view(!document.hidden&&jr()?Ic.getState().activeSessionId:null);e();const t=Ic.subscribe((n,r)=>{n.activeSessionId!==r.activeSessionId&&e()});return document.addEventListener("visibilitychange",e),window.addEventListener(qr,e),()=>{t(),document.removeEventListener("visibilitychange",e),window.removeEventListener(qr,e),Cd.getState().view(null)}},[]),w.useEffect(()=>EO(e=>{if(e.type!=="session-notice")return;Cd.getState().receive(e.sessionId,e.id);const t=oe()?.targetPeerId,n=Sn(),r=window.parent,o=bS().find(a=>a.sessionId===e.sessionId)?.displayName??of({sessionId:e.sessionId,name:e.sessionName}).displayName,s={...e,sessionName:o,key:`${t??"local"}:${e.id}`,open:()=>t&&n?n.focusSession(t,e.sessionId):(window.dispatchEvent(new CustomEvent("termdock:focus-session",{detail:e.sessionId})),!0)},i=r.document.createEvent("CustomEvent");i.initCustomEvent(qu,!1,!1,s),r.dispatchEvent(i)}),[]),null}function nM(){const{locale:e}=jt(),t=e==="zh",[n,r]=w.useState([]);w.useEffect(()=>{const i=a=>{const c=a.detail;r(d=>d.some(u=>u.key===c.key)?d:[...d,c])};return window.addEventListener(qu,i),()=>window.removeEventListener(qu,i)},[]);const o=w.useCallback(i=>{r(a=>a.filter(c=>c.key!==i))},[]),s=n[0];return s?Vn.createPortal(l.jsx(rM,{notice:s,remaining:n.length-1,chinese:t,onDismiss:o},s.key),document.body):null}function rM({notice:e,remaining:t,chinese:n,onDismiss:r}){const[o,s]=w.useState(!1);return l.jsxs("section",{"aria-label":n?"关键进展提醒":"Progress reminder",className:"fixed left-3 right-3 top-[calc(var(--safe-top-inset,0px)+0.75rem)] z-toast overflow-hidden rounded-xl bg-surface text-foreground shadow-lg ring-1 ring-inset ring-border/15 animate-fade-in md:left-auto md:right-4 md:w-[360px]",children:[l.jsxs("button",{type:"button","aria-label":n?"查看 Session":"Open session",className:"group flex w-full items-start gap-2.5 p-3.5 pr-11 text-left transition-colors hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",onClick:()=>{e.open()?r(e.key):s(!0)},children:[l.jsx(Zu,{size:16,className:"mt-0.5 shrink-0 text-primary","aria-hidden":"true"}),l.jsxs("span",{className:"min-w-0 flex-1",role:"status","aria-live":"polite","aria-atomic":"true",children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium",title:e.sessionName,children:e.sessionName}),l.jsx(ky,{size:13,className:"shrink-0 text-muted-foreground/60 transition-colors group-hover:text-primary","aria-hidden":"true"})]}),e.title&&l.jsx("span",{className:"mt-1 block truncate text-[11px] text-muted-foreground",children:e.title}),l.jsx("span",{className:"mt-1.5 line-clamp-3 whitespace-pre-wrap break-words text-[13px] leading-relaxed text-foreground/85",title:e.message,children:e.message}),t>0&&l.jsx("span",{className:"mt-2 block text-[10px] text-muted-foreground",children:n?`还有 ${t} 条`:`${t} more`}),o&&l.jsx("span",{role:"alert",className:"mt-2 block text-xs text-warning",children:n?"暂时无法打开该服务,请重试。":"Unable to open the service. Please retry."})]})]}),l.jsx("button",{type:"button","aria-label":n?"关闭提醒":"Dismiss reminder",className:"absolute right-0 top-0 flex h-11 w-11 items-center justify-center rounded-tr-xl text-muted-foreground/60 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",onClick:()=>r(e.key),children:l.jsx(wi,{size:14})})]})}const ly=5*6e4;let Ku,vS=!1,xS=!1,dy=!1;const Gu=new Set;function Wu(e=window){const t=e.document.createEvent("Event");t.initEvent("termdock:before-update",!1,!1),e.dispatchEvent(t);for(const n of e.document.querySelectorAll("iframe[data-workspace-key]")){const r=n.contentWindow;r&&Wu(r)}}async function H3(){const e=window.top&&window.top.location.origin===location.origin?window.top:window;Wu(e);const t=e.navigator.serviceWorker,n=await t?.getRegistration("/");if(n){await n.update();const r=n.installing;r&&r.state!=="installed"&&r.state!=="activated"&&await new Promise((s,i)=>{const a=()=>{clearTimeout(d),r.removeEventListener("statechange",c)},c=()=>{r.state==="installed"||r.state==="activated"?(a(),s()):r.state==="redundant"&&(a(),i(new Error("Interface update installation failed")))},d=setTimeout(()=>{a(),i(new Error("Interface update installation timed out"))},6e4);r.addEventListener("statechange",c),c()});const o=n.waiting;o&&await new Promise((s,i)=>{const a=()=>{clearTimeout(d),t.removeEventListener("controllerchange",c)},c=()=>{a(),s()},d=setTimeout(()=>{a(),i(new Error("Interface update activation timed out"))},3e4);t.addEventListener("controllerchange",c),o.postMessage({type:"SKIP_WAITING"})})}Wu(e),e.location.reload()}function uy(){vS=!0,Gu.forEach(e=>e())}function oM(){return w.useSyncExternalStore(e=>(Gu.add(e),()=>{Gu.delete(e)}),()=>vS,()=>!1)}function sM(){window.dispatchEvent(new Event("termdock:before-update")),xS=!0,Ku?.waiting?Ku.waiting.postMessage({type:"SKIP_WAITING"}):window.location.reload()}function iM(e,t){let n=e;return()=>{if(!n){n=!0;return}t()}}function aM(){if(dy||typeof window>"u"||!("serviceWorker"in navigator))return;dy=!0,navigator.serviceWorker.addEventListener("controllerchange",iM(!!navigator.serviceWorker.controller,()=>{xS?window.location.reload():uy()}));const e=()=>{navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}).then(t=>{Ku=t;const n=()=>{t.waiting&&uy()},r=()=>{const i=t.installing;i?.addEventListener("statechange",()=>{i.state==="installed"&&navigator.serviceWorker.controller&&n()})};t.addEventListener("updatefound",r),r(),n();let o=0;const s=()=>{document.visibilityState!=="visible"||Date.now()-o<ly||(o=Date.now(),t.update().then(n).catch(()=>{}))};s(),window.setInterval(s,ly),document.addEventListener("visibilitychange",s)}).catch(()=>{})};document.readyState==="complete"?e():window.addEventListener("load",e,{once:!0})}function cM(){const e=oM(),[t,n]=w.useState(!1),{locale:r}=jt();if(!e||t)return null;const o=r==="zh";return l.jsxs("div",{role:"status",className:"fixed bottom-16 left-1/2 z-toast flex max-w-[calc(100%-2rem)] -translate-x-1/2 items-center gap-3 rounded-lg border border-border bg-background px-4 py-3 text-sm text-foreground shadow-lg",children:[l.jsx("span",{children:o?"新版本已就绪":"An update is ready"}),l.jsx("button",{type:"button",className:"whitespace-nowrap text-primary",onClick:sM,children:o?"重新加载":"Reload"}),l.jsx("button",{type:"button",className:"whitespace-nowrap text-muted-foreground",onClick:()=>n(!0),children:o?"稍后":"Later"})]})}let Fs=[],Ad=!1;function lM(e,t,n={}){typeof window>"u"||(Fs.push(JSON.stringify({level:e,message:t,data:{ts:Date.now(),...n}})),dM())}async function dM(){if(!Ad){Ad=!0;try{for(;Fs.length>0;){const e=Fs[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),Fs.shift()}catch{Fs=[];break}}}finally{Ad=!1}}}function uM(){const e=w.useRef(null),t=navigator.standalone===!0||window.matchMedia?.("(display-mode: standalone)").matches===!0,n=window.parent===window&&Zc()&&t;return w.useEffect(()=>{if(!n)return;const r=()=>{const o=e.current;if(!o)return;const s=o.getBoundingClientRect(),i=getComputedStyle(o);lM("info","PWA_STATUS_BAR_SURFACE",{revision:"ipad-default-status-bar",statusBarStyle:document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]')?.getAttribute("content"),entry:document.querySelector('script[type="module"][src]')?.getAttribute("src"),parent:o.parentElement?.tagName,rect:{x:s.x,y:s.y,width:s.width,height:s.height},background:i.backgroundColor,clip:i.backgroundClip,zIndex:i.zIndex,safeTop:getComputedStyle(document.documentElement).getPropertyValue("--safe-top-inset"),viewport:{width:window.innerWidth,height:window.innerHeight,offsetTop:window.visualViewport?.offsetTop},screen:{width:window.screen.width,height:window.screen.height}})};return window.addEventListener("termdock:initial-viewport-presented",r,{once:!0}),()=>window.removeEventListener("termdock:initial-viewport-presented",r)},[n]),n?Vn.createPortal(l.jsx("div",{ref:e,"data-pwa-status-bar-surface":!0,"aria-hidden":"true",className:"pwa-status-bar-surface pointer-events-none fixed inset-x-0 top-0 z-popover app-chrome-bg"}),document.body):null}function SS(e){const t=document.querySelector('meta[name="theme-color"]');t&&t.setAttribute("content",e==="light"?"#FFFCF0":"#1C1B1A")}const ES=w.createContext(void 0);function $3({children:e}){const t=w.useContext(ES),n=t===void 0?typeof document>"u"?null:document.body:t;return n?Vn.createPortal(e,n):null}const fM={activeKey:"root",items:[]},hM=()=>()=>{},pM=()=>fM;function mM({host:e,item:t,visible:n,active:r}){const o=w.useRef(null);return w.useEffect(()=>{o.current?.toggleAttribute("inert",!r)},[r]),w.useLayoutEffect(()=>{const s=o.current;return()=>{try{const i=s?.contentWindow,a=i?.document.createEvent("Event");a&&(a.initEvent("termdock:before-update",!1,!1),i?.dispatchEvent(a))}catch{}e.attach(t.key,null)}},[e,t.key]),Vn.createPortal(l.jsx("iframe",{ref:o,title:t.service?.label||"服务工作区","data-workspace-key":t.key,src:`/workspace.html?${vx}=${encodeURIComponent(t.key)}`,className:"fixed inset-0 w-full border-0 bg-[var(--chrome-bg)]",style:{height:"var(--app-native-frame-height, var(--app-base-vh, 100%))",visibility:n?"visible":"hidden",pointerEvents:r?"auto":"none"},"aria-hidden":!r,tabIndex:r?0:-1,allow:"clipboard-read; clipboard-write; fullscreen"}),document.body)}function gM({children:e}){const t=window.parent===window?Sn():void 0,n=w.useSyncExternalStore(t?.subscribe||hM,t?.snapshot||pM),[r,o]=w.useState(null),[s,i]=w.useState(()=>n.activeKey==="root"?"root":null),[a,c]=w.useState(),[d,u]=w.useState(!1),[f,h]=w.useState(),p=n.items.find(x=>x.key===n.activeKey),g=p?.rendered||a===n.activeKey?n.activeKey:s,m=g!==n.activeKey,b=m&&s===null;w.useLayoutEffect(()=>{if(!m||b){h(void 0);return}const x=()=>{const T=Array.from(document.querySelectorAll("iframe[data-workspace-key]")).find(R=>R.dataset.workspaceKey===s),v=(s==="root"?r:T?.contentDocument)?.querySelector('nav[aria-label="切换服务"]')?.closest("[data-sidebar-gesture-ignore]")?.getBoundingClientRect();if(!v||v.width===0||v.right<=0){h(void 0);return}const S=T?.getBoundingClientRect(),I=v.top+(S?.top??0)>=160;h({left:v.left+(S?.left??0)+12,top:(I?v.top-8:v.bottom+8)+(S?.top??0),width:Math.max(0,v.width-24),transform:I?"translateY(-100%)":"none"})};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[m,b,s,r]),w.useLayoutEffect(()=>{t?.present(g),m||i(g),r?.toggleAttribute("inert",g!=="root"||m)},[t,r,g,m]),w.useEffect(()=>{if(u(!1),!m)return;const x=setTimeout(()=>u(!0),8e3);return()=>clearTimeout(x)},[n.activeKey,m]),w.useEffect(()=>{c(void 0)},[n.activeKey]);const y=n.items.find(x=>x.key===s),k=p?.phase==="offline"?"网络已断开,等待恢复…":p?.phase==="reconnecting"?"连接暂未恢复,正在重试…":d?"连接时间较长,仍在等待服务…":b?"正在恢复服务…":"正在切换服务…";return w.useEffect(()=>{if(!t)return;const x=()=>{try{const T=JSON.parse(localStorage.getItem("termdock-color-theme")||"null");(T==="dark"||T==="light")&&(document.documentElement.dataset.theme=T,SS(T))}catch{}};return window.addEventListener("storage",x),()=>window.removeEventListener("storage",x)},[t]),w.useEffect(()=>{if(!t||!("serviceWorker"in navigator))return;const x=A=>{if(A.source!==navigator.serviceWorker.controller)return;const E=A.data;E?.type==="termdock:focus-session"&&typeof E.targetPeerId=="string"&&typeof E.sessionId=="string"&&t.focusSession(E.targetPeerId,E.sessionId)&&(A.ports[0]?.postMessage({type:"termdock:focus-session-ack"}),A.stopImmediatePropagation())},T=async()=>{if("caches"in window)try{const A=await caches.open("termdock-notification-target-v1"),E=await A.match("/__termdock-notification-target");if(!E)return;const v=await E.json();typeof v.targetPeerId=="string"&&typeof v.sessionId=="string"&&Date.now()-v.clickedAt<3e4&&t.focusSession(v.targetPeerId,v.sessionId)&&await A.delete("/__termdock-notification-target")}catch{}},_=()=>{document.hidden||T()};return navigator.serviceWorker.addEventListener("message",x),document.addEventListener("visibilitychange",_),T(),()=>{navigator.serviceWorker.removeEventListener("message",x),document.removeEventListener("visibilitychange",_)}},[t]),t?l.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-[var(--chrome-bg)]",children:[l.jsx("div",{ref:o,className:"isolate h-full w-full","aria-hidden":g!=="root"||m,style:{visibility:g==="root"?"visible":"hidden"},children:l.jsx(ES.Provider,{value:r,children:e})}),n.items.filter(x=>x.key!=="root").map(x=>l.jsx(mM,{host:t,item:x,visible:g===x.key,active:!m&&g===x.key},x.key)),b&&l.jsx(th,{className:"z-modal-panel",status:k,detail:d||p?.phase==="offline"||p?.phase==="reconnecting"?p?.service?.label:void 0,actionLabel:d||p?.phase==="offline"||p?.phase==="reconnecting"?"查看连接页面":void 0,onAction:()=>c(n.activeKey)}),m&&!b&&l.jsx("div",{className:"fixed inset-0 z-modal-panel flex items-end justify-center px-3 pb-[calc(env(safe-area-inset-bottom)+96px)]",role:"dialog","aria-modal":"true","aria-label":"切换服务",onKeyDown:x=>{if(x.key==="Escape"&&y?.service&&(x.preventDefault(),t.activate(y.service)),x.key==="Tab"){const T=Array.from(x.currentTarget.querySelectorAll("button")),_=T[0],A=T[T.length-1];x.shiftKey&&document.activeElement===_?(x.preventDefault(),A?.focus()):!x.shiftKey&&document.activeElement===A&&(x.preventDefault(),_?.focus())}},children:l.jsxs("div",{style:f?{position:"absolute",...f}:void 0,className:"flex w-full max-w-sm flex-wrap items-center gap-x-2 gap-y-1 rounded-xl border border-border bg-surface-elevated px-3 py-1.5 text-foreground shadow-lg",children:[l.jsxs("div",{role:"status","aria-live":"polite",className:"flex min-w-0 flex-1 items-center gap-2",children:[l.jsx(Qe,{size:16,className:"shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-sm font-medium",children:p?.service?.label||"服务工作区"}),l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:k})]})]}),l.jsxs("div",{className:"flex items-center justify-end gap-1",children:[d&&l.jsx("button",{type:"button",className:"min-h-11 rounded-lg px-3 text-xs text-muted-foreground hover:bg-surface-2",onClick:()=>c(n.activeKey),children:"查看连接页面"}),y?.service&&l.jsx("button",{type:"button",autoFocus:!0,"aria-label":"取消切换",className:"min-h-11 shrink-0 rounded-lg px-3 text-xs text-muted-foreground hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",onClick:()=>t.activate(y.service),children:"取消"})]})]})})]}):e}const yM=w.lazy(()=>tn(()=>import("./App-DtFyFpq9.js").then(e=>e.b),__vite__mapDeps([24,12,1,13,25,26,2,27,28,15,16,29,10,30,31,32,33,34,35,36,37,38,39,40,41,42,5,6,7,8,9,43,44,22,45,46,47,48,49,50,51,52,21,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]))),wM=w.lazy(()=>tn(()=>import("./DagPlayground-CdJBbXwP.js"),__vite__mapDeps([98,99,1,100,2,101,55,64,28])).then(e=>({default:e.DagPlayground}))),bM=w.lazy(()=>tn(()=>import("./DiffLab-yG2XUfTH.js"),__vite__mapDeps([102,1,103,17,65,2,104,105])).then(e=>({default:e.DiffLab}))),vM=w.lazy(()=>tn(()=>import("./DiffReviewLab-DEcsYe4A.js"),__vite__mapDeps([106,1,107,7,15,16,108,2,18,103,17,65,104,105])).then(e=>({default:e.DiffReviewLab})));bD();U2();G_();window.parent===window&&aM();const Us=oe();Us&&tn(()=>import("./App-DtFyFpq9.js").then(e=>e.b),__vite__mapDeps([24,12,1,13,25,26,2,27,28,15,16,29,10,30,31,32,33,34,35,36,37,38,39,40,41,42,5,6,7,8,9,43,44,22,45,46,47,48,49,50,51,52,21,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97])).catch(()=>{});!new URLSearchParams(location.search).has("dag-playground")&&!new URLSearchParams(location.search).has("diff-lab")&&!new URLSearchParams(location.search).has("diff-review-lab")&&C2(Us?{...Us,id:Us.targetPeerId,label:Us.serviceName||location.host}:void 0);try{const e=JSON.parse(window.localStorage.getItem("termdock-color-theme")||"null");(e==="dark"||e==="light")&&(document.documentElement.dataset.theme=e,SS(e))}catch{}Y_.createRoot(document.getElementById("root")).render(l.jsxs(Ut.StrictMode,{children:[l.jsx(uM,{}),l.jsx(z_,{}),l.jsxs(F_,{children:[window.parent===window&&l.jsxs(l.Fragment,{children:[l.jsx(cM,{}),l.jsx(nM,{})]}),l.jsx(mO,{children:l.jsx(w.Suspense,{fallback:l.jsx(th,{}),children:(()=>{const e=new URLSearchParams(window.location.search);return e.get("dag-playground")==="1"?l.jsx(wM,{}):e.get("diff-review-lab")==="1"?l.jsx(vM,{}):e.get("diff-lab")==="1"?l.jsx(bM,{}):l.jsx(gM,{children:l.jsxs(uO,{children:[l.jsx(tM,{}),l.jsx(yM,{}),l.jsx(K_,{})]})})})()})})]})]}));export{yi as $,h0 as A,Zu as B,Mn as C,Mm as D,_x as E,Qu as F,Xg as G,uw as H,KD as I,Qe as J,Lm as K,Uo as L,x2 as M,Nx as N,gi as O,Nc as P,Tu as Q,bw as R,xw as S,ni as T,ri as U,ef as V,tf as W,Nw as X,mE as Y,Et as Z,Ld as _,Vf as a,n3 as a$,iO as a0,x0 as a1,_c as a2,Dw as a3,nf as a4,th as a5,Bw as a6,$e as a7,AD as a8,rf as a9,TM as aA,AM as aB,RM as aC,PM as aD,rD as aE,Bs as aF,b0 as aG,DN as aH,QB as aI,Um as aJ,yL as aK,NN as aL,Kc as aM,oL as aN,Jf as aO,g2 as aP,k3 as aQ,NM as aR,mN as aS,AT as aT,Y2 as aU,HP as aV,_M as aW,LM as aX,jM as aY,DM as aZ,OM as a_,wu as aa,Jg as ab,GD as ac,gD as ad,Hw as ae,qr as af,$3 as ag,wi as ah,tn as ai,PD as aj,DP as ak,dc as al,Pf as am,qB as an,UB as ao,zB as ap,Kn as aq,a_ as ar,L_ as as,EM as at,kM as au,IM as av,CM as aw,jB as ax,x3 as ay,MD as az,by as b,Wu as b$,s3 as b0,_r as b1,n_ as b2,t_ as b3,g3 as b4,M3 as b5,tN as b6,lM as b7,zD as b8,MM as b9,XD as bA,y3 as bB,Gg as bC,CP as bD,Ml as bE,B2 as bF,A2 as bG,He as bH,uL as bI,wN as bJ,v3 as bK,YB as bL,B3 as bM,Q2 as bN,VP as bO,yN as bP,HM as bQ,n0 as bR,$M as bS,J2 as bT,D_ as bU,tb as bV,Rx as bW,eP as bX,KM as bY,zM as bZ,qM as b_,FP as ba,BM as bb,SB as bc,Ba as bd,EB as be,EE as bf,FM as bg,XB as bh,fL as bi,SL as bj,X2 as bk,HB as bl,TP as bm,Mt as bn,nn as bo,S3 as bp,OB as bq,JB as br,UM as bs,YD as bt,pr as bu,hN as bv,TD as bw,d_ as bx,hD as by,me as bz,Ju as c,pN as c$,AL as c0,RE as c1,u3 as c2,VM as c3,GM as c4,WM as c5,$P as c6,Jt as c7,en as c8,lN as c9,XP as cA,Ww as cB,of as cC,lr as cD,kc as cE,$u as cF,hi as cG,Eh as cH,ct as cI,Px as cJ,lP as cK,jD as cL,oN as cM,qP as cN,nN as cO,r_ as cP,Yx as cQ,Sn as cR,YM as cS,u0 as cT,Hg as cU,MB as cV,Ev as cW,zv as cX,l3 as cY,$N as cZ,dN as c_,cN as ca,fN as cb,IP as cc,e_ as cd,JN as ce,zu as cf,XN as cg,l_ as ch,ZN as ci,sN as cj,ve as ck,Ki as cl,LN as cm,WN as cn,i_ as co,FN as cp,o_ as cq,YN as cr,qN as cs,IN as ct,R3 as cu,QN as cv,_u as cw,Z2 as cx,bS as cy,SE as cz,Sy as d,xN as d$,Gw as d0,pL as d1,gc as d2,Vx as d3,Zc as d4,aL as d5,oh as d6,E3 as d7,d3 as d8,_N as d9,zP as dA,QM as dB,eB as dC,aN as dD,b3 as dE,Mg as dF,tB as dG,nB as dH,k_ as dI,$B as dJ,ui as dK,OD as dL,Vg as dM,D2 as dN,KN as dO,tO as dP,JP as dQ,T3 as dR,Ke as dS,rB as dT,oB as dU,CL as dV,sB as dW,iB as dX,aB as dY,w3 as dZ,cB as d_,jN as da,RN as db,Zx as dc,Xx as dd,FO as de,Sh as df,E0 as dg,jr as dh,l as di,DB as dj,KP as dk,RP as dl,XM as dm,ZM as dn,JM as dp,f_ as dq,vN as dr,f0 as ds,KB as dt,eh as du,A_ as dv,c_ as dw,e0 as dx,__ as dy,gt as dz,ky as e,oe as e$,DD as e0,N_ as e1,NP as e2,lB as e3,Ur as e4,En as e5,qD as e6,ZB as e7,Jr as e8,HN as e9,RD as eA,TN as eB,kN as eC,BP as eD,gL as eE,FB as eF,i3 as eG,UP as eH,GP as eI,v_ as eJ,j_ as eK,sL as eL,bN as eM,w_ as eN,m3 as eO,uB as eP,fB as eQ,_B as eR,PE as eS,p_ as eT,kL as eU,s_ as eV,kd as eW,h_ as eX,VB as eY,E_ as eZ,r0 as e_,BN as ea,w0 as eb,UN as ec,zN as ed,a3 as ee,c3 as ef,CB as eg,_P as eh,dB as ei,tP as ej,kB as ek,t3 as el,H3 as em,_s as en,g_ as eo,SN as ep,b_ as eq,T_ as er,eN as es,QP as et,CN as eu,EN as ev,rN as ew,vo as ex,j3 as ey,UD as ez,Ty as f,Qw as f$,P_ as f0,Tx as f1,ht as f2,R_ as f3,MP as f4,jP as f5,PP as f6,OP as f7,Kx as f8,hB as f9,GB as fA,WB as fB,EO as fC,y_ as fD,IB as fE,LP as fF,LB as fG,O3 as fH,KO as fI,SS as fJ,yB as fK,wB as fL,AP as fM,NB as fN,uN as fO,D3 as fP,gN as fQ,u_ as fR,iN as fS,ZP as fT,Yt as fU,Pi as fV,s0 as fW,C3 as fX,I3 as fY,q_ as fZ,VD as f_,QO as fa,m_ as fb,S_ as fc,x_ as fd,C_ as fe,F3 as ff,N3 as fg,_3 as fh,L3 as fi,P3 as fj,zx as fk,kP as fl,WP as fm,xa as fn,o3 as fo,v0 as fp,xL as fq,h3 as fr,f3 as fs,p3 as ft,EL as fu,Td as fv,pB as fw,mB as fx,I_ as fy,gB as fz,Or as g,Kw as g0,F0 as g1,hL as g2,sh as g3,jt as g4,Li as g5,BB as g6,cS as g7,uh as g8,A3 as g9,e3 as ga,eM as gb,Cc as gc,Cd as gd,U3 as ge,cD as gf,CO as gg,ah as gh,_e as gi,Ic as gj,vD as gk,Zs as gl,Z0 as gm,bB as gn,Be as go,MN as gp,vB as gq,Yc as gr,rn as gs,r3 as gt,dh as gu,vh as gv,TB as gw,xB as gx,Un as h,Oy as i,By as j,Uy as k,Da as l,Ky as m,pt as n,mi as o,TL as p,Ac as q,g0 as r,Mr as s,mO as t,Xy as u,Zy as v,kj as w,Pc as x,$s as y,Rc as z};
|