termdock 1.4.368 → 1.4.369
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-Dq2L_i03.js +3 -0
- package/dist/client/assets/AndroidMirrorView-Dq2L_i03.js.br +0 -0
- package/dist/client/assets/AndroidMirrorView-Dq2L_i03.js.gz +0 -0
- package/dist/client/assets/App-B2ioVIx_.js +188 -0
- package/dist/client/assets/App-B2ioVIx_.js.br +0 -0
- package/dist/client/assets/App-B2ioVIx_.js.gz +0 -0
- package/dist/client/assets/ArchitecturePanel-Dt6OkxlV.js +9 -0
- package/dist/client/assets/ArchitecturePanel-Dt6OkxlV.js.br +0 -0
- package/dist/client/assets/ArchitecturePanel-Dt6OkxlV.js.gz +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-MwE55bs1.js +2 -0
- package/dist/client/assets/ChangeWalkthroughPanel-MwE55bs1.js.br +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-MwE55bs1.js.gz +0 -0
- package/dist/client/assets/ChatChartReference-BjwRHJgH.js +284 -0
- package/dist/client/assets/ChatChartReference-BjwRHJgH.js.br +0 -0
- package/dist/client/assets/ChatChartReference-BjwRHJgH.js.gz +0 -0
- package/dist/client/assets/ChatContextPreview-C_7Sx4ne.js +1 -0
- package/dist/client/assets/ChatContextPreview-C_7Sx4ne.js.br +0 -0
- package/dist/client/assets/ChatContextPreview-C_7Sx4ne.js.gz +0 -0
- package/dist/client/assets/ChatFullContent-CJU36Eqx.js +67 -0
- package/dist/client/assets/ChatFullContent-CJU36Eqx.js.br +0 -0
- package/dist/client/assets/ChatFullContent-CJU36Eqx.js.gz +0 -0
- package/dist/client/assets/ChatRichContent-B2276n9q.js +2 -0
- package/dist/client/assets/ChatRichContent-B2276n9q.js.br +0 -0
- package/dist/client/assets/ChatRichContent-B2276n9q.js.gz +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-BC-BMHP-.js +1 -0
- package/dist/client/assets/ChatVideoPreviewDialog-BC-BMHP-.js.br +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-BC-BMHP-.js.gz +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-bm4_BxkH.js +1 -0
- package/dist/client/assets/CollaborationMainWorkspace-bm4_BxkH.js.br +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-bm4_BxkH.js.gz +0 -0
- package/dist/client/assets/CollaborationTaskContent-DCjDQKpW.js +1 -0
- package/dist/client/assets/ComputerControlView-g0g14gp0.js +6 -0
- package/dist/client/assets/ComputerControlView-g0g14gp0.js.br +0 -0
- package/dist/client/assets/ComputerControlView-g0g14gp0.js.gz +0 -0
- package/dist/client/assets/DagPlayground-0oF_gy27.js +1 -0
- package/dist/client/assets/DagPlayground-0oF_gy27.js.br +0 -0
- package/dist/client/assets/DagPlayground-0oF_gy27.js.gz +0 -0
- package/dist/client/assets/DiffLab-DhMOv8st.js +455 -0
- package/dist/client/assets/DiffLab-DhMOv8st.js.br +0 -0
- package/dist/client/assets/DiffLab-DhMOv8st.js.gz +0 -0
- package/dist/client/assets/DiffReview-DLgPGGBf.js +1 -0
- package/dist/client/assets/DiffReview-DLgPGGBf.js.br +0 -0
- package/dist/client/assets/DiffReview-DLgPGGBf.js.gz +0 -0
- package/dist/client/assets/DiffReviewLab-Dk7fmTHI.js +2 -0
- package/dist/client/assets/DiffReviewLab-Dk7fmTHI.js.br +0 -0
- package/dist/client/assets/DiffReviewLab-Dk7fmTHI.js.gz +0 -0
- package/dist/client/assets/DiffViewer-DAZqU1ZK.js +34 -0
- package/dist/client/assets/DiffViewer-DAZqU1ZK.js.br +0 -0
- package/dist/client/assets/DiffViewer-DAZqU1ZK.js.gz +0 -0
- package/dist/client/assets/GitLoadingSkeleton-C9USfqvg.js +1 -0
- package/dist/client/assets/GitLoadingSkeleton-C9USfqvg.js.br +0 -0
- package/dist/client/assets/GitLoadingSkeleton-C9USfqvg.js.gz +0 -0
- package/dist/client/assets/Markdown-DjAUiDpR.js +23 -0
- package/dist/client/assets/Markdown-DjAUiDpR.js.br +0 -0
- package/dist/client/assets/Markdown-DjAUiDpR.js.gz +0 -0
- package/dist/client/assets/MarkdownPreview-BhsJzqeM.js +1 -0
- package/dist/client/assets/MarkdownPreview-BhsJzqeM.js.br +0 -0
- package/dist/client/assets/MarkdownPreview-BhsJzqeM.js.gz +0 -0
- package/dist/client/assets/ModelPreview-BTDnHSm0.js +4112 -0
- package/dist/client/assets/ModelPreview-BTDnHSm0.js.br +0 -0
- package/dist/client/assets/ModelPreview-BTDnHSm0.js.gz +0 -0
- package/dist/client/assets/RecordingSaveDialog-CWWYeUxo.js +1 -0
- package/dist/client/assets/RecordingSaveDialog-CWWYeUxo.js.br +0 -0
- package/dist/client/assets/RecordingSaveDialog-CWWYeUxo.js.gz +0 -0
- package/dist/client/assets/RightSidebar-8f92-ECp.js +1729 -0
- package/dist/client/assets/RightSidebar-8f92-ECp.js.br +0 -0
- package/dist/client/assets/RightSidebar-8f92-ECp.js.gz +0 -0
- package/dist/client/assets/SessionChatView-BwYmQVwO.js +38 -0
- package/dist/client/assets/SessionChatView-BwYmQVwO.js.br +0 -0
- package/dist/client/assets/SessionChatView-BwYmQVwO.js.gz +0 -0
- package/dist/client/assets/SessionResourceSidebar-DFIIPO6_.js +2 -0
- package/dist/client/assets/SessionResourceSidebar-DFIIPO6_.js.br +0 -0
- package/dist/client/assets/SessionResourceSidebar-DFIIPO6_.js.gz +0 -0
- package/dist/client/assets/TodoWorkspace-DewCbUwR.js +1 -0
- package/dist/client/assets/TodoWorkspace-DewCbUwR.js.br +0 -0
- package/dist/client/assets/TodoWorkspace-DewCbUwR.js.gz +0 -0
- package/dist/client/assets/VideoPreviewPlayer-BWkqrWri.js +1 -0
- package/dist/client/assets/VideoPreviewPlayer-BWkqrWri.js.br +0 -0
- package/dist/client/assets/VideoPreviewPlayer-BWkqrWri.js.gz +0 -0
- package/dist/client/assets/a-arrow-down-DTbJKj2f.js +1 -0
- package/dist/client/assets/a-arrow-up-vNZLRtMn.js +1 -0
- package/dist/client/assets/a-large-small-D3vtmgkr.js +1 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-deBO97A1.js +1 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-deBO97A1.js.br +0 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-deBO97A1.js.gz +0 -0
- package/dist/client/assets/accessibility-DZyFl3DM.js +1 -0
- package/dist/client/assets/activity-CqyA-dZN.js +1 -0
- package/dist/client/assets/air-vent-DuG6n0to.js +1 -0
- package/dist/client/assets/airplay-Cp85UciS.js +1 -0
- package/dist/client/assets/alarm-clock-CvO6Mbjg.js +1 -0
- package/dist/client/assets/alarm-clock-check-BPw6-Pa0.js +1 -0
- package/dist/client/assets/alarm-clock-minus-BTgqwedJ.js +1 -0
- package/dist/client/assets/alarm-clock-off-DBtcJigN.js +1 -0
- package/dist/client/assets/alarm-clock-plus-BcCX-95t.js +1 -0
- package/dist/client/assets/alarm-smoke-DlTl2HI4.js +1 -0
- package/dist/client/assets/album-De04ZYR1.js +1 -0
- package/dist/client/assets/align-center-horizontal-DvojUkR1.js +1 -0
- package/dist/client/assets/align-center-vertical-DEaz15PH.js +1 -0
- package/dist/client/assets/align-end-horizontal-Cf4Jp-tW.js +1 -0
- package/dist/client/assets/align-end-vertical-COVc59bx.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-center-DUIvLMWR.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-end-CNcivNlA.js +1 -0
- package/dist/client/assets/align-horizontal-distribute-start-yo8YboDh.js +1 -0
- package/dist/client/assets/align-horizontal-justify-center-DPBVy59f.js +1 -0
- package/dist/client/assets/align-horizontal-justify-end-vNJgb_4C.js +1 -0
- package/dist/client/assets/align-horizontal-justify-start-DNGO9k8Z.js +1 -0
- package/dist/client/assets/align-horizontal-space-around-gaCvIhqq.js +1 -0
- package/dist/client/assets/align-horizontal-space-between-DwnIQfIW.js +1 -0
- package/dist/client/assets/align-start-horizontal-Md6CFAxn.js +1 -0
- package/dist/client/assets/align-start-vertical-DyOgJAc6.js +1 -0
- package/dist/client/assets/align-vertical-distribute-center-Co_nRmF8.js +1 -0
- package/dist/client/assets/align-vertical-distribute-end-B_C88nE5.js +1 -0
- package/dist/client/assets/align-vertical-distribute-start-BQ_BHRKY.js +1 -0
- package/dist/client/assets/align-vertical-justify-center-GU6pjoC0.js +1 -0
- package/dist/client/assets/align-vertical-justify-end-CbPfWVvq.js +1 -0
- package/dist/client/assets/align-vertical-justify-start-DzoPYCcn.js +1 -0
- package/dist/client/assets/align-vertical-space-around-crDUuoBL.js +1 -0
- package/dist/client/assets/align-vertical-space-between-DUax4qp-.js +1 -0
- package/dist/client/assets/ambulance-Cc32eqYh.js +1 -0
- package/dist/client/assets/ampersand-DmbadJ2o.js +1 -0
- package/dist/client/assets/ampersands-D36zOibW.js +1 -0
- package/dist/client/assets/amphora-DEFqoAlv.js +1 -0
- package/dist/client/assets/anchor-CLuyKiek.js +1 -0
- package/dist/client/assets/angry-qF5mWr2W.js +1 -0
- package/dist/client/assets/annoyed-DVo12F8M.js +1 -0
- package/dist/client/assets/antenna-Duz-7iyr.js +1 -0
- package/dist/client/assets/anvil-D9ZjZYgP.js +1 -0
- package/dist/client/assets/aperture-BXcQCSCi.js +1 -0
- package/dist/client/assets/app-7fFuAr_0.js +37 -0
- package/dist/client/assets/app-7fFuAr_0.js.br +0 -0
- package/dist/client/assets/app-7fFuAr_0.js.gz +0 -0
- package/dist/client/assets/app-window-2IWd3gDj.js +1 -0
- package/dist/client/assets/app-window-mac-BqQIWF0S.js +1 -0
- package/dist/client/assets/apple-BsQr03yV.js +1 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BjA_HTNC.js +36 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BjA_HTNC.js.br +0 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-BjA_HTNC.js.gz +0 -0
- package/dist/client/assets/archive-C0c-bpzE.js +1 -0
- package/dist/client/assets/archive-restore-DVd1_RuB.js +1 -0
- package/dist/client/assets/archive-x-DElCYP9o.js +1 -0
- package/dist/client/assets/armchair-DQQU8MOv.js +1 -0
- package/dist/client/assets/arrow-big-down-bIXqPIyJ.js +1 -0
- package/dist/client/assets/arrow-big-down-dash-CenjOcEN.js +1 -0
- package/dist/client/assets/arrow-big-left-BlN5cebu.js +1 -0
- package/dist/client/assets/arrow-big-left-dash-QVkavLiv.js +1 -0
- package/dist/client/assets/arrow-big-right-C-3rdciu.js +1 -0
- package/dist/client/assets/arrow-big-right-dash-BTpG7704.js +1 -0
- package/dist/client/assets/arrow-big-up-B3RNpxDD.js +1 -0
- package/dist/client/assets/arrow-big-up-dash-BCTWVqaH.js +1 -0
- package/dist/client/assets/arrow-down-0-1-r9LbYF-R.js +1 -0
- package/dist/client/assets/arrow-down-1-0-B0h_0izi.js +1 -0
- package/dist/client/assets/arrow-down-DvG8DZll.js +1 -0
- package/dist/client/assets/arrow-down-from-line-CULWcDpz.js +1 -0
- package/dist/client/assets/arrow-down-left-BFR10wN7.js +1 -0
- package/dist/client/assets/arrow-down-narrow-wide-C5CVzcba.js +1 -0
- package/dist/client/assets/arrow-down-right-shJNzMPA.js +1 -0
- package/dist/client/assets/arrow-down-to-dot-Orn9kUom.js +1 -0
- package/dist/client/assets/arrow-down-to-line-CmGk3dHH.js +1 -0
- package/dist/client/assets/arrow-down-up-DcpOZF_k.js +1 -0
- package/dist/client/assets/arrow-down-wide-narrow-Bpa6qoXS.js +1 -0
- package/dist/client/assets/arrow-down-z-a-CMIM9QFa.js +1 -0
- package/dist/client/assets/arrow-left-from-line-bqbCaXm7.js +1 -0
- package/dist/client/assets/arrow-left-right-oM3WrzET.js +1 -0
- package/dist/client/assets/arrow-left-to-line-BatRknX5.js +1 -0
- package/dist/client/assets/arrow-right-from-line-B1mSZN2d.js +1 -0
- package/dist/client/assets/arrow-right-left-BEsUdk8g.js +1 -0
- package/dist/client/assets/arrow-right-to-line-CF4rW-jI.js +1 -0
- package/dist/client/assets/arrow-up-0-1-CxiJvm_U.js +1 -0
- package/dist/client/assets/arrow-up-1-0-DgoMJr1v.js +1 -0
- package/dist/client/assets/arrow-up-a-z-DrnZsCgq.js +1 -0
- package/dist/client/assets/arrow-up-down-Bos-mztz.js +1 -0
- package/dist/client/assets/arrow-up-from-dot-1DfrlpGy.js +1 -0
- package/dist/client/assets/arrow-up-from-line-Boj18PDc.js +1 -0
- package/dist/client/assets/arrow-up-left-DUjVizUq.js +1 -0
- package/dist/client/assets/arrow-up-narrow-wide-gOCsVFQd.js +1 -0
- package/dist/client/assets/arrow-up-to-line-DuUKS_xP.js +1 -0
- package/dist/client/assets/arrow-up-wide-narrow-jTYCWKbp.js +1 -0
- package/dist/client/assets/arrow-up-z-a-Bcym7J7T.js +1 -0
- package/dist/client/assets/arrows-up-from-line-DgA9rbWh.js +1 -0
- package/dist/client/assets/asterisk-CgdsPwtT.js +1 -0
- package/dist/client/assets/astroid-CUMYjhgA.js +1 -0
- package/dist/client/assets/atom-D_zRgsMO.js +1 -0
- package/dist/client/assets/audio-lines-Dap8wUlo.js +1 -0
- package/dist/client/assets/audio-waveform-yq1MLJBD.js +1 -0
- package/dist/client/assets/award-COoMx4u0.js +1 -0
- package/dist/client/assets/axe-DjREj3jS.js +1 -0
- package/dist/client/assets/axis-3d-BzcymmbM.js +1 -0
- package/dist/client/assets/baby-BELCFajj.js +1 -0
- package/dist/client/assets/backpack-DpZnERiv.js +1 -0
- package/dist/client/assets/badge-CChVJM-6.js +1 -0
- package/dist/client/assets/badge-alert-D7NKVu_o.js +1 -0
- package/dist/client/assets/badge-cent-Dix8eGaA.js +1 -0
- package/dist/client/assets/badge-check-CuXYZCCL.js +1 -0
- package/dist/client/assets/badge-dollar-sign-B27yKifz.js +1 -0
- package/dist/client/assets/badge-euro-Cp0zrW9f.js +1 -0
- package/dist/client/assets/badge-indian-rupee-B29rbRgq.js +1 -0
- package/dist/client/assets/badge-info-hSMTLTv5.js +1 -0
- package/dist/client/assets/badge-japanese-yen-BzxHI53F.js +1 -0
- package/dist/client/assets/badge-minus-DVwuzxRB.js +1 -0
- package/dist/client/assets/badge-percent-TNfsr6FX.js +1 -0
- package/dist/client/assets/badge-plus-CwCxm1eR.js +1 -0
- package/dist/client/assets/badge-pound-sterling-CUk_rZwZ.js +1 -0
- package/dist/client/assets/badge-question-mark-BHPMyJ4V.js +1 -0
- package/dist/client/assets/badge-russian-ruble-DiHOCkph.js +1 -0
- package/dist/client/assets/badge-swiss-franc-CO6GAkFH.js +1 -0
- package/dist/client/assets/badge-turkish-lira-COzV2gbq.js +1 -0
- package/dist/client/assets/badge-x-Bj2Y4Gt2.js +1 -0
- package/dist/client/assets/baggage-claim-DrMC1H-u.js +1 -0
- package/dist/client/assets/balloon-x38xMe10.js +1 -0
- package/dist/client/assets/ban-Cq9w0e2u.js +1 -0
- package/dist/client/assets/banana-BH50W7tY.js +1 -0
- package/dist/client/assets/bandage-CvQ4DKxN.js +1 -0
- package/dist/client/assets/banknote-MPP01jnt.js +1 -0
- package/dist/client/assets/banknote-arrow-down-Be12W9yz.js +1 -0
- package/dist/client/assets/banknote-arrow-up-ZSZqlc_Y.js +1 -0
- package/dist/client/assets/banknote-x-BDwa3uHs.js +1 -0
- package/dist/client/assets/barcode-CixXdwzu.js +1 -0
- package/dist/client/assets/barrel-BCJIOZYP.js +1 -0
- package/dist/client/assets/baseline-BtYt2kMz.js +1 -0
- package/dist/client/assets/bath-FckG7WEf.js +1 -0
- package/dist/client/assets/battery-BWyMcXvA.js +1 -0
- package/dist/client/assets/battery-charging-71EtEyJK.js +1 -0
- package/dist/client/assets/battery-full-Dp5qYJHG.js +1 -0
- package/dist/client/assets/battery-low-Bbh4DeV5.js +1 -0
- package/dist/client/assets/battery-medium-BCAwjcKm.js +1 -0
- package/dist/client/assets/battery-plus-C76PMfpu.js +1 -0
- package/dist/client/assets/battery-warning-BgvVMCmD.js +1 -0
- package/dist/client/assets/beaker-Dkmzd3Rd.js +1 -0
- package/dist/client/assets/bean-DP1qj8V9.js +1 -0
- package/dist/client/assets/bean-off-BKRStGf9.js +1 -0
- package/dist/client/assets/bed-CX6uqsda.js +1 -0
- package/dist/client/assets/bed-double-DTNLMGSm.js +1 -0
- package/dist/client/assets/bed-single-DqaUCc84.js +1 -0
- package/dist/client/assets/beef-Bcebic3U.js +1 -0
- package/dist/client/assets/beef-off-CI_NTbNd.js +1 -0
- package/dist/client/assets/beer-DI33SkMk.js +1 -0
- package/dist/client/assets/beer-off-Or-QmEtG.js +1 -0
- package/dist/client/assets/bell-CODAtRE3.js +1 -0
- package/dist/client/assets/bell-check-DDfzB40o.js +1 -0
- package/dist/client/assets/bell-electric-D0oqh7gu.js +1 -0
- package/dist/client/assets/bell-minus-Dz9hq_tr.js +1 -0
- package/dist/client/assets/bell-off-99SY2Wy0.js +1 -0
- package/dist/client/assets/bell-plus-jgovXt78.js +1 -0
- package/dist/client/assets/bell-ring-DXIBPVPT.js +1 -0
- package/dist/client/assets/between-horizontal-end-DowpuQ54.js +1 -0
- package/dist/client/assets/between-horizontal-start-BrpY-I1u.js +1 -0
- package/dist/client/assets/between-vertical-end-Ci1HWKlO.js +1 -0
- package/dist/client/assets/between-vertical-start-CTi3ZjcJ.js +1 -0
- package/dist/client/assets/biceps-flexed-BA_vR-Z5.js +1 -0
- package/dist/client/assets/bike-C1TKZZHb.js +1 -0
- package/dist/client/assets/binary-BPRYo8Hy.js +1 -0
- package/dist/client/assets/binoculars-DOJbel-U.js +1 -0
- package/dist/client/assets/biohazard-DahCjbk6.js +1 -0
- package/dist/client/assets/bird-BFGbDxga.js +1 -0
- package/dist/client/assets/birdhouse-DlYTlU-v.js +1 -0
- package/dist/client/assets/bitcoin-B2Z0DBRQ.js +1 -0
- package/dist/client/assets/blend-CLNNWl5H.js +1 -0
- package/dist/client/assets/blender-Dhb2BLO_.js +1 -0
- package/dist/client/assets/blinds-BkUb28Em.js +1 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-DpwS0RsB.js +129 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-DpwS0RsB.js.br +0 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-DpwS0RsB.js.gz +0 -0
- package/dist/client/assets/blocks-448JiXZY.js +1 -0
- package/dist/client/assets/bluetooth-DyAFJAqB.js +1 -0
- package/dist/client/assets/bluetooth-connected-CJjMXbq1.js +1 -0
- package/dist/client/assets/bluetooth-off-GqtJtXmX.js +1 -0
- package/dist/client/assets/bluetooth-searching-2qJ1PkcH.js +1 -0
- package/dist/client/assets/bold-PSxjZ4iZ.js +1 -0
- package/dist/client/assets/bolt-CR1Cc0ls.js +1 -0
- package/dist/client/assets/bomb-uhWD4J8p.js +1 -0
- package/dist/client/assets/bone-BnAEBT79.js +1 -0
- package/dist/client/assets/book-BwhWDCQT.js +1 -0
- package/dist/client/assets/book-a-DhEidkoJ.js +1 -0
- package/dist/client/assets/book-alert-CPcCtxsr.js +1 -0
- package/dist/client/assets/book-audio-wxa5ZhSJ.js +1 -0
- package/dist/client/assets/book-check-DmVwlKQl.js +1 -0
- package/dist/client/assets/book-copy-AV1or_q_.js +1 -0
- package/dist/client/assets/book-dashed-wfrUwFGg.js +1 -0
- package/dist/client/assets/book-down-D_4kiOFo.js +1 -0
- package/dist/client/assets/book-headphones-BH7QC3nO.js +1 -0
- package/dist/client/assets/book-heart-BH1fnBuG.js +1 -0
- package/dist/client/assets/book-image-DmqFVcrr.js +1 -0
- package/dist/client/assets/book-key-BNLylszc.js +1 -0
- package/dist/client/assets/book-lock-C1jmbukh.js +1 -0
- package/dist/client/assets/book-marked-DZngRlxh.js +1 -0
- package/dist/client/assets/book-minus-VNHZGkgA.js +1 -0
- package/dist/client/assets/book-open-DwqHx7Y-.js +1 -0
- package/dist/client/assets/book-open-check-BxE1Z2dz.js +1 -0
- package/dist/client/assets/book-open-text-D0Z4anaS.js +1 -0
- package/dist/client/assets/book-plus-DEdrIlIv.js +1 -0
- package/dist/client/assets/book-search-CaVulLmb.js +1 -0
- package/dist/client/assets/book-text-CfUNrCSE.js +1 -0
- package/dist/client/assets/book-type-BPs_aohP.js +1 -0
- package/dist/client/assets/book-up-2-kLZFinfQ.js +1 -0
- package/dist/client/assets/book-up-tVqBdjOs.js +1 -0
- package/dist/client/assets/book-user-B846Trnm.js +1 -0
- package/dist/client/assets/book-x-BQAParti.js +1 -0
- package/dist/client/assets/bookmark-CG0Ct99B.js +1 -0
- package/dist/client/assets/bookmark-check-CZyzYkDu.js +1 -0
- package/dist/client/assets/bookmark-minus-CEI5uu6c.js +1 -0
- package/dist/client/assets/bookmark-off-COTQgNhp.js +1 -0
- package/dist/client/assets/bookmark-plus-YxjNhi-u.js +1 -0
- package/dist/client/assets/bookmark-x-BMybBulX.js +1 -0
- package/dist/client/assets/boom-box-I2QP0Tj9.js +1 -0
- package/dist/client/assets/bot-message-square-QJjvtkHO.js +1 -0
- package/dist/client/assets/bot-off-DACoYIyn.js +1 -0
- package/dist/client/assets/bottle-wine-5G-yHtqK.js +1 -0
- package/dist/client/assets/bow-arrow-BuIcMpW_.js +1 -0
- package/dist/client/assets/boxes-D_MRd2nl.js +1 -0
- package/dist/client/assets/braces-DWRQlbTk.js +1 -0
- package/dist/client/assets/brackets-BlX6pPea.js +1 -0
- package/dist/client/assets/brain-DbOBaoLe.js +1 -0
- package/dist/client/assets/brain-circuit-DNLWTBaT.js +1 -0
- package/dist/client/assets/brain-cog-CRyuKHd5.js +1 -0
- package/dist/client/assets/brain-cog-CRyuKHd5.js.br +0 -0
- package/dist/client/assets/brain-cog-CRyuKHd5.js.gz +0 -0
- package/dist/client/assets/brick-wall-CXDzZ6hG.js +1 -0
- package/dist/client/assets/brick-wall-fire-9B0PlGOF.js +1 -0
- package/dist/client/assets/brick-wall-shield-yN3L9F66.js +1 -0
- package/dist/client/assets/briefcase-business-DmaazJQV.js +1 -0
- package/dist/client/assets/briefcase-conveyor-belt-BLBb4-Rv.js +1 -0
- package/dist/client/assets/briefcase-medical-CKnuU9uo.js +1 -0
- package/dist/client/assets/bring-to-front-CedvavVA.js +1 -0
- package/dist/client/assets/broccoli-45q9V3lA.js +1 -0
- package/dist/client/assets/brush-CZSGmRGk.js +1 -0
- package/dist/client/assets/brush-cleaning-CeNRhe2N.js +1 -0
- package/dist/client/assets/bubbles-DSgWJmO1.js +1 -0
- package/dist/client/assets/bug-Bq6N2psU.js +1 -0
- package/dist/client/assets/bug-off-DmBkNjAU.js +1 -0
- package/dist/client/assets/bug-play-DMOXtqyR.js +1 -0
- package/dist/client/assets/building-2-BMccFPTW.js +1 -0
- package/dist/client/assets/building-B7cl4ym9.js +1 -0
- package/dist/client/assets/bus-CPRIY7k3.js +1 -0
- package/dist/client/assets/bus-front-DL2Qecy7.js +1 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-UGkRvJDr.js +38 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-UGkRvJDr.js.br +0 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-UGkRvJDr.js.gz +0 -0
- package/dist/client/assets/cable-GaEXEb3-.js +1 -0
- package/dist/client/assets/cable-car-BjiwUN8S.js +1 -0
- package/dist/client/assets/cake-DAy4rjvt.js +1 -0
- package/dist/client/assets/cake-slice-ONaFkixF.js +1 -0
- package/dist/client/assets/calculator-DmnTmGyz.js +1 -0
- package/dist/client/assets/calendar-1-CGr9mSua.js +1 -0
- package/dist/client/assets/calendar-BWAMIXpR.js +1 -0
- package/dist/client/assets/calendar-arrow-down-DDKM1hSs.js +1 -0
- package/dist/client/assets/calendar-arrow-up-C7WiFU3T.js +1 -0
- package/dist/client/assets/calendar-check-2-CZRTFTDF.js +1 -0
- package/dist/client/assets/calendar-check-BOQRbFij.js +1 -0
- package/dist/client/assets/calendar-clock-Bt7T-ToC.js +1 -0
- package/dist/client/assets/calendar-cog-Byd2MBrv.js +1 -0
- package/dist/client/assets/calendar-days-Dx49aiAa.js +1 -0
- package/dist/client/assets/calendar-fold-CrqKiRDi.js +1 -0
- package/dist/client/assets/calendar-heart-DFDpzvtd.js +1 -0
- package/dist/client/assets/calendar-minus-2-BQEi1uoZ.js +1 -0
- package/dist/client/assets/calendar-minus-D_mbvd6z.js +1 -0
- package/dist/client/assets/calendar-off-CR1tMVAc.js +1 -0
- package/dist/client/assets/calendar-plus-2-D6dBF3LP.js +1 -0
- package/dist/client/assets/calendar-plus-DMwrD7jo.js +1 -0
- package/dist/client/assets/calendar-range-BsOIl819.js +1 -0
- package/dist/client/assets/calendar-search-DfSbH3Bc.js +1 -0
- package/dist/client/assets/calendar-sync-Dd--2Wmu.js +1 -0
- package/dist/client/assets/calendar-x-2-BH2NulY2.js +1 -0
- package/dist/client/assets/calendar-x-8fLJqXls.js +1 -0
- package/dist/client/assets/calendars-DNZJSRJd.js +1 -0
- package/dist/client/assets/camera-YPlc04QS.js +1 -0
- package/dist/client/assets/camera-off-DuLwz_FU.js +1 -0
- package/dist/client/assets/candy-DHRJ7e2K.js +1 -0
- package/dist/client/assets/candy-cane-CUX7XFrm.js +1 -0
- package/dist/client/assets/candy-off-avD4qMiH.js +1 -0
- package/dist/client/assets/cannabis-BC2ZAfok.js +1 -0
- package/dist/client/assets/cannabis-off-Ip6LQIdW.js +1 -0
- package/dist/client/assets/captions-B8fVXoMC.js +1 -0
- package/dist/client/assets/captions-off-D6Z7yyMf.js +1 -0
- package/dist/client/assets/car-BNnJM14H.js +1 -0
- package/dist/client/assets/car-front-D0MQL2mh.js +1 -0
- package/dist/client/assets/car-taxi-front-DyhH_jnb.js +1 -0
- package/dist/client/assets/caravan-DOmCCCOQ.js +1 -0
- package/dist/client/assets/card-sim-D7lb1Por.js +1 -0
- package/dist/client/assets/carrot-Cs_hNuha.js +1 -0
- package/dist/client/assets/case-lower-B_4havfH.js +1 -0
- package/dist/client/assets/case-sensitive-xhFtZFYQ.js +1 -0
- package/dist/client/assets/case-upper-DHhmmpgZ.js +1 -0
- package/dist/client/assets/cassette-tape-G5l-pp1t.js +1 -0
- package/dist/client/assets/cast-BbgKCDux.js +1 -0
- package/dist/client/assets/castle-Dh2iHZK0.js +1 -0
- package/dist/client/assets/cat-BYydp09T.js +1 -0
- package/dist/client/assets/cctv-EKtKvH1z.js +1 -0
- package/dist/client/assets/cctv-off-WDg_lp4Z.js +1 -0
- package/dist/client/assets/channel-5ZwVPTPA.js +1 -0
- package/dist/client/assets/chart-area-ndhvjH-J.js +1 -0
- package/dist/client/assets/chart-bar-DEaynh4K.js +1 -0
- package/dist/client/assets/chart-bar-big-jjyHWuEh.js +1 -0
- package/dist/client/assets/chart-bar-decreasing-BSS9QQAL.js +1 -0
- package/dist/client/assets/chart-bar-increasing-BYE440os.js +1 -0
- package/dist/client/assets/chart-bar-stacked-BSvHVyFF.js +1 -0
- package/dist/client/assets/chart-candlestick-BJXpK3gs.js +1 -0
- package/dist/client/assets/chart-column-B9pEDOpY.js +1 -0
- package/dist/client/assets/chart-column-big-CLhrAlj1.js +1 -0
- package/dist/client/assets/chart-column-decreasing-Dft1P4_a.js +1 -0
- package/dist/client/assets/chart-column-increasing-cCYkSUiA.js +1 -0
- package/dist/client/assets/chart-column-stacked-C0e9SCtr.js +1 -0
- package/dist/client/assets/chart-gantt-Bi5Ovx9H.js +1 -0
- package/dist/client/assets/chart-line-D5TleOLA.js +1 -0
- package/dist/client/assets/chart-network-D9RsJpU_.js +1 -0
- package/dist/client/assets/chart-no-axes-column-BaucPi7M.js +1 -0
- package/dist/client/assets/chart-no-axes-column-decreasing-CJZaCgdY.js +1 -0
- package/dist/client/assets/chart-no-axes-column-increasing-CBjERMec.js +1 -0
- package/dist/client/assets/chart-no-axes-combined-SGxoMss9.js +1 -0
- package/dist/client/assets/chart-no-axes-gantt-Cy5YtWw3.js +1 -0
- package/dist/client/assets/chart-pie-C30IHjmC.js +1 -0
- package/dist/client/assets/chart-scatter-DXxWbjEV.js +1 -0
- package/dist/client/assets/chart-spline-DGUMOQvl.js +1 -0
- package/dist/client/assets/check-check-C5QCZKiI.js +1 -0
- package/dist/client/assets/check-line-4l3LBWRX.js +1 -0
- package/dist/client/assets/chef-hat-Cpw4T8Gv.js +1 -0
- package/dist/client/assets/cherry-DxItS6eq.js +1 -0
- package/dist/client/assets/chess-bishop-CSUFoT8l.js +1 -0
- package/dist/client/assets/chess-king-BwBTEJ9O.js +1 -0
- package/dist/client/assets/chess-knight-Bey5VC5O.js +1 -0
- package/dist/client/assets/chess-pawn-DgtNC5Ck.js +1 -0
- package/dist/client/assets/chess-queen-D0AByJ8v.js +1 -0
- package/dist/client/assets/chess-rook-B5hEAExa.js +1 -0
- package/dist/client/assets/chevron-first-DQ9VMe1X.js +1 -0
- package/dist/client/assets/chevron-last-BI7UBpWa.js +1 -0
- package/dist/client/assets/chevron-left-CJszkdJ5.js +1 -0
- package/dist/client/assets/chevrons-down-B1WW9E3-.js +1 -0
- package/dist/client/assets/chevrons-down-up-C8ML__Bq.js +1 -0
- package/dist/client/assets/chevrons-left-CLVPso2L.js +1 -0
- package/dist/client/assets/chevrons-left-right-CqHQwnl4.js +1 -0
- package/dist/client/assets/chevrons-left-right-ellipsis-PaC0ouJ5.js +1 -0
- package/dist/client/assets/chevrons-right-BJ8gmLQK.js +1 -0
- package/dist/client/assets/chevrons-right-left-B_3JknVt.js +1 -0
- package/dist/client/assets/chevrons-up-CR8A4tBQ.js +1 -0
- package/dist/client/assets/chevrons-up-down-BJ7VIQUU.js +1 -0
- package/dist/client/assets/chunk-2Q5K7J3B-C4ZEgd7W.js +1 -0
- package/dist/client/assets/chunk-5VM5RSS4-CIWZlCOS.js +15 -0
- package/dist/client/assets/chunk-F27PBJKO-ByAcssWy.js +1 -0
- package/dist/client/assets/chunk-F27PBJKO-ByAcssWy.js.br +0 -0
- package/dist/client/assets/chunk-F27PBJKO-ByAcssWy.js.gz +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-oxh-8A2i.js +231 -0
- package/dist/client/assets/chunk-IMKFNOWR-oxh-8A2i.js.br +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-oxh-8A2i.js.gz +0 -0
- package/dist/client/assets/chunk-JWPE2WC7-DhiMGdsN.js +1 -0
- package/dist/client/assets/chunk-POPQ4Y6H-BbwE3BtX.js +1 -0
- package/dist/client/assets/chunk-SVP7TREG-DejnJh3K.js +88 -0
- package/dist/client/assets/chunk-SVP7TREG-DejnJh3K.js.br +0 -0
- package/dist/client/assets/chunk-SVP7TREG-DejnJh3K.js.gz +0 -0
- package/dist/client/assets/chunk-TICWLB2K-UOvyIzay.js +206 -0
- package/dist/client/assets/chunk-TICWLB2K-UOvyIzay.js.br +0 -0
- package/dist/client/assets/chunk-TICWLB2K-UOvyIzay.js.gz +0 -0
- package/dist/client/assets/chunk-XXDRQBXY-C8bjrxGr.js +1 -0
- package/dist/client/assets/church-Bj5sBSIy.js +1 -0
- package/dist/client/assets/cigarette-BBhSKgyy.js +1 -0
- package/dist/client/assets/cigarette-off-l9zeTDEh.js +1 -0
- package/dist/client/assets/circle-DWc6-tOe.js +1 -0
- package/dist/client/assets/circle-arrow-down-B63POHmv.js +1 -0
- package/dist/client/assets/circle-arrow-left-BTA59gGd.js +1 -0
- package/dist/client/assets/circle-arrow-out-down-left-B89qVUE8.js +1 -0
- package/dist/client/assets/circle-arrow-out-down-right-DCjL3gXF.js +1 -0
- package/dist/client/assets/circle-arrow-out-up-left-B9wd2e_A.js +1 -0
- package/dist/client/assets/circle-arrow-out-up-right-Vb_AzngB.js +1 -0
- package/dist/client/assets/circle-arrow-right-DnHDRN74.js +1 -0
- package/dist/client/assets/circle-arrow-up-qq0__lNj.js +1 -0
- package/dist/client/assets/circle-check-big-bw7wuPBI.js +1 -0
- package/dist/client/assets/circle-chevron-down-wxvpyQFY.js +1 -0
- package/dist/client/assets/circle-chevron-left-B28CuT7K.js +1 -0
- package/dist/client/assets/circle-chevron-right-CiC1LsbV.js +1 -0
- package/dist/client/assets/circle-chevron-up-CsY2bdtg.js +1 -0
- package/dist/client/assets/circle-dashed-DeXUXhi2.js +1 -0
- package/dist/client/assets/circle-divide-B6NCUT0b.js +1 -0
- package/dist/client/assets/circle-dollar-sign-B0_dOjaJ.js +1 -0
- package/dist/client/assets/circle-dot-dashed-BKpwobxh.js +1 -0
- package/dist/client/assets/circle-dot-sgWI70_v.js +1 -0
- package/dist/client/assets/circle-ellipsis-GqkV_HJI.js +1 -0
- package/dist/client/assets/circle-equal-CauheR_H.js +1 -0
- package/dist/client/assets/circle-fading-arrow-up-BUey0C8P.js +1 -0
- package/dist/client/assets/circle-fading-plus-CrGsBFmc.js +1 -0
- package/dist/client/assets/circle-gauge-BokK_ps-.js +1 -0
- package/dist/client/assets/circle-minus-JIAH18WX.js +1 -0
- package/dist/client/assets/circle-off-DPutB0te.js +1 -0
- package/dist/client/assets/circle-parking-BkGG4MPR.js +1 -0
- package/dist/client/assets/circle-parking-off-DFBR1DE0.js +1 -0
- package/dist/client/assets/circle-pause-DsMZJuEK.js +1 -0
- package/dist/client/assets/circle-percent-CuxGONTT.js +1 -0
- package/dist/client/assets/circle-pile-CEpB6RIM.js +1 -0
- package/dist/client/assets/circle-play-DHb84p7A.js +1 -0
- package/dist/client/assets/circle-plus-BUd0hULW.js +1 -0
- package/dist/client/assets/circle-pound-sterling-CsOLw7rV.js +1 -0
- package/dist/client/assets/circle-power-DvX1DKtA.js +1 -0
- package/dist/client/assets/circle-question-mark-BxVJnTzQ.js +1 -0
- package/dist/client/assets/circle-slash-2-B7guYFZ2.js +1 -0
- package/dist/client/assets/circle-slash-DxsSXGbV.js +1 -0
- package/dist/client/assets/circle-small-CMQLe66R.js +1 -0
- package/dist/client/assets/circle-star-C_w7phS1.js +1 -0
- package/dist/client/assets/circle-stop-D0lBy_JA.js +1 -0
- package/dist/client/assets/circle-user-BwJ2wYgH.js +1 -0
- package/dist/client/assets/circle-user-round-Cgrf8wcR.js +1 -0
- package/dist/client/assets/circle-x-DmYTbP1G.js +1 -0
- package/dist/client/assets/circuit-board-D3LoQWHs.js +1 -0
- package/dist/client/assets/citrus-BSlcIY_S.js +1 -0
- package/dist/client/assets/clapperboard-Bk1Ua-V6.js +1 -0
- package/dist/client/assets/classDiagram-ZZMXUADV-DpmJaMyg.js +1 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-DpmJaMyg.js +1 -0
- package/dist/client/assets/clipboard-BFiy7IFX.js +1 -0
- package/dist/client/assets/clipboard-check-Ba2VzUbJ.js +1 -0
- package/dist/client/assets/clipboard-clock-Be-EE992.js +1 -0
- package/dist/client/assets/clipboard-copy-C1DcXr41.js +1 -0
- package/dist/client/assets/clipboard-list-DzvaT2lv.js +1 -0
- package/dist/client/assets/clipboard-minus-zQBVkC_a.js +1 -0
- package/dist/client/assets/clipboard-paste-CtQ8YWE5.js +1 -0
- package/dist/client/assets/clipboard-pen-D54e24J8.js +1 -0
- package/dist/client/assets/clipboard-pen-line-_9B9wN1I.js +1 -0
- package/dist/client/assets/clipboard-plus-BWU9r416.js +1 -0
- package/dist/client/assets/clipboard-type-D7Szhuab.js +1 -0
- package/dist/client/assets/clipboard-x-BFjgL_bd.js +1 -0
- package/dist/client/assets/clock-1-BcM4lTjA.js +1 -0
- package/dist/client/assets/clock-10-C4iJYJSv.js +1 -0
- package/dist/client/assets/clock-11-CRCTXdO2.js +1 -0
- package/dist/client/assets/clock-12-Bv0G4GaD.js +1 -0
- package/dist/client/assets/clock-2-BsJXpD_p.js +1 -0
- package/dist/client/assets/clock-4-FBqbwhSm.js +1 -0
- package/dist/client/assets/clock-5-DqxLWJVZ.js +1 -0
- package/dist/client/assets/clock-6-B8dw5F-Y.js +1 -0
- package/dist/client/assets/clock-7-O-WAu-K_.js +1 -0
- package/dist/client/assets/clock-8-C69hULx8.js +1 -0
- package/dist/client/assets/clock-9-CLfVvwwY.js +1 -0
- package/dist/client/assets/clock-Dj_IXY_9.js +1 -0
- package/dist/client/assets/clock-alert-Ca56EuH_.js +1 -0
- package/dist/client/assets/clock-arrow-down-D-DkAska.js +1 -0
- package/dist/client/assets/clock-arrow-up-Bjocdx1z.js +1 -0
- package/dist/client/assets/clock-check-C0xyviDs.js +1 -0
- package/dist/client/assets/clock-fading-DqeW-2_z.js +1 -0
- package/dist/client/assets/clock-plus-CVTSUaV2.js +1 -0
- package/dist/client/assets/closed-caption-6RrTavEr.js +1 -0
- package/dist/client/assets/cloud-B9LlnEKS.js +1 -0
- package/dist/client/assets/cloud-alert-DM-Dkrei.js +1 -0
- package/dist/client/assets/cloud-backup-z4wV49dH.js +1 -0
- package/dist/client/assets/cloud-check-Cnwsx0AB.js +1 -0
- package/dist/client/assets/cloud-cog-Bot5xJMr.js +1 -0
- package/dist/client/assets/cloud-download-D-BX5VI7.js +1 -0
- package/dist/client/assets/cloud-drizzle-RNVJVGPY.js +1 -0
- package/dist/client/assets/cloud-fog-CIalV2WI.js +1 -0
- package/dist/client/assets/cloud-hail-Cw0GE59m.js +1 -0
- package/dist/client/assets/cloud-lightning-JTP1-xZR.js +1 -0
- package/dist/client/assets/cloud-moon-CWEgHOSq.js +1 -0
- package/dist/client/assets/cloud-moon-rain-oVfdYvI3.js +1 -0
- package/dist/client/assets/cloud-off-CuYSTNZH.js +1 -0
- package/dist/client/assets/cloud-rain-BIjP3NDQ.js +1 -0
- package/dist/client/assets/cloud-rain-wind-930JKuRt.js +1 -0
- package/dist/client/assets/cloud-snow-D5OOJ8lg.js +1 -0
- package/dist/client/assets/cloud-sun-BrSLrAuN.js +1 -0
- package/dist/client/assets/cloud-sun-rain-CCrKPTfr.js +1 -0
- package/dist/client/assets/cloud-sync-B0lmWFXE.js +1 -0
- package/dist/client/assets/cloud-upload-Cxfi0K6F.js +1 -0
- package/dist/client/assets/cloudy-0wegYPKu.js +1 -0
- package/dist/client/assets/clover-DGk5Cr9D.js +1 -0
- package/dist/client/assets/club-Pz2MdoLU.js +1 -0
- package/dist/client/assets/code-D01OwSqU.js +1 -0
- package/dist/client/assets/coffee-UTY8_Niy.js +1 -0
- package/dist/client/assets/cog-CcWEzT3A.js +1 -0
- package/dist/client/assets/coins-duCM2jHW.js +1 -0
- package/dist/client/assets/columns-3-DcsFp266.js +1 -0
- package/dist/client/assets/columns-3-cog-l1jhFOx9.js +1 -0
- package/dist/client/assets/columns-4-CxzoTV0L.js +1 -0
- package/dist/client/assets/combine-CPrHbxcL.js +1 -0
- package/dist/client/assets/command-D-X3kY05.js +1 -0
- package/dist/client/assets/compass-L9ELWpN4.js +1 -0
- package/dist/client/assets/component-DjrFLKnC.js +1 -0
- package/dist/client/assets/computer-NRDplw6o.js +1 -0
- package/dist/client/assets/concierge-bell-uCStUMR9.js +1 -0
- package/dist/client/assets/cone-SL2SI-Tm.js +1 -0
- package/dist/client/assets/construction-uho3OjTz.js +1 -0
- package/dist/client/assets/contact-CYp7jfQh.js +1 -0
- package/dist/client/assets/contact-round-DBwYYVXb.js +1 -0
- package/dist/client/assets/container-WebNE0dx.js +1 -0
- package/dist/client/assets/contrast-Cn5yYOwB.js +1 -0
- package/dist/client/assets/cookie-W8P8MX99.js +1 -0
- package/dist/client/assets/cooking-pot-D12z40yK.js +1 -0
- package/dist/client/assets/copy-check-CfwBj0lA.js +1 -0
- package/dist/client/assets/copy-minus-BWLnfUbJ.js +1 -0
- package/dist/client/assets/copy-plus-C5GkqDCl.js +1 -0
- package/dist/client/assets/copy-slash-DVjAj77L.js +1 -0
- package/dist/client/assets/copy-x-DWildDQG.js +1 -0
- package/dist/client/assets/copyleft-CqOneusb.js +1 -0
- package/dist/client/assets/copyright-CM4083eX.js +1 -0
- package/dist/client/assets/corner-down-left-Czobekks.js +1 -0
- package/dist/client/assets/corner-left-down-dNzXmVU0.js +1 -0
- package/dist/client/assets/corner-left-up-D93UCxT6.js +1 -0
- package/dist/client/assets/corner-right-down-DQBsU1-s.js +1 -0
- package/dist/client/assets/corner-right-up-BWn6L-ky.js +1 -0
- package/dist/client/assets/corner-up-right-DPhhUTQC.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-U1fRMGtq.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-U1fRMGtq.js.br +0 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-U1fRMGtq.js.gz +0 -0
- package/dist/client/assets/cpu-BuGQ-NHQ.js +1 -0
- package/dist/client/assets/creative-commons-Cq5MwM7N.js +1 -0
- package/dist/client/assets/credit-card-DHl_at6S.js +1 -0
- package/dist/client/assets/croissant-B3gFRCvs.js +1 -0
- package/dist/client/assets/crop-Bf6VaXDG.js +1 -0
- package/dist/client/assets/cross-a6N69nQv.js +1 -0
- package/dist/client/assets/crosshair-BrGeAxou.js +1 -0
- package/dist/client/assets/crown-DKSoXpKf.js +1 -0
- package/dist/client/assets/cuboid-UK2Sb-AB.js +1 -0
- package/dist/client/assets/cup-soda-dyRcE4HV.js +1 -0
- package/dist/client/assets/currency-BBE14QJP.js +1 -0
- package/dist/client/assets/cylinder-BKAlDNaq.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-B2YwG8LW.js +166 -0
- package/dist/client/assets/cynefin-OW5HDTMX-B2YwG8LW.js.br +0 -0
- package/dist/client/assets/cynefin-OW5HDTMX-B2YwG8LW.js.gz +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cm2CrhAT.js +62 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cm2CrhAT.js.br +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Cm2CrhAT.js.gz +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-BLUwU4Gi.js +4 -0
- package/dist/client/assets/dagre-GXQ25YYZ-BLUwU4Gi.js.br +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-BLUwU4Gi.js.gz +0 -0
- package/dist/client/assets/dam-CQfkJKGi.js +1 -0
- package/dist/client/assets/database-LxIuhMOX.js +1 -0
- package/dist/client/assets/database-backup-DU5UNcFK.js +1 -0
- package/dist/client/assets/database-search-BTzhDFu5.js +1 -0
- package/dist/client/assets/database-zap-BJZIycO-.js +1 -0
- package/dist/client/assets/decimals-arrow-left-D9-bhJrQ.js +1 -0
- package/dist/client/assets/decimals-arrow-right-DjvdAvnj.js +1 -0
- package/dist/client/assets/delete-DjBPM664.js +1 -0
- package/dist/client/assets/dessert-BnP1YvBc.js +1 -0
- package/dist/client/assets/diagram-S7CK7UJ4-BVzgR8DB.js +30 -0
- package/dist/client/assets/diagram-S7CK7UJ4-BVzgR8DB.js.br +0 -0
- package/dist/client/assets/diagram-S7CK7UJ4-BVzgR8DB.js.gz +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DYKlwyf_.js +41 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DYKlwyf_.js.br +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DYKlwyf_.js.gz +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-DYuo1SMM.js +3 -0
- package/dist/client/assets/diagram-VSXAHHWV-DYuo1SMM.js.br +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-DYuo1SMM.js.gz +0 -0
- package/dist/client/assets/diagram-VX7I27RA-C7Y834kR.js +24 -0
- package/dist/client/assets/diagram-VX7I27RA-C7Y834kR.js.br +0 -0
- package/dist/client/assets/diagram-VX7I27RA-C7Y834kR.js.gz +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-DPx1XsDS.js +24 -0
- package/dist/client/assets/diagram-Z3DM3KII-DPx1XsDS.js.br +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-DPx1XsDS.js.gz +0 -0
- package/dist/client/assets/diameter-2c2a90zd.js +1 -0
- package/dist/client/assets/diamond-CFiCwkIm.js +1 -0
- package/dist/client/assets/diamond-minus-DXY-7j3k.js +1 -0
- package/dist/client/assets/diamond-percent-BNLg4n8Y.js +1 -0
- package/dist/client/assets/diamond-plus-C76WqqAr.js +1 -0
- package/dist/client/assets/dice-1-Bz-NhEj7.js +1 -0
- package/dist/client/assets/dice-2-gJYVFvc-.js +1 -0
- package/dist/client/assets/dice-3-LLJtBOWF.js +1 -0
- package/dist/client/assets/dice-4-CTdh9Gn4.js +1 -0
- package/dist/client/assets/dice-5-C41ReN43.js +1 -0
- package/dist/client/assets/dice-6-qXs7rw0P.js +1 -0
- package/dist/client/assets/dices-B_hjhHzC.js +1 -0
- package/dist/client/assets/diff-br-z2SmI.js +1 -0
- package/dist/client/assets/disc-2-BJuidG0M.js +1 -0
- package/dist/client/assets/disc-3-Dt1d3zJk.js +1 -0
- package/dist/client/assets/disc-DvPoDjIT.js +1 -0
- package/dist/client/assets/disc-album-Cr1DV2KQ.js +1 -0
- package/dist/client/assets/divide-xkkJPVYo.js +1 -0
- package/dist/client/assets/dna-CgTqyCkY.js +1 -0
- package/dist/client/assets/dna-off-C8h-gGDr.js +1 -0
- package/dist/client/assets/dock-BV2ws0K4.js +1 -0
- package/dist/client/assets/dog-DryNvpoT.js +1 -0
- package/dist/client/assets/dollar-sign-DeAwSB8f.js +1 -0
- package/dist/client/assets/donut-CXyOWW3P.js +1 -0
- package/dist/client/assets/door-closed-BNtsqBx3.js +1 -0
- package/dist/client/assets/door-closed-locked-D9_YbBZx.js +1 -0
- package/dist/client/assets/door-open-BiJSYqSj.js +1 -0
- package/dist/client/assets/dot-cBiGd4Gq.js +1 -0
- package/dist/client/assets/drafting-compass-5ssn4oaZ.js +1 -0
- package/dist/client/assets/drama-BjNNLBrw.js +1 -0
- package/dist/client/assets/drill-BLtJ-r7W.js +1 -0
- package/dist/client/assets/drone-V5WI5dL7.js +1 -0
- package/dist/client/assets/droplet-DAs3ZqIH.js +1 -0
- package/dist/client/assets/droplet-off-WsoVL_PN.js +1 -0
- package/dist/client/assets/droplets-CuiNr_6W.js +1 -0
- package/dist/client/assets/drum-Cdtt1MBz.js +1 -0
- package/dist/client/assets/drumstick-4qvGQFS7.js +1 -0
- package/dist/client/assets/dumbbell-niB16RXu.js +1 -0
- package/dist/client/assets/ear-off-Do8aCoNB.js +1 -0
- package/dist/client/assets/ear-pt_xK-bE.js +1 -0
- package/dist/client/assets/earth-CDZ2iUe0.js +1 -0
- package/dist/client/assets/earth-lock-DDvH9sgR.js +1 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Bw5tJsMf.js +1 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Bw5tJsMf.js.br +0 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Bw5tJsMf.js.gz +0 -0
- package/dist/client/assets/eclipse-DtFPP0kV.js +1 -0
- package/dist/client/assets/egg-D8KmjI8L.js +1 -0
- package/dist/client/assets/egg-fried-DkQI11Ol.js +1 -0
- package/dist/client/assets/egg-off-CGy-plq-.js +1 -0
- package/dist/client/assets/ellipse-Cg0IGG0m.js +1 -0
- package/dist/client/assets/ellipsis-vertical-C6szI1oM.js +1 -0
- package/dist/client/assets/equal-BHL74qB7.js +1 -0
- package/dist/client/assets/equal-approximately-RKG1Wn3j.js +1 -0
- package/dist/client/assets/equal-not-Bqq_uHPb.js +1 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-BXH5vaXg.js +99 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-BXH5vaXg.js.br +0 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-BXH5vaXg.js.gz +0 -0
- package/dist/client/assets/eraser-B3onJuhs.js +1 -0
- package/dist/client/assets/ethernet-port-C56jgdg9.js +1 -0
- package/dist/client/assets/euro-9Lm84jQJ.js +1 -0
- package/dist/client/assets/ev-charger-hGeVUbDx.js +1 -0
- package/dist/client/assets/expand-DbFinG9L.js +1 -0
- package/dist/client/assets/external-link-Ccu_jrFO.js +1 -0
- package/dist/client/assets/eye-B5ftUS0O.js +1 -0
- package/dist/client/assets/eye-closed-DV53Aarl.js +1 -0
- package/dist/client/assets/eye-off-B_0Z_Wr_.js +1 -0
- package/dist/client/assets/factory-rVCiYQIi.js +1 -0
- package/dist/client/assets/fan-RR1kEwLH.js +1 -0
- package/dist/client/assets/fast-forward-BEHJqug_.js +1 -0
- package/dist/client/assets/feather-MM0SgXz3.js +1 -0
- package/dist/client/assets/fence-B221qZ1q.js +1 -0
- package/dist/client/assets/ferris-wheel-QyR6a3C7.js +1 -0
- package/dist/client/assets/file-archive-B00Y8_7t.js +1 -0
- package/dist/client/assets/file-axis-3d-BGnL56PA.js +1 -0
- package/dist/client/assets/file-badge-CRUhApkc.js +1 -0
- package/dist/client/assets/file-box-AriBZ3Qd.js +1 -0
- package/dist/client/assets/file-braces-BFvxADgb.js +1 -0
- package/dist/client/assets/file-braces-corner-CTdZefX8.js +1 -0
- package/dist/client/assets/file-chart-column-CEZUZHYm.js +1 -0
- package/dist/client/assets/file-chart-column-increasing-DfTv_Q9_.js +1 -0
- package/dist/client/assets/file-chart-line-Dtk-p5Uq.js +1 -0
- package/dist/client/assets/file-chart-pie-DLQkN1fR.js +1 -0
- package/dist/client/assets/file-check-DlqXIKmg.js +1 -0
- package/dist/client/assets/file-check-corner-Dw3858fR.js +1 -0
- package/dist/client/assets/file-clock-DdFciHsC.js +1 -0
- package/dist/client/assets/file-code-corner-syIkY7zD.js +1 -0
- package/dist/client/assets/file-cog-DoFpSgJs.js +1 -0
- package/dist/client/assets/file-diff-CZis_o0B.js +1 -0
- package/dist/client/assets/file-digit-BZa-rdjy.js +1 -0
- package/dist/client/assets/file-down-D1fTkNau.js +1 -0
- package/dist/client/assets/file-exclamation-point-BI6vcPGC.js +1 -0
- package/dist/client/assets/file-headphone-Emh6hY6a.js +1 -0
- package/dist/client/assets/file-heart-BxaTWa_P.js +1 -0
- package/dist/client/assets/file-image-CNH4mXsv.js +1 -0
- package/dist/client/assets/file-input-zlJTRnwf.js +1 -0
- package/dist/client/assets/file-key-lKuo4Hwm.js +1 -0
- package/dist/client/assets/file-lock-BsVSheR8.js +1 -0
- package/dist/client/assets/file-minus-BSLfLal-.js +1 -0
- package/dist/client/assets/file-minus-corner-DhcehP9P.js +1 -0
- package/dist/client/assets/file-music-CfuuNhId.js +1 -0
- package/dist/client/assets/file-output-De6clO2-.js +1 -0
- package/dist/client/assets/file-pen-DEn7H8kZ.js +1 -0
- package/dist/client/assets/file-pen-line-BuN6dq2I.js +1 -0
- package/dist/client/assets/file-play-CTjKkIzo.js +1 -0
- package/dist/client/assets/file-plus-BwPbNtME.js +1 -0
- package/dist/client/assets/file-plus-corner-Dh803m1s.js +1 -0
- package/dist/client/assets/file-question-mark-ZnZREHDC.js +1 -0
- package/dist/client/assets/file-scan-BcWXcYjg.js +1 -0
- package/dist/client/assets/file-search-Dr5sX7Xt.js +1 -0
- package/dist/client/assets/file-search-corner-BXOguVht.js +1 -0
- package/dist/client/assets/file-signal-lleMrs5Y.js +1 -0
- package/dist/client/assets/file-sliders-q3AIEgnk.js +1 -0
- package/dist/client/assets/file-spreadsheet-CtavoQHk.js +1 -0
- package/dist/client/assets/file-stack-DNFM2WEU.js +1 -0
- package/dist/client/assets/file-symlink-CmmfTk7W.js +1 -0
- package/dist/client/assets/file-terminal-By5jHPS5.js +1 -0
- package/dist/client/assets/file-type-Cmkup0N2.js +1 -0
- package/dist/client/assets/file-type-corner-BczguCc2.js +1 -0
- package/dist/client/assets/file-up-B8uXK3j9.js +1 -0
- package/dist/client/assets/file-user--kCnY13z.js +1 -0
- package/dist/client/assets/file-video-camera-DozimF0z.js +1 -0
- package/dist/client/assets/file-volume-BlOOf8Ct.js +1 -0
- package/dist/client/assets/file-x-D0lnvRKm.js +1 -0
- package/dist/client/assets/file-x-corner-Bod9Ec5r.js +1 -0
- package/dist/client/assets/files-CFpUwgyq.js +1 -0
- package/dist/client/assets/film-zQgIKCrm.js +1 -0
- package/dist/client/assets/fingerprint-pattern-B_zAWj6V.js +1 -0
- package/dist/client/assets/fire-extinguisher-BH6GlgWO.js +1 -0
- package/dist/client/assets/fish-BA8RDTvc.js +1 -0
- package/dist/client/assets/fish-off-ZQVWayrq.js +1 -0
- package/dist/client/assets/fish-symbol-CjElo98d.js +1 -0
- package/dist/client/assets/fishing-hook-BceeZoKo.js +1 -0
- package/dist/client/assets/fishing-rod-CrMdm6he.js +1 -0
- package/dist/client/assets/flag-CkwSARkV.js +1 -0
- package/dist/client/assets/flag-off-CCPbU470.js +1 -0
- package/dist/client/assets/flag-triangle-left-CC7by8zs.js +1 -0
- package/dist/client/assets/flag-triangle-right-T1rushTK.js +1 -0
- package/dist/client/assets/flame-IjZAQA65.js +1 -0
- package/dist/client/assets/flame-kindling-CIM2DDch.js +1 -0
- package/dist/client/assets/flashlight-hZmBS14o.js +1 -0
- package/dist/client/assets/flashlight-off-B5KMZA8P.js +1 -0
- package/dist/client/assets/flask-conical-DxhwR_mB.js +1 -0
- package/dist/client/assets/flask-conical-off-ufnKjoSP.js +1 -0
- package/dist/client/assets/flask-round-D2sI4TKn.js +1 -0
- package/dist/client/assets/flip-horizontal-2-C2-SK80G.js +1 -0
- package/dist/client/assets/flip-vertical-2-JrRnobMH.js +1 -0
- package/dist/client/assets/flowDiagram-HODETNUW-NenfR-2q.js +168 -0
- package/dist/client/assets/flowDiagram-HODETNUW-NenfR-2q.js.br +0 -0
- package/dist/client/assets/flowDiagram-HODETNUW-NenfR-2q.js.gz +0 -0
- package/dist/client/assets/flower-2-DpZGQDnA.js +1 -0
- package/dist/client/assets/flower-DiA7s78f.js +1 -0
- package/dist/client/assets/focus-BYI6LoPB.js +1 -0
- package/dist/client/assets/fold-horizontal-CZh1rTp5.js +1 -0
- package/dist/client/assets/fold-vertical-Bve6LWpm.js +1 -0
- package/dist/client/assets/folder-archive-1KqnP7d-.js +1 -0
- package/dist/client/assets/folder-bookmark-B991Eice.js +1 -0
- package/dist/client/assets/folder-check-B0kfeKiB.js +1 -0
- package/dist/client/assets/folder-clock-BYZ0qdOM.js +1 -0
- package/dist/client/assets/folder-closed-D6c41Myz.js +1 -0
- package/dist/client/assets/folder-code-DY84vAaR.js +1 -0
- package/dist/client/assets/folder-cog-CC_wfxmz.js +1 -0
- package/dist/client/assets/folder-dot--AsalHGb.js +1 -0
- package/dist/client/assets/folder-down-1uL2X07h.js +1 -0
- package/dist/client/assets/folder-git-2-I-a6LNtz.js +1 -0
- package/dist/client/assets/folder-git-BLH6lFgb.js +1 -0
- package/dist/client/assets/folder-heart-BotL_GHW.js +1 -0
- package/dist/client/assets/folder-input-B8YXEPjS.js +1 -0
- package/dist/client/assets/folder-kanban-D-xLP5ej.js +1 -0
- package/dist/client/assets/folder-key-CcmJofqF.js +1 -0
- package/dist/client/assets/folder-lock-DA8FbTsA.js +1 -0
- package/dist/client/assets/folder-minus-C9ERbUr2.js +1 -0
- package/dist/client/assets/folder-open-dot-LGsDhgtm.js +1 -0
- package/dist/client/assets/folder-output-spOr0Kto.js +1 -0
- package/dist/client/assets/folder-pen-DPvm8jyZ.js +1 -0
- package/dist/client/assets/folder-plus-CM43SMGA.js +1 -0
- package/dist/client/assets/folder-root-GY2R_lSM.js +1 -0
- package/dist/client/assets/folder-search-2-CRC8n5Dw.js +1 -0
- package/dist/client/assets/folder-symlink-rFcymH_2.js +1 -0
- package/dist/client/assets/folder-sync-Bt2tP8zP.js +1 -0
- package/dist/client/assets/folder-tree-h3SurjGE.js +1 -0
- package/dist/client/assets/folder-up-C7MHLqvQ.js +1 -0
- package/dist/client/assets/folder-x-dYcuRmgF.js +1 -0
- package/dist/client/assets/folders-DXwhuY9-.js +1 -0
- package/dist/client/assets/footprints-Cz5eBsfc.js +1 -0
- package/dist/client/assets/forklift-CG75BgPz.js +1 -0
- package/dist/client/assets/form-Cq4TGdM2.js +1 -0
- package/dist/client/assets/forward-CFy7DWcp.js +1 -0
- package/dist/client/assets/frame-BU_L77Bu.js +1 -0
- package/dist/client/assets/frown-BaNi6w1W.js +1 -0
- package/dist/client/assets/fuel-Cv3NUO4s.js +1 -0
- package/dist/client/assets/fullscreen-DMyFjs6G.js +1 -0
- package/dist/client/assets/funnel-DpzL8ftL.js +1 -0
- package/dist/client/assets/funnel-plus-CyiW-Uov.js +1 -0
- package/dist/client/assets/funnel-x-DNoiVfqx.js +1 -0
- package/dist/client/assets/gallery-horizontal-BjEsdV-0.js +1 -0
- package/dist/client/assets/gallery-horizontal-end-KTeyONSy.js +1 -0
- package/dist/client/assets/gallery-thumbnails-CkZYv7Zf.js +1 -0
- package/dist/client/assets/gallery-vertical-Cwubqp3P.js +1 -0
- package/dist/client/assets/gallery-vertical-end-Bs0kGN6k.js +1 -0
- package/dist/client/assets/gamepad-2-CaNvpR5k.js +1 -0
- package/dist/client/assets/gamepad-Db1aHfs6.js +1 -0
- package/dist/client/assets/gamepad-directional-Ht26hO-2.js +1 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-CEz-i6pz.js +292 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-CEz-i6pz.js.br +0 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-CEz-i6pz.js.gz +0 -0
- package/dist/client/assets/gauge-Dugyfi2h.js +1 -0
- package/dist/client/assets/gavel-C7GxNMda.js +1 -0
- package/dist/client/assets/gem-BBtlk5PX.js +1 -0
- package/dist/client/assets/georgian-lari-CE6JVYhq.js +1 -0
- package/dist/client/assets/ghost-DOHVFm4m.js +1 -0
- package/dist/client/assets/gift-DbNkH7en.js +1 -0
- package/dist/client/assets/git-branch-1BKA8wJs.js +1 -0
- package/dist/client/assets/git-branch-minus-BYHMgzV6.js +1 -0
- package/dist/client/assets/git-branch-plus-D-dtc_c8.js +1 -0
- package/dist/client/assets/git-commit-horizontal-DF6VyDPh.js +1 -0
- package/dist/client/assets/git-commit-vertical-JVgJiY-_.js +1 -0
- package/dist/client/assets/git-compare-Cbp54T_a.js +1 -0
- package/dist/client/assets/git-compare-arrows-C5HWfhfn.js +1 -0
- package/dist/client/assets/git-fork-DHOytbc5.js +1 -0
- package/dist/client/assets/git-graph-MAdXGTL-.js +1 -0
- package/dist/client/assets/git-merge-Ktci1mIl.js +1 -0
- package/dist/client/assets/git-merge-conflict-DAT2Sj2s.js +1 -0
- package/dist/client/assets/git-pull-request-C4c5AaSk.js +1 -0
- package/dist/client/assets/git-pull-request-arrow-CV7ye1g8.js +1 -0
- package/dist/client/assets/git-pull-request-closed-BUxySzF6.js +1 -0
- package/dist/client/assets/git-pull-request-create-D4rn-ZJ0.js +1 -0
- package/dist/client/assets/git-pull-request-create-arrow-BV4OVz8n.js +1 -0
- package/dist/client/assets/git-pull-request-draft-C3vl4D7U.js +1 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CmnZVOgW.js +106 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CmnZVOgW.js.br +0 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CmnZVOgW.js.gz +0 -0
- package/dist/client/assets/glass-water-DfqWvr-O.js +1 -0
- package/dist/client/assets/glasses-_qWrIfd0.js +1 -0
- package/dist/client/assets/globe-P4Ifv8UQ.js +1 -0
- package/dist/client/assets/globe-check-DeMV-ZsI.js +1 -0
- package/dist/client/assets/globe-lock-CIUt6lBK.js +1 -0
- package/dist/client/assets/globe-off-CTx0OHJq.js +1 -0
- package/dist/client/assets/globe-x-9F8SjlaG.js +1 -0
- package/dist/client/assets/goal-uxbuGE9u.js +1 -0
- package/dist/client/assets/gpu-DMvMhKzu.js +1 -0
- package/dist/client/assets/graduation-cap-B2FwNqd0.js +1 -0
- package/dist/client/assets/grape-CK79wP8r.js +1 -0
- package/dist/client/assets/grid-2x2-BjriuHwD.js +1 -0
- package/dist/client/assets/grid-2x2-check-C7vulGgY.js +1 -0
- package/dist/client/assets/grid-2x2-plus-C8fTfzml.js +1 -0
- package/dist/client/assets/grid-2x2-x-CAx53oYF.js +1 -0
- package/dist/client/assets/grid-3x2--6GYKlJp.js +1 -0
- package/dist/client/assets/grid-3x3-iu5Qwiww.js +1 -0
- package/dist/client/assets/grip-CQjJQ99U.js +1 -0
- package/dist/client/assets/grip-horizontal-B3NT1wOx.js +1 -0
- package/dist/client/assets/grip-vertical-yChGWVJL.js +1 -0
- package/dist/client/assets/group-H-noYI5P.js +1 -0
- package/dist/client/assets/guitar-BniXl5SH.js +1 -0
- package/dist/client/assets/ham-CEB5mVu6.js +1 -0
- package/dist/client/assets/hamburger-DrT6tkhu.js +1 -0
- package/dist/client/assets/hammer-DKeea9VY.js +1 -0
- package/dist/client/assets/hand-B0sXE4rE.js +1 -0
- package/dist/client/assets/hand-coins-D0g1kf_c.js +1 -0
- package/dist/client/assets/hand-fist-0h4_bTeu.js +1 -0
- package/dist/client/assets/hand-grab-C6mCr9Ou.js +1 -0
- package/dist/client/assets/hand-heart-F_AAmnv5.js +1 -0
- package/dist/client/assets/hand-helping-B6QJmlte.js +1 -0
- package/dist/client/assets/hand-metal-DozzqUZf.js +1 -0
- package/dist/client/assets/hand-platter-CwUxLjke.js +1 -0
- package/dist/client/assets/handbag-BnV8PdfF.js +1 -0
- package/dist/client/assets/handshake-yrkNOzlM.js +1 -0
- package/dist/client/assets/hard-drive-Dx-keSEZ.js +1 -0
- package/dist/client/assets/hard-drive-download-CbHHcVsE.js +1 -0
- package/dist/client/assets/hard-drive-upload-qNSetgmY.js +1 -0
- package/dist/client/assets/hard-hat-C26iSxU2.js +1 -0
- package/dist/client/assets/hash-DW5i7E64.js +1 -0
- package/dist/client/assets/hat-glasses-Boie93F8.js +1 -0
- package/dist/client/assets/haze-CehycoCF.js +1 -0
- package/dist/client/assets/hd-Dam2YVYF.js +1 -0
- package/dist/client/assets/hdmi-port-tDaVr1Ot.js +1 -0
- package/dist/client/assets/heading-1-DjzAVnU7.js +1 -0
- package/dist/client/assets/heading-2-D3xjeT7C.js +1 -0
- package/dist/client/assets/heading-3-ByixbbXL.js +1 -0
- package/dist/client/assets/heading-4-xYNv-E1_.js +1 -0
- package/dist/client/assets/heading-5-Dtb3D5_n.js +1 -0
- package/dist/client/assets/heading-6-BakFtq8y.js +1 -0
- package/dist/client/assets/heading-Dr7HjJRJ.js +1 -0
- package/dist/client/assets/headphone-off-DFPfRe37.js +1 -0
- package/dist/client/assets/headphones-BkTzLKnq.js +1 -0
- package/dist/client/assets/headset-B7pGpLNF.js +1 -0
- package/dist/client/assets/heart-DLjwVQq9.js +1 -0
- package/dist/client/assets/heart-crack-BOgF1yjZ.js +1 -0
- package/dist/client/assets/heart-handshake-JE0bdFw7.js +1 -0
- package/dist/client/assets/heart-minus-B7t-LhyJ.js +1 -0
- package/dist/client/assets/heart-off-AXIn0CZX.js +1 -0
- package/dist/client/assets/heart-plus-Dfalf6bf.js +1 -0
- package/dist/client/assets/heart-pulse-CqhJ9nlQ.js +1 -0
- package/dist/client/assets/heart-x-DyyrngKA.js +1 -0
- package/dist/client/assets/heater-DaSfga8o.js +1 -0
- package/dist/client/assets/helicopter-B4tYQeHX.js +1 -0
- package/dist/client/assets/hexagon-DQHfkGrf.js +1 -0
- package/dist/client/assets/highlighter-r2ugYJ-c.js +1 -0
- package/dist/client/assets/history-DgrylIf5.js +1 -0
- package/dist/client/assets/hop-DoeM6CT8.js +1 -0
- package/dist/client/assets/hop-DoeM6CT8.js.br +0 -0
- package/dist/client/assets/hop-DoeM6CT8.js.gz +0 -0
- package/dist/client/assets/hop-off-DdvjA0-2.js +1 -0
- package/dist/client/assets/hop-off-DdvjA0-2.js.br +0 -0
- package/dist/client/assets/hop-off-DdvjA0-2.js.gz +0 -0
- package/dist/client/assets/hospital-D1ZnZtsX.js +1 -0
- package/dist/client/assets/hotel-BNe5xQZk.js +1 -0
- package/dist/client/assets/hourglass-j9eQakED.js +1 -0
- package/dist/client/assets/house-CoEifWNN.js +1 -0
- package/dist/client/assets/house-heart-b8U6PPt1.js +1 -0
- package/dist/client/assets/house-plug-CRik00Ws.js +1 -0
- package/dist/client/assets/house-plus-CDNMNa5x.js +1 -0
- package/dist/client/assets/house-wifi-CASkxwEI.js +1 -0
- package/dist/client/assets/ice-cream-bowl-CWFmk-fD.js +1 -0
- package/dist/client/assets/ice-cream-cone-CyAe4IH5.js +1 -0
- package/dist/client/assets/id-card-BRFGFiGf.js +1 -0
- package/dist/client/assets/id-card-lanyard-BkvFn-6-.js +1 -0
- package/dist/client/assets/image-down-BW9rvcCZ.js +1 -0
- package/dist/client/assets/image-minus-CnuU9gCP.js +1 -0
- package/dist/client/assets/image-off-BCNVvu6u.js +1 -0
- package/dist/client/assets/image-play-COrbgFx2.js +1 -0
- package/dist/client/assets/image-plus-CnQ2yEJM.js +1 -0
- package/dist/client/assets/image-up-DyWZWs3A.js +1 -0
- package/dist/client/assets/image-upscale-BKrhLVfZ.js +1 -0
- package/dist/client/assets/images-Bney-5oX.js +1 -0
- package/dist/client/assets/import-CTFmyPP3.js +1 -0
- package/dist/client/assets/inbox-BH987NPr.js +1 -0
- package/dist/client/assets/index-BIr_4Woo.js +259 -0
- package/dist/client/assets/index-BIr_4Woo.js.br +0 -0
- package/dist/client/assets/index-BIr_4Woo.js.gz +0 -0
- package/dist/client/assets/index-BTNj_3HK.css +1 -0
- package/dist/client/assets/index-BTNj_3HK.css.br +0 -0
- package/dist/client/assets/index-BTNj_3HK.css.gz +0 -0
- package/dist/client/assets/indian-rupee-BrZ816Xe.js +1 -0
- package/dist/client/assets/infinity-CLPHW4yx.js +1 -0
- package/dist/client/assets/info-DWDoAJRj.js +1 -0
- package/dist/client/assets/infoDiagram-27XIBGKW-tD-YQG28.js +2 -0
- package/dist/client/assets/inspection-panel-2BA2BAz_.js +1 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-Ckuhfh1j.js +70 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-Ckuhfh1j.js.br +0 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-Ckuhfh1j.js.gz +0 -0
- package/dist/client/assets/italic-CG0Egudx.js +1 -0
- package/dist/client/assets/iteration-ccw-HdixPLZx.js +1 -0
- package/dist/client/assets/iteration-cw-D62tmFLO.js +1 -0
- package/dist/client/assets/japanese-yen-BblG8Jjp.js +1 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-CHra0y60.js +139 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-CHra0y60.js.br +0 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-CHra0y60.js.gz +0 -0
- package/dist/client/assets/joystick-1pRxuSXB.js +1 -0
- package/dist/client/assets/kanban-CrusSXGn.js +1 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-Bh0d_6fU.js +89 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-Bh0d_6fU.js.br +0 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-Bh0d_6fU.js.gz +0 -0
- package/dist/client/assets/kayak-D3jIAQ9h.js +1 -0
- package/dist/client/assets/key-BBP6QTcm.js +1 -0
- package/dist/client/assets/key-round-yzFwYwGT.js +1 -0
- package/dist/client/assets/key-square-nPO7Uua8.js +1 -0
- package/dist/client/assets/keyboard-D2GI-Um_.js +1 -0
- package/dist/client/assets/keyboard-music-jNRL9lYW.js +1 -0
- package/dist/client/assets/keyboard-off-6rmGQegm.js +1 -0
- package/dist/client/assets/lamp-CuAYmczr.js +1 -0
- package/dist/client/assets/lamp-ceiling-CuQk9JkZ.js +1 -0
- package/dist/client/assets/lamp-desk-C9fzLdIr.js +1 -0
- package/dist/client/assets/lamp-floor-Cyz2E8sw.js +1 -0
- package/dist/client/assets/lamp-wall-down-DKw0d_sR.js +1 -0
- package/dist/client/assets/lamp-wall-up-BSmd0CRA.js +1 -0
- package/dist/client/assets/land-plot-CKRw1flI.js +1 -0
- package/dist/client/assets/landmark-0Rl_161Y.js +1 -0
- package/dist/client/assets/languages-Bsu8icjW.js +1 -0
- package/dist/client/assets/laptop-DBxQFUWL.js +1 -0
- package/dist/client/assets/laptop-minimal-Bdwv9Z2r.js +1 -0
- package/dist/client/assets/laptop-minimal-check-2kYwh1wj.js +1 -0
- package/dist/client/assets/lasso-aBAU2Qa6.js +1 -0
- package/dist/client/assets/lasso-select-DA0A1p-K.js +1 -0
- package/dist/client/assets/laugh-Dx_PJv9g.js +1 -0
- package/dist/client/assets/layers-2-Bn0SHXLI.js +1 -0
- package/dist/client/assets/layers-N7NxXNNs.js +1 -0
- package/dist/client/assets/layers-minus-CzH2Gn9M.js +1 -0
- package/dist/client/assets/layers-plus-B5qW2HWJ.js +1 -0
- package/dist/client/assets/layout-BgR_T8Qu.js +1 -0
- package/dist/client/assets/layout-BgR_T8Qu.js.br +0 -0
- package/dist/client/assets/layout-BgR_T8Qu.js.gz +0 -0
- package/dist/client/assets/layout-dashboard-C1FYCzEr.js +1 -0
- package/dist/client/assets/layout-grid-C3HqGT0i.js +1 -0
- package/dist/client/assets/layout-list-BQKEqmWU.js +1 -0
- package/dist/client/assets/layout-panel-left-DNvPsRPV.js +1 -0
- package/dist/client/assets/layout-panel-top-BrOUL3nd.js +1 -0
- package/dist/client/assets/layout-template-cT0yFSRw.js +1 -0
- package/dist/client/assets/leaf-B_ZX-TtF.js +1 -0
- package/dist/client/assets/leafy-green-IyW5Awz3.js +1 -0
- package/dist/client/assets/lectern-jPkEHY0-.js +1 -0
- package/dist/client/assets/lens-concave-DOsdxMXu.js +1 -0
- package/dist/client/assets/lens-convex-fpkvKbZE.js +1 -0
- package/dist/client/assets/library-D5YZFVvt.js +1 -0
- package/dist/client/assets/library-big-C2YQcQnf.js +1 -0
- package/dist/client/assets/life-buoy-D4vZIRlB.js +1 -0
- package/dist/client/assets/ligature-BhZFkOUY.js +1 -0
- package/dist/client/assets/lightbulb-off-B97N1NbG.js +1 -0
- package/dist/client/assets/line-dot-right-horizontal-DkxmjsVu.js +1 -0
- package/dist/client/assets/line-squiggle-DdZdqLkV.js +1 -0
- package/dist/client/assets/line-style-CCTJ1Ci6.js +1 -0
- package/dist/client/assets/link-RS9gD_yC.js +1 -0
- package/dist/client/assets/list-DcjNzCzy.js +1 -0
- package/dist/client/assets/list-check-1nvUk8bJ.js +1 -0
- package/dist/client/assets/list-checks-DfER6ebW.js +1 -0
- package/dist/client/assets/list-chevrons-down-up-C19ihjiT.js +1 -0
- package/dist/client/assets/list-chevrons-up-down-Dzdke4UE.js +1 -0
- package/dist/client/assets/list-collapse-PPlV8jgm.js +1 -0
- package/dist/client/assets/list-end-BYNlZsio.js +1 -0
- package/dist/client/assets/list-filter-D92p1DNl.js +1 -0
- package/dist/client/assets/list-filter-plus-BCJD3Yk_.js +1 -0
- package/dist/client/assets/list-indent-decrease-CL_Ac5Ju.js +1 -0
- package/dist/client/assets/list-indent-increase-DHWxhiSk.js +1 -0
- package/dist/client/assets/list-minus-B5rW2V1_.js +1 -0
- package/dist/client/assets/list-music-BQdYuloa.js +1 -0
- package/dist/client/assets/list-ordered-D2Kxf0gz.js +1 -0
- package/dist/client/assets/list-plus-Y-iikZRW.js +1 -0
- package/dist/client/assets/list-restart-DWjREsvx.js +1 -0
- package/dist/client/assets/list-start-xrBQxD0K.js +1 -0
- package/dist/client/assets/list-tree-C69eYqUt.js +1 -0
- package/dist/client/assets/list-video-qW5Lk_tB.js +1 -0
- package/dist/client/assets/list-x-y1U0MRPA.js +1 -0
- package/dist/client/assets/loader--UdcjuH2.js +1 -0
- package/dist/client/assets/loader-pinwheel-DsRSzy1k.js +1 -0
- package/dist/client/assets/locate-DF9MJCuD.js +1 -0
- package/dist/client/assets/locate-fixed-CzGV8sVp.js +1 -0
- package/dist/client/assets/locate-off-CAfukXpm.js +1 -0
- package/dist/client/assets/lock-9SqNu-9w.js +1 -0
- package/dist/client/assets/lock-keyhole-ChK5WUcl.js +1 -0
- package/dist/client/assets/lock-keyhole-open-B2VPxErq.js +1 -0
- package/dist/client/assets/lock-open-zZLiTX6s.js +1 -0
- package/dist/client/assets/log-in-D2N9cWo0.js +1 -0
- package/dist/client/assets/log-out-Do4mr8vI.js +1 -0
- package/dist/client/assets/logs-qPfXRW5n.js +1 -0
- package/dist/client/assets/lollipop-BvuuZT-e.js +1 -0
- package/dist/client/assets/luggage-Ceh9Mgxo.js +1 -0
- package/dist/client/assets/magnet-D-W-HHLN.js +1 -0
- package/dist/client/assets/mail-check-D7_aFFnm.js +1 -0
- package/dist/client/assets/mail-kWifEBqL.js +1 -0
- package/dist/client/assets/mail-minus-kSFo8SFK.js +1 -0
- package/dist/client/assets/mail-open-CNiv8SJr.js +1 -0
- package/dist/client/assets/mail-plus-DRnco-UJ.js +1 -0
- package/dist/client/assets/mail-question-mark-C5th4VRr.js +1 -0
- package/dist/client/assets/mail-search-CAbowCPI.js +1 -0
- package/dist/client/assets/mail-warning-Cmtk9M-w.js +1 -0
- package/dist/client/assets/mail-x-DXny11ar.js +1 -0
- package/dist/client/assets/mailbox-D3B9W87I.js +1 -0
- package/dist/client/assets/mails-DGk2tS03.js +1 -0
- package/dist/client/assets/map-BEDMmWeK.js +1 -0
- package/dist/client/assets/map-minus-4W3qKxZ6.js +1 -0
- package/dist/client/assets/map-pin-ClEi4YJ5.js +1 -0
- package/dist/client/assets/map-pin-check-U7JMfQvY.js +1 -0
- package/dist/client/assets/map-pin-check-inside-CAQmQayk.js +1 -0
- package/dist/client/assets/map-pin-house-CtF4mIvV.js +1 -0
- package/dist/client/assets/map-pin-minus-DtMu0-Ei.js +1 -0
- package/dist/client/assets/map-pin-minus-inside-C2vKzZ-8.js +1 -0
- package/dist/client/assets/map-pin-off-DaEDbShq.js +1 -0
- package/dist/client/assets/map-pin-pen-BctrsxrS.js +1 -0
- package/dist/client/assets/map-pin-plus-DfwE75bG.js +1 -0
- package/dist/client/assets/map-pin-plus-inside-BIPInola.js +1 -0
- package/dist/client/assets/map-pin-search-CE0aqPxF.js +1 -0
- package/dist/client/assets/map-pin-x-DW-gCAJx.js +1 -0
- package/dist/client/assets/map-pin-x-inside-BSpwda6g.js +1 -0
- package/dist/client/assets/map-pinned-7mLZ-k7x.js +1 -0
- package/dist/client/assets/map-plus-gAG757B1.js +1 -0
- package/dist/client/assets/mars--3KTx3d8.js +1 -0
- package/dist/client/assets/mars-stroke-BksrDt6u.js +1 -0
- package/dist/client/assets/martini-DnBHaqEl.js +1 -0
- package/dist/client/assets/maximize-2-BQDmhW99.js +1 -0
- package/dist/client/assets/maximize-Z6moMyHP.js +1 -0
- package/dist/client/assets/medal-B79QAg9L.js +1 -0
- package/dist/client/assets/megaphone-BGqQ4Rjx.js +1 -0
- package/dist/client/assets/megaphone-off-DplpWZRO.js +1 -0
- package/dist/client/assets/meh-BWNDZ70h.js +1 -0
- package/dist/client/assets/memory-stick-C1h3M4vN.js +1 -0
- package/dist/client/assets/menu-C_ckUeo5.js +1 -0
- package/dist/client/assets/merge-edBcYI5u.js +1 -0
- package/dist/client/assets/mermaid.core-CcoB_EbN.js +308 -0
- package/dist/client/assets/mermaid.core-CcoB_EbN.js.br +0 -0
- package/dist/client/assets/mermaid.core-CcoB_EbN.js.gz +0 -0
- package/dist/client/assets/message-circle-check-NZT5HRQD.js +1 -0
- package/dist/client/assets/message-circle-code-cxth6zan.js +1 -0
- package/dist/client/assets/message-circle-dashed-3Zc_0Fqn.js +1 -0
- package/dist/client/assets/message-circle-heart-BY_uX4iW.js +1 -0
- package/dist/client/assets/message-circle-more-VOlgePxF.js +1 -0
- package/dist/client/assets/message-circle-off-CQicGX4L.js +1 -0
- package/dist/client/assets/message-circle-plus-CJhNfAIw.js +1 -0
- package/dist/client/assets/message-circle-question-mark-CCGd8nBX.js +1 -0
- package/dist/client/assets/message-circle-reply-KmNtZnao.js +1 -0
- package/dist/client/assets/message-circle-warning-D8MMW5gX.js +1 -0
- package/dist/client/assets/message-circle-x-BGw8c2aM.js +1 -0
- package/dist/client/assets/message-square-IbILEK_p.js +1 -0
- package/dist/client/assets/message-square-check-RTV-lc9t.js +1 -0
- package/dist/client/assets/message-square-code-CyRElkie.js +1 -0
- package/dist/client/assets/message-square-dashed-BoOveALe.js +1 -0
- package/dist/client/assets/message-square-diff-DMDJTtlt.js +1 -0
- package/dist/client/assets/message-square-dot-BAjal15k.js +1 -0
- package/dist/client/assets/message-square-heart-Bhkm7fBq.js +1 -0
- package/dist/client/assets/message-square-lock-DoFd9KE0.js +1 -0
- package/dist/client/assets/message-square-more-CioY_Dhk.js +1 -0
- package/dist/client/assets/message-square-off-Bsq7tRFo.js +1 -0
- package/dist/client/assets/message-square-plus-B5eeL6pk.js +1 -0
- package/dist/client/assets/message-square-quote-DudZT_Tw.js +1 -0
- package/dist/client/assets/message-square-reply-Dm7_dp9I.js +1 -0
- package/dist/client/assets/message-square-share-B_Z-gcoB.js +1 -0
- package/dist/client/assets/message-square-text-BXJwK70u.js +1 -0
- package/dist/client/assets/message-square-warning-Dl-I-4Ea.js +1 -0
- package/dist/client/assets/message-square-x-BM38wcKt.js +1 -0
- package/dist/client/assets/messages-square-VeyYCUFB.js +1 -0
- package/dist/client/assets/metronome-D46oatMs.js +1 -0
- package/dist/client/assets/mic-BXv7AOV6.js +1 -0
- package/dist/client/assets/mic-off-D8EdOrXy.js +1 -0
- package/dist/client/assets/mic-vocal-BhAGMoPf.js +1 -0
- package/dist/client/assets/microchip-DfnaKdyO.js +1 -0
- package/dist/client/assets/microscope-DM-Xg4he.js +1 -0
- package/dist/client/assets/microwave-C698eIKj.js +1 -0
- package/dist/client/assets/milestone-D3wIEdpi.js +1 -0
- package/dist/client/assets/milk-Bcbzsmys.js +1 -0
- package/dist/client/assets/milk-off-zAIVgEhg.js +1 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Cy5dQY52.js +96 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Cy5dQY52.js.br +0 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Cy5dQY52.js.gz +0 -0
- package/dist/client/assets/minimize-2-CG18Mmcm.js +1 -0
- package/dist/client/assets/minimize-ChUJfXd4.js +1 -0
- package/dist/client/assets/minus-kHdy_gww.js +1 -0
- package/dist/client/assets/mirror-rectangular-C4-i35YM.js +1 -0
- package/dist/client/assets/mirror-round-CiEA_U4J.js +1 -0
- package/dist/client/assets/monitor-check-CYpklx-b.js +1 -0
- package/dist/client/assets/monitor-cloud-CXeQTvRn.js +1 -0
- package/dist/client/assets/monitor-cog-OPMirtkR.js +1 -0
- package/dist/client/assets/monitor-dot-DhoPcpmT.js +1 -0
- package/dist/client/assets/monitor-down-CNn-KOOx.js +1 -0
- package/dist/client/assets/monitor-off-CVUsDTZo.js +1 -0
- package/dist/client/assets/monitor-pause-CwnkqjTJ.js +1 -0
- package/dist/client/assets/monitor-play-qcawGa0T.js +1 -0
- package/dist/client/assets/monitor-smartphone-BobCdw48.js +1 -0
- package/dist/client/assets/monitor-speaker-DRkhQRvm.js +1 -0
- package/dist/client/assets/monitor-stop-wBJVgIh2.js +1 -0
- package/dist/client/assets/monitor-up-DrDvjhck.js +1 -0
- package/dist/client/assets/monitor-x-C4HA2ifW.js +1 -0
- package/dist/client/assets/moon-Dsxtr0m6.js +1 -0
- package/dist/client/assets/moon-star-rOf8dzc0.js +1 -0
- package/dist/client/assets/motorbike-Di0PrzeF.js +1 -0
- package/dist/client/assets/mountain-C7KXtIYU.js +1 -0
- package/dist/client/assets/mountain-snow-SaHb_EFt.js +1 -0
- package/dist/client/assets/mouse-DtQFxLsM.js +1 -0
- package/dist/client/assets/mouse-left-BU5to86Y.js +1 -0
- package/dist/client/assets/mouse-off-BqbPVYm1.js +1 -0
- package/dist/client/assets/mouse-pointer-2-CS4Ft_cw.js +1 -0
- package/dist/client/assets/mouse-pointer-2-off-fCX0R8U7.js +1 -0
- package/dist/client/assets/mouse-pointer-DSYisDOa.js +1 -0
- package/dist/client/assets/mouse-pointer-ban-D6zu9O0K.js +1 -0
- package/dist/client/assets/mouse-pointer-click-BQPkzMUt.js +1 -0
- package/dist/client/assets/mouse-right-Di_e-oI1.js +1 -0
- package/dist/client/assets/move-3d-Du7ghJg5.js +1 -0
- package/dist/client/assets/move-BMYxj6w3.js +1 -0
- package/dist/client/assets/move-diagonal-2-CRsqLbZ9.js +1 -0
- package/dist/client/assets/move-diagonal-BXwpJQAn.js +1 -0
- package/dist/client/assets/move-down-BCuBiPCe.js +1 -0
- package/dist/client/assets/move-down-left-CmlM08fp.js +1 -0
- package/dist/client/assets/move-down-right-BVjFHUay.js +1 -0
- package/dist/client/assets/move-horizontal-MT-UXk4K.js +1 -0
- package/dist/client/assets/move-left-B5I79UEK.js +1 -0
- package/dist/client/assets/move-right-DfcpVwsm.js +1 -0
- package/dist/client/assets/move-up-C1k5N8Nf.js +1 -0
- package/dist/client/assets/move-up-left-mzy9nIgZ.js +1 -0
- package/dist/client/assets/move-up-right-Ctl-i5_0.js +1 -0
- package/dist/client/assets/move-vertical-DZLM84bp.js +1 -0
- package/dist/client/assets/music-2-BZ32Mw5m.js +1 -0
- package/dist/client/assets/music-3-B1cqcsE-.js +1 -0
- package/dist/client/assets/music-4-Djt81Rr3.js +1 -0
- package/dist/client/assets/music-Di6jM57i.js +1 -0
- package/dist/client/assets/navigation-2-DGlM6M5s.js +1 -0
- package/dist/client/assets/navigation-2-off-CJHybG_T.js +1 -0
- package/dist/client/assets/navigation-DTIzTp1X.js +1 -0
- package/dist/client/assets/navigation-off-D_WFGLAl.js +1 -0
- package/dist/client/assets/network-CcMCvhJC.js +1 -0
- package/dist/client/assets/newspaper-LrFoDItl.js +1 -0
- package/dist/client/assets/nfc-DTXa78mx.js +1 -0
- package/dist/client/assets/non-binary-CXjE1j1Z.js +1 -0
- package/dist/client/assets/notebook-BVIrgL6_.js +1 -0
- package/dist/client/assets/notebook-pen-Xk5_NfIX.js +1 -0
- package/dist/client/assets/notebook-tabs-eseNosqr.js +1 -0
- package/dist/client/assets/notebook-text-DmfWA11a.js +1 -0
- package/dist/client/assets/notepad-text-D_ZcxeJ9.js +1 -0
- package/dist/client/assets/notepad-text-dashed-CKza8FCZ.js +1 -0
- package/dist/client/assets/nut-BMaaZtn5.js +1 -0
- package/dist/client/assets/nut-off-Brea4LSK.js +1 -0
- package/dist/client/assets/octagon-CbieaJdk.js +1 -0
- package/dist/client/assets/octagon-alert-vvjy1Rho.js +1 -0
- package/dist/client/assets/octagon-minus-BRFUKWcF.js +1 -0
- package/dist/client/assets/octagon-pause--GD_s9GN.js +1 -0
- package/dist/client/assets/octagon-x-B8TLtBo6.js +1 -0
- package/dist/client/assets/omega-B_45ZXUR.js +1 -0
- package/dist/client/assets/option-DOxdAwUk.js +1 -0
- package/dist/client/assets/orbit-BACqnNxR.js +1 -0
- package/dist/client/assets/origami-RsvosEes.js +1 -0
- package/dist/client/assets/package-2-iFvVrUZR.js +1 -0
- package/dist/client/assets/package-BSpmaFEn.js +1 -0
- package/dist/client/assets/package-check-AJo1dDqw.js +1 -0
- package/dist/client/assets/package-minus-C0a3yQUu.js +1 -0
- package/dist/client/assets/package-open-tFtS9hnQ.js +1 -0
- package/dist/client/assets/package-plus-CqTyTbzE.js +1 -0
- package/dist/client/assets/package-search-BhncAZ6z.js +1 -0
- package/dist/client/assets/package-x-0HY2thun.js +1 -0
- package/dist/client/assets/paint-bucket-C_j5qVO9.js +1 -0
- package/dist/client/assets/paint-roller-DoLFNVmG.js +1 -0
- package/dist/client/assets/paintbrush-Cr2s07j0.js +1 -0
- package/dist/client/assets/paintbrush-vertical-DQmNi6_V.js +1 -0
- package/dist/client/assets/palette-CqWl1TQr.js +1 -0
- package/dist/client/assets/panda-CXXVQDnE.js +1 -0
- package/dist/client/assets/panel-bottom-Bv6nM86y.js +1 -0
- package/dist/client/assets/panel-bottom-close-CBtIhceU.js +1 -0
- package/dist/client/assets/panel-bottom-dashed-BQtOAycK.js +1 -0
- package/dist/client/assets/panel-bottom-open-JD5eHKMH.js +1 -0
- package/dist/client/assets/panel-left-DAJPOd8N.js +1 -0
- package/dist/client/assets/panel-left-close-CFlQIvSX.js +1 -0
- package/dist/client/assets/panel-left-dashed-DG-xJrrt.js +1 -0
- package/dist/client/assets/panel-left-open-taxYOOUG.js +1 -0
- package/dist/client/assets/panel-left-right-dashed-nrplbjrp.js +1 -0
- package/dist/client/assets/panel-right-close-CqL9EUdd.js +1 -0
- package/dist/client/assets/panel-right-dashed-C4TTpFzT.js +1 -0
- package/dist/client/assets/panel-right-open-DukQ3QIl.js +1 -0
- package/dist/client/assets/panel-top-CEqZlKSe.js +1 -0
- package/dist/client/assets/panel-top-bottom-dashed-D669C4qE.js +1 -0
- package/dist/client/assets/panel-top-close-DHKwSZSV.js +1 -0
- package/dist/client/assets/panel-top-dashed-YvDUPpXv.js +1 -0
- package/dist/client/assets/panel-top-open-CwZpk6TE.js +1 -0
- package/dist/client/assets/panels-left-bottom-DYkggwdn.js +1 -0
- package/dist/client/assets/panels-right-bottom-Dma22gu3.js +1 -0
- package/dist/client/assets/panels-top-left-DBlRazdM.js +1 -0
- package/dist/client/assets/parasol-FQqUHq-3.js +1 -0
- package/dist/client/assets/parentheses-PiikjsUT.js +1 -0
- package/dist/client/assets/parking-meter-CuEcpysx.js +1 -0
- package/dist/client/assets/party-popper-CeOCowgc.js +1 -0
- package/dist/client/assets/passwordBootstrap-CSqoknIM.js +2 -0
- package/dist/client/assets/passwordBootstrap-CSqoknIM.js.br +0 -0
- package/dist/client/assets/passwordBootstrap-CSqoknIM.js.gz +0 -0
- package/dist/client/assets/pause-BgYhIaFa.js +1 -0
- package/dist/client/assets/paw-print-DCZOaujo.js +1 -0
- package/dist/client/assets/pc-case-B70Gk12U.js +1 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-Cwg0Jd4O.js +1 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-Cwg0Jd4O.js.br +0 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-Cwg0Jd4O.js.gz +0 -0
- package/dist/client/assets/pen-C6EB7i2a.js +1 -0
- package/dist/client/assets/pen-line-DhpCzlGd.js +1 -0
- package/dist/client/assets/pen-off-DmkdN0wv.js +1 -0
- package/dist/client/assets/pen-tool-DcQaKo3I.js +1 -0
- package/dist/client/assets/pencil-line-Cj9bY0f6.js +1 -0
- package/dist/client/assets/pencil-off-BSCWzLwV.js +1 -0
- package/dist/client/assets/pencil-ruler-BlQt8-Ew.js +1 -0
- package/dist/client/assets/pentagon-psxUYI4K.js +1 -0
- package/dist/client/assets/percent-nTuZO6LJ.js +1 -0
- package/dist/client/assets/person-standing-B7y-COSs.js +1 -0
- package/dist/client/assets/philippine-peso-BsLzmgD9.js +1 -0
- package/dist/client/assets/phone-BbwzOa-k.js +1 -0
- package/dist/client/assets/phone-call-Dl6zYWOq.js +1 -0
- package/dist/client/assets/phone-forwarded-Ep90hQUe.js +1 -0
- package/dist/client/assets/phone-incoming-athu9iyr.js +1 -0
- package/dist/client/assets/phone-missed-DK2vfUOb.js +1 -0
- package/dist/client/assets/phone-off-W2KwsZY1.js +1 -0
- package/dist/client/assets/phone-outgoing-hV2uZsuw.js +1 -0
- package/dist/client/assets/pi-CX4E6qBy.js +1 -0
- package/dist/client/assets/piano-D5RqX1hm.js +1 -0
- package/dist/client/assets/pickaxe-Dlt6of-x.js +1 -0
- package/dist/client/assets/picture-in-picture-2-B2fhJ5c4.js +1 -0
- package/dist/client/assets/picture-in-picture-Csb82BoE.js +1 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-Db6Mdto-.js +39 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-Db6Mdto-.js.br +0 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-Db6Mdto-.js.gz +0 -0
- package/dist/client/assets/piggy-bank-DrL5mxzK.js +1 -0
- package/dist/client/assets/pilcrow-BY_v01vc.js +1 -0
- package/dist/client/assets/pilcrow-left-D-zWNdzz.js +1 -0
- package/dist/client/assets/pilcrow-right-B8WuXNo_.js +1 -0
- package/dist/client/assets/pill-BQZHZ3b9.js +1 -0
- package/dist/client/assets/pill-bottle-L6BpOfe2.js +1 -0
- package/dist/client/assets/pipette-BpfEHfYh.js +1 -0
- package/dist/client/assets/pizza-CdA1VRjA.js +1 -0
- package/dist/client/assets/plane-DnzKEwzm.js +1 -0
- package/dist/client/assets/plane-landing-9H2UKRjF.js +1 -0
- package/dist/client/assets/plane-takeoff-CtbIGFNh.js +1 -0
- package/dist/client/assets/play-DAo6Xp3l.js +1 -0
- package/dist/client/assets/plug-2-DsBWVXGE.js +1 -0
- package/dist/client/assets/plug-Dkhx_3sf.js +1 -0
- package/dist/client/assets/plug-zap-CrEEsMAT.js +1 -0
- package/dist/client/assets/pocket-knife-DIfz9tr4.js +1 -0
- package/dist/client/assets/podcast-CxMnxBx7.js +1 -0
- package/dist/client/assets/pointer-CccjYS4n.js +1 -0
- package/dist/client/assets/pointer-off-BiClkyy2.js +1 -0
- package/dist/client/assets/popcorn-C1-yR6Lc.js +1 -0
- package/dist/client/assets/popsicle-6NQKwm2r.js +1 -0
- package/dist/client/assets/pound-sterling-BJmlGWhG.js +1 -0
- package/dist/client/assets/power-CBzT89xE.js +1 -0
- package/dist/client/assets/power-off-DXVhAR7l.js +1 -0
- package/dist/client/assets/presentation-DpsHhlIf.js +1 -0
- package/dist/client/assets/printer-By45yJVi.js +1 -0
- package/dist/client/assets/printer-check-CbPEpGab.js +1 -0
- package/dist/client/assets/printer-x-CFRYO_-V.js +1 -0
- package/dist/client/assets/projector-YtuD65FU.js +1 -0
- package/dist/client/assets/proportions-BuW_S1z4.js +1 -0
- package/dist/client/assets/puzzle-BI9FWt1d.js +1 -0
- package/dist/client/assets/pyramid-Yvn_f6ct.js +1 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-b0h_VssZ.js +7 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-b0h_VssZ.js.br +0 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-b0h_VssZ.js.gz +0 -0
- package/dist/client/assets/quote-CEmvIPIv.js +1 -0
- package/dist/client/assets/rabbit-VPU24IkW.js +1 -0
- package/dist/client/assets/radar-DmBCpTsc.js +1 -0
- package/dist/client/assets/radiation-CpNStoiw.js +1 -0
- package/dist/client/assets/radical-Cikx3k_4.js +1 -0
- package/dist/client/assets/radio-OkwS8Go6.js +1 -0
- package/dist/client/assets/radio-off-CQ7UdazM.js +1 -0
- package/dist/client/assets/radio-receiver-CSJrQr7r.js +1 -0
- package/dist/client/assets/radio-tower-BL8vHXMH.js +1 -0
- package/dist/client/assets/radius-jxBNbqbR.js +1 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-jIBhvajB.js +1 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-jIBhvajB.js.br +0 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-jIBhvajB.js.gz +0 -0
- package/dist/client/assets/rainbow-DnGLfPUO.js +1 -0
- package/dist/client/assets/rat-9yaJTwl5.js +1 -0
- package/dist/client/assets/ratio-ctcjMz0P.js +1 -0
- package/dist/client/assets/rdpSession-BUTHcbx8.js +1 -0
- package/dist/client/assets/rdpSession-BUTHcbx8.js.br +0 -0
- package/dist/client/assets/rdpSession-BUTHcbx8.js.gz +0 -0
- package/dist/client/assets/receipt-CINkLxn0.js +1 -0
- package/dist/client/assets/receipt-cent-uiTRRtpP.js +1 -0
- package/dist/client/assets/receipt-euro-NtY2zMoh.js +1 -0
- package/dist/client/assets/receipt-indian-rupee-BsRoevM1.js +1 -0
- package/dist/client/assets/receipt-japanese-yen-tkpfbVlL.js +1 -0
- package/dist/client/assets/receipt-pound-sterling-BI1bGjYI.js +1 -0
- package/dist/client/assets/receipt-russian-ruble-S4GoN9mm.js +1 -0
- package/dist/client/assets/receipt-swiss-franc-CP_hzUil.js +1 -0
- package/dist/client/assets/receipt-text-zYHn_wpH.js +1 -0
- package/dist/client/assets/receipt-turkish-lira-DpRl9Q8y.js +1 -0
- package/dist/client/assets/rectangle-circle-D5rsZJQS.js +1 -0
- package/dist/client/assets/rectangle-ellipsis-D5b7zWXA.js +1 -0
- package/dist/client/assets/rectangle-goggles-BmhjLjnP.js +1 -0
- package/dist/client/assets/rectangle-horizontal-BgwJzQXr.js +1 -0
- package/dist/client/assets/rectangle-vertical-svcIx-ID.js +1 -0
- package/dist/client/assets/recycle-DiNAuWYc.js +1 -0
- package/dist/client/assets/redo-2-PQ_eEZC_.js +1 -0
- package/dist/client/assets/redo-BHyCRqP6.js +1 -0
- package/dist/client/assets/redo-dot-DSZ3OBNx.js +1 -0
- package/dist/client/assets/referenceSelection-CbbewZEI.js +4 -0
- package/dist/client/assets/referenceSelection-CbbewZEI.js.br +0 -0
- package/dist/client/assets/referenceSelection-CbbewZEI.js.gz +0 -0
- package/dist/client/assets/refresh-ccw-BwL2oP1o.js +1 -0
- package/dist/client/assets/refresh-ccw-dot-B8DXwlHo.js +1 -0
- package/dist/client/assets/refresh-cw-off-13k0dVPe.js +1 -0
- package/dist/client/assets/refrigerator-DGtauh_z.js +1 -0
- package/dist/client/assets/regex-Bmp6VPt_.js +1 -0
- package/dist/client/assets/remove-formatting-Bmucz4VI.js +1 -0
- package/dist/client/assets/repeat-1-BBI70SSz.js +1 -0
- package/dist/client/assets/repeat-2--VpahQl4.js +1 -0
- package/dist/client/assets/repeat-CwGkZjyH.js +1 -0
- package/dist/client/assets/repeat-off-BluHkX3G.js +1 -0
- package/dist/client/assets/replace-B_I6nFPO.js +1 -0
- package/dist/client/assets/replace-all-CV_NXPQD.js +1 -0
- package/dist/client/assets/reply-all-CZndCr5a.js +1 -0
- package/dist/client/assets/reply-p4Z27KT8.js +1 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-Cj5nPjDj.js +84 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-Cj5nPjDj.js.br +0 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-Cj5nPjDj.js.gz +0 -0
- package/dist/client/assets/rewind-ButJBFlE.js +1 -0
- package/dist/client/assets/ribbon-CcS7Cra2.js +1 -0
- package/dist/client/assets/road-BxR9Y41R.js +1 -0
- package/dist/client/assets/rocking-chair-taAoPOKu.js +1 -0
- package/dist/client/assets/roller-coaster-BGyeJvFx.js +1 -0
- package/dist/client/assets/rose-dscPoRXB.js +1 -0
- package/dist/client/assets/rotate-3d-L1Lv6vO-.js +1 -0
- package/dist/client/assets/rotate-ccw-key-B_nDp4Fo.js +1 -0
- package/dist/client/assets/rotate-ccw-square-DijXZF4Z.js +1 -0
- package/dist/client/assets/rotate-cw-BoHZyV9B.js +1 -0
- package/dist/client/assets/rotate-cw-square-Cf8mNUaT.js +1 -0
- package/dist/client/assets/route-CQ9CPI_6.js +1 -0
- package/dist/client/assets/route-off-Dm9DKQ5w.js +1 -0
- package/dist/client/assets/router-DR2-Kf3A.js +1 -0
- package/dist/client/assets/rows-2-DlTTN9Oo.js +1 -0
- package/dist/client/assets/rows-3-BdJZRb06.js +1 -0
- package/dist/client/assets/rows-4-RT6tFNIN.js +1 -0
- package/dist/client/assets/rss-X6Zy9Uxi.js +1 -0
- package/dist/client/assets/ruler-DW_ekrAu.js +1 -0
- package/dist/client/assets/ruler-dimension-line-DT4SLk02.js +1 -0
- package/dist/client/assets/russian-ruble-BxgeB3Ii.js +1 -0
- package/dist/client/assets/sailboat-DT6J_Doi.js +1 -0
- package/dist/client/assets/salad-CHBOn8sw.js +1 -0
- package/dist/client/assets/sandwich-2sHah8js.js +1 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-Co6mlYQD.js +40 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-Co6mlYQD.js.br +0 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-Co6mlYQD.js.gz +0 -0
- package/dist/client/assets/satellite-DX8rd6AI.js +1 -0
- package/dist/client/assets/satellite-dish-8eRO8wVI.js +1 -0
- package/dist/client/assets/saudi-riyal-IWYi8QxQ.js +1 -0
- package/dist/client/assets/save-C75VJvfY.js +1 -0
- package/dist/client/assets/save-all-BE8ZALke.js +1 -0
- package/dist/client/assets/save-off-BG8Cnayg.js +1 -0
- package/dist/client/assets/scale-3d-DYPqsoc7.js +1 -0
- package/dist/client/assets/scale-DfoUFulH.js +1 -0
- package/dist/client/assets/scaling-CPJm40AZ.js +1 -0
- package/dist/client/assets/scan-DgNcWIS7.js +1 -0
- package/dist/client/assets/scan-barcode-BgyINAGz.js +1 -0
- package/dist/client/assets/scan-eye-CJ5-U5rx.js +1 -0
- package/dist/client/assets/scan-face-DCSM8L8i.js +1 -0
- package/dist/client/assets/scan-heart-qVJC17ZR.js +1 -0
- package/dist/client/assets/scan-line-CcugH1fq.js +1 -0
- package/dist/client/assets/scan-qr-code-BtCcH4Qh.js +1 -0
- package/dist/client/assets/scan-search-DLWImAfY.js +1 -0
- package/dist/client/assets/scan-text-Cy2L002u.js +1 -0
- package/dist/client/assets/school-UirVKPuQ.js +1 -0
- package/dist/client/assets/scissors-BmB5z3YT.js +1 -0
- package/dist/client/assets/scissors-line-dashed-AhZByQ9i.js +1 -0
- package/dist/client/assets/scooter-kzvBwe6Q.js +1 -0
- package/dist/client/assets/screen-share-B-Cwjewd.js +1 -0
- package/dist/client/assets/screen-share-off-CmoaxrXx.js +1 -0
- package/dist/client/assets/scroll-CvfmnzDK.js +1 -0
- package/dist/client/assets/scroll-text-2Evzb6qA.js +1 -0
- package/dist/client/assets/search-VkXrFvvs.js +1 -0
- package/dist/client/assets/search-alert-ChidIwuM.js +1 -0
- package/dist/client/assets/search-check-D_oGiMGM.js +1 -0
- package/dist/client/assets/search-code-DOQQRh9x.js +1 -0
- package/dist/client/assets/search-slash-mRK9MBS6.js +1 -0
- package/dist/client/assets/search-x-rMDJK08V.js +1 -0
- package/dist/client/assets/section-eRFxTd_P.js +1 -0
- package/dist/client/assets/send-D1megw4C.js +1 -0
- package/dist/client/assets/send-horizontal-BsIs8XcF.js +1 -0
- package/dist/client/assets/send-to-back-B0huL5HC.js +1 -0
- package/dist/client/assets/separator-horizontal-DiySPhun.js +1 -0
- package/dist/client/assets/separator-vertical-Dy-lHsCU.js +1 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CdMRBV5g.js +162 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CdMRBV5g.js.br +0 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CdMRBV5g.js.gz +0 -0
- package/dist/client/assets/server-cog-DJ_xwVIR.js +1 -0
- package/dist/client/assets/server-crash-0yeqN-DF.js +1 -0
- package/dist/client/assets/server-off-D4E1QwRi.js +1 -0
- package/dist/client/assets/sessionChatStartup-B8kGGezM.js +1 -0
- package/dist/client/assets/sessionChatStartup-B8kGGezM.js.br +0 -0
- package/dist/client/assets/sessionChatStartup-B8kGGezM.js.gz +0 -0
- package/dist/client/assets/settings-2-C_3Wu-fF.js +1 -0
- package/dist/client/assets/settings-B6dMOV_j.js +1 -0
- package/dist/client/assets/shapes-CD4A7LS5.js +1 -0
- package/dist/client/assets/share-BWHG1qIf.js +1 -0
- package/dist/client/assets/sheet-xTLBlRMa.js +1 -0
- package/dist/client/assets/shell-CCv9cy6G.js +1 -0
- package/dist/client/assets/shelving-unit-CbRTIrvQ.js +1 -0
- package/dist/client/assets/shield-NubkcRno.js +1 -0
- package/dist/client/assets/shield-alert-CLGIEYEH.js +1 -0
- package/dist/client/assets/shield-ban-DI2X04wH.js +1 -0
- package/dist/client/assets/shield-check-9Cqzu4o2.js +1 -0
- package/dist/client/assets/shield-cog-au8WrnUu.js +1 -0
- package/dist/client/assets/shield-cog-corner-C-sSKRD1.js +1 -0
- package/dist/client/assets/shield-ellipsis-DKoR1Zfc.js +1 -0
- package/dist/client/assets/shield-half-DQVH9BFw.js +1 -0
- package/dist/client/assets/shield-minus-DuYw9goH.js +1 -0
- package/dist/client/assets/shield-off-C2pVysBb.js +1 -0
- package/dist/client/assets/shield-plus-D4Qrkp3j.js +1 -0
- package/dist/client/assets/shield-question-mark-WExiHwr5.js +1 -0
- package/dist/client/assets/shield-user-BbySs9az.js +1 -0
- package/dist/client/assets/shield-x-MTNvQsSm.js +1 -0
- package/dist/client/assets/ship--b96OGXj.js +1 -0
- package/dist/client/assets/ship-wheel-DE8zIerC.js +1 -0
- package/dist/client/assets/shirt-CWRE_Q0t.js +1 -0
- package/dist/client/assets/shopping-bag--Bh-da8P.js +1 -0
- package/dist/client/assets/shopping-basket-DO2D_Of3.js +1 -0
- package/dist/client/assets/shopping-cart-TM3-mO3P.js +1 -0
- package/dist/client/assets/shovel-BZ9ITZTz.js +1 -0
- package/dist/client/assets/shower-head-CmHyb01m.js +1 -0
- package/dist/client/assets/shredder-wVq-X1ff.js +1 -0
- package/dist/client/assets/shrimp-D6F-gNS3.js +1 -0
- package/dist/client/assets/shrink-n-hQoT8j.js +1 -0
- package/dist/client/assets/shrub-H-Po4Oav.js +1 -0
- package/dist/client/assets/shuffle-yEJlCwlM.js +1 -0
- package/dist/client/assets/sigma-B-Pz0lB4.js +1 -0
- package/dist/client/assets/signal-DYa8u3aP.js +1 -0
- package/dist/client/assets/signal-high-D7eqy_lR.js +1 -0
- package/dist/client/assets/signal-low-D-vXNTvw.js +1 -0
- package/dist/client/assets/signal-medium-DpI57ECl.js +1 -0
- package/dist/client/assets/signal-zero-C-vdqJIZ.js +1 -0
- package/dist/client/assets/signature-CDT92kN7.js +1 -0
- package/dist/client/assets/signpost-8nLpLY_7.js +1 -0
- package/dist/client/assets/signpost-big-CT14zEWS.js +1 -0
- package/dist/client/assets/siren-De1cByWU.js +1 -0
- package/dist/client/assets/sizeCapture-INFHLROL-BbUaYX9n.js +1 -0
- package/dist/client/assets/sizeCapture-INFHLROL-BbUaYX9n.js.br +0 -0
- package/dist/client/assets/sizeCapture-INFHLROL-BbUaYX9n.js.gz +0 -0
- package/dist/client/assets/skip-back-CSJ4_yWS.js +1 -0
- package/dist/client/assets/skip-forward-DJVqgTb_.js +1 -0
- package/dist/client/assets/skull-C_AgnMZt.js +1 -0
- package/dist/client/assets/slash-B9CLTK3z.js +1 -0
- package/dist/client/assets/slice-CvPSlm2I.js +1 -0
- package/dist/client/assets/sliders-horizontal-BVy4gQBR.js +1 -0
- package/dist/client/assets/sliders-vertical-sx9uwgLf.js +1 -0
- package/dist/client/assets/smartphone-charging-CBAjtDLF.js +1 -0
- package/dist/client/assets/smartphone-nfc-09DHLH3L.js +1 -0
- package/dist/client/assets/smile-Bn23HqdU.js +1 -0
- package/dist/client/assets/smile-plus-CB9glvPi.js +1 -0
- package/dist/client/assets/snail-B-kmOyKj.js +1 -0
- package/dist/client/assets/snowflake-CHpGcsDz.js +1 -0
- package/dist/client/assets/soap-dispenser-droplet-ByzF5cRE.js +1 -0
- package/dist/client/assets/sofa-DSyO5X7P.js +1 -0
- package/dist/client/assets/solar-panel-YBG8-Kkg.js +1 -0
- package/dist/client/assets/soup-CmYpB5Yr.js +1 -0
- package/dist/client/assets/space-DW8ng_tP.js +1 -0
- package/dist/client/assets/spade-B4avSdnk.js +1 -0
- package/dist/client/assets/sparkle-Dec-SKmP.js +1 -0
- package/dist/client/assets/speaker-BLZjq94m.js +1 -0
- package/dist/client/assets/speech-BumUjJJw.js +1 -0
- package/dist/client/assets/spell-check-2-Cy_oRNU4.js +1 -0
- package/dist/client/assets/spell-check-Ca7c21li.js +1 -0
- package/dist/client/assets/spline-COFNFquu.js +1 -0
- package/dist/client/assets/spline-pointer-D3UoABho.js +1 -0
- package/dist/client/assets/split-DzVRWLNM.js +1 -0
- package/dist/client/assets/spool-B4ylXzvX.js +1 -0
- package/dist/client/assets/sport-shoe-CfCkItgt.js +1 -0
- package/dist/client/assets/spotlight-Dm4qnr0R.js +1 -0
- package/dist/client/assets/spray-can-DCSp7X8e.js +1 -0
- package/dist/client/assets/sprout-CMz_Uijt.js +1 -0
- package/dist/client/assets/square-BBtfpgAz.js +1 -0
- package/dist/client/assets/square-activity-C-K0OK-Y.js +1 -0
- package/dist/client/assets/square-arrow-down-C5zQ73-3.js +1 -0
- package/dist/client/assets/square-arrow-down-left-CeEul6_i.js +1 -0
- package/dist/client/assets/square-arrow-down-right-D-92pc0n.js +1 -0
- package/dist/client/assets/square-arrow-left-ByT0DRMy.js +1 -0
- package/dist/client/assets/square-arrow-out-down-left-DeWTtEnj.js +1 -0
- package/dist/client/assets/square-arrow-out-down-right-oPa-2DSG.js +1 -0
- package/dist/client/assets/square-arrow-out-up-left-ap6cEexX.js +1 -0
- package/dist/client/assets/square-arrow-right-6exnps7z.js +1 -0
- package/dist/client/assets/square-arrow-right-enter-DI9fytMd.js +1 -0
- package/dist/client/assets/square-arrow-right-exit-BblPS4cB.js +1 -0
- package/dist/client/assets/square-arrow-up-CJPjn1op.js +1 -0
- package/dist/client/assets/square-arrow-up-left-B04XeeLd.js +1 -0
- package/dist/client/assets/square-arrow-up-right-B1rcQcC1.js +1 -0
- package/dist/client/assets/square-asterisk-CnBWNoG5.js +1 -0
- package/dist/client/assets/square-bottom-dashed-scissors-CIkwFAVV.js +1 -0
- package/dist/client/assets/square-centerline-dashed-horizontal-IZ50btCt.js +1 -0
- package/dist/client/assets/square-centerline-dashed-vertical-D6mp-DuL.js +1 -0
- package/dist/client/assets/square-chart-gantt-FoLEy76Y.js +1 -0
- package/dist/client/assets/square-check-DtVDOd8p.js +1 -0
- package/dist/client/assets/square-check-big-DOTmP91Q.js +1 -0
- package/dist/client/assets/square-chevron-down-DbgL8W2r.js +1 -0
- package/dist/client/assets/square-chevron-left-DBdIQI5l.js +1 -0
- package/dist/client/assets/square-chevron-right-B8Mli7Cy.js +1 -0
- package/dist/client/assets/square-chevron-up-ByIk72uh.js +1 -0
- package/dist/client/assets/square-code-DkVggW8a.js +1 -0
- package/dist/client/assets/square-dashed-DxMHk49b.js +1 -0
- package/dist/client/assets/square-dashed-bottom-_YzOqork.js +1 -0
- package/dist/client/assets/square-dashed-bottom-code-Pw82tuMn.js +1 -0
- package/dist/client/assets/square-dashed-kanban-DA1mTQ34.js +1 -0
- package/dist/client/assets/square-dashed-mouse-pointer-BMF5bDH-.js +1 -0
- package/dist/client/assets/square-dashed-text-CWcp-xd-.js +1 -0
- package/dist/client/assets/square-dashed-top-solid-DZ_1v85A.js +1 -0
- package/dist/client/assets/square-divide-989owllB.js +1 -0
- package/dist/client/assets/square-dot-DCc1EHUB.js +1 -0
- package/dist/client/assets/square-equal-BSNTjrQy.js +1 -0
- package/dist/client/assets/square-function-B0iFykPg.js +1 -0
- package/dist/client/assets/square-kanban-BagvIo5s.js +1 -0
- package/dist/client/assets/square-library-BRmsQ7_N.js +1 -0
- package/dist/client/assets/square-m-BaY4gmuv.js +1 -0
- package/dist/client/assets/square-menu-BkL3Ssnp.js +1 -0
- package/dist/client/assets/square-minus-DZJcS8Or.js +1 -0
- package/dist/client/assets/square-mouse-pointer-10v4bBSL.js +1 -0
- package/dist/client/assets/square-parking-8J0IkJC5.js +1 -0
- package/dist/client/assets/square-parking-off-CxwEZ5PR.js +1 -0
- package/dist/client/assets/square-pause-CV5K20J4.js +1 -0
- package/dist/client/assets/square-pen-DKle28kf.js +1 -0
- package/dist/client/assets/square-percent-BpLkIe0J.js +1 -0
- package/dist/client/assets/square-pi-DhfpjWb6.js +1 -0
- package/dist/client/assets/square-pilcrow-C6wgn6bi.js +1 -0
- package/dist/client/assets/square-play-CVLC_zLM.js +1 -0
- package/dist/client/assets/square-plus-BPA_KrQ8.js +1 -0
- package/dist/client/assets/square-power-CWFUR5Eg.js +1 -0
- package/dist/client/assets/square-radical-tlrMqYOI.js +1 -0
- package/dist/client/assets/square-round-corner-BcZ4qfp9.js +1 -0
- package/dist/client/assets/square-scissors-BWHQWWhB.js +1 -0
- package/dist/client/assets/square-sigma-C_-_UWbJ.js +1 -0
- package/dist/client/assets/square-slash-Bnq-r3G7.js +1 -0
- package/dist/client/assets/square-split-horizontal-Cz6Uv6_e.js +1 -0
- package/dist/client/assets/square-split-vertical-brN82eUi.js +1 -0
- package/dist/client/assets/square-square-6-ZnmcQ4.js +1 -0
- package/dist/client/assets/square-stack-D2PS4hVu.js +1 -0
- package/dist/client/assets/square-star-CU_OJnYJ.js +1 -0
- package/dist/client/assets/square-stop-BpMPONRJ.js +1 -0
- package/dist/client/assets/square-user-DZJkAa68.js +1 -0
- package/dist/client/assets/square-user-round-moc2_mKH.js +1 -0
- package/dist/client/assets/square-x-Czp6FXaU.js +1 -0
- package/dist/client/assets/squares-exclude-36sqepFz.js +1 -0
- package/dist/client/assets/squares-intersect-Gouw1Knj.js +1 -0
- package/dist/client/assets/squares-subtract-Bo6XUN1K.js +1 -0
- package/dist/client/assets/squares-unite-DNeC3C4J.js +1 -0
- package/dist/client/assets/squircle-CllaKg7P.js +1 -0
- package/dist/client/assets/squircle-dashed-Cq_p7xbc.js +1 -0
- package/dist/client/assets/squirrel-B3m39Pwb.js +1 -0
- package/dist/client/assets/stamp-CQ-4Q9-r.js +1 -0
- package/dist/client/assets/star-CqFqoWCE.js +1 -0
- package/dist/client/assets/star-half-BqNI9DFi.js +1 -0
- package/dist/client/assets/star-off-DTPHUKxm.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-ByyodJVy.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-ByyodJVy.js.br +0 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-ByyodJVy.js.gz +0 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-BQ0wryDH.js +1 -0
- package/dist/client/assets/step-back-0d6cDbOE.js +1 -0
- package/dist/client/assets/step-forward-DkqR-DL9.js +1 -0
- package/dist/client/assets/stethoscope-CzMJafJM.js +1 -0
- package/dist/client/assets/sticker-A_-_--D_.js +1 -0
- package/dist/client/assets/sticky-note-DhktA2Io.js +1 -0
- package/dist/client/assets/sticky-note-check-Ber3VgLa.js +1 -0
- package/dist/client/assets/sticky-note-minus-D7wM6Qgf.js +1 -0
- package/dist/client/assets/sticky-note-off-fvHG2pKs.js +1 -0
- package/dist/client/assets/sticky-note-plus-8KyKa8S7.js +1 -0
- package/dist/client/assets/sticky-note-x-CXCDADF-.js +1 -0
- package/dist/client/assets/sticky-notes-Zk5vStXp.js +1 -0
- package/dist/client/assets/stone-pQgGlmfO.js +1 -0
- package/dist/client/assets/store-D2988S9V.js +1 -0
- package/dist/client/assets/stretch-horizontal-CvQ-UGqF.js +1 -0
- package/dist/client/assets/stretch-vertical-DtJQ-wiS.js +1 -0
- package/dist/client/assets/strikethrough-D0a2cTjg.js +1 -0
- package/dist/client/assets/subscript-BQhYpzdJ.js +1 -0
- package/dist/client/assets/sun-E4aoJmf7.js +1 -0
- package/dist/client/assets/sun-dim-b_EWth8c.js +1 -0
- package/dist/client/assets/sun-medium-DEp2y2oX.js +1 -0
- package/dist/client/assets/sun-moon-DUvxK9ms.js +1 -0
- package/dist/client/assets/sun-snow-BO9UPL2i.js +1 -0
- package/dist/client/assets/sunrise-jot3ypYR.js +1 -0
- package/dist/client/assets/sunset-Bre9myf3.js +1 -0
- package/dist/client/assets/superscript-B-c5PQ_f.js +1 -0
- package/dist/client/assets/swatch-book-DQZl1Ekk.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-CZrvWxN2.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-CZrvWxN2.js.br +0 -0
- package/dist/client/assets/swimlanes-42K2YHIH-CZrvWxN2.js.gz +0 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DuRluN8Q.js +8 -0
- package/dist/client/assets/swiper-DnY6b8V3.js +1 -0
- package/dist/client/assets/swiper-DnY6b8V3.js.br +0 -0
- package/dist/client/assets/swiper-DnY6b8V3.js.gz +0 -0
- package/dist/client/assets/swiss-franc-Bs0rpvUB.js +1 -0
- package/dist/client/assets/switch-camera-2iRrjOsJ.js +1 -0
- package/dist/client/assets/sword-CR2qehrs.js +1 -0
- package/dist/client/assets/swords-BOmklk7w.js +1 -0
- package/dist/client/assets/syringe-yoqiRdEl.js +1 -0
- package/dist/client/assets/table-2-BGqJ0ZeI.js +1 -0
- package/dist/client/assets/table-D54Zsg19.js +1 -0
- package/dist/client/assets/table-cells-merge-DzTMDYxf.js +1 -0
- package/dist/client/assets/table-cells-split-Bj-FgtiP.js +1 -0
- package/dist/client/assets/table-columns-split-kWWXN2PI.js +1 -0
- package/dist/client/assets/table-of-contents-qiAP0lLZ.js +1 -0
- package/dist/client/assets/table-properties-weKCQkNL.js +1 -0
- package/dist/client/assets/table-rows-split-CbSa-HM2.js +1 -0
- package/dist/client/assets/tablet-7n-lci9M.js +1 -0
- package/dist/client/assets/tablet-smartphone-DwoNQDAV.js +1 -0
- package/dist/client/assets/tablets-DbweKOqx.js +1 -0
- package/dist/client/assets/tag-CkWjw067.js +1 -0
- package/dist/client/assets/tags-AV5vEZM1.js +1 -0
- package/dist/client/assets/tally-1-DymDRmkN.js +1 -0
- package/dist/client/assets/tally-2-L5tlNiIo.js +1 -0
- package/dist/client/assets/tally-3-BE6FfXi4.js +1 -0
- package/dist/client/assets/tally-4-B6aCoy4I.js +1 -0
- package/dist/client/assets/tally-5-CFmUbrl_.js +1 -0
- package/dist/client/assets/tangent-DezCQ3eH.js +1 -0
- package/dist/client/assets/target-Bla4nGUF.js +1 -0
- package/dist/client/assets/telescope-CxgX4kX5.js +1 -0
- package/dist/client/assets/tent-C5iQOwRy.js +1 -0
- package/dist/client/assets/tent-tree-D3ER5bjC.js +1 -0
- package/dist/client/assets/test-tube-CB8JLnLw.js +1 -0
- package/dist/client/assets/test-tube-diagonal-sDGWOkki.js +1 -0
- package/dist/client/assets/test-tubes-CXTQvJYC.js +1 -0
- package/dist/client/assets/text-align-center-uPA85fz1.js +1 -0
- package/dist/client/assets/text-align-end-w04aJ5er.js +1 -0
- package/dist/client/assets/text-align-justify-B0XPkphC.js +1 -0
- package/dist/client/assets/text-align-start-CiGutDe6.js +1 -0
- package/dist/client/assets/text-cursor-DkVcV-EW.js +1 -0
- package/dist/client/assets/text-cursor-input-DEZQ_Vlz.js +1 -0
- package/dist/client/assets/text-initial-CQB7Z6Hz.js +1 -0
- package/dist/client/assets/text-quote-CDDVcSGc.js +1 -0
- package/dist/client/assets/text-search-85HDzll2.js +1 -0
- package/dist/client/assets/text-wrap-BeqgWznC.js +1 -0
- package/dist/client/assets/theater-Yzl643qy.js +1 -0
- package/dist/client/assets/thermometer-N3gsBD5F.js +1 -0
- package/dist/client/assets/thermometer-snowflake-CrcYZw9h.js +1 -0
- package/dist/client/assets/thermometer-sun-D7_jFLfO.js +1 -0
- package/dist/client/assets/thumbs-down-bsh5dlnk.js +1 -0
- package/dist/client/assets/thumbs-up-CzRwGloS.js +1 -0
- package/dist/client/assets/ticket-Csjk6FHQ.js +1 -0
- package/dist/client/assets/ticket-check-CToOFN4L.js +1 -0
- package/dist/client/assets/ticket-minus-C0Lb5P-W.js +1 -0
- package/dist/client/assets/ticket-percent-B6_x41qO.js +1 -0
- package/dist/client/assets/ticket-plus-CGLPLdjt.js +1 -0
- package/dist/client/assets/ticket-slash-DBrI3Q7H.js +1 -0
- package/dist/client/assets/ticket-x-Bxvk2Wqv.js +1 -0
- package/dist/client/assets/tickets-C9yIMtIg.js +1 -0
- package/dist/client/assets/tickets-plane-D2fS3Cek.js +1 -0
- package/dist/client/assets/timeline-BsNDwQrg.js +1 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CGuR3Uid.js +120 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CGuR3Uid.js.br +0 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CGuR3Uid.js.gz +0 -0
- package/dist/client/assets/timer-DhGLXJfn.js +1 -0
- package/dist/client/assets/timer-off-Bv68d-6W.js +1 -0
- package/dist/client/assets/timer-reset-DvAlnRT9.js +1 -0
- package/dist/client/assets/toggle-left-C16xs880.js +1 -0
- package/dist/client/assets/toggle-right-BnLAGtZo.js +1 -0
- package/dist/client/assets/toilet-DuqZ6Pek.js +1 -0
- package/dist/client/assets/tool-case-BwCZjg-b.js +1 -0
- package/dist/client/assets/toolbox-D5NDYtGH.js +1 -0
- package/dist/client/assets/tornado-D25Nga9D.js +1 -0
- package/dist/client/assets/torus-ZinjyZ71.js +1 -0
- package/dist/client/assets/touchpad-DlEMYFnK.js +1 -0
- package/dist/client/assets/touchpad-off-CPC4ljxd.js +1 -0
- package/dist/client/assets/towel-rack-BHUkFFvi.js +1 -0
- package/dist/client/assets/tower-control-CwgNhAko.js +1 -0
- package/dist/client/assets/toy-brick-RJat8Niy.js +1 -0
- package/dist/client/assets/tractor-CzXgI-9l.js +1 -0
- package/dist/client/assets/traffic-cone-yifThYCR.js +1 -0
- package/dist/client/assets/train-front-BqIoXnPw.js +1 -0
- package/dist/client/assets/train-front-tunnel-BTuiwqXq.js +1 -0
- package/dist/client/assets/train-track-Cec0gcIm.js +1 -0
- package/dist/client/assets/tram-front-2vYEEAWX.js +1 -0
- package/dist/client/assets/transgender-DvovIWlj.js +1 -0
- package/dist/client/assets/trash-CqdqIo8z.js +1 -0
- package/dist/client/assets/tree-deciduous-D0VBQE7i.js +1 -0
- package/dist/client/assets/tree-palm-BQ-5BktP.js +1 -0
- package/dist/client/assets/tree-pine-B5hwO323.js +1 -0
- package/dist/client/assets/trees-fxUQVfpE.js +1 -0
- package/dist/client/assets/trending-down-BnhQdHgM.js +1 -0
- package/dist/client/assets/trending-up-SY8zRl3l.js +1 -0
- package/dist/client/assets/trending-up-down-sfiu1SnD.js +1 -0
- package/dist/client/assets/triangle-DIGo7zJJ.js +1 -0
- package/dist/client/assets/triangle-alert-DUYUEcdi.js +1 -0
- package/dist/client/assets/triangle-dashed-Df8xqwXZ.js +1 -0
- package/dist/client/assets/triangle-right--ZCegDHX.js +1 -0
- package/dist/client/assets/trophy-BeY95Jh4.js +1 -0
- package/dist/client/assets/truck-CTrKRhkM.js +1 -0
- package/dist/client/assets/truck-electric-Bi9efE6b.js +1 -0
- package/dist/client/assets/turkish-lira-DYpODisL.js +1 -0
- package/dist/client/assets/turntable-CJLlGYDM.js +1 -0
- package/dist/client/assets/turtle-DSehNbF9.js +1 -0
- package/dist/client/assets/tv-D_L2NxeB.js +1 -0
- package/dist/client/assets/tv-minimal-DfL5NYdq.js +1 -0
- package/dist/client/assets/tv-minimal-play-BJyp8elK.js +1 -0
- package/dist/client/assets/type-BqS3fxVW.js +1 -0
- package/dist/client/assets/type-outline-D9tU92vW.js +1 -0
- package/dist/client/assets/umbrella-off-CF7rrfX1.js +1 -0
- package/dist/client/assets/umbrella-q-aa7dFF.js +1 -0
- package/dist/client/assets/underline-DdEPCYov.js +1 -0
- package/dist/client/assets/undo-2-CKgHu3c-.js +1 -0
- package/dist/client/assets/undo-DS9jYpfx.js +1 -0
- package/dist/client/assets/undo-dot-DULBObJu.js +1 -0
- package/dist/client/assets/unfold-horizontal-BhNvgeIs.js +1 -0
- package/dist/client/assets/unfold-vertical-BonsXvJD.js +1 -0
- package/dist/client/assets/ungroup-1Pyn8rRB.js +1 -0
- package/dist/client/assets/university-BYsb8Zf7.js +1 -0
- package/dist/client/assets/unlink-2-BSvUU_ON.js +1 -0
- package/dist/client/assets/unlink-BFyDfOOw.js +1 -0
- package/dist/client/assets/unplug-D4lqqSjs.js +1 -0
- package/dist/client/assets/upload-BnC0cOC4.js +1 -0
- package/dist/client/assets/usb-CAME7MY-.js +1 -0
- package/dist/client/assets/use-gesture-react.esm-hemdHJy0.js +1 -0
- package/dist/client/assets/use-gesture-react.esm-hemdHJy0.js.br +0 -0
- package/dist/client/assets/use-gesture-react.esm-hemdHJy0.js.gz +0 -0
- package/dist/client/assets/user-BMoW5VMO.js +1 -0
- package/dist/client/assets/user-check-5fr_K_04.js +1 -0
- package/dist/client/assets/user-cog-DnAx2FyK.js +1 -0
- package/dist/client/assets/user-key-C7TzyGxU.js +1 -0
- package/dist/client/assets/user-lock-Bl3E2xwg.js +1 -0
- package/dist/client/assets/user-minus-DEdeUSKK.js +1 -0
- package/dist/client/assets/user-pen-CACAWluv.js +1 -0
- package/dist/client/assets/user-plus-CWrFsTxd.js +1 -0
- package/dist/client/assets/user-round-B8moCAq1.js +1 -0
- package/dist/client/assets/user-round-check-D2eGAcGR.js +1 -0
- package/dist/client/assets/user-round-cog-D6uJSt0T.js +1 -0
- package/dist/client/assets/user-round-key-BBp4szL6.js +1 -0
- package/dist/client/assets/user-round-minus-XWHxmKC1.js +1 -0
- package/dist/client/assets/user-round-pen-CI4lU1Os.js +1 -0
- package/dist/client/assets/user-round-plus-DNtEBG9D.js +1 -0
- package/dist/client/assets/user-round-search-qHG4sn9X.js +1 -0
- package/dist/client/assets/user-round-x-DAF95rX7.js +1 -0
- package/dist/client/assets/user-search-CzH2Z8Vu.js +1 -0
- package/dist/client/assets/user-star-BXl0yKTG.js +1 -0
- package/dist/client/assets/user-x-mUOIRBN4.js +1 -0
- package/dist/client/assets/users-CohBFiM5.js +1 -0
- package/dist/client/assets/users-round-DHn9ZxDW.js +1 -0
- package/dist/client/assets/utensils-CboTkrx0.js +1 -0
- package/dist/client/assets/utensils-crossed-BCJ2ICRE.js +1 -0
- package/dist/client/assets/utility-pole-my1anaXD.js +1 -0
- package/dist/client/assets/van-CBVfOJx2.js +1 -0
- package/dist/client/assets/variable-D2E7DnZb.js +1 -0
- package/dist/client/assets/vault-zoSIwFXh.js +1 -0
- package/dist/client/assets/vector-square-DLqmbsE4.js +1 -0
- package/dist/client/assets/vegan-fsJX4JH_.js +1 -0
- package/dist/client/assets/venetian-mask-DuIy-vrQ.js +1 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-MdRSyaxo.js +34 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-MdRSyaxo.js.br +0 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-MdRSyaxo.js.gz +0 -0
- package/dist/client/assets/venus-DQlpL9o_.js +1 -0
- package/dist/client/assets/venus-and-mars-KyJrsZvW.js +1 -0
- package/dist/client/assets/vibrate-BEXl4res.js +1 -0
- package/dist/client/assets/vibrate-off-Peugc-Ys.js +1 -0
- package/dist/client/assets/video-off-C4x1JZmF.js +1 -0
- package/dist/client/assets/videoCompression-D3xjArgT.js +3 -0
- package/dist/client/assets/videoCompression-D3xjArgT.js.br +0 -0
- package/dist/client/assets/videoCompression-D3xjArgT.js.gz +0 -0
- package/dist/client/assets/videotape-C54wRPcs.js +1 -0
- package/dist/client/assets/view-DOguwQvw.js +1 -0
- package/dist/client/assets/voicemail-DwatGEpZ.js +1 -0
- package/dist/client/assets/volleyball-ahNl7r7F.js +1 -0
- package/dist/client/assets/volume-1-DPh-qm-Q.js +1 -0
- package/dist/client/assets/volume-2-DRMDCc21.js +1 -0
- package/dist/client/assets/volume-off-D0mmJ5pa.js +1 -0
- package/dist/client/assets/volume-rN2VlqTR.js +1 -0
- package/dist/client/assets/volume-x-BgT_r4Lg.js +1 -0
- package/dist/client/assets/vote-DYkCYoji.js +1 -0
- package/dist/client/assets/wallet-BRsWrJf0.js +1 -0
- package/dist/client/assets/wallet-cards-D2GZ8AJG.js +1 -0
- package/dist/client/assets/wallet-minimal-CDNm5VD-.js +1 -0
- package/dist/client/assets/wallpaper-Del9ii-J.js +1 -0
- package/dist/client/assets/wand-BUZZWAys.js +1 -0
- package/dist/client/assets/wand-sparkles-DafqKh-P.js +1 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-v4CSI7dG.js +78 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-v4CSI7dG.js.br +0 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-v4CSI7dG.js.gz +0 -0
- package/dist/client/assets/warehouse-D1W82_TR.js +1 -0
- package/dist/client/assets/washing-machine-BoOYsB4k.js +1 -0
- package/dist/client/assets/watch-DKeJEHuX.js +1 -0
- package/dist/client/assets/waves-arrow-down-C0cZdq-H.js +1 -0
- package/dist/client/assets/waves-arrow-up-y0q1ZkdZ.js +1 -0
- package/dist/client/assets/waves-horizontal-C1zMO_ws.js +1 -0
- package/dist/client/assets/waves-ladder-BdwjL_l4.js +1 -0
- package/dist/client/assets/waves-vertical-DCGTvKXZ.js +1 -0
- package/dist/client/assets/waypoints-Da8o0Q7P.js +1 -0
- package/dist/client/assets/webcam-BRyK_gRs.js +1 -0
- package/dist/client/assets/webhook-DjjBmbzI.js +1 -0
- package/dist/client/assets/webhook-off-dh8Gw5p5.js +1 -0
- package/dist/client/assets/weight-C0NT1bW6.js +1 -0
- package/dist/client/assets/weight-tilde-B93bHkWj.js +1 -0
- package/dist/client/assets/wheat-DMInNc47.js +1 -0
- package/dist/client/assets/wheat-off-BLH9IzKy.js +1 -0
- package/dist/client/assets/whole-word-C6WM9i_S.js +1 -0
- package/dist/client/assets/wifi-Dxb5w9Bc.js +1 -0
- package/dist/client/assets/wifi-cog-DqUYRpr3.js +1 -0
- package/dist/client/assets/wifi-high-BSU2KsjF.js +1 -0
- package/dist/client/assets/wifi-low-Bw7Momqj.js +1 -0
- package/dist/client/assets/wifi-pen-y47ZgP5k.js +1 -0
- package/dist/client/assets/wifi-sync-B_88LS4s.js +1 -0
- package/dist/client/assets/wifi-zero-CUjR5wcU.js +1 -0
- package/dist/client/assets/wind-CplFhhiC.js +1 -0
- package/dist/client/assets/wind-arrow-down-BjgcU77n.js +1 -0
- package/dist/client/assets/wine-Dq0-4ksY.js +1 -0
- package/dist/client/assets/wine-off-D9soV1iW.js +1 -0
- package/dist/client/assets/workflow-CXhyZaCb.js +1 -0
- package/dist/client/assets/worm-DrSVTYKw.js +1 -0
- package/dist/client/assets/wrench-CgX8jtaz.js +1 -0
- package/dist/client/assets/x-line-top-DJ1QQ5lD.js +1 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-DyfL6LEv.js +7 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-DyfL6LEv.js.br +0 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-DyfL6LEv.js.gz +0 -0
- package/dist/client/assets/zap-CBkCNOQT.js +1 -0
- package/dist/client/assets/zap-off-CgA_7WAm.js +1 -0
- package/dist/client/assets/zodiac-aquarius-CcC678eb.js +1 -0
- package/dist/client/assets/zodiac-aries-CG6tMmCp.js +1 -0
- package/dist/client/assets/zodiac-cancer-CwtnJBAY.js +1 -0
- package/dist/client/assets/zodiac-capricorn-BdRlQBRZ.js +1 -0
- package/dist/client/assets/zodiac-gemini-BLQf29Te.js +1 -0
- package/dist/client/assets/zodiac-leo-B3s-jfyT.js +1 -0
- package/dist/client/assets/zodiac-libra-DMYkSB5x.js +1 -0
- package/dist/client/assets/zodiac-ophiuchus-BkwUYeBV.js +1 -0
- package/dist/client/assets/zodiac-pisces-R2DLq9zI.js +1 -0
- package/dist/client/assets/zodiac-sagittarius-ipLpwyJa.js +1 -0
- package/dist/client/assets/zodiac-scorpio-UuRuMsb5.js +1 -0
- package/dist/client/assets/zodiac-taurus-BuXMBf8v.js +1 -0
- package/dist/client/assets/zodiac-virgo-LhzwIkq4.js +1 -0
- package/dist/client/assets/zoom-in-C3GnjwGF.js +1 -0
- package/dist/client/assets/zoom-out-By6xgQeg.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/automationCli.js +7 -2
- package/dist/server/agent/automationStore.js +1 -0
- package/dist/server/agent/collaborationDeliveryWorker.js +12 -8
- package/dist/server/agent/collaborationPrompt.js +9 -0
- package/dist/server/agent/collaborationRoutes.js +9 -1
- package/dist/server/agent/collaborationStore.js +22 -2
- package/dist/server/agent/collaborationTmuxDelivery.js +11 -4
- package/dist/server/agent/promptDelivery.js +7 -5
- package/dist/server/agent/sessionChatHistory.js +2 -1
- package/dist/server/agent/sessionChatRoutes.js +18 -4
- package/dist/server/agent/terminalEchoProbe.js +7 -33
- package/dist/server/agent/terminalProbeMarker.js +11 -0
- package/dist/server/agent/terminalReadinessProbe.js +53 -63
- package/dist/server/routes/terminal.js +15 -8
- package/dist/server/shared/chatDelivery.js +12 -1
- package/package.json +2 -2
- package/runtime-manifest.json +3 -3
- package/dist/client/assets/AndroidMirrorView-jAXOYxjq.js +0 -3
- package/dist/client/assets/AndroidMirrorView-jAXOYxjq.js.br +0 -0
- package/dist/client/assets/AndroidMirrorView-jAXOYxjq.js.gz +0 -0
- package/dist/client/assets/App-oVoAfReS.js +0 -188
- package/dist/client/assets/App-oVoAfReS.js.br +0 -0
- package/dist/client/assets/App-oVoAfReS.js.gz +0 -0
- package/dist/client/assets/ArchitecturePanel-DtpOkwyY.js +0 -9
- package/dist/client/assets/ArchitecturePanel-DtpOkwyY.js.br +0 -0
- package/dist/client/assets/ArchitecturePanel-DtpOkwyY.js.gz +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-DMEN0DIK.js +0 -2
- package/dist/client/assets/ChangeWalkthroughPanel-DMEN0DIK.js.br +0 -0
- package/dist/client/assets/ChangeWalkthroughPanel-DMEN0DIK.js.gz +0 -0
- package/dist/client/assets/ChatChartReference-C_G3okml.js +0 -284
- package/dist/client/assets/ChatChartReference-C_G3okml.js.br +0 -0
- package/dist/client/assets/ChatChartReference-C_G3okml.js.gz +0 -0
- package/dist/client/assets/ChatContextPreview-BZv57meY.js +0 -1
- package/dist/client/assets/ChatContextPreview-BZv57meY.js.br +0 -0
- package/dist/client/assets/ChatContextPreview-BZv57meY.js.gz +0 -0
- package/dist/client/assets/ChatFullContent-BBfcTIiH.js +0 -67
- package/dist/client/assets/ChatFullContent-BBfcTIiH.js.br +0 -0
- package/dist/client/assets/ChatFullContent-BBfcTIiH.js.gz +0 -0
- package/dist/client/assets/ChatRichContent-DWaj99Wr.js +0 -2
- package/dist/client/assets/ChatRichContent-DWaj99Wr.js.br +0 -0
- package/dist/client/assets/ChatRichContent-DWaj99Wr.js.gz +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-CGBG9a7V.js +0 -1
- package/dist/client/assets/ChatVideoPreviewDialog-CGBG9a7V.js.br +0 -0
- package/dist/client/assets/ChatVideoPreviewDialog-CGBG9a7V.js.gz +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-91m4ElER.js +0 -1
- package/dist/client/assets/CollaborationMainWorkspace-91m4ElER.js.br +0 -0
- package/dist/client/assets/CollaborationMainWorkspace-91m4ElER.js.gz +0 -0
- package/dist/client/assets/CollaborationTaskContent-C22n7-Em.js +0 -1
- package/dist/client/assets/ComputerControlView-mCVTEeW6.js +0 -6
- package/dist/client/assets/ComputerControlView-mCVTEeW6.js.br +0 -0
- package/dist/client/assets/ComputerControlView-mCVTEeW6.js.gz +0 -0
- package/dist/client/assets/DagPlayground-uJXUKq1B.js +0 -1
- package/dist/client/assets/DagPlayground-uJXUKq1B.js.br +0 -0
- package/dist/client/assets/DagPlayground-uJXUKq1B.js.gz +0 -0
- package/dist/client/assets/DiffLab-Bz2f0qOm.js +0 -455
- package/dist/client/assets/DiffLab-Bz2f0qOm.js.br +0 -0
- package/dist/client/assets/DiffLab-Bz2f0qOm.js.gz +0 -0
- package/dist/client/assets/DiffReview-B31lyTF6.js +0 -1
- package/dist/client/assets/DiffReview-B31lyTF6.js.br +0 -0
- package/dist/client/assets/DiffReview-B31lyTF6.js.gz +0 -0
- package/dist/client/assets/DiffReviewLab-ChTv0Dn6.js +0 -2
- package/dist/client/assets/DiffReviewLab-ChTv0Dn6.js.br +0 -0
- package/dist/client/assets/DiffReviewLab-ChTv0Dn6.js.gz +0 -0
- package/dist/client/assets/DiffViewer-ByeldHG9.js +0 -34
- package/dist/client/assets/DiffViewer-ByeldHG9.js.br +0 -0
- package/dist/client/assets/DiffViewer-ByeldHG9.js.gz +0 -0
- package/dist/client/assets/GitLoadingSkeleton-DmsHPIcc.js +0 -1
- package/dist/client/assets/GitLoadingSkeleton-DmsHPIcc.js.br +0 -0
- package/dist/client/assets/GitLoadingSkeleton-DmsHPIcc.js.gz +0 -0
- package/dist/client/assets/Markdown-DCiNb9_9.js +0 -23
- package/dist/client/assets/Markdown-DCiNb9_9.js.br +0 -0
- package/dist/client/assets/Markdown-DCiNb9_9.js.gz +0 -0
- package/dist/client/assets/MarkdownPreview-DM0TYcN_.js +0 -1
- package/dist/client/assets/MarkdownPreview-DM0TYcN_.js.br +0 -0
- package/dist/client/assets/MarkdownPreview-DM0TYcN_.js.gz +0 -0
- package/dist/client/assets/ModelPreview-C2YluEFP.js +0 -4112
- package/dist/client/assets/ModelPreview-C2YluEFP.js.br +0 -0
- package/dist/client/assets/ModelPreview-C2YluEFP.js.gz +0 -0
- package/dist/client/assets/RecordingSaveDialog-BCZfpotm.js +0 -1
- package/dist/client/assets/RecordingSaveDialog-BCZfpotm.js.br +0 -0
- package/dist/client/assets/RecordingSaveDialog-BCZfpotm.js.gz +0 -0
- package/dist/client/assets/RightSidebar-CvAvCYZD.js +0 -1729
- package/dist/client/assets/RightSidebar-CvAvCYZD.js.br +0 -0
- package/dist/client/assets/RightSidebar-CvAvCYZD.js.gz +0 -0
- package/dist/client/assets/SessionChatView-BD5rWAIo.js +0 -38
- package/dist/client/assets/SessionChatView-BD5rWAIo.js.br +0 -0
- package/dist/client/assets/SessionChatView-BD5rWAIo.js.gz +0 -0
- package/dist/client/assets/SessionResourceSidebar-2VZJVq-J.js +0 -2
- package/dist/client/assets/SessionResourceSidebar-2VZJVq-J.js.br +0 -0
- package/dist/client/assets/SessionResourceSidebar-2VZJVq-J.js.gz +0 -0
- package/dist/client/assets/TodoWorkspace-D7P5l5So.js +0 -1
- package/dist/client/assets/TodoWorkspace-D7P5l5So.js.br +0 -0
- package/dist/client/assets/TodoWorkspace-D7P5l5So.js.gz +0 -0
- package/dist/client/assets/VideoPreviewPlayer-keA0e4Jg.js +0 -1
- package/dist/client/assets/VideoPreviewPlayer-keA0e4Jg.js.br +0 -0
- package/dist/client/assets/VideoPreviewPlayer-keA0e4Jg.js.gz +0 -0
- package/dist/client/assets/a-arrow-down-DkPTREvn.js +0 -1
- package/dist/client/assets/a-arrow-up-CutrUjwT.js +0 -1
- package/dist/client/assets/a-large-small-DgHWJxwl.js +0 -1
- package/dist/client/assets/abnfDiagram-VCTEODGH-m4Jel480.js +0 -1
- package/dist/client/assets/abnfDiagram-VCTEODGH-m4Jel480.js.br +0 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-m4Jel480.js.gz +0 -0
- package/dist/client/assets/accessibility-jy-Dvc6c.js +0 -1
- package/dist/client/assets/activity-C_AofozZ.js +0 -1
- package/dist/client/assets/air-vent-XEo3WtH4.js +0 -1
- package/dist/client/assets/airplay-B_g-_0bD.js +0 -1
- package/dist/client/assets/alarm-clock-CK5tD21F.js +0 -1
- package/dist/client/assets/alarm-clock-check-BNFj7Pwk.js +0 -1
- package/dist/client/assets/alarm-clock-minus-wi9B83E-.js +0 -1
- package/dist/client/assets/alarm-clock-off-DI9qxrp0.js +0 -1
- package/dist/client/assets/alarm-clock-plus-hpFPwjS1.js +0 -1
- package/dist/client/assets/alarm-smoke-BP3bV8Ht.js +0 -1
- package/dist/client/assets/album-DJexgMFO.js +0 -1
- package/dist/client/assets/align-center-horizontal-BXEy2kS5.js +0 -1
- package/dist/client/assets/align-center-vertical-B-Wm7Q5X.js +0 -1
- package/dist/client/assets/align-end-horizontal-DfUhLm_k.js +0 -1
- package/dist/client/assets/align-end-vertical-CMlq0oeN.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-center-DcVbAivO.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-end-C5ELXMaS.js +0 -1
- package/dist/client/assets/align-horizontal-distribute-start-BQC8L-UY.js +0 -1
- package/dist/client/assets/align-horizontal-justify-center-CbKzNN76.js +0 -1
- package/dist/client/assets/align-horizontal-justify-end-DWiQl-o9.js +0 -1
- package/dist/client/assets/align-horizontal-justify-start-B4yzfVVA.js +0 -1
- package/dist/client/assets/align-horizontal-space-around-CiGa4Kap.js +0 -1
- package/dist/client/assets/align-horizontal-space-between-4oQxb09f.js +0 -1
- package/dist/client/assets/align-start-horizontal-b-QrQpp8.js +0 -1
- package/dist/client/assets/align-start-vertical-8YCYcxtN.js +0 -1
- package/dist/client/assets/align-vertical-distribute-center-bjcTAzC8.js +0 -1
- package/dist/client/assets/align-vertical-distribute-end-C8e3HRpZ.js +0 -1
- package/dist/client/assets/align-vertical-distribute-start-DpIRLHj_.js +0 -1
- package/dist/client/assets/align-vertical-justify-center-h3lkkiqz.js +0 -1
- package/dist/client/assets/align-vertical-justify-end-DtuuEE_x.js +0 -1
- package/dist/client/assets/align-vertical-justify-start-B9kFVQOB.js +0 -1
- package/dist/client/assets/align-vertical-space-around-BQ1u3E5Z.js +0 -1
- package/dist/client/assets/align-vertical-space-between-BG9LPTsN.js +0 -1
- package/dist/client/assets/ambulance-KDDmDUfq.js +0 -1
- package/dist/client/assets/ampersand-Bk-6p7XL.js +0 -1
- package/dist/client/assets/ampersands-BziKQASP.js +0 -1
- package/dist/client/assets/amphora-C23TLYmh.js +0 -1
- package/dist/client/assets/anchor-C38feyOM.js +0 -1
- package/dist/client/assets/angry-BmlyulG7.js +0 -1
- package/dist/client/assets/annoyed-L0c0Ysca.js +0 -1
- package/dist/client/assets/antenna-DXmujVwP.js +0 -1
- package/dist/client/assets/anvil-CgrbWRqb.js +0 -1
- package/dist/client/assets/aperture-BxfCrwOl.js +0 -1
- package/dist/client/assets/app-DfjVK7Za.js +0 -37
- package/dist/client/assets/app-DfjVK7Za.js.br +0 -0
- package/dist/client/assets/app-DfjVK7Za.js.gz +0 -0
- package/dist/client/assets/app-window-Cd1NkxcE.js +0 -1
- package/dist/client/assets/app-window-mac-DGUCE5Iy.js +0 -1
- package/dist/client/assets/apple-B9_e0oDa.js +0 -1
- package/dist/client/assets/architectureDiagram-5GKGNRK7-Bpq_IZxJ.js +0 -36
- package/dist/client/assets/architectureDiagram-5GKGNRK7-Bpq_IZxJ.js.br +0 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-Bpq_IZxJ.js.gz +0 -0
- package/dist/client/assets/archive-CHWPP9y2.js +0 -1
- package/dist/client/assets/archive-restore-yNP8wa93.js +0 -1
- package/dist/client/assets/archive-x-BXkL-dnk.js +0 -1
- package/dist/client/assets/armchair-DAXBrNt8.js +0 -1
- package/dist/client/assets/arrow-big-down-DG6xPU52.js +0 -1
- package/dist/client/assets/arrow-big-down-dash-a6UpV4N7.js +0 -1
- package/dist/client/assets/arrow-big-left-Dk1Tn-mo.js +0 -1
- package/dist/client/assets/arrow-big-left-dash-DmmLU7Ib.js +0 -1
- package/dist/client/assets/arrow-big-right-9THs67o8.js +0 -1
- package/dist/client/assets/arrow-big-right-dash-Beh-ztl1.js +0 -1
- package/dist/client/assets/arrow-big-up-DMzUS6Ib.js +0 -1
- package/dist/client/assets/arrow-big-up-dash-BQeREcbw.js +0 -1
- package/dist/client/assets/arrow-down-0-1-CvnmNVPH.js +0 -1
- package/dist/client/assets/arrow-down-1-0-CjjDATHn.js +0 -1
- package/dist/client/assets/arrow-down-D1On0UzE.js +0 -1
- package/dist/client/assets/arrow-down-from-line-rcgp1cRL.js +0 -1
- package/dist/client/assets/arrow-down-left-Bwl1Uy7a.js +0 -1
- package/dist/client/assets/arrow-down-narrow-wide-DygxTkBE.js +0 -1
- package/dist/client/assets/arrow-down-right-BMSZxZuW.js +0 -1
- package/dist/client/assets/arrow-down-to-dot-DWhTjNTj.js +0 -1
- package/dist/client/assets/arrow-down-to-line-B9AnMwF0.js +0 -1
- package/dist/client/assets/arrow-down-up-DiJ-5P87.js +0 -1
- package/dist/client/assets/arrow-down-wide-narrow-DmevkBrq.js +0 -1
- package/dist/client/assets/arrow-down-z-a-CAo9QScn.js +0 -1
- package/dist/client/assets/arrow-left-from-line-Bb1yUoOz.js +0 -1
- package/dist/client/assets/arrow-left-right-B_Z8Lula.js +0 -1
- package/dist/client/assets/arrow-left-to-line-Db_mK3na.js +0 -1
- package/dist/client/assets/arrow-right-from-line-BAiqBoBR.js +0 -1
- package/dist/client/assets/arrow-right-left-Ca6s0adF.js +0 -1
- package/dist/client/assets/arrow-right-to-line-D9RII9l3.js +0 -1
- package/dist/client/assets/arrow-up-0-1-COZD9pxX.js +0 -1
- package/dist/client/assets/arrow-up-1-0-BmBinkVV.js +0 -1
- package/dist/client/assets/arrow-up-a-z-DARo-Frz.js +0 -1
- package/dist/client/assets/arrow-up-down-D2sQAOmd.js +0 -1
- package/dist/client/assets/arrow-up-from-dot-0laYKeQA.js +0 -1
- package/dist/client/assets/arrow-up-from-line-eP4VE51v.js +0 -1
- package/dist/client/assets/arrow-up-left-CFWS75xi.js +0 -1
- package/dist/client/assets/arrow-up-narrow-wide-CohPVKSu.js +0 -1
- package/dist/client/assets/arrow-up-to-line-CSfRq1oX.js +0 -1
- package/dist/client/assets/arrow-up-wide-narrow-CxfPcvss.js +0 -1
- package/dist/client/assets/arrow-up-z-a-BKJks8bp.js +0 -1
- package/dist/client/assets/arrows-up-from-line-BfdDJrfe.js +0 -1
- package/dist/client/assets/asterisk-CL2ZIsr_.js +0 -1
- package/dist/client/assets/astroid-EyuTzEbm.js +0 -1
- package/dist/client/assets/atom-CLvns8_D.js +0 -1
- package/dist/client/assets/audio-lines-DgvywDl6.js +0 -1
- package/dist/client/assets/audio-waveform-BgPsxL4G.js +0 -1
- package/dist/client/assets/award-L5SShF7s.js +0 -1
- package/dist/client/assets/axe-CC4B2Cna.js +0 -1
- package/dist/client/assets/axis-3d-Br1qwWUv.js +0 -1
- package/dist/client/assets/baby-CcGvHfnw.js +0 -1
- package/dist/client/assets/backpack-BojRYN07.js +0 -1
- package/dist/client/assets/badge-B2r3eSij.js +0 -1
- package/dist/client/assets/badge-alert-BAxvyDB5.js +0 -1
- package/dist/client/assets/badge-cent-DJghI9dv.js +0 -1
- package/dist/client/assets/badge-check-WY6t19ub.js +0 -1
- package/dist/client/assets/badge-dollar-sign-DaKA8Ri0.js +0 -1
- package/dist/client/assets/badge-euro-D1v1vI57.js +0 -1
- package/dist/client/assets/badge-indian-rupee-DeB0Hag-.js +0 -1
- package/dist/client/assets/badge-info-CaKBFpEW.js +0 -1
- package/dist/client/assets/badge-japanese-yen-ylHP3JC4.js +0 -1
- package/dist/client/assets/badge-minus-B0SXcSd4.js +0 -1
- package/dist/client/assets/badge-percent-E-Fcrrq4.js +0 -1
- package/dist/client/assets/badge-plus-DB2S1LGJ.js +0 -1
- package/dist/client/assets/badge-pound-sterling-CsGHpCzE.js +0 -1
- package/dist/client/assets/badge-question-mark-DuawhWG3.js +0 -1
- package/dist/client/assets/badge-russian-ruble-DrjqE43X.js +0 -1
- package/dist/client/assets/badge-swiss-franc-Bcy8N9Kb.js +0 -1
- package/dist/client/assets/badge-turkish-lira-DXAWUVzj.js +0 -1
- package/dist/client/assets/badge-x-DCmBMQil.js +0 -1
- package/dist/client/assets/baggage-claim-DeeOkRfO.js +0 -1
- package/dist/client/assets/balloon-D8npcqgx.js +0 -1
- package/dist/client/assets/ban-R0mH0e10.js +0 -1
- package/dist/client/assets/banana-DGrWoU_w.js +0 -1
- package/dist/client/assets/bandage-C6ONoRAq.js +0 -1
- package/dist/client/assets/banknote-Cuzwqa7w.js +0 -1
- package/dist/client/assets/banknote-arrow-down-Da4l-QJ6.js +0 -1
- package/dist/client/assets/banknote-arrow-up-e8N1T6wH.js +0 -1
- package/dist/client/assets/banknote-x-DcWG4NP7.js +0 -1
- package/dist/client/assets/barcode-C7HMrS5l.js +0 -1
- package/dist/client/assets/barrel-Ckt_iufP.js +0 -1
- package/dist/client/assets/baseline-DuuIugXw.js +0 -1
- package/dist/client/assets/bath-Wt-u5JBT.js +0 -1
- package/dist/client/assets/battery-0RIrIqkk.js +0 -1
- package/dist/client/assets/battery-charging-DwJHWLMi.js +0 -1
- package/dist/client/assets/battery-full-tRHFl-zx.js +0 -1
- package/dist/client/assets/battery-low-DUYE36rK.js +0 -1
- package/dist/client/assets/battery-medium-9xyRDr89.js +0 -1
- package/dist/client/assets/battery-plus-TISmw2LR.js +0 -1
- package/dist/client/assets/battery-warning-ZO8yAwpC.js +0 -1
- package/dist/client/assets/beaker-DGuXFGGu.js +0 -1
- package/dist/client/assets/bean-BBUPnjP1.js +0 -1
- package/dist/client/assets/bean-off-3aL_5P8P.js +0 -1
- package/dist/client/assets/bed-double-Db_HDJWf.js +0 -1
- package/dist/client/assets/bed-mUl4l35k.js +0 -1
- package/dist/client/assets/bed-single-xy9Rvjv5.js +0 -1
- package/dist/client/assets/beef-B8RCHukd.js +0 -1
- package/dist/client/assets/beef-off-MwSzDuV7.js +0 -1
- package/dist/client/assets/beer-BzebzM8k.js +0 -1
- package/dist/client/assets/beer-off-CyylKYM8.js +0 -1
- package/dist/client/assets/bell-BbxOFY66.js +0 -1
- package/dist/client/assets/bell-check-DIXJwk40.js +0 -1
- package/dist/client/assets/bell-electric-D9RgUuup.js +0 -1
- package/dist/client/assets/bell-minus-CbdaaukZ.js +0 -1
- package/dist/client/assets/bell-off-CfHclXl3.js +0 -1
- package/dist/client/assets/bell-plus-Dij3TcLI.js +0 -1
- package/dist/client/assets/bell-ring-G-8I1pWU.js +0 -1
- package/dist/client/assets/between-horizontal-end-DV0J-1ge.js +0 -1
- package/dist/client/assets/between-horizontal-start-BrE6bP5A.js +0 -1
- package/dist/client/assets/between-vertical-end-C-b15L5a.js +0 -1
- package/dist/client/assets/between-vertical-start-PTL4SloT.js +0 -1
- package/dist/client/assets/biceps-flexed-CJnyzz8Z.js +0 -1
- package/dist/client/assets/bike-BSLtVOaK.js +0 -1
- package/dist/client/assets/binary-BCY-bj0w.js +0 -1
- package/dist/client/assets/binoculars-Bau8ATSt.js +0 -1
- package/dist/client/assets/biohazard-D1XwknNV.js +0 -1
- package/dist/client/assets/bird-Cg29d3gL.js +0 -1
- package/dist/client/assets/birdhouse-BGdrUAhL.js +0 -1
- package/dist/client/assets/bitcoin-UgWXaXEH.js +0 -1
- package/dist/client/assets/blend-nLTA3DU9.js +0 -1
- package/dist/client/assets/blender-D-VYQ_xe.js +0 -1
- package/dist/client/assets/blinds-BWyC5mvG.js +0 -1
- package/dist/client/assets/blockDiagram-I7D4REHJ-CgiDOCzS.js +0 -129
- package/dist/client/assets/blockDiagram-I7D4REHJ-CgiDOCzS.js.br +0 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-CgiDOCzS.js.gz +0 -0
- package/dist/client/assets/blocks-DsuZ8bia.js +0 -1
- package/dist/client/assets/bluetooth-Ch83cE8V.js +0 -1
- package/dist/client/assets/bluetooth-connected-d3DGuA6T.js +0 -1
- package/dist/client/assets/bluetooth-off-YVG74DN6.js +0 -1
- package/dist/client/assets/bluetooth-searching-C47gRRyC.js +0 -1
- package/dist/client/assets/bold-BjRrdkzB.js +0 -1
- package/dist/client/assets/bolt-DD0oUfwy.js +0 -1
- package/dist/client/assets/bomb-CDiXqFJR.js +0 -1
- package/dist/client/assets/bone-BM7q6SHS.js +0 -1
- package/dist/client/assets/book--K75CKPo.js +0 -1
- package/dist/client/assets/book-a-Nd08lT2p.js +0 -1
- package/dist/client/assets/book-alert-csmArP7o.js +0 -1
- package/dist/client/assets/book-audio-WrN_emQJ.js +0 -1
- package/dist/client/assets/book-check--PCsF-MP.js +0 -1
- package/dist/client/assets/book-copy-C1ruy9S1.js +0 -1
- package/dist/client/assets/book-dashed-BzNwnbIv.js +0 -1
- package/dist/client/assets/book-down-CSHchKR1.js +0 -1
- package/dist/client/assets/book-headphones--s3Um2hw.js +0 -1
- package/dist/client/assets/book-heart-w_E6Psxw.js +0 -1
- package/dist/client/assets/book-image-CUecwApc.js +0 -1
- package/dist/client/assets/book-key--xbaehHz.js +0 -1
- package/dist/client/assets/book-lock-DIJbOY40.js +0 -1
- package/dist/client/assets/book-marked-CdSH3mqB.js +0 -1
- package/dist/client/assets/book-minus-CIqtbvbd.js +0 -1
- package/dist/client/assets/book-open-B_x2HUEY.js +0 -1
- package/dist/client/assets/book-open-check-DeeGNBd3.js +0 -1
- package/dist/client/assets/book-open-text-Bx7erhFv.js +0 -1
- package/dist/client/assets/book-plus-CEe_exzl.js +0 -1
- package/dist/client/assets/book-search-BidPn-t2.js +0 -1
- package/dist/client/assets/book-text-De--TLWT.js +0 -1
- package/dist/client/assets/book-type-CMZuiK_T.js +0 -1
- package/dist/client/assets/book-up-2-CQKq72mV.js +0 -1
- package/dist/client/assets/book-up-DsLpYxl6.js +0 -1
- package/dist/client/assets/book-user-BgUggXXY.js +0 -1
- package/dist/client/assets/book-x-QsZXFRdP.js +0 -1
- package/dist/client/assets/bookmark-Crao4vCh.js +0 -1
- package/dist/client/assets/bookmark-check-CraBrHWV.js +0 -1
- package/dist/client/assets/bookmark-minus-Dd61cJ8_.js +0 -1
- package/dist/client/assets/bookmark-off-D7N4cjBa.js +0 -1
- package/dist/client/assets/bookmark-plus-DTvfJRIS.js +0 -1
- package/dist/client/assets/bookmark-x-Dmc04kc3.js +0 -1
- package/dist/client/assets/boom-box-DbxHYrVk.js +0 -1
- package/dist/client/assets/bot-message-square-DfixdZkh.js +0 -1
- package/dist/client/assets/bot-off-KpHwIpYK.js +0 -1
- package/dist/client/assets/bottle-wine-DafLBYmQ.js +0 -1
- package/dist/client/assets/bow-arrow-BHUW_Opp.js +0 -1
- package/dist/client/assets/boxes--mK5pPyc.js +0 -1
- package/dist/client/assets/braces-1P4hY3Zn.js +0 -1
- package/dist/client/assets/brackets-D4L-X16Y.js +0 -1
- package/dist/client/assets/brain-DBVzqZJv.js +0 -1
- package/dist/client/assets/brain-circuit-CYjU0o1D.js +0 -1
- package/dist/client/assets/brain-cog-D7JFVGwE.js +0 -1
- package/dist/client/assets/brain-cog-D7JFVGwE.js.br +0 -0
- package/dist/client/assets/brain-cog-D7JFVGwE.js.gz +0 -0
- package/dist/client/assets/brick-wall-DxYfqWU1.js +0 -1
- package/dist/client/assets/brick-wall-fire-ClNq2vTN.js +0 -1
- package/dist/client/assets/brick-wall-shield-DtaY5Rt4.js +0 -1
- package/dist/client/assets/briefcase-business-DwNE-n3s.js +0 -1
- package/dist/client/assets/briefcase-conveyor-belt-DEnft4Ae.js +0 -1
- package/dist/client/assets/briefcase-medical-k_Gn7rJo.js +0 -1
- package/dist/client/assets/bring-to-front-Cs7sYS9_.js +0 -1
- package/dist/client/assets/broccoli-Pr3eatua.js +0 -1
- package/dist/client/assets/brush-Ca2mFNL0.js +0 -1
- package/dist/client/assets/brush-cleaning-jGql5odt.js +0 -1
- package/dist/client/assets/bubbles-BJjDBcqG.js +0 -1
- package/dist/client/assets/bug-CrWwf6Is.js +0 -1
- package/dist/client/assets/bug-off-3ITXNYqA.js +0 -1
- package/dist/client/assets/bug-play-B5FkfnVS.js +0 -1
- package/dist/client/assets/building-2-Bt41atZi.js +0 -1
- package/dist/client/assets/building-CL8ch6ZX.js +0 -1
- package/dist/client/assets/bus-Dq3KHsbp.js +0 -1
- package/dist/client/assets/bus-front-DcgvWF7F.js +0 -1
- package/dist/client/assets/c4Diagram-7LVT6UL2-BUMQ9N2g.js +0 -38
- package/dist/client/assets/c4Diagram-7LVT6UL2-BUMQ9N2g.js.br +0 -0
- package/dist/client/assets/c4Diagram-7LVT6UL2-BUMQ9N2g.js.gz +0 -0
- package/dist/client/assets/cable-TUECvDfm.js +0 -1
- package/dist/client/assets/cable-car-DZfRf_6-.js +0 -1
- package/dist/client/assets/cake-CqSG52zC.js +0 -1
- package/dist/client/assets/cake-slice-Wk7GFg6e.js +0 -1
- package/dist/client/assets/calculator-CI9al-Pg.js +0 -1
- package/dist/client/assets/calendar-1-DMqFrgXW.js +0 -1
- package/dist/client/assets/calendar-arrow-down-DhTqmV6t.js +0 -1
- package/dist/client/assets/calendar-arrow-up-CsbR_Az4.js +0 -1
- package/dist/client/assets/calendar-check-2-DkRMaAJ3.js +0 -1
- package/dist/client/assets/calendar-check-DUKMNZGa.js +0 -1
- package/dist/client/assets/calendar-clock-BI2r2MFB.js +0 -1
- package/dist/client/assets/calendar-cog-CfPbKLEz.js +0 -1
- package/dist/client/assets/calendar-days-BVCBJJst.js +0 -1
- package/dist/client/assets/calendar-fold-CM3_3sMw.js +0 -1
- package/dist/client/assets/calendar-heart-CLrlaADq.js +0 -1
- package/dist/client/assets/calendar-kkmueROQ.js +0 -1
- package/dist/client/assets/calendar-minus-2-BKhL-cjH.js +0 -1
- package/dist/client/assets/calendar-minus-J5RaeWlq.js +0 -1
- package/dist/client/assets/calendar-off-ZwqTJLsK.js +0 -1
- package/dist/client/assets/calendar-plus-2-CIVwY0tO.js +0 -1
- package/dist/client/assets/calendar-plus-CV7YgF6_.js +0 -1
- package/dist/client/assets/calendar-range-YARXaO6t.js +0 -1
- package/dist/client/assets/calendar-search-CVJqIiav.js +0 -1
- package/dist/client/assets/calendar-sync-CISsTz_C.js +0 -1
- package/dist/client/assets/calendar-x-2-BD9qudpC.js +0 -1
- package/dist/client/assets/calendar-x-BxW537r5.js +0 -1
- package/dist/client/assets/calendars-C4LcV605.js +0 -1
- package/dist/client/assets/camera-CwDDYsaZ.js +0 -1
- package/dist/client/assets/camera-off-EXhW8OmY.js +0 -1
- package/dist/client/assets/candy-cL10b1tp.js +0 -1
- package/dist/client/assets/candy-cane-Dtk3jrpr.js +0 -1
- package/dist/client/assets/candy-off-B3VDVfpP.js +0 -1
- package/dist/client/assets/cannabis-Ci7vxwSe.js +0 -1
- package/dist/client/assets/cannabis-off-BhjnrASB.js +0 -1
- package/dist/client/assets/captions-B1dZ7RB6.js +0 -1
- package/dist/client/assets/captions-off-B2FpD1kw.js +0 -1
- package/dist/client/assets/car-CBkKc2NP.js +0 -1
- package/dist/client/assets/car-front-C-dWBT_M.js +0 -1
- package/dist/client/assets/car-taxi-front-C2BqEAOR.js +0 -1
- package/dist/client/assets/caravan-BMF65HZR.js +0 -1
- package/dist/client/assets/card-sim-BHuS5Pen.js +0 -1
- package/dist/client/assets/carrot-D38fAnDy.js +0 -1
- package/dist/client/assets/case-lower-BeShgSLD.js +0 -1
- package/dist/client/assets/case-sensitive-C4mcHfnp.js +0 -1
- package/dist/client/assets/case-upper-DSwT_yuN.js +0 -1
- package/dist/client/assets/cassette-tape-CRzCRjUp.js +0 -1
- package/dist/client/assets/cast-CIz8g_Lu.js +0 -1
- package/dist/client/assets/castle-Das-AUKm.js +0 -1
- package/dist/client/assets/cat-Cp4nTPtX.js +0 -1
- package/dist/client/assets/cctv-ChMi-WPQ.js +0 -1
- package/dist/client/assets/cctv-off-BqRpvFEI.js +0 -1
- package/dist/client/assets/channel-CIUXsg8J.js +0 -1
- package/dist/client/assets/chart-area-SLg573N_.js +0 -1
- package/dist/client/assets/chart-bar-Nn_9_xll.js +0 -1
- package/dist/client/assets/chart-bar-big-81i7aiAU.js +0 -1
- package/dist/client/assets/chart-bar-decreasing-Calnmevw.js +0 -1
- package/dist/client/assets/chart-bar-increasing-BYB2DuYq.js +0 -1
- package/dist/client/assets/chart-bar-stacked-CJHJPliY.js +0 -1
- package/dist/client/assets/chart-candlestick-zWb8rRaM.js +0 -1
- package/dist/client/assets/chart-column-big-BLw2ymOx.js +0 -1
- package/dist/client/assets/chart-column-decreasing-CQEPSIcp.js +0 -1
- package/dist/client/assets/chart-column-increasing-ClWpTdmL.js +0 -1
- package/dist/client/assets/chart-column-stacked-CC41p9W4.js +0 -1
- package/dist/client/assets/chart-column-u-b0fI21.js +0 -1
- package/dist/client/assets/chart-gantt-ctCwnaTe.js +0 -1
- package/dist/client/assets/chart-line-BMkzGcg9.js +0 -1
- package/dist/client/assets/chart-network-CXZibzyO.js +0 -1
- package/dist/client/assets/chart-no-axes-column-BgMrlCjh.js +0 -1
- package/dist/client/assets/chart-no-axes-column-decreasing-Bl5-plsV.js +0 -1
- package/dist/client/assets/chart-no-axes-column-increasing-D8lZMNNJ.js +0 -1
- package/dist/client/assets/chart-no-axes-combined-CvHqoppw.js +0 -1
- package/dist/client/assets/chart-no-axes-gantt-CjNbHNiH.js +0 -1
- package/dist/client/assets/chart-pie-CmOEgqoj.js +0 -1
- package/dist/client/assets/chart-scatter-04SA-stj.js +0 -1
- package/dist/client/assets/chart-spline-BhRwkDoL.js +0 -1
- package/dist/client/assets/check-check-Cbhc09R9.js +0 -1
- package/dist/client/assets/check-line-MzRliNaH.js +0 -1
- package/dist/client/assets/chef-hat-CzguPMki.js +0 -1
- package/dist/client/assets/cherry-O4Ay76do.js +0 -1
- package/dist/client/assets/chess-bishop-CZ_1_CKO.js +0 -1
- package/dist/client/assets/chess-king-CmOnkHYa.js +0 -1
- package/dist/client/assets/chess-knight-DBFiAHE7.js +0 -1
- package/dist/client/assets/chess-pawn-DGz6DxEO.js +0 -1
- package/dist/client/assets/chess-queen-TFV7x9Xr.js +0 -1
- package/dist/client/assets/chess-rook-CQSTEa_L.js +0 -1
- package/dist/client/assets/chevron-first-DkcZyo1v.js +0 -1
- package/dist/client/assets/chevron-last-ChBsZzl4.js +0 -1
- package/dist/client/assets/chevron-left-CTRaTn33.js +0 -1
- package/dist/client/assets/chevrons-down-8JkbS1pg.js +0 -1
- package/dist/client/assets/chevrons-down-up-CBdFU4Tt.js +0 -1
- package/dist/client/assets/chevrons-left-DWwmwmHp.js +0 -1
- package/dist/client/assets/chevrons-left-right-D66lWwPf.js +0 -1
- package/dist/client/assets/chevrons-left-right-ellipsis-DIhZ2fNL.js +0 -1
- package/dist/client/assets/chevrons-right-CpDFuozg.js +0 -1
- package/dist/client/assets/chevrons-right-left-Bi7NSJZd.js +0 -1
- package/dist/client/assets/chevrons-up-B37tIHyq.js +0 -1
- package/dist/client/assets/chevrons-up-down-COsSaBtR.js +0 -1
- package/dist/client/assets/chunk-2Q5K7J3B-Dt34XYDV.js +0 -1
- package/dist/client/assets/chunk-5VM5RSS4-CLqbKwcU.js +0 -15
- package/dist/client/assets/chunk-F27PBJKO-Bm43F3L2.js +0 -1
- package/dist/client/assets/chunk-F27PBJKO-Bm43F3L2.js.br +0 -0
- package/dist/client/assets/chunk-F27PBJKO-Bm43F3L2.js.gz +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-DWHnvb1F.js +0 -231
- package/dist/client/assets/chunk-IMKFNOWR-DWHnvb1F.js.br +0 -0
- package/dist/client/assets/chunk-IMKFNOWR-DWHnvb1F.js.gz +0 -0
- package/dist/client/assets/chunk-JWPE2WC7-Fr301Hyn.js +0 -1
- package/dist/client/assets/chunk-POPQ4Y6H-CO1-VIkZ.js +0 -1
- package/dist/client/assets/chunk-SVP7TREG-Mb9u6vnO.js +0 -88
- package/dist/client/assets/chunk-SVP7TREG-Mb9u6vnO.js.br +0 -0
- package/dist/client/assets/chunk-SVP7TREG-Mb9u6vnO.js.gz +0 -0
- package/dist/client/assets/chunk-TICWLB2K-DrMJZ51H.js +0 -206
- package/dist/client/assets/chunk-TICWLB2K-DrMJZ51H.js.br +0 -0
- package/dist/client/assets/chunk-TICWLB2K-DrMJZ51H.js.gz +0 -0
- package/dist/client/assets/chunk-XXDRQBXY-C7Ru-I-m.js +0 -1
- package/dist/client/assets/church-BTGvep-T.js +0 -1
- package/dist/client/assets/cigarette-BW4hvSuH.js +0 -1
- package/dist/client/assets/cigarette-off-KZPk_-a6.js +0 -1
- package/dist/client/assets/circle-D1vNk4ua.js +0 -1
- package/dist/client/assets/circle-arrow-down-DdGvFmZ1.js +0 -1
- package/dist/client/assets/circle-arrow-left-_y9ch_bS.js +0 -1
- package/dist/client/assets/circle-arrow-out-down-left-Du_edGPN.js +0 -1
- package/dist/client/assets/circle-arrow-out-down-right-DDyXPMs5.js +0 -1
- package/dist/client/assets/circle-arrow-out-up-left-C09Wykwt.js +0 -1
- package/dist/client/assets/circle-arrow-out-up-right-YZTDTgNv.js +0 -1
- package/dist/client/assets/circle-arrow-right-a2rYLZAW.js +0 -1
- package/dist/client/assets/circle-arrow-up-pI3mTj1O.js +0 -1
- package/dist/client/assets/circle-check-big-Dxjfo1qI.js +0 -1
- package/dist/client/assets/circle-chevron-down-DuwHRDBu.js +0 -1
- package/dist/client/assets/circle-chevron-left-A_aOHzS9.js +0 -1
- package/dist/client/assets/circle-chevron-right-C7LKP42S.js +0 -1
- package/dist/client/assets/circle-chevron-up-CE2WWNv4.js +0 -1
- package/dist/client/assets/circle-dashed-L2uwUgMo.js +0 -1
- package/dist/client/assets/circle-divide-DDMReN46.js +0 -1
- package/dist/client/assets/circle-dollar-sign-o-67YY2y.js +0 -1
- package/dist/client/assets/circle-dot-0RP-6ACr.js +0 -1
- package/dist/client/assets/circle-dot-dashed-57o2hgkY.js +0 -1
- package/dist/client/assets/circle-ellipsis-DxXjKE6j.js +0 -1
- package/dist/client/assets/circle-equal-ByR9s2-p.js +0 -1
- package/dist/client/assets/circle-fading-arrow-up-Hq9WTyBA.js +0 -1
- package/dist/client/assets/circle-fading-plus-D7r_BlUG.js +0 -1
- package/dist/client/assets/circle-gauge-Cv5YYTrw.js +0 -1
- package/dist/client/assets/circle-minus-qJp8Zuu8.js +0 -1
- package/dist/client/assets/circle-off-De6uVA_R.js +0 -1
- package/dist/client/assets/circle-parking-off-BkiCcRHP.js +0 -1
- package/dist/client/assets/circle-parking-x3UvmOi4.js +0 -1
- package/dist/client/assets/circle-pause-CELh4fXO.js +0 -1
- package/dist/client/assets/circle-percent-BIu_vTBX.js +0 -1
- package/dist/client/assets/circle-pile-LK9Jdngl.js +0 -1
- package/dist/client/assets/circle-play-C-3OAoSb.js +0 -1
- package/dist/client/assets/circle-plus-zy3T-cXh.js +0 -1
- package/dist/client/assets/circle-pound-sterling-D221nANV.js +0 -1
- package/dist/client/assets/circle-power-BwKg0TXq.js +0 -1
- package/dist/client/assets/circle-question-mark-B-AFYXq9.js +0 -1
- package/dist/client/assets/circle-slash-2-BDdTZcpb.js +0 -1
- package/dist/client/assets/circle-slash-C2pWZqmH.js +0 -1
- package/dist/client/assets/circle-small-CYsqPVyW.js +0 -1
- package/dist/client/assets/circle-star-C2JrX_tz.js +0 -1
- package/dist/client/assets/circle-stop-DZTEmgbB.js +0 -1
- package/dist/client/assets/circle-user-DAilxZRy.js +0 -1
- package/dist/client/assets/circle-user-round-BRyTRRkR.js +0 -1
- package/dist/client/assets/circle-x-Bmfpb-UY.js +0 -1
- package/dist/client/assets/circuit-board-qxkkF-Pv.js +0 -1
- package/dist/client/assets/citrus-BqDRan3J.js +0 -1
- package/dist/client/assets/clapperboard-DLpBnJlp.js +0 -1
- package/dist/client/assets/classDiagram-ZZMXUADV-BVj-SsmP.js +0 -1
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BVj-SsmP.js +0 -1
- package/dist/client/assets/clipboard-DthI8uui.js +0 -1
- package/dist/client/assets/clipboard-check-CV4ziXTR.js +0 -1
- package/dist/client/assets/clipboard-clock-B9i1IqQd.js +0 -1
- package/dist/client/assets/clipboard-copy-BrPYScGi.js +0 -1
- package/dist/client/assets/clipboard-list-B7-O4Z_y.js +0 -1
- package/dist/client/assets/clipboard-minus-BP-GYnAx.js +0 -1
- package/dist/client/assets/clipboard-paste-Vu0yNqwi.js +0 -1
- package/dist/client/assets/clipboard-pen-line-DOYZrip5.js +0 -1
- package/dist/client/assets/clipboard-pen-xkSt4tkN.js +0 -1
- package/dist/client/assets/clipboard-plus-BXdrmGeC.js +0 -1
- package/dist/client/assets/clipboard-type-Wk3XzSTv.js +0 -1
- package/dist/client/assets/clipboard-x-5WvtwbuW.js +0 -1
- package/dist/client/assets/clock-1-ygKmW-T3.js +0 -1
- package/dist/client/assets/clock-10-DWCnNgXN.js +0 -1
- package/dist/client/assets/clock-11-CBTSzUr8.js +0 -1
- package/dist/client/assets/clock-12-KsD2IfeA.js +0 -1
- package/dist/client/assets/clock-2-CsCG8w1y.js +0 -1
- package/dist/client/assets/clock-4-BKfiBYAN.js +0 -1
- package/dist/client/assets/clock-5-CPD86ZrL.js +0 -1
- package/dist/client/assets/clock-6-DFEC9Qbq.js +0 -1
- package/dist/client/assets/clock-7-D0LLua4v.js +0 -1
- package/dist/client/assets/clock-8-D3ZAD5Ta.js +0 -1
- package/dist/client/assets/clock-9-yX9U6usA.js +0 -1
- package/dist/client/assets/clock-Df2fKH22.js +0 -1
- package/dist/client/assets/clock-alert-9Zzf_-yc.js +0 -1
- package/dist/client/assets/clock-arrow-down-DhufbW3N.js +0 -1
- package/dist/client/assets/clock-arrow-up-BZpTdVX9.js +0 -1
- package/dist/client/assets/clock-check-B72fN4fs.js +0 -1
- package/dist/client/assets/clock-fading-CwC3Fgne.js +0 -1
- package/dist/client/assets/clock-plus-CUYBqtDM.js +0 -1
- package/dist/client/assets/closed-caption-BMQoih7J.js +0 -1
- package/dist/client/assets/cloud-DuGRNi3a.js +0 -1
- package/dist/client/assets/cloud-alert-CdunJPC6.js +0 -1
- package/dist/client/assets/cloud-backup-DitTmzOP.js +0 -1
- package/dist/client/assets/cloud-check-CjyjlvN9.js +0 -1
- package/dist/client/assets/cloud-cog-ifPZlOH3.js +0 -1
- package/dist/client/assets/cloud-download-Dx839CkA.js +0 -1
- package/dist/client/assets/cloud-drizzle-D6pAzLq_.js +0 -1
- package/dist/client/assets/cloud-fog-DH1NiRoo.js +0 -1
- package/dist/client/assets/cloud-hail-DFzJrwb3.js +0 -1
- package/dist/client/assets/cloud-lightning-C3ZqT1yl.js +0 -1
- package/dist/client/assets/cloud-moon-CYpismvW.js +0 -1
- package/dist/client/assets/cloud-moon-rain-dZmU16ng.js +0 -1
- package/dist/client/assets/cloud-off-CepPOYWx.js +0 -1
- package/dist/client/assets/cloud-rain-Dvs1GF2f.js +0 -1
- package/dist/client/assets/cloud-rain-wind-Dxn1H0dr.js +0 -1
- package/dist/client/assets/cloud-snow-Ba70km9u.js +0 -1
- package/dist/client/assets/cloud-sun-D2TxNrgi.js +0 -1
- package/dist/client/assets/cloud-sun-rain-BsMQnnZa.js +0 -1
- package/dist/client/assets/cloud-sync-CoGuNDGu.js +0 -1
- package/dist/client/assets/cloud-upload-hbjVsc6Z.js +0 -1
- package/dist/client/assets/cloudy-UqgYdg4s.js +0 -1
- package/dist/client/assets/clover-BW4KfpLR.js +0 -1
- package/dist/client/assets/club-B8UJ6byF.js +0 -1
- package/dist/client/assets/code-c6X-SPJl.js +0 -1
- package/dist/client/assets/coffee-Ck8nHw_h.js +0 -1
- package/dist/client/assets/cog-BcMsFAyv.js +0 -1
- package/dist/client/assets/coins-D3j-kZCS.js +0 -1
- package/dist/client/assets/columns-3-N_-h1sEM.js +0 -1
- package/dist/client/assets/columns-3-cog-BkKETYIO.js +0 -1
- package/dist/client/assets/columns-4-y-lGoVv6.js +0 -1
- package/dist/client/assets/combine-BDSOJSLF.js +0 -1
- package/dist/client/assets/command-D3cUrWHA.js +0 -1
- package/dist/client/assets/compass-Dh8hzblc.js +0 -1
- package/dist/client/assets/component-CE9-IItF.js +0 -1
- package/dist/client/assets/computer-pvL-VrU0.js +0 -1
- package/dist/client/assets/concierge-bell-C6SmNTYc.js +0 -1
- package/dist/client/assets/cone-CMoQ26YM.js +0 -1
- package/dist/client/assets/construction-2sUBT3Vt.js +0 -1
- package/dist/client/assets/contact-CYI1KOs6.js +0 -1
- package/dist/client/assets/contact-round-D46QJNZV.js +0 -1
- package/dist/client/assets/container-BnCT78dA.js +0 -1
- package/dist/client/assets/contrast-BNpOGBs6.js +0 -1
- package/dist/client/assets/cookie-CvxwnyDK.js +0 -1
- package/dist/client/assets/cooking-pot-BSi9ch3P.js +0 -1
- package/dist/client/assets/copy-check-CvfPsQBE.js +0 -1
- package/dist/client/assets/copy-minus-JSaYk3oe.js +0 -1
- package/dist/client/assets/copy-plus-DfbRnYi2.js +0 -1
- package/dist/client/assets/copy-slash-CoAKSuJZ.js +0 -1
- package/dist/client/assets/copy-x-C45MxQly.js +0 -1
- package/dist/client/assets/copyleft-DV3nrOpd.js +0 -1
- package/dist/client/assets/copyright---yc3ipC.js +0 -1
- package/dist/client/assets/corner-down-left-sebEp4JW.js +0 -1
- package/dist/client/assets/corner-left-down-f7eExhrx.js +0 -1
- package/dist/client/assets/corner-left-up-CMt8eKQd.js +0 -1
- package/dist/client/assets/corner-right-down-CWv6BKzr.js +0 -1
- package/dist/client/assets/corner-right-up-Bew_i0BO.js +0 -1
- package/dist/client/assets/corner-up-right-CmsIol20.js +0 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-CG9QZHjl.js +0 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-CG9QZHjl.js.br +0 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-CG9QZHjl.js.gz +0 -0
- package/dist/client/assets/cpu-DU8jf3E7.js +0 -1
- package/dist/client/assets/creative-commons-BIo55U00.js +0 -1
- package/dist/client/assets/credit-card-fn_aevdi.js +0 -1
- package/dist/client/assets/croissant-Dg7IEjH4.js +0 -1
- package/dist/client/assets/crop-DrnKHbgk.js +0 -1
- package/dist/client/assets/cross-ByVtfJWl.js +0 -1
- package/dist/client/assets/crosshair-B2FC51pL.js +0 -1
- package/dist/client/assets/crown-60nw-8OW.js +0 -1
- package/dist/client/assets/cuboid-dA0YIWQh.js +0 -1
- package/dist/client/assets/cup-soda-CNVGyD5o.js +0 -1
- package/dist/client/assets/currency-Dw6ZOKuH.js +0 -1
- package/dist/client/assets/cylinder-lBQhcbJi.js +0 -1
- package/dist/client/assets/cynefin-OW5HDTMX-DbOZ9-C4.js +0 -166
- package/dist/client/assets/cynefin-OW5HDTMX-DbOZ9-C4.js.br +0 -0
- package/dist/client/assets/cynefin-OW5HDTMX-DbOZ9-C4.js.gz +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Y-vhgH-h.js +0 -62
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Y-vhgH-h.js.br +0 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-Y-vhgH-h.js.gz +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-BN_sUAPa.js +0 -4
- package/dist/client/assets/dagre-GXQ25YYZ-BN_sUAPa.js.br +0 -0
- package/dist/client/assets/dagre-GXQ25YYZ-BN_sUAPa.js.gz +0 -0
- package/dist/client/assets/dam-BvMAgsIX.js +0 -1
- package/dist/client/assets/database-BD2pn3Cy.js +0 -1
- package/dist/client/assets/database-backup-Mw_vb1wE.js +0 -1
- package/dist/client/assets/database-search-EE26l9_W.js +0 -1
- package/dist/client/assets/database-zap-Dpr--my9.js +0 -1
- package/dist/client/assets/decimals-arrow-left-JHTf_4vc.js +0 -1
- package/dist/client/assets/decimals-arrow-right-BvDYDm6Y.js +0 -1
- package/dist/client/assets/delete-Dy540nWp.js +0 -1
- package/dist/client/assets/dessert-BOXGbj0n.js +0 -1
- package/dist/client/assets/diagram-S7CK7UJ4-BW0Y2FqT.js +0 -30
- package/dist/client/assets/diagram-S7CK7UJ4-BW0Y2FqT.js.br +0 -0
- package/dist/client/assets/diagram-S7CK7UJ4-BW0Y2FqT.js.gz +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-BqN-cKCW.js +0 -41
- package/dist/client/assets/diagram-UQ7AKVKN-BqN-cKCW.js.br +0 -0
- package/dist/client/assets/diagram-UQ7AKVKN-BqN-cKCW.js.gz +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-UZQgUhuW.js +0 -3
- package/dist/client/assets/diagram-VSXAHHWV-UZQgUhuW.js.br +0 -0
- package/dist/client/assets/diagram-VSXAHHWV-UZQgUhuW.js.gz +0 -0
- package/dist/client/assets/diagram-VX7I27RA-ZknQgJ1U.js +0 -24
- package/dist/client/assets/diagram-VX7I27RA-ZknQgJ1U.js.br +0 -0
- package/dist/client/assets/diagram-VX7I27RA-ZknQgJ1U.js.gz +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-DSMcXX8Q.js +0 -24
- package/dist/client/assets/diagram-Z3DM3KII-DSMcXX8Q.js.br +0 -0
- package/dist/client/assets/diagram-Z3DM3KII-DSMcXX8Q.js.gz +0 -0
- package/dist/client/assets/diameter-BmSWfhUf.js +0 -1
- package/dist/client/assets/diamond-CGkrVkHD.js +0 -1
- package/dist/client/assets/diamond-minus-Bc3SE2Q6.js +0 -1
- package/dist/client/assets/diamond-percent-B-cKJthC.js +0 -1
- package/dist/client/assets/diamond-plus-m3k-RJad.js +0 -1
- package/dist/client/assets/dice-1-BdVMZmWC.js +0 -1
- package/dist/client/assets/dice-2-DkgXOqsg.js +0 -1
- package/dist/client/assets/dice-3-fZ_JtjSt.js +0 -1
- package/dist/client/assets/dice-4-kYS_6xXt.js +0 -1
- package/dist/client/assets/dice-5-pRfyrOtx.js +0 -1
- package/dist/client/assets/dice-6-8ore5NpE.js +0 -1
- package/dist/client/assets/dices-By19uBdM.js +0 -1
- package/dist/client/assets/diff-DYi7OUqK.js +0 -1
- package/dist/client/assets/disc-2-BPUFfRlC.js +0 -1
- package/dist/client/assets/disc-3-BlwZuCV2.js +0 -1
- package/dist/client/assets/disc-MLi0_zn7.js +0 -1
- package/dist/client/assets/disc-album-BGI_kISb.js +0 -1
- package/dist/client/assets/divide-kadXzuxF.js +0 -1
- package/dist/client/assets/dna-off-DzR9paXU.js +0 -1
- package/dist/client/assets/dna-xMXm8Z3i.js +0 -1
- package/dist/client/assets/dock-Clq5sRkm.js +0 -1
- package/dist/client/assets/dog-BYWYIekT.js +0 -1
- package/dist/client/assets/dollar-sign-CpL58kFB.js +0 -1
- package/dist/client/assets/donut-BhGIlDUF.js +0 -1
- package/dist/client/assets/door-closed-locked-iDeNxZt4.js +0 -1
- package/dist/client/assets/door-closed-romxvIol.js +0 -1
- package/dist/client/assets/door-open-B4XJdsnk.js +0 -1
- package/dist/client/assets/dot-CH2ouMTV.js +0 -1
- package/dist/client/assets/drafting-compass-BEtYpOeF.js +0 -1
- package/dist/client/assets/drama-ChlNNkkX.js +0 -1
- package/dist/client/assets/drill-BpCIR9vt.js +0 -1
- package/dist/client/assets/drone-C9L2Q3Ed.js +0 -1
- package/dist/client/assets/droplet--GnfYgNY.js +0 -1
- package/dist/client/assets/droplet-off-CLanJ5bC.js +0 -1
- package/dist/client/assets/droplets-DCDq6K9J.js +0 -1
- package/dist/client/assets/drum-C916x9-x.js +0 -1
- package/dist/client/assets/drumstick-Dag7h1GT.js +0 -1
- package/dist/client/assets/dumbbell-jYNuA3mL.js +0 -1
- package/dist/client/assets/ear-C1j5BuJL.js +0 -1
- package/dist/client/assets/ear-off-BWBwmh_z.js +0 -1
- package/dist/client/assets/earth-RClzKGj3.js +0 -1
- package/dist/client/assets/earth-lock-ujqSSfqz.js +0 -1
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Jo86Sa8n.js +0 -1
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Jo86Sa8n.js.br +0 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Jo86Sa8n.js.gz +0 -0
- package/dist/client/assets/eclipse-Detr-tai.js +0 -1
- package/dist/client/assets/egg-CCwI87Lb.js +0 -1
- package/dist/client/assets/egg-fried-B-o2Itwb.js +0 -1
- package/dist/client/assets/egg-off-D1b9NRXg.js +0 -1
- package/dist/client/assets/ellipse-C3p6Rsdn.js +0 -1
- package/dist/client/assets/ellipsis-vertical-DgY_lD4q.js +0 -1
- package/dist/client/assets/equal-DwUXqHWS.js +0 -1
- package/dist/client/assets/equal-approximately-B7spPenX.js +0 -1
- package/dist/client/assets/equal-not-EKlATqmi.js +0 -1
- package/dist/client/assets/erDiagram-RLTQ6QDP-rQG8Um2y.js +0 -99
- package/dist/client/assets/erDiagram-RLTQ6QDP-rQG8Um2y.js.br +0 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-rQG8Um2y.js.gz +0 -0
- package/dist/client/assets/eraser-OV7-9FGe.js +0 -1
- package/dist/client/assets/ethernet-port-CgmQEqLm.js +0 -1
- package/dist/client/assets/euro-DXIR1tqk.js +0 -1
- package/dist/client/assets/ev-charger-C4QaR5e5.js +0 -1
- package/dist/client/assets/expand-CYKoSbPv.js +0 -1
- package/dist/client/assets/external-link-p4LXonZX.js +0 -1
- package/dist/client/assets/eye-CevWkklg.js +0 -1
- package/dist/client/assets/eye-closed-Jwts2szp.js +0 -1
- package/dist/client/assets/eye-off-B--ydjL4.js +0 -1
- package/dist/client/assets/factory-DGrApajb.js +0 -1
- package/dist/client/assets/fan-B3Xt_WjG.js +0 -1
- package/dist/client/assets/fast-forward-BZ5vV2bC.js +0 -1
- package/dist/client/assets/feather-Cc05rHqw.js +0 -1
- package/dist/client/assets/fence-CDL3MY4R.js +0 -1
- package/dist/client/assets/ferris-wheel-DjuEbzJM.js +0 -1
- package/dist/client/assets/file-archive-CJsglJKV.js +0 -1
- package/dist/client/assets/file-axis-3d-BAVGM15I.js +0 -1
- package/dist/client/assets/file-badge-62Cn1Xaq.js +0 -1
- package/dist/client/assets/file-box-BT3cNDa8.js +0 -1
- package/dist/client/assets/file-braces-CkOxXp0l.js +0 -1
- package/dist/client/assets/file-braces-corner-D0LiERrG.js +0 -1
- package/dist/client/assets/file-chart-column-C3Yz6UGv.js +0 -1
- package/dist/client/assets/file-chart-column-increasing-M38QIJjX.js +0 -1
- package/dist/client/assets/file-chart-line-CBiWLxVr.js +0 -1
- package/dist/client/assets/file-chart-pie-mYTWisO9.js +0 -1
- package/dist/client/assets/file-check-CZ0KtEe0.js +0 -1
- package/dist/client/assets/file-check-corner-DQgo2LtQ.js +0 -1
- package/dist/client/assets/file-clock-zxVLYIAS.js +0 -1
- package/dist/client/assets/file-code-corner-BQllxnhl.js +0 -1
- package/dist/client/assets/file-cog-Bg4rPmfH.js +0 -1
- package/dist/client/assets/file-diff--utWaKL6.js +0 -1
- package/dist/client/assets/file-digit-Bj40wsK-.js +0 -1
- package/dist/client/assets/file-down-CsojZ_UD.js +0 -1
- package/dist/client/assets/file-exclamation-point-BCD4jFO7.js +0 -1
- package/dist/client/assets/file-headphone-BkkTwyJH.js +0 -1
- package/dist/client/assets/file-heart-cc-JOwZ3.js +0 -1
- package/dist/client/assets/file-image-DbwX78SI.js +0 -1
- package/dist/client/assets/file-input-CtZX2__A.js +0 -1
- package/dist/client/assets/file-key-bl343YOL.js +0 -1
- package/dist/client/assets/file-lock-DpeYYKvE.js +0 -1
- package/dist/client/assets/file-minus-BEqWL4NK.js +0 -1
- package/dist/client/assets/file-minus-corner-BqDb54nN.js +0 -1
- package/dist/client/assets/file-music-CN6NiyWT.js +0 -1
- package/dist/client/assets/file-output-DmcgqX3A.js +0 -1
- package/dist/client/assets/file-pen-CGfzDSML.js +0 -1
- package/dist/client/assets/file-pen-line-DcQZkL2J.js +0 -1
- package/dist/client/assets/file-play-Dwf1Pars.js +0 -1
- package/dist/client/assets/file-plus-C7vX_nm5.js +0 -1
- package/dist/client/assets/file-plus-corner-CHfSmqE6.js +0 -1
- package/dist/client/assets/file-question-mark-6F1Xi50A.js +0 -1
- package/dist/client/assets/file-scan-DPTdKoCi.js +0 -1
- package/dist/client/assets/file-search-VgDt88TV.js +0 -1
- package/dist/client/assets/file-search-corner-D_vxk7UN.js +0 -1
- package/dist/client/assets/file-signal-C6f3IA-1.js +0 -1
- package/dist/client/assets/file-sliders-CJQymv4j.js +0 -1
- package/dist/client/assets/file-spreadsheet-C3j3-pDG.js +0 -1
- package/dist/client/assets/file-stack-Dkj6C35D.js +0 -1
- package/dist/client/assets/file-symlink-TucAPh8e.js +0 -1
- package/dist/client/assets/file-terminal-YVPxbOcK.js +0 -1
- package/dist/client/assets/file-type-_FTL3DOO.js +0 -1
- package/dist/client/assets/file-type-corner-CrQiQbB2.js +0 -1
- package/dist/client/assets/file-up-CSO8O_op.js +0 -1
- package/dist/client/assets/file-user-B_GM4WsL.js +0 -1
- package/dist/client/assets/file-video-camera-BGbkcyoX.js +0 -1
- package/dist/client/assets/file-volume-DSaEpX_4.js +0 -1
- package/dist/client/assets/file-x-CfQY5CY-.js +0 -1
- package/dist/client/assets/file-x-corner-Ck-7OdR9.js +0 -1
- package/dist/client/assets/files-DUNV1LB0.js +0 -1
- package/dist/client/assets/film-B3R9nQOI.js +0 -1
- package/dist/client/assets/fingerprint-pattern-Db5bfgFF.js +0 -1
- package/dist/client/assets/fire-extinguisher-DvQsWUaX.js +0 -1
- package/dist/client/assets/fish-BGLMaPKM.js +0 -1
- package/dist/client/assets/fish-off-DPvx7bcU.js +0 -1
- package/dist/client/assets/fish-symbol-BF73GcdY.js +0 -1
- package/dist/client/assets/fishing-hook-CMXNTXHC.js +0 -1
- package/dist/client/assets/fishing-rod-fufb64aj.js +0 -1
- package/dist/client/assets/flag-DeBtUJ-v.js +0 -1
- package/dist/client/assets/flag-off-BJXdMCVv.js +0 -1
- package/dist/client/assets/flag-triangle-left-B964hGT2.js +0 -1
- package/dist/client/assets/flag-triangle-right-BnShboL4.js +0 -1
- package/dist/client/assets/flame--ABuKVoR.js +0 -1
- package/dist/client/assets/flame-kindling-CGvpYthC.js +0 -1
- package/dist/client/assets/flashlight-DVGQayOz.js +0 -1
- package/dist/client/assets/flashlight-off-DbYbUhWd.js +0 -1
- package/dist/client/assets/flask-conical-CPr5QXfV.js +0 -1
- package/dist/client/assets/flask-conical-off-CLFvegpO.js +0 -1
- package/dist/client/assets/flask-round-D5XxXvfW.js +0 -1
- package/dist/client/assets/flip-horizontal-2-BafRHddQ.js +0 -1
- package/dist/client/assets/flip-vertical-2-CCPY_2jb.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-NOHXC9zt.js +0 -168
- package/dist/client/assets/flowDiagram-HODETNUW-NOHXC9zt.js.br +0 -0
- package/dist/client/assets/flowDiagram-HODETNUW-NOHXC9zt.js.gz +0 -0
- package/dist/client/assets/flower-2-C0x4mAyv.js +0 -1
- package/dist/client/assets/flower-CxsYme3J.js +0 -1
- package/dist/client/assets/focus-D2WJ_tAM.js +0 -1
- package/dist/client/assets/fold-horizontal-BnPGIfUe.js +0 -1
- package/dist/client/assets/fold-vertical-ByErfHZL.js +0 -1
- package/dist/client/assets/folder-archive-CKtiPMxP.js +0 -1
- package/dist/client/assets/folder-bookmark-YGhlFbyY.js +0 -1
- package/dist/client/assets/folder-check-YjEJ9HST.js +0 -1
- package/dist/client/assets/folder-clock-keIAzVD6.js +0 -1
- package/dist/client/assets/folder-closed-Dkks4s3W.js +0 -1
- package/dist/client/assets/folder-code-BqkU1xyH.js +0 -1
- package/dist/client/assets/folder-cog-SAzMMsT8.js +0 -1
- package/dist/client/assets/folder-dot-DfRljGop.js +0 -1
- package/dist/client/assets/folder-down-opld-Zuw.js +0 -1
- package/dist/client/assets/folder-git-2-BLI_4dgt.js +0 -1
- package/dist/client/assets/folder-git-eD4I6CWQ.js +0 -1
- package/dist/client/assets/folder-heart-DzqMCDzW.js +0 -1
- package/dist/client/assets/folder-input-BPuZ53WD.js +0 -1
- package/dist/client/assets/folder-kanban-DVyBpb0l.js +0 -1
- package/dist/client/assets/folder-key-5hFzAX-f.js +0 -1
- package/dist/client/assets/folder-lock-KSirFjKs.js +0 -1
- package/dist/client/assets/folder-minus-CqTR_pbk.js +0 -1
- package/dist/client/assets/folder-open-dot-b9eCUlC6.js +0 -1
- package/dist/client/assets/folder-output-BKagos3l.js +0 -1
- package/dist/client/assets/folder-pen-CP4dQQAz.js +0 -1
- package/dist/client/assets/folder-plus-0-id8wPv.js +0 -1
- package/dist/client/assets/folder-root-BaPa35jA.js +0 -1
- package/dist/client/assets/folder-search-2-Cpk9pHZJ.js +0 -1
- package/dist/client/assets/folder-symlink-CeHDLv1O.js +0 -1
- package/dist/client/assets/folder-sync-DbUAXl7l.js +0 -1
- package/dist/client/assets/folder-tree-CiRVXNs8.js +0 -1
- package/dist/client/assets/folder-up-DUUpRe92.js +0 -1
- package/dist/client/assets/folder-x-Br5AoYgk.js +0 -1
- package/dist/client/assets/folders-lpe1h_0y.js +0 -1
- package/dist/client/assets/footprints-C_r9HBMP.js +0 -1
- package/dist/client/assets/forklift-DWgnT0jW.js +0 -1
- package/dist/client/assets/form-w19TUibF.js +0 -1
- package/dist/client/assets/forward-DbF8zzmw.js +0 -1
- package/dist/client/assets/frame-ZrZFvSBv.js +0 -1
- package/dist/client/assets/frown-C_mmWiRH.js +0 -1
- package/dist/client/assets/fuel-DeHGnuMR.js +0 -1
- package/dist/client/assets/fullscreen-DSXoEv92.js +0 -1
- package/dist/client/assets/funnel-DusUbHtJ.js +0 -1
- package/dist/client/assets/funnel-plus-B5TIUxdw.js +0 -1
- package/dist/client/assets/funnel-x-MLlCVRFH.js +0 -1
- package/dist/client/assets/gallery-horizontal-B9SEu8EK.js +0 -1
- package/dist/client/assets/gallery-horizontal-end-wa6buupf.js +0 -1
- package/dist/client/assets/gallery-thumbnails-CxUN6Wrn.js +0 -1
- package/dist/client/assets/gallery-vertical-DbHUt15A.js +0 -1
- package/dist/client/assets/gallery-vertical-end-DFVvGGkN.js +0 -1
- package/dist/client/assets/gamepad-2-DpLFLMq7.js +0 -1
- package/dist/client/assets/gamepad-COqeU5WT.js +0 -1
- package/dist/client/assets/gamepad-directional--meReI7G.js +0 -1
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-Yb55PkvL.js +0 -292
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-Yb55PkvL.js.br +0 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-Yb55PkvL.js.gz +0 -0
- package/dist/client/assets/gauge-B9fu0ypd.js +0 -1
- package/dist/client/assets/gavel-CW6IKCzE.js +0 -1
- package/dist/client/assets/gem-psI0jerQ.js +0 -1
- package/dist/client/assets/georgian-lari-CaeTyWt_.js +0 -1
- package/dist/client/assets/ghost-BiAU-gkf.js +0 -1
- package/dist/client/assets/gift-DAcDTwu9.js +0 -1
- package/dist/client/assets/git-branch-k1UoSqRD.js +0 -1
- package/dist/client/assets/git-branch-minus-BlgZC2f1.js +0 -1
- package/dist/client/assets/git-branch-plus-L_R_qmuD.js +0 -1
- package/dist/client/assets/git-commit-horizontal-Bs9lRNyL.js +0 -1
- package/dist/client/assets/git-commit-vertical-CYYNicZ_.js +0 -1
- package/dist/client/assets/git-compare-arrows-qF0EiIOz.js +0 -1
- package/dist/client/assets/git-compare-pqsnISJH.js +0 -1
- package/dist/client/assets/git-fork-CFmV0uMe.js +0 -1
- package/dist/client/assets/git-graph-4MRfOgJF.js +0 -1
- package/dist/client/assets/git-merge-CA-o26vT.js +0 -1
- package/dist/client/assets/git-merge-conflict-CAHNKqgr.js +0 -1
- package/dist/client/assets/git-pull-request-Sidj9eoG.js +0 -1
- package/dist/client/assets/git-pull-request-arrow-TryoXA5-.js +0 -1
- package/dist/client/assets/git-pull-request-closed-B9BEYi9n.js +0 -1
- package/dist/client/assets/git-pull-request-create-DxNT3jxA.js +0 -1
- package/dist/client/assets/git-pull-request-create-arrow-Cc5TBZJe.js +0 -1
- package/dist/client/assets/git-pull-request-draft-kOD5P17n.js +0 -1
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CaVRQ8Sf.js +0 -106
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CaVRQ8Sf.js.br +0 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CaVRQ8Sf.js.gz +0 -0
- package/dist/client/assets/glass-water-B8v3sfYS.js +0 -1
- package/dist/client/assets/glasses-aXYdkW0r.js +0 -1
- package/dist/client/assets/globe-ClLCcIhx.js +0 -1
- package/dist/client/assets/globe-check-DWSdLdbp.js +0 -1
- package/dist/client/assets/globe-lock-Crul74xD.js +0 -1
- package/dist/client/assets/globe-off-8gJQwRaO.js +0 -1
- package/dist/client/assets/globe-x-DY6zyYrC.js +0 -1
- package/dist/client/assets/goal-DL2ScBPi.js +0 -1
- package/dist/client/assets/gpu-PDUMcYve.js +0 -1
- package/dist/client/assets/graduation-cap-BdncBGBU.js +0 -1
- package/dist/client/assets/grape-DixouCT7.js +0 -1
- package/dist/client/assets/grid-2x2-BUyJGoRl.js +0 -1
- package/dist/client/assets/grid-2x2-check-D74erFFj.js +0 -1
- package/dist/client/assets/grid-2x2-plus-DifXeg_-.js +0 -1
- package/dist/client/assets/grid-2x2-x-9dkim2iA.js +0 -1
- package/dist/client/assets/grid-3x2-ClQHauNh.js +0 -1
- package/dist/client/assets/grid-3x3-BJMJsNzN.js +0 -1
- package/dist/client/assets/grip-BlnoKYLP.js +0 -1
- package/dist/client/assets/grip-horizontal-3ab2Ll53.js +0 -1
- package/dist/client/assets/grip-vertical--OsBiNWA.js +0 -1
- package/dist/client/assets/group-BtLJeEgH.js +0 -1
- package/dist/client/assets/guitar-CR4kwdKs.js +0 -1
- package/dist/client/assets/ham-DzbMgV4z.js +0 -1
- package/dist/client/assets/hamburger-C2ARNLy5.js +0 -1
- package/dist/client/assets/hammer-Bbo7QtCI.js +0 -1
- package/dist/client/assets/hand-Cl36eeTe.js +0 -1
- package/dist/client/assets/hand-coins-Db69wbxn.js +0 -1
- package/dist/client/assets/hand-fist-DqtovTsp.js +0 -1
- package/dist/client/assets/hand-grab-BzIBdUXN.js +0 -1
- package/dist/client/assets/hand-heart-BrZy6opY.js +0 -1
- package/dist/client/assets/hand-helping-DZL6pmK2.js +0 -1
- package/dist/client/assets/hand-metal-BKBbkIhR.js +0 -1
- package/dist/client/assets/hand-platter-DLnheH_c.js +0 -1
- package/dist/client/assets/handbag-BJI5TG8X.js +0 -1
- package/dist/client/assets/handshake-BI936iLz.js +0 -1
- package/dist/client/assets/hard-drive-CL4_hAdL.js +0 -1
- package/dist/client/assets/hard-drive-download-BkHM2dX9.js +0 -1
- package/dist/client/assets/hard-drive-upload-ExOBYqDI.js +0 -1
- package/dist/client/assets/hard-hat-CPnbKd5T.js +0 -1
- package/dist/client/assets/hash-DzmF152u.js +0 -1
- package/dist/client/assets/hat-glasses-Z_jARmft.js +0 -1
- package/dist/client/assets/haze-FYI6Z9V2.js +0 -1
- package/dist/client/assets/hd-D4erTWT1.js +0 -1
- package/dist/client/assets/hdmi-port-ppW29S37.js +0 -1
- package/dist/client/assets/heading-1-vXf3mcPQ.js +0 -1
- package/dist/client/assets/heading-2-BvQ9DSs3.js +0 -1
- package/dist/client/assets/heading-3-xTjS-qgc.js +0 -1
- package/dist/client/assets/heading-4-C8emS8Vz.js +0 -1
- package/dist/client/assets/heading-5-MhbSqAav.js +0 -1
- package/dist/client/assets/heading-6-CLz6-CEn.js +0 -1
- package/dist/client/assets/heading-B0-WwUt2.js +0 -1
- package/dist/client/assets/headphone-off-BsT3sXAK.js +0 -1
- package/dist/client/assets/headphones-DLT0mqlx.js +0 -1
- package/dist/client/assets/headset-DmFQjFWL.js +0 -1
- package/dist/client/assets/heart-Dp_YBQ-X.js +0 -1
- package/dist/client/assets/heart-crack-CIjdVwYX.js +0 -1
- package/dist/client/assets/heart-handshake-D0I2MCXQ.js +0 -1
- package/dist/client/assets/heart-minus-CTib04Hh.js +0 -1
- package/dist/client/assets/heart-off-CrEjlfhB.js +0 -1
- package/dist/client/assets/heart-plus-cBwt2q_y.js +0 -1
- package/dist/client/assets/heart-pulse-CkQ1fyH9.js +0 -1
- package/dist/client/assets/heart-x-Jwcewaxo.js +0 -1
- package/dist/client/assets/heater-BFHlzsFH.js +0 -1
- package/dist/client/assets/helicopter-CV_-TO9S.js +0 -1
- package/dist/client/assets/hexagon-CSgmFL1g.js +0 -1
- package/dist/client/assets/highlighter-DHox3WAA.js +0 -1
- package/dist/client/assets/history-DhaPQxID.js +0 -1
- package/dist/client/assets/hop-off-DKNZ6ZhW.js +0 -1
- package/dist/client/assets/hop-off-DKNZ6ZhW.js.br +0 -0
- package/dist/client/assets/hop-off-DKNZ6ZhW.js.gz +0 -0
- package/dist/client/assets/hop-pJWw2z50.js +0 -1
- package/dist/client/assets/hop-pJWw2z50.js.br +0 -0
- package/dist/client/assets/hop-pJWw2z50.js.gz +0 -0
- package/dist/client/assets/hospital-B61YozdC.js +0 -1
- package/dist/client/assets/hotel-DYmpyFQA.js +0 -1
- package/dist/client/assets/hourglass-BlqFAUfC.js +0 -1
- package/dist/client/assets/house-heart-BOMsRvAt.js +0 -1
- package/dist/client/assets/house-iecgRfus.js +0 -1
- package/dist/client/assets/house-plug--4POcGg-.js +0 -1
- package/dist/client/assets/house-plus-BghjJ4bH.js +0 -1
- package/dist/client/assets/house-wifi-htNED5Ss.js +0 -1
- package/dist/client/assets/ice-cream-bowl-CmHbFi5j.js +0 -1
- package/dist/client/assets/ice-cream-cone-BDDVWh83.js +0 -1
- package/dist/client/assets/id-card-BbTX1_Z3.js +0 -1
- package/dist/client/assets/id-card-lanyard-CJ93d-ZW.js +0 -1
- package/dist/client/assets/image-down-DcNLdrRv.js +0 -1
- package/dist/client/assets/image-minus-CVJ-BdtF.js +0 -1
- package/dist/client/assets/image-off-yIuEJa6b.js +0 -1
- package/dist/client/assets/image-play-JM1y5-Z_.js +0 -1
- package/dist/client/assets/image-plus-CPfq0tgs.js +0 -1
- package/dist/client/assets/image-up-kdE_ks_G.js +0 -1
- package/dist/client/assets/image-upscale-BjIXyv79.js +0 -1
- package/dist/client/assets/images-BVq2dNKu.js +0 -1
- package/dist/client/assets/import-D8GdNcnL.js +0 -1
- package/dist/client/assets/inbox-BVgEL_ae.js +0 -1
- package/dist/client/assets/index-B09lh32D.js +0 -259
- package/dist/client/assets/index-B09lh32D.js.br +0 -0
- package/dist/client/assets/index-B09lh32D.js.gz +0 -0
- package/dist/client/assets/index-Bj7UtVpq.css +0 -1
- package/dist/client/assets/index-Bj7UtVpq.css.br +0 -0
- package/dist/client/assets/index-Bj7UtVpq.css.gz +0 -0
- package/dist/client/assets/indian-rupee-B58zBYKR.js +0 -1
- package/dist/client/assets/infinity-JS2bx0cP.js +0 -1
- package/dist/client/assets/info-BHv1c7NR.js +0 -1
- package/dist/client/assets/infoDiagram-27XIBGKW-Bf4hy4j6.js +0 -2
- package/dist/client/assets/inspection-panel-B47Tm7Jq.js +0 -1
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-gDnRAMwc.js +0 -70
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-gDnRAMwc.js.br +0 -0
- package/dist/client/assets/ishikawaDiagram-5VMMS53U-gDnRAMwc.js.gz +0 -0
- package/dist/client/assets/italic-CiW58VJ-.js +0 -1
- package/dist/client/assets/iteration-ccw-DYEaf2fo.js +0 -1
- package/dist/client/assets/iteration-cw-EyYc2DHd.js +0 -1
- package/dist/client/assets/japanese-yen-DHqRnfAQ.js +0 -1
- package/dist/client/assets/journeyDiagram-3NMN7TZE-BGzSo4V6.js +0 -139
- package/dist/client/assets/journeyDiagram-3NMN7TZE-BGzSo4V6.js.br +0 -0
- package/dist/client/assets/journeyDiagram-3NMN7TZE-BGzSo4V6.js.gz +0 -0
- package/dist/client/assets/joystick-DLCnN_uG.js +0 -1
- package/dist/client/assets/kanban-BXHc1Vnc.js +0 -1
- package/dist/client/assets/kanban-definition-UXKFOSKX-CjSXI03n.js +0 -89
- package/dist/client/assets/kanban-definition-UXKFOSKX-CjSXI03n.js.br +0 -0
- package/dist/client/assets/kanban-definition-UXKFOSKX-CjSXI03n.js.gz +0 -0
- package/dist/client/assets/kayak-BgjRTIP-.js +0 -1
- package/dist/client/assets/key-BsPI0gdi.js +0 -1
- package/dist/client/assets/key-round-Dm2w_WhP.js +0 -1
- package/dist/client/assets/key-square-DAMMV3ug.js +0 -1
- package/dist/client/assets/keyboard-CGLK2Grp.js +0 -1
- package/dist/client/assets/keyboard-music-BRNvC7oG.js +0 -1
- package/dist/client/assets/keyboard-off-DizoiGF1.js +0 -1
- package/dist/client/assets/lamp-BSJYoZoY.js +0 -1
- package/dist/client/assets/lamp-ceiling-Ce4ospoN.js +0 -1
- package/dist/client/assets/lamp-desk-DfiL4hge.js +0 -1
- package/dist/client/assets/lamp-floor-BVJQt5fT.js +0 -1
- package/dist/client/assets/lamp-wall-down-IYX8fPFT.js +0 -1
- package/dist/client/assets/lamp-wall-up-DU8WvPXk.js +0 -1
- package/dist/client/assets/land-plot-CgErcg7p.js +0 -1
- package/dist/client/assets/landmark-DKblFy3b.js +0 -1
- package/dist/client/assets/languages-Rn8dJIS2.js +0 -1
- package/dist/client/assets/laptop-C5pWo3eq.js +0 -1
- package/dist/client/assets/laptop-minimal-BHzJrxQZ.js +0 -1
- package/dist/client/assets/laptop-minimal-check-C_Wg53pI.js +0 -1
- package/dist/client/assets/lasso-DghjCZy5.js +0 -1
- package/dist/client/assets/lasso-select-BvCLUsx-.js +0 -1
- package/dist/client/assets/laugh-wfKSlvRC.js +0 -1
- package/dist/client/assets/layers-2-C-prk4wn.js +0 -1
- package/dist/client/assets/layers-D-_j_-qs.js +0 -1
- package/dist/client/assets/layers-minus-CRVeEHkG.js +0 -1
- package/dist/client/assets/layers-plus-CLenztk-.js +0 -1
- package/dist/client/assets/layout-CC7b97OK.js +0 -1
- package/dist/client/assets/layout-CC7b97OK.js.br +0 -0
- package/dist/client/assets/layout-CC7b97OK.js.gz +0 -0
- package/dist/client/assets/layout-dashboard-B-ORnWK5.js +0 -1
- package/dist/client/assets/layout-grid-BYQ6PtRu.js +0 -1
- package/dist/client/assets/layout-list-B23phtO5.js +0 -1
- package/dist/client/assets/layout-panel-left-CP4JIM_c.js +0 -1
- package/dist/client/assets/layout-panel-top-DyWqmdRp.js +0 -1
- package/dist/client/assets/layout-template-DvN9j26I.js +0 -1
- package/dist/client/assets/leaf-C0Vx_LVn.js +0 -1
- package/dist/client/assets/leafy-green-BqQEyt6l.js +0 -1
- package/dist/client/assets/lectern-D4tWZ3Hi.js +0 -1
- package/dist/client/assets/lens-concave-rPmb9aA0.js +0 -1
- package/dist/client/assets/lens-convex-yTocHbM0.js +0 -1
- package/dist/client/assets/library-BG9Vw7_3.js +0 -1
- package/dist/client/assets/library-big-DR1UzSKV.js +0 -1
- package/dist/client/assets/life-buoy-DAwdL6HN.js +0 -1
- package/dist/client/assets/ligature-B7Hvkbbb.js +0 -1
- package/dist/client/assets/lightbulb-off-BtWgMHGd.js +0 -1
- package/dist/client/assets/line-dot-right-horizontal-BA-7wSUz.js +0 -1
- package/dist/client/assets/line-squiggle-CY8XHd_H.js +0 -1
- package/dist/client/assets/line-style-itF5O3D6.js +0 -1
- package/dist/client/assets/link-A435rCDo.js +0 -1
- package/dist/client/assets/list-DpCtYJW9.js +0 -1
- package/dist/client/assets/list-check-CMiZawU5.js +0 -1
- package/dist/client/assets/list-checks-Jb2TgshY.js +0 -1
- package/dist/client/assets/list-chevrons-down-up-DPThsCPG.js +0 -1
- package/dist/client/assets/list-chevrons-up-down-CPwEB-tL.js +0 -1
- package/dist/client/assets/list-collapse-Cc0Z6Myi.js +0 -1
- package/dist/client/assets/list-end-Bp-OY3wH.js +0 -1
- package/dist/client/assets/list-filter-BiTgXXVx.js +0 -1
- package/dist/client/assets/list-filter-plus-Bw8OZjKb.js +0 -1
- package/dist/client/assets/list-indent-decrease-BlW_XQYv.js +0 -1
- package/dist/client/assets/list-indent-increase-DVWxF4ud.js +0 -1
- package/dist/client/assets/list-minus-De9zFTLI.js +0 -1
- package/dist/client/assets/list-music-Cttk04iE.js +0 -1
- package/dist/client/assets/list-ordered-Bwf9eSTI.js +0 -1
- package/dist/client/assets/list-plus-ByxEzv_B.js +0 -1
- package/dist/client/assets/list-restart-Bjpwzjy-.js +0 -1
- package/dist/client/assets/list-start-BubSMb4B.js +0 -1
- package/dist/client/assets/list-tree-C2DYoszl.js +0 -1
- package/dist/client/assets/list-video-DYyYtUAE.js +0 -1
- package/dist/client/assets/list-x-NUz-90ir.js +0 -1
- package/dist/client/assets/loader-7U3Hz_iZ.js +0 -1
- package/dist/client/assets/loader-pinwheel-CqvUQ_Z_.js +0 -1
- package/dist/client/assets/locate-BWOzkdgx.js +0 -1
- package/dist/client/assets/locate-fixed-LaJQjqtA.js +0 -1
- package/dist/client/assets/locate-off-BD0mFeSR.js +0 -1
- package/dist/client/assets/lock-keyhole-A5uccOKm.js +0 -1
- package/dist/client/assets/lock-keyhole-open-CfpP_E92.js +0 -1
- package/dist/client/assets/lock-open-CDpxFTne.js +0 -1
- package/dist/client/assets/lock-vvOkab4K.js +0 -1
- package/dist/client/assets/log-in-CCoTsRcA.js +0 -1
- package/dist/client/assets/log-out-DI-nyZvQ.js +0 -1
- package/dist/client/assets/logs-fH_KuSpC.js +0 -1
- package/dist/client/assets/lollipop-Ct1CdZZn.js +0 -1
- package/dist/client/assets/luggage-B8ENofwS.js +0 -1
- package/dist/client/assets/magnet-BcMw1CTl.js +0 -1
- package/dist/client/assets/mail-Czi0wvoM.js +0 -1
- package/dist/client/assets/mail-check-DS1mzGgZ.js +0 -1
- package/dist/client/assets/mail-minus-tseP9KWX.js +0 -1
- package/dist/client/assets/mail-open-6fKpYybc.js +0 -1
- package/dist/client/assets/mail-plus-BsG5KJV6.js +0 -1
- package/dist/client/assets/mail-question-mark-BHeWyXNG.js +0 -1
- package/dist/client/assets/mail-search-BxOrQxIC.js +0 -1
- package/dist/client/assets/mail-warning-DtVtky5f.js +0 -1
- package/dist/client/assets/mail-x-CFnH2fJp.js +0 -1
- package/dist/client/assets/mailbox-CFjOrRqW.js +0 -1
- package/dist/client/assets/mails-C624-DND.js +0 -1
- package/dist/client/assets/map-DSt813il.js +0 -1
- package/dist/client/assets/map-minus-Q4v3GxZU.js +0 -1
- package/dist/client/assets/map-pin-Br1fPeAM.js +0 -1
- package/dist/client/assets/map-pin-check-CCUnts00.js +0 -1
- package/dist/client/assets/map-pin-check-inside-C4pIuVc3.js +0 -1
- package/dist/client/assets/map-pin-house-DnZXxpoL.js +0 -1
- package/dist/client/assets/map-pin-minus-DOmuACM-.js +0 -1
- package/dist/client/assets/map-pin-minus-inside-ob90Ziq6.js +0 -1
- package/dist/client/assets/map-pin-off-kfwHGHfB.js +0 -1
- package/dist/client/assets/map-pin-pen-DGbtQ_7c.js +0 -1
- package/dist/client/assets/map-pin-plus-Cur0oZfM.js +0 -1
- package/dist/client/assets/map-pin-plus-inside-Ch2mdjr1.js +0 -1
- package/dist/client/assets/map-pin-search-0_kx8Rdk.js +0 -1
- package/dist/client/assets/map-pin-x-C10YKuPp.js +0 -1
- package/dist/client/assets/map-pin-x-inside-C7717KIw.js +0 -1
- package/dist/client/assets/map-pinned-BTivtTr2.js +0 -1
- package/dist/client/assets/map-plus-Ci3Ir86O.js +0 -1
- package/dist/client/assets/mars-CLIzbU9Z.js +0 -1
- package/dist/client/assets/mars-stroke-CXFsDRjr.js +0 -1
- package/dist/client/assets/martini-CgmEeugN.js +0 -1
- package/dist/client/assets/maximize-2-DZHz_tIC.js +0 -1
- package/dist/client/assets/maximize-CzBg5rHw.js +0 -1
- package/dist/client/assets/medal-BOAf53eP.js +0 -1
- package/dist/client/assets/megaphone-ClScy87U.js +0 -1
- package/dist/client/assets/megaphone-off-C9qbaVbc.js +0 -1
- package/dist/client/assets/meh-BSLl_0_a.js +0 -1
- package/dist/client/assets/memory-stick-DJzqJlrj.js +0 -1
- package/dist/client/assets/menu-DHZENpyw.js +0 -1
- package/dist/client/assets/merge-DffF0f10.js +0 -1
- package/dist/client/assets/mermaid.core-7Xmc3xww.js +0 -308
- package/dist/client/assets/mermaid.core-7Xmc3xww.js.br +0 -0
- package/dist/client/assets/mermaid.core-7Xmc3xww.js.gz +0 -0
- package/dist/client/assets/message-circle-check-BADXN6z7.js +0 -1
- package/dist/client/assets/message-circle-code-8JVCW3I8.js +0 -1
- package/dist/client/assets/message-circle-dashed-MNvLYJdP.js +0 -1
- package/dist/client/assets/message-circle-heart-vOICMmUI.js +0 -1
- package/dist/client/assets/message-circle-more-VYZJO8Y9.js +0 -1
- package/dist/client/assets/message-circle-off-_rCsdkao.js +0 -1
- package/dist/client/assets/message-circle-plus-Dn6X03mA.js +0 -1
- package/dist/client/assets/message-circle-question-mark-DLBqSm9v.js +0 -1
- package/dist/client/assets/message-circle-reply-CJXUR-dz.js +0 -1
- package/dist/client/assets/message-circle-warning-DprtwbpP.js +0 -1
- package/dist/client/assets/message-circle-x-DLDC5TrO.js +0 -1
- package/dist/client/assets/message-square-BJKcGl87.js +0 -1
- package/dist/client/assets/message-square-check-BSmOlXcP.js +0 -1
- package/dist/client/assets/message-square-code-NgbD1-bl.js +0 -1
- package/dist/client/assets/message-square-dashed-BlcGC82t.js +0 -1
- package/dist/client/assets/message-square-diff-B7UdVx9c.js +0 -1
- package/dist/client/assets/message-square-dot-DU0BTeCk.js +0 -1
- package/dist/client/assets/message-square-heart-eVdGwj-L.js +0 -1
- package/dist/client/assets/message-square-lock-D1e7Aeff.js +0 -1
- package/dist/client/assets/message-square-more-5NddaYve.js +0 -1
- package/dist/client/assets/message-square-off-DodRZ0oU.js +0 -1
- package/dist/client/assets/message-square-plus-CZIenLxr.js +0 -1
- package/dist/client/assets/message-square-quote-DyrC0m8l.js +0 -1
- package/dist/client/assets/message-square-reply-MX2_6m3L.js +0 -1
- package/dist/client/assets/message-square-share-BnacpP2A.js +0 -1
- package/dist/client/assets/message-square-text-vPlULZfn.js +0 -1
- package/dist/client/assets/message-square-warning-7NKes0gK.js +0 -1
- package/dist/client/assets/message-square-x-ZIofAwLR.js +0 -1
- package/dist/client/assets/messages-square-C2HaCJLN.js +0 -1
- package/dist/client/assets/metronome-DMD8O3Cr.js +0 -1
- package/dist/client/assets/mic-B1F1Mk3F.js +0 -1
- package/dist/client/assets/mic-off-B5P_QiNf.js +0 -1
- package/dist/client/assets/mic-vocal-B4POez-n.js +0 -1
- package/dist/client/assets/microchip-CAWf8TsQ.js +0 -1
- package/dist/client/assets/microscope-Dopo-ye0.js +0 -1
- package/dist/client/assets/microwave-8CXNcHwj.js +0 -1
- package/dist/client/assets/milestone-CEz3b1uY.js +0 -1
- package/dist/client/assets/milk-Cj704th1.js +0 -1
- package/dist/client/assets/milk-off-TrPIk9f3.js +0 -1
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Clf8J2Hg.js +0 -96
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Clf8J2Hg.js.br +0 -0
- package/dist/client/assets/mindmap-definition-YA3MSWOX-Clf8J2Hg.js.gz +0 -0
- package/dist/client/assets/minimize-2-CgACXCkh.js +0 -1
- package/dist/client/assets/minimize-Dd_mYV4D.js +0 -1
- package/dist/client/assets/minus-HiNHR4ON.js +0 -1
- package/dist/client/assets/mirror-rectangular-CbEVh88P.js +0 -1
- package/dist/client/assets/mirror-round-B2yMBXAu.js +0 -1
- package/dist/client/assets/monitor-check-BWAZfwGW.js +0 -1
- package/dist/client/assets/monitor-cloud-DRTdXbPc.js +0 -1
- package/dist/client/assets/monitor-cog-DGXhbkWO.js +0 -1
- package/dist/client/assets/monitor-dot-HV1_n2Ff.js +0 -1
- package/dist/client/assets/monitor-down-B2joMCaO.js +0 -1
- package/dist/client/assets/monitor-off-DRvkNt0B.js +0 -1
- package/dist/client/assets/monitor-pause-lIKZJyEz.js +0 -1
- package/dist/client/assets/monitor-play-uWIp6V3W.js +0 -1
- package/dist/client/assets/monitor-smartphone-CWDQH72m.js +0 -1
- package/dist/client/assets/monitor-speaker-Cf5LR4Y4.js +0 -1
- package/dist/client/assets/monitor-stop-BPRy2I6h.js +0 -1
- package/dist/client/assets/monitor-up-2HVYaQZW.js +0 -1
- package/dist/client/assets/monitor-x-BuWa7BTV.js +0 -1
- package/dist/client/assets/moon-bVhBAiI7.js +0 -1
- package/dist/client/assets/moon-star-D6KrODkf.js +0 -1
- package/dist/client/assets/motorbike-BCmJC92c.js +0 -1
- package/dist/client/assets/mountain-q10vVDaY.js +0 -1
- package/dist/client/assets/mountain-snow-DTEiNUYI.js +0 -1
- package/dist/client/assets/mouse-C8fEitDr.js +0 -1
- package/dist/client/assets/mouse-left-DlfLWlQ2.js +0 -1
- package/dist/client/assets/mouse-off-Ds_XZAE-.js +0 -1
- package/dist/client/assets/mouse-pointer-2-CuQ7bsse.js +0 -1
- package/dist/client/assets/mouse-pointer-2-off-De4ZkdfW.js +0 -1
- package/dist/client/assets/mouse-pointer-B5PxFCTF.js +0 -1
- package/dist/client/assets/mouse-pointer-ban-DuTpcm7c.js +0 -1
- package/dist/client/assets/mouse-pointer-click-CX50vey8.js +0 -1
- package/dist/client/assets/mouse-right-BHreK6B9.js +0 -1
- package/dist/client/assets/move-3d-BNGnimG1.js +0 -1
- package/dist/client/assets/move-CQAc4a8P.js +0 -1
- package/dist/client/assets/move-diagonal-2-CCOXrV0d.js +0 -1
- package/dist/client/assets/move-diagonal-Cqxzd3Rb.js +0 -1
- package/dist/client/assets/move-down-CsEGs9iT.js +0 -1
- package/dist/client/assets/move-down-left-xanbLs2o.js +0 -1
- package/dist/client/assets/move-down-right-DnuOgHIw.js +0 -1
- package/dist/client/assets/move-horizontal-gqy5-zn4.js +0 -1
- package/dist/client/assets/move-left-DHkMO0wA.js +0 -1
- package/dist/client/assets/move-right-ByDwlQK0.js +0 -1
- package/dist/client/assets/move-up-B_AP2yuD.js +0 -1
- package/dist/client/assets/move-up-left-Bhz_SSYB.js +0 -1
- package/dist/client/assets/move-up-right-BjqGSN1l.js +0 -1
- package/dist/client/assets/move-vertical-DATBtvi0.js +0 -1
- package/dist/client/assets/music-2-B_pknDLk.js +0 -1
- package/dist/client/assets/music-3-BTtyvEP8.js +0 -1
- package/dist/client/assets/music-4-BvLnXIyY.js +0 -1
- package/dist/client/assets/music-D_vMpzf9.js +0 -1
- package/dist/client/assets/navigation-2-BmHESdV8.js +0 -1
- package/dist/client/assets/navigation-2-off-BdQaNfxi.js +0 -1
- package/dist/client/assets/navigation-_F5jNSUZ.js +0 -1
- package/dist/client/assets/navigation-off-B-FkUtLq.js +0 -1
- package/dist/client/assets/network-DNVnMaR9.js +0 -1
- package/dist/client/assets/newspaper-CDTTyoVr.js +0 -1
- package/dist/client/assets/nfc-WkjkOKNW.js +0 -1
- package/dist/client/assets/non-binary-DbysCp0a.js +0 -1
- package/dist/client/assets/notebook-Dymxm0I6.js +0 -1
- package/dist/client/assets/notebook-pen-QRE2c4mI.js +0 -1
- package/dist/client/assets/notebook-tabs-BvWfDQB7.js +0 -1
- package/dist/client/assets/notebook-text-CO34QbFC.js +0 -1
- package/dist/client/assets/notepad-text-C3q3CZm4.js +0 -1
- package/dist/client/assets/notepad-text-dashed-CI8m81-U.js +0 -1
- package/dist/client/assets/nut-BFRw1I9q.js +0 -1
- package/dist/client/assets/nut-off-D0nKkuPC.js +0 -1
- package/dist/client/assets/octagon-CROPuTf2.js +0 -1
- package/dist/client/assets/octagon-alert-BrwgPXp6.js +0 -1
- package/dist/client/assets/octagon-minus-DMQK02Xh.js +0 -1
- package/dist/client/assets/octagon-pause-Js3Af5-5.js +0 -1
- package/dist/client/assets/octagon-x-is8N_lxd.js +0 -1
- package/dist/client/assets/omega-CEfk2ckk.js +0 -1
- package/dist/client/assets/option-DXIsgLT3.js +0 -1
- package/dist/client/assets/orbit-B-RuU7iN.js +0 -1
- package/dist/client/assets/origami-BQUeyOgS.js +0 -1
- package/dist/client/assets/package-2-COQNIiNq.js +0 -1
- package/dist/client/assets/package-CGuhjMek.js +0 -1
- package/dist/client/assets/package-check-CL-68Uk9.js +0 -1
- package/dist/client/assets/package-minus-Hywvkjbd.js +0 -1
- package/dist/client/assets/package-open-CtitY5XA.js +0 -1
- package/dist/client/assets/package-plus-BpibWhvA.js +0 -1
- package/dist/client/assets/package-search-BTwgha4-.js +0 -1
- package/dist/client/assets/package-x-CIxKmloL.js +0 -1
- package/dist/client/assets/paint-bucket-Cb4aXyTm.js +0 -1
- package/dist/client/assets/paint-roller-BMP13VSW.js +0 -1
- package/dist/client/assets/paintbrush-D0hEgSxI.js +0 -1
- package/dist/client/assets/paintbrush-vertical-D0y582ai.js +0 -1
- package/dist/client/assets/palette-BENn5P_5.js +0 -1
- package/dist/client/assets/panda-9oS8O1_4.js +0 -1
- package/dist/client/assets/panel-bottom-D2t2YLOA.js +0 -1
- package/dist/client/assets/panel-bottom-close-C0lSEhOk.js +0 -1
- package/dist/client/assets/panel-bottom-dashed-CB_Rmvc-.js +0 -1
- package/dist/client/assets/panel-bottom-open-RYRlrip8.js +0 -1
- package/dist/client/assets/panel-left-CDu7mLrH.js +0 -1
- package/dist/client/assets/panel-left-close-iLaELoe6.js +0 -1
- package/dist/client/assets/panel-left-dashed-C92bhkR7.js +0 -1
- package/dist/client/assets/panel-left-open-DKcJeu6W.js +0 -1
- package/dist/client/assets/panel-left-right-dashed-BSC-9X4D.js +0 -1
- package/dist/client/assets/panel-right-close-DBhZC9Sj.js +0 -1
- package/dist/client/assets/panel-right-dashed-CXOLmRtX.js +0 -1
- package/dist/client/assets/panel-right-open-CsCc3XAy.js +0 -1
- package/dist/client/assets/panel-top-ClBgormV.js +0 -1
- package/dist/client/assets/panel-top-bottom-dashed-GLjQ3TjN.js +0 -1
- package/dist/client/assets/panel-top-close-DGOFIOa_.js +0 -1
- package/dist/client/assets/panel-top-dashed-yImFulAA.js +0 -1
- package/dist/client/assets/panel-top-open-DUEDSAD2.js +0 -1
- package/dist/client/assets/panels-left-bottom-BYN2BKT7.js +0 -1
- package/dist/client/assets/panels-right-bottom-BE3_HmaY.js +0 -1
- package/dist/client/assets/panels-top-left-DN70PbK0.js +0 -1
- package/dist/client/assets/parasol-ByUGwSjH.js +0 -1
- package/dist/client/assets/parentheses-nYz0YCwB.js +0 -1
- package/dist/client/assets/parking-meter-Dbch7e5b.js +0 -1
- package/dist/client/assets/party-popper-q2ohR-rv.js +0 -1
- package/dist/client/assets/passwordBootstrap-Cb9HElX-.js +0 -2
- package/dist/client/assets/passwordBootstrap-Cb9HElX-.js.br +0 -0
- package/dist/client/assets/passwordBootstrap-Cb9HElX-.js.gz +0 -0
- package/dist/client/assets/pause-COAq-IQp.js +0 -1
- package/dist/client/assets/paw-print-Dl9lfDIh.js +0 -1
- package/dist/client/assets/pc-case-YzD38D1h.js +0 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-B3_AKCfc.js +0 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-B3_AKCfc.js.br +0 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-B3_AKCfc.js.gz +0 -0
- package/dist/client/assets/pen-DkBruRPd.js +0 -1
- package/dist/client/assets/pen-line-Cq1hZafG.js +0 -1
- package/dist/client/assets/pen-off-Cl1CbgI5.js +0 -1
- package/dist/client/assets/pen-tool-DK3briUY.js +0 -1
- package/dist/client/assets/pencil-line-DUlwRMAj.js +0 -1
- package/dist/client/assets/pencil-off-CxRkEWGQ.js +0 -1
- package/dist/client/assets/pencil-ruler-BasnZyBD.js +0 -1
- package/dist/client/assets/pentagon-B9ovqKDm.js +0 -1
- package/dist/client/assets/percent-CPaNVwS7.js +0 -1
- package/dist/client/assets/person-standing-Cx5iMUqa.js +0 -1
- package/dist/client/assets/philippine-peso-CG0m7FNq.js +0 -1
- package/dist/client/assets/phone-BYn6izLm.js +0 -1
- package/dist/client/assets/phone-call-C3aaBRmv.js +0 -1
- package/dist/client/assets/phone-forwarded-Dst6hTCx.js +0 -1
- package/dist/client/assets/phone-incoming-BF3gvkeD.js +0 -1
- package/dist/client/assets/phone-missed-CrW9yGNb.js +0 -1
- package/dist/client/assets/phone-off-4pn1y81O.js +0 -1
- package/dist/client/assets/phone-outgoing-skfCtqbH.js +0 -1
- package/dist/client/assets/pi-DtZQjHXH.js +0 -1
- package/dist/client/assets/piano-BcFVrSJ7.js +0 -1
- package/dist/client/assets/pickaxe-CMHLY6Jb.js +0 -1
- package/dist/client/assets/picture-in-picture-2-CjqV9Z4B.js +0 -1
- package/dist/client/assets/picture-in-picture-BEwQbKVY.js +0 -1
- package/dist/client/assets/pieDiagram-E7YTZNPT-BdgGeS_-.js +0 -39
- package/dist/client/assets/pieDiagram-E7YTZNPT-BdgGeS_-.js.br +0 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-BdgGeS_-.js.gz +0 -0
- package/dist/client/assets/piggy-bank-BaGFIvgt.js +0 -1
- package/dist/client/assets/pilcrow-Hd9mKqoF.js +0 -1
- package/dist/client/assets/pilcrow-left-1mbR8aXr.js +0 -1
- package/dist/client/assets/pilcrow-right-CEWxTRbc.js +0 -1
- package/dist/client/assets/pill-C-qTc9H6.js +0 -1
- package/dist/client/assets/pill-bottle-CTUVW_xa.js +0 -1
- package/dist/client/assets/pipette-CMaYZNfL.js +0 -1
- package/dist/client/assets/pizza-C2-eo-lo.js +0 -1
- package/dist/client/assets/plane-BgJaGBeg.js +0 -1
- package/dist/client/assets/plane-landing-lEoMkBFn.js +0 -1
- package/dist/client/assets/plane-takeoff-CDHNJCeL.js +0 -1
- package/dist/client/assets/play-DjDwToXl.js +0 -1
- package/dist/client/assets/plug-2-B80sG8mZ.js +0 -1
- package/dist/client/assets/plug-C6Zm9gGG.js +0 -1
- package/dist/client/assets/plug-zap-D4aRrxY1.js +0 -1
- package/dist/client/assets/pocket-knife-CLrbpeI5.js +0 -1
- package/dist/client/assets/podcast-BtDX-vyk.js +0 -1
- package/dist/client/assets/pointer-C7tis7zg.js +0 -1
- package/dist/client/assets/pointer-off-DwiFxr0S.js +0 -1
- package/dist/client/assets/popcorn-CRb0bj9C.js +0 -1
- package/dist/client/assets/popsicle-mzW30KDr.js +0 -1
- package/dist/client/assets/pound-sterling-erf5cloa.js +0 -1
- package/dist/client/assets/power-JYCYBXfK.js +0 -1
- package/dist/client/assets/power-off-BA6tmNpV.js +0 -1
- package/dist/client/assets/presentation-DfXKIetM.js +0 -1
- package/dist/client/assets/printer-DC8WW2tT.js +0 -1
- package/dist/client/assets/printer-check-Cx0naIVz.js +0 -1
- package/dist/client/assets/printer-x-ChO4lvf6.js +0 -1
- package/dist/client/assets/projector-D-l1Mq4U.js +0 -1
- package/dist/client/assets/proportions-CrV_IfkP.js +0 -1
- package/dist/client/assets/puzzle-DvR1t--K.js +0 -1
- package/dist/client/assets/pyramid-C5VZHuIb.js +0 -1
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-DbN-msZe.js +0 -7
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-DbN-msZe.js.br +0 -0
- package/dist/client/assets/quadrantDiagram-AXDQQJYC-DbN-msZe.js.gz +0 -0
- package/dist/client/assets/quote-D8ld3Moa.js +0 -1
- package/dist/client/assets/rabbit-uzVzT6Z2.js +0 -1
- package/dist/client/assets/radar-z-tDBS4i.js +0 -1
- package/dist/client/assets/radiation-C730tcnw.js +0 -1
- package/dist/client/assets/radical-IaaetGz2.js +0 -1
- package/dist/client/assets/radio-BTg_yssg.js +0 -1
- package/dist/client/assets/radio-off-DFWV1fBn.js +0 -1
- package/dist/client/assets/radio-receiver-6LOTwAnV.js +0 -1
- package/dist/client/assets/radio-tower-c_koXN4T.js +0 -1
- package/dist/client/assets/radius-C-kxX3L7.js +0 -1
- package/dist/client/assets/railroadDiagram-O6MQD6OU-By-NUU3I.js +0 -1
- package/dist/client/assets/railroadDiagram-O6MQD6OU-By-NUU3I.js.br +0 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-By-NUU3I.js.gz +0 -0
- package/dist/client/assets/rainbow-DFguIk3K.js +0 -1
- package/dist/client/assets/rat-CH19981Y.js +0 -1
- package/dist/client/assets/ratio-B0c5yQPe.js +0 -1
- package/dist/client/assets/rdpSession-Bw-ppCD3.js +0 -1
- package/dist/client/assets/rdpSession-Bw-ppCD3.js.br +0 -0
- package/dist/client/assets/rdpSession-Bw-ppCD3.js.gz +0 -0
- package/dist/client/assets/receipt-U5CjiUzm.js +0 -1
- package/dist/client/assets/receipt-cent-TbS-Cp3O.js +0 -1
- package/dist/client/assets/receipt-euro-DBRxa_H-.js +0 -1
- package/dist/client/assets/receipt-indian-rupee-D0yD7pSZ.js +0 -1
- package/dist/client/assets/receipt-japanese-yen-Cninepca.js +0 -1
- package/dist/client/assets/receipt-pound-sterling-D9-akhdQ.js +0 -1
- package/dist/client/assets/receipt-russian-ruble-BNkH8Lot.js +0 -1
- package/dist/client/assets/receipt-swiss-franc-td_LQVyT.js +0 -1
- package/dist/client/assets/receipt-text-CAC9Qdwi.js +0 -1
- package/dist/client/assets/receipt-turkish-lira-BbRdKMgH.js +0 -1
- package/dist/client/assets/rectangle-circle-CbTiS7PI.js +0 -1
- package/dist/client/assets/rectangle-ellipsis-DEWleGxe.js +0 -1
- package/dist/client/assets/rectangle-goggles-8mJc6v4y.js +0 -1
- package/dist/client/assets/rectangle-horizontal-B9rDe0ZB.js +0 -1
- package/dist/client/assets/rectangle-vertical-DBTG22RE.js +0 -1
- package/dist/client/assets/recycle-B1phJTY2.js +0 -1
- package/dist/client/assets/redo-2-BL4-PRD2.js +0 -1
- package/dist/client/assets/redo-DBxr89De.js +0 -1
- package/dist/client/assets/redo-dot-BMavvj_0.js +0 -1
- package/dist/client/assets/referenceSelection-DIUUdCoq.js +0 -4
- package/dist/client/assets/referenceSelection-DIUUdCoq.js.br +0 -0
- package/dist/client/assets/referenceSelection-DIUUdCoq.js.gz +0 -0
- package/dist/client/assets/refresh-ccw-COOC3_Kc.js +0 -1
- package/dist/client/assets/refresh-ccw-dot-t7fLgvXL.js +0 -1
- package/dist/client/assets/refresh-cw-off-BY1Xr1zA.js +0 -1
- package/dist/client/assets/refrigerator-BRXEc0Je.js +0 -1
- package/dist/client/assets/regex-CEjJNxPF.js +0 -1
- package/dist/client/assets/remove-formatting-naTzj2UJ.js +0 -1
- package/dist/client/assets/repeat-1-Cjzcy4np.js +0 -1
- package/dist/client/assets/repeat-2-CeiNgXvo.js +0 -1
- package/dist/client/assets/repeat-B0wPzc0-.js +0 -1
- package/dist/client/assets/repeat-off-DyM5rALe.js +0 -1
- package/dist/client/assets/replace-BUajZWys.js +0 -1
- package/dist/client/assets/replace-all-Dr0bERfT.js +0 -1
- package/dist/client/assets/reply-DgqlsJo0.js +0 -1
- package/dist/client/assets/reply-all-Baveitcn.js +0 -1
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CAfJitGh.js +0 -84
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CAfJitGh.js.br +0 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CAfJitGh.js.gz +0 -0
- package/dist/client/assets/rewind-D-k6OmKx.js +0 -1
- package/dist/client/assets/ribbon-B1tyEvuR.js +0 -1
- package/dist/client/assets/road-CCTiuwc0.js +0 -1
- package/dist/client/assets/rocking-chair-UmwmNgFT.js +0 -1
- package/dist/client/assets/roller-coaster-LAn8qCk6.js +0 -1
- package/dist/client/assets/rose-Q3hWWK9G.js +0 -1
- package/dist/client/assets/rotate-3d-NkQG1DrT.js +0 -1
- package/dist/client/assets/rotate-ccw-key-8-f2iOnf.js +0 -1
- package/dist/client/assets/rotate-ccw-square-C5lJHiKv.js +0 -1
- package/dist/client/assets/rotate-cw-s9EgijPH.js +0 -1
- package/dist/client/assets/rotate-cw-square-BBYQtVsm.js +0 -1
- package/dist/client/assets/route-C45wUQiR.js +0 -1
- package/dist/client/assets/route-off-CvyU6yU0.js +0 -1
- package/dist/client/assets/router-CC8tY5PS.js +0 -1
- package/dist/client/assets/rows-2-7yFJ9MxZ.js +0 -1
- package/dist/client/assets/rows-3-aGY8uF7y.js +0 -1
- package/dist/client/assets/rows-4-BLabmvLW.js +0 -1
- package/dist/client/assets/rss-mnSTQj9m.js +0 -1
- package/dist/client/assets/ruler-dimension-line-Yt22ul1w.js +0 -1
- package/dist/client/assets/ruler-udMEk3JM.js +0 -1
- package/dist/client/assets/russian-ruble-CQaIh1sG.js +0 -1
- package/dist/client/assets/sailboat-D8nWTh2W.js +0 -1
- package/dist/client/assets/salad-BqyMDnKp.js +0 -1
- package/dist/client/assets/sandwich-D1LWQcQp.js +0 -1
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-CRYeobsf.js +0 -40
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-CRYeobsf.js.br +0 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-CRYeobsf.js.gz +0 -0
- package/dist/client/assets/satellite-CaUX71XB.js +0 -1
- package/dist/client/assets/satellite-dish-xQDEgSwc.js +0 -1
- package/dist/client/assets/saudi-riyal-B_1GFOLy.js +0 -1
- package/dist/client/assets/save-DncScGJP.js +0 -1
- package/dist/client/assets/save-all-CFe72QCj.js +0 -1
- package/dist/client/assets/save-off-BI-DctGH.js +0 -1
- package/dist/client/assets/scale-3d-BnalVO_R.js +0 -1
- package/dist/client/assets/scale-CUN09Ltf.js +0 -1
- package/dist/client/assets/scaling-Ct62JOsa.js +0 -1
- package/dist/client/assets/scan-Dal-y293.js +0 -1
- package/dist/client/assets/scan-barcode-CkAZ4N-m.js +0 -1
- package/dist/client/assets/scan-eye-BP3BheG6.js +0 -1
- package/dist/client/assets/scan-face-DZfHkskb.js +0 -1
- package/dist/client/assets/scan-heart-CZTQqi7R.js +0 -1
- package/dist/client/assets/scan-line-bcQH4z-u.js +0 -1
- package/dist/client/assets/scan-qr-code-DdbVTbtZ.js +0 -1
- package/dist/client/assets/scan-search-DNWffYNr.js +0 -1
- package/dist/client/assets/scan-text-Cku1S3BQ.js +0 -1
- package/dist/client/assets/school-D4BDxRKx.js +0 -1
- package/dist/client/assets/scissors-CcBaD64-.js +0 -1
- package/dist/client/assets/scissors-line-dashed-Dj7rmLcO.js +0 -1
- package/dist/client/assets/scooter-7j6jaqlv.js +0 -1
- package/dist/client/assets/screen-share--1mdn1SW.js +0 -1
- package/dist/client/assets/screen-share-off-DQ29nVFb.js +0 -1
- package/dist/client/assets/scroll-BdzEaJ47.js +0 -1
- package/dist/client/assets/scroll-text-B2GMtoSX.js +0 -1
- package/dist/client/assets/search-CNxIzILW.js +0 -1
- package/dist/client/assets/search-alert-Cir1EbrS.js +0 -1
- package/dist/client/assets/search-check-DC-QpIm8.js +0 -1
- package/dist/client/assets/search-code-CsWb5IfY.js +0 -1
- package/dist/client/assets/search-slash-pfUQqp_B.js +0 -1
- package/dist/client/assets/search-x-Dc6xovIU.js +0 -1
- package/dist/client/assets/section-CGKuqwKd.js +0 -1
- package/dist/client/assets/send-BZJGaG5z.js +0 -1
- package/dist/client/assets/send-horizontal-zzTnNguy.js +0 -1
- package/dist/client/assets/send-to-back-BQ_t4z4Y.js +0 -1
- package/dist/client/assets/separator-horizontal-DRD0P9e1.js +0 -1
- package/dist/client/assets/separator-vertical-CmmSawsG.js +0 -1
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-DrsS23Va.js +0 -162
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-DrsS23Va.js.br +0 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-DrsS23Va.js.gz +0 -0
- package/dist/client/assets/server-cog-YHT-fpym.js +0 -1
- package/dist/client/assets/server-crash-DCUhQwaN.js +0 -1
- package/dist/client/assets/server-off-UOP2BwSW.js +0 -1
- package/dist/client/assets/sessionChatStartup-BVcitqcT.js +0 -1
- package/dist/client/assets/sessionChatStartup-BVcitqcT.js.br +0 -0
- package/dist/client/assets/sessionChatStartup-BVcitqcT.js.gz +0 -0
- package/dist/client/assets/settings-2-DyJ7Sttq.js +0 -1
- package/dist/client/assets/settings-B9O4WPgf.js +0 -1
- package/dist/client/assets/shapes-q_7nbZJT.js +0 -1
- package/dist/client/assets/share-7NUtwT9y.js +0 -1
- package/dist/client/assets/sheet-CIqa-aRP.js +0 -1
- package/dist/client/assets/shell-BlwxWdxK.js +0 -1
- package/dist/client/assets/shelving-unit-Ba4Q_0r1.js +0 -1
- package/dist/client/assets/shield-S0IpS6uO.js +0 -1
- package/dist/client/assets/shield-alert-DoCsR1Ky.js +0 -1
- package/dist/client/assets/shield-ban-C__kGAoG.js +0 -1
- package/dist/client/assets/shield-check-C19KDlEJ.js +0 -1
- package/dist/client/assets/shield-cog-B1lGTOxT.js +0 -1
- package/dist/client/assets/shield-cog-corner-COmne0ec.js +0 -1
- package/dist/client/assets/shield-ellipsis-BmZg0Y8N.js +0 -1
- package/dist/client/assets/shield-half-CdOW3Uw4.js +0 -1
- package/dist/client/assets/shield-minus-qKdsfVPF.js +0 -1
- package/dist/client/assets/shield-off-Cl1Fv1pw.js +0 -1
- package/dist/client/assets/shield-plus-BOtH2wBS.js +0 -1
- package/dist/client/assets/shield-question-mark-Cy23wUCs.js +0 -1
- package/dist/client/assets/shield-user-CcdWAYrp.js +0 -1
- package/dist/client/assets/shield-x-DFiFJOTc.js +0 -1
- package/dist/client/assets/ship-Cewdc8Le.js +0 -1
- package/dist/client/assets/ship-wheel-BILsJBrN.js +0 -1
- package/dist/client/assets/shirt-1YXwYgEJ.js +0 -1
- package/dist/client/assets/shopping-bag-B78GBZxO.js +0 -1
- package/dist/client/assets/shopping-basket-D9nQm2oO.js +0 -1
- package/dist/client/assets/shopping-cart-DKP-FTW0.js +0 -1
- package/dist/client/assets/shovel-YkZbELHf.js +0 -1
- package/dist/client/assets/shower-head-CVuULbSH.js +0 -1
- package/dist/client/assets/shredder-BvgT9nbF.js +0 -1
- package/dist/client/assets/shrimp-CyWQvqDF.js +0 -1
- package/dist/client/assets/shrink-C9IltI7o.js +0 -1
- package/dist/client/assets/shrub-CyhZQOMn.js +0 -1
- package/dist/client/assets/shuffle-B-VTtKYL.js +0 -1
- package/dist/client/assets/sigma-B6Rk_9YG.js +0 -1
- package/dist/client/assets/signal-Cg4P3y9M.js +0 -1
- package/dist/client/assets/signal-high-Bi-XmGkd.js +0 -1
- package/dist/client/assets/signal-low-DQB-EdYW.js +0 -1
- package/dist/client/assets/signal-medium-BCQHZ1NM.js +0 -1
- package/dist/client/assets/signal-zero-T7OFoEAz.js +0 -1
- package/dist/client/assets/signature-DfzK11MV.js +0 -1
- package/dist/client/assets/signpost-DGT72pzp.js +0 -1
- package/dist/client/assets/signpost-big-B4y6RocG.js +0 -1
- package/dist/client/assets/siren-B0ssOvDE.js +0 -1
- package/dist/client/assets/sizeCapture-INFHLROL-Cobg-2Rz.js +0 -1
- package/dist/client/assets/sizeCapture-INFHLROL-Cobg-2Rz.js.br +0 -0
- package/dist/client/assets/sizeCapture-INFHLROL-Cobg-2Rz.js.gz +0 -0
- package/dist/client/assets/skip-back-C5zYQYwv.js +0 -1
- package/dist/client/assets/skip-forward-B4a4hDzc.js +0 -1
- package/dist/client/assets/skull-DIpm1wHP.js +0 -1
- package/dist/client/assets/slash-BN-ACvCL.js +0 -1
- package/dist/client/assets/slice-D6VVw7p2.js +0 -1
- package/dist/client/assets/sliders-horizontal-CTkgSJLE.js +0 -1
- package/dist/client/assets/sliders-vertical-M6rtRfzl.js +0 -1
- package/dist/client/assets/smartphone-charging-EqaYt3iC.js +0 -1
- package/dist/client/assets/smartphone-nfc-DSpTeVmd.js +0 -1
- package/dist/client/assets/smile-CNLR9I-r.js +0 -1
- package/dist/client/assets/smile-plus-B_k5NDK6.js +0 -1
- package/dist/client/assets/snail-BM3_wQID.js +0 -1
- package/dist/client/assets/snowflake-u0A9GPbd.js +0 -1
- package/dist/client/assets/soap-dispenser-droplet-BrHYgDkn.js +0 -1
- package/dist/client/assets/sofa-CM9WQNH7.js +0 -1
- package/dist/client/assets/solar-panel-BcmgBC7-.js +0 -1
- package/dist/client/assets/soup-CTM9h7Ke.js +0 -1
- package/dist/client/assets/space-gc3xFZ5u.js +0 -1
- package/dist/client/assets/spade-CmcYP-ER.js +0 -1
- package/dist/client/assets/sparkle-O0o58m47.js +0 -1
- package/dist/client/assets/speaker-aFP_x5_X.js +0 -1
- package/dist/client/assets/speech-CH-C680A.js +0 -1
- package/dist/client/assets/spell-check-2-CM8wU6zz.js +0 -1
- package/dist/client/assets/spell-check-B_z97o8F.js +0 -1
- package/dist/client/assets/spline-DmKaPkdu.js +0 -1
- package/dist/client/assets/spline-pointer-Bi7Qxm-4.js +0 -1
- package/dist/client/assets/split-CnNoqXt1.js +0 -1
- package/dist/client/assets/spool-C0ssbnwn.js +0 -1
- package/dist/client/assets/sport-shoe-D5o2R9lV.js +0 -1
- package/dist/client/assets/spotlight-CORyR07s.js +0 -1
- package/dist/client/assets/spray-can-C7Dl0CIq.js +0 -1
- package/dist/client/assets/sprout-DISxkKPV.js +0 -1
- package/dist/client/assets/square-CNCIyQgd.js +0 -1
- package/dist/client/assets/square-activity-Bd9CDa9C.js +0 -1
- package/dist/client/assets/square-arrow-down-BXexw6ZE.js +0 -1
- package/dist/client/assets/square-arrow-down-left-Dt7sotwH.js +0 -1
- package/dist/client/assets/square-arrow-down-right-CvgxlcdJ.js +0 -1
- package/dist/client/assets/square-arrow-left-CEbnJ8AV.js +0 -1
- package/dist/client/assets/square-arrow-out-down-left-EH8ALJ3M.js +0 -1
- package/dist/client/assets/square-arrow-out-down-right-DPDCBW6B.js +0 -1
- package/dist/client/assets/square-arrow-out-up-left-znV2qzjM.js +0 -1
- package/dist/client/assets/square-arrow-right-DQ4tvkfs.js +0 -1
- package/dist/client/assets/square-arrow-right-enter-QiyR83o6.js +0 -1
- package/dist/client/assets/square-arrow-right-exit-mO-BMBne.js +0 -1
- package/dist/client/assets/square-arrow-up-CIC0gQeI.js +0 -1
- package/dist/client/assets/square-arrow-up-left-C4VEnn1E.js +0 -1
- package/dist/client/assets/square-arrow-up-right-w2Cn3In9.js +0 -1
- package/dist/client/assets/square-asterisk-_dCiXGcT.js +0 -1
- package/dist/client/assets/square-bottom-dashed-scissors-0lPp3aGd.js +0 -1
- package/dist/client/assets/square-centerline-dashed-horizontal-B15PVeSj.js +0 -1
- package/dist/client/assets/square-centerline-dashed-vertical-kwlOYYG-.js +0 -1
- package/dist/client/assets/square-chart-gantt-CKPXRroq.js +0 -1
- package/dist/client/assets/square-check-CGeSp38T.js +0 -1
- package/dist/client/assets/square-check-big-Dorw2GCA.js +0 -1
- package/dist/client/assets/square-chevron-down-0dCLyd0R.js +0 -1
- package/dist/client/assets/square-chevron-left-BHtpTRiV.js +0 -1
- package/dist/client/assets/square-chevron-right-xMiVHzbj.js +0 -1
- package/dist/client/assets/square-chevron-up-ClbSlEgF.js +0 -1
- package/dist/client/assets/square-code-BLsI8yOw.js +0 -1
- package/dist/client/assets/square-dashed-PFl7hD8I.js +0 -1
- package/dist/client/assets/square-dashed-bottom-CtbwAo78.js +0 -1
- package/dist/client/assets/square-dashed-bottom-code-CvEeJsZM.js +0 -1
- package/dist/client/assets/square-dashed-kanban-DWWqXj7q.js +0 -1
- package/dist/client/assets/square-dashed-mouse-pointer-C68-qljp.js +0 -1
- package/dist/client/assets/square-dashed-text-B0u5f_f4.js +0 -1
- package/dist/client/assets/square-dashed-top-solid-DZT43c0H.js +0 -1
- package/dist/client/assets/square-divide-CmBfsFgI.js +0 -1
- package/dist/client/assets/square-dot-D6A50W_j.js +0 -1
- package/dist/client/assets/square-equal-DbH4VLuN.js +0 -1
- package/dist/client/assets/square-function-Bbef8xs-.js +0 -1
- package/dist/client/assets/square-kanban-Bgdm8cPV.js +0 -1
- package/dist/client/assets/square-library-BBjUMnRx.js +0 -1
- package/dist/client/assets/square-m-DKrlb2xM.js +0 -1
- package/dist/client/assets/square-menu-6qsYJJVx.js +0 -1
- package/dist/client/assets/square-minus-39-O-_lT.js +0 -1
- package/dist/client/assets/square-mouse-pointer-BuPsVe3Z.js +0 -1
- package/dist/client/assets/square-parking-DngrHCdw.js +0 -1
- package/dist/client/assets/square-parking-off-DbfGrCHY.js +0 -1
- package/dist/client/assets/square-pause-DNJghfyJ.js +0 -1
- package/dist/client/assets/square-pen-BJfm1IAl.js +0 -1
- package/dist/client/assets/square-percent-CutHa-vW.js +0 -1
- package/dist/client/assets/square-pi-DZTtX6J2.js +0 -1
- package/dist/client/assets/square-pilcrow-B9_KhuJV.js +0 -1
- package/dist/client/assets/square-play-B7-hpxCq.js +0 -1
- package/dist/client/assets/square-plus-BuJAugj7.js +0 -1
- package/dist/client/assets/square-power-BamiyTEX.js +0 -1
- package/dist/client/assets/square-radical-DOc-4uXL.js +0 -1
- package/dist/client/assets/square-round-corner-CazudUWG.js +0 -1
- package/dist/client/assets/square-scissors-CdMdB2LY.js +0 -1
- package/dist/client/assets/square-sigma-DFYRxtKs.js +0 -1
- package/dist/client/assets/square-slash-BFFT9Bbp.js +0 -1
- package/dist/client/assets/square-split-horizontal-Cg1LlzgG.js +0 -1
- package/dist/client/assets/square-split-vertical-obb8E61V.js +0 -1
- package/dist/client/assets/square-square-BA656MCt.js +0 -1
- package/dist/client/assets/square-stack-BnGkcDyd.js +0 -1
- package/dist/client/assets/square-star-psZKZS3K.js +0 -1
- package/dist/client/assets/square-stop-B1fk3aQS.js +0 -1
- package/dist/client/assets/square-user-KrZT3D-N.js +0 -1
- package/dist/client/assets/square-user-round-D6C7jIX0.js +0 -1
- package/dist/client/assets/square-x-CrDGoa6B.js +0 -1
- package/dist/client/assets/squares-exclude-Ci3RnpFb.js +0 -1
- package/dist/client/assets/squares-intersect-CUxgeuth.js +0 -1
- package/dist/client/assets/squares-subtract-CzhxMlDL.js +0 -1
- package/dist/client/assets/squares-unite-BzZJGLaw.js +0 -1
- package/dist/client/assets/squircle-BbUQpfRC.js +0 -1
- package/dist/client/assets/squircle-dashed-Da0RiTC5.js +0 -1
- package/dist/client/assets/squirrel-BwQ72WLD.js +0 -1
- package/dist/client/assets/stamp-B4-hkec3.js +0 -1
- package/dist/client/assets/star-B7IXPtE2.js +0 -1
- package/dist/client/assets/star-half-BTmHJ1kp.js +0 -1
- package/dist/client/assets/star-off-Ci1jNP84.js +0 -1
- package/dist/client/assets/stateDiagram-D77RDMKH-DkYKbv7H.js +0 -1
- package/dist/client/assets/stateDiagram-D77RDMKH-DkYKbv7H.js.br +0 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-DkYKbv7H.js.gz +0 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CUE-9xAF.js +0 -1
- package/dist/client/assets/step-back-CjiRnmBz.js +0 -1
- package/dist/client/assets/step-forward-Dn0I2YSa.js +0 -1
- package/dist/client/assets/stethoscope-dO0SKlqT.js +0 -1
- package/dist/client/assets/sticker-BoxSJl6C.js +0 -1
- package/dist/client/assets/sticky-note-EwUQY_YZ.js +0 -1
- package/dist/client/assets/sticky-note-check-D_nxG098.js +0 -1
- package/dist/client/assets/sticky-note-minus-6IetFqbn.js +0 -1
- package/dist/client/assets/sticky-note-off-CydlZXP3.js +0 -1
- package/dist/client/assets/sticky-note-plus-41y_ncu0.js +0 -1
- package/dist/client/assets/sticky-note-x-DDS6fiUH.js +0 -1
- package/dist/client/assets/sticky-notes-CdFIn19L.js +0 -1
- package/dist/client/assets/stone-DE8yNk58.js +0 -1
- package/dist/client/assets/store-CAsnxtPK.js +0 -1
- package/dist/client/assets/stretch-horizontal-B0oABfWG.js +0 -1
- package/dist/client/assets/stretch-vertical-CeBtNUGB.js +0 -1
- package/dist/client/assets/strikethrough-DV9kcOdN.js +0 -1
- package/dist/client/assets/subscript-CaM0DxEe.js +0 -1
- package/dist/client/assets/sun-D_u1UuFR.js +0 -1
- package/dist/client/assets/sun-dim-Di1OBuXE.js +0 -1
- package/dist/client/assets/sun-medium-oI2Qijxs.js +0 -1
- package/dist/client/assets/sun-moon-BM1gpD6_.js +0 -1
- package/dist/client/assets/sun-snow-Bbts8vj7.js +0 -1
- package/dist/client/assets/sunrise-BB0UZukt.js +0 -1
- package/dist/client/assets/sunset-Bp14_SI-.js +0 -1
- package/dist/client/assets/superscript-V2wn-axB.js +0 -1
- package/dist/client/assets/swatch-book-DOKfBMgZ.js +0 -1
- package/dist/client/assets/swimlanes-42K2YHIH-s4ndAWte.js +0 -1
- package/dist/client/assets/swimlanes-42K2YHIH-s4ndAWte.js.br +0 -0
- package/dist/client/assets/swimlanes-42K2YHIH-s4ndAWte.js.gz +0 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DY_5b3h0.js +0 -8
- package/dist/client/assets/swiper-VG6aXOqS.js +0 -1
- package/dist/client/assets/swiper-VG6aXOqS.js.br +0 -0
- package/dist/client/assets/swiper-VG6aXOqS.js.gz +0 -0
- package/dist/client/assets/swiss-franc-DPFvhXwu.js +0 -1
- package/dist/client/assets/switch-camera-ClGSr5Le.js +0 -1
- package/dist/client/assets/sword-LNiWPRbL.js +0 -1
- package/dist/client/assets/swords-DSL6uh8_.js +0 -1
- package/dist/client/assets/syringe-DkdSEpfa.js +0 -1
- package/dist/client/assets/table-2-B_onriPa.js +0 -1
- package/dist/client/assets/table-CPbu2KB4.js +0 -1
- package/dist/client/assets/table-cells-merge-B-vn92Uj.js +0 -1
- package/dist/client/assets/table-cells-split-ysz9futy.js +0 -1
- package/dist/client/assets/table-columns-split-DAoWI3eh.js +0 -1
- package/dist/client/assets/table-of-contents-DbKxAPTk.js +0 -1
- package/dist/client/assets/table-properties-DHhBIFsv.js +0 -1
- package/dist/client/assets/table-rows-split-5l0ylmuj.js +0 -1
- package/dist/client/assets/tablet-QQSCGBZe.js +0 -1
- package/dist/client/assets/tablet-smartphone-B21dd2O6.js +0 -1
- package/dist/client/assets/tablets-BDzS6PuT.js +0 -1
- package/dist/client/assets/tag-HeyA4zA4.js +0 -1
- package/dist/client/assets/tags-CfKdXDKL.js +0 -1
- package/dist/client/assets/tally-1-Bq1cLoj5.js +0 -1
- package/dist/client/assets/tally-2-B1YFFuMz.js +0 -1
- package/dist/client/assets/tally-3-CoB_iDQR.js +0 -1
- package/dist/client/assets/tally-4-BW0iDHrI.js +0 -1
- package/dist/client/assets/tally-5-CQbAktVG.js +0 -1
- package/dist/client/assets/tangent-CYf_1kKg.js +0 -1
- package/dist/client/assets/target-mC7SshSB.js +0 -1
- package/dist/client/assets/telescope-BAYLCjH4.js +0 -1
- package/dist/client/assets/tent-BnXCPF_o.js +0 -1
- package/dist/client/assets/tent-tree-DdpI4zu8.js +0 -1
- package/dist/client/assets/test-tube-DdiFdoZy.js +0 -1
- package/dist/client/assets/test-tube-diagonal-CsQJLM52.js +0 -1
- package/dist/client/assets/test-tubes-Cz7mz43S.js +0 -1
- package/dist/client/assets/text-align-center-BMAEko6F.js +0 -1
- package/dist/client/assets/text-align-end-BNzbzmGY.js +0 -1
- package/dist/client/assets/text-align-justify-nvAkgwNl.js +0 -1
- package/dist/client/assets/text-align-start-YW_uCyOc.js +0 -1
- package/dist/client/assets/text-cursor-Bm14X5Xx.js +0 -1
- package/dist/client/assets/text-cursor-input-CEUhocxr.js +0 -1
- package/dist/client/assets/text-initial-Cub8Fv1h.js +0 -1
- package/dist/client/assets/text-quote-D2bJ3hzM.js +0 -1
- package/dist/client/assets/text-search-C28FaCbh.js +0 -1
- package/dist/client/assets/text-wrap-BYhjspDn.js +0 -1
- package/dist/client/assets/theater-bvcP3hc0.js +0 -1
- package/dist/client/assets/thermometer-BGGSLG3i.js +0 -1
- package/dist/client/assets/thermometer-snowflake-0i0IZjk9.js +0 -1
- package/dist/client/assets/thermometer-sun-CWE_p9oD.js +0 -1
- package/dist/client/assets/thumbs-down-BQhWhg9D.js +0 -1
- package/dist/client/assets/thumbs-up-tx5S9Kfb.js +0 -1
- package/dist/client/assets/ticket-check-Divz4CrD.js +0 -1
- package/dist/client/assets/ticket-eT25Yorv.js +0 -1
- package/dist/client/assets/ticket-minus-BU3KZfuc.js +0 -1
- package/dist/client/assets/ticket-percent-BIKsCKf5.js +0 -1
- package/dist/client/assets/ticket-plus-BdqtkOBt.js +0 -1
- package/dist/client/assets/ticket-slash-BQD9q9R2.js +0 -1
- package/dist/client/assets/ticket-x-Cuu9YGvU.js +0 -1
- package/dist/client/assets/tickets-FJvFrbrn.js +0 -1
- package/dist/client/assets/tickets-plane-DGik_KRl.js +0 -1
- package/dist/client/assets/timeline-Bbrmts1_.js +0 -1
- package/dist/client/assets/timeline-definition-24CTP7MA-CMSIvkBF.js +0 -120
- package/dist/client/assets/timeline-definition-24CTP7MA-CMSIvkBF.js.br +0 -0
- package/dist/client/assets/timeline-definition-24CTP7MA-CMSIvkBF.js.gz +0 -0
- package/dist/client/assets/timer-DjKlCgO8.js +0 -1
- package/dist/client/assets/timer-off-BAIFr_fi.js +0 -1
- package/dist/client/assets/timer-reset-C6wQzzEZ.js +0 -1
- package/dist/client/assets/toggle-left-BNQ6xqrf.js +0 -1
- package/dist/client/assets/toggle-right-QRLPUdQa.js +0 -1
- package/dist/client/assets/toilet-IHy5fRzN.js +0 -1
- package/dist/client/assets/tool-case-BJGyaGgu.js +0 -1
- package/dist/client/assets/toolbox-DMUieQVM.js +0 -1
- package/dist/client/assets/tornado-BFsHzfXU.js +0 -1
- package/dist/client/assets/torus-BDhPuIaX.js +0 -1
- package/dist/client/assets/touchpad-CIiYcGMx.js +0 -1
- package/dist/client/assets/touchpad-off-CUOF7peF.js +0 -1
- package/dist/client/assets/towel-rack-DnTkDBpC.js +0 -1
- package/dist/client/assets/tower-control-Bx4BKtmA.js +0 -1
- package/dist/client/assets/toy-brick-C7sFkhC3.js +0 -1
- package/dist/client/assets/tractor-B9IINdVC.js +0 -1
- package/dist/client/assets/traffic-cone-DRZ04TUm.js +0 -1
- package/dist/client/assets/train-front-DU9rgYyX.js +0 -1
- package/dist/client/assets/train-front-tunnel-DXgCcPW3.js +0 -1
- package/dist/client/assets/train-track-BWt-WLR3.js +0 -1
- package/dist/client/assets/tram-front-BUSi-V2E.js +0 -1
- package/dist/client/assets/transgender-Dhz0cWml.js +0 -1
- package/dist/client/assets/trash-BxAjwK-e.js +0 -1
- package/dist/client/assets/tree-deciduous-B4VgjmOt.js +0 -1
- package/dist/client/assets/tree-palm-DcU09EsK.js +0 -1
- package/dist/client/assets/tree-pine-C_THVAJY.js +0 -1
- package/dist/client/assets/trees-aSg71Vf4.js +0 -1
- package/dist/client/assets/trending-down-Da6kIDLj.js +0 -1
- package/dist/client/assets/trending-up-DNKRDFBS.js +0 -1
- package/dist/client/assets/trending-up-down-CtJlUBu4.js +0 -1
- package/dist/client/assets/triangle-VZkQCwoG.js +0 -1
- package/dist/client/assets/triangle-alert-BB5_Y7SE.js +0 -1
- package/dist/client/assets/triangle-dashed-CSmdW8Eg.js +0 -1
- package/dist/client/assets/triangle-right-CuKLrN0Q.js +0 -1
- package/dist/client/assets/trophy-34g3Ic_n.js +0 -1
- package/dist/client/assets/truck-CFRrj7mn.js +0 -1
- package/dist/client/assets/truck-electric-D18ZwevM.js +0 -1
- package/dist/client/assets/turkish-lira-D2hbcX7v.js +0 -1
- package/dist/client/assets/turntable-BkO0_agN.js +0 -1
- package/dist/client/assets/turtle-B55Bw0RN.js +0 -1
- package/dist/client/assets/tv-CbpdR1TU.js +0 -1
- package/dist/client/assets/tv-minimal-DptiC8ck.js +0 -1
- package/dist/client/assets/tv-minimal-play-DVIXLRJT.js +0 -1
- package/dist/client/assets/type-D4Klx0wF.js +0 -1
- package/dist/client/assets/type-outline-BwJMBbWB.js +0 -1
- package/dist/client/assets/umbrella-YqlSjY6R.js +0 -1
- package/dist/client/assets/umbrella-off-CfFtudNx.js +0 -1
- package/dist/client/assets/underline-fM8M2w2_.js +0 -1
- package/dist/client/assets/undo-2-DNim_8Ch.js +0 -1
- package/dist/client/assets/undo-CFafCJas.js +0 -1
- package/dist/client/assets/undo-dot-BSOvGum1.js +0 -1
- package/dist/client/assets/unfold-horizontal-DhWHtH6d.js +0 -1
- package/dist/client/assets/unfold-vertical-DB0PTCEs.js +0 -1
- package/dist/client/assets/ungroup-DLVyuT0x.js +0 -1
- package/dist/client/assets/university-CU3JxFIJ.js +0 -1
- package/dist/client/assets/unlink-2-B62RlxlD.js +0 -1
- package/dist/client/assets/unlink-iw_Vt7KB.js +0 -1
- package/dist/client/assets/unplug-CblHj3LZ.js +0 -1
- package/dist/client/assets/upload-BW77nJ7u.js +0 -1
- package/dist/client/assets/usb-Dqxfk7kV.js +0 -1
- package/dist/client/assets/use-gesture-react.esm-WfpCPujg.js +0 -1
- package/dist/client/assets/use-gesture-react.esm-WfpCPujg.js.br +0 -0
- package/dist/client/assets/use-gesture-react.esm-WfpCPujg.js.gz +0 -0
- package/dist/client/assets/user-DTwvaKEl.js +0 -1
- package/dist/client/assets/user-check-sR7oSaMG.js +0 -1
- package/dist/client/assets/user-cog-BtONB7nm.js +0 -1
- package/dist/client/assets/user-key-CuQYbDoY.js +0 -1
- package/dist/client/assets/user-lock-B9Xk-hNt.js +0 -1
- package/dist/client/assets/user-minus-nBydEXSI.js +0 -1
- package/dist/client/assets/user-pen-Qin_t65o.js +0 -1
- package/dist/client/assets/user-plus-BblHDGMZ.js +0 -1
- package/dist/client/assets/user-round-B1ERZJpx.js +0 -1
- package/dist/client/assets/user-round-check-BoJfNHom.js +0 -1
- package/dist/client/assets/user-round-cog-IoH__n2F.js +0 -1
- package/dist/client/assets/user-round-key-8I3F1buK.js +0 -1
- package/dist/client/assets/user-round-minus-DGUXiKED.js +0 -1
- package/dist/client/assets/user-round-pen-COnoJXbe.js +0 -1
- package/dist/client/assets/user-round-plus-DujEt5Ou.js +0 -1
- package/dist/client/assets/user-round-search-i-FPWyxy.js +0 -1
- package/dist/client/assets/user-round-x-_acQY8Bw.js +0 -1
- package/dist/client/assets/user-search-Jv9nd_Bg.js +0 -1
- package/dist/client/assets/user-star-CYn_VDYG.js +0 -1
- package/dist/client/assets/user-x-Dqw0BxDj.js +0 -1
- package/dist/client/assets/users-D4oGtIXB.js +0 -1
- package/dist/client/assets/users-round-Qscd1W1l.js +0 -1
- package/dist/client/assets/utensils-CqDTz0ij.js +0 -1
- package/dist/client/assets/utensils-crossed-DUTBTigL.js +0 -1
- package/dist/client/assets/utility-pole-DeLAfaXm.js +0 -1
- package/dist/client/assets/van-Dc3zHQ7l.js +0 -1
- package/dist/client/assets/variable-D-LplrrL.js +0 -1
- package/dist/client/assets/vault-Y_xT_Oid.js +0 -1
- package/dist/client/assets/vector-square-D9ExGPAw.js +0 -1
- package/dist/client/assets/vegan-C8ym-VBQ.js +0 -1
- package/dist/client/assets/venetian-mask-Cic7tHEw.js +0 -1
- package/dist/client/assets/vennDiagram-4TSXK5OY-C0RURFux.js +0 -34
- package/dist/client/assets/vennDiagram-4TSXK5OY-C0RURFux.js.br +0 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-C0RURFux.js.gz +0 -0
- package/dist/client/assets/venus-CTkNdgGU.js +0 -1
- package/dist/client/assets/venus-and-mars-Itfkc_q2.js +0 -1
- package/dist/client/assets/vibrate-off-D-o3dOQq.js +0 -1
- package/dist/client/assets/vibrate-qOI4YhJN.js +0 -1
- package/dist/client/assets/video-off-BeGJFwLl.js +0 -1
- package/dist/client/assets/videoCompression-DSzAI-ua.js +0 -3
- package/dist/client/assets/videoCompression-DSzAI-ua.js.br +0 -0
- package/dist/client/assets/videoCompression-DSzAI-ua.js.gz +0 -0
- package/dist/client/assets/videotape-C1-K6onE.js +0 -1
- package/dist/client/assets/view-5zZbZIrP.js +0 -1
- package/dist/client/assets/voicemail-BZqaf7Z9.js +0 -1
- package/dist/client/assets/volleyball-OSEV998N.js +0 -1
- package/dist/client/assets/volume-1-Cgn-iO2h.js +0 -1
- package/dist/client/assets/volume-2-CvOUoYkF.js +0 -1
- package/dist/client/assets/volume-PFxGc7op.js +0 -1
- package/dist/client/assets/volume-off-DCBmZY7J.js +0 -1
- package/dist/client/assets/volume-x-BSJnHneC.js +0 -1
- package/dist/client/assets/vote-BE7-irpS.js +0 -1
- package/dist/client/assets/wallet-BrXw9TXk.js +0 -1
- package/dist/client/assets/wallet-cards-DlGLBahX.js +0 -1
- package/dist/client/assets/wallet-minimal-REDLx9OB.js +0 -1
- package/dist/client/assets/wallpaper-CG_NORgM.js +0 -1
- package/dist/client/assets/wand-Cp18509b.js +0 -1
- package/dist/client/assets/wand-sparkles-fle-WPN7.js +0 -1
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-W7N7sB3t.js +0 -78
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-W7N7sB3t.js.br +0 -0
- package/dist/client/assets/wardleyDiagram-VM6X3IG4-W7N7sB3t.js.gz +0 -0
- package/dist/client/assets/warehouse-BDQNJlfJ.js +0 -1
- package/dist/client/assets/washing-machine-Csy1RKjv.js +0 -1
- package/dist/client/assets/watch-B7yjHRZD.js +0 -1
- package/dist/client/assets/waves-arrow-down-b3v3OgMH.js +0 -1
- package/dist/client/assets/waves-arrow-up-BMuN8ZTt.js +0 -1
- package/dist/client/assets/waves-horizontal-Bods5MNP.js +0 -1
- package/dist/client/assets/waves-ladder-CCedCbLt.js +0 -1
- package/dist/client/assets/waves-vertical-6Ubnf8Fr.js +0 -1
- package/dist/client/assets/waypoints-B-04tbpn.js +0 -1
- package/dist/client/assets/webcam-CHTmM1e8.js +0 -1
- package/dist/client/assets/webhook-DhbLWYht.js +0 -1
- package/dist/client/assets/webhook-off-wTO0D1oT.js +0 -1
- package/dist/client/assets/weight-BD4yUdVy.js +0 -1
- package/dist/client/assets/weight-tilde-CwwN-KLt.js +0 -1
- package/dist/client/assets/wheat-C9wbgoyd.js +0 -1
- package/dist/client/assets/wheat-off-7RFz7nNt.js +0 -1
- package/dist/client/assets/whole-word-D2YrkwSz.js +0 -1
- package/dist/client/assets/wifi-B9sKHl7b.js +0 -1
- package/dist/client/assets/wifi-cog-CImq-mE-.js +0 -1
- package/dist/client/assets/wifi-high-B7HZjUs2.js +0 -1
- package/dist/client/assets/wifi-low-DZN7YLA0.js +0 -1
- package/dist/client/assets/wifi-pen-CtwT8HmS.js +0 -1
- package/dist/client/assets/wifi-sync-HCd4ntKM.js +0 -1
- package/dist/client/assets/wifi-zero-D7btxQWe.js +0 -1
- package/dist/client/assets/wind-BA6v5KL3.js +0 -1
- package/dist/client/assets/wind-arrow-down-CLc1Vf8N.js +0 -1
- package/dist/client/assets/wine-D09mHAAo.js +0 -1
- package/dist/client/assets/wine-off-l5jrPaiO.js +0 -1
- package/dist/client/assets/workflow-4K5mADvt.js +0 -1
- package/dist/client/assets/worm-CkYpDfFY.js +0 -1
- package/dist/client/assets/wrench-iC8xpnU-.js +0 -1
- package/dist/client/assets/x-line-top-DWJqMph5.js +0 -1
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-D2U_7L5K.js +0 -7
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-D2U_7L5K.js.br +0 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-D2U_7L5K.js.gz +0 -0
- package/dist/client/assets/zap-BieGD6jo.js +0 -1
- package/dist/client/assets/zap-off-CXA_yE3p.js +0 -1
- package/dist/client/assets/zodiac-aquarius-CpKhXYpz.js +0 -1
- package/dist/client/assets/zodiac-aries-oFGIECvl.js +0 -1
- package/dist/client/assets/zodiac-cancer-CnGelbCH.js +0 -1
- package/dist/client/assets/zodiac-capricorn-BguSGNjg.js +0 -1
- package/dist/client/assets/zodiac-gemini-BbhRwecX.js +0 -1
- package/dist/client/assets/zodiac-leo-BNXBjPzF.js +0 -1
- package/dist/client/assets/zodiac-libra-DpVQ0BhN.js +0 -1
- package/dist/client/assets/zodiac-ophiuchus-BQzFyKnh.js +0 -1
- package/dist/client/assets/zodiac-pisces-6o2bXf1e.js +0 -1
- package/dist/client/assets/zodiac-sagittarius-BeXdoJqF.js +0 -1
- package/dist/client/assets/zodiac-scorpio-CpR_Ebn-.js +0 -1
- package/dist/client/assets/zodiac-taurus-Da7Bgvq6.js +0 -1
- package/dist/client/assets/zodiac-virgo-Cjj2fJln.js +0 -1
- package/dist/client/assets/zoom-in-DLooe1YW.js +0 -1
- package/dist/client/assets/zoom-out-D3ujk-VQ.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/passwordBootstrap-CSqoknIM.js","assets/dnd-CYu7YLJF.js","assets/terminal-DaiFCKy_.js","assets/videoCompression-D3xjArgT.js","assets/SessionResourceSidebar-DFIIPO6_.js","assets/RecordingSaveDialog-CWWYeUxo.js","assets/use-gesture-react.esm-hemdHJy0.js","assets/gestureArbiter-DszagC-d.js","assets/house-CoEifWNN.js","assets/folder-tree-h3SurjGE.js","assets/upload-BnC0cOC4.js","assets/SessionChatView-BwYmQVwO.js","assets/sessionChatStartup-B8kGGezM.js","assets/sessionChatStartup-BqUw9ShQ.css","assets/Markdown-DjAUiDpR.js","assets/swiper-DnY6b8V3.js","assets/swiper-C2J0D0kV.css","assets/referenceSelection-CbbewZEI.js","assets/list-tree-C69eYqUt.js","assets/Markdown-DKQhs57e.css","assets/quote-CEmvIPIv.js","assets/sliders-horizontal-BVy4gQBR.js","assets/arrow-down-DvG8DZll.js","assets/App-B2ioVIx_.js","assets/link-D4yDVdfg.js","assets/layout-grid-C3HqGT0i.js","assets/log-out-Do4mr8vI.js","assets/triangle-alert-DUYUEcdi.js","assets/grip-vertical-yChGWVJL.js","assets/wand-sparkles-DafqKh-P.js","assets/file-up-B8uXK3j9.js","assets/corner-down-left-Czobekks.js","assets/clipboard-BFiy7IFX.js","assets/move-BMYxj6w3.js","assets/clipboard-paste-CtQ8YWE5.js","assets/v4-EwEgHOG0.js","assets/GitLoadingSkeleton-C9USfqvg.js","assets/panel-left-close-CFlQIvSX.js","assets/panel-left-open-taxYOOUG.js","assets/panel-right-close-CqL9EUdd.js","assets/panel-right-open-DukQ3QIl.js","assets/archive-C0c-bpzE.js","assets/circle-question-mark-BxVJnTzQ.js","assets/circle-dot-sgWI70_v.js","assets/history-DgrylIf5.js","assets/settings-B6dMOV_j.js","assets/search-VkXrFvvs.js","assets/users-CohBFiM5.js","assets/settings-2-C_3Wu-fF.js","assets/layout-dashboard-C1FYCzEr.js","assets/star-CqFqoWCE.js","assets/circle-DWc6-tOe.js","assets/play-DAo6Xp3l.js","assets/send-D1megw4C.js","assets/external-link-Ccu_jrFO.js","assets/maximize-2-BQDmhW99.js","assets/calendar-clock-Bt7T-ToC.js","assets/pause-BgYhIaFa.js","assets/unlink-BFyDfOOw.js","assets/chart-bar-DEaynh4K.js","assets/workflow-CXhyZaCb.js","assets/rows-2-DlTTN9Oo.js","assets/grid-2x2-BjriuHwD.js","assets/pencil-line-Cj9bY0f6.js","assets/git-branch-1BKA8wJs.js","assets/git-compare-Cbp54T_a.js","assets/network-CcMCvhJC.js","assets/AndroidMirrorView-Dq2L_i03.js","assets/unplug-D4lqqSjs.js","assets/plug-Dkhx_3sf.js","assets/camera-YPlc04QS.js","assets/square-BBtfpgAz.js","assets/minimize-ChUJfXd4.js","assets/maximize-Z6moMyHP.js","assets/monitor-smartphone-BobCdw48.js","assets/layers-N7NxXNNs.js","assets/bell-CODAtRE3.js","assets/rotate-cw-BoHZyV9B.js","assets/volume-1-DPh-qm-Q.js","assets/volume-2-DRMDCc21.js","assets/power-CBzT89xE.js","assets/keyboard-D2GI-Um_.js","assets/minus-kHdy_gww.js","assets/hand-B0sXE4rE.js","assets/undo-2-CKgHu3c-.js","assets/stethoscope-CzMJafJM.js","assets/code-D01OwSqU.js","assets/shield-alert-CLGIEYEH.js","assets/shield-check-9Cqzu4o2.js","assets/mouse-pointer-2-CS4Ft_cw.js","assets/moon-Dsxtr0m6.js","assets/sun-E4aoJmf7.js","assets/cable-GaEXEb3-.js","assets/hash-DW5i7E64.js","assets/clock-Dj_IXY_9.js","assets/pen-line-DhpCzlGd.js","assets/type-BqS3fxVW.js","assets/App-D-2enNLe.css","assets/DagPlayground-0oF_gy27.js","assets/ChangeWalkthroughPanel-MwE55bs1.js","assets/chevron-left-CJszkdJ5.js","assets/minimize-2-CG18Mmcm.js","assets/DiffLab-DhMOv8st.js","assets/DiffViewer-DAZqU1ZK.js","assets/link-RS9gD_yC.js","assets/DiffViewer-T3uj2-aP.css","assets/DiffReviewLab-Dk7fmTHI.js","assets/DiffReview-DLgPGGBf.js","assets/list-DcjNzCzy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as Ru,g as $g,R as Mt,f as b,r as $n,j as cS}from"./dnd-CYu7YLJF.js";import{T as lS,l as dS}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 uS="modulepreload",fS=function(e){return"/"+e},bh={},Yt=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=fS(d),d in bh)return;bh[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":uS,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 Jc={exports:{}},es={};var vh;function hS(){if(vh)return es;vh=1;var e=Ru(),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 es.Fragment=n,es.jsx=i,es.jsxs=i,es}var xh;function pS(){return xh||(xh=1,Jc.exports=hS()),Jc.exports}var l=pS();const Tr="termdock-secure-target-v1",Tu="termdock-secure-entry-v1",mS=new Set([Tr,Tu,"termdock-color-theme","termdock:locale","termdock.federation.connections.v1"]),Pi=typeof Storage>"u"?void 0:Storage.prototype.getItem,Zc=typeof Storage>"u"?void 0:Storage.prototype.setItem,Sh="termdock-secure-legacy-owner",fc=typeof window<"u"&&window.parent!==window&&location.pathname==="/workspace.html";function gS(){if(typeof window>"u")return null;try{if(fc){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(Tr)??localStorage.getItem(Tr)??"null");return e&&typeof e.url=="string"&&typeof e.targetPeerId=="string"?e:null}catch{return null}}let ri=gS();const cd=new Set,mo=ri?.targetPeerId??"unpaired";function lt(){return ri}function yS(e){return cd.add(e),()=>cd.delete(e)}function zg(){for(const e of cd)e(ri)}function Au(e){if(ri=e,zg(),fc)return;const t=JSON.stringify(e);sessionStorage.setItem(Tr,t),localStorage.setItem(Tr,t)}function wS(){ri=null,zg(),!fc&&(localStorage.removeItem(Tr),sessionStorage.removeItem(Tr),localStorage.removeItem(Tu))}function Ps(e,t=mo){return mS.has(e)||e.startsWith("termdock-secure-")?e:`termdock-service:${t}:${e}`}function bS(e){if(!(!Pi||!Zc))try{if(Pi.call(localStorage,Sh))return;Zc.call(localStorage,Sh,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:")||Ps(o,e)===o)continue;const s=Ps(o,e),i=Pi.call(n,o);i!==null&&Pi.call(n,s)===null&&Zc.call(n,s,i)}}}catch{}}let Eh=!1;function vS(){if(Eh||typeof Storage>"u")return;Eh=!0;const e=Storage.prototype.getItem,t=Storage.prototype.setItem,n=Storage.prototype.removeItem;Storage.prototype.getItem=function(r){return e.call(this,Ps(String(r)))},Storage.prototype.setItem=function(r,o){t.call(this,Ps(String(r)),o)},Storage.prototype.removeItem=function(r){n.call(this,Ps(String(r)))}}vS();const xS={},kh=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:()=>{(xS?"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},qg=e=>e?kh(e):kh;var Qc={exports:{}},el={},tl={exports:{}},nl={};var Ih;function SS(){if(Ih)return nl;Ih=1;var e=Ru();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,w=g[1];return s(function(){m.value=p,m.getSnapshot=h,c(m)&&w({inst:m})},[f,p,h]),o(function(){return c(m)&&w({inst:m}),f(function(){c(m)&&w({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 nl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,nl}var Ch;function ES(){return Ch||(Ch=1,tl.exports=SS()),tl.exports}var Rh;function kS(){if(Rh)return el;Rh=1;var e=Ru(),t=ES();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 el.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(E){if(!S){if(S=!0,v=E,E=h(E),p!==void 0&&m.hasValue){var x=m.value;if(p(x,E))return C=x}return C=E}if(x=C,r(v,E))return x;var I=h(E);return p!==void 0&&p(x,I)?(v=E,x):(v=E,C=I)}var S=!1,v,C,A=f===void 0?null:f;return[function(){return y(u())},A===null?void 0:function(){return y(A())}]},[u,f,h,p]);var w=o(d,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=w},[w]),c(w),w},el}var Th;function IS(){return Th||(Th=1,Qc.exports=kS()),Qc.exports}var CS=IS();const RS=$g(CS),Kg={},{useDebugValue:TS}=Mt,{useSyncExternalStoreWithSelector:AS}=RS;let Ah=!1;const PS=e=>e;function Gg(e,t=PS,n){(Kg?"production":void 0)!=="production"&&n&&!Ah&&(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"),Ah=!0);const r=AS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return TS(r),r}const Ph=e=>{(Kg?"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"?qg(e):e,n=(r,o)=>Gg(t,r,o);return Object.assign(n,t),n},cr=e=>e?Ph(e):Ph;const Wg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const NS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const _S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Nh=e=>{const t=_S(e);return t.charAt(0).toUpperCase()+t.slice(1)};var rl={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 LS=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},DS=b.createContext({}),OS=()=>b.useContext(DS),jS=b.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=""}=OS()??{},g=r??f?Number(n??u)*24/Number(t??d):n??u;return b.createElement("svg",{ref:c,...rl,width:t??d??rl.width,height:t??d??rl.height,stroke:e??h,strokeWidth:g,className:Wg("lucide",p,o),...!s&&!LS(a)&&{"aria-hidden":"true"},...a},[...i.map(([m,w])=>b.createElement(m,w)),...Array.isArray(s)?s:[s]])});const we=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(jS,{ref:s,iconNode:t,className:Wg(`lucide-${NS(Nh(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Nh(e),n};const Vg=[["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"}]],Yg=we("arrow-down-a-z",Vg),Hj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Vg,default:Yg},Symbol.toStringTag,{value:"Module"}));const Xg=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Pu=we("arrow-left",Xg),$j=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Xg,default:Pu},Symbol.toStringTag,{value:"Module"}));const Jg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Zg=we("arrow-right",Jg),zj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Jg,default:Zg},Symbol.toStringTag,{value:"Module"}));const Qg=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ey=we("arrow-up-right",Qg),qj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Qg,default:ey},Symbol.toStringTag,{value:"Module"}));const ty=[["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"}]],Nu=we("bell-dot",ty),Kj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ty,default:Nu},Symbol.toStringTag,{value:"Module"}));const ny=[["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"}]],ry=we("bot",ny),Gj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ny,default:ry},Symbol.toStringTag,{value:"Module"}));const oy=[["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"}]],sy=we("box",oy),Wj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:oy,default:sy},Symbol.toStringTag,{value:"Module"}));const iy=[["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"}]],ay=we("briefcase",iy),Vj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:iy,default:ay},Symbol.toStringTag,{value:"Module"}));const cy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pn=we("check",cy),Yj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:cy,default:Pn},Symbol.toStringTag,{value:"Module"}));const ly=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ar=we("chevron-down",ly),Xj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ly,default:Ar},Symbol.toStringTag,{value:"Module"}));const dy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ln=we("chevron-right",dy),Jj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:dy,default:Ln},Symbol.toStringTag,{value:"Module"}));const uy=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],fy=we("chevron-up",uy),Zj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:uy,default:fy},Symbol.toStringTag,{value:"Module"}));const hy=[["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"}]],py=we("circle-alert",hy),Qj=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:hy,default:py},Symbol.toStringTag,{value:"Module"}));const my=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gy=we("circle-check",my),eM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:my,default:gy},Symbol.toStringTag,{value:"Module"}));const yy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],va=we("clock-3",yy),tM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:yy,default:va},Symbol.toStringTag,{value:"Module"}));const wy=[["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"}]],by=we("code-xml",wy),nM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:wy,default:by},Symbol.toStringTag,{value:"Module"}));const vy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],xy=we("columns-2",vy),rM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:vy,default:xy},Symbol.toStringTag,{value:"Module"}));const Sy=[["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"}]],oi=we("copy",Sy),oM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Sy,default:oi},Symbol.toStringTag,{value:"Module"}));const Ey=[["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"}]],hc=we("download",Ey),sM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ey,default:hc},Symbol.toStringTag,{value:"Module"}));const ky=[["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"}]],Pr=we("ellipsis",ky),iM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ky,default:Pr},Symbol.toStringTag,{value:"Module"}));const Iy=[["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"}]],Cy=we("file-code",Iy),aM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Iy,default:Cy},Symbol.toStringTag,{value:"Module"}));const Ry=[["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"}]],Ty=we("file-text",Ry),cM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ry,default:Ty},Symbol.toStringTag,{value:"Module"}));const Ay=[["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"}]],_u=we("file",Ay),lM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ay,default:_u},Symbol.toStringTag,{value:"Module"}));const Py=[["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"}]],Ns=we("folder-open",Py),dM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Py,default:Ns},Symbol.toStringTag,{value:"Module"}));const Ny=[["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"}]],pc=we("folder-search",Ny),uM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ny,default:pc},Symbol.toStringTag,{value:"Module"}));const _y=[["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"}]],mc=we("folder",_y),fM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:_y,default:mc},Symbol.toStringTag,{value:"Module"}));const Ly=[["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"}]],Dy=we("lightbulb",Ly),hM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ly,default:Dy},Symbol.toStringTag,{value:"Module"}));const Oy=[["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"}]],jy=we("link-2-off",Oy),pM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Oy,default:jy},Symbol.toStringTag,{value:"Module"}));const My=[["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"}]],No=we("link-2",My),mM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:My,default:No},Symbol.toStringTag,{value:"Module"}));const By=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fy=we("loader-circle",By),gM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:By,default:Fy},Symbol.toStringTag,{value:"Module"}));const Uy=[["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"}]],si=we("message-circle",Uy),yM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Uy,default:si},Symbol.toStringTag,{value:"Module"}));const Hy=[["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"}]],Lu=we("monitor",Hy),wM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Hy,default:Lu},Symbol.toStringTag,{value:"Module"}));const $y=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],zy=we("panel-right",$y),bM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:$y,default:zy},Symbol.toStringTag,{value:"Module"}));const qy=[["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"}]],Ky=we("paperclip",qy),vM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:qy,default:Ky},Symbol.toStringTag,{value:"Module"}));const Gy=[["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"}]],Wy=we("pencil",Gy),xM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Gy,default:Wy},Symbol.toStringTag,{value:"Module"}));const Vy=[["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"}]],Ks=we("pin",Vy),SM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Vy,default:Ks},Symbol.toStringTag,{value:"Module"}));const Yy=[["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"}]],Gs=we("pin-off",Yy),EM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Yy,default:Gs},Symbol.toStringTag,{value:"Module"}));const Xy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Du=we("plus",Xy),kM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Xy,default:Du},Symbol.toStringTag,{value:"Module"}));const Jy=[["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"}]],Zy=we("qr-code",Jy),IM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Jy,default:Zy},Symbol.toStringTag,{value:"Module"}));const Qy=[["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"}]],Ou=we("refresh-cw",Qy),CM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Qy,default:Ou},Symbol.toStringTag,{value:"Module"}));const ew=[["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"}]],tw=we("rocket",ew),RM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ew,default:tw},Symbol.toStringTag,{value:"Module"}));const nw=[["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"}]],rw=we("rotate-ccw",nw),TM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:nw,default:rw},Symbol.toStringTag,{value:"Module"}));const ow=[["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"}]],ii=we("server",ow),AM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ow,default:ii},Symbol.toStringTag,{value:"Module"}));const sw=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],gc=we("smartphone",sw),PM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:sw,default:gc},Symbol.toStringTag,{value:"Module"}));const iw=[["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"}]],aw=we("sparkles",iw),NM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:iw,default:aw},Symbol.toStringTag,{value:"Module"}));const cw=[["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"}]],ju=we("square-terminal",cw),_M=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:cw,default:ju},Symbol.toStringTag,{value:"Module"}));const lw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],dw=we("terminal",lw),LM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:lw,default:dw},Symbol.toStringTag,{value:"Module"}));const uw=[["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"}]],Mu=we("trash-2",uw),DM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:uw,default:Mu},Symbol.toStringTag,{value:"Module"}));const fw=[["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=we("video",fw),OM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:fw,default:hw},Symbol.toStringTag,{value:"Module"}));const pw=[["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"}]],mw=we("wifi-off",pw),jM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:pw,default:mw},Symbol.toStringTag,{value:"Module"}));const gw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ai=we("x",gw),MM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:gw,default:ai},Symbol.toStringTag,{value:"Module"})),MS="termdock:secure-ready";let ld="ready";const dd=new Set;function _s(e){if(e!==ld){ld=e;for(const t of dd)t();e==="ready"&&window.dispatchEvent(new Event(MS))}}function yw(){return b.useSyncExternalStore(e=>(dd.add(e),()=>{dd.delete(e)}),()=>ld)}function ww(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 BS={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 require a secure context and service worker support.",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"}}},FS={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:"通知需要安全上下文和 Service Worker 支持。",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:"联系技术支持"}}},US=["en","zh"],_o="en",ud=new WeakMap;let HS=0;function $S(e,t,n){const r=ud.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 zS(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=ud.get(e);if(r||(r={lastPoll:n,lastSent:-1/0,lastReply:-1/0,samples:[]},ud.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-${++HS}`;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 Bu(e){return e.displayName?.trim()?{displayName:e.displayName,displaySubtitle:e.displaySubtitle??null}:bw({name:e.name,sessionId:e.sessionId,agent:e.agent})}const yc=new Set(["bash","zsh","fish","sh","dash","ksh","tcsh","csh","nu"]);function Ni(e){if(!e)return null;if(e==="/")return"/";const t=e.replace(/\/+$/,"").split("/");return t[t.length-1]||e}function qS(e,t,n,r=yc,o=null,s=null){if(e.customName&&e.name.trim())return{primary:e.name,secondary:Ni(n)};if(o){const d=Ni(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:Ni(n)};const i=Ni(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 bw(e,t=yc){const{primary:n,secondary:r}=qS(e,e.activeProgram??null,e.cwd??null,t,e.shellTitle??null,e.promptState??null);return{displayName:n,displaySubtitle:r}}function KS(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 BM(e,t){const n=s=>Bu(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 FM(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 dt extends Error{constructor(t,n={}){super(vw[t]),this.code=t,this.context=n}code;context;name="ConnectionAccessError"}function Nr(e,t={}){if(e instanceof dt)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 dt(e.message,t);if(e instanceof Error&&e.name==="ConnectionAccessError"&&"code"in e&&typeof e.code=="string"&&Object.hasOwn(vw,e.code))return new dt(e.code,t);if(e instanceof Error&&e.name==="UnexpectedPeerError")return new dt("TARGET_IDENTITY_MISMATCH",t)}function Fu(e,t){return e instanceof Error&&(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")?new dt(e.message,t):e instanceof Error&&(e.message==="AUTHORIZATION_DENIED"||e instanceof dt&&e.code==="PERMISSION_DENIED")?new dt("RELAY_AUTHORIZATION_REQUIRED",t):e instanceof Error?e:new Error("中转连接暂不可用")}const _r=4;function $e(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}`);n.protocol==="wss:"&&(n.protocol="https:"),n.protocol==="ws:"&&(n.protocol="http:");const r=["localhost","127.0.0.1","[::1]"].includes(n.hostname);if(!["https:","http:"].includes(n.protocol)||n.protocol==="http:"&&!r)throw new Error("请使用 HTTPS 服务地址。");if(n.username||n.password||n.search||n.hash||!["/","/api/federation/secure"].includes(n.pathname))throw new Error("请输入服务首页地址,不要包含账号或额外参数。");return n.origin}function Uu(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new dt("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=$e(r.url),s=JSON.stringify([r.targetPeerId,o]);return n.has(s)?[]:(n.add(s),[{url:o,targetPeerId:r.targetPeerId}])}catch{return[]}}).slice(0,_r)}function xw(e){return Uu(e).filter(t=>t.targetPeerId!==e.targetPeerId)}function Sw(e){const t=Uu(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=$e(s);n.has(i)||o.add(i)}catch{}return[...o]}function GS(e,t,n=new Set){return Sw(e).length>0||!!t&&xw(e).some(r=>r.targetPeerId!==t&&!n.has(r.targetPeerId))}function xa(e){const t={...e,url:$e(e.url)},n=Uu(e);if(e.routes!==void 0&&(t.routes=n),e.serviceOrigin){const r=$e(e.serviceOrigin);n.some(o=>o.targetPeerId!==e.targetPeerId&&o.url===r)?delete t.serviceOrigin:t.serviceOrigin=r}return t}function WS(e,t="secure"){const n=new URL($e(e));return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=`/api/federation/${t}`,n}const wc="termdock.federation.connections.v1",fd="termdock:services-changed",Hu="termdock-secure-removed-services",Sa=e=>[e.id,e.targetPeerId,e.serviceOrigin||e.url].filter(t=>!!t);function $u(){try{const e=JSON.parse(localStorage.getItem(Hu)||"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}catch{return[]}}function Dn(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.url=="string")try{const n=$e(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 xa({id:typeof t.id=="string"&&t.id?t.id:r||n,url:n,label:o,...r?{targetPeerId:r}:{},...typeof t.serviceOrigin=="string"?{serviceOrigin:$e(t.serviceOrigin)}:{},...typeof t.entryServiceId=="string"&&t.entryServiceId?{entryServiceId:t.entryServiceId}:{},...Array.isArray(t.routes)?{routes:t.routes.slice(0,_r).flatMap(s=>{try{return s&&typeof s.targetPeerId=="string"&&s.targetPeerId?[{url:$e(s.url),targetPeerId:s.targetPeerId}]:[]}catch{return[]}})}:{}})}catch{return}}function nn(e,t){return e.targetPeerId&&t.targetPeerId?e.targetPeerId===t.targetPeerId:(e.serviceOrigin||e.url)===(t.serviceOrigin||t.url)}function Ew(e){const t=[];for(const n of e){const r=t.findIndex(o=>nn(o,n));r<0?t.push(xa(n)):t[r]=xa({...t[r],...n,id:t[r].id})}return t}function ci(){return typeof window>"u"?void 0:window.termdockDesktop}function Lr(){try{const e=JSON.parse(localStorage.getItem(wc)||"[]");return Array.isArray(e)?Ew(e.map(Dn).filter(t=>!!t)):[]}catch{return[]}}function kw(e){localStorage.setItem(wc,JSON.stringify(e.map(t=>({...t,serviceName:t.label})))),window.dispatchEvent(new Event(fd))}let ts;async function yt(){const e=ci();if(!e?.serviceConnections||!e.saveServiceConnection)return Lr();if(ts)return ts;ts=(async()=>{let t=await e.serviceConnections();const n=Lr();for(const r of n)t.some(o=>nn(o,r))||(t=await(e.importServiceConnection||e.saveServiceConnection)(r));return n.length&&localStorage.removeItem(wc),t.map(Dn).filter(r=>!!r)})();try{return await ts}finally{ts=void 0}}async function On(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Dn(e);if(!t)throw new Error("服务地址无效。");const n=ci();if(n?.saveServiceConnection)return(await n.saveServiceConnection(t)).map(Dn).filter(a=>!!a);const r=Lr(),o=r.find(a=>a.id===t.id||nn(a,t)),s=new Set([...Sa(t),...o?Sa(o):[]]);localStorage.setItem(Hu,JSON.stringify($u().filter(a=>!s.has(a))));const i=Ew([...r.filter(a=>a!==o),xa({...o,...t,id:o?.id||t.id})]);return kw(i),i}async function VS(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Dn(e);if(!t)throw new Error("服务地址无效。");const n=ci();if(n?.importServiceConnection)return(await n.importServiceConnection(t)).map(Dn).filter(r=>!!r);if(n?.serviceConnections){const r=await n.serviceConnections();return r.some(o=>nn(o,t))?On(t):r}return Sa(t).some(r=>$u().includes(r))?Lr():On(t)}async function YS(e){const t=ci();if(t?.removeServiceConnection)return(await t.removeServiceConnection(e)).map(Dn).filter(s=>!!s);const n=Lr(),r=n.find(s=>s.id===e);r&&localStorage.setItem(Hu,JSON.stringify([...new Set([...$u(),...Sa(r)])].slice(-768)));const o=n.filter(s=>s.id!==e);return kw(o),o}function bc(e){const t=r=>{(r.key===wc||r.key===null)&&e()};window.addEventListener(fd,e),window.addEventListener("storage",t);const n=ci()?.onServiceConnections?.(e);return()=>{window.removeEventListener(fd,e),window.removeEventListener("storage",t),n?.()}}function xs(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 XS{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=xs(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=xs(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===xs(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=xs(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 Ea=e=>`@collaboration:${e}`,Iw=cr(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===Ea(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}})})),mr=new Map;let ka;function Cw(){const e=Iw.getState().activePaneId,t=mr.get(ka??"");if(t?.requiresFocus&&e===Ea(t.paneKey))return t.receive;for(const n of mr.values())if(n.requiresFocus&&e===Ea(n.paneKey))return n.receive;return t&&!t.requiresFocus?t.receive:void 0}function JS(e){const t=mr.get(e);t&&(ka=e,Iw.getState().setActivePane(t.requiresFocus?Ea(t.paneKey):null))}function ZS(e){const t=Cw();return!t||!e?!1:(t(e),!0)}function UM(e,t="default",n=!1,r=t){mr.set(t,{receive:e,requiresFocus:n,paneKey:r}),n||JS(t);const o=s=>{const{text:i,nonce:a}=s.detail??{};!i||Cw()!==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),()=>{mr.get(t)?.receive===e&&(mr.delete(t),ka===t&&(ka=[...mr.keys()].at(-1))),window.removeEventListener("termdock-insert-reference",o,!0)}}const QS=/^[A-Za-z0-9_@%+=:,./-]$/;function Rw(e){return Array.from(e,t=>(t.codePointAt(0)??0)>127||QS.test(t)?t:`\\${t}`).join("")}let eE=0;function tE(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 nE(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||!tE(location.origin,lt()),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=lt(),m=u.dataset.termdockTerminalOwner,w=g?.targetPeerId??null,y=String(++eE),S=()=>!h.signal.aborted&&u.isConnected&&u.dataset.termdockTerminalDropzone===p&&u.dataset.nativeFileDropOperation===y&<()===g&<()?.targetPeerId===w&&u.dataset.termdockTerminalOwner===m,v=()=>S()?!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 C=k=>{(k?.type==="auth:unauthorized"||k?.type==="pagehide"||!S())&&(h.abort(),v())},A=new MutationObserver(()=>C());A.observe(u,{attributes:!0,attributeFilter:["data-termdock-terminal-dropzone","data-termdock-terminal-owner","data-native-file-drop-operation"]});const E=()=>{h.abort(),v(),I()},x=k=>{if(!(k.target instanceof Element)||k.target.closest("[data-termdock-terminal-dropzone]")!==u||!S())return;E(),u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropOperation=y,u.dataset.nativeFileDropState="cancelled";const T=window.setTimeout(()=>{r.delete(T),u.dataset.nativeFileDropOperation===y&&u.dataset.nativeFileDropState==="cancelled"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(T)};window.addEventListener("termdock:file-drop-cancel",x);const I=()=>{window.removeEventListener("termdock:file-drop-cancel",x),A.disconnect();for(const k of["termdock:secure-state","auth:unauthorized","pagehide"])window.removeEventListener(k,C);n.delete(E)};n.add(E);for(const k of["termdock:secure-state","auth:unauthorized","pagehide"])window.addEventListener(k,C);Yt(async()=>{const{uploadFiles:k}=await Promise.resolve().then(()=>o_);return{uploadFiles:k}},void 0).then(({uploadFiles:k})=>{if(!S())throw new DOMException("Drop target changed","AbortError");return k("/tmp",f,h.signal,T=>{S()&&(u.dataset.nativeFileDropProgress=String(Math.round(T)))},S)}).then(k=>{if(k.files.length!==f.length||k.files.some(_=>!_.path))throw new Error("Upload did not return every file path");if(v())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,e({sessionKey:p,paths:k.files.map(_=>_.path)}),u.dataset.nativeFileDropState="uploaded";const T=window.setTimeout(()=>{r.delete(T),S()&&u.dataset.nativeFileDropState==="uploaded"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(T)}).catch(k=>{if(v())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,u.dataset.nativeFileDropState="error",u.dispatchEvent(new CustomEvent("termdock:file-drop-error",{bubbles:!0,detail:k instanceof Error?k.message:"File upload failed"}));const T=window.setTimeout(()=>{r.delete(T),S()&&u.dataset.nativeFileDropState==="error"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(T)}).finally(I)};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 ut(){return typeof window>"u"?null:window.termdockDesktop??null}const ol=new Set;let _h=!1;function HM(e){const t=ut();if(ol.add(e),!_h){const n=r=>{if(!ZS(r.paths.map(Rw).join(" ")+" "))for(const o of ol)o(r)};nE(n,!!t),t?.onNativeFileDrop(n),_h=!0}return()=>{ol.delete(e)}}async function rE(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,sE=256*1024,iE=1440*6e4;let go=0,Lh;function zu(){return typeof indexedDB>"u"?Promise.resolve(null):Lh??=new Promise(e=>{const t=indexedDB.open(`termdock-terminal-snapshots:${mo}`,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(),Lh=void 0},e(t.result)}})}function hd(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<=sE&&e.savedAt<=Date.now()&&Date.now()-e.savedAt<iE}async function $M(e){const t=go;try{const n=await zu();return!n||t!==go?null:await new Promise(r=>{const o=n.transaction("snapshots").objectStore("snapshots").get(e);o.onerror=()=>r(null),o.onsuccess=()=>r(t===go&&hd(o.result)?o.result:null)})}catch{return null}}async function zM(e){const t=go;if(hd(e))try{const n=await zu();if(!n||t!==go)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||!hd(d))&&s.delete(d.id)},o.oncomplete=()=>r(),o.onerror=o.onabort=()=>r()})}catch{}}async function Tw(){go+=1;try{(await zu())?.transaction("snapshots","readwrite").objectStore("snapshots").clear()}catch{}}typeof window<"u"&&window.addEventListener("auth:unauthorized",()=>{Tw()});const pd=8,Aw=128,qu=2e4,aE=256*1024,cE=1024*1024,lE=3e4;function Pw(e){if(e.label)return e.label;if(e.url)try{return new URL(e.url).host}catch{}return`中转服务 ${e.serviceId.slice(-8)}`}function fr(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 dE=1024*1024;function uE(e){return(e==="/api/terminal/fs/upload"||/^\/api\/terminal\/[^/]+\/chat\/attachments$/.test(e)?110:5)*dE}class fE extends Error{static name="UnexpectedPeerError";constructor(t="Unexpected Peer"){super(t),this.name="UnexpectedPeerError"}}let hE=class extends Error{static name="InvalidCryptoExchangeError";constructor(t="Invalid crypto exchange"){super(t),this.name="InvalidCryptoExchangeError"}},on=class extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}};class Nw extends Error{static name="InvalidPublicKeyError";constructor(t="Invalid public key"){super(t),this.name="InvalidPublicKeyError"}}class _w extends Error{static name="InvalidPrivateKeyError";constructor(t="Invalid private key"){super(t),this.name="InvalidPrivateKeyError"}}class pE extends Error{static name="InvalidCIDError";constructor(t="Invalid CID"){super(t),this.name="InvalidCIDError"}}class mE extends Error{static name="InvalidMultihashError";constructor(t="Invalid Multihash"){super(t),this.name="InvalidMultihashError"}}class vc extends Error{static name="UnsupportedKeyTypeError";constructor(t="Unsupported key type"){super(t),this.name="UnsupportedKeyTypeError"}}const Lw=Symbol.for("@libp2p/peer-id");function gE(e){return typeof e?.handleEvent=="function"}function yE(e){return e===!0||e===!1}function wE(e){return yE(e)?e:e?.capture??!1}function md(e){const t={capture:wE(e),once:!!e?.once};return e?.passive!=null&&(t.passive=e?.passive),e?.signal!=null&&(t.signal=e?.signal),t}function Dh(e,t){return md(e).capture===md(t).capture}class bE 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=md(r);if(o?.signal?.aborted===!0)return;const s=d=>{o.once&&this.removeEventListener(t,n,o),gE(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:Dh(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&&Dh(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 vE=Symbol.for("@libp2p/service-capabilities");function xE(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 xc(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 SE(e){return new TextEncoder().encode(e)}function EE(e){return new TextDecoder().decode(e)}function kE(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,w=0,y=0,S=g.length;y!==S&&g[y]===0;)y++,m++;for(var v=(S-y)*u+1>>>0,C=new Uint8Array(v);y!==S;){for(var A=g[y],E=0,x=v-1;(A!==0||E<w)&&x!==-1;x--,E++)A+=256*C[x]>>>0,C[x]=A%a>>>0,A=A/a>>>0;if(A!==0)throw new Error("Non-zero carry");w=E,y++}for(var I=v-w;I!==v&&C[I]===0;)I++;for(var k=c.repeat(m);I<v;++I)k+=e.charAt(C[I]);return k}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 w=0,y=0;g[m]===c;)w++,m++;for(var S=(g.length-m)*d+1>>>0,v=new Uint8Array(S);g[m];){var C=n[g.charCodeAt(m)];if(C===255)return;for(var A=0,E=S-1;(C!==0||A<y)&&E!==-1;E--,A++)C+=a*v[E]>>>0,v[E]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");y=A,m++}if(g[m]!==" "){for(var x=S-y;x!==S&&v[x]===0;)x++;for(var I=new Uint8Array(w+(S-x)),k=w;x!==S;)I[k++]=v[x++];return I}}}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 IE=kE,CE=IE;class RE{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 TE{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 Dw(this,t)}}class AE{decoders;constructor(t){this.decoders=t}or(t){return Dw(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 Dw(e,t){return new AE({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class PE{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 RE(t,n,r),this.decoder=new TE(t,n,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function Sc({name:e,prefix:t,encode:n,decode:r}){return new PE(e,t,n,r)}function li({name:e,prefix:t,alphabet:n}){const{encode:r,decode:o}=CE(n,e);return Sc({prefix:t,name:e,encode:r,decode:s=>xc(o(s))})}function NE(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 _E(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 LE(e){const t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function St({name:e,prefix:t,bitsPerChar:n,alphabet:r}){const o=LE(r);return Sc({prefix:t,name:e,encode(s){return _E(s,r,n)},decode(s){return NE(s,o,n,e)}})}const _t=li({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),DE=li({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),OE=Object.freeze(Object.defineProperty({__proto__:null,base58btc:_t,base58flickr:DE},Symbol.toStringTag,{value:"Module"})),Ls=St({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),jE=St({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ME=St({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),BE=St({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),FE=St({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),UE=St({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),HE=St({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),$E=St({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zE=St({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),qE=Object.freeze(Object.defineProperty({__proto__:null,base32:Ls,base32hex:FE,base32hexpad:HE,base32hexpadupper:$E,base32hexupper:UE,base32pad:ME,base32padupper:BE,base32upper:jE,base32z:zE},Symbol.toStringTag,{value:"Module"})),sa=li({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),KE=li({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),GE=Object.freeze(Object.defineProperty({__proto__:null,base36:sa,base36upper:KE},Symbol.toStringTag,{value:"Module"}));var WE=Ow,Oh=128,VE=-128,YE=Math.pow(2,31);function Ow(e,t,n){t=t||[],n=n||0;for(var r=n;e>=YE;)t[n++]=e&255|Oh,e/=128;for(;e&VE;)t[n++]=e&255|Oh,e>>>=7;return t[n]=e|0,Ow.bytes=n-r+1,t}var XE=gd,JE=128,jh=127;function gd(e,r){var n=0,r=r||0,o=0,s=r,i,a=e.length;do{if(s>=a)throw gd.bytes=0,new RangeError("Could not decode varint");i=e[s++],n+=o<28?(i&jh)<<o:(i&jh)*Math.pow(2,o),o+=7}while(i>=JE);return gd.bytes=s-r,n}var ZE=Math.pow(2,7),QE=Math.pow(2,14),e1=Math.pow(2,21),t1=Math.pow(2,28),n1=Math.pow(2,35),r1=Math.pow(2,42),o1=Math.pow(2,49),s1=Math.pow(2,56),i1=Math.pow(2,63),a1=function(e){return e<ZE?1:e<QE?2:e<e1?3:e<t1?4:e<n1?5:e<r1?6:e<o1?7:e<s1?8:e<i1?9:10},c1={encode:WE,decode:XE,encodingLength:a1},Ia=c1;function yd(e,t=0){return[Ia.decode(e,t),Ia.decode.bytes]}function Ca(e,t,n=0){return Ia.encode(e,t,n),t}function Ra(e){return Ia.encodingLength(e)}function di(e,t){const n=t.byteLength,r=Ra(e),o=r+Ra(n),s=new Uint8Array(o+n);return Ca(e,s,0),Ca(n,s,r),s.set(t,o),new Ku(e,n,t,s)}function jw(e){const t=xc(e),[n,r]=yd(t),[o,s]=yd(t.subarray(r)),i=t.subarray(r+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new Ku(n,o,i,t)}function l1(e,t){if(e===t)return!0;{const n=t;return e.code===n.code&&e.size===n.size&&n.bytes instanceof Uint8Array&&xE(e.bytes,n.bytes)}}class Ku{code;size;digest;bytes;constructor(t,n,r,o){this.code=t,this.size=n,this.digest=r,this.bytes=o}}function Mh(e,t){const{bytes:n,version:r}=e;return r===0?u1(n,wd(e),t??_t.encoder):f1(n,wd(e),t??Ls.encoder)}const Bh=new WeakMap;function wd(e){const t=Bh.get(e);if(t==null){const n=new Map;return Bh.set(e,n),n}return t}class et{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!==ns)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==h1)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return et.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=di(t,n);return et.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 et.equals(this,t)}static equals(t,n){const r=n;return r!=null&&t.code===r.code&&t.version===r.version&&l1(t.multihash,r.multihash)}toString(t){return Mh(this,t)}toJSON(){return{"/":Mh(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 et)return n;if(n["/"]!=null&&n["/"]===n.bytes||n.asCID===n){const{version:r,code:o,multihash:s,bytes:i}=n;return new et(r,o,s,i??Fh(r,o,s.bytes))}else if(n[p1]===!0){const{version:r,multihash:o,code:s}=n,i=jw(o);return et.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!==ns)throw new Error(`Version 0 CID must use dag-pb (code: ${ns}) block encoding`);return new et(t,n,r,r.bytes)}case 1:{const o=Fh(t,n,r.bytes);return new et(t,n,r,o)}default:throw new Error("Invalid version")}}static createV0(t){return et.create(0,ns,t)}static createV1(t,n){return et.create(1,t,n)}static decode(t){const[n,r]=et.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return n}static decodeFirst(t){const n=et.inspectBytes(t),r=n.size-n.multihashSize,o=xc(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 Ku(n.multihashCode,n.digestSize,s,o);return[n.version===0?et.createV0(i):et.createV1(n.codec,i),t.subarray(n.size)]}static inspectBytes(t){let n=0;const r=()=>{const[f,h]=yd(t.subarray(n));return n+=h,f};let o=r(),s=ns;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]=d1(t,n),s=et.decode(o);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return wd(s).set(r,t),s}}function d1(e,t){switch(e[0]){case"Q":{const n=t??_t;return[_t.prefix,n.decode(`${_t.prefix}${e}`)]}case _t.prefix:{const n=t??_t;return[_t.prefix,n.decode(e)]}case Ls.prefix:{const n=t??Ls;return[Ls.prefix,n.decode(e)]}case sa.prefix:{const n=t??sa;return[sa.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 u1(e,t,n){const{prefix:r}=n;if(r!==_t.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 f1(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 ns=112,h1=18;function Fh(e,t,n){const r=Ra(e),o=r+Ra(t),s=new Uint8Array(o+n.byteLength);return Ca(e,s,0),Ca(t,s,r),s.set(n,o),s}const p1=Symbol.for("@ipld/js-cid/CID"),Mw=0,m1="identity",Bw=xc;function g1(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 di(Mw,Bw(e))}const ui={code:Mw,name:m1,encode:Bw,digest:g1};function sn(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 Bt(e=0){return new Uint8Array(e)}function jn(e=0){return new Uint8Array(e)}function bd(e,t){t==null&&(t=e.reduce((o,s)=>o+s.length,0));const n=jn(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}const Fw=Symbol.for("@achingbrain/uint8arraylist");function Uh(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 _i(e){return!!e?.[Fw]}class ze{bufs;length;[Fw]=!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(_i(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(_i(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=Uh(this.bufs,t);return n.buf[n.index]}set(t,n){const r=Uh(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(_i(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 bd(r,o)}subarray(t,n){const{bufs:r,length:o}=this._subList(t,n);return r.length===1?r[0]:bd(r,o)}sublist(t,n){const{bufs:r,length:o}=this._subList(t,n),s=new ze;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(!_i(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=jn(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=Bt(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=Bt(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=Bt(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=jn(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=Bt(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=Bt(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=Bt(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=Bt(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=Bt(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setFloat64(0,n,r),this.write(o,t)}equals(t){if(t==null||!(t instanceof ze)||t.bufs.length!==this.bufs.length)return!1;for(let n=0;n<this.bufs.length;n++)if(!sn(this.bufs[n],t.bufs[n]))return!1;return!0}static fromUint8Arrays(t,n){const r=new ze;return r.bufs=t,n==null&&(n=t.reduce((o,s)=>o+s.byteLength,0)),r.length=n,r}}const y1=li({prefix:"9",name:"base10",alphabet:"0123456789"}),w1=Object.freeze(Object.defineProperty({__proto__:null,base10:y1},Symbol.toStringTag,{value:"Module"})),b1=St({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),v1=St({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),x1=Object.freeze(Object.defineProperty({__proto__:null,base16:b1,base16upper:v1},Symbol.toStringTag,{value:"Module"})),S1=St({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),E1=Object.freeze(Object.defineProperty({__proto__:null,base2:S1},Symbol.toStringTag,{value:"Module"})),Uw=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),k1=Uw.reduce((e,t,n)=>(e[n]=t,e),[]),I1=Uw.reduce((e,t,n)=>{const r=t.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${t}`);return e[r]=n,e},[]);function C1(e){return e.reduce((t,n)=>(t+=k1[n],t),"")}function R1(e){const t=[];for(const n of e){const r=n.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${n}`);const o=I1[r];if(o==null)throw new Error(`Non-base256emoji character: ${n}`);t.push(o)}return new Uint8Array(t)}const T1=Sc({prefix:"🚀",name:"base256emoji",encode:C1,decode:R1}),A1=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:T1},Symbol.toStringTag,{value:"Module"})),P1=St({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),N1=St({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),_1=St({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),L1=St({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),D1=Object.freeze(Object.defineProperty({__proto__:null,base64:P1,base64pad:N1,base64url:_1,base64urlpad:L1},Symbol.toStringTag,{value:"Module"})),O1=St({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),j1=Object.freeze(Object.defineProperty({__proto__:null,base8:O1},Symbol.toStringTag,{value:"Module"})),M1=Sc({prefix:"\0",name:"identity",encode:e=>EE(e),decode:e=>SE(e)}),B1=Object.freeze(Object.defineProperty({__proto__:null,identity:M1},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const F1=20;function U1({name:e,code:t,encode:n,minDigestLength:r,maxDigestLength:o}){return new H1(e,t,n,r,o)}class H1{name;code;encode;minDigestLength;maxDigestLength;constructor(t,n,r,o,s){this.name=t,this.code=n,this.encode=r,this.minDigestLength=o??F1,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?Hh(r,this.code,n?.truncate):r.then(o=>Hh(o,this.code,n?.truncate))}else throw Error("Unknown type, must be binary type")}}function Hh(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 di(t,e)}function $1(e){return async t=>new Uint8Array(await crypto.subtle.digest(e,t))}const Gu=U1({name:"sha2-256",code:18,encode:$1("SHA-256")}),$h={...B1,...E1,...j1,...w1,...x1,...qE,...GE,...OE,...D1,...A1};function Hw(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const zh=Hw("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),sl=Hw("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=jn(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),$w={utf8:zh,"utf-8":zh,hex:$h.base16,latin1:sl,ascii:sl,binary:sl,...$h};function at(e,t="utf8"){const n=$w[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.decoder.decode(`${n.prefix}${e}`)}function Le(e,t="utf8"){const n=$w[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.encoder.encode(e).substring(1)}const z1=parseInt("11111",2),vd=parseInt("10000000",2),q1=parseInt("01111111",2),qh={0:rs,1:rs,2:K1,3:V1,4:Y1,5:W1,6:G1,16:rs,22:rs,48:rs};function qo(e,t={offset:0}){const n=e[t.offset]&z1;if(t.offset++,qh[n]!=null)return qh[n](e,t);throw new Error("No decoder for tag "+n)}function fi(e,t){let n=0;if((e[t.offset]&vd)===vd){const r=e[t.offset]&q1;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 rs(e,t){fi(e,t);const n=[];for(;!(t.offset>=e.byteLength);){const r=qo(e,t);if(r===null)break;n.push(r)}return n}function K1(e,t){const n=fi(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 G1(e,t){const n=fi(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 W1(e,t){return t.offset++,null}function V1(e,t){const n=fi(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 Y1(e,t){const n=fi(e,t),r=e.subarray(t.offset,t.offset+n);return t.offset+=n,r}function X1(e){let t=e.toString(16);t.length%2===1&&(t="0"+t);const n=new ze;for(let r=0;r<t.length;r+=2)n.append(Uint8Array.from([parseInt(`${t[r]}${t[r+1]}`,16)]));return n}function Ec(e){if(e.byteLength<128)return Uint8Array.from([e.byteLength]);const t=X1(e.byteLength);return new ze(Uint8Array.from([t.byteLength|vd]),t)}function zt(e){const t=new ze,n=128;return(e.subarray()[0]&n)===n&&t.append(Uint8Array.from([0])),t.append(e),new ze(Uint8Array.from([2]),Ec(t),t)}function Wu(e){const t=Uint8Array.from([0]),n=new ze(t,e);return new ze(Uint8Array.from([3]),Ec(n),n)}function J1(e){return new ze(Uint8Array.from([4]),Ec(e),e)}function Nn(e,t=48){const n=new ze;for(const r of e)n.append(r);return new ze(Uint8Array.from([t]),Ec(n),n)}async function Z1(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 Q1(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 ek=Uint8Array.from([6,8,42,134,72,206,61,3,1,7]),tk=Uint8Array.from([6,5,43,129,4,0,34]),nk=Uint8Array.from([6,5,43,129,4,0,35]),zw={ext:!0,kty:"EC",crv:"P-256"},qw={ext:!0,kty:"EC",crv:"P-384"},Kw={ext:!0,kty:"EC",crv:"P-521"},yo=32,wo=48,bo=66;function rk(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===yo)return s=Le(r.subarray(o,o+yo),"base64url"),i=Le(r.subarray(o+yo),"base64url"),new il({...zw,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===wo)return s=Le(r.subarray(o,o+wo),"base64url"),i=Le(r.subarray(o+wo),"base64url"),new il({...qw,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===bo)return s=Le(r.subarray(o,o+bo),"base64url"),i=Le(r.subarray(o+bo),"base64url"),new il({...Kw,key_ops:["sign"],d:n,x:s,y:i});throw new on(`Private key length was wrong length, got ${t.byteLength}, expected 32, 48 or 66`)}function Gw(e){const t=qo(e);return sk(t)}function sk(e){const t=e[1][1][0],n=1;let r,o;if(t.byteLength===yo*2+1)return r=Le(t.subarray(n,n+yo),"base64url"),o=Le(t.subarray(n+yo),"base64url"),new ia({...zw,key_ops:["verify"],x:r,y:o});if(t.byteLength===wo*2+1)return r=Le(t.subarray(n,n+wo),"base64url"),o=Le(t.subarray(n+wo),"base64url"),new ia({...qw,key_ops:["verify"],x:r,y:o});if(t.byteLength===bo*2+1)return r=Le(t.subarray(n,n+bo),"base64url"),o=Le(t.subarray(n+bo),"base64url"),new ia({...Kw,key_ops:["verify"],x:r,y:o});throw new on(`coordinates were wrong length, got ${t.byteLength}, expected 65, 97 or 133`)}function ik(e){return Nn([zt(Uint8Array.from([1])),J1(at(e.d??"","base64url")),Nn([Ww(e.crv)],160),Nn([Wu(new ze(Uint8Array.from([4]),at(e.x??"","base64url"),at(e.y??"","base64url")))],161)]).subarray()}function ak(e){return Nn([zt(Uint8Array.from([1])),Nn([Ww(e.crv)],160),Nn([Wu(new ze(Uint8Array.from([4]),at(e.x??"","base64url"),at(e.y??"","base64url")))],161)]).subarray()}function Ww(e){if(e==="P-256")return ek;if(e==="P-384")return tk;if(e==="P-521")return nk;throw new on(`Invalid curve ${e}`)}class ia{type="ECDSA";jwk;_raw;constructor(t){this.jwk=t}get raw(){return this._raw==null&&(this._raw=ak(this.jwk)),this._raw}toMultihash(){return ui.digest(Ac(this))}toCID(){return et.createV1(114,this.toMultihash())}toString(){return _t.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}async verify(t,n,r){return Q1(this.jwk,n,t,r)}}class il{type="ECDSA";jwk;publicKey;_raw;constructor(t){this.jwk=t,this.publicKey=new ia({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=ik(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}async sign(t,n){return Z1(this.jwk,t,n)}}const eo=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function hi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function xd(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Hr(e,...t){if(!hi(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 Vw(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");xd(e.outputLen),xd(e.blockLen)}function Ta(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 ck(e,t){Hr(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Lo(...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 ln(e,t){return e<<32-t|e>>>t}const Yw=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",lk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Er(e){if(Hr(e),Yw)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=lk[e[n]];return t}const wn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Kh(e){if(e>=wn._0&&e<=wn._9)return e-wn._0;if(e>=wn.A&&e<=wn.F)return e-(wn.A-10);if(e>=wn.a&&e<=wn.f)return e-(wn.a-10)}function Aa(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Yw)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=Kh(e.charCodeAt(s)),a=Kh(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 dk(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Vu(e){return typeof e=="string"&&(e=dk(e)),Hr(e),e}function fn(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Hr(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 Xw{}function Jw(e){const t=r=>e().update(Vu(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Yu(e=32){if(eo&&typeof eo.getRandomValues=="function")return eo.getRandomValues(new Uint8Array(e));if(eo&&typeof eo.randomBytes=="function")return Uint8Array.from(eo.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function uk(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 fk(e,t,n){return e&t^~e&n}function hk(e,t,n){return e&t^e&n^t&n}let Zw=class extends Xw{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){Ta(this),t=Vu(t),Hr(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){Ta(this),ck(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,Lo(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;uk(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 Kn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Et=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Li=BigInt(2**32-1),Gh=BigInt(32);function pk(e,t=!1){return t?{h:Number(e&Li),l:Number(e>>Gh&Li)}:{h:Number(e>>Gh&Li)|0,l:Number(e&Li)|0}}function mk(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}=pk(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const Wh=(e,t,n)=>e>>>n,Vh=(e,t,n)=>e<<32-n|t>>>n,to=(e,t,n)=>e>>>n|t<<32-n,no=(e,t,n)=>e<<32-n|t>>>n,Di=(e,t,n)=>e<<64-n|t>>>n-32,Oi=(e,t,n)=>e>>>n-32|t<<64-n;function bn(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const gk=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),yk=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,wk=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),bk=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,vk=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),xk=(e,t,n,r,o,s)=>t+n+r+o+s+(e/2**32|0)|0,Sk=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]),Gn=new Uint32Array(64);class Ek extends Zw{constructor(t=32){super(64,t,8,!1),this.A=Kn[0]|0,this.B=Kn[1]|0,this.C=Kn[2]|0,this.D=Kn[3]|0,this.E=Kn[4]|0,this.F=Kn[5]|0,this.G=Kn[6]|0,this.H=Kn[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)Gn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=Gn[f-15],p=Gn[f-2],g=ln(h,7)^ln(h,18)^h>>>3,m=ln(p,17)^ln(p,19)^p>>>10;Gn[f]=m+Gn[f-7]+g+Gn[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=ln(a,6)^ln(a,11)^ln(a,25),p=u+h+fk(a,c,d)+Sk[f]+Gn[f]|0,m=(ln(r,2)^ln(r,13)^ln(r,22))+hk(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(){Lo(Gn)}destroy(){this.set(0,0,0,0,0,0,0,0),Lo(this.buffer)}}const Qw=mk(["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))),kk=Qw[0],Ik=Qw[1],Wn=new Uint32Array(80),Vn=new Uint32Array(80);class Ck extends Zw{constructor(t=64){super(128,t,16,!1),this.Ah=Et[0]|0,this.Al=Et[1]|0,this.Bh=Et[2]|0,this.Bl=Et[3]|0,this.Ch=Et[4]|0,this.Cl=Et[5]|0,this.Dh=Et[6]|0,this.Dl=Et[7]|0,this.Eh=Et[8]|0,this.El=Et[9]|0,this.Fh=Et[10]|0,this.Fl=Et[11]|0,this.Gh=Et[12]|0,this.Gl=Et[13]|0,this.Hh=Et[14]|0,this.Hl=Et[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:w}=this;return[t,n,r,o,s,i,a,c,d,u,f,h,p,g,m,w]}set(t,n,r,o,s,i,a,c,d,u,f,h,p,g,m,w){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=w|0}process(t,n){for(let v=0;v<16;v++,n+=4)Wn[v]=t.getUint32(n),Vn[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const C=Wn[v-15]|0,A=Vn[v-15]|0,E=to(C,A,1)^to(C,A,8)^Wh(C,A,7),x=no(C,A,1)^no(C,A,8)^Vh(C,A,7),I=Wn[v-2]|0,k=Vn[v-2]|0,T=to(I,k,19)^Di(I,k,61)^Wh(I,k,6),_=no(I,k,19)^Oi(I,k,61)^Vh(I,k,6),R=wk(x,_,Vn[v-7],Vn[v-16]),P=bk(R,E,T,Wn[v-7],Wn[v-16]);Wn[v]=P|0,Vn[v]=R|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:w,Hh:y,Hl:S}=this;for(let v=0;v<80;v++){const C=to(f,h,14)^to(f,h,18)^Di(f,h,41),A=no(f,h,14)^no(f,h,18)^Oi(f,h,41),E=f&p^~f&m,x=h&g^~h&w,I=vk(S,A,x,Ik[v],Vn[v]),k=xk(I,y,C,E,kk[v],Wn[v]),T=I|0,_=to(r,o,28)^Di(r,o,34)^Di(r,o,39),R=no(r,o,28)^Oi(r,o,34)^Oi(r,o,39),P=r&s^r&a^s&a,N=o&i^o&c^i&c;y=m|0,S=w|0,m=p|0,w=g|0,p=f|0,g=h|0,{h:f,l:h}=bn(d|0,u|0,k|0,T|0),d=a|0,u=c|0,a=s|0,c=i|0,s=r|0,i=o|0;const L=gk(T,R,N);r=yk(L,k,_,P),o=L|0}({h:r,l:o}=bn(this.Ah|0,this.Al|0,r|0,o|0)),{h:s,l:i}=bn(this.Bh|0,this.Bl|0,s|0,i|0),{h:a,l:c}=bn(this.Ch|0,this.Cl|0,a|0,c|0),{h:d,l:u}=bn(this.Dh|0,this.Dl|0,d|0,u|0),{h:f,l:h}=bn(this.Eh|0,this.El|0,f|0,h|0),{h:p,l:g}=bn(this.Fh|0,this.Fl|0,p|0,g|0),{h:m,l:w}=bn(this.Gh|0,this.Gl|0,m|0,w|0),{h:y,l:S}=bn(this.Hh|0,this.Hl|0,y|0,S|0),this.set(r,o,s,i,a,c,d,u,f,h,p,g,m,w,y,S)}roundClean(){Lo(Wn,Vn)}destroy(){Lo(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const eb=Jw(()=>new Ek),Rk=Jw(()=>new Ck);const Xu=BigInt(0),Sd=BigInt(1);function Dr(e,t=""){if(typeof e!="boolean"){const n=t&&`"${t}"`;throw new Error(n+"expected boolean, got type="+typeof e)}return e}function rn(e,t,n=""){const r=hi(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 ji(e){const t=e.toString(16);return t.length&1?"0"+t:t}function tb(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Xu:BigInt("0x"+e)}function kc(e){return tb(Er(e))}function Ws(e){return Hr(e),tb(Er(Uint8Array.from(e).reverse()))}function Ju(e,t){return Aa(e.toString(16).padStart(t*2,"0"))}function nb(e,t){return Ju(e,t).reverse()}function rt(e,t,n){let r;if(typeof t=="string")try{r=Aa(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(hi(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 Yh(e){return Uint8Array.from(e)}const cl=e=>typeof e=="bigint"&&Xu<=e;function Tk(e,t,n){return cl(e)&&cl(t)&&cl(n)&&t<=e&&e<n}function Ed(e,t,n,r){if(!Tk(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function rb(e){let t;for(t=0;e>Xu;e>>=Sd,t+=1);return t}const pi=e=>(Sd<<BigInt(e))-Sd;function Ak(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 fn(...g)};return(p,g)=>{c(),u(p);let m;for(;!(m=g(f()));)u();return c(),m}}function mi(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 Pa(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 Ft=BigInt(0),xt=BigInt(1),gr=BigInt(2),ob=BigInt(3),sb=BigInt(4),ib=BigInt(5),Pk=BigInt(7),ab=BigInt(8),Nk=BigInt(9),cb=BigInt(16);function ct(e,t){const n=e%t;return n>=Ft?n:t+n}function nt(e,t,n){let r=e;for(;t-- >Ft;)r*=r,r%=n;return r}function Xh(e,t){if(e===Ft)throw new Error("invert: expected non-zero number");if(t<=Ft)throw new Error("invert: expected positive modulus, got "+t);let n=ct(e,t),r=t,o=Ft,s=xt;for(;n!==Ft;){const a=r/n,c=r%n,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==xt)throw new Error("invert: does not exist");return ct(o,t)}function Zu(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function lb(e,t){const n=(e.ORDER+xt)/sb,r=e.pow(t,n);return Zu(e,r,t),r}function _k(e,t){const n=(e.ORDER-ib)/ab,r=e.mul(t,gr),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,gr),o),a=e.mul(s,e.sub(i,e.ONE));return Zu(e,a,t),a}function Lk(e){const t=$r(e),n=db(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+Pk)/cb;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),w=a.cmov(d,u,m);return Zu(a,w,c),w}}function db(e){if(e<ob)throw new Error("sqrt is not defined for small field");let t=e-xt,n=0;for(;t%gr===Ft;)t/=gr,n++;let r=gr;const o=$r(e);for(;Jh(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return lb;let s=o.pow(r,t);const i=(t+xt)/gr;return function(c,d){if(c.is0(d))return d;if(Jh(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 w=xt<<BigInt(u-g-1),y=c.pow(f,w);u=g,f=c.sqr(y),h=c.mul(h,f),p=c.mul(p,y)}return p}}function Dk(e){return e%sb===ob?lb:e%ab===ib?_k:e%cb===Nk?Lk(e):db(e)}const Ok=(e,t)=>(ct(e,t)&xt)===xt,jk=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Mk(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=jk.reduce((r,o)=>(r[o]="function",r),t);return mi(e,n),e}function Bk(e,t,n){if(n<Ft)throw new Error("invalid exponent, negatives unsupported");if(n===Ft)return e.ONE;if(n===xt)return t;let r=e.ONE,o=t;for(;n>Ft;)n&xt&&(r=e.mul(r,o)),o=e.sqr(o),n>>=xt;return r}function ub(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 Jh(e,t){const n=(e.ORDER-xt)/gr,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 fb(e,t){t!==void 0&&xd(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function $r(e,t,n=!1,r={}){if(e<=Ft)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}=fb(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:pi(c),ZERO:Ft,ONE:xt,allowedLengths:a,create:h=>ct(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Ft<=h&&h<e},is0:h=>h===Ft,isValidNot0:h=>!f.is0(h)&&f.isValid(h),isOdd:h=>(h&xt)===xt,neg:h=>ct(-h,e),eql:(h,p)=>h===p,sqr:h=>ct(h*h,e),add:(h,p)=>ct(h+p,e),sub:(h,p)=>ct(h-p,e),mul:(h,p)=>ct(h*p,e),pow:(h,p)=>Bk(f,h,p),div:(h,p)=>ct(h*Xh(p,e),e),sqrN:h=>h*h,addN:(h,p)=>h+p,subN:(h,p)=>h-p,mulN:(h,p)=>h*p,inv:h=>Xh(h,e),sqrt:s||(h=>(u||(u=Dk(e)),u(f,h))),toBytes:h=>n?nb(h,d):Ju(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?Ws(h):kc(h);if(i&&(g=ct(g,e)),!p&&!f.isValid(g))throw new Error("invalid field element: outside of range 0..ORDER");return g},invertBatch:h=>ub(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 pb(e){const t=hb(e);return t+Math.ceil(t/2)}function Fk(e,t,n=!1){const r=e.length,o=hb(t),s=pb(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?Ws(e):kc(e),a=ct(i,t-xt)+xt;return n?nb(a,o):Ju(a,o)}const Do=BigInt(0),yr=BigInt(1);function Na(e,t){const n=t.negate();return e?n:t}function wr(e,t){const n=ub(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function mb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function ll(e,t){mb(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=pi(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function Zh(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+=yr);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 Uk(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 Hk(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 dl=new WeakMap,gb=new WeakMap;function ul(e){return gb.get(e)||1}function Qh(e){if(e!==Do)throw new Error("invalid wNAF")}class yb{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>Do;)n&yr&&(r=r.add(o)),o=o.double(),n>>=yr;return r}precomputeWindow(t,n){const{windows:r,windowSize:o}=ll(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=ll(t,this.bits);for(let a=0;a<i.windows;a++){const{nextN:c,offset:d,isZero:u,isNeg:f,isNegF:h,offsetF:p}=Zh(r,a,i);r=c,u?s=s.add(Na(h,n[p])):o=o.add(Na(f,n[d]))}return Qh(r),{p:o,f:s}}wNAFUnsafe(t,n,r,o=this.ZERO){const s=ll(t,this.bits);for(let i=0;i<s.windows&&r!==Do;i++){const{nextN:a,offset:c,isZero:d,isNeg:u}=Zh(r,i,s);if(r=a,!d){const f=n[c];o=o.add(u?f.negate():f)}}return Qh(r),o}getPrecomputes(t,n,r){let o=dl.get(n);return o||(o=this.precomputeWindow(n,t),t!==1&&(typeof r=="function"&&(o=r(o)),dl.set(n,o))),o}cached(t,n,r){const o=ul(t);return this.wNAF(o,this.getPrecomputes(o,t,r),n)}unsafe(t,n,r,o){const s=ul(t);return s===1?this._unsafeLadder(t,n,o):this.wNAFUnsafe(s,this.getPrecomputes(s,t,r),n,o)}createCache(t,n){mb(n,this.bits),gb.set(t,n),dl.delete(t)}hasCache(t){return ul(t)!==1}}function $k(e,t,n,r){let o=t,s=e.ZERO,i=e.ZERO;for(;n>Do||r>Do;)n&yr&&(s=s.add(o)),r&yr&&(i=i.add(o)),o=o.double(),n>>=yr,r>>=yr;return{p1:s,p2:i}}function wb(e,t,n,r){Uk(n,e),Hk(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=rb(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const d=pi(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 w=r[m],y=Number(w>>BigInt(p)&d);u[y]=u[y].add(n[m])}let g=i;for(let m=u.length-1,w=i;m>0;m--)w=w.add(u[m]),g=g.add(w);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 Mk(t),t}else return $r(e,{isLE:n})}function bb(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>Do))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 Yn=BigInt(0),pt=BigInt(1),fl=BigInt(2),zk=BigInt(8);function qk(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 Kk(e,t={}){const n=bb("edwards",e,t,t.FpFnLE),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i}=s;mi(t,{},{uvRatio:"function"});const a=fl<<BigInt(o.BYTES*8)-pt,c=w=>r.create(w),d=t.uvRatio||((w,y)=>{try{return{isValid:!0,value:r.sqrt(r.div(w,y))}}catch{return{isValid:!1,value:Yn}}});if(!qk(r,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function u(w,y,S=!1){const v=S?pt:Yn;return Ed("coordinate "+w,y,v,a),y}function f(w){if(!(w instanceof g))throw new Error("ExtendedPoint expected")}const h=Pa((w,y)=>{const{X:S,Y:v,Z:C}=w,A=w.is0();y==null&&(y=A?zk:r.inv(C));const E=c(S*y),x=c(v*y),I=r.mul(C,y);if(A)return{x:Yn,y:pt};if(I!==pt)throw new Error("invZ was invalid");return{x:E,y:x}}),p=Pa(w=>{const{a:y,d:S}=s;if(w.is0())throw new Error("bad point: ZERO");const{X:v,Y:C,Z:A,T:E}=w,x=c(v*v),I=c(C*C),k=c(A*A),T=c(k*k),_=c(x*y),R=c(k*c(_+I)),P=c(T+c(S*c(x*I)));if(R!==P)throw new Error("bad point: equation left != right (1)");const N=c(v*C),L=c(A*E);if(N!==L)throw new Error("bad point: equation left != right (2)");return!0});class g{constructor(y,S,v,C){this.X=u("x",y),this.Y=u("y",S),this.Z=u("z",v,!0),this.T=u("t",C),Object.freeze(this)}static CURVE(){return s}static fromAffine(y){if(y instanceof g)throw new Error("extended point not allowed");const{x:S,y:v}=y||{};return u("x",S),u("y",v),new g(S,v,pt,c(S*v))}static fromBytes(y,S=!1){const v=r.BYTES,{a:C,d:A}=s;y=Yh(rn(y,v,"point")),Dr(S,"zip215");const E=Yh(y),x=y[v-1];E[v-1]=x&-129;const I=Ws(E),k=S?a:r.ORDER;Ed("point.y",I,Yn,k);const T=c(I*I),_=c(T-pt),R=c(A*T-C);let{isValid:P,value:N}=d(_,R);if(!P)throw new Error("bad point: invalid y coordinate");const L=(N&pt)===pt,D=(x&128)!==0;if(!S&&N===Yn&&D)throw new Error("bad point: x=0 and x_0=1");return D!==L&&(N=c(-N)),g.fromAffine({x:N,y:I})}static fromHex(y,S=!1){return g.fromBytes(rt("point",y),S)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,S=!0){return m.createCache(this,y),S||this.multiply(fl),this}assertValidity(){p(this)}equals(y){f(y);const{X:S,Y:v,Z:C}=this,{X:A,Y:E,Z:x}=y,I=c(S*x),k=c(A*C),T=c(v*x),_=c(E*C);return I===k&&T===_}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:S,Y:v,Z:C}=this,A=c(S*S),E=c(v*v),x=c(fl*c(C*C)),I=c(y*A),k=S+v,T=c(c(k*k)-A-E),_=I+E,R=_-x,P=I-E,N=c(T*R),L=c(_*P),D=c(T*P),O=c(R*_);return new g(N,L,O,D)}add(y){f(y);const{a:S,d:v}=s,{X:C,Y:A,Z:E,T:x}=this,{X:I,Y:k,Z:T,T:_}=y,R=c(C*I),P=c(A*k),N=c(x*v*_),L=c(E*T),D=c((C+A)*(I+k)-R-P),O=L-N,B=L+N,M=c(P-S*R),F=c(D*O),H=c(B*M),$=c(D*M),ee=c(O*B);return new g(F,H,ee,$)}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:S,f:v}=m.cached(this,y,C=>wr(g,C));return wr(g,[S,v])[0]}multiplyUnsafe(y,S=g.ZERO){if(!o.isValid(y))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return y===Yn?g.ZERO:this.is0()||y===pt?this:m.unsafe(this,y,v=>wr(g,v),S)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}isTorsionFree(){return m.unsafe(this,s.n).is0()}toAffine(y){return h(this,y)}clearCofactor(){return i===pt?this:this.multiplyUnsafe(i)}toBytes(){const{x:y,y:S}=this.toAffine(),v=r.toBytes(S);return v[v.length-1]|=y&pt?128:0,v}toHex(){return Er(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 wr(g,y)}static msm(y,S){return wb(g,o,y,S)}_setWindowSize(y){this.precompute(y)}toRawBytes(){return this.toBytes()}}g.BASE=new g(s.Gx,s.Gy,pt,c(s.Gx*s.Gy)),g.ZERO=new g(Yn,pt,pt,Yn),g.Fp=r,g.Fn=o;const m=new yb(g,o.BITS);return g.BASE.precompute(8),g}function Gk(e,t,n={}){if(typeof t!="function")throw new Error('"hash" function param is required');mi(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||Yu,c=n.adjustScalarBytes||(k=>k),d=n.domain||((k,T,_)=>{if(Dr(_,"phflag"),T.length||_)throw new Error("Contexts/pre-hash are not supported");return k});function u(k){return i.create(Ws(k))}function f(k){const T=v.secretKey;k=rt("private key",k,T);const _=rt("hashed private key",t(k),2*T),R=c(_.slice(0,T)),P=_.slice(T,2*T),N=u(R);return{head:R,prefix:P,scalar:N}}function h(k){const{head:T,prefix:_,scalar:R}=f(k),P=o.multiply(R),N=P.toBytes();return{head:T,prefix:_,scalar:R,point:P,pointBytes:N}}function p(k){return h(k).pointBytes}function g(k=Uint8Array.of(),...T){const _=fn(...T);return u(t(d(_,rt("context",k),!!r)))}function m(k,T,_={}){k=rt("message",k),r&&(k=r(k));const{prefix:R,scalar:P,pointBytes:N}=h(T),L=g(_.context,R,k),D=o.multiply(L).toBytes(),O=g(_.context,D,N,k),B=i.create(L+O*P);if(!i.isValid(B))throw new Error("sign failed: invalid s");const M=fn(D,i.toBytes(B));return rn(M,v.signature,"result")}const w={zip215:!0};function y(k,T,_,R=w){const{context:P,zip215:N}=R,L=v.signature;k=rt("signature",k,L),T=rt("message",T),_=rt("publicKey",_,v.publicKey),N!==void 0&&Dr(N,"zip215"),r&&(T=r(T));const D=L/2,O=k.subarray(0,D),B=Ws(k.subarray(D,L));let M,F,H;try{M=e.fromBytes(_,N),F=e.fromBytes(O,N),H=o.multiplyUnsafe(B)}catch{return!1}if(!N&&M.isSmallOrder())return!1;const $=g(P,F.toBytes(),M.toBytes(),T);return F.add(M.multiplyUnsafe($)).subtract(H).clearCofactor().is0()}const S=s.BYTES,v={secretKey:S,publicKey:S,signature:2*S,seed:S};function C(k=a(v.seed)){return rn(k,v.seed,"seed")}function A(k){const T=I.randomSecretKey(k);return{secretKey:T,publicKey:p(T)}}function E(k){return hi(k)&&k.length===i.BYTES}function x(k,T){try{return!!e.fromBytes(k,T)}catch{return!1}}const I={getExtendedPublicKey:h,randomSecretKey:C,isValidSecretKey:E,isValidPublicKey:x,toMontgomery(k){const{y:T}=e.fromBytes(k),_=v.publicKey,R=_===32;if(!R&&_!==57)throw new Error("only defined for 25519 and 448");const P=R?s.div(pt+T,pt-T):s.div(T-pt,T+pt);return s.toBytes(P)},toMontgomerySecret(k){const T=v.secretKey;rn(k,T);const _=t(k.subarray(0,T));return c(_).subarray(0,T)},randomPrivateKey:C,precompute(k=8,T=e.BASE){return T.precompute(k,!1)}};return Object.freeze({keygen:A,getPublicKey:p,sign:m,verify:y,utils:I,Point:e,lengths:v})}function Wk(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=$r(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 Vk(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}function Yk(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:o}=Wk(e),s=Kk(t,n),i=Gk(s,r,o);return Vk(e,i)}const Xk=BigInt(1),tp=BigInt(2);BigInt(3);const Jk=BigInt(5),Zk=BigInt(8),Qu=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),vb={p:Qu,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Zk,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Qk(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Qu,a=e*e%s*e%s,c=nt(a,tp,s)*a%s,d=nt(c,Xk,s)*e%s,u=nt(d,Jk,s)*d%s,f=nt(u,t,s)*u%s,h=nt(f,n,s)*f%s,p=nt(h,r,s)*h%s,g=nt(p,o,s)*p%s,m=nt(g,o,s)*p%s,w=nt(m,t,s)*u%s;return{pow_p_5_8:nt(w,tp,s)*e%s,b2:a}}function eI(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const np=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function tI(e,t){const n=Qu,r=ct(t*t*t,n),o=ct(r*r*t,n),s=Qk(e*o).pow_p_5_8;let i=ct(e*r*s,n);const a=ct(t*i*i,n),c=i,d=ct(i*np,n),u=a===e,f=a===ct(-e,n),h=a===ct(-e*np,n);return u&&(i=c),(f||h)&&(i=d),Ok(i,n)&&(i=ct(-i,n)),{isValid:u||f,value:i}}const nI=$r(vb.p,{isLE:!0}),rI={...vb,Fp:nI,hash:Rk,adjustScalarBytes:eI,uvRatio:tI},_a=Yk(rI);class rp extends Error{constructor(t="An error occurred while signing a message"){super(t),this.name="SigningError"}}class op 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 Mn={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}},La=32,En=64,kd=32;let vo;const xb=(async()=>{try{return await Mn.get().subtle.generateKey({name:"Ed25519"},!0,["sign","verify"]),!0}catch{return!1}})();function sI(){const e=_a.utils.randomPrivateKey(),t=_a.getPublicKey(e);return{privateKey:fI(e,t),publicKey:t}}async function iI(e,t){let n;e.length===En?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 Mn.get().subtle.importKey("jwk",r,{name:"Ed25519"},!0,["sign"]),s=await Mn.get().subtle.sign({name:"Ed25519"},o,t instanceof Uint8Array?t:t.subarray());return new Uint8Array(s,0,s.byteLength)}function aI(e,t){const n=e.subarray(0,kd);return _a.sign(t instanceof Uint8Array?t:t.subarray(),n)}async function cI(e,t){return vo==null&&(vo=await xb),vo?iI(e,t):aI(e,t)}async function lI(e,t,n){if(e.buffer instanceof ArrayBuffer){const r=await Mn.get().subtle.importKey("raw",e.buffer,{name:"Ed25519"},!1,["verify"]);return await Mn.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 dI(e,t,n){return _a.verify(t,n instanceof Uint8Array?n:n.subarray(),e)}async function uI(e,t,n){return vo==null&&(vo=await xb),vo?lI(e,t,n):dI(e,t,n)}function fI(e,t){const n=new Uint8Array(En);for(let r=0;r<kd;r++)n[r]=e[r],n[kd+r]=t[r];return n}function Ic(e){return e==null?!1:typeof e.then=="function"&&typeof e.catch=="function"&&typeof e.finally=="function"}class Sb{type="Ed25519";raw;constructor(t){this.raw=Vs(t,La)}toMultihash(){return ui.digest(Ac(this))}toCID(){return et.createV1(114,this.toMultihash())}toString(){return _t.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}verify(t,n,r){r?.signal?.throwIfAborted();const o=uI(this.raw,n,t);return Ic(o)?o.then(s=>(r?.signal?.throwIfAborted(),s)):o}}class Id{type="Ed25519";raw;publicKey;constructor(t,n){this.raw=Vs(t,En),this.publicKey=new Sb(n)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}sign(t,n){n?.signal?.throwIfAborted();const r=cI(this.raw,t);return Ic(r)?r.then(o=>(n?.signal?.throwIfAborted(),o)):(n?.signal?.throwIfAborted(),r)}}function hI(e){if(e.length>En){e=Vs(e,En+La);const r=e.subarray(0,En),o=e.subarray(En,e.length);return new Id(r,o)}e=Vs(e,En);const t=e.subarray(0,En),n=e.subarray(La);return new Id(t,n)}function Eb(e){return e=Vs(e,La),new Sb(e)}async function pI(){const{privateKey:e,publicKey:t}=sI();return new Id(e,t)}function Vs(e,t){if(e=Uint8Array.from(e??[]),e.length!==t)throw new on(`Key must be a Uint8Array of length ${t}, got ${e.length}`);return e}const mI=Math.pow(2,7),gI=Math.pow(2,14),yI=Math.pow(2,21),ef=Math.pow(2,28),tf=Math.pow(2,35),nf=Math.pow(2,42),rf=Math.pow(2,49),Ue=128,kt=127;function zr(e){if(e<mI)return 1;if(e<gI)return 2;if(e<yI)return 3;if(e<ef)return 4;if(e<tf)return 5;if(e<nf)return 6;if(e<rf)return 7;if(Number.MAX_SAFE_INTEGER!=null&&e>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function kb(e,t,n=0){switch(zr(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 wI(e,t,n=0){switch(zr(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 Ib(e,t){let n=e[t],r=0;if(r+=n&kt,n<Ue||(n=e[t+1],r+=(n&kt)<<7,n<Ue)||(n=e[t+2],r+=(n&kt)<<14,n<Ue)||(n=e[t+3],r+=(n&kt)<<21,n<Ue)||(n=e[t+4],r+=(n&kt)*ef,n<Ue)||(n=e[t+5],r+=(n&kt)*tf,n<Ue)||(n=e[t+6],r+=(n&kt)*nf,n<Ue)||(n=e[t+7],r+=(n&kt)*rf,n<Ue))return r;throw new RangeError("Could not decode varint")}function bI(e,t){let n=e.get(t),r=0;if(r+=n&kt,n<Ue||(n=e.get(t+1),r+=(n&kt)<<7,n<Ue)||(n=e.get(t+2),r+=(n&kt)<<14,n<Ue)||(n=e.get(t+3),r+=(n&kt)<<21,n<Ue)||(n=e.get(t+4),r+=(n&kt)*ef,n<Ue)||(n=e.get(t+5),r+=(n&kt)*tf,n<Ue)||(n=e.get(t+6),r+=(n&kt)*nf,n<Ue)||(n=e.get(t+7),r+=(n&kt)*rf,n<Ue))return r;throw new RangeError("Could not decode varint")}function vI(e,t,n=0){return t==null&&(t=jn(zr(e))),t instanceof Uint8Array?kb(e,t,n):wI(e,t,n)}function Cb(e,t=0){return e instanceof Uint8Array?Ib(e,t):bI(e,t)}const of=new Float32Array([-0]),sr=new Uint8Array(of.buffer);function xI(e,t,n){of[0]=e,t[n]=sr[0],t[n+1]=sr[1],t[n+2]=sr[2],t[n+3]=sr[3]}function SI(e,t){return sr[0]=e[t],sr[1]=e[t+1],sr[2]=e[t+2],sr[3]=e[t+3],of[0]}const sf=new Float64Array([-0]),It=new Uint8Array(sf.buffer);function EI(e,t,n){sf[0]=e,t[n]=It[0],t[n+1]=It[1],t[n+2]=It[2],t[n+3]=It[3],t[n+4]=It[4],t[n+5]=It[5],t[n+6]=It[6],t[n+7]=It[7]}function kI(e,t){return It[0]=e[t],It[1]=e[t+1],It[2]=e[t+2],It[3]=e[t+3],It[4]=e[t+4],It[5]=e[t+5],It[6]=e[t+6],It[7]=e[t+7],sf[0]}const II=BigInt(Number.MAX_SAFE_INTEGER),CI=BigInt(Number.MIN_SAFE_INTEGER);class Ct{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 kr;if(t<II&&t>CI)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>sp&&(o=0n,++r>sp&&(r=0n))),new Ct(Number(o),Number(r))}static fromNumber(t){if(t===0)return kr;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 Ct(r,o)}static from(t){return typeof t=="number"?Ct.fromNumber(t):typeof t=="bigint"?Ct.fromBigInt(t):typeof t=="string"?Ct.fromBigInt(BigInt(t)):t.low!=null||t.high!=null?new Ct(t.low>>>0,t.high>>>0):kr}}const kr=new Ct(0,0);kr.toBigInt=function(){return 0n};kr.zzEncode=kr.zzDecode=function(){return this};kr.length=function(){return 1};const sp=4294967296n;function RI(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 TI(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 Rb(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 Qt(e,t){return RangeError(`index out of range: ${e.pos} + ${t??1} > ${e.len}`)}function Mi(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}class AI{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,Qt(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 Qt(this,4);return Mi(this.buf,this.pos+=4)}sfixed32(){if(this.pos+4>this.len)throw Qt(this,4);return Mi(this.buf,this.pos+=4)|0}float(){if(this.pos+4>this.len)throw Qt(this,4);const t=SI(this.buf,this.pos);return this.pos+=4,t}double(){if(this.pos+8>this.len)throw Qt(this,4);const t=kI(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 Qt(this,t);return this.pos+=t,n===r?new Uint8Array(0):this.buf.subarray(n,r)}string(){const t=this.bytes();return TI(t,0,t.length)}skip(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Qt(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Qt(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 Ct(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 Qt(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 Qt(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 Qt(this,8);const t=Mi(this.buf,this.pos+=4),n=Mi(this.buf,this.pos+=4);return new Ct(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=Ib(this.buf,this.pos);return this.pos+=zr(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 PI(e){return new AI(e instanceof Uint8Array?e:e.subarray())}function Cc(e,t,n){const r=PI(e);return t.decode(r,void 0,n)}function NI(e){let r,o=8192;return function(i){if(i<1||i>4096)return jn(i);o+i>8192&&(r=jn(8192),o=0);const a=r.subarray(o,o+=i);return(o&7)!==0&&(o=(o|7)+1),a}}class Ss{fn;len;next;val;constructor(t,n,r){this.fn=t,this.len=n,this.next=void 0,this.val=r}}function hl(){}class _I{head;tail;len;next;constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}}const LI=NI();function DI(e){return globalThis.Buffer!=null?jn(e):LI(e)}class Cd{len;head;tail;states;constructor(){this.len=0,this.head=new Ss(hl,0,0),this.tail=this.head,this.states=null}_push(t,n,r){return this.tail=this.tail.next=new Ss(t,n,r),this.len+=n,this}uint32(t){return this.len+=(this.tail=this.tail.next=new jI((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(Bi,10,Ct.fromNumber(t)):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}uint64(t){const n=Ct.fromBigInt(t);return this._push(Bi,n.length(),n)}uint64Number(t){return this._push(kb,zr(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=Ct.fromBigInt(t).zzEncode();return this._push(Bi,n.length(),n)}sint64Number(t){const n=Ct.fromNumber(t).zzEncode();return this._push(Bi,n.length(),n)}sint64String(t){return this.sint64(BigInt(t))}bool(t){return this._push(pl,1,t?1:0)}fixed32(t){return this._push(os,4,t>>>0)}sfixed32(t){return this.fixed32(t)}fixed64(t){const n=Ct.fromBigInt(t);return this._push(os,4,n.lo)._push(os,4,n.hi)}fixed64Number(t){const n=Ct.fromNumber(t);return this._push(os,4,n.lo)._push(os,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(xI,4,t)}double(t){return this._push(EI,8,t)}bytes(t){const n=t.length>>>0;return n===0?this._push(pl,1,0):this.uint32(n)._push(MI,n,t)}string(t){const n=RI(t);return n!==0?this.uint32(n)._push(Rb,n,t):this._push(pl,1,0)}fork(){return this.states=new _I(this),this.head=this.tail=new Ss(hl,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 Ss(hl,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=DI(this.len);let r=0;for(;t!=null;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}}function pl(e,t,n){t[n]=e&255}function OI(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}class jI extends Ss{next;constructor(t,n){super(OI,t,n),this.next=void 0}}function Bi(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 os(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 MI(e,t,n){t.set(e,n)}globalThis.Buffer!=null&&(Cd.prototype.bytes=function(e){const t=e.length>>>0;return this.uint32(t),t>0&&this._push(BI,t,e),this},Cd.prototype.string=function(e){const t=globalThis.Buffer.byteLength(e);return this.uint32(t),t>0&&this._push(FI,t,e),this});function BI(e,t,n){t.set(e,n)}function FI(e,t,n){e.length<40?Rb(e,t,n):t.utf8Write!=null?t.utf8Write(e,n):t.set(at(e),n)}function UI(){return new Cd}function Rc(e,t){const n=UI();return t.encode(e,n,{lengthDelimited:!1}),n.finish()}var Da;(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"})(Da||(Da={}));function Tb(e,t,n,r){return{name:e,type:t,encode:n,decode:r}}function HI(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 Tb("enum",Da.VARINT,n,r)}function Tc(e,t){return Tb("message",Da.LENGTH_DELIMITED,e,t)}class ip extends Error{code="ERR_MAX_LENGTH";name="MaxLengthError"}var tt;(function(e){e.RSA="RSA",e.Ed25519="Ed25519",e.secp256k1="secp256k1",e.ECDSA="ECDSA"})(tt||(tt={}));var Rd;(function(e){e[e.RSA=0]="RSA",e[e.Ed25519=1]="Ed25519",e[e.secp256k1=2]="secp256k1",e[e.ECDSA=3]="ECDSA"})(Rd||(Rd={}));(function(e){e.codec=()=>HI(Rd)})(tt||(tt={}));var Or;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),tt.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=tt.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Or||(Or={}));var Oa;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),tt.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=tt.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Oa||(Oa={}));const Ab=eb;class Pb{type="RSA";jwk;_raw;_multihash;constructor(t,n){this.jwk=t,this._multihash=n}get raw(){return this._raw==null&&(this._raw=_b(this.jwk)),this._raw}toMultihash(){return this._multihash}toCID(){return et.createV1(114,this._multihash)}toString(){return _t.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}verify(t,n,r){return nC(this.jwk,n,t,r)}}class $I{type="RSA";jwk;_raw;publicKey;constructor(t,n){this.jwk=t,this.publicKey=n}get raw(){return this._raw==null&&(this._raw=WI(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}sign(t,n){return tC(this.jwk,t,n)}}const zI=8192,Nb=18,qI=1062,KI=Uint8Array.from([48,13,6,9,42,134,72,134,247,13,1,1,1,5,0]);function GI(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 WI(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 on("JWK was missing components");return Nn([zt(Uint8Array.from([0])),zt(at(e.n,"base64url")),zt(at(e.e,"base64url")),zt(at(e.d,"base64url")),zt(at(e.p,"base64url")),zt(at(e.q,"base64url")),zt(at(e.dp,"base64url")),zt(at(e.dq,"base64url")),zt(at(e.qi,"base64url"))]).subarray()}function VI(e){const t=qo(e[1],{offset:0});return{kty:"RSA",n:Le(t[0],"base64url"),e:Le(t[1],"base64url")}}function _b(e){if(e.n==null||e.e==null)throw new on("JWK was missing components");return Nn([KI,Wu(Nn([zt(at(e.n,"base64url")),zt(at(e.e,"base64url"))]))]).subarray()}function YI(e){const t=qo(e);return XI(t)}function XI(e){const t=GI(e);return QI(t)}function JI(e,t){if(e.byteLength>=qI)throw new Nw("Key size is too large");const n=qo(e,{offset:0});return ZI(n,e,t)}function ZI(e,t,n){const r=VI(e);if(n==null){const o=Ab(Or.encode({Type:tt.RSA,Data:t}));n=di(Nb,o)}return new Pb(r,n)}function QI(e){if(rC(e)>zI)throw new on("Key size is too large");const t=eC(e),n=Ab(Or.encode({Type:tt.RSA,Data:_b(t.publicKey)})),r=di(Nb,n);return new $I(t.privateKey,new Pb(t.publicKey,r))}function eC(e){if(e==null)throw new on("Missing key parameter");return{privateKey:e,publicKey:{kty:e.kty,n:e.n,e:e.e}}}async function tC(e,t,n){const r=await Mn.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);n?.signal?.throwIfAborted();const o=await Mn.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 nC(e,t,n,r){const o=await Mn.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);r?.signal?.throwIfAborted();const s=await Mn.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},o,t,n instanceof Uint8Array?n:n.subarray());return r?.signal?.throwIfAborted(),s}function rC(e){if(e.kty!=="RSA")throw new on("invalid key type");if(e.n==null)throw new on("invalid key modulus");return at(e.n,"base64url").length*8}class Lb extends Xw{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Vw(t);const r=Vu(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),Lo(s)}update(t){return Ta(this),this.iHash.update(t),this}digestInto(t){Ta(this),Hr(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 Db=(e,t,n)=>new Lb(e,t).update(n).digest();Db.create=(e,t)=>new Lb(e,t);const ap=(e,t)=>(e+(e>=0?t:-t)/Ob)/t;function oC(e,t,n){const[[r,o],[s,i]]=t,a=ap(i*e,n),c=ap(-o*e,n);let d=e-a*r-c*s,u=-a*o-c*i;const f=d<Cn,h=u<Cn;f&&(d=-d),h&&(u=-u);const p=pi(Math.ceil(rb(n)/2))+xo;if(d<Cn||d>=p||u<Cn||u>=p)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:f,k1:d,k2neg:h,k2:u}}function Td(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function ml(e,t){const n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return Dr(n.lowS,"lowS"),Dr(n.prehash,"prehash"),n.format!==void 0&&Td(n.format),n}class sC extends Error{constructor(t=""){super(t)}}const kn={Err:sC,_tlv:{encode:(e,t)=>{const{Err:n}=kn;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=ji(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?ji(o.length/2|128):"";return ji(e)+s+o+t},decode(e,t){const{Err:n}=kn;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}=kn;if(e<Cn)throw new t("integer: negative integers are not allowed");let n=ji(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}=kn;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 kc(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=kn,o=rt("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}=kn,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}},Cn=BigInt(0),xo=BigInt(1),Ob=BigInt(2),Fi=BigInt(3),iC=BigInt(4);function ho(e,t){const{BYTES:n}=e;let r;if(typeof t=="bigint")r=t;else{let o=rt("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 aC(e,t={}){const n=bb("weierstrass",e,t),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i,n:a}=s;mi(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=Mb(r,o);function u(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function f(R,P,N){const{x:L,y:D}=P.toAffine(),O=r.toBytes(L);if(Dr(N,"isCompressed"),N){u();const B=!r.isOdd(D);return fn(jb(B),O)}else return fn(Uint8Array.of(4),O,r.toBytes(D))}function h(R){rn(R,void 0,"Point");const{publicKey:P,publicKeyUncompressed:N}=d,L=R.length,D=R[0],O=R.subarray(1);if(L===P&&(D===2||D===3)){const B=r.fromBytes(O);if(!r.isValid(B))throw new Error("bad point: is not on curve, wrong x");const M=m(B);let F;try{F=r.sqrt(M)}catch(ee){const ne=ee instanceof Error?": "+ee.message:"";throw new Error("bad point: is not on curve, sqrt error"+ne)}u();const H=r.isOdd(F);return(D&1)===1!==H&&(F=r.neg(F)),{x:B,y:F}}else if(L===N&&D===4){const B=r.BYTES,M=r.fromBytes(O.subarray(0,B)),F=r.fromBytes(O.subarray(B,B*2));if(!w(M,F))throw new Error("bad point: is not on curve");return{x:M,y:F}}else throw new Error(`bad point: got length ${L}, expected compressed=${P} or uncompressed=${N}`)}const p=t.toBytes||f,g=t.fromBytes||h;function m(R){const P=r.sqr(R),N=r.mul(P,R);return r.add(r.add(N,r.mul(R,s.a)),s.b)}function w(R,P){const N=r.sqr(P),L=m(R);return r.eql(N,L)}if(!w(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const y=r.mul(r.pow(s.a,Fi),iC),S=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(y,S)))throw new Error("bad curve params: a or b");function v(R,P,N=!1){if(!r.isValid(P)||N&&r.is0(P))throw new Error(`bad point coordinate ${R}`);return P}function C(R){if(!(R instanceof k))throw new Error("ProjectivePoint expected")}function A(R){if(!c||!c.basises)throw new Error("no endo");return oC(R,c.basises,o.ORDER)}const E=Pa((R,P)=>{const{X:N,Y:L,Z:D}=R;if(r.eql(D,r.ONE))return{x:N,y:L};const O=R.is0();P==null&&(P=O?r.ONE:r.inv(D));const B=r.mul(N,P),M=r.mul(L,P),F=r.mul(D,P);if(O)return{x:r.ZERO,y:r.ZERO};if(!r.eql(F,r.ONE))throw new Error("invZ was invalid");return{x:B,y:M}}),x=Pa(R=>{if(R.is0()){if(t.allowInfinityPoint&&!r.is0(R.Y))return;throw new Error("bad point: ZERO")}const{x:P,y:N}=R.toAffine();if(!r.isValid(P)||!r.isValid(N))throw new Error("bad point: x or y not field elements");if(!w(P,N))throw new Error("bad point: equation left != right");if(!R.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function I(R,P,N,L,D){return N=new k(r.mul(N.X,R),N.Y,N.Z),P=Na(L,P),N=Na(D,N),P.add(N)}class k{constructor(P,N,L){this.X=v("x",P),this.Y=v("y",N,!0),this.Z=v("z",L),Object.freeze(this)}static CURVE(){return s}static fromAffine(P){const{x:N,y:L}=P||{};if(!P||!r.isValid(N)||!r.isValid(L))throw new Error("invalid affine point");if(P instanceof k)throw new Error("projective point not allowed");return r.is0(N)&&r.is0(L)?k.ZERO:new k(N,L,r.ONE)}static fromBytes(P){const N=k.fromAffine(g(rn(P,void 0,"point")));return N.assertValidity(),N}static fromHex(P){return k.fromBytes(rt("pointHex",P))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(P=8,N=!0){return _.createCache(this,P),N||this.multiply(Fi),this}assertValidity(){x(this)}hasEvenY(){const{y:P}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(P)}equals(P){C(P);const{X:N,Y:L,Z:D}=this,{X:O,Y:B,Z:M}=P,F=r.eql(r.mul(N,M),r.mul(O,D)),H=r.eql(r.mul(L,M),r.mul(B,D));return F&&H}negate(){return new k(this.X,r.neg(this.Y),this.Z)}double(){const{a:P,b:N}=s,L=r.mul(N,Fi),{X:D,Y:O,Z:B}=this;let M=r.ZERO,F=r.ZERO,H=r.ZERO,$=r.mul(D,D),ee=r.mul(O,O),ne=r.mul(B,B),te=r.mul(D,O);return te=r.add(te,te),H=r.mul(D,B),H=r.add(H,H),M=r.mul(P,H),F=r.mul(L,ne),F=r.add(M,F),M=r.sub(ee,F),F=r.add(ee,F),F=r.mul(M,F),M=r.mul(te,M),H=r.mul(L,H),ne=r.mul(P,ne),te=r.sub($,ne),te=r.mul(P,te),te=r.add(te,H),H=r.add($,$),$=r.add(H,$),$=r.add($,ne),$=r.mul($,te),F=r.add(F,$),ne=r.mul(O,B),ne=r.add(ne,ne),$=r.mul(ne,te),M=r.sub(M,$),H=r.mul(ne,ee),H=r.add(H,H),H=r.add(H,H),new k(M,F,H)}add(P){C(P);const{X:N,Y:L,Z:D}=this,{X:O,Y:B,Z:M}=P;let F=r.ZERO,H=r.ZERO,$=r.ZERO;const ee=s.a,ne=r.mul(s.b,Fi);let te=r.mul(N,O),le=r.mul(L,B),U=r.mul(D,M),J=r.add(N,L),Q=r.add(O,B);J=r.mul(J,Q),Q=r.add(te,le),J=r.sub(J,Q),Q=r.add(N,D);let Y=r.add(O,M);return Q=r.mul(Q,Y),Y=r.add(te,U),Q=r.sub(Q,Y),Y=r.add(L,D),F=r.add(B,M),Y=r.mul(Y,F),F=r.add(le,U),Y=r.sub(Y,F),$=r.mul(ee,Q),F=r.mul(ne,U),$=r.add(F,$),F=r.sub(le,$),$=r.add(le,$),H=r.mul(F,$),le=r.add(te,te),le=r.add(le,te),U=r.mul(ee,U),Q=r.mul(ne,Q),le=r.add(le,U),U=r.sub(te,U),U=r.mul(ee,U),Q=r.add(Q,U),te=r.mul(le,Q),H=r.add(H,te),te=r.mul(Y,Q),F=r.mul(J,F),F=r.sub(F,te),te=r.mul(J,le),$=r.mul(Y,$),$=r.add($,te),new k(F,H,$)}subtract(P){return this.add(P.negate())}is0(){return this.equals(k.ZERO)}multiply(P){const{endo:N}=t;if(!o.isValidNot0(P))throw new Error("invalid scalar: out of range");let L,D;const O=B=>_.cached(this,B,M=>wr(k,M));if(N){const{k1neg:B,k1:M,k2neg:F,k2:H}=A(P),{p:$,f:ee}=O(M),{p:ne,f:te}=O(H);D=ee.add(te),L=I(N.beta,$,ne,B,F)}else{const{p:B,f:M}=O(P);L=B,D=M}return wr(k,[L,D])[0]}multiplyUnsafe(P){const{endo:N}=t,L=this;if(!o.isValid(P))throw new Error("invalid scalar: out of range");if(P===Cn||L.is0())return k.ZERO;if(P===xo)return L;if(_.hasCache(this))return this.multiply(P);if(N){const{k1neg:D,k1:O,k2neg:B,k2:M}=A(P),{p1:F,p2:H}=$k(k,L,O,M);return I(N.beta,F,H,D,B)}else return _.unsafe(L,P)}multiplyAndAddUnsafe(P,N,L){const D=this.multiplyUnsafe(N).add(P.multiplyUnsafe(L));return D.is0()?void 0:D}toAffine(P){return E(this,P)}isTorsionFree(){const{isTorsionFree:P}=t;return i===xo?!0:P?P(k,this):_.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:P}=t;return i===xo?this:P?P(k,this):this.multiplyUnsafe(i)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}toBytes(P=!0){return Dr(P,"isCompressed"),this.assertValidity(),p(k,this,P)}toHex(P=!0){return Er(this.toBytes(P))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(P=!0){return this.toBytes(P)}_setWindowSize(P){this.precompute(P)}static normalizeZ(P){return wr(k,P)}static msm(P,N){return wb(k,o,P,N)}static fromPrivateKey(P){return k.BASE.multiply(ho(o,P))}}k.BASE=new k(s.Gx,s.Gy,r.ONE),k.ZERO=new k(r.ZERO,r.ONE,r.ZERO),k.Fp=r,k.Fn=o;const T=o.BITS,_=new yb(k,t.endo?Math.ceil(T/2):T);return k.BASE.precompute(8),k}function jb(e){return Uint8Array.of(e?2:3)}function Mb(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function cC(e,t={}){const{Fn:n}=e,r=t.randomBytes||Yu,o=Object.assign(Mb(e.Fp,n),{seed:pb(n.ORDER)});function s(p){try{return!!ho(n,p)}catch{return!1}}function i(p,g){const{publicKey:m,publicKeyUncompressed:w}=o;try{const y=p.length;return g===!0&&y!==m||g===!1&&y!==w?!1:!!e.fromBytes(p)}catch{return!1}}function a(p=r(o.seed)){return Fk(rn(p,o.seed,"seed"),n.ORDER)}function c(p,g=!0){return e.BASE.multiply(ho(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:w}=o;if(n.allowedLengths||g===m)return;const y=rt("key",p).length;return y===m||y===w}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 w=ho(n,p);return e.fromHex(g).multiply(w).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=>ho(n,p),precompute(p=8,g=e.BASE){return g.precompute(p,!1)}},lengths:o})}function lC(e,t,n={}){Vw(t),mi(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||Yu,o=n.hmac||((N,...L)=>Db(t,N,fn(...L))),{Fp:s,Fn:i}=e,{ORDER:a,BITS:c}=i,{keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p}=cC(e,n),g={prehash:!1,lowS:typeof n.lowS=="boolean"?n.lowS:!1,format:void 0,extraEntropy:!1},m="compact";function w(N){const L=a>>xo;return N>L}function y(N,L){if(!i.isValidNot0(L))throw new Error(`invalid signature ${N}: out of range 1..Point.Fn.ORDER`);return L}function S(N,L){Td(L);const D=p.signature,O=L==="compact"?D:L==="recovered"?D+1:void 0;return rn(N,O,`${L} signature`)}class v{constructor(L,D,O){this.r=y("r",L),this.s=y("s",D),O!=null&&(this.recovery=O),Object.freeze(this)}static fromBytes(L,D=m){S(L,D);let O;if(D==="der"){const{r:H,s:$}=kn.toSig(rn(L));return new v(H,$)}D==="recovered"&&(O=L[0],D="compact",L=L.subarray(1));const B=i.BYTES,M=L.subarray(0,B),F=L.subarray(B,B*2);return new v(i.fromBytes(M),i.fromBytes(F),O)}static fromHex(L,D){return this.fromBytes(Aa(L),D)}addRecoveryBit(L){return new v(this.r,this.s,L)}recoverPublicKey(L){const D=s.ORDER,{r:O,s:B,recovery:M}=this;if(M==null||![0,1,2,3].includes(M))throw new Error("recovery id invalid");if(a*Ob<D&&M>1)throw new Error("recovery id is ambiguous for h>1 curve");const H=M===2||M===3?O+a:O;if(!s.isValid(H))throw new Error("recovery id 2 or 3 invalid");const $=s.toBytes(H),ee=e.fromBytes(fn(jb((M&1)===0),$)),ne=i.inv(H),te=A(rt("msgHash",L)),le=i.create(-te*ne),U=i.create(B*ne),J=e.BASE.multiplyUnsafe(le).add(ee.multiplyUnsafe(U));if(J.is0())throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return w(this.s)}toBytes(L=m){if(Td(L),L==="der")return Aa(kn.hexFromSig(this));const D=i.toBytes(this.r),O=i.toBytes(this.s);if(L==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return fn(Uint8Array.of(this.recovery),D,O)}return fn(D,O)}toHex(L){return Er(this.toBytes(L))}assertValidity(){}static fromCompact(L){return v.fromBytes(rt("sig",L),"compact")}static fromDER(L){return v.fromBytes(rt("sig",L),"der")}normalizeS(){return this.hasHighS()?new v(this.r,i.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Er(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Er(this.toBytes("compact"))}}const C=n.bits2int||function(L){if(L.length>8192)throw new Error("input is too large");const D=kc(L),O=L.length*8-c;return O>0?D>>BigInt(O):D},A=n.bits2int_modN||function(L){return i.create(C(L))},E=pi(c);function x(N){return Ed("num < 2^"+c,N,Cn,E),i.toBytes(N)}function I(N,L){return rn(N,void 0,"message"),L?rn(t(N),void 0,"prehashed message"):N}function k(N,L,D){if(["recovered","canonical"].some(le=>le in D))throw new Error("sign() legacy options not supported");const{lowS:O,prehash:B,extraEntropy:M}=ml(D,g);N=I(N,B);const F=A(N),H=ho(i,L),$=[x(H),x(F)];if(M!=null&&M!==!1){const le=M===!0?r(p.secretKey):M;$.push(rt("extraEntropy",le))}const ee=fn(...$),ne=F;function te(le){const U=C(le);if(!i.isValidNot0(U))return;const J=i.inv(U),Q=e.BASE.multiply(U).toAffine(),Y=i.create(Q.x);if(Y===Cn)return;const Ce=i.create(J*i.create(ne+Y*H));if(Ce===Cn)return;let K=(Q.x===Y?0:2)|Number(Q.y&xo),z=Ce;return O&&w(Ce)&&(z=i.neg(Ce),K^=1),new v(Y,z,K)}return{seed:ee,k2sig:te}}function T(N,L,D={}){N=rt("message",N);const{seed:O,k2sig:B}=k(N,L,D);return Ak(t.outputLen,i.BYTES,o)(O,B)}function _(N){let L;const D=typeof N=="string"||hi(N),O=!D&&N!==null&&typeof N=="object"&&typeof N.r=="bigint"&&typeof N.s=="bigint";if(!D&&!O)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(O)L=new v(N.r,N.s);else if(D){try{L=v.fromBytes(rt("sig",N),"der")}catch(B){if(!(B instanceof kn.Err))throw B}if(!L)try{L=v.fromBytes(rt("sig",N),"compact")}catch{return!1}}return L||!1}function R(N,L,D,O={}){const{lowS:B,prehash:M,format:F}=ml(O,g);if(D=rt("publicKey",D),L=I(rt("message",L),M),"strict"in O)throw new Error("options.strict was renamed to lowS");const H=F===void 0?_(N):v.fromBytes(rt("sig",N),F);if(H===!1)return!1;try{const $=e.fromBytes(D);if(B&&H.hasHighS())return!1;const{r:ee,s:ne}=H,te=A(L),le=i.inv(ne),U=i.create(te*le),J=i.create(ee*le),Q=e.BASE.multiplyUnsafe(U).add($.multiplyUnsafe(J));return Q.is0()?!1:i.create(Q.x)===ee}catch{return!1}}function P(N,L,D={}){const{prehash:O}=ml(D,g);return L=I(L,O),v.fromBytes(N,"recovered").recoverPublicKey(L).toBytes()}return Object.freeze({keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p,Point:e,sign:T,verify:R,recoverPublicKey:P,Signature:v,hash:t})}function dC(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=$r(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 uC(e){const{CURVE:t,curveOpts:n}=dC(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 fC(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,fb(n.Fn.ORDER,n.Fn.BITS))})}function hC(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:o}=uC(e),s=aC(t,n),i=lC(s,r,o);return fC(e,i)}function pC(e,t){const n=r=>hC({...e,hash:r});return{...n(t),create:n}}const af={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},mC={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},cp=BigInt(2);function gC(e){const t=af.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=nt(u,n,t)*u%t,h=nt(f,n,t)*u%t,p=nt(h,cp,t)*d%t,g=nt(p,o,t)*p%t,m=nt(g,s,t)*g%t,w=nt(m,a,t)*m%t,y=nt(w,c,t)*w%t,S=nt(y,a,t)*m%t,v=nt(S,n,t)*u%t,C=nt(v,i,t)*g%t,A=nt(C,r,t)*d%t,E=nt(A,cp,t);if(!Ad.eql(Ad.sqr(E),e))throw new Error("Cannot find square root");return E}const Ad=$r(af.p,{sqrt:gC}),ar=pC({...af,Fp:Ad,lowS:!0,endo:mC},eb);function yC(e,t,n){const r=Gu.digest(t instanceof Uint8Array?t:t.subarray());if(Ic(r))return r.then(({digest:o})=>(n?.signal?.throwIfAborted(),ar.sign(o,e).toDERRawBytes())).catch(o=>{throw o.name==="AbortError"?o:new rp(String(o))});try{return ar.sign(r.digest,e).toDERRawBytes()}catch(o){throw new rp(String(o))}}function wC(e,t,n,r){const o=Gu.digest(n instanceof Uint8Array?n:n.subarray());if(Ic(o))return o.then(({digest:s})=>(r?.signal?.throwIfAborted(),ar.verify(t,s,e))).catch(s=>{throw s.name==="AbortError"?s:new op(String(s))});try{return r?.signal?.throwIfAborted(),ar.verify(t,o.digest,e)}catch(s){throw new op(String(s))}}class Bb{type="secp256k1";raw;_key;constructor(t){this._key=EC(t),this.raw=xC(this._key)}toMultihash(){return ui.digest(Ac(this))}toCID(){return et.createV1(114,this.toMultihash())}toString(){return _t.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}verify(t,n,r){return wC(this._key,n,t,r)}}class bC{type="secp256k1";raw;publicKey;constructor(t,n){this.raw=SC(t),this.publicKey=new Bb(n??kC(t))}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:sn(this.raw,t.raw)}sign(t,n){return yC(this.raw,t,n)}}function vC(e){return new bC(e)}function Fb(e){return new Bb(e)}function xC(e){return ar.ProjectivePoint.fromHex(e).toRawBytes(!0)}function SC(e){try{return ar.getPublicKey(e,!0),e}catch(t){throw new _w(String(t))}}function EC(e){try{return ar.ProjectivePoint.fromHex(e),e}catch(t){throw new Nw(String(t))}}function kC(e){try{return ar.getPublicKey(e,!0)}catch(t){throw new _w(String(t))}}async function IC(e,t){return pI()}function Pd(e,t){const{Type:n,Data:r}=Or.decode(e),o=r??new Uint8Array;switch(n){case tt.RSA:return JI(o,t);case tt.Ed25519:return Eb(o);case tt.secp256k1:return Fb(o);case tt.ECDSA:return Gw(o);default:throw new vc}}function CC(e){const{Type:t,Data:n}=Or.decode(e.digest),r=n??new Uint8Array;switch(t){case tt.Ed25519:return Eb(r);case tt.secp256k1:return Fb(r);case tt.ECDSA:return Gw(r);default:throw new vc}}function Ac(e){return Or.encode({Type:tt[e.type],Data:e.raw})}function RC(e){const t=Oa.decode(e),n=t.Data??new Uint8Array;switch(t.Type){case tt.RSA:return YI(n);case tt.Ed25519:return hI(n);case tt.secp256k1:return vC(n);case tt.ECDSA:return rk(n);default:throw new vc}}function TC(e){return Oa.encode({Type:tt[e.type],Data:e.raw})}const Ub=Symbol.for("nodejs.util.inspect.custom"),AC=114;class cf{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()})`}[Lw]=!0;toString(){return this.string==null&&(this.string=_t.encode(this.multihash.bytes).slice(1)),this.string}toMultihash(){return this.multihash}toCID(){return et.createV1(AC,this.multihash)}toJSON(){return this.toString()}equals(t){if(t==null)return!1;if(t instanceof Uint8Array)return sn(this.multihash.bytes,t);if(typeof t=="string")return this.toString()===t;if(t?.toMultihash()?.bytes!=null)return sn(this.multihash.bytes,t.toMultihash().bytes);throw new Error("not valid Id")}[Ub](){return`PeerId(${this.toString()})`}}class Hb extends cf{type="RSA";publicKey;constructor(t){super({...t,type:"RSA"}),this.publicKey=t.publicKey}}class $b extends cf{type="Ed25519";publicKey;constructor(t){super({...t,type:"Ed25519"}),this.publicKey=t.publicKey}}class zb extends cf{type="secp256k1";publicKey;constructor(t){super({...t,type:"secp256k1"}),this.publicKey=t.publicKey}}const PC=2336;class qb{type="url";multihash;publicKey;url;constructor(t){this.url=t.toString(),this.multihash=ui.digest(at(this.url))}[Ub](){return`PeerId(${this.url})`}[Lw]=!0;toString(){return this.toCID().toString()}toMultihash(){return this.multihash}toCID(){return et.createV1(PC,this.toMultihash())}toJSON(){return this.toString()}equals(t){return t==null?!1:(t instanceof Uint8Array&&(t=Le(t)),t.toString()===this.toString())}}const NC=114,lp=2336;function _C(e,t){let n;if(e.charAt(0)==="1"||e.charAt(0)==="Q")n=jw(_t.decode(`z${e}`));else{if(e.startsWith("k51qzi5uqu5")||e.startsWith("kzwfwjn5ji4")||e.startsWith("k2k4r8")||e.startsWith("bafz"))return LC(et.parse(e));throw new on('Please pass a multibase decoder for strings that do not start with "1" or "Q"')}return Kb(n)}function Oo(e){if(e.type==="Ed25519")return new $b({multihash:e.toCID().multihash,publicKey:e});if(e.type==="secp256k1")return new zb({multihash:e.toCID().multihash,publicKey:e});if(e.type==="RSA")return new Hb({multihash:e.toCID().multihash,publicKey:e});throw new vc}function Kb(e){if(OC(e))return new Hb({multihash:e});if(DC(e))try{const t=CC(e);if(t.type==="Ed25519")return new $b({multihash:e,publicKey:t});if(t.type==="secp256k1")return new zb({multihash:e,publicKey:t})}catch{const n=Le(e.digest);return new qb(new URL(n))}throw new mE("Supplied PeerID Multihash is invalid")}function LC(e){if(e?.multihash==null||e.version==null||e.version===1&&e.code!==NC&&e.code!==lp)throw new pE("Supplied PeerID CID is invalid");if(e.code===lp){const t=Le(e.multihash.digest);return new qb(new URL(t))}return Kb(e.multihash)}function DC(e){return e.code===ui.code}function OC(e){return e.code===Gu.code}class Gb extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}}class jC extends Error{static name="StreamResetError";constructor(t="The stream has been reset"){super(t),this.name="StreamResetError"}}class ss extends Error{static name="StreamStateError";constructor(t="The stream is in an invalid state"){super(t),this.name="StreamStateError"}}class dp extends Error{static name="StreamBufferError";constructor(t="The stream buffer was full"){super(t),this.name="StreamBufferError"}}class MC extends Event{data;constructor(t,n){super("message",n),this.data=t}}class lf extends Event{error;local;constructor(t,n,r){super("close",r),this.error=n,this.local=t}}class BC extends lf{constructor(t,n){super(!0,t,n)}}class FC extends lf{constructor(t,n){super(!1,t,n)}}const UC=e=>e/2**32|0,HC=e=>e>>>0;function $C(e,t,n,r){const o=UC(n),s=HC(n);e.setUint32(t,r?s:o,r),e.setUint32(t+4,r?o:s,r)}function Nd(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const _d=e=>e?`"${e}" `:"";function Bn(e,t=""){if(typeof e!="number")throw new TypeError(_d(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(_d(t)+"expected integer >= 0, got "+e);return e}function Fn(e,t,n=""){if(Nd(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Bn(t,"length");const r=Nd(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=_d(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}function df(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Bn(e.outputLen),Bn(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const zC=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},up=(e,t)=>{zC(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 Wb(e,t){Fn(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function WM(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ir(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gl(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function dn(e,t){return e<<32-t|e>>>t}function VM(e,t){return e<<t|e>>>32-t>>>0}const qC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function KC(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function GC(e){for(let t=0;t<e.length;t++)e[t]=KC(e[t]);return e}const YM=qC?e=>e:GC,Vb=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",WC=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function uf(e){if(Fn(e),Vb)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=WC[e[n]];return t}function fp(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Yb(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(Vb)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=fp(e.charCodeAt(s)),a=fp(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 VC(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 XM(e,t,n,r){if(Bn(e,"iters"),Bn(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 VC(r),o=Date.now())}}function YC(e){if(typeof e!="string")throw new TypeError("string expected");const t=new TextEncoder().encode(e);try{return new Uint8Array(t)}finally{Ir(t)}}function JM(e,t=""){return typeof e=="string"?YC(e):Fn(e,void 0,t)}function XC(e,t,n="opts"){return up(e,"defaults"),t!==void 0&&up(t,n),Object.assign(Object.create(null),e,t)}function JC(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=XC({},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 ZC(e=32){Bn(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 QC=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function eR(e,t,n){return e&t^~e&n}function tR(e,t,n){return e&t^e&n^t&n}class nR{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=gl(this.buffer)}update(t){ja(this),Fn(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=gl(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),Wb(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)),$C(r,o-8,this.length*8,s),this.process(r,0),this.roundClean();const a=t===n?r:gl(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 rR=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),oR=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]),Xn=new Uint32Array(64);class sR extends nR{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)Xn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=Xn[f-15],p=Xn[f-2],g=dn(h,7)^dn(h,18)^h>>>3,m=dn(p,17)^dn(p,19)^p>>>10;Xn[f]=m+Xn[f-7]+g+Xn[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=dn(a,6)^dn(a,11)^dn(a,25),p=u+h+eR(a,c,d)+oR[f]+Xn[f]|0,m=(dn(r,2)^dn(r,13)^dn(r,22))+tR(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(){Ir(Xn)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ir(this.buffer)}}class iR extends sR{constructor(){super(32,rR)}}const yl=JC(()=>new iR,QC(1));function Xb(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 So=(e,t,n)=>Fn(e,t,n),Jb=Bn;function Eo(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 Ds(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const aR=uf,cR=e=>Yb(e),Zb=Nd,Qb=e=>ZC(e),Ma=BigInt(0),hp=BigInt(1),lR=e=>e?`"${e}" `:"";function Pc(e,t=""){if(typeof e!="boolean")throw new TypeError(lR(t)+"expected boolean, got type="+typeof e);return e}function dR(e){if(typeof e=="bigint"){if(!Cr(e))throw new RangeError("positive bigint expected, got "+e)}else Jb(e);return e}function Ld(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 ev(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Ma:BigInt("0x"+e)}function tv(e){return ev(uf(e))}function Ba(e){return ev(uf(Ys(Fn(e)).reverse()))}function nv(e,t){if(Bn(t),t===0)throw new Error("zero output length is invalid");e=dR(e);const n=t*2,r=e.toString(16);if(r.length>n)throw new RangeError("number is too large");return Yb(r.padStart(n,"0"))}function rv(e,t){return nv(e,t).reverse()}function Ys(e){return Uint8Array.from(So(e))}function Cr(e){return typeof e=="bigint"&&Ma<=e}function ov(e,t,n){return Cr(e)&&Cr(t)&&Cr(n)&&t<=e&&e<n}function Os(e,t,n,r){if(!ov(t,n,r))throw new RangeError("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function uR(e){if(e<Ma)throw new Error("expected non-negative bigint, got "+e);return e===Ma?0:e.toString(2).length}const fR=e=>(Ld(e,"n"),(hp<<BigInt(e))-hp);function Fa(e,t={},n={},r="object"){Eo(e,r),Eo(t,"fields"),Eo(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 gt=BigInt(0),Xe=BigInt(1),br=BigInt(2),sv=BigInt(3),ff=BigInt(4),iv=BigInt(5),hR=BigInt(7),av=BigInt(8),pR=BigInt(9),mR=BigInt(15),cv=BigInt(16),gR=BigInt("0x10000000000000000");function Ye(e,t){if(t<=gt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=gt?n:t+n}function yR(e,t,n){if(n<=Xe)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<gt)throw new Error("invalid exponent, negatives unsupported");if(t===gt)return Xe;if(t===Xe)return e;let r=e%n;if(r<gt&&(r+=n),t<gR){let a=Xe;for(;t>gt;)t&Xe&&(a=a*r%n),r=r*r%n,t>>=Xe;return a}const o=[];for(;t>gt;)o.push(Number(t&mR)),t>>=ff;const s=new Array(16);s[0]=Xe,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 tn(e,t,n){if(n<=Xe)throw new Error("pow2: expected modulus > 1, got "+n);if(t<gt)throw new Error("pow2: expected non-negative exponent, got "+t);let r=e;for(;t-- >gt;)r*=r,r%=n;return r}function pp(e,t){if(e===gt)throw new Error("invert: expected non-zero number");if(t<=Xe)throw new Error("invert: expected modulus > 1, got "+t);let n=Ye(e,t),r=t,o=gt,s=Xe;for(;n!==gt;){const a=r/n,c=r-n*a,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==Xe)throw new Error("invert: does not exist");return Ye(o,t)}function hf(e,t,n){const r=e;if(!r.eql(r.sqr(t),n))throw new Error("Cannot find square root")}function pf(e,t){if((e&Xe)===gt)throw new Error(t+": expected odd modulus, got "+e)}function lv(e,t){const n=e,r=(n.ORDER+Xe)/ff,o=n.pow(t,r);return hf(n,o,t),o}function wR(e,t){const n=e,r=(n.ORDER-iv)/av,o=n.mul(t,br),s=n.pow(o,r),i=n.mul(t,s),a=n.mul(n.mul(i,br),s),c=n.mul(i,n.sub(a,n.ONE));return hf(n,c,t),c}function bR(e){const t=mf(e),n=dv(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+hR)/cv;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 w=d.eql(d.sqr(f),c),y=d.cmov(u,f,w);return hf(d,y,c),y})}function dv(e){if(e<sv)throw new Error("sqrt is not defined for small field");pf(e,"tonelliShanks");let t=e-Xe,n=0;for(;t%br===gt;)t/=br,n++;let r=br;const o=mf(e);for(;Ua(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return lv;let s=o.pow(r,t);const i=(t+Xe)/br;return function(c,d){const u=c;if(u.is0(d))return d;if(Ua(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,w=u.sqr(p);for(;!u.eql(w,u.ONE);)if(m++,w=u.sqr(w),m===f)throw new Error("Cannot find square root");const y=Xe<<BigInt(f-m-1),S=u.pow(h,y);f=m,h=u.sqr(S),p=u.mul(p,h),g=u.mul(g,S)}return g}}function vR(e){return pf(e,"Fp.sqrt"),e%ff===sv?lv:e%av===iv?wR:e%cv===pR?bR(e):dv(e)}const xR=(e,t)=>(Ye(e,t)&Xe)===Xe,SR=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Xs(e){if(Eo(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);Ld(e.BYTES,"BYTES"),Ld(e.BITS,"BITS");for(const t of SR)Ds(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=Xe)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function uv(e,t,n=!1){Xs(e),Xb(t,"nums"),Pc(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 Ua(e,t){Xs(e);const n=e;pf(n.ORDER,"FpLegendre");const r=(n.ORDER-Xe)/br,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 ER(e,t){if(t!==void 0&&Jb(t),e<=gt)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=uR(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 mp=new WeakMap;class gp{ORDER;BITS;BYTES;isLE;ZERO=gt;ONE=Xe;_lengths;_mod;constructor(t,n={}){if(t<=Xe)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}=ER(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 Ye(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return gt<=t&&t<this.ORDER}is0(t){return t===gt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&Xe)===Xe}neg(t){return Ye(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return Ye(t*t,this.ORDER)}add(t,n){return Ye(t+n,this.ORDER)}sub(t,n){return Ye(t-n,this.ORDER)}mul(t,n){return Ye(t*n,this.ORDER)}pow(t,n){return yR(t,n,this.ORDER)}div(t,n){return Ye(t*pp(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 pp(t,this.ORDER)}sqrt(t){let n=mp.get(this);return n||mp.set(this,n=vR(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?rv(t,this.BYTES):nv(t,this.BYTES)}fromBytes(t,n=!1){So(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?Ba(t):tv(t);if(a&&(c=Ye(c,i)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return uv(this,t,!0)}cmov(t,n,r){return Pc(r,"condition"),r?n:t}}function mf(e,t={}){return Object.freeze(gp.prototype),new gp(e,t)}const gf=BigInt(0),Js=BigInt(1),kR=BigInt(4),wl=16,yp=128,IR=5,wp=2**31;function yf(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Ds(t.fromAffine,"Point.fromAffine"),Ds(t.fromBytes,"Point.fromBytes"),Ds(t.fromHex,"Point.fromHex"),Eo(t.BASE,"Point.BASE"),Eo(t.ZERO,"Point.ZERO"),Xs(t.Fp),Xs(t.Fn)}function CR(e,t){yf(e),fv(t,e);const n=uv(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function RR(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 TR(e,t){const n=e*(4*t+128);if(n>wp)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+wp/2**20+" MiB")}function AR(e,t){if(e!==void 0){Ds(e,"randomBytes");try{const n=e(t);if(!Zb(n)||n.length!==t)return}catch{return}return e}}function fv(e,t){Xb(e,"points"),e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function PR(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):Cr(r)&&r<n))throw new Error("invalid scalar at index "+o)})}const hv=new WeakMap;function bl(e){return hv.get(e)||1}function NR(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 _R(e,t){const n=2**t,r=n/2,o=BigInt(n-1),s=[];for(;e>gf;){let i=0;e&Js&&(i=Number(e&o),i>=r&&(i-=n),e-=BigInt(i)),s.push(i),e>>=Js}return s}function LR(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+=Js),a.push(d)}if(e!==gf)throw new Error("invalid wnaf");return a}function DR(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 OR{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(t,n){yf(t),this.randomBytes=AR(n,wl),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=LR(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 w=1;w<i;w++)g=w===p?s[h+w]: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),!ov(n,Js,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,r,o){const s=bl(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+yp,s=this.randomBytes(wl);if(!Zb(s)||s.length!==wl)throw new Error("randomBytes returned invalid byte array");s[0]=s[0]&63|128;const i=n+tv(s)*this.Point.Fn.ORDER;return this.runCT(t,i,o,r)}fixedWindowCT(t,n,r){const o=IR,s=1<<o,i=fR(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===Js?!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),!Cr(n))throw new Error("invalid scalar");const o=bl(t);if(o===1||n>=this.Point.Fn.ORDER)return jR(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),RR(n,this.bits);const r=Math.ceil((this.bits+yp)/n)+1;TR(r*2**(n-1),this.Point.Fp.BYTES),hv.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return bl(t)!==1}}function jR(e,t,n,r=!1){if(yf(e),fv(t,e),Pc(r,"allowOversized"),PR(n,e.Fn,r?e.Fn.ORDER**kR:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const o=t.map(i=>NR(i,4)),s=n.map(i=>_R(i,4));return DR(e.ZERO,o,s)}function bp(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Xs(t),t}else return mf(e,{isLE:n})}function MR(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Fa(n);for(const c of["p","n","h"]){const d=t[c];if(!(Cr(d)&&d!==gf))throw new Error(`CURVE.${c} must be positive bigint`)}const o=bp(t.p,n.Fp,r),s=bp(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 BR(e,t){return function(r){const o=e(r);return{secretKey:o,publicKey:t(o)}}}const Ui=BigInt(0),Hi=BigInt(1),$i=BigInt(2),FR=BigInt(4),vp=BigInt(8);function UR(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 HR(e,t={}){Fa(t,{},{},"extraOpts");const n=t,r=MR("edwards",e,n,n.FpFnLE),{Fp:o,Fn:s}=r;let i=r.CURVE;const{h:a}=i;if(Ua(o,i.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Ua(o,i.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Fa(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?Qb:n.randomBytes,d=$i<<BigInt(o.BYTES*8)-Hi;function u(S){if(!o.isOdd)throw new Error("Field does not have .isOdd()");return o.isOdd(S)}const f=n.uvRatio===void 0?(S,v)=>{try{return{isValid:!0,value:o.sqrt(o.div(S,v))}}catch{return{isValid:!1,value:Ui}}}:n.uvRatio;if(!UR(o,i,i.Gx,i.Gy))throw new Error("bad curve params: generator point");const h=o.eql(i.a,o.neg(o.ONE))?S=>o.neg(S):o.eql(i.a,o.ONE)?S=>S:S=>o.mul(i.a,S);function p(S,v,C=!1){const A=C?Hi:Ui;return Os("coordinate "+S,v,A,d),v}function g(S){if(!(S 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(v,C,A,E){this.X=p("x",v),this.Y=p("y",C),this.Z=p("z",A,!0),this.T=p("t",E),Object.freeze(this)}static CURVE(){return i}static fromAffine(v){if(v instanceof m)throw new Error("extended point not allowed");const{x:C,y:A}=v||{};return p("x",C),p("y",A),new m(C,A,o.ONE,o.mul(C,A))}static fromBytes(v,C=!1){const A=o.BYTES,{a:E,d:x}=i;v=Ys(So(v,A,"point")),Pc(C,"zip215");const I=Ys(v),k=v[A-1];I[A-1]=k&-129;const T=Ba(I),_=C?d:o.ORDER;Os("point.y",T,Ui,_);const R=o.sqr(T),P=o.sub(R,o.ONE),N=o.sub(o.mulN(x,R),E);let{isValid:L,value:D}=f(P,N);if(!L)throw new Error("bad point: invalid y coordinate");const O=u(D),B=(k&128)!==0;if(!C&&o.is0(D)&&B)throw new Error("bad point: x=0 and x_0=1");return B!==O&&(D=o.neg(D)),m.fromAffine({x:D,y:T})}static fromHex(v,C=!1){return m.fromBytes(cR(v),C)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(v=6,C=!0){return y.setWindowSize(this,v),C||this.multiply($i),this}assertValidity(){const v=this,{a:C,d:A}=i;if(v.is0())throw new Error("bad point: ZERO");const{X:E,Y:x,Z:I,T:k}=v,T=o.sqr(E),_=o.sqr(x),R=o.sqr(I),P=o.sqr(R),N=o.mul(T,C),L=o.mul(o.add(N,_),R),D=o.add(P,o.mul(A,o.mul(T,_)));if(!o.eql(L,D))throw new Error("bad point: equation left != right (1)");const O=o.mul(E,x),B=o.mul(I,k);if(!o.eql(O,B))throw new Error("bad point: equation left != right (2)")}equals(v){g(v);const{X:C,Y:A,Z:E}=this,{X:x,Y:I,Z:k}=v,T=o.mul(C,k),_=o.mul(x,E),R=o.mul(A,k),P=o.mul(I,E);return o.eql(T,_)&&o.eql(R,P)}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:v,Y:C,Z:A}=this,E=o.sqr(v),x=o.sqr(C),I=o.mul(o.sqr(A),$i),k=h(E),T=o.addN(v,C),_=o.sub(o.subN(o.sqr(T),E),x),R=o.addN(k,x),P=o.subN(R,I),N=o.subN(k,x),L=o.mul(_,P),D=o.mul(R,N),O=o.mul(_,N),B=o.mul(P,R);return new m(L,D,B,O)}add(v){g(v);const{d:C}=i,{X:A,Y:E,Z:x,T:I}=this,{X:k,Y:T,Z:_,T:R}=v,P=o.mul(A,k),N=o.mul(E,T),L=o.mul(o.mulN(I,C),R),D=o.mul(x,_),O=o.sub(o.subN(o.mulN(o.addN(A,E),o.addN(k,T)),P),N),B=o.subN(D,L),M=o.addN(D,L),F=o.sub(N,h(P)),H=o.mul(O,B),$=o.mul(M,F),ee=o.mul(O,F),ne=o.mul(B,M);return new m(H,$,ne,ee)}subtract(v){return g(v),this.add(v.negate())}multiply(v){if(!s.isValidNot0(v))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:C,f:A}=y.mulSecret(this,v,a,w);return w([C,A])[0]}multiplyUnsafe(v){if(!s.isValid(v))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return v===Ui?m.ZERO:this.is0()||v===Hi?this:y.mulUnsafe(this,v,w)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return y.mulUnsafe(this,i.n).is0()}toAffine(v){const C=this;let A=v;if(A!=null&&typeof A!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof A);const{X:E,Y:x,Z:I}=C,k=C.is0();A==null&&(A=k?o.create(vp):o.inv(I));const T=o.mul(E,A),_=o.mul(x,A),R=o.mul(I,A);if(k)return{x:o.ZERO,y:o.ONE};if(!o.eql(R,o.ONE))throw new Error("invZ was invalid");return{x:T,y:_}}clearCofactor(){return a===Hi?this:a===$i?this.double():a===FR?this.double().double():a===vp?this.double().double().double():this.multiplyUnsafe(a)}toBytes(){const{x:v,y:C}=this.toAffine(),A=o.toBytes(C);return A[A.length-1]|=u(v)?128:0,A}toHex(){return aR(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const w=S=>CR(m,S),y=new OR(m,c);return y.bits>=6&&m.BASE.precompute(6),Object.freeze(m.prototype),Object.freeze(m),m}const ur=BigInt(0),Wt=BigInt(1),zi=BigInt(2);function xp(e,t){return e+t-(t>>Wt<<Wt)}function $R(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 zR(e){return Fa(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function qR(e){const t=zR(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?Qb:i,u=c?255:448,f=$R(n),h=c?32:56,p=BigInt(c?9:5),g=BigInt(c?121665:39081),m=c?zi**BigInt(254):zi**BigInt(447),w=c?BigInt(8)*(zi**BigInt(251)-Wt):BigInt(4)*(zi**BigInt(445)-Wt),y=m+w+Wt,S=D=>Ye(D,n),v=C(p);function C(D){return rv(S(D),h)}function A(D){const O=Ys(So(D,h,"uCoordinate"));return c&&(O[31]&=127),S(Ba(O))}function E(D){return Ba(o(Ys(So(D,h,"scalar"))))}const x=new Set(c?[ur,Wt,n-Wt,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[ur,Wt,n-Wt]);function I(D,O){const B=A(O);if(x.has(B))throw new Error("invalid private or public key received");const M=R(B,E(D));if(M===ur)throw new Error("invalid private or public key received");return C(M)}function k(D){if(a===void 0)return I(D,v);const O=E(D);Os("scalar",O,m,y);const B=S(a(O));if(B===ur)throw new Error("invalid private or public key received");return C(B)}const T=k,_=I;function R(D,O){Os("u",D,ur,n),Os("scalar",O,m,y);const B=O,M=D;let F=Wt,H=ur,$=D,ee=Wt;const ne=B^B>>Wt;for(let U=BigInt(u-1);U>=ur;U--){const J=xp(n,ne>>U);({x_2:F,x_3:$}=f(J,F,$)),{x_2:H,x_3:ee}=f(J,H,ee);const Q=F+H,Y=S(Q*Q),Ce=F-H,K=S(Ce*Ce),z=Y-K,de=$+ee,ge=$-ee,Ie=S(ge*Q),Pe=S(de*Ce),Re=Ie+Pe,q=Ie-Pe;$=S(Re*Re),ee=S(M*S(q*q)),F=S(Y*K),H=S(z*(Y+S(g*z)))}const te=xp(n,B);({x_2:F,x_3:$}=f(te,F,$)),{x_2:H,x_3:ee}=f(te,H,ee);const le=s(H);return S(F*le)}const P={secretKey:h,publicKey:h,seed:h},N=D=>(D=D===void 0?d(h):D,So(D,P.seed,"seed"),D),L={randomSecretKey:N};return Object.freeze(P),Object.freeze(L),Object.freeze({keygen:BR(N,T),getSharedSecret:_,getPublicKey:T,scalarMult:I,scalarMultBase:k,utils:L,GuBytes:v.slice(),lengths:P})}const Sp=BigInt(0),KR=BigInt(1),Ep=BigInt(2),GR=BigInt(3),WR=BigInt(5),VR=BigInt(8),Nc=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),YR={p:Nc,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:VR,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function pv(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Nc,a=e*e%s*e%s,c=tn(a,Ep,s)*a%s,d=tn(c,KR,s)*e%s,u=tn(d,WR,s)*d%s,f=tn(u,t,s)*u%s,h=tn(f,n,s)*f%s,p=tn(h,r,s)*h%s,g=tn(p,o,s)*p%s,m=tn(g,o,s)*p%s,w=tn(m,t,s)*u%s;return{pow_p_5_8:tn(w,Ep,s)*e%s,b2:a}}function XR(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const kp=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function JR(e,t){const n=Nc,r=Ye(t*t*t,n),o=Ye(r*r*t,n),s=pv(e*o).pow_p_5_8;let i=Ye(e*r*s,n);const a=Ye(t*i*i,n),c=i,d=Ye(i*kp,n),u=a===e,f=a===Ye(-e,n),h=a===Ye(-e*kp,n);return u&&(i=c),(f||h)&&(i=d),xR(i,n)&&(i=Ye(-i,n)),{isValid:u||f,value:i}}const Ip=HR(YR,{uvRatio:JR}),qi=(()=>{const e=Nc,t=n=>{const{pow_p_5_8:r,b2:o}=pv(n);return Ye(tn(r,GR,e)*o,e)};return qR({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:XR,scalarMultBase:n=>{const r=Ye(n,Ip.Fn.ORDER);if(r===Sp)return Sp;const o=Ip.BASE.multiply(r);return Ye((o.Z+o.Y)*t(Ye(o.Z-o.Y,e)),e)}})})();class Cp{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(t,n){if(df(t),Fn(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),Ir(o)}update(t){return ja(this),this.iHash.update(t),this}digestInto(t){ja(this),Wb(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 mv=(()=>{const e=((t,n,r)=>new Cp(t,n).update(r).digest());return e.create=(t,n)=>new Cp(t,n),e})();function Rp(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}class Tp{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 vl{size;hwm;head;tail;constructor(t={}){this.hwm=t.splitLimit??16,this.head=new Tp(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 Tp(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 ZR extends Error{type;code;constructor(t,n){super(t??"The operation was aborted"),this.type="aborted",this.code=n??"ABORT_ERR"}}function QR(e={}){return eT(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 eT(e,t){t=t??{};let n=t.onEnd,r=new vl,o,s,i,a=Rp();const c=async()=>{try{return r.isEmpty()?i?{done:!0}:await new Promise((w,y)=>{s=S=>{s=null,r.push(S);try{w(e(r))}catch(v){y(v)}return o}}):e(r)}finally{r.isEmpty()&&queueMicrotask(()=>{a.resolve(),a=Rp()})}},d=w=>s!=null?s(w):(r.push(w),o),u=w=>(r=new vl,s!=null?s({error:w}):(r.push({error:w}),o)),f=w=>{if(i)return o;if(t?.objectMode!==!0&&w?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return d({done:!1,value:w})},h=w=>i?o:(i=!0,w!=null?u(w):d({done:!0})),p=()=>(r=new vl,h(),{done:!0}),g=w=>(h(w),{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 w=>{const y=w?.signal;if(y?.throwIfAborted(),r.isEmpty())return;let S,v;y!=null&&(S=new Promise((C,A)=>{v=()=>{A(new ZR)},y.addEventListener("abort",v)}));try{await Promise.race([a.promise,S])}finally{v!=null&&y!=null&&y?.removeEventListener("abort",v)}}},n==null)return o;const m=o;return o={[Symbol.asyncIterator](){return this},next(){return m.next()},throw(w){return m.throw(w),n!=null&&(n(w),n=void 0),{done:!0}},return(){return m.return(),n!=null&&(n(),n=void 0),{done:!0}},push:f,end(w){return m.end(w),n!=null&&(n(w),n=void 0),o},get readableLength(){return m.readableLength},onEmpty:w=>m.onEmpty(w)},o}class wf extends Error{name="TimeoutError";constructor(t,n){super(t,n),Error.captureStackTrace?.(this,wf)}}const Ap=e=>e.reason??new DOMException("This operation was aborted.","AbortError");function tT(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(Ap(i));return}if(i&&(c=()=>{h(Ap(i))},i.addEventListener("abort",c,{once:!0})),e.then(f,h),n===Number.POSITIVE_INFINITY)return;const p=new wf;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 nT=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 rT(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}=nT(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=tT(o,{milliseconds:n.timeout});return s.cancel=()=>{r(),s.clear()},s}return o}function oT(e,t,n){typeof n=="function"&&(n={filter:n}),n={...n,count:1,resolveImmediately:!1};const r=rT(e,t,n),o=r.then(s=>s[0]);return o.cancel=r.cancel,o}class Ha extends Error{static name="UnexpectedEOFError";name="UnexpectedEOFError"}class sT extends Error{static name="StreamClosedError";name="StreamClosedError"}function iT(e){return e.reason}function gv(e,t,n){if(t==null||e==null)return e;const r=iT;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 aT=Math.pow(2,20)*4;class yv extends bE{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??aT,this.maxWriteBufferLength=t.maxWriteBufferLength,this.maxMessageSize=t.maxMessageSize,this.readBuffer=new ze,this.writeBuffer=new ze,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 sT)};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()),gv(this.onDrainPromise.promise,t?.signal))}async*[Symbol.asyncIterator](){if(this.readStatus!=="readable"&&this.readStatus!=="paused")return;const t=QR(),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 ss(`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 BC(t))}}pause(){if(this.readStatus==="closed"||this.readStatus==="closing")throw new ss("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 ss("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 ss(`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 ss(`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 jC;this.dispatchEvent(new FC(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 lf))}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 ze(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 MC(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 dp(`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 dp(`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 cT=4194304;class Pp extends Error{static name="UnwrappedError";name="UnwrappedError"}class wv extends Error{name="InvalidMessageLengthError";code="ERR_INVALID_MSG_LENGTH"}class lT extends Error{name="InvalidDataLengthError";code="ERR_MSG_DATA_TOO_LONG"}class dT extends Error{name="InvalidDataLengthLengthError";code="ERR_MSG_LENGTH_TOO_LONG"}function uT(e){return typeof e?.closeRead=="function"}function fT(e){return typeof e?.close=="function"}function xl(e){return uT(e)?e.remoteWriteStatus!=="writable"&&e.readBufferLength===0:fT(e)?e.status!=="open":!1}function hT(e){return e?.addEventListener!=null&&e?.removeEventListener!=null&&e?.send!=null&&e?.push!=null&&e?.log!=null}function pT(e,t){const n=t?.maxBufferSize??cT,r=new ze;let o,s=!1;if(!hT(e))throw new Gb("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 Pp("Stream was unwrapped");if(xl(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 Ha(`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 gv(o.promise,u?.signal),xl(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(xl(e))throw e.log.error("closed while reading %d/%d bytes",r.byteLength,h),new Ha(`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 Pp("Stream was unwrapped");e.send(u)||await oT(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 Np(e,t={}){const n=pT(e,t);t.maxDataLength!=null&&t.maxLengthLength==null&&(t.maxLengthLength=zr(t.maxDataLength));const r=t?.lengthDecoder??Cb,o=t?.lengthEncoder??vI;return{async read(i){let a=-1;const c=new ze;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 wv("Invalid message length");if(t?.maxLengthLength!=null&&c.byteLength>t.maxLengthLength)throw new dT(`Message length length too long - ${c.byteLength} > ${t.maxLengthLength}`);if(a>-1)break}if(t?.maxDataLength!=null&&a>t.maxDataLength)throw new lT(`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 Ha(`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 Ha(`Unexpected EOF - read ${d.byteLength}/${a} bytes before the stream closed`);return d},async write(i,a){await n.write(new ze(o(i.byteLength),i),a)},async writeV(i,a){const c=new ze(...i.flatMap(d=>[o(d.byteLength),d]));await n.write(c,a)},unwrap(){return n.unwrap()}}}const mT=1024*1024*4,gT=1024*1024*4;class yT{buffer;maxBufferSize;lengthDecoder;maxDataLength;encodingLength;constructor(t={}){this.buffer=new ze,this.maxBufferSize=t.maxBufferSize??mT,this.maxDataLength=t.maxDataLength??gT,this.lengthDecoder=t.lengthDecoder??Cb,this.encodingLength=t.encodingLength??zr}*decode(t){if(this.buffer.append(t),this.buffer.byteLength>this.maxBufferSize)throw new Gb(`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 wv("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 wT={};const Zs=65535,_p=Zs-16,gi=!!wT?.DUMP_SESSION_KEYS,Lp=16;function Dd(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const $a=e=>e?`"${e}" `:"";function Od(e,t=""){if(typeof e!="boolean")throw new TypeError($a(t)+"expected boolean, got type="+typeof e);return e}function ko(e,t=""){if(typeof e!="number")throw new TypeError($a(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError($a(t)+"expected integer >= 0, got "+e);return e}function mt(e,t,n=""){if(Dd(e)&&(t===void 0||e.length===t))return e;t!==void 0&&ko(t,"length");const r=Dd(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=$a(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}const Dp=(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 Op(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function bT(e,t){mt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Rn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ir(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function vT(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Io=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xT(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function ST(e){for(let t=0;t<e.length;t++)e[t]=xT(e[t]);return e}const vr=Io?e=>e:ST;function ET(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 kT(e,t){if(ET(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function IT(e,t){return Dp(e,"defaults"),Dp(t,"opts"),Object.assign(e,t)}function CT(e,t){if(e=mt(e),t=mt(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 RT(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 TT=(e,t)=>{function n(r,...o){if(mt(r,void 0,"key"),e.nonceLength!==void 0){const f=o[0];mt(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(Dd(o[f]))throw new Error("AAD not supported")}e.withAAD&&o[i]!==void 0&&mt(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");mt(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,mt(f,void 0,"data"),c(a.encrypt.length,h),a.encrypt(f,h)},decrypt(f,h){if(mt(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 jd(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(mt(t,e,"output"),n&&!za(t))throw new Error("invalid output, must be aligned");return t}function AT(e,t,n){ko(e),ko(t),Od(n);const r=new Uint8Array(16),o=vT(r);return o.setBigUint64(0,BigInt(t),n),o.setBigUint64(8,BigInt(e),n),r}function za(e){return e.byteOffset%4===0}function qa(e){return Uint8Array.from(mt(e))}const bv=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),PT=vr(Rn(bv("expand 16-byte k"))),NT=vr(Rn(bv("expand 32-byte k")));function Oe(e,t){return e<<t|e>>>32-t}const is=64,_T=16,Md=2**32-1,jp=Uint32Array.of();function LT(e,t,n,r,o,s,i,a){const c=o.length,d=new Uint8Array(is),u=Rn(d),f=Io&&za(o)&&za(s),h=f?Rn(o):jp,p=f?Rn(s):jp;if(!Io){for(let g=0;g<c;i++){if(e(t,n,r,u,i,a),vr(u),i>=Md)throw new Error("arx: counter overflow");const m=Math.min(is,c-g);for(let w=0,y;w<m;w++)y=g+w,s[y]=o[y]^d[w];g+=m}return}for(let g=0;g<c;i++){if(e(t,n,r,u,i,a),i>=Md)throw new Error("arx: counter overflow");const m=Math.min(is,c-g);if(f&&m===is){const w=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let y=0,S;y<_T;y++)S=w+y,p[S]=h[S]^u[y];g+=is;continue}for(let w=0,y;w<m;w++)y=g+w,s[y]=o[y]^d[w];g+=m}}function DT(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=IT({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return ko(o),ko(i),Od(s),Od(n),(a,c,d,u,f=0)=>{mt(a,void 0,"key"),mt(c,void 0,"nonce"),mt(d,void 0,"data");const h=d.length,p=u!==void 0;if(u=jd(h,u,!1),p&&kT(d,u),ko(f),f<0||f>=Md)throw new Error("arx: counter overflow");const g=[];let m=a.length,w,y;if(m===32)g.push(w=qa(a)),y=NT;else if(m===16&&n)w=new Uint8Array(32),w.set(a),w.set(a,16),y=PT,g.push(w);else throw mt(a,32,"arx key"),new Error("invalid key size");(!Io||!za(c))&&g.push(c=qa(c));let S=Rn(w);if(r){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const A=c.subarray(0,16);if(Io)r(y,S,Rn(A),S);else{const E=vr(Uint32Array.from(y));r(E,S,Rn(A),S),ir(E),vr(S)}c=c.subarray(16)}else Io||vr(S);const v=16-o;if(v!==c.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const A=new Uint8Array(12);A.set(c,s?0:12-c.length),c=A,g.push(c)}const C=vr(Rn(c));try{return LT(e,y,S,C,d,u,f,i),u}finally{ir(...g)}}}function bt(e,t){return e[t++]&255|(e[t++]&255)<<8}class OT{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=qa(mt(t,32,"key"));const n=bt(t,0),r=bt(t,2),o=bt(t,4),s=bt(t,6),i=bt(t,8),a=bt(t,10),c=bt(t,12),d=bt(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]=bt(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],w=i[9],y=bt(t,n+0),S=bt(t,n+2),v=bt(t,n+4),C=bt(t,n+6),A=bt(t,n+8),E=bt(t,n+10),x=bt(t,n+12),I=bt(t,n+14);let k=s[0]+(y&8191),T=s[1]+((y>>>13|S<<3)&8191),_=s[2]+((S>>>10|v<<6)&8191),R=s[3]+((v>>>7|C<<9)&8191),P=s[4]+((C>>>4|A<<12)&8191),N=s[5]+(A>>>1&8191),L=s[6]+((A>>>14|E<<2)&8191),D=s[7]+((E>>>11|x<<5)&8191),O=s[8]+((x>>>8|I<<8)&8191),B=s[9]+(I>>>5|o),M=0,F=M+k*a+T*(5*w)+_*(5*m)+R*(5*g)+P*(5*p);M=F>>>13,F&=8191,F+=N*(5*h)+L*(5*f)+D*(5*u)+O*(5*d)+B*(5*c),M+=F>>>13,F&=8191;let H=M+k*c+T*a+_*(5*w)+R*(5*m)+P*(5*g);M=H>>>13,H&=8191,H+=N*(5*p)+L*(5*h)+D*(5*f)+O*(5*u)+B*(5*d),M+=H>>>13,H&=8191;let $=M+k*d+T*c+_*a+R*(5*w)+P*(5*m);M=$>>>13,$&=8191,$+=N*(5*g)+L*(5*p)+D*(5*h)+O*(5*f)+B*(5*u),M+=$>>>13,$&=8191;let ee=M+k*u+T*d+_*c+R*a+P*(5*w);M=ee>>>13,ee&=8191,ee+=N*(5*m)+L*(5*g)+D*(5*p)+O*(5*h)+B*(5*f),M+=ee>>>13,ee&=8191;let ne=M+k*f+T*u+_*d+R*c+P*a;M=ne>>>13,ne&=8191,ne+=N*(5*w)+L*(5*m)+D*(5*g)+O*(5*p)+B*(5*h),M+=ne>>>13,ne&=8191;let te=M+k*h+T*f+_*u+R*d+P*c;M=te>>>13,te&=8191,te+=N*a+L*(5*w)+D*(5*m)+O*(5*g)+B*(5*p),M+=te>>>13,te&=8191;let le=M+k*p+T*h+_*f+R*u+P*d;M=le>>>13,le&=8191,le+=N*c+L*a+D*(5*w)+O*(5*m)+B*(5*g),M+=le>>>13,le&=8191;let U=M+k*g+T*p+_*h+R*f+P*u;M=U>>>13,U&=8191,U+=N*d+L*c+D*a+O*(5*w)+B*(5*m),M+=U>>>13,U&=8191;let J=M+k*m+T*g+_*p+R*h+P*f;M=J>>>13,J&=8191,J+=N*u+L*d+D*c+O*a+B*(5*w),M+=J>>>13,J&=8191;let Q=M+k*w+T*m+_*g+R*p+P*h;M=Q>>>13,Q&=8191,Q+=N*f+L*u+D*d+O*c+B*a,M+=Q>>>13,Q&=8191,M=(M<<2)+M|0,M=M+F|0,F=M&8191,M=M>>>13,H+=M,s[0]=F,s[1]=H,s[2]=$,s[3]=ee,s[4]=ne,s[5]=te,s[6]=le,s[7]=U,s[8]=J,s[9]=Q}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;ir(r)}update(t){Op(this),mt(t),t=qa(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,ir(this.h,this.r,this.buffer,this.pad)}digestInto(t){Op(this),bT(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 jT=RT(32,e=>new OT(e));function MT(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],w=t[6],y=t[7],S=o,v=n[0],C=n[1],A=n[2],E=i,x=a,I=c,k=d,T=u,_=f,R=h,P=p,N=g,L=m,D=w,O=y,B=S,M=v,F=C,H=A;for(let ee=0;ee<s;ee+=2)E=E+T|0,B=Oe(B^E,16),N=N+B|0,T=Oe(T^N,12),E=E+T|0,B=Oe(B^E,8),N=N+B|0,T=Oe(T^N,7),x=x+_|0,M=Oe(M^x,16),L=L+M|0,_=Oe(_^L,12),x=x+_|0,M=Oe(M^x,8),L=L+M|0,_=Oe(_^L,7),I=I+R|0,F=Oe(F^I,16),D=D+F|0,R=Oe(R^D,12),I=I+R|0,F=Oe(F^I,8),D=D+F|0,R=Oe(R^D,7),k=k+P|0,H=Oe(H^k,16),O=O+H|0,P=Oe(P^O,12),k=k+P|0,H=Oe(H^k,8),O=O+H|0,P=Oe(P^O,7),E=E+_|0,H=Oe(H^E,16),D=D+H|0,_=Oe(_^D,12),E=E+_|0,H=Oe(H^E,8),D=D+H|0,_=Oe(_^D,7),x=x+R|0,B=Oe(B^x,16),O=O+B|0,R=Oe(R^O,12),x=x+R|0,B=Oe(B^x,8),O=O+B|0,R=Oe(R^O,7),I=I+P|0,M=Oe(M^I,16),N=N+M|0,P=Oe(P^N,12),I=I+P|0,M=Oe(M^I,8),N=N+M|0,P=Oe(P^N,7),k=k+T|0,F=Oe(F^k,16),L=L+F|0,T=Oe(T^L,12),k=k+T|0,F=Oe(F^k,8),L=L+F|0,T=Oe(T^L,7);let $=0;r[$++]=i+E|0,r[$++]=a+x|0,r[$++]=c+I|0,r[$++]=d+k|0,r[$++]=u+T|0,r[$++]=f+_|0,r[$++]=h+R|0,r[$++]=p+P|0,r[$++]=g+N|0,r[$++]=m+L|0,r[$++]=w+D|0,r[$++]=y+O|0,r[$++]=S+B|0,r[$++]=v+M|0,r[$++]=C+F|0,r[$++]=A+H|0}const BT=DT(MT,{counterRight:!1,counterLength:4,allowShortKeys:!1}),FT=new Uint8Array(16),Mp=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(FT.subarray(n))},UT=new Uint8Array(32);function Bp(e,t,n,r,o){o!==void 0&&mt(o,void 0,"AAD");const s=e(t,n,UT),i=AT(r.length,o?o.length:0,!0),a=jT.create(s);o&&Mp(a,o),Mp(a,r),a.update(i);const c=a.digest();return ir(s,i),c}const HT=e=>(t,n,r)=>({encrypt(s,i){const a=s.length;i=jd(a+16,i,!1),i.set(s);const c=i.subarray(0,-16);e(t,n,c,c,1);const d=Bp(e,t,n,c,r);return i.set(d,a),ir(d),i},decrypt(s,i){i=jd(s.length-16,i,!1);const a=s.subarray(0,-16),c=s.subarray(-16),d=Bp(e,t,n,a,r);if(!CT(c,d))throw ir(d),new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),ir(d),i}}),Fp=TT({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},HT(BT));function $T(e,t,n){return df(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mv(e,n,t)}const as=Uint8Array.of(0),zT=Uint8Array.of();function qT(e,t,n,r=32,o){df(e),Bn(r,"length"),Fn(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=zT:Fn(n,void 0,"info"),!i)return new Uint8Array;const a=new Uint8Array(i*s),{iHash:c,oHash:d}=mv.create(e,t),u=new Uint8Array(s),f=i>1?e.create():void 0;for(let p=0;p<i-1;p++){as[0]=p+1;const g=c._cloneInto(f);p&&g.update(u),g.update(n).update(as).digestInto(u),d._cloneInto(f).update(u).digestInto(u),a.set(u,s*p)}if(as[0]=i,i>1&&c.update(u),c.update(n).update(as).digestInto(u),d.update(u).digestInto(u),a.set(u,s*(i-1)),c.destroy(),d.destroy(),f?.destroy(),u!==a&&Ir(u),Ir(as),r===a.length)return a;const h=a.slice(0,r);return Ir(a),h}const vv={hashSHA256(e){return yl(e.subarray())},getHKDF(e,t){const n=$T(yl,t,e),o=qT(yl,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=qi.utils.randomSecretKey();return{publicKey:qi.getPublicKey(e),privateKey:e}},generateX25519KeyPairFromSeed(e){return{publicKey:qi.getPublicKey(e),privateKey:e}},generateX25519SharedKey(e,t){return qi.getSharedSecret(e.subarray(),t.subarray())},chaCha20Poly1305Encrypt(e,t,n,r){return Fp(r,t,n).encrypt(e.subarray())},chaCha20Poly1305Decrypt(e,t,n,r,o){return Fp(r,t,n).decrypt(e.subarray(),o)}},KT=vv;function GT(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 Ka=e=>{const t=jn(2);return t[0]=e>>8,t[1]=e,t};Ka.bytes=2;const Ga=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)};Ga.bytes=2;function WT(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 xv(e,t){!t.enabled||!gi||(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 Sv(e,t){!t.enabled||!gi||(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 VT(e,t){!t.enabled||!gi||t(e?`REMOTE_STATIC_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote static public key.")}function Ev(e,t){!t.enabled||!gi||t(e?`REMOTE_EPHEMERAL_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote ephemeral keys.")}function kv(e,t,n){!n.enabled||!gi||(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 js extends Error{code;constructor(t="Invalid crypto exchange"){super(t),this.code=js.code}static code="ERR_INVALID_CRYPTO_EXCHANGE"}const YT=0,XT=4294967295,JT="Cipherstate has reached maximum n, a new handshake must be performed";class ZT{n;bytes;view;constructor(t=YT){this.n=t,this.bytes=Bt(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>XT)throw new Error(JT)}}const Co=Bt(0);class Ki{k;n;crypto;constructor(t,n=void 0,r=0){this.crypto=t,this.k=n,this.n=new ZT(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 QT{cs;ck;h;crypto;constructor(t,n){this.crypto=t;const r=at(n,"utf-8");this.h=tA(t,r),this.ck=this.h,this.cs=new Ki(t)}mixKey(t){const[n,r]=this.crypto.hkdf(this.ck,t);this.ck=n,this.cs=new Ki(this.crypto,r)}mixHash(t){this.h=this.crypto.hash(new ze(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,Co);return[new Ki(this.crypto,t),new Ki(this.crypto,n)]}}class eA{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 QT(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 Iv extends eA{writeMessageA(t){return new ze(this.writeE(),this.ss.encryptAndHash(t))}writeMessageB(t){const n=this.writeE();this.writeEE();const r=this.writeS();return this.writeES(),new ze(n,r,this.ss.encryptAndHash(t))}writeMessageC(t){const n=this.writeS();return this.writeSE(),new ze(n,this.ss.encryptAndHash(t))}readMessageA(t){try{return this.readE(t),this.ss.decryptAndHash(t.sublist(32))}catch(n){throw new js(`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 js(`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 js(`handshake stage 2 validation fail: ${n.message}`)}}}function tA(e,t){if(t.length<=32){const n=Bt(32);return n.set(t),n}else return e.hash(t)}var Wa;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((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 ip('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 ip('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=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Wa||(Wa={}));var Va;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((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),Wa.codec().encode(n.extensions,r)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={identityKey:Bt(0),identitySig:Bt(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=Wa.codec().decode(n,n.uint32(),{limits:o.limits?.extensions});break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Va||(Va={}));async function Cv(e,t,n){const r=await e.sign(Tv(t));return Va.encode({identityKey:Ac(e.publicKey),identitySig:r,extensions:n})}async function Rv(e,t,n){try{const r=Va.decode(e),o=Pd(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=Tv(t);if(!await o.verify(s,r.identitySig))throw new Error("Invalid payload signature");return r}catch(r){throw new fE(r.message)}}function Tv(e){const t=at("noise-libp2p-static-key:");return e instanceof Uint8Array?bd([t,e],t.length+e.length):(e.prepend(t),e)}class nA extends yv{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 yT({lengthDecoder:Ga,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 ze;for(let r=0;r<t.byteLength;r+=_p){let o=r+_p;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(Ka(s.byteLength)),n.append(s)}return n}decrypt(t){const n=new ze;for(let r=0;r<t.byteLength;r+=Zs){let o=r+Zs;if(o>t.byteLength&&(o=t.byteLength),o-Lp<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-Lp);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 Up(e,t,n){return new nA(e,t,n)}async function rA(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await Cv(s,a.publicKey,d),f=new Iv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!0,prologue:i,s:a});xv(f.s,n),n.trace("Stage 0 - Initiator starting to send first message."),await r.write(f.writeMessageA(Co),t),n.trace("Stage 0 - Initiator finished sending first message."),Sv(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."),Ev(f.re,n),VT(f.rs,n),n.trace("Initiator going to check remote's signature...");const p=await Rv(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 kv(g,m,n),{payload:p,encrypt:w=>g.encryptWithAd(Co,w),decrypt:(w,y)=>m.decryptWithAd(Co,w,y)}}async function oA(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await Cv(s,a.publicKey,d),f=new Iv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!1,prologue:i,s:a});xv(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."),Ev(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."),Sv(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 Rv(h,f.rs,c),[g,m]=f.ss.split();return kv(g,m,n),{payload:p,encrypt:w=>m.encryptWithAd(Co,w),decrypt:(w,y)=>g.decryptWithAd(Co,w,y)}}class sA{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??KT;this.crypto=GT(c),this.extensions={webtransportCerthashes:[],...o},this.metrics=a?WT(a):void 0,r?this.staticKey=c.generateX25519KeyPairFromSeed(r):this.staticKey=c.generateX25519KeyPair(),this.prologue=i??Bt(0)}[Symbol.toStringTag]="@chainsafe/libp2p-noise";[vE]=["@libp2p/connection-encryption","@chainsafe/libp2p-noise"];async secureOutbound(t,n){const r=t.log?.newScope("noise")??this.log,o=Np(t,{lengthEncoder:Ka,lengthDecoder:Ga,maxDataLength:Zs}),s=await this.performHandshakeInitiator(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Pd(s.payload.identityKey);return{connection:Up(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:Oo(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 hE("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=Np(t,{lengthEncoder:Ka,lengthDecoder:Ga,maxDataLength:Zs}),s=await this.performHandshakeResponder(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Pd(s.payload.identityKey);return{connection:Up(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:Oo(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 rA({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 oA({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 iA(e={}){return t=>new sA(t,e)}const aA="termdock-e2ee-v1",Bd=3600*1e3,Hp=512*1024*1024,Fd=4*1024*1024,aa=()=>{},_c=Object.assign(aa,{enabled:!1,error:aa,trace:aa,newScope:()=>_c});Object.freeze(_c);async function Av(){const e=await IC();return{privateKey:e,peerId:Oo(e.publicKey).toString()}}function cA(e){return btoa(String.fromCharCode(...TC(e.privateKey)))}function $p(e){if(e.length>512||!/^[A-Za-z0-9+/]+={0,2}$/.test(e))throw new Error("Invalid identity encoding");const t=RC(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:Oo(t.publicKey).toString()}}class Pv{constructor(t=aa){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>Fd)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 lA extends yv{constructor(t,n){super({log:_c,direction:n?"outbound":"inbound",maxReadBufferLength:Fd,maxWriteBufferLength:Fd}),this.duplex=t,this.finished=t.sink(this.outgoing).catch(r=>{this.abort(jo(r))}),this.readTransport()}duplex;outgoing=new Pv(()=>this.onMuxerDrain());finished;async readTransport(){try{for await(const t of this.duplex.source)this.onData(t.slice());this.onTransportClosed()}catch(t){this.onTransportClosed(jo(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 jo(e){return e instanceof Error?e:new Error("Secure transport failed")}class dA extends Error{code="E2EE_REHANDSHAKE_REQUIRED";constructor(){super("Encrypted connection lifetime reached; establish a new handshake without replaying pending input")}}function uA(e){const t=e?.maxAgeMs??Bd,n=e?.maxBytesPerDirection??Hp;if(!Number.isSafeInteger(t)||t<=0||t>Bd||!Number.isSafeInteger(n)||n<=0||n>Hp)throw new Error("Encrypted connection limits cannot exceed the production maximum");return{maxAgeMs:t,maxBytesPerDirection:n}}async function Nv(e){const{identity:t,duplex:n,initiator:r,targetPinnedPeerId:o,signal:s}=e,i=uA(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?_C(o):void 0;if(a&&a.type!=="Ed25519")throw new Error("Only Ed25519 target identities are supported");if(t.peerId!==Oo(t.privateKey.publicKey).toString())throw new Error("Local identity mismatch");if(s?.aborted)throw s.reason??new Error("Connection aborted");const c=new lA(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(jo(s?.reason))};s?.addEventListener("abort",f,{once:!0}),c.addEventListener("close",()=>s?.removeEventListener("abort",f),{once:!0});const h=iA({crypto:vv,prologueBytes:new TextEncoder().encode(aA)})({privateKey:t.privateKey,peerId:Oo(t.privateKey.publicKey),logger:{forComponent:()=>_c},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:fA(p.connection,i)}}catch(p){throw c.abort(jo(p)),p}finally{clearTimeout(u),s?.removeEventListener("abort",f)}}function fA(e,t){const n=new Pv,r=performance.now(),o=Date.now();let s=0,i=0,a;const c=()=>(a??=new dA,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(jo(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(jo(p)),p}},close(h){h?e.abort(h):e.close()}}}const Ud=1012,Hd="Encrypted transport renewed",_v=2*1024*1024,hA=new TextEncoder,pA=new TextDecoder("utf-8",{fatal:!0});async function Lv(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>_v)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 mA(e,t){if(e.byteLength<4096||typeof CompressionStream>"u")return e;const n=await Lv(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=hA.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 gA(e){if(typeof e!="string"||e.length>Math.ceil(_v/3)*4)throw new Error("Invalid compressed record");const t=Uint8Array.from(atob(e),r=>r.charCodeAt(0)),n=await Lv(t,new DecompressionStream("gzip"));return JSON.parse(pA.decode(n))}const bf=64*1024,Dv=8;function yA(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=1?Math.min(e,Dv):1}const wA=2147483648,bA=new TextEncoder,vA=new TextDecoder("utf-8",{fatal:!0});function xA(e){if(!(e.bytes instanceof Uint8Array))return;if(!["upload","chunk"].includes(e.type))throw new Error("Invalid binary record type");const t=bA.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 SA(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:vA.decode(e.subarray(2,2+n)),bytes:e.slice(2+n)}}class vf{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 Gi extends Error{code="PACKET_QUEUE_BACKPRESSURE";constructor(t="Record queue capacity exceeded"){super(t),this.name="PacketQueueBackpressureError"}}const ca=2*1024*1024,EA=ca*2+8,zp=64*1024,kA=new TextEncoder,IA=new TextDecoder("utf-8",{fatal:!0});class Ov{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 mA(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 vf(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 Gi("Record queue item limit exceeded");const r=xA(t),o=r??kA.encode(JSON.stringify(t));if(o.length>ca)throw new Error("Record too large");const s=new Uint8Array(o.length+4);if(new DataView(s.buffer).setUint32(0,r?o.length+wA:o.length),s.set(o,4),this.outgoingBytes+s.byteLength>4*1024*1024)throw new Gi("Record queue byte budget exceeded");const i={id:t.id,bytes:s,compress:n};if(!this.outgoing.tryPush(i))throw new Gi("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 Gi))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 SA(u.subarray(4));const f=JSON.parse(IA.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(zp),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===zp&&(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 w=f.bytes.subarray(f.start,f.start+u);return c(u),w}const p=new Uint8Array(u);let g=n,m=0;for(;m<u;){const w=t[g];if(!w){g++;continue}const y=Math.min(u-m,w.end-w.start);p.set(w.bytes.subarray(w.start,w.start+y),m),m+=y,g++}return c(u),p};for await(const u of this.duplex.source){if(r+u.byteLength>EA)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>ca||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>ca||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 jv(e){let t="";for(let n=0;n<e.length;n+=8192)t+=String.fromCharCode(...e.subarray(n,n+8192));return btoa(t)}function Mv(e){const t=atob(e);return Uint8Array.from(t,n=>n.charCodeAt(0))}function CA(e){const t=new vf(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 qp="/api/federation/transport",RA=4e3,TA=4e3;function AA(e,t=Date.now()){if(!e||typeof e!="object")return;const n=e;if(!(n.version!==1||n.path!==qp||!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:qp,port:n.port,certificateHash:n.certificateHash,expiresAt:n.expiresAt}}async function Kp(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 Gp(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 PA(){const e=globalThis.WebTransport;return e?(t,n)=>new e(t,n):void 0}async function NA(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(RA),...e.signal?[e.signal]:[]]);try{await Kp(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(TA),...p?[p]:[]]),m=o.createBidirectionalStream({sendOrder:h==="socket"?10:0});m.then(C=>{g.aborted&&Gp(C).close?.(new Error("Stream cancelled"))},()=>{});const w=await Kp(m,g,()=>{}),y=Gp(w),S=y.close;y.close=C=>{a.delete(y),S?.(C)},a.add(y);const v=performance.now();try{const C=await Nv({identity:e.identity,initiator:!0,targetPinnedPeerId:e.targetPeerId,duplex:y,signal:g});return{duplex:{...C.duplex,bufferedBytes:y.bufferedBytes},diagnostics:{endpoint:t.host,path:"direct",targetPeerId:C.authenticatedPeerId,transport:"webtransport",transportOpenMs:f,handshakeMs:performance.now()-v,establishedAt:Date.now(),bufferedBytes:0,pendingWrites:!1,activeRequests:0,waitingRequests:0}}}catch(C){throw y.close?.(C instanceof Error?C:new Error("Secure stream failed")),C}}}}class Lt extends dt{constructor(){super("TARGET_AUTHORIZATION_REQUIRED")}}const Wi=new WeakMap;function qr(e,t={}){const n=Wi.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=_A(e,t.timeoutMs??5e3).then(s=>(r.at=Date.now(),r.settled=!0,s),s=>{throw Wi.get(e)===r&&Wi.delete(e),s});return r.pending=o,Wi.set(e,r),o}async function _A(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 Lt;return{fullService:o,grants:r,canManage:o&&r.length>0||r.some(s=>s.actions.includes("authorization.manage"))}}const LA=Aw+pd+8,DA=256,Vi=3e4,Yi=bf;function Ht(e){return e instanceof Error?e:new Error(String(e??"Secure connection closed"))}function Sl(e){if(!e.startsWith("/")||e.startsWith("//")||e.includes("#"))throw new Error("A local API path is required");return e}class $d 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(Ht(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 xf{constructor(t,n,r){this.channel=t,this.identity=n,this.targetPeerId=r,this.read().catch(o=>this.sharedConnectionFailed(Ht(o))),t.done.catch(o=>this.sharedConnectionFailed(Ht(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)>=Bd-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 xf(new Ov(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=yA(t.httpWindow),this.binaryChunks=t.binaryChunks===!0;const n=AA(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 Lt;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=Ht(o),r?.close(),n?.close(),this.streamRetryAt=Date.now()+3e4,(o instanceof Lt||o instanceof Error&&o.name==="UnexpectedPeerError")&&this.close(Ht(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:Ud,reason:Hd});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<pd?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>=LA)return!1;const n=[...this.pending.values()].filter(r=>r.kind===t).length;return t==="http"?n<pd:t==="socket"?n<Aw:!0}allocate(t){if(this.stopped)throw this.closeReason??new Error("Secure connection closed");const n=crypto.randomUUID(),r=new vf(t==="http"?Dv+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>=DA?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("连接等待超时,请重试。")),Vi),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 gA(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(Ht(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(Vi,n?.timeoutMs??Vi)));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 dt("PERMISSION_DENIED",{targetServiceId:this.targetPeerId}):Ht(i.error);return t.type==="permissions"&&i.type==="result"&&this.recordCapabilities(i),i}finally{clearTimeout(s),this.release(r)}}openSocket(t){if(Sl(t),!this.streamPool?.available)return this.startStreams(),this.openSharedSocket(t);const n=new AbortController;let r;const o=new $d(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(Ht(s))),o}openSharedSocket(t){Sl(t);let n;const r=new AbortController,o=new $d(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(Ht(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=Sl(s.pathname+s.search),d=uE(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(A){throw u.close(Ht(A)),A}const f={};i.headers.forEach((A,E)=>{["cookie","authorization","host","connection","content-length"].includes(E)||(f[E]=A)});const{id:h,queue:p}=await this.reserve("http",i.signal),g=p[Symbol.asyncIterator]();let m;const w=()=>{m?.cancel().catch(()=>{})},y=this.pending.get(h);if(!y)throw new Error("Secure connection closed");y.cancelUpload=w;const S=()=>{w();try{this.channel.send({id:h,type:"cancel"})}catch{}p.end(Ht(i.signal.reason??"Request aborted")),this.release(h)};i.signal.addEventListener("abort",S,{once:!0});const v=()=>{i.signal.removeEventListener("abort",S),this.release(h)},C=async()=>{let A;try{const E=(await Promise.race([g.next(),new Promise((x,I)=>{A=setTimeout(()=>I(new Error("服务响应超时,请重试。")),Vi)})])).value;if(!E)throw new Error("Secure response ended unexpectedly");if(E.type==="error")throw Ht(E.error);return E}finally{clearTimeout(A)}};try{if(i.signal.aborted)throw i.signal.reason;const A=this.httpWindow,E=this.binaryChunks;if(this.channel.send({id:h,type:"http",method:a,path:c,headers:f,window:A,binaryChunks:E}),i.body){const _=i.body.getReader();m=_;let R=0,P=0;const N=[],L=async()=>{if((await C()).type!=="upload-ack")throw new Error("Invalid upload acknowledgement");P+=N.shift(),n?.onUploadProgress?.(P)};try{for(;;){const{done:D,value:O}=await _.read();if(D)break;if(R+=O.byteLength,R>d)throw new Error("Request body exceeds upload limit");for(let B=0;B<O.byteLength;B+=Yi){N.length>=A&&await L();const M=O.subarray(B,B+Yi);await this.channel.sendBulk({id:h,type:"upload",...E?{bytes:M}:{data:jv(M)}},i.signal),N.push(M.byteLength)}}for(;N.length;)await L()}catch(D){throw await _.cancel(D).catch(()=>{}),D}finally{m=void 0,_.releaseLock()}}if(i.signal.aborted||this.stopped)throw new Error("Request aborted");this.channel.send({id:h,type:"upload-end"});const x=await C();if(x.type!=="head"||typeof x.status!="number")throw new Error("Invalid response header");const I=new Headers(x.headers);if(a==="HEAD"||[204,205,304].includes(x.status)){if((await C()).type!=="end")throw new Error("Unexpected response body");return v(),new Response(null,{status:x.status,headers:I})}let k=!1;const T=new ReadableStream({pull:async _=>{try{k&&(this.channel.send({id:h,type:"ack"}),k=!1);const R=await C();if(R.type==="end"){_.close(),v();return}if(R.type!=="chunk"||!(E&&R.bytes instanceof Uint8Array)&&typeof R.data!="string")throw new Error("Invalid response chunk");const P=E&&R.bytes instanceof Uint8Array?R.bytes:Mv(R.data);if(P.length>Yi)throw new Error("Response chunk exceeds budget");_.enqueue(P),k=!0}catch(R){_.error(R),S(),v()}},cancel:()=>{S(),v()}},{highWaterMark:Yi,size:_=>_.byteLength});return new Response(T,{status:x.status,headers:I})}catch(A){throw S(),v(),A}}retire(){for(const t of this.streamChildren)t.retire();for(const t of this.pending.values())t.socket?.accept({id:"",type:"ws-close",code:Ud,reason:Hd});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 jr(e){const t=new URL(e.url);if(!["wss:","ws:"].includes(t.protocol))throw new Error("A WebSocket endpoint is required");if(t.protocol==="ws:"&&!["127.0.0.1","localhost","[::1]"].includes(t.hostname))throw new Error("Remote secure channels require WSS");const n=e.identity??await Av(),r=performance.now(),o=(e.socketFactory??(d=>new WebSocket(d)))(t.href),s=CA(o),i=new AbortController,a=setTimeout(()=>i.abort(new Error("Secure handshake timed out")),2e4),c=e.signal?AbortSignal.any([e.signal,i.signal]):i.signal;try{await new Promise((w,y)=>{if(c.aborted){y(c.reason);return}const S=()=>{c.removeEventListener("abort",A),o.removeEventListener("open",v),o.removeEventListener("error",C),o.removeEventListener("close",C)},v=()=>{S(),w()},C=()=>{S(),y(o.transportFailure||new Error("Secure transport unavailable"))},A=()=>{S(),y(c.reason)};c.addEventListener("abort",A,{once:!0}),o.addEventListener("open",v),o.addEventListener("error",C),o.addEventListener("close",C),o.readyState===1&&v()});const d=performance.now(),u=await Nv({identity:n,duplex:s,initiator:!0,targetPinnedPeerId:e.targetPeerId,signal:c}),f=new xf(new Ov(u.duplex),n,u.authenticatedPeerId),h=performance.now(),p=Date.now(),g=o.connectionTimings;f.transportDiagnostics=()=>({endpoint:t.host,path:g?"relay":"direct",targetPeerId:u.authenticatedPeerId,transport:"websocket",transportOpenMs:d-r,handshakeMs:h-d,establishedAt:p,relay:g?{...g}:void 0,bufferedBytes:o.bufferedAmount,pendingWrites:!1,activeRequests:0,waitingRequests:0});const m=e.webTransportFactory??PA();if(e.webTransport!==!1&&!g&&t.protocol==="wss:"&&m&&f.configureWebTransport((w,y)=>NA({baseUrl:t.href,descriptor:w,identity:n,targetPeerId:u.authenticatedPeerId,factory:m,signal:y})),e.pairingCode)try{await f.request({type:"pair",code:e.pairingCode})}catch(w){throw f.close(Ht(w)),w}return f}catch(d){throw o.close(),d}finally{clearTimeout(a)}}const Wp=aE,OA=cE;class jA 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 dt("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"),qu),this.upstream.addEventListener("message",a=>{if(this.readyState!==3)try{if(typeof a.data!="string"||new TextEncoder().encode(a.data).length>Wp)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 dt("RELAY_AUTHORIZATION_REQUIRED",{...o,targetServiceId:n})),c.code==="RELAY_SELF_TARGET"&&(this.transportFailure=new dt("RELAY_SELF_TARGET",{...o,targetServiceId:n})),(c.code==="TARGET_PASSWORD_REQUIRED"||c.code==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(this.transportFailure=new dt(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=Mv(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>OA||n.length>Wp)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:jv(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 MA extends jA{constructor(t,n,r=s=>new WebSocket(s),o={}){super(t,n,r,o)}}function Bv(e,t={}){return n=>new MA(n,e,void 0,t)}function BA(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 FA(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)||!BA(f.pathname)?.startsWith(u))){o.postMessage({type:"error"}),o.close();return}const h=new AbortController;let p,g,m=!1,w=!1;const y=()=>{w||(w=!0,t.delete(y),h.abort(),p?.cancel().catch(()=>{}),o.close())};t.add(y),o.onmessage=S=>{if(S.data?.type==="cancel"){y();return}S.data?.type!=="pull"||m||w||(m=!0,(async()=>{if(!p){o.postMessage({type:"end"}),y();return}if(!g?.length){const C=await p.read();if(C.done){o.postMessage({type:"end"}),y();return}g=C.value}const v=g.slice(0,64*1024);g=g.subarray(v.length),o.postMessage({type:"chunk",data:v.buffer},[v.buffer])})().catch(()=>{o.postMessage({type:"error"}),y()}).finally(()=>{m=!1}))},o.onmessageerror=y,o.start(),(async()=>{const S=await e();if(w)return;if(d&&d!==S.targetPeerId)throw new Error("Preview target changed");const v=await S.fetch(f.pathname+f.search,{method:i,headers:a,body:["GET","HEAD"].includes(i)?void 0:c,signal:h.signal});if(w){await v.body?.cancel();return}p=v.body?.getReader();const C={};v.headers.forEach((A,E)=>{C[E]=A}),o.postMessage({type:"head",status:v.status,headers:C,bodyless:!p,targetPeerId:S.targetPeerId})})().catch(()=>{w||(o.postMessage({type:"error"}),y())})};return navigator.serviceWorker.addEventListener("message",n),()=>{navigator.serviceWorker.removeEventListener("message",n);for(const r of[...t])r()}}function Fv(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 Uv(e){const t=Fv(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}:Nr(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 Hv="termdock-secure-last-path:",UA=10*6e4;function $v(e){try{const t=JSON.parse(sessionStorage.getItem(Hv+e)||"null");return t&&typeof t.key=="string"&&Date.now()-t.at<UA?t.key:void 0}catch{return}}function zd(e,t){try{sessionStorage.setItem(Hv+e,JSON.stringify({key:t,at:Date.now()}))}catch{}}function zv(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",w);for(const v of p)v.abort();p.clear()},m=v=>{c||(c=!0,g(),s(v))},w=()=>m(r.signal?.reason),y=setTimeout(()=>m(u||f||new Error("连接路线尝试超时")),r.timeoutMs??lE);if(r.signal?.addEventListener("abort",w,{once:!0}),r.signal?.aborted){w();return}const S=()=>{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 v=e[i++],C=performance.now(),A=I=>{try{performance.getEntriesByName("termdock:connection-path").length>64&&performance.clearMeasures("termdock:connection-path"),performance.measure("termdock:connection-path",{start:C,end:performance.now(),detail:{path:v.key.startsWith("relay:")?"relay":"direct",ok:I}})}catch{}},E=new AbortController;p.add(E),a++;let x;try{x=v.run(E.signal)}catch(I){x=Promise.reject(I)}x.then(I=>{if(A(!0),p.delete(E),c){t(I);return}c=!0,g(),o({value:I,key:v.key})},I=>{if(A(!1),p.delete(E),a--,!c){if(d=I,I instanceof Error&&I.name==="UnexpectedPeerError"&&(u=I),I instanceof dt&&["TARGET_IDENTITY_MISMATCH","RELAY_SELF_TARGET"].includes(I.code)&&(u=I),I instanceof dt&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(I.code)&&(f=I),Fv(I)||I instanceof Lt||I instanceof dt&&I.code==="TARGET_AUTHORIZATION_REQUIRED"){c=!0,g(),s(I);return}S()}}),clearTimeout(h),!n&&i<e.length&&(h=setTimeout(S,400))};S()})}const HA=3,$A=1/0,zA=10,qv="termdock-secure-workspace-limit";function Kv(e){return e===1/0||Number.isInteger(e)&&e>=3&&e<=zA}function qA(){try{const e=localStorage.getItem(qv),t=e==="unlimited"?1/0:Number(e);if(Kv(t))return t}catch{}return navigator.maxTouchPoints>0?HA:$A}function KA(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 Gv="termdock-workspace",Mr="termdock:workspace-visibility",qd="termdock:workspace-activate";function Lc(){return window.parent!==window&&location.pathname==="/workspace.html"&&new URLSearchParams(location.search).get(Gv)||"root"}let Vp,Yp;function pn(){try{if(window.parent===window)return window.__termdockWorkspaceHost;const e=window.parent.__termdockWorkspaceHost;return e&&e!==Vp&&(Vp=e,Yp={...e,subscribe(t){const n=e.subscribe(t,Lc()),r=o=>{o.persisted||n()};return window.addEventListener("pagehide",r),()=>{n(),window.removeEventListener("pagehide",r)}}}),e?Yp:void 0}catch{return}}function Rr(){const e=pn();return!e||e.snapshot().activeKey===Lc()}function Ya(e,t=!0){return pn()?.activate(e,t)??!1}function uo(e){pn()?.report(Lc(),e)}const Kd="termdock-secure-workspace-session:",Wv="termdock-secure-last-workspace";function GA(){for(const e of["sessionStorage","localStorage"])try{const t=window[e].getItem(Wv);if(t)return t}catch{}return null}function WA(e){for(const t of["sessionStorage","localStorage"])try{window[t].setItem(Wv,e)}catch{}}function ZM(e){if(e)try{const t=JSON.parse(localStorage.getItem(Kd+e)||"null");return localStorage.removeItem(Kd+e),t&&typeof t.sessionId=="string"&&Date.now()-t.at<6e4?t.sessionId:void 0}catch{return}}function VA(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=GA(),h=e&&f!==e.targetPeerId?Lr().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=qA(),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=KA(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(Mr,!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(qd,!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(Kv(f)){n=f;try{localStorage.setItem(qv,f===1/0?"unlimited":String(f))}catch{}c(),a()}},activate(f,h=!0){const p=Dn(f);if(!p?.targetPeerId)return!1;const g=t.items.find(y=>y.service?.targetPeerId===p.targetPeerId),m=g?.key||p.targetPeerId,w=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?w:y):[...t.items,w]},c(),WA(p.targetPeerId),h&&i.add(m),a();for(const[y,S]of s)d(y,S);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=Lr().find(m=>m.targetPeerId===f);if(!p)return!1;try{localStorage.setItem(Kd+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 El;async function Zt(){return El||(El=(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 $p(t);const n=await Av();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=$p(c.result):a.put(cA(n),"identity")},i.oncomplete=()=>o(),i.onerror=()=>s(i.error)}),r}finally{e.close()}})()),El}const Xa={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 Xp(e){return typeof e=="string"&&Object.hasOwn(Xa,e)?Xa[e].reason:void 0}class jt extends Error{constructor(t,n){super(Xa[t].message),this.code=t,this.retryAfterMs=n,this.status=Xa[t].status}code;retryAfterMs;status}function Un(e){if(e instanceof jt)return e;if(e instanceof Lt)return new jt("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof dt)return new jt(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 jt("PASSWORD_NOT_CONFIGURED");if(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")return new jt(e.message);if(e.name==="UnexpectedPeerError"||e.message==="PEER_IDENTITY_MISMATCH")return new jt("IDENTITY_MISMATCH");if(e.message==="LOGIN_RATE_LIMIT"||e.message==="Too many password login attempts")return new jt("RATE_LIMITED");if(e.message==="AUTHORIZATION_DENIED")return new jt("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof TypeError||["TimeoutError","AbortError"].includes(e.name)||ww(e)||e.message==="Encrypted handshake timed out"||e.message==="Encrypted transport failed")return new jt("CONNECTION_FAILED");if(e.message==="Password authentication failed"||e.message==="Password login expired"||e.message==="INVALID_LOGIN")return new jt("INVALID_PASSWORD")}return new jt("LOGIN_UNAVAILABLE")}const vt="termdock:secure-state";let Ae,Rt,Tt,Br="direct",la=!1,Jp=0,da=!1,Zp=-1/0;const Ut=new Map,Dc=e=>!!e&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(e.code),hn=new Map;function Vv(e){const{targetServiceId:t,entryServiceId:n}=e.context;if(!Dc(e)||!t||!n)return;hn.size>32&&hn.clear();const r=hn.get(t)||new Set;r.add(n),hn.set(t,r)}function Sf(e,t){return!hn.get(e)?.has(t)}function Qs(e){Vv(e);const t=e.context.targetServiceId||se()?.targetPeerId;t&&(Ut.size>32&&Ut.clear(),Ut.set(t,e))}function YA(){const e=se()?.targetPeerId;e&&(Ut.delete(e),hn.delete(e))}const Mo=globalThis.fetch.bind(globalThis);function se(){return lt()}function Fe(){return Ae}function XA(){return Tt}function Ja(){Ae?.close(),Tt?.close(),Ae=void 0,Tt=void 0}class kl extends Error{constructor(){super("Secure read target changed"),this.name="SecureReadTargetChanged"}}function JA(e){if(ww(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 ZA(e,t){const n=se(),r=n?.targetPeerId,o=JSON.stringify(n),s=()=>JSON.stringify(se())===o,i=Fe(),a=c=>{if(!s())throw new kl;if(t?.aborted)throw new DOMException("The operation was aborted","AbortError");return c};try{return a(await e())}catch(c){if(c instanceof kl||t?.aborted||c instanceof Error&&c.name==="AbortError"||c&&typeof c=="object"&&"status"in c||!r||!s()||!i?.closed&&!JA(c))throw c;if(_s(navigator.onLine===!1?"offline":"reconnecting"),i&&Fe()===i&&Ja(),window.dispatchEvent(new Event(vt)),await Zv(t),!s())throw new kl;const d=a(await e());return _s("ready"),d}}async function Yv(){const e=await Mo("/api/auth/status",{signal:AbortSignal.timeout(5e3)});if(!e.ok)throw new Error("Failed to query auth status");return e.json()}async function QA(){if(se()){await qt();return}if((await Yv()).enabled)return;const e=await Mo("/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 Kt({url:location.origin,targetPeerId:t,serviceName:location.hostname})}async function e2(e,t){const{startPasswordBootstrap:n,finishPasswordBootstrap:r}=await Yt(async()=>{const{startPasswordBootstrap:f,finishPasswordBootstrap:h}=await import("./passwordBootstrap-CSqoknIM.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 jt("LOGIN_UNAVAILABLE");s=f}const i=f=>e===location.origin?f:new URL(f,e).href,a=async(f,h)=>{const p=await Mo(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 jt(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 Zt(),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 Ef(e,t){const n=se();if(n&&Dt(n).includes(e))return await Za(n,t),n;try{return await e2(e,t)}catch(r){if(!(r instanceof TypeError)&&!(r instanceof DOMException))throw r;const o=(await yt()).find(i=>i.targetPeerId&&Dt({...i,targetPeerId:i.targetPeerId}).includes(e));if(!o?.targetPeerId)throw Un(r);const s={...o,targetPeerId:o.targetPeerId,serviceName:o.label};return await Za(s,t),s}}async function Za(e,t){const n=await yi(e),{startPasswordBootstrap:r,finishPasswordBootstrap:o}=await Yt(async()=>{const{startPasswordBootstrap:i,finishPasswordBootstrap:a}=await import("./passwordBootstrap-CSqoknIM.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 Zt()).peerId,origin:location.origin});if(c.serverIdentity!==e.targetPeerId)throw new jt("IDENTITY_MISMATCH");await n.request({type:"password-finish",attemptId:c.attemptId,finishLoginRequest:c.finishLoginRequest})}catch(i){throw Un(i)}finally{s&&(s.passwordKey=""),n.close()}}async function t2(e){try{const t=se();t&&await Za(t,e);const n=t||await Ef(location.origin,e);return await Kt(n),Response.json({ok:!0})}catch(t){const n=Un(t);return Response.json({error:n.message,code:n.code,retryAfterMs:n.retryAfterMs},{status:n.status})}}async function Qp(e,t){const n=$e(e),r=(await yt()).find(i=>i.targetPeerId&&Dt({...i,targetPeerId:i.targetPeerId}).includes(n));if(t===void 0&&r?.targetPeerId)try{return await Kt({...r,targetPeerId:r.targetPeerId,serviceName:r.label}),{}}catch(i){if(!(i instanceof Lt))throw i}if(t!==void 0){const i=await Ef(n,t);if(r?.targetPeerId&&r.targetPeerId!==i.targetPeerId)throw new Error("这台服务的身份已改变。请先移除旧记录,再重新添加。");return await Kt({...i,routes:r?.routes,serviceName:r?.label||i.serviceName}),{}}const o=await Mo(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 Kt({url:n,targetPeerId:s,serviceName:r?.label||new URL(n).host,serviceOrigin:n}),{}}function Xt(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(Tu)||"null");n&&n.targetPeerId!==e.targetPeerId&&new URL(n.url).host===new URL(e.url).host&&t.push(n)}catch{}return xw({...e,routes:t})}const Ms=e=>`relay:${e.targetPeerId}:${e.url}`;async function Xv(e){const t=Xt(e),n=new Set(t.map(Ms)),r=[],o=await yt(),s=o.some(i=>i.targetPeerId===e.targetPeerId);for(const i of o)if(!(!i.targetPeerId||i.targetPeerId===e.targetPeerId||!s&&!Xt({...i,targetPeerId:i.targetPeerId}).some(a=>a.targetPeerId===e.targetPeerId)))for(const a of Dt({...i,targetPeerId:i.targetPeerId})){const c={url:a,targetPeerId:i.targetPeerId};n.has(Ms(c))||(n.add(Ms(c)),r.push(c))}return r.slice(0,Math.max(0,_r-Math.max(e.routes?.length??0,t.length)))}function Dt(e){const t=Xt(e);return Sw({...e,routes:[...t,...e.routes||[]]})}function Fr(e){return WS(e).href}async function Jv(e,t){return jr({url:Fr(e.url),targetPeerId:e.targetPeerId,identity:await Zt(),signal:t?AbortSignal.any([t,AbortSignal.timeout(5e3)]):AbortSignal.timeout(5e3)})}async function yi(e,t,n){const r=await Zt(),o=Dt(e).map(c=>({key:`direct:${c}`,run:d=>jr({url:Fr(c),targetPeerId:e.targetPeerId,identity:r,signal:AbortSignal.any([d,AbortSignal.timeout(8e3),...t?[t]:[]])})})),s=n?[]:await Xv(e);for(const c of[...Xt(e),...s].filter(d=>Sf(e.targetPeerId,d.targetPeerId)))o.push({key:Ms(c),run:async d=>{t&&(d=AbortSignal.any([d,t]));const u=[Ae,Tt].find(h=>h&&!h.closed&&h.targetPeerId===c.targetPeerId),f=u||await Jv(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 Fu(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(Fr(c.url));return p.pathname="/api/federation/relay",p.searchParams.set("routeToken",h.routeToken),await jr({url:p.href,targetPeerId:e.targetPeerId,identity:r,socketFactory:Bv(e.targetPeerId,{entryServiceId:c.targetPeerId,entryUrl:c.url}),signal:AbortSignal.any([d,AbortSignal.timeout(qu)])})}finally{u||f.close()}}});const i=$v(e.targetPeerId);o.sort((c,d)=>+(d.key===i)-+(c.key===i));const a=await zv(o,c=>c.close(),!1,{signal:t});return n?n.connected(a.key):zd(e.targetPeerId,a.key),a.value}async function n2(e,t){const n=await yi(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 r2(e,t){const n=await yi(e,t),r=()=>n.close();t.addEventListener("abort",r,{once:!0});try{if(t.aborted||(await qr(n,{timeoutMs:3e3}),t.aborted))throw t.reason;return n}catch(o){throw n.close(),o}finally{t.removeEventListener("abort",r)}}async function Gd(e,t){let n=!1;const r=await yi(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 qr(r),s=!0}catch(i){if(!(i instanceof Lt))throw i}if(s&&!n)return"authorized";try{return await r.request({type:"password-parameters"},{timeoutMs:5e3}),s?"authorized":"passwordRequired"}catch(i){if(Un(i).code==="PASSWORD_NOT_CONFIGURED"){if(n)throw new dt("TARGET_PASSWORD_REQUIRED",{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId});return"invitationRequired"}throw i}}catch(s){throw Fu(s,{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId})}finally{t?.removeEventListener("abort",o),r.close()}}async function Kt(e,t={}){e.entryServiceId&&Bo(e.entryServiceId,e.targetPeerId);const n=Ae,r=Tt,o=await Zt(),s=$e(e.serviceOrigin||e.url),i=(await yt()).find(S=>S.targetPeerId===e.targetPeerId),a={...e,routes:e.routes??i?.routes};e.routeCode&&e.entryServiceId&&hn.get(e.targetPeerId)?.delete(e.entryServiceId);const c=t.directOnly||Dc(Ut.get(e.targetPeerId))?[]:await Xv(a),d=t.directOnly?[]:[...Xt(a),...c].filter(S=>Sf(e.targetPeerId,S.targetPeerId)),u=Dt(a);let f,h,p=e.pairingCode,g="direct";const m=new Set,w=new Map,y=async(S,v)=>{if(n&&!n.closed&&n.targetPeerId===S.targetPeerId)return n;if(r&&!r.closed&&r.targetPeerId===S.targetPeerId)return r;const C=JSON.stringify([S.targetPeerId,S.url]),A=w.get(C);if(A&&!A.closed)return A;const E=await Jv(S,v);return m.add(E),w.set(C,E),E};try{if(e.routeCode&&e.entryServiceId){const R=d.find(L=>L.targetPeerId===e.entryServiceId);if(!R)throw new Error("邀请缺少入口信息。");if((await(await y(R)).request({type:"route-pair",code:e.routeCode})).serviceId!==e.targetPeerId)throw new Error("邀请的目标服务不一致。");e.routeOnly&&await On({id:e.targetPeerId,url:s,label:e.serviceName||new URL(s).host,targetPeerId:e.targetPeerId,serviceOrigin:s,routes:d})}const S=[],v=async(R,P)=>{const N=()=>R.close();P.addEventListener("abort",N,{once:!0});try{if(P.aborted||(await qr(R),P.aborted))throw P.reason}catch(L){throw R.close(),L}finally{P.removeEventListener("abort",N)}};for(const R of u)S.push({key:`direct:${R}`,run:async P=>{const N=await jr({url:Fr(R),targetPeerId:e.targetPeerId,pairingCode:p,identity:o,signal:AbortSignal.any([P,AbortSignal.timeout(8e3)])});return p=void 0,await v(N,P),{client:N,path:"direct"}}});for(const R of d)S.push({key:`relay:${R.targetPeerId}:${R.url}`,run:async P=>{let N,L;try{if(N=await y(R,P),P.aborted)throw P.reason;const D=await N.request({type:"route-ticket",serviceId:e.targetPeerId},{timeoutMs:5e3}).catch(B=>{throw Fu(B,{targetServiceId:e.targetPeerId,entryServiceId:R.targetPeerId,entryUrl:R.url})});if(P.aborted)throw P.reason;if(typeof D.routeToken!="string"||!D.routeToken)throw new Error("入口未允许此设备连接该服务。");const O=new URL(Fr(R.url));return O.pathname="/api/federation/relay",O.searchParams.set("routeToken",D.routeToken),L=await jr({url:O.href,targetPeerId:e.targetPeerId,pairingCode:p,identity:o,socketFactory:Bv(e.targetPeerId,{entryServiceId:R.targetPeerId,entryUrl:R.url}),signal:AbortSignal.any([P,AbortSignal.timeout(qu)])}),p=void 0,await v(L,P),{client:L,entry:N,path:"relay"}}catch(D){L?.close(),N&&N!==r&&N!==n&&N.close();const O=Nr(D,{targetServiceId:e.targetPeerId,entryServiceId:R.targetPeerId,entryUrl:R.url});throw O&&Vv(O),O||D}}});const C=$v(e.targetPeerId);S.sort((R,P)=>+(P.key===C)-+(R.key===C));const A=await zv(S,R=>{R.client.close(),R.entry&&R.entry!==n&&R.entry!==r&&R.entry.close()},!!p);if(f=A.value.client,h=A.value.entry,g=A.value.path,t.renewIfCurrent){if(Ae!==t.renewIfCurrent||n!==t.renewIfCurrent||n.closed||!n.canSwitchTransport||se()?.targetPeerId!==e.targetPeerId){f.close();for(const R of m)R!==Tt&&R!==Ae&&R.close();return Ae??n}Ae=f,Br=g,Tt=h,zd(e.targetPeerId,A.key),n.retire();for(const R of new Set([r,...m]))R&&R!==n&&R!==f&&R!==h&&R.close();return window.dispatchEvent(new Event(vt)),f}if(zd(e.targetPeerId,A.key),Ae!==n&&Ae&&!Ae.closed&&Ae.targetPeerId===e.targetPeerId){f.close();for(const R of m)R!==Tt&&R.close();return Ae}g==="direct"&&new URL(s).host===location.host&&bS(e.targetPeerId);const E=(await yt()).find(R=>R.targetPeerId===e.targetPeerId||!R.targetPeerId&&(R.serviceOrigin||R.url)===s),x=E?.label||e.serviceName||new URL(s).host,I=c.find(R=>Ms(R)===A.key),k=a.routes??Xt(a),T=Dt(a)[0],_={url:T||s,targetPeerId:e.targetPeerId,serviceName:x,...e.viewMode?{viewMode:e.viewMode}:{},...e.viewLayout?{viewLayout:e.viewLayout}:{},...T?{serviceOrigin:T}:{entryServiceId:h?.targetPeerId||e.entryServiceId},routes:I?[...k,I]:k};if(await(t.rememberOnly?VS:On)({id:E?.id||e.targetPeerId,..._,label:x}),mo!=="unpaired"&&mo!==e.targetPeerId&&pn()&&Ya({id:E?.id||e.targetPeerId,..._,label:x})){f.close();for(const R of m)R!==n&&R!==r&&R.close();return n||f}Au(_),Ut.delete(e.targetPeerId),Ae=f,Br=g,Tt=h;for(const R of new Set([n,r,...m]))R&&R!==f&&R!==h&&R.close();return mo!==e.targetPeerId?(location.reload(),new Promise(()=>{})):(window.dispatchEvent(new Event(vt)),f)}catch(S){f?.close();for(const v of m)v!==r&&v.close();throw S}}async function o2(){const e=Ae,t=se();if(!(t&&Ut.has(t.targetPeerId))&&!(da||la||Rt||!e?.renewalDue||!e.canSwitchTransport||!t||performance.now()-Zp<3e4)){Zp=performance.now(),da=!0;try{await Kt(t,{renewIfCurrent:e})}catch(n){console.debug("[connection] renewal deferred",{reason:n instanceof Error?n.message:"unknown"})}finally{da=!1}}}async function s2(){const e=Ae,t=se();if(t&&Ut.has(t.targetPeerId)||Date.now()-Jp<6e4||da||la||Br!=="relay"||!e||e.closed||!e.canSwitchTransport||!t?.serviceOrigin)return;la=!0,Jp=Date.now();let n;try{for(const o of Dt(t))try{n=await jr({url:Fr(o),targetPeerId:t.targetPeerId,identity:await Zt(),signal:AbortSignal.timeout(3e3)}),await qr(n);break}catch(s){if(n?.close(),n=void 0,s instanceof Lt)throw s}if(!n||Ae!==e||!e.canSwitchTransport)return;const r=Tt;Ae=n,n=void 0,Tt=void 0,Br="direct",e.close(),r?.close(),window.dispatchEvent(new Event(vt))}catch(r){r instanceof Lt&&Ae===e&&(Ja(),window.dispatchEvent(new Event("auth:unauthorized")))}finally{n?.close(),la=!1}}function i2(){return Br}async function Zv(e){return e?(e.throwIfAborted(),new Promise((t,n)=>{const r=()=>n(e.reason);e.addEventListener("abort",r,{once:!0}),qt().then(o=>{e.removeEventListener("abort",r),e.aborted?n(e.reason):t(o)},o=>{e.removeEventListener("abort",r),n(o)})})):qt()}async function qt(){const e=Ut.get(se()?.targetPeerId||"");if(e)throw e;if(Ae&&!Ae.closed){const n=Ae;return o2(),n}if(Ae=void 0,Rt)return Rt;const t=se();if(!t)throw new Error("DEVICE_PAIRING_REQUIRED");return Rt=Kt(t,{rememberOnly:!0}).catch(n=>{if(Ae&&!Ae.closed&&Ae.targetPeerId===t.targetPeerId)return Ae;const r=Nr(n,{targetServiceId:t.targetPeerId});throw r?(Qs(r),r):n}).finally(()=>{Rt=void 0}),Rt}async function em(){const e=se(),t=Ut.get(e?.targetPeerId||"");if(!e||!Dc(t)||!Dt(e).length)throw t||new Error("没有可用的直连地址。");return Rt||(Rt=Kt(e,{rememberOnly:!0,directOnly:!0}).then(n=>{if(se()?.targetPeerId!==e.targetPeerId||Ae!==n||Br!=="direct")throw t;return Ut.delete(e.targetPeerId),n}).catch(n=>{const r=Nr(n,{targetServiceId:e.targetPeerId});throw r?(Qs(r),r):n}).finally(()=>{Rt=void 0}),Rt)}function Wd(e=se(),t=Ut.get(e?.targetPeerId||"")){return e&&Dc(t)&&t?.code!=="RELAY_AUTHORIZATION_REQUIRED"?Dt(e).length>0:!!e&&t?.code==="RELAY_AUTHORIZATION_REQUIRED"&&GS(e,t.context.entryServiceId,hn.get(e.targetPeerId))}async function a2(){const e=se(),t=Ut.get(e?.targetPeerId||"");if(!e||!Wd(e,t))throw t||new Error("没有独立的已保存连接路线。");return t?.code!=="RELAY_AUTHORIZATION_REQUIRED"||!Xt(e).filter(r=>Sf(e.targetPeerId,r.targetPeerId)).length?em():Rt||(Rt=Kt(e,{rememberOnly:!0}).catch(r=>{const o=Nr(r,{targetServiceId:e.targetPeerId});throw o&&Qs(o),o||r}).finally(()=>{Rt=void 0}),Rt)}function Qv(e){const t=new URL(e,location.href);if(Ae&&!Ae.closed&&!Ut.has(Ae.targetPeerId))return Ae.openSocket(t.pathname+t.search);let n;const r=new $d(e,o=>n?.send(o),()=>n?.close(),()=>n?.bufferedAmount??0);return qt().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 c2(){FA(qt),window.fetch=async(e,t)=>{const n=new URL(e instanceof Request?e.url:String(e),location.href);if(!n.pathname.startsWith("/api/"))return Mo(e,t);if(n.origin!==location.origin)throw new Error("Remote business API requires a paired encrypted service");if(n.pathname==="/api/meta")return Mo(e,t);if(n.pathname==="/api/auth/status"){if(!se()){const s=await Yv();return Response.json({enabled:s.enabled,authenticated:!1})}try{const s=await qr(await qt());return Response.json({enabled:s.grants.length>0,authenticated:!0})}catch(s){if(s instanceof Lt)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 t2(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(),Tt?.close(),Ae=void 0,Tt=void 0,wS(),location.reload(),Response.json({ok:!0});const r=t?.signal!==void 0?t.signal:e instanceof Request?e.signal:void 0,o=await Zv(r);return e instanceof Request?o.fetch(e,t):o.fetch(n.pathname+n.search,t)}}function Bo(e,t){if(e===t)throw new dt("RELAY_SELF_TARGET",{entryServiceId:e,targetServiceId:t})}async function Ko(e,t){const n=$e(e.url),r=[Ae,Tt].find(c=>c&&!c.closed&&c.targetPeerId===e.targetPeerId);if(r)return{client:r,route:{...e,url:n},release(){}};const o=t??(await yt()).find(c=>c.targetPeerId===e.targetPeerId),s=[...o?.routes??[]];o?.targetPeerId&&$e(o.serviceOrigin||o.url)!==n&&s.push({url:o.serviceOrigin||o.url,targetPeerId:e.targetPeerId});let i={...e,url:n};const a=await yi({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 l2(e){if(!e.targetPeerId)throw new Error("请先连接这台服务,再查看可中转的服务。");const t=await Ko({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 d2(e,t){Bo(e.targetPeerId,t);const n=await Ko(e),r=n.client;try{Bo(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(fr(s));const i=(await yt()).find(u=>u.targetPeerId===s.serviceId),a=[e,...(i?.routes||[]).filter(u=>u.targetPeerId!==e.targetPeerId||$e(u.url)!==$e(e.url))];if(a.length>_r)throw new Error(`这台服务已保存 ${_r} 个备用连接,请先移除一个后重试。`);if(!s.authorized){if(!o.canManage)throw new Error("请先让入口管理员授权此设备。");await r.request({type:"route-grant",serviceId:s.serviceId,subjectId:(await Zt()).peerId})}hn.get(t)?.delete(e.targetPeerId);const d=(i?Dt({...i,targetPeerId:s.serviceId})[0]:void 0)||(s.url&&$e(s.url)!==$e(e.url)?s.url:void 0);return{url:d||e.url,...d?{serviceOrigin:d}:{entryServiceId:e.targetPeerId},targetPeerId:s.serviceId,serviceName:i?.label||Pw(s),routes:a}}finally{n.release()}}async function Il(e,t){Bo(e.targetPeerId,t);const n=await Ko(e),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await Zt()).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 tm(e,t,n){if(Bo(t.targetPeerId,e.targetPeerId),n!==void 0&&(await Ef($e(t.url),n)).targetPeerId!==t.targetPeerId)throw new Error("入口服务的身份已改变,请重新连接并确认。");const r=await Ko(t),o=r.client;try{await o.request({type:"route-grant",serviceId:e.targetPeerId,subjectId:(await Zt()).peerId,url:$e(e.serviceOrigin||e.url)}),hn.get(e.targetPeerId)?.delete(t.targetPeerId)}finally{r.release()}}async function u2(e,t){const n=await Ko(t),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await Zt()).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 ex(e,t){Bo(t.targetPeerId,e.targetPeerId);const n=await Ko(t),r=n.client;try{const o=await r.request({type:"route-invite-create",serviceId:e.targetPeerId});if(typeof o.routeCode!="string"||typeof o.expiresAt!="number")throw new Error("暂时无法生成备用连接邀请。");return{routeCode:o.routeCode,expiresAt:o.expiresAt}}finally{n.release()}}async function ua(e,t){const n=(await yt()).find(o=>o.id===e.id||e.targetPeerId&&o.targetPeerId===e.targetPeerId)||e;await On({...n,url:n.serviceOrigin||n.url,entryServiceId:void 0,routes:t});const r=se();r&&r.targetPeerId===e.targetPeerId&&Au({...r,url:r.serviceOrigin||r.url,entryServiceId:void 0,routes:t})}async function f2(e,t){const n=e.targetPeerId;if(!n)throw new Error("请先连接这台服务,再添加备用地址。");let r;try{r=$e(t)}catch{throw new Error("请输入有效的 HTTPS 地址,例如 https://电脑地址:9834。")}const o=async()=>(await yt()).find(a=>a.targetPeerId===n)||e,s=a=>{const c=a.routes??Xt({...a,targetPeerId:n});if($e(a.serviceOrigin||a.url)===r||c.some(d=>$e(d.url)===r))throw new Error("这个地址已经在连接列表中。");if(c.length>=_r)throw new Error(`最多保存 ${_r} 个备用地址或入口,请先移除不再使用的连接。`);return[...c,{url:r,targetPeerId:n}]};s(await o());let i;try{try{i=await jr({url:Fr(r),targetPeerId:n,identity:await Zt(),signal:AbortSignal.timeout(5e3)}),await qr(i)}catch(d){throw d instanceof Lt?new Error("这台服务尚未授权当前设备,请先恢复设备授权。"):new Error("无法验证这个地址。请确认能访问该地址、HTTPS 证书受信任,且运行的是同一台 Termdock 服务。")}const a=await o(),c=s(a);if(await ua(a,c),se()?.targetPeerId===n&&mo===n&&(!Ae||Ae.closed)){const d=Ae,u=Tt;Ae=i,i=void 0,Tt=void 0,Br="direct",d?.close(),u?.close(),window.dispatchEvent(new Event(vt))}return c}finally{i?.close()}}async function nm(e,t){await Za(e,t),await Kt({...e,pairingCode:void 0,routeCode:void 0})}const xn=new Map,nr=new Map,h2=32*1024*1024,p2=8*1024*1024,m2=48;let Es=0,Vd=0;function kf(){Vd+=1,xn.clear(),Es=0;for(const e of nr.values())e.controller.abort();nr.clear()}typeof window<"u"&&window.addEventListener("auth:unauthorized",kf);function g2(e,t){const n=xn.get(e);if(n&&(Es-=n.blob.size,xn.delete(e)),!(t.blob.size>p2))for(xn.set(e,t),Es+=t.blob.size;xn.size>m2||Es>h2;){const r=xn.keys().next().value;Es-=xn.get(r).blob.size,xn.delete(r)}}async function tx(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=nr.get(r);if(!o){const i=new AbortController,a=Vd,c=xn.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},Vd===a&&!i.signal.aborted&&g.status===200&&g.headers.has("ETag")&&g2(r,g),p.status===401&&kf(),g})().finally(()=>{clearTimeout(f),nr.get(r)===h&&nr.delete(r)}),o=h,nr.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&&nr.get(r)===s&&(nr.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 If="auth:unauthorized";let po=null;class He extends Error{constructor(t,n,r){super(t),this.status=n,this.code=r,this.name="TerminalApiError"}status;code}class Ur extends Error{code="TERMINAL_INPUT_REJECTED";constructor(t){super(t),this.name="TerminalInputError"}}async function nx(){const e=await fetch("/api/terminal/update");if(!e.ok)throw new He("Failed to load update state",e.status);return e.json()}async function y2(){const e=await xe(),t=await fetch("/api/terminal/update/check",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new He("Failed to check for updates",t.status);return t.json()}async function w2(e,t){if(e&&!e())throw new He("Update confirmation expired");const n=await xe();if(e&&!e())throw new He("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 He("Update confirmation expired");if(o.code==="UPDATE_STATE_CHANGED"&&o.state){if(o.state.status==="error")throw new He(o.state.error||o.error,r.status);return o.state}if(!o.code){const s=await nx().catch(()=>null);if(e&&!e())throw new He("Update confirmation expired");if(s&&s.status!=="error"&&(s.status!=="ready"||t!==void 0&&s.latestVersion!==t))return s}}throw new He(o.error||"Failed to restart Termdock",r.status)}return r.json()}async function b2(){const e=await xe(),t=await fetch("/api/terminal/server-health/enable-supervision",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new He("Failed to enable automatic recovery",t.status)}async function v2(){const e=await fetch("/api/terminal/server-health");if(!e.ok)throw new He("Failed to load server health",e.status);return e.json()}async function x2(){const e=await xe(),t=await fetch("/api/terminal/server-health/dismiss",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new He("Failed to dismiss server health",t.status);return t.json()}async function S2(){const e=await fetch("/api/terminal/quota");if(!e.ok)throw new He("Failed to fetch quota",e.status);return e.json()}async function E2(){const e=await xe(),t=await fetch("/api/terminal/quota/refresh",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new He("Failed to refresh quota",t.status);return t.json()}const Kr=8e3,rx=6e4,k2=32e3,ox=125e3,_n=1e4,I2=65e3,Ro=45e3,C2=18e4,sx=8e3,ix=8e3,ax=15e3,R2=1e4,Fo=5e3;let T2=0;const fa=[];let Cl=!1;function vn(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:++T2,ts:Date.now(),...t}});fa.push(n),A2()}async function A2(){if(!Cl){Cl=!0;try{for(;fa.length>0;){const e=fa[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),fa.shift()}catch{break}}}finally{Cl=!1}}}function Cf(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 st(e,t,n,r){const{signal:o,cleanup:s}=Cf(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 cx(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 Uo(e,t,n){const r=await cx(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){po=null,bi();try{window.dispatchEvent(new CustomEvent(If))}catch{}}return n}}async function xe(){if(po)return po;const e=await st("/api/csrf-token",void 0,sx,"CSRF token request timed out");if(!e.ok)throw new Error("Failed to get CSRF token");const t=await Uo(e,Fo,"CSRF token response timed out");if(!t.csrfToken)throw new Error("Invalid CSRF token response");return po=t.csrfToken,po}function Rf(){bi(),po=null}const P2=2e4,rm=8e3,lx=1500,dx=lx,ot=new Map,Tf=new Map;function N2(e){return zS(ot.get(e)?.ws)}const _2=24,L2=40,D2=40,O2=1024*1024,j2=1024*1024,M2=2*1024*1024,B2=36,ux=50,F2=1e3,U2=20,fx=new TextEncoder;function hx(e){return e.items.length-e.head}function om(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 H2(e){const t=JSON.stringify({id:"0".repeat(B2),type:"ws-data",data:e});return fx.encode(t).byteLength<=M2}function $2(e){return typeof e=="object"&&e!==null&&e.code==="PACKET_QUEUE_BACKPRESSURE"}function Rl(e,t){const n=t instanceof Ur?t:new Ur(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 z2(e){const t=hx(e.pendingInputs);return e.retryState.retryCount>=2||t>=D2?"congested":e.retryState.retryCount>=1||t>=8?"degraded":"good"}function sm(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++,om(t);continue}if(n.requiresCopyModeExit&&e.copyModeInput!==!0)return e.copyModeInput===void 0?void 0:Rl(e,new Ur("The reconnected server cannot safely resume this input; please type it again"));try{e.ws.send(n.message)}catch(r){if(!$2(r))return Rl(e,r instanceof Error?r:new Error(String(r)));if(e.inputRetryAttempts++,e.inputRetryAttempts>=U2)return Rl(e,new Ur("Terminal input was not accepted after repeated encrypted-channel backpressure"));const o=e.inputRetryDelayMs;e.inputRetryDelayMs=Math.min(F2,o*2),!e.inputFlushTimer&&!e.retryState.isClosed&&(e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,Qa(e)},o));return}t.bytes-=n.bytes,t.items[t.head]=void 0,t.head++,om(t),e.inputRetryDelayMs=ux,e.inputRetryAttempts=0}}function Qa(e){if(e.ws.readyState!==WebSocket.OPEN||e.inputFlushTimer)return;const t=z2(e);if(t==="good")return sm(e);const n=t==="congested"?L2:_2;e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,sm(e)},n)}const Bs=new Map;function q2(e,t,n,r,o,s){const i=Bs.get(e);!i||i.connection!==s||(Bs.delete(e),t?i.resolve({success:!0,layout:n,selection:o}):i.reject(new Error(r||"Tmux action failed")))}const fo=new Map;function K2(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:Tf.get(e)===!1?"0":"1"});t>0&&i.set("since",String(t)),n&&i.set("epoch",n);const a=r===void 0?fo.get(e):r;return a&&(i.set("cols",String(a.cols)),i.set("rows",String(a.rows))),`${s}?${i}`}const Yd=new Map,Xd=new Map;function G2(e,t,n){Yd.set(e,t),Xd.set(e,n)}function W2(e){const t=ot.get(e);return t?.streamEpoch&&t.appliedSeq===t.lastSeq&&t.lastSeq>0?{seq:t.lastSeq,epoch:t.streamEpoch}:null}async function V2(e){const t=await xe(),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 Y2(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=Yd.get(e)??0,f=Xd.get(e);Xd.delete(e),Yd.delete(e);const h={items:[],head:0,bytes:0};let p=!1,g=null;const m=new WeakSet,w=()=>{c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null),c.connectionTimeoutId&&(clearTimeout(c.connectionTimeoutId),c.connectionTimeoutId=null),g&&(clearTimeout(g),g=null)},y=E=>{E.wakeProbe&&(clearTimeout(E.wakeProbe.timer),E.wakeProbe=void 0),E.heartbeatTimer&&(clearInterval(E.heartbeatTimer),E.heartbeatTimer=null),E.pongTimer&&(clearTimeout(E.pongTimer),E.pongTimer=null),E.inputFlushTimer&&(clearTimeout(E.inputFlushTimer),E.inputFlushTimer=null)},S=E=>{y(E),E.heartbeatTimer=setInterval(()=>{if(E.ws.readyState===WebSocket.OPEN){try{E.ws.send(JSON.stringify({type:"ping"}))}catch{}E.pongTimer&&clearTimeout(E.pongTimer),E.pongTimer=setTimeout(()=>{if(Date.now()-E.lastInboundAt>=rm){p=!0,y(E);try{E.ws.close()}catch{}A(new Error("WebSocket heartbeat timeout"),!1)}},rm)}},P2)},v=()=>{if(c.isClosed=!0,w(),h.items.length=0,h.head=0,h.bytes=0,d){y(d),ot.delete(e);try{d.ws.close()}catch{}d=null}},C=()=>{if(c.isClosed)return;if(d){m.add(d.ws),y(d);try{d.ws.close()}catch{}}const E=K2(e,u,f,r.getDimensions?.()),x=Qv(E);p=!1,c.connectionTimeoutId=setTimeout(()=>{x.readyState!==WebSocket.OPEN&&(p=!0,x.close(),A(new Error("WebSocket connection timeout"),!1))},a);const I={ws:x,onEvent:t,onError:n,disconnect:v,reconnectNow:k=>{if(!c.isClosed&&(c.isSuspended=!1,!g)){if(w(),d){m.add(d.ws),y(d);try{d.ws.close()}catch{}}k?.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,C()},0)}},suspendReconnect:()=>{c.isClosed||(c.isSuspended=!0,c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null))},retryState:c,lastSeq:u,pendingInputs:h,inputRetryDelayMs:ux,inputRetryAttempts:0,inputFlushTimer:null,heartbeatTimer:null,pongTimer:null,lastInboundAt:Date.now(),inboundSequence:0};x.onopen=()=>{c.isClosed||m.has(x)||p||(w(),c.retryCount=0,I.lastInboundAt=Date.now(),I.inboundSequence+=1,S(I),Qa(I))},x.onmessage=k=>{if(!(c.isClosed||m.has(x)||p)){I.lastInboundAt=Date.now(),I.inboundSequence+=1;try{const T=JSON.parse(k.data);if(I.wakeProbe&&ot.get(e)===I){const R=I.wakeProbe;I.wakeProbe=void 0,clearTimeout(R.timer);for(const P of R.listeners)P()}if(T.type==="pong"){$S(x,T.qualityProbeId,T.handlerMs),I.pongTimer&&(clearTimeout(I.pongTimer),I.pongTimer=null);return}if(T.type==="tmux-result"&&T.reqId){q2(T.reqId,T.success!==!1,T.layout,T.error,T.selection,x);return}if(T.type==="tmux-layout"&&T.layout){t({type:"tmux-layout",layout:T.layout});return}if(T.type==="tmux-screen-sync"&&Array.isArray(T.chunks)){t({type:"tmux-screen-sync",chunks:T.chunks.filter(R=>typeof R=="string"),cols:typeof T.cols=="number"?T.cols:void 0,rows:typeof T.rows=="number"?T.rows:void 0,generation:typeof T.generation=="number"?T.generation:void 0});return}if(T.type==="active-program"){t({type:"active-program",activeProgram:T.activeProgram,activeProgramRaw:T.activeProgramRaw,activeProgramSource:T.activeProgramSource});return}if(T.type==="cwd"){t({type:"cwd",cwd:T.cwd});return}if(T.type==="agent-status"){t({type:"agent-status",agentStatus:T.agentStatus??null,agentIndicator:T.agentIndicator??null,agentStatusDetail:T.agentStatusDetail??null,agent:T.agent??null,agentMessage:T.agentMessage??null,agentNativeSessionId:T.agentNativeSessionId??null,agentResumeRecovered:T.agentResumeRecovered===!0,agentRich:T.agentRich===!0,agentActivity:typeof T.agentActivity=="number"?T.agentActivity:0,agentCwd:T.agentCwd??null,reviewed:typeof T.reviewed=="boolean"?T.reviewed:null});return}if(T.type==="git-status"){t({type:"git-status",gitStatus:T.gitStatus??null});return}if(T.type==="quota-status"&&Array.isArray(T.providers)){window.dispatchEvent(new CustomEvent("termdock:quota-update",{detail:T.providers}));return}if(T.type==="focus-mode"){t({type:"focus-mode",focusTrackingRequested:T.focusTrackingRequested===!0});return}if(T.type==="resize-ack"){t({type:"resize-ack",seq:typeof T.seq=="number"?T.seq:void 0,cols:typeof T.cols=="number"?T.cols:void 0,rows:typeof T.rows=="number"?T.rows:void 0,ok:T.ok!==!1,error:typeof T.error=="string"?T.error:void 0,screenSyncPending:T.screenSyncPending===!0,screenSyncGeneration:typeof T.screenSyncGeneration=="number"?T.screenSyncGeneration:void 0});return}if(T.type==="pty-size"){t({type:"pty-size",cols:typeof T.cols=="number"?T.cols:void 0,rows:typeof T.rows=="number"?T.rows:void 0,source:typeof T.source=="string"?T.source:void 0});return}if(T.type==="shell-title"){t({type:"shell-title",title:typeof T.title=="string"?T.title:""});return}if(T.type==="prompt-state"){t({type:"prompt-state",state:T.state==="running"?"running":"idle",exitCode:typeof T.exitCode=="number"?T.exitCode:void 0});return}const _=T;if(_.type==="connected"){if(I.appliedSeq=void 0,f=_.streamEpoch,I.streamEpoch=f,I.outputProtocol=_.outputProtocol,I.copyModeInput=_.copyModeInput===!0,Qa(I))return;typeof _.replayLastSeq=="number"&&_.replayLastSeq>=0&&(u=_.replayLastSeq,I.lastSeq=u),t(_),mx(e,Tf.get(e)??!0);return}if(_.type==="exit"){v(),t(_);return}if(_.type==="data"){if(I.appliedSeq=void 0,typeof _.seq=="number"&&_.seq<=u)return;typeof _.flowSeq=="number"&&(I.flowSeq=_.flowSeq)}t(_),_.type==="data"&&typeof _.seq=="number"&&Number.isFinite(_.seq)&&_.seq>u&&(u=_.seq,I.lastSeq=u)}catch(T){n?.(T,!1)}}},x.onerror=()=>{c.isClosed||m.has(x)||p||(w(),y(I),p||(p=!0,A(new Error("WebSocket connection error"),!1)))},x.onclose=k=>{if(!(c.isClosed||m.has(x)||p)){if(k.code===Ud&&k.reason===Hd){I.reconnectNow({silent:!0});return}if(w(),y(I),p=!0,k.code===4001){console.warn("[Terminal] WS 4001: Session not found on server",{code:k.code,reason:k.reason,stack:new Error().stack}),A(new Error("Session not found on server"),!0);return}if(k.code===4003||k.code===4401){try{window.dispatchEvent(new CustomEvent(If))}catch{}A(new Error("Authentication required"),!0);return}A(new Error("WebSocket connection closed"),!1)}},d=I,ot.set(e,d)},A=(E,x)=>{if(!c.isClosed)if(x)n?.(E,!0),v();else{c.retryCount=Math.min(c.retryCount+1,Math.max(1,o));const I=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||C()},I)}};return C(),v}function px(e,t,n=!1){const r=JSON.stringify({type:"input",data:t,...n?{exitCopyMode:!0}:{}}),o=fx.encode(r).byteLength;if(o>O2||!H2(r))throw new Ur("Terminal input exceeds the encrypted socket frame limit");const s=e.pendingInputs;if(s.bytes+o>j2)throw new Ur("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=Qa(e);if(i)throw i}}function X2(e,t){const n=ot.get(e);return!n||n.ws.readyState!==WebSocket.OPEN||n.copyModeInput!==!0?!1:(px(n,t,!0),!0)}async function J2(e,t,n){const r=await xe(),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 He(s.error||"Could not prepare the original conversation for recovery",o.status,s.code)}}async function Z2(e,t){const n=ot.get(e);if(n&&(n.ws.readyState===WebSocket.OPEN||n.ws.readyState===WebSocket.CONNECTING)){px(n,t);return}const r=await xe(),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 He(s.error||"Failed to send terminal input",o.status,s.code)}}function Q2(e,t,n={}){const r=ot.get(e);if(!r)return!1;if(r.retryState.isSuspended=!1,r.ws.readyState!==WebSocket.OPEN)return r.reconnectNow(),!0;const o=n.visible?dx:lx,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(()=>{ot.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 eP(e){const t=ot.get(e);return t?(t.reconnectNow(),!0):!1}function tP(){for(const e of ot.values())e.suspendReconnect()}function nP(e,t,n){const r=ot.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"focus",focused:t,reason:n}))}catch{}}function mx(e,t){Tf.set(e,t);const n=ot.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 rP(e){const t=ot.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=ot.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"viewing",viewing:t,reason:n}))}catch{}}function gx(e){const t=ot.get(e);if(!(!t||t.ws.readyState!==WebSocket.OPEN))try{t.ws.send(JSON.stringify({type:"agent-review-ack"}))}catch{}}function sP(e,t,n){const r=ot.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 iP(e,t,n,r){Number.isFinite(t)&&Number.isFinite(n)&&t>=1&&n>=1&&(fo.delete(e),fo.set(e,{cols:Math.floor(t),rows:Math.floor(n)}),fo.size>256&&fo.delete(fo.keys().next().value));const o=ot.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 xe(),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 yx(e,t){const n=ot.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);Bs.set(a,{resolve:s,reject:i,connection:n.ws}),n.ws.send(JSON.stringify({type:"tmux",reqId:a,...t})),setTimeout(()=>{Bs.has(a)&&(Bs.delete(a),i(new Error("Tmux action timed out")))},3e4)});const r=await xe(),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 He(s.error||"Failed to execute tmux action",o.status,s.code)}return o.json()}async function aP(e){const t=await xe(),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")}ot.get(e)?.disconnect()}async function cP(e,t){const n=ot.get(e);if(n){n.retryState.isClosed=!0;try{n.ws.close()}catch{}ot.delete(e)}const r=await xe(),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 lP(e){const t=await st(`/api/terminal/${e}/health`,{method:"GET"},ix,"Terminal health check timed out");if(!t.ok){if(t.status===404)return{healthy:!1,sessionId:e};const n=await Uo(t,Fo,"Terminal health error response timed out").catch(()=>({error:"Failed to check terminal health"}));throw new Error(n.error||"Failed to check terminal health")}return Uo(t,Fo,"Terminal health response timed out")}async function dP(e){const t=await xe(),n=await st("/api/terminal/force-kill",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},R2,"Terminal force-kill request timed out");if(!n.ok){const r=await Uo(n,Fo,"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 uP(){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 fP(){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 hP(e){const t=e.trim();if(!t)throw new Error("tmux session name is required");const n=await xe(),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 pP(e){const t=await xe(),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 He(o.error||"Failed to restore tmux Agent sessions",r.status);return o}async function mP(e,t){const n=await xe(),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 He("Failed to update recovery operation",r.status)}async function gP(e){const t=await xe(),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 He("Failed to dismiss tmux recovery",n.status)}const Xi=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 wP(){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 bP(e){const t=yP(e),n=Xi.get(t);if(n)return n;const r=await xe(),o=st("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(e)},ax,"Terminal session open request timed out").then(async s=>{if(!s.ok){const i=await Uo(s,Fo,"Terminal session open error response timed out").catch(()=>({error:"Failed to open session"}));throw new He(i.error||"Failed to open session",s.status,typeof i.code=="string"?i.code:void 0)}return Uo(s,Fo,"Terminal session open response timed out")}).finally(()=>{Xi.get(t)===o&&Xi.delete(t)});return Xi.set(t,o),o}async function vP(e,t){const n=await xe(),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 xP(e){const t=await xe(),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 SP(e){const t=await xe(),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 EP(){const e=await xe(),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 kP(){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 IP(e){const t=await xe(),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 cs=null,ks=null;const wx=1500;function rr(){return ks&&Date.now()-ks.readAt<wx?Promise.resolve(ks.value):cs||(cs=(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 ks={value:t,readAt:Date.now()},t})().finally(()=>{cs=null}),cs)}async function $t(e){const t=await xe(),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 ks={value:r,readAt:Date.now()},r}async function CP(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 ls=null,Is=null;function RP(){return Is&&Date.now()-Is.readAt<wx?Promise.resolve(Is.value):ls||(ls=(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 Is={value:t,readAt:Date.now()},t})().finally(()=>{ls=null}),ls)}async function TP(e,t){const n=await xe(),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 Is={value:o,readAt:Date.now()},o}async function bx(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=Un(r);return{ok:!1,reason:Xp(o.code),error:o.message}}if(t.ok)return Rf(),{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:Xp(n?.code)||(t.status===401?"invalidPassword":"unavailable"),error:n?.error||"Login failed"}}async function AP(){kf(),Tw();const e=await xe();await fetch("/api/auth/logout",{method:"POST",headers:{"X-XSRF-TOKEN":e}}),Rf()}async function PP(){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 NP(){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 _P(e){const t=await xe(),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 LP(e){const t=await xe(),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 Af extends Error{constructor(t,n,r){super(t),this.code=n,this.migration=r,this.name="AgentPluginManifestError"}code;migration}async function DP(){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 OP(e){const t=await xe(),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 Af(r.error||"Failed to create agent plugin",r.code,r.migration);return r}async function jP(e){const t=await xe(),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 Af(r.error||"Failed to install agent plugin",r.code,r.migration);return r}async function MP(e){const t=await xe(),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 BP(e){const t=await xe(),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 FP(e){const t=await xe(),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 UP(e){const t=await xe(),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 HP(e){const t=await xe(),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 He(r.error||"Failed to resume agent session",n.status,typeof r.code=="string"?r.code:void 0);return{command:r.command??""}}async function $P(){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 zP(e){const t=await xe(),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 He(r.error||"Failed to prepare Agent session resume",n.status,typeof r.code=="string"?r.code:void 0);return r}async function qP(e){const t=await xe(),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 KP(e){const t=await xe(),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 GP(){const e=await xe(),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 WP(){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 VP(e){const t=await xe(),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 YP(){const e=await xe(),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 XP={".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 Oc(e){const t=e.lastIndexOf(".");return t<0?null:XP[e.slice(t).toLowerCase()]??null}function JP(e){return Oc(e)!==null}function vx(e){const t=Oc(e);return t==="image/heic"||t==="image/heif"}const ZP={".mp4":"video/mp4",".m4v":"video/x-m4v",".webm":"video/webm",".mov":"video/quicktime",".ogv":"video/ogg",".mpeg":"video/mpeg",".mpg":"video/mpeg"};function xx(e){const t=e.lastIndexOf(".");return t<0?null:ZP[e.slice(t).toLowerCase()]??null}function Sx(e){return xx(e)!==null}function QP(e){return`/api/terminal/fs/video?path=${encodeURIComponent(e)}&action=view_file`}const Ex=[".stl",".glb",".gltf"];function Pf(e){const t=e.lastIndexOf(".");if(t<0)return null;const n=e.slice(t).toLowerCase();return Ex.includes(n)?n:null}function kx(e){return Pf(e)!==null}function Nf(e){const t=e.toLowerCase();return t.endsWith(".kicad_sch")?".kicad_sch":t.endsWith(".kicad_pcb")?".kicad_pcb":null}function eN(e){return Nf(e)!==null}function tN(e){return Nf(e)===".kicad_pcb"?"pcb-front":"schematic"}const Ix=[".html",".htm"];function nN(e){const t=e.lastIndexOf(".");if(t<0)return!1;const n=e.slice(t).toLowerCase();return Ix.includes(n)}function rN(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 Cx(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 st(`/api/terminal/fs/list?${a}`,{signal:t},Kr,"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 Rx(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 w=h.indexOf(`
|
|
3
|
+
`);for(;w>=0;)p(h.slice(0,w)),h=h.slice(w+1),w=h.indexOf(`
|
|
4
|
+
`)}h+=f.decode(),p(h)}async function sN(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 _f(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 iN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await tx(`/api/terminal/fs/read?${o}`,{signal:t,timeoutMs:Kr});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 aN(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 st(`/api/terminal/fs/git-blob?${s}`,{signal:r},Kr,"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 cN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await tx(`/api/terminal/fs/blob?${o}`,{signal:t,timeoutMs:vx(e)?k2:Kr});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||Oc(e)||"application/octet-stream"}}function Lf(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 lN(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=Cf(n,ox,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:Lf(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 dN(e,t,n,r,o){const s=new URLSearchParams({path:e,view:t,x:String(n),y:String(r)}),i=await st(`/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 uN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const i=Cf(t,rx,"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=Pf(e)??"";return{blob:c,path:Lf(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 im(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}async function Tx(e,t){if(t?.aborted)return"canceled";const n=lt()?.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=_x(o.headers?.get?.("Content-Disposition")||"")??e.split("/").pop()?.split("\\").pop()??"download",i=ut()?.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||lt()?.targetPeerId!==n)return"canceled";const u=await i(o.body,s,{signal:t,expectedBytes:Number.isSafeInteger(d)?d:void 0});return t?.aborted||lt()?.targetPeerId!==n?"canceled":u}const a=await o.blob();return t?.aborted||lt()?.targetPeerId!==n?"canceled":await Ax(a,s,t)}catch(o){if(t?.aborted)return"canceled";throw o}}async function Ax(e,t,n){if(n?.aborted)return"canceled";const r=ut()?.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(im()){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(im()){if(n?.aborted)return"canceled";const a=await rE(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 Px(e,t){if(t&&!t())throw new Error("File deletion context changed");const n=await xe();if(t&&!t())throw new Error("File deletion context changed");const r=new URLSearchParams({path:e,confirm:"true"}),o=await st(`/api/terminal/fs/file?${r}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":n}},Kr,"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 Jd extends Error{constructor(t,n,r){super(t),this.result=n,this.code=r,this.name="UploadFilesError"}result;code}const Zd=50;async function wi(e,t,n,r,o,s){if(t.length>Zd)throw new Jd(`Choose up to ${Zd} files per upload. None were uploaded.`,{files:[],results:t.map((m,w)=>({index:w,name:m.name,status:"rejected",code:"UPLOAD_LIMIT"}))},"UPLOAD_LIMIT");const i=lt(),a=()=>{if(n?.aborted)throw n.reason??new DOMException("Upload cancelled","AbortError");if(lt()!==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 xe();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 st(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 Jd(m.error||"Upload failed",m,m.code)}const g=await p.json();return a(),r?.(100),g}function Nx(e,t,n,r,o){return wi("",t,n,r,o,e)}async function fN(e){const t=await st("/api/terminal/fs/local-open-availability",{signal:e},Kr,"Local file browser availability check timed out");return t.ok?t.json():{available:!1}}async function hN(e){const t=await xe(),n=await st("/api/terminal/fs/open-in-file-browser",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({path:e})},Kr,"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 _x(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 pN(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 mN(e,t,n,r,o=e?"view_diff":"view_all_changes",s,i,a,c){const d=lt()?.targetPeerId;for(let u=0;;u++){r?.throwIfAborted();const f=Fe();try{return await gN(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||lt()?.targetPeerId!==d)throw h;vn("connection_retry",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,message:p})}}}async function gN(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),pN(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();vn("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?Ro:_n});const h=await st(`/api/terminal/fs/diff?${d}`,{signal:r},u?Ro:_n,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 vn("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(vn("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 vn("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")}vn("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 cx(h,u?Ro:_n,u?"Git diff response body is still loading for this file.":"Git diff response body took too long.")}catch(m){throw vn("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 vn("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 vn("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 st(`/api/terminal/fs/git-context${s?`?${s}`:""}`,{signal:t},_n,"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 wN(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 st(`/api/terminal/fs/change-audit${r?`?${r}`:""}`,{signal:t},_n,"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 bN(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 st(`/api/terminal/fs/branch-diff?${n}`,{signal:t},e.filePath&&e.comparisonBase?Ro:C2,"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 vN(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 st(`/api/terminal/fs/commit-diff?${n}`,{signal:t},Ro,"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 xN(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 st(`/api/terminal/fs/git-recent-commits?${n}`,{signal:t},I2,"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 SN(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 st(`/api/terminal/fs/branch-audit${r?`?${r}`:""}`,{signal:t},_n,"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 EN(e={}){const t=await xe(),n=await st("/api/terminal/fs/change-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},_n,"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 kN(e={}){const t=await xe(),n=await st("/api/terminal/fs/branch-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},_n,"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 IN(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 st(`/api/terminal/fs/untracked-files${o?`?${o}`:""}`,{signal:t},Ro,"Untracked file scan took too long. The repository may be busy, on slow storage, or locked by another Git process.")).json()}async function CN(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 st(s,{signal:t},n.requestTimeoutMs??_n,"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 RN(e){const t=await xe(),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 TN(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 AN(e){const t=await xe(),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 qe(e,t){const n=t?.method?.toUpperCase()??"GET",r=new Headers(t?.headers);n!=="GET"&&n!=="HEAD"&&r.set("X-XSRF-TOKEN",await xe()),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 He(i.error||"操作失败",s.status)}return s.status===204?void 0:await s.json()};return n==="GET"||n==="HEAD"?ZA(o,t?.signal):o()}function PN(e,t){return qe(`/collaboration-tasks${e?`?group=${encodeURIComponent(e)}`:""}`,t?{signal:t}:void 0)}function NN(e){return qe(`/collaboration-tasks/${encodeURIComponent(e)}`)}function _N(e){return qe("/collaboration-tasks",{method:"POST",body:JSON.stringify({input:e})})}function LN(e,t){return qe(`/collaboration-tasks/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({input:t})})}function DN(){return qe("/automations")}function ON(e){return qe("/automations",{method:"POST",body:JSON.stringify(e)})}function jN(e){return qe(`/automations/${encodeURIComponent(e)}/run`,{method:"POST"})}function MN(e,t){return qe(`/automations/${encodeURIComponent(e)}/enabled`,{method:"POST",body:JSON.stringify({enabled:t})})}function BN(e){return qe(`/automations/${encodeURIComponent(e)}`,{method:"DELETE"})}let or=null,am="";const Qd=new Set;typeof window<"u"&&bc(()=>or?.refreshPeers(!0));function Df(){return qe("/collaboration-groups",{signal:AbortSignal.timeout(1e4)})}function an(){const e=lt(),t=e?.serviceOrigin??window.location?.origin??"",n=`${e?.targetPeerId??""}:${t}`;return(!or||n!==am)&&(or?.dispose(),am=n,or=new XS({origin:t,readLocal:Df,readPeers:async()=>{const r=await qe("/collaboration-directory",{signal:AbortSignal.timeout(1e4)});let o;const s=await Promise.race([yt().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=KS({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"}),or.subscribe(r=>{for(const o of Qd)o(r)})),or}function bi(){or?.dispose(),or=null}function FN(e){return Qd.add(e),()=>{Qd.delete(e)}}function UN(){window.dispatchEvent(new Event("termdock:collaboration-enroll")),an().refreshPeers(!0)}async function HN(e){await qe(`/collaboration-connections/${encodeURIComponent(e)}`,{method:"DELETE"}),bi(),await Of()}async function $N(e){await qe(`/collaboration-connections/${encodeURIComponent(e)}/restore`,{method:"POST"}),bi(),await Of()}function zN(e,t){return qe(`/collaboration-groups/${encodeURIComponent(e)}/rules`,{method:"POST",body:JSON.stringify(t)})}function Of(){return an().load()}async function qN(e,t){const n=await qe(`/collaboration-groups/${encodeURIComponent(e.id)}/${t?"archive":"unarchive"}`,{method:"POST",body:JSON.stringify({expectedUpdatedAt:e.updatedAt,idempotencyKey:crypto.randomUUID()})});return an().invalidate(),n.group}async function KN(e){const t=await Df(),n=e.id?t.groups.find(c=>c.id===e.id):void 0;if(e.id&&!n)throw new He("协作组已删除,请刷新列表",404);if(n&&e.expectedUpdatedAt!==void 0&&e.expectedUpdatedAt!==n.updatedAt)throw new He("协作组已被修改,请重新打开成员管理后再保存",409);const r=[...new Set(e.sessionIds)];if(!e.name.trim())throw new He("请填写协作组名称",400);const o=new Set([...t.sessions.map(c=>c.sessionId),...n?.sessionIds??[]]);if(r.filter(c=>!o.has(c)).some(c=>!xs(c)))throw new He("所选会话已变化,请刷新后重新选择;尚未保存任何修改",409);const i={...e,sessionIds:r,...n?{expectedUpdatedAt:e.expectedUpdatedAt??n.updatedAt}:{}},a=await qe("/collaboration-groups",{method:"POST",body:JSON.stringify(i)});return an().invalidate(),a}async function GN(e){if((await Df()).capabilities?.groupMove!==1)throw new He("当前服务需要升级后才能在协作组之间移动成员;原成员关系未修改",409);await qe("/collaboration-groups/move-member",{method:"POST",body:JSON.stringify(e)}),an().invalidate()}function WN(e,t){return qe(`/collaboration-groups/${encodeURIComponent(e)}/spawn`,{method:"POST",body:JSON.stringify(t)}).then(n=>(an().invalidate(),n))}function VN(e,t,n){return qe(`/collaboration-groups/${encodeURIComponent(e)}/role`,{method:"POST",body:JSON.stringify({sessionId:t,role:n})}).then(r=>(an().invalidate(),r))}function YN(e,t){const n=t===void 0?"":`?expectedUpdatedAt=${encodeURIComponent(t)}`;return qe(`/collaboration-groups/${encodeURIComponent(e)}${n}`,{method:"DELETE"}).then(()=>{an().invalidate()})}function XN(e){return qe(`/collaboration-groups/${encodeURIComponent(e)}/messages`)}function JN(e,t){return qe(`/collaboration-groups/${encodeURIComponent(e)}/messages`,{method:"POST",body:JSON.stringify(t)})}function ZN(e,t=50,n){return qe(`/session-search?q=${encodeURIComponent(e)}&limit=${t}`,{signal:n})}function QN(e,t){return qe("/session-search/prepare",{method:"POST",body:JSON.stringify({nativeKey:e,terminalSessionId:t})})}let Sn=null;function e_(){const e=lt()?.targetPeerId??location.origin;if(Sn?.scope===e&&(Sn.pending||Date.now()-Sn.at<5e3))return Sn.result;const t={scope:e,at:Date.now(),pending:!0,result:qe("/execution-archives")};return Sn=t,t.result.then(()=>{t.pending=!1,t.at=Date.now()},()=>{Sn===t&&(Sn=null)}),t.result}async function t_(e){const t=await qe(`/execution-archives/${encodeURIComponent(e)}/archive`,{method:"POST"});return Sn=null,an().invalidate(),t}async function n_(e,t){const n=await qe(`/execution-archives/${encodeURIComponent(e)}/restore`,{method:"POST",body:JSON.stringify({mode:t})});return Sn=null,an().invalidate(),n}async function r_(e,t){const n=await qe(`/collaboration-groups/${encodeURIComponent(e)}/team`,{method:"POST",body:JSON.stringify(t)});return an().invalidate(),n}const o_=Object.freeze(Object.defineProperty({__proto__:null,AUTH_UNAUTHORIZED_EVENT:If,AgentPluginManifestError:Af,EDA_PREVIEW_REQUEST_TIMEOUT_MS:ox,HTML_EXTENSIONS:Ix,MAX_UPLOAD_FILES:Zd,MODEL_3D_EXTS:Ex,MODEL_PREVIEW_REQUEST_TIMEOUT_MS:rx,TERMINAL_CSRF_REQUEST_TIMEOUT_MS:sx,TERMINAL_HEALTH_REQUEST_TIMEOUT_MS:ix,TERMINAL_SESSION_OPEN_REQUEST_TIMEOUT_MS:ax,TerminalApiError:He,TerminalInputError:Ur,UploadFilesError:Jd,VISIBLE_WAKEUP_PROBE_TIMEOUT_MS:dx,acknowledgeTerminalOutput:rP,applyDiffHunk:AN,archiveExecutionSession:t_,buildHtmlPreviewUrl:rN,buildVideoPreviewUrl:QP,cancelIoSlot:_f,checkAgentPluginUpdate:MP,checkTermdockUpdate:y2,checkTerminalHealth:lP,clearBranchAuditRecords:kN,clearChangeAuditRecords:EN,clearSessionInventoryEntries:EP,closeTerminal:aP,confirmTermdockUpdateRestart:w2,connectTerminalStream:Y2,createAgentPlugin:OP,createCollaborationTask:_N,createTerminalSession:V2,deleteAgentPlugin:UP,deleteFile:Px,dismissServerHealthIncident:x2,dismissTmuxRecovery:gP,doctorAgentPlugin:FP,downloadFile:Tx,enableServerSupervision:b2,ensureCollaborationTeam:r_,fetchQuota:S2,forceKillTerminal:dP,getAgentHooks:NP,getAgentLaunchers:PP,getAgentPlugins:DP,getAppliedTerminalCursor:W2,getBranchAuditRecords:SN,getBranchDiff:bN,getChangeAuditRecords:wN,getCollaborationTask:NN,getCommitDiff:vN,getContextDraft:RP,getCsrfToken:xe,getDefaultEdaPreviewView:tN,getEdaExtForPath:Nf,getFileDiff:mN,getGitActionStatus:TN,getGitBlobContent:aN,getGitBundle:CN,getGitContext:yN,getImageMimeTypeForPath:Oc,getLocalFileBrowserAvailability:fN,getModel3dExtForPath:Pf,getProgramDetection:WP,getRecentCommits:xN,getServerHealth:v2,getSessionInventory:wP,getSettings:rr,getTermdockUpdateState:nx,getTerminalConnectionQuality:N2,getTitleNamerCatalog:CP,getTmuxStatus:fP,getToolbarPresetsDoc:kP,getUntrackedFiles:IN,getVideoMimeTypeForPath:xx,inspectEdaPoint:dN,installAgentHooks:_P,installAgentPluginSource:jP,isHeicImagePath:vx,isPreviewableEdaPath:eN,isPreviewableHtmlPath:nN,isPreviewableImagePath:JP,isPreviewableModel3dPath:kx,isPreviewableVideoPath:Sx,killTmuxSession:hP,launchRecoverableTerminalAgent:J2,listAgentAutomations:DN,listAgentResumeHistory:$P,listCollaborationGroups:Of,listCollaborationMessages:XN,listCollaborationTasks:PN,listDirectory:Cx,listExecutionArchives:e_,listTmuxSessions:uP,loginWithPassword:bx,logout:AP,moveCollaborationMember:GN,openInFileBrowser:hN,openSessionInventoryEntry:bP,operationsRequest:qe,parseFilenameFromContentDisposition:_x,prepareAgentResumeHistory:zP,prepareSearchSession:QN,probeTerminalConnection:Q2,readEdaPreviewBlob:lN,readFileContent:iN,readImagePreviewBlob:cN,readModel3dBlob:uN,readPreviewSourcePath:Lf,reconnectTerminalConnectionNow:eP,refreshQuota:E2,removeAgentAutomation:BN,removeAgentResumeHistory:qP,removeCollaborationConnection:HN,removeCollaborationGroup:YN,removeSessionInventoryEntry:SP,reorderSessionInventoryEntries:xP,replaceProgramDetection:VP,replaceProgramRules:KP,replaceToolbarPresetsDoc:IP,resetCollaborationDirectory:bi,resetCsrfTokenCache:Rf,resetProgramDetection:YP,resetProgramRules:GP,resizeTerminal:iP,restartTerminalSession:cP,restoreAllTmuxAgentSessions:pP,restoreCollaborationConnection:$N,restoreExecutionSession:n_,resumeAgentSession:HP,retryCollaborationPeers:UN,runAgentAutomation:jN,runGitAction:RN,saveAgentAutomation:ON,saveCollaborationGroup:KN,saveDownloadBlob:Ax,searchFilesStream:Rx,searchTerminalSessions:ZN,sendAgentReviewAck:gx,sendCollaborationMessage:JN,sendTerminalFlowControlState:sP,sendTerminalFocusState:nP,sendTerminalInput:Z2,sendTerminalViewingState:oP,sendTmuxAction:yx,setAgentAutomationEnabled:MN,setCollaborationGroupArchived:qN,setCollaborationGroupRules:zN,setCollaborationMemberRole:VN,setTerminalOutputSubscription:mx,setTerminalSnapshotCursor:G2,setTmuxRecoveryOperationPaused:mP,spawnCollaborationAgent:WN,subscribeCollaborationGroups:FN,suspendTerminalConnectionReconnects:tP,trySendInputExitingCopyMode:X2,uninstallAgentHooks:LP,updateAgentPlugin:BP,updateCollaborationTask:LN,updateContextDraft:TP,updateSessionInventoryEntry:vP,updateSettings:$t,uploadFiles:wi,uploadSessionAttachments:Nx,watchFileSystem:sN},Symbol.toStringTag,{value:"Module"})),eu="termdock:locale",ha={en:BS,zh:FS};function s_(e){return typeof e=="string"&&US.includes(e)}function i_(){if(typeof window>"u")return _o;try{const t=window.localStorage.getItem(eu);if(s_(t))return t}catch{}return(window.navigator?.language?.toLowerCase()??"").startsWith("zh")?"zh":_o}const Lx=b.createContext(null);function tu(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 nu(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 a_({children:e}){const[t,n]=b.useState(()=>i_()),r=Mt.useRef(!1);b.useEffect(()=>{typeof window>"u"||rr().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(eu,c.locale)}catch{}}}).catch(()=>{})},[]),b.useEffect(()=>{if(!(typeof window>"u")){try{window.localStorage.setItem(eu,t)}catch{}r.current&&(r.current=!1,$t({locale:t}).catch(()=>{})),document.documentElement.lang=t==="zh"?"zh-CN":"en"}},[t]);const o=b.useCallback(c=>{r.current=!0,n(c)},[]),s=ha[t]??ha[_o],i=b.useCallback((c,d)=>{const u=tu(s,c);if(u===void 0){const f=tu(ha[_o],c);return f===void 0?c:nu(f,d)}return nu(u,d)},[s]),a=b.useMemo(()=>({locale:t,setLocale:o,t:i}),[t,o,i]);return l.jsx(Lx.Provider,{value:a,children:e})}function At(){const e=b.useContext(Lx);return e||{locale:_o,setLocale:()=>{},t:(t,n)=>{const r=tu(ha[_o],t);return r===void 0?t:nu(r,n)}}}const c_=()=>document.getElementById("termdock-startup")?.hidden===!1;function l_(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 d_(){return b.useSyncExternalStore(l_,c_)}const pa=new Map;let Tl=0,ds;function ma(){const e=++Tl;requestAnimationFrame(()=>{if(e!==Tl)return;const t=document.getElementById("termdock-startup");if(!t)return;const n=[...pa].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!==Tl)return;t.hidden=!0;const r=t.querySelector("[data-startup-action]");r&&(r.onclick=null)})})}function u_(){return b.useLayoutEffect(()=>{ma()},[]),null}function jf({status:e="Loading Termdock",detail:t,actionLabel:n,onAction:r}){const o=yw(),{locale:s}=At();o!=="ready"&&(e=s==="zh"?o==="offline"?"网络已断开,等待恢复…":"正在恢复连接…":o==="offline"?"Offline. Waiting for network…":"Reconnecting…");const i=b.useRef(null);return b.useLayoutEffect(()=>{const a=i.current;if(pa.set(a,{status:e,detail:t,actionLabel:n,onAction:r}),!ds){ds=new MutationObserver(ma);const c=document.getElementById("root");c&&ds.observe(c,{attributes:!0,subtree:!0,attributeFilter:["style","aria-hidden","hidden"]})}return ma(),()=>{pa.delete(a),pa.size||(ds?.disconnect(),ds=void 0),ma()}},[e,t,n,r]),l.jsx("span",{ref:i,"data-startup-pending":"",style:{position:"absolute",width:0,height:0,pointerEvents:"none"}})}const ec=cr(()=>({items:[]}));function f_(e){const t=b.useId(),n=e?.message,r=e?.tone??"error",o=e?.actionLabel,s=e?.onAction,i=e?.duration??(r==="recovering"?0:r==="success"?4e3:8e3);b.useEffect(()=>{if(!n)return;let a;const c=()=>ec.setState(f=>({items:f.items.filter(h=>h.id!==t)})),d=()=>{ec.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 h_(){const{locale:e,t}=At(),n=yw(),r=d_(),o=e==="zh"?n==="offline"?"网络已断开,恢复后会自动连接":"正在恢复连接…":n==="offline"?"Offline. Reconnecting when the network returns.":"Reconnecting…";f_(n==="ready"?null:{tone:"recovering",message:o});const i=ec(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?Fy:a.tone==="success"?gy:py;return $n.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:()=>ec.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(ai,{size:14})})]})}),document.body)}function p_(){let e=!1,t=!1,n=!1,r;const o=new Map,s=new Set,i=new Map,a=async(h,p,g)=>{const m=JSON.stringify(g);if(o.get(p.serviceId)===m)return;const w=AbortSignal.timeout(1e4),y=await h.fetch("/api/csrf-token",{signal:w});if(!y.ok)throw new Error("CONNECTION_AUTHORIZATION_REQUIRED");const S=await y.json();if(typeof S.csrfToken!="string")throw new Error("INVALID_CSRF_TOKEN");const v=await h.fetch("/api/terminal/operations/collaboration-connections",{method:"POST",signal:w,headers:{"Content-Type":"application/json","X-XSRF-TOKEN":S.csrfToken},body:JSON.stringify({origin:p.origin,nodes:g})});if(!v.ok){const C=await v.json().catch(()=>({}));throw new Error(C.error||`HTTP_${v.status}`)}o.set(p.serviceId,m)},c=async()=>{if(e){n=!0;return}const h=se(),p=Fe();if(!(t||!h||!p||p.closed)){e=!0,n=!1;try{let g;const m=await Promise.race([yt(),new Promise((A,E)=>{g=setTimeout(()=>E(new Error("SERVICE_DIRECTORY_TIMEOUT")),8e3)})]).finally(()=>clearTimeout(g));m.some(A=>A.targetPeerId===h.targetPeerId)||m.push({...h,id:h.targetPeerId,label:h.serviceName||h.url});const w=[...new Map(m.filter(A=>!!A.targetPeerId).map(A=>[A.targetPeerId,A])).values()].slice(0,64);if(w.length<2)return;const y=[];for(const A of w)try{const E=`${A.targetPeerId}:${A.serviceOrigin||A.url}`;let x=i.get(E);if(!x){const I=A.targetPeerId===h.targetPeerId?(await p.request({type:"collaboration-descriptor"},{timeoutMs:5e3})).node:await n2({...A,targetPeerId:A.targetPeerId},AbortSignal.timeout(8e3));if(I?.serviceId!==A.targetPeerId)throw new Error("PEER_IDENTITY_MISMATCH");const k=I.origin||A.serviceOrigin||A.url,T=new URL(k);if(T.protocol!=="https:"||T.origin!==k)throw new Error("INVALID_SERVICE_ORIGIN");x={serviceId:I.serviceId,origin:k,...I.caFingerprint256?{caFingerprint256:I.caFingerprint256}:{}},i.set(E,x)}y.push({service:A,node:x})}catch{}if(t||Fe()!==p||se()?.targetPeerId!==h.targetPeerId)return;const S=y.find(A=>A.node.serviceId===h.targetPeerId);if(!S||y.length<2){d(3e4);return}const v=y.map(A=>A.node).sort((A,E)=>A.serviceId.localeCompare(E.serviceId));await a(p,S.node,v);let C=y.length<w.length;for(const A of y){if(A===S||o.get(A.node.serviceId)===JSON.stringify(v))continue;let E;try{E=await r2({...A.service,targetPeerId:A.node.serviceId},AbortSignal.timeout(8e3)),await a(E,A.node,v)}catch{let x=s.has(A.node.serviceId);if(!x&&E)try{(await E.request({type:"collaboration-scoped-peer",origin:A.node.origin,node:S.node},{timeoutMs:8e3})).type==="result"&&(s.add(A.node.serviceId),x=!0)}catch{}x||(C=!0)}finally{E?.close()}}window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!0}})),C&&d(3e4)}catch(g){window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!1,error:g instanceof Error?g.message:"CONNECTION_ENROLLMENT_FAILED"}})),d(3e4)}finally{e=!1,n&&d(100)}}};function d(h=100){t||(clearTimeout(r),r=setTimeout(()=>{c()},h))}const u=()=>{d()},f=bc(u);window.addEventListener(vt,u),window.addEventListener("termdock:collaboration-enroll",u),window.addEventListener("online",u),window.addEventListener("pageshow",u),window.addEventListener("pagehide",h=>{h.persisted||(t=!0,clearTimeout(r),f(),window.removeEventListener("termdock:collaboration-enroll",u),window.removeEventListener(vt,u),window.removeEventListener("online",u),window.removeEventListener("pageshow",u))}),d()}var Ji={},cm;function m_(){if(cm)return Ji;cm=1;var e=cS();return Ji.createRoot=e.createRoot,Ji.hydrateRoot=e.hydrateRoot,Ji}var g_=m_();const y_=$g(g_);function Je({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 w_(){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(w_,{}):l.jsx(Je,{size:18}),l.jsx("span",{children:e})]})}const ru="#termdock-invite=";function Mf(e){const t=new URL(e.entryUrl);t.hash="",t.search="",t.pathname="/";const n=new TextEncoder().encode(JSON.stringify(e));return t.hash=ru.slice(1)+btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),t.href}function b_(e,t){Hn(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 Hn(e){const t=new URL(e);if(!["https:","http:"].includes(t.protocol)||!t.hash.startsWith(ru))throw new Error("这不是有效的 Termdock 邀请链接");const n=t.hash.slice(ru.length);if(n.length>8192)throw new Error("邀请链接过长");let r;try{const a=n.replace(/-/g,"+").replace(/_/g,"/");r=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(atob(a),c=>c.charCodeAt(0))))}catch{throw new Error("邀请链接不完整,请重新复制")}if(r.v!==1||typeof r.serviceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(r.serviceId)||r.routeOnly!==!0&&(typeof r.code!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(r.code)))throw new Error("邀请信息无效或版本不兼容");if(r.viewLayout!==void 0&&r.viewLayout!=="split")throw new Error("邀请布局无效");if(r.viewMode!==void 0&&!["terminal","chat"].includes(r.viewMode))throw new Error("邀请视图无效");const o=new URL(r.entryUrl);if(!(t.protocol==="http:"&&t.pathname==="/connect"&&!t.search&&!t.username&&!t.password&&o.protocol==="https:"&&o.hostname===t.hostname)&&o.origin!==t.origin||o.username||o.password||!["https:","http:"].includes(o.protocol))throw new Error("邀请地址与服务不一致");if(o.protocol==="http:"&&!["localhost","127.0.0.1","[::1]"].includes(o.hostname))throw new Error("远程邀请需要 HTTPS");if(r.entryServiceId!==void 0&&(typeof r.entryServiceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(r.entryServiceId)))throw new Error("邀请入口身份无效");if(r.routeCode!==void 0&&(typeof r.routeCode!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(r.routeCode)||!r.entryServiceId))throw new Error("邀请入口权限无效");if(r.routeOnly===!0&&(!r.entryServiceId||!r.routeCode||r.code!==void 0))throw new Error("备用连接邀请不完整");let i=o.origin;if(r.serviceUrl!==void 0){const a=new URL(r.serviceUrl);if(!["https:","http:"].includes(a.protocol)||a.username||a.password)throw new Error("目标服务地址无效");i=r.entryServiceId&&r.entryServiceId!==r.serviceId?a.origin:o.origin}return{viewMode:r.viewMode,viewLayout:r.viewLayout,url:o.origin,targetPeerId:r.serviceId,pairingCode:r.code,...r.routeOnly===!0?{routeOnly:!0}:{},serviceOrigin:i,serviceName:typeof r.name=="string"?r.name.slice(0,120):void 0,entryServiceId:r.entryServiceId,routeCode:r.routeCode}}function v_(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.url,s=r?.targetPeerId||e.entryServiceId,i=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?Mf({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}):void 0;return{connection:a,invitation:c}}function x_(e){if(e.includes("#termdock-invite=")){const n=Hn(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:e}}const t=$e(e);return{connection:{id:t,url:t,label:new URL(t).host}}}async function S_(e,t){const{connection:n,invitation:r}=x_(t);if(e.reviewServiceConnection){await e.reviewServiceConnection(n,r);return}await ou(e,n,r)}async function ou(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}}function Dx(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 E_;function k_(){return E_??=(async()=>{const e=navigator.userAgent,[t,n]=Dx().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=ut();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 dm(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 tc(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 QM(e=document){const t=e.activeElement;return!e.hidden&&e.hasFocus()&&(!t||t===e.body||t===e.documentElement)}function I_(e,t){if(!tc(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 C_(e,t){I_(e,t)&&e.ownerDocument.activeElement!==e&&e.focus({preventScroll:!0})}const hr=[],Cs=new Set,pr=()=>Cs.forEach(e=>e()),um=new WeakMap;let xr;function su(){if(!xr)return;xr.disconnect(),xr.observe(document.body,{childList:!0});const e=new Set;for(const t of hr)for(let n=t.element;n&&!e.has(n);n=n.parentElement)e.add(n),xr.observe(n,{childList:n===document.body,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","style","class"]})}function R_(e){return Cs.add(e),Cs.size===1&&(xr=new MutationObserver(pr),su(),window.addEventListener(Mr,pr),document.addEventListener("visibilitychange",pr)),()=>{Cs.delete(e),Cs.size||(xr?.disconnect(),xr=void 0,window.removeEventListener(Mr,pr),document.removeEventListener("visibilitychange",pr))}}function Ox(e){if(typeof document>"u"||document.hidden||!Rr())return null;const t=document.querySelector('[data-desktop-confirmation="true"]');if(tc(t)){let n=um.get(t);return n||(n={element:t},um.set(t,n)),n}return[...hr].reverse().find(n=>n===e||tc(n.element))??null}const Vt=()=>Ox(),T_=()=>Vt()!==null;function Bf(e){if(!Rr()||!tc(e))return!1;const t=Vt(),n=t?nc(t.element):[document.body];return e.isConnected&&!e.closest('[hidden], [inert], [aria-hidden="true"]')&&(!t||n.some(r=>r.contains(e)))&&jx(e,n)}function eB(){return b.useSyncExternalStore(R_,T_,()=>!1)}function nc(e){const t=Array.from(document.querySelectorAll("[data-sidebar-composer-popover]")).filter(n=>e.id&&n.dataset.sidebarComposerPopover===e.id);return[e,...t]}function jx(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 fm(e){const t=nc(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))&&jx(n,t)})}function vi(e,t,n,r){const o=b.useRef(n);o.current=n;const s=b.useRef(r);s.current=r,b.useLayoutEffect(()=>{const i=e.current;if(!t||!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,c={element:i},d=hr.findIndex(w=>i.contains(w.element));d<0?hr.push(c):hr.splice(d,0,c),su(),pr();const u=()=>Vt()===c,f=w=>w instanceof Node&&nc(i).some(y=>y.contains(w)),h=()=>(fm(i)[0]??i).focus({preventScroll:!0});u()&&!f(document.activeElement)&&h();const p=w=>{document.hasFocus()&&u()&&!f(w.target)&&h()},g=w=>{if(!u()||w.key!=="Tab"||w.defaultPrevented)return;const y=fm(i),S=y[0],v=y[y.length-1];(!S||!f(document.activeElement)||(w.shiftKey?document.activeElement===S:document.activeElement===v))&&(w.preventDefault(),(w.shiftKey?v:S)?.focus({preventScroll:!0}))},m=w=>{!u()||w.key!=="Escape"||w.defaultPrevented||w.isComposing||(w.preventDefault(),w.stopImmediatePropagation(),o.current())};return document.addEventListener("focusin",p,!0),document.addEventListener("keydown",g,!0),document.addEventListener("keydown",m),()=>{const w=Ox(i.isConnected?void 0:c)===c;if(hr.splice(hr.indexOf(c),1),su(),pr(),document.removeEventListener("focusin",p,!0),document.removeEventListener("keydown",g,!0),document.removeEventListener("keydown",m),w){const y=Vt();queueMicrotask(()=>{if(Vt()!==y||!Rr())return;const S=a?.isConnected&&a!==document.body?a:s.current?.();S&&y&&!nc(y.element).some(v=>v.contains(S))||C_(S,i)})}}},[t,e])}function A_(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)?P_(e)!==null:!0}function P_(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 N_(e){return e.physicalId?`physical:${e.physicalId}`:`serial:${e.serial}`}function Mx(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=N_(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 tB(e,t,n){const r=Mx(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 nB(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 Gr(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 Bx(){return Gr("/api/android/devices")}async function rB(e){return Gr("/api/android/connect",{method:"POST",body:JSON.stringify({address:e})})}const Fx=[{id:"low",maxSize:720,bitRate:12e5,maxFps:30},{id:"medium",maxSize:1080,bitRate:4e6,maxFps:30},{id:"high",maxSize:1600,bitRate:8e6,maxFps:60}],hm=Fx[1];function oB(e){if(!e||typeof e!="object")return hm;const t=e;if(t.id==="auto")return{id:"auto",maxSize:1600,bitRate:4e6,maxFps:30};const n=Fx.find(i=>i.id===t.id);if(n)return n;if(t.id!=="custom")return hm;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 sB(e,t){if(!A_(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 iB(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 aB(e){return Gr(`/api/android/recordings?serial=${encodeURIComponent(e)}`)}function cB(e){return Gr("/api/android/recordings",{method:"POST",body:JSON.stringify({serial:e})})}function lB(e){return Gr(`/api/android/recordings/${encodeURIComponent(e)}/stop`,{method:"POST"})}function dB(e,t){return Gr(`/api/android/recordings/${encodeURIComponent(e)}/save`,{method:"POST",body:JSON.stringify({directory:t})})}function uB(e){return Gr(`/api/android/recordings/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ux(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 Mx(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 pm(e=[],t,n){return[...e.filter(r=>!t.includes(r.serial)),...n?t.map(r=>({serial:r,access:n})):[]]}function __(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 L_(e,t){const n=__(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 fB(e){return JSON.stringify([e.host.trim().toLowerCase(),e.protocol,e.protocol==="vnc"?5900:Number(e.port),e.username.trim(),e.domain.trim()])}function Hx({status:e,error:t}){const{t:n}=At();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 $x({status:e,error:t,cancel:n,className:r="mt-2 text-xs"}){const o=Hx({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 mm={status:"idle",error:null,result:null};function D_(e,t,n=!0){const[r,o]=b.useState(mm),s=b.useRef(null);b.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"}))}),[]),b.useLayoutEffect(()=>(o(mm),()=>{const c=s.current;s.current=null,c?.controller.abort()}),[t,n]);const i=b.useCallback(()=>{const c=s.current;c&&(s.current=null,c.controller.abort(),o({status:"canceled",error:null,result:"canceled"}))},[]),a=b.useCallback(async()=>{if(!n||s.current)return;const c=new AbortController,d=lt()?.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 Ff(e,t=!0){const n=b.useCallback(r=>Tx(e,r),[e]);return D_(n,e,t&&!!e)}function O_(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 hB(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 Uf="application/x-termdock-file-reference",zx=()=>se()?.targetPeerId||location.origin;function j_(e,t,n){e.setData("text/plain",t),e.setData(Uf,JSON.stringify({service:zx(),text:t,...n?{reference:{...n,text:t}}:{}}))}function qx(e){const t=e.getData(Uf);if(!t)return null;try{const n=JSON.parse(t);if(n.service!==zx())throw new Error("请在文件所属的服务中引用");return typeof n.text!="string"||!n.text?null:n.text}catch(n){if(n instanceof SyntaxError)return null;throw n}}function pB(e){const t=qx(e);if(!t)return null;const n=JSON.parse(e.getData(Uf));return O_(n.reference)&&n.reference.text===t?n.reference:null}function M_(e,t){if(!e||e.startsWith("/"))return e;const n=e.replace(/^\.\//,"");return t?`${t.replace(/\/+$/,"")}/${n}`:n}function Kx(e,t){return M_(e,t).replace(/ /g,"\\ ")}function B_(e,t){return`${Kx(e,t)} `}function gm(e,t){return Kx(e,t)}function mB(e,t,n){if(!n)return gm(e,t);const r=n.start===n.end?`${n.start}`:`${n.start}-${n.end}`;return`${gm(e,t)}:${r}`}const F_=new Set,U_=new Set(["session.view","session.input","session.resize","session.owner-menu","session.share","todo.guidance","resource.android","resource.computer","resource.files","collaboration.mention"]);function Gx(e){const t=[];return e.android?.length&&t.push("android"),e.computers?.length&&t.push("computer"),e.directories?.length&&t.push("files"),t}function H_(e,t={}){const n=new Set;e&&n.add("session.view"),e?.canWrite===!0&&n.add("session.input"),e?.canResize===!0&&n.add("session.resize");for(const r of Gx(t))n.add(`resource.${r}`);return n}const Wx=b.createContext(void 0),Hf=()=>b.useContext(Wx),Vx=b.createContext(void 0);function gB(){const e=b.useContext(Vx),t=Hf();return e??(t===void 0?U_:F_)}function $_(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 z_(e){const t=ut();return t?.confirmationUI==="page-v1"&&t.confirm?await t.confirm(e):window.confirm(e.message)}function q_(e){const t=ut();t?.confirmationUI==="page-v1"&&t.alert?t.alert(e):window.alert(e)}async function K_(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 G_(){const{t:e}=At();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 ga(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 ei(e){return e.replace(/\/+$/,"")||"/"}function W_(e){const t=ei(e);return t.slice(0,t.lastIndexOf("/"))||"/"}function Yx(e,t){const n=ei(e),r=ei(t);return n===r||n.startsWith(r==="/"?"/":`${r}/`)}function yB(e,t){if(!Yx(e,t))return null;const n=ei(e),r=ei(t);return n===r?"":n.slice(r==="/"?1:r.length+1)}function Xx(e){return{setDirectoryCache:(t,n)=>e(r=>{const o=new Map(r.directoryCache);return o.delete(t),o.set(t,n),ga(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&&Yx(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 Ho=320,Jx=280,iu=5,V_="(min-width: 1024px)";function Jn(){return typeof window>"u"||window.matchMedia?.(V_).matches===!0}function wB(e,t,n){const r=t-Jx-(n?Ho+iu*2:iu);return Math.min(Math.max(200,Math.min(500,r)),Math.max(200,e))}function mn(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 Jt(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function ro(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}const Fs=new Map,To=new Map,ya=new Map;function bB(e,t,n){if(typeof window>"u")return;const r=Date.now(),o=ya.get(e)??0,s=r-o;if(s>=n){ya.set(e,r),Jt(e,t);return}if(To.set(e,t),Fs.has(e))return;const i=n-s,a=setTimeout(()=>{Fs.delete(e);const c=To.get(e);To.delete(e),ya.set(e,Date.now()),c!==void 0&&Jt(e,c)},i);Fs.set(e,a)}function Y_(e){const t=Fs.get(e);t&&(clearTimeout(t),Fs.delete(e));const n=To.get(e);n!==void 0&&(To.delete(e),ya.set(e,Date.now()),Jt(e,n))}function vB(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 To.keys())Y_(t)};window.addEventListener("pagehide",e),window.addEventListener("termdock:before-update",e),document.addEventListener("visibilitychange",()=>{document.hidden&&e()})}const X_=600;function xB(e,t,n=0){const r=Math.max(Ho,t-Math.max(0,n)-iu*(n>0?2:1)-Jx);return Math.min(r,Math.max(Ho,e))}const Zx="termdock:right-sidebar:tabs-by-session:v2",Qx="termdock:right-sidebar:explorer-roots-by-session:v2",$f="termdock:right-sidebar:pinned-explorer-roots:v1",e0="termdock:right-sidebar:selected-files-by-session:v2",t0="termdock:right-sidebar:show-hidden-files:v1",au="termdock:right-sidebar:file-sort-modes:v1",cu="termdock:right-sidebar:nested-git-scan-roots:v1",n0="termdock:right-sidebar:active-git-repo:v2",J_="termdock:right-sidebar:active-git-repo:v1",ym="termdock-sidebar-group-by-folder",r0="termdock-sidebar-collapsed-folder-groups",Z_="termdock-left-sidebar-pinned",o0="termdock-left-sidebar-width",Q_="termdock-right-sidebar-pinned",s0="termdock:desktop-sidebar-open:v1",i0="termdock-right-sidebar-width",zf="termdock:right-sidebar:widths-by-session:v1",a0="termdock:right-sidebar:split-state-initialized:v1",c0="termdock-right-sidebar-layout-preference";function wm(e){const t=e==="left";if(typeof window>"u")return t;try{const n=window.localStorage.getItem(`${s0}:${e}`);if(n==="1"||n==="0")return n==="1";const r=window.localStorage.getItem(e==="left"?Z_:Q_);return r==="1"||r==="0"?r==="1":t}catch{return t}}function Zn(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(`${s0}:${e}`,t?"1":"0")}catch{}}function eL(){if(typeof window>"u")return 300;try{const e=window.localStorage.getItem(o0);if(!e)return 300;const t=parseInt(e,10);return Number.isFinite(t)&&t>=200&&t<=500?t:300}catch{return 300}}function tL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(o0,String(e))}catch{}}function wa(){if(typeof window>"u")return 760;try{const e=window.localStorage.getItem(i0);if(!e)return 760;const t=parseInt(e,10);return Number.isFinite(t)&&t>=Ho?t:760}catch{return 760}}function nL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(i0,String(e))}catch{}}function rL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="number"&&Number.isFinite(t)&&t>=Ho)}function rc(){return mn(zf,rL)??{}}function Zi(e,t){if(!e){nL(t);return}Jt(zf,{...rc(),[e]:t})}function oL(){if(typeof window>"u")return"auto";try{const e=window.localStorage.getItem(c0);return e==="narrow"||e==="wide"?e:"auto"}catch{return"auto"}}function sL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(c0,e)}catch{}}function SB(e,t,n){return!t||n==="auto"?e<X_:n==="narrow"}function iL(){return!0}function bm(e){if(!(typeof window>"u"))try{e?window.localStorage.setItem(ym,"1"):window.localStorage.setItem(ym,"0")}catch{}}function aL(){if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(r0);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 cL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(r0,JSON.stringify([...e]))}catch{}}function lL(e){return e==="git"||e==="files"||e==="diff"||e==="android"||e==="computer"||e==="architecture"}function dL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(lL)}function lu(){return mn(Zx,dL)??{}}function oo(e,t){e&&Jt(Zx,{...lu(),[e]:t})}function uL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function vm(){return mn(Qx,uL)??{}}function Qi(e){Jt(Qx,e)}function fL(e){return e!==null&&typeof e=="object"&&typeof e.path=="string"&&(e.kind==="file"||e.kind==="directory")}function hL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>Array.isArray(t)&&t.every(n=>typeof n=="string"||fL(n)))}function l0(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 pL(){const e=mn($f,hL)??{},t={};for(const[n,r]of Object.entries(e))t[n]=l0(r);return t}function xm(e){Jt($f,e)}function mL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function du(){return mn(e0,mL)??{}}function us(e,t){if(!e)return;const n={...du()};t?n[e]=t:delete n[e],Jt(e0,n)}function Us(e,t){return t?e?`${e}\0${t}`:t:null}function uu(e,t,n){return n?`split-workspace\0${n}`:Us(e,t)}function EB(e,t,n){const r=rc(),o=uu(e,t,n);if(o&&r[o]!==void 0)return r[o];if(n){const s=Us(e,t);if(s&&r[s]!==void 0)return r[s]}return wa()}function d0(){const e=mn(a0,t=>Array.isArray(t)&&t.every(n=>typeof n=="string"));return new Set(e??[])}function gL(e){const t=d0();t.has(e)||(t.add(e),Jt(a0,[...t]))}function yL(e){return typeof e=="boolean"}function wL(){return mn(t0,yL)??!1}function bL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t==="modified")}function vL(){return mn(au,bL)??{}}function xL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t===!0)}function SL(){return mn(cu,xL)??{}}function EL(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 kL(){return mn(n0,EL)??{}}function Sm(e){Jt(n0,e)}let fs=null,hs=null;const Al=new Map;let ps=null;const ea=new Map;let ms=null;const Pl=new Set;let gs=null;const Nl=globalThis.crypto?.randomUUID?.()??`pins-${Math.random().toString(36).slice(2)}`;function so(e,t){const n=e.replace(/\/+$/,"")||"/";return t===n||t.startsWith(`${n}/`)}function Em(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 IL(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=cr(e=>({...Xx(e),leftOpen:!1,rightOpen:!1,desktopLeftOpen:wm("left"),leftSidebarWidth:eL(),desktopRightOpen:wm("right"),rightSidebarWidth:wa(),rightSidebarLayoutPreference:oL(),initialRightSidebarStateBySession:new Map,rightTab:"files",rightSearchOpen:!1,pendingTerminalPath:null,rootPath:null,contextKey:null,rightSidebarWidthContextKey:null,explorerRoot:null,explorerRootCache:vm(),pinnedExplorerRootsCache:pL(),pinnedExplorerRootsHydrated:!1,expandedPaths:new Set,selectedFilePath:null,directoryCache:new Map,fileSortModes:vL(),fileSortModesHydrated:!1,hideGitIgnoredRoots:{},gitIgnoreExceptions:{},hideGitIgnoredRootsHydrated:!1,nestedGitScanRoots:SL(),nestedGitScanRootsHydrated:!1,activeGitRepos:kL(),activeGitReposHydrated:!1,showHiddenFiles:wL(),groupByFolder:iL(),collapsedGroups:aL(),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(()=>Jn()?(Zn("left",!0),{desktopLeftOpen:!0}):{leftOpen:!0,rightOpen:!1}),closeLeft:()=>e(()=>Jn()?(Zn("left",!1),{desktopLeftOpen:!1}):{leftOpen:!1}),toggleLeft:()=>e(t=>Jn()?(Zn("left",!t.desktopLeftOpen),{desktopLeftOpen:!t.desktopLeftOpen}):{leftOpen:!t.leftOpen,rightOpen:t.leftOpen?t.rightOpen:!1}),setDesktopSidebarOpen:(t,n)=>e(()=>(Zn(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:(tL(r),{leftSidebarWidth:r})}),setRightSidebarWidth:t=>e(n=>{const r=Math.max(t,Ho);return n.rightSidebarWidth===r?n:(Zi(n.rightSidebarWidthContextKey,r),{rightSidebarWidth:r})}),setRightSidebarLayoutPreference:t=>e(n=>n.rightSidebarLayoutPreference===t?n:(sL(t),{rightSidebarLayoutPreference:t})),openTerminalPath:t=>e(n=>(oo(n.contextKey,"files"),Jn()&&Zn("right",!0),{pendingTerminalPath:{...t},rightTab:"files",...Jn()?{desktopRightOpen:!0}:{rightOpen:!0,leftOpen:!1}})),openRight:()=>e(()=>Jn()?(Zn("right",!0),{desktopRightOpen:!0}):{rightOpen:!0,leftOpen:!1}),closeRight:()=>e(()=>Jn()?(Zn("right",!1),{desktopRightOpen:!1}):{rightOpen:!1}),toggleRight:()=>e(t=>Jn()?(Zn("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=>(oo(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=Us(t,n);s&&(Zi(s,r.rightSidebarWidth),oo(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=Us(n,t),i=uu(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&&(Zi(s,c.rightSidebarWidth),oo(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}),ga(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?d0().has(r):!1;let m={...vm(),...o.explorerRootCache};const w=!!r&&!g,y=w&&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(w&&r){const I=y?.rightTab??(s?lu()[s]:void 0)??"files",k=y?.explorerRoot??(s?o.explorerRootCache[s]:void 0)??t,T=y?.selectedFilePath??(s?du()[s]:void 0)??null,_={rightTab:I,explorerRoot:k,expandedPaths:new Set(y?.expandedPaths??[]),selectedFilePath:T,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,_),oo(a,I),us(a,T),k&&(m={...m,[a]:k},Qi(m))),gL(r)}ga(p,12,new Set(a?[a]:[]));const S=a?p.get(a):void 0,v=a?lu()[a]:void 0,C=rc();let A=i?C[i]:void 0;r&&i&&A===void 0&&(A=(s?C[s]:void 0)??wa(),Zi(i,A));const E=a?m[a]:void 0,x=a?du()[a]:void 0;return{rootPath:t,pendingTerminalPath:null,contextKey:a,rightSidebarWidthContextKey:i,initialRightSidebarStateBySession:d,rightSidebarWidth:c?.rightSidebarWidth??A??wa(),rightOpen:c?.rightOpen??(o.rightSidebarWidthContextKey===i?o.rightOpen:!1),rightTab:c?.rightTab??S?.rightTab??v??"files",explorerRoot:S?.explorerRoot??E??t,expandedPaths:S?new Set(S.expandedPaths):new Set,selectedFilePath:S?.selectedFilePath??x??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=rc(),s=uu(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=Us(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)}),oo(p,a.rightTab),us(p,a.selectedFilePath),a.explorerRoot?u[p]=a.explorerRoot:delete u[p]))}return i!==void 0&&Jt(zf,c),a&&Qi(u),ga(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,Qi(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,Qi(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 xm(i),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const a=await $t({pinnedExplorerRoot:{rootPath:o,path:t,kind:n,pinned:!0},pinnedExplorerRootsOrigin:Nl});_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],xm(a),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const c=await $t({pinnedExplorerRoot:{rootPath:r,path:t,kind:s?.kind??"directory",pinned:!1},pinnedExplorerRootsOrigin:Nl});_e.getState().syncPinnedExplorerRoots(c.pinnedExplorerRoots??{})}catch{}})(),{pinnedExplorerRootsCache:a}}),hydratePinnedExplorerRoots:async()=>{if(!_e.getState().pinnedExplorerRootsHydrated)return gs||(gs=(async()=>{const t=_e.getState().pinnedExplorerRootsCache;let r=(await rr()).pinnedExplorerRoots??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await $t({pinnedExplorerRoots:t,pinnedExplorerRootsOrigin:Nl})).pinnedExplorerRoots??t),_e.getState().syncPinnedExplorerRoots(r)})().finally(()=>{gs=null}),gs)},syncPinnedExplorerRoots:t=>e(()=>{const n={};for(const[r,o]of Object.entries(t)){const s=l0(o);s.length>0&&(n[r]=s.slice(0,12))}return ro($f),{pinnedExplorerRootsCache:n,pinnedExplorerRootsHydrated:!0}}),selectFile:t=>e(n=>(us(n.contextKey,t),{selectedFilePath:t})),toggleShowHiddenFiles:()=>e(t=>{const n=!t.showHiddenFiles;Jt(t0,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 bm(n),{groupByFolder:n}}),setGroupByFolder:t=>e(n=>n.groupByFolder===t?n:(bm(t),{groupByFolder:t})),toggleGroupCollapsed:t=>e(n=>{const r=new Set(n.collapsedGroups);return r.has(t)?r.delete(t):r.add(t),cL(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,Em(c,r.fileSortModes[t]??"name"));for(const u of o)if(!i.has(u.path))for(const f of a.keys())so(u.path,f)&&a.delete(f);let d=r.selectedFilePath;return d&&o.find(f=>!i.has(f.path)&&so(f.path,d))&&(d=null,us(r.rootPath,null)),{directoryCache:a,selectedFilePath:d}}),hydrateHideGitIgnoredRoots:async()=>{if(!_e.getState().hideGitIgnoredRootsHydrated)return fs||(fs=(async()=>{const t=await rr();e({hideGitIgnoredRoots:t.hideGitIgnoredRoots??{},gitIgnoreExceptions:t.gitIgnoreExceptions??{},hideGitIgnoredRootsHydrated:!0})})().finally(()=>{fs=null}),fs)},setHideGitIgnoredRoot:async(t,n)=>{const r=await $t({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 $t({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 hs||(hs=(async()=>{const t=_e.getState().fileSortModes;let r=(await rr()).fileSortModes??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await $t({fileSortModes:t})).fileSortModes??t),ro(au),e({fileSortModes:r,fileSortModesHydrated:!0,directoryCache:new Map})})().finally(()=>{hs=null}),hs)},setDirectorySortMode:async(t,n)=>{try{await _e.getState().hydrateFileSortModes()}catch{}const r=_e.getState().fileSortModes[t]??"name",o=(Al.get(t)??0)+1;Al.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 $t({fileSortMode:{path:t,mode:n}}),ro(au)}catch{if(Al.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 ps||(ps=(async()=>{const n=(await rr()).nestedGitScanRoots??{};ro(cu),e({nestedGitScanRoots:n,nestedGitScanRootsHydrated:!0})})().finally(()=>{ps=null}),ps)},setNestedGitScanRoot:async(t,n)=>{try{await _e.getState().hydrateNestedGitScanRoots()}catch{}const r=!!_e.getState().nestedGitScanRoots[t],o=(ea.get(t)??0)+1;ea.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 $t({nestedGitScanRoot:{rootPath:t,enabled:n}});if(ea.get(t)!==o)return;e({nestedGitScanRoots:s.nestedGitScanRoots??{}}),ro(cu)}catch{if(ea.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 ms||(ms=(async()=>{const n=(await rr()).activeGitRepos??{},r={...n};for(const s of Pl){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)Pl.add(s);o.length>0&&await Promise.all(o.map(([s,i])=>$t({activeGitRepo:{contextKey:s,repoRoot:i}}).catch(()=>{}))),Sm(r),ro(J_),e({activeGitRepos:r,activeGitReposHydrated:!0})})().finally(()=>{ms=null}),ms)},setActiveGitRepo:t=>{const{contextKey:n,activeGitRepos:r}=_e.getState();if(!n||(r[n]??null)===t)return;Pl.add(n);const o={...r};t?o[n]=t:delete o[n],e({activeGitRepos:o}),Sm(o),$t({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&&so(u.path,s)&&d(s);continue}const f=W_(u.path),h=r.get(f);if(u.type==="deleted"){if(d(u.path),s&&so(u.path,s)&&(s=null,us(n.rootPath,null)),h){const y=h.filter(S=>S.path!==u.path);y.length!==h.length&&(r.set(f,y),i=!0)}for(const y of r.keys())so(u.path,y)&&(r.delete(y),i=!0);continue}d(u.path);const p=IL(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]&&so(m,f))continue;const w=Em(g?h.map(y=>y.path===p.path?{...y,...p,children:y.children}:y):[...h,p],n.fileSortModes[f]??"name");r.set(f,w),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 qf(e,t=()=>!0){if(!t())return!1;const n=ut();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 CL=450,RL=10,km=88,Im=36,ta=10,Cm=14;function Rm(e){if(typeof document>"u")return 0;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(e)||"0");return Number.isFinite(t)?t:0}function TL(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=Rm("--safe-top-inset"),c=Rm("--safe-bottom-inset"),d=r+ta,u=r+s-km-ta,f=o+a+ta,h=o+i-c-Im-ta,p=Math.max(d,Math.min(e-km/2,Math.max(d,u))),g=t-Im-Cm,m=t+Cm,w=g>=f?g:m,y=Math.max(f,Math.min(w,Math.max(f,h)));return{left:Math.round(p),top:Math.round(y)}}function Tm(e){return qf(e)}function Kf(e,t=!1){const n=b.useRef(null),r=b.useRef(null),o=b.useRef(!1),s=b.useRef(!1),i=b.useRef(!1),[a,c]=b.useState(null);b.useEffect(()=>{if(!a)return;const g=m=>{const w=m.target;w instanceof HTMLElement&&w.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=b.useCallback(()=>{n.current!=null&&(window.clearTimeout(n.current),n.current=null)},[]),u=b.useCallback(()=>{d(),r.current=null,o.current=!1},[d]),f=b.useCallback((g,m)=>({onPointerDown:w=>{w.pointerType==="mouse"&&w.button!==0||(u(),r.current={pointerId:w.pointerId,pointerType:w.pointerType,startX:w.clientX,startY:w.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"){Tm(y.text).then(S=>{S&&e?.(y.key)}),n.current=null;return}c({text:y.text,key:y.key,...TL(y.startX,y.startY)}),n.current=null}},CL))},onPointerMove:w=>{const y=r.current;if(!y||y.pointerId!==w.pointerId||o.current)return;const S=w.clientX-y.startX,v=w.clientY-y.startY;Math.hypot(S,v)>RL&&u()},onPointerUp:w=>{const y=r.current;if(!y||y.pointerId!==w.pointerId){u();return}o.current&&(w.preventDefault(),w.stopPropagation(),s.current=!0),u()},onPointerCancel:u,onPointerLeave:w=>{r.current?.pointerId===w.pointerId&&!o.current&&u()},onClickCapture:w=>{s.current&&(s.current=!1,w.preventDefault(),w.stopPropagation())},onContextMenu:w=>{!o.current&&!s.current||(w.preventDefault(),w.stopPropagation())}}),[e,u]),h=b.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,Tm(m.text).then(w=>{w&&e?.(m.key)})},[e,a]),p=a&&typeof document<"u"?$n.createPortal(b.createElement("button",{type:"button","data-reference-copy-popover":"true","data-sidebar-composer-popover":t?Vt()?.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},b.createElement(oi,{size:14,strokeWidth:2.4}),b.createElement("span",null,"Copy")),document.body):null;return b.useMemo(()=>Object.assign(f,{popoverNode:p}),[f,p])}function u0({path:e,enabled:t=!0,showHidden:n=!1,action:r="list_directory",requestSlotId:o,sortMode:s="name",gitIgnoreRoot:i,onLoad:a}){const c=b.useId(),d=o??`directory-list:${c}`,[u,f]=b.useState(0),h=JSON.stringify([e,n,r,d,s,i,u]),[p,g]=b.useState(),m=b.useRef(a),w=b.useRef(0);m.current=a,b.useEffect(()=>{if(!t||!e)return;const S=new AbortController,v=`${d}:${++w.current}`;return g({key:h,result:null,error:null,loading:!0}),Cx(e,S.signal,n,r,v,s,i).then(C=>{S.signal.aborted||(g({key:h,result:C,error:null,loading:!1}),m.current?.(C))}).catch(C=>{S.signal.aborted||g({key:h,result:null,error:C instanceof Error?C.message:"Failed to load directory",loading:!1})}),()=>{S.abort(),_f(v)}},[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(S=>S+1)}}const f0=b.createContext(null);function AL({children:e}){const[t]=b.useState(()=>qg(n=>({directoryCache:new Map,expandedPaths:new Set,...Xx(n)})));return l.jsx(f0.Provider,{value:t,children:e})}function Gf(){return b.useContext(f0)??_e}function Sr(e){return Gg(Gf(),e)}const PL=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"]),Am=120,Pm=120,NL=new Set,_L=[],LL={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 Wf(e,t){if(t==="directory")return null;if(kx(e))return l.jsx(sy,{size:14});if(Sx(e))return l.jsx(hw,{size:14});const n=e.lastIndexOf(".")>=0?e.slice(e.lastIndexOf(".")):"";return PL.has(n)?l.jsx(Cy,{size:14}):l.jsx(_u,{size:14})}function h0({path:e}){const n=_e(o=>o.changedFiles.get(e))?.status;if(!n)return null;const r=LL[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 $o(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 Vf(e){return $o(e)}const DL=b.memo(function({path:t}){const{t:n}=At(),r=Ff(t),o=r.status,s=Hx(r),i=b.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 ${$o(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(Je,{size:12,className:"animate-spin"}):l.jsx(hc,{size:12}),o!=="idle"&&o!=="pending"&&l.jsx("span",{role:o==="error"?"alert":"status",className:"sr-only",children:s})]})});function OL(e){return e instanceof DOMException&&e.name==="AbortError"}function oc(){if(typeof window>"u")return!1;const e=window.getSelection();return!!(e&&!e.isCollapsed&&e.toString().trim())}function p0(e){return e.button===2||e.ctrlKey}const jL=176,ML=160,ys=8;function Nm(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+ys,u=i+ys,f=Math.max(d,a-n-ys),h=Math.max(u,c-r-ys),p=t+r<=c-ys?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 m0(e){const[t,n]=b.useState(null),r=b.useRef(null),o=b.useCallback((s,i)=>{n(Nm(s,i,jL,ML))},[]);return b.useLayoutEffect(()=>{if(!e||!t||!r.current)return;const s=r.current.getBoundingClientRect();if(s.width<=0||s.height<=0)return;const i=Nm(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 g0(e,t){return t&&typeof document<"u"?$n.createPortal(e,document.body):e}function BL(e,t){return t?`${e.name} ${e.path}`.toLowerCase().includes(t):!0}function Yf(e,t,n){if(!t||BL(e,t))return!0;const r=n.get(e.path);return r?r.some(o=>Yf(o,t,n)):!1}function fu(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 hu(e,t){return!e||!t.startsWith(e)?t:t.slice(e.length).replace(/^\/+/,"")||t}const FL=b.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:w,pinnedPaths:y,selectedFilePath:S,queryLower:v,onDirectoryDropFiles:C,onFileDeleteRequest:A,deletingFilePath:E,revealedDirectoryPath:x,gitIgnoreRoot:I}){const k=Gf(),T=Hf(),_=!T||T.directories?.some(G=>G.access==="write"&&(t.path===G.path||t.path.startsWith(G.path.replace(/\/+$/,"")+"/"))),{t:R}=At(),P=Sr(G=>G.expandedPaths.has(t.path)),N=Sr(G=>G.directoryCache.get(t.path)),L=_e(G=>G.showHiddenFiles),D=Sr(G=>G.toggleExpanded),O=Sr(G=>G.setDirectoryCache),B=_e(G=>G.fileSortModes[t.path]??"name"),M=_e(G=>G.setDirectorySortMode),F=b.useRef(B);b.useLayoutEffect(()=>{F.current!==B&&k.getState().invalidateDirectoryCache(t.path),F.current=B},[B,k,t.path]);const[H,$]=b.useState(!1),{position:ee,menuRef:ne,openAt:te,clearPosition:le}=m0(H),[U,J]=b.useState(!1),Q=b.useRef(0),Y=`file-tree:${b.useId()}:${t.path}`;vi(ne,H&&!!i,()=>$(!1));const Ce=b.useRef(null),K=t.path===S||t.path===x,z=t.type==="directory"&&(P||!!v),de=t.type==="directory",ge=y.has(t.path),Ie=!de&&!!g,Pe=!!(w&&m),Re=`path:${t.path}`,q=d===Re||!!i?.paths.has(t.path),ce=u===Re,he=a?.(t.path)??t.path,je=Kf(c,!!i),pe=Ff(t.path),We=pe.start,be=E===t.path,Ke=de&&!o&&!!(f||h||p||Pe),De=b.useMemo(()=>{if(!N)return;if(!v)return N;const G=k.getState().directoryCache;return N.filter(fe=>(!o||fe.type==="directory")&&Yf(fe,v,G))},[N,o,v,k]),{loading:Pt}=u0({path:t.path,enabled:t.type==="directory"&&P&&!N&&!o,showHidden:L,action:"expand_directory",requestSlotId:Y,sortMode:B,gitIgnoreRoot:I,onLoad:G=>O(t.path,fu(G.entries))}),Nt=b.useCallback(()=>{if(t.type!=="directory"){r(t.path);return}if(o&&f){f(t.path);return}D(t.path)},[o,t.path,t.type,f,D,r]),it=b.useCallback(G=>{G.stopPropagation(),s?.(t.path,Re,G.currentTarget)},[s,t.path,Re]),Ze=b.useCallback(G=>{G.stopPropagation(),f?.(t.path),$(!1)},[t.path,f]),W=b.useCallback(G=>{G.stopPropagation(),h?.(t.path),$(!1)},[t.path,h]),re=b.useCallback(G=>{G.stopPropagation(),p?.(t.path),$(!1)},[t.path,p]),ie=b.useCallback(G=>{G.stopPropagation(),M(t.path,B==="modified"?"name":"modified"),$(!1)},[t.path,M,B]),Se=b.useCallback(G=>{G.stopPropagation(),g?.(t.path),$(!1)},[t.path,g]),ae=b.useCallback(G=>{G.stopPropagation(),$(!1),We()},[t.path,We]),Z=b.useCallback(G=>{G.stopPropagation(),$(!1),A(t)},[t,A]),oe=b.useCallback(G=>{G.stopPropagation(),m?.(t.path),$(!1)},[t.path,m]),ye=b.useCallback(G=>{!de||!C||!G.dataTransfer.types.includes("Files")||(G.preventDefault(),G.stopPropagation(),Q.current+=1,J(!0))},[de,C]),V=b.useCallback(G=>{!de||!C||!G.dataTransfer.types.includes("Files")||(G.preventDefault(),G.stopPropagation(),G.dataTransfer.dropEffect="copy",J(!0))},[de,C]),ue=b.useCallback(G=>{!de||!C||(G.preventDefault(),G.stopPropagation(),Q.current-=1,Q.current<=0&&(Q.current=0,J(!1)))},[de,C]),ke=b.useCallback(G=>{if(!de||!C)return;G.preventDefault(),G.stopPropagation(),Q.current=0,J(!1);const fe=Array.from(G.dataTransfer.files);fe.length>0&&C(t.path,fe)},[de,t.path,C]),me=b.useCallback(G=>{G.stopPropagation(),i?te(G.clientX,G.clientY):le(),$(fe=>!fe)},[le,te,!!i]),Me=b.useCallback(G=>{!Ke||!p0(G)||(G.preventDefault(),G.stopPropagation(),te(G.clientX,G.clientY),$(!0))},[Ke,te]);return b.useEffect(()=>{if(!H)return;const G=ve=>{const Ee=ve.target;Ee instanceof Node&&(Ce.current?.contains(Ee)||ne.current?.contains(Ee))||$(!1)},fe=ve=>{ve.key==="Escape"&&$(!1)};return document.addEventListener("pointerdown",G),document.addEventListener("keydown",fe),()=>{document.removeEventListener("pointerdown",G),document.removeEventListener("keydown",fe)}},[H,ne]),l.jsxs("div",{style:!z&&!H?{contentVisibility:"auto",containIntrinsicSize:"auto 32px"}:void 0,children:[l.jsxs("div",{ref:Ce,className:"relative",children:[je.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,draggable:!!s&&!o,onDragStart:G=>{if(!s||o||G.target.closest("button")){G.preventDefault();return}G.dataTransfer.effectAllowed="copy";const fe=a?.(t.path)||B_(t.path,null);j_(G.dataTransfer,fe,{kind:t.type==="directory"?"directory":"file",path:t.path,text:fe})},"data-sort-mode":B,role:"button",tabIndex:0,onClick:()=>{oc()||Nt()},onContextMenu:Me,onKeyDown:G=>{G.target!==G.currentTarget||G.key!=="Enter"&&G.key!==" "||(G.preventDefault(),Nt())},onDragEnter:ye,onDragOver:V,onDragLeave:ue,onDrop:ke,className:`group relative flex w-full cursor-pointer items-center gap-1 rounded px-2 py-1 text-[13px] transition ${U?"scale-[1.015] bg-primary/15 text-foreground shadow-[0_0_0_1px_rgb(var(--primary-rgb)_/_0.45)]":K?"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`}}),U&&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:R("fileTree.dropToUploadHere")}),t.type==="directory"?l.jsxs(l.Fragment,{children:[z?l.jsx(Ar,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground/80"}),z?l.jsx(Ns,{size:14,className:"shrink-0 text-[color:var(--folder)]"}):l.jsx(mc,{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:K?"text-primary":"text-muted-foreground/80",children:Wf(t.name,t.type)})]}),l.jsxs("span",{className:`flex-1 select-text whitespace-nowrap text-left leading-snug ${K?"font-medium":""}`,children:[t.name,B==="modified"&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-primary",title:R("fileTree.sortedByModified"),"aria-label":R("fileTree.sortedByModified"),children:l.jsx(va,{size:11})}),t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:R("fileTree.symbolicLink"),children:l.jsx(No,{size:11})})]}),l.jsxs("div",{className:`sticky right-0 z-20 flex shrink-0 items-center rounded pl-1 ${K?"bg-surface-elevated":"bg-surface group-hover:bg-surface-2"}`,onClick:G=>G.stopPropagation(),children:[Pt&&l.jsx(Je,{size:12,className:"shrink-0 animate-spin text-muted-foreground"}),l.jsx(h0,{path:t.path}),Ke&&l.jsx("button",{type:"button",onClick:me,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 ${$o(H)} ${H?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":R("fileTree.moreDirActions"),"aria-expanded":H,title:R("fileTree.moreDirActions"),children:l.jsx(Pr,{size:13})}),!de&&!i&&l.jsx("button",{type:"button",onClick:me,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 ${$o(H||pe.status==="pending"||be||ge)} ${H?"bg-surface-elevated text-foreground":ge?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":R("fileTree.moreFileActions"),"aria-expanded":H,title:pe.status==="error"?pe.error??R("rightSidebar.downloadFailed"):R("fileTree.moreFileActions"),children:pe.status==="pending"||be?l.jsx(Je,{size:13,className:"animate-spin"}):l.jsx(Pr,{size:13})}),s&&l.jsx("button",{type:"button",onClick:it,...je(he,Re),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":Vf(q||ce)} ${q||ce?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":i?`${i.label}: ${t.name}`:R(ce?"rightSidebar.copied":q?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":i?q:void 0,disabled:!!i?.disabled&&!q,title:i?`${i.label}: ${t.name}`:R(ce?"rightSidebar.copied":q?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:ce||q?l.jsx(Pn,{size:12}):l.jsx(No,{size:12})}),l.jsx($x,{status:pe.status,error:pe.error,cancel:pe.cancel,className:"ml-1 text-[10px]"}),Ke&&H&&g0(l.jsxs("div",{ref:ne,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:oe,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:R("fileTree.openInFileBrowserTitle"),children:[l.jsx(Ns,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("fileTree.openInFileBrowser")})]}),f&&l.jsxs("button",{type:"button",onClick:Ze,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:R("fileTree.openDirRootTitle"),children:[l.jsx(Ns,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("fileTree.openDirRoot")})]}),h&&l.jsxs("button",{type:"button",onClick:W,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:R("fileTree.searchFromDirTitle"),children:[l.jsx(pc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("fileTree.searchFromDir")})]}),p&&l.jsxs("button",{type:"button",onClick:re,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] ${ge?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:R(ge?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[ge?l.jsx(Gs,{size:13,className:"shrink-0"}):l.jsx(Ks,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R(ge?"fileTree.unpinDir":"fileTree.pinDir")})]}),l.jsxs("button",{type:"button",onClick:ie,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:[B==="modified"?l.jsx(Yg,{size:13,className:"shrink-0"}):l.jsx(va,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R(B==="modified"?"fileTree.sortByName":"fileTree.sortByModified")})]})]}),!!ee),!de&&!i&&H&&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:oe,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:R("fileTree.openInFileBrowserTitle"),children:[l.jsx(_u,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("fileTree.openInFileBrowser")})]}),l.jsxs("button",{type:"button",onClick:ae,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:R("rightSidebar.downloadFile"),children:[l.jsx(hc,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("rightSidebar.downloadFile")})]}),Ie&&l.jsxs("button",{type:"button",onClick:Se,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] ${ge?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:R(ge?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[ge?l.jsx(Gs,{size:13,className:"shrink-0"}):l.jsx(Ks,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R(ge?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!_,onClick:Z,disabled:be,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:R("fileTree.deleteFile"),children:[be?l.jsx(Je,{size:13,className:"shrink-0 animate-spin"}):l.jsx(Mu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:R("fileTree.deleteFile")})]})]})]})]})]}),z&&De&&De.length>0&&l.jsx("div",{className:n===0?"mt-0.5":"",children:De.map(G=>l.jsx(e,{node:G,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:w,pinnedPaths:y,selectedFilePath:S,queryLower:v,insertedReferenceKey:d,copiedReferenceKey:u,onDirectoryDropFiles:C,onFileDeleteRequest:A,deletingFilePath:E,gitIgnoreRoot:I,revealedDirectoryPath:x},G.path))})]})}),UL=b.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:w,deletingFilePath:y}){const S=Hf(),v=!S||S.directories?.some(z=>z.access==="write"&&(t.path===z.path||t.path.startsWith(z.path.replace(/\/+$/,"")+"/"))),{t:C}=At(),A=t.path===m,E=t.type==="directory",x=g.has(t.path),I=!E&&!!p,k=`path:${t.path}`,T=c===k||!!s?.paths.has(t.path),_=d===k,R=i?.(t.path)??t.path,P=Kf(a,!!s),N=Ff(t.path),L=N.start,[D,O]=b.useState(!1),{position:B,menuRef:M,openAt:F,clearPosition:H}=m0(D);vi(M,D&&!!s,()=>O(!1));const $=b.useRef(null),ee=y===t.path,ne=E&&!!(u||f||h),te=b.useCallback(()=>{oc()||(t.type==="directory"?u?.(t.path):r(t.path))},[t.path,t.type,u,r]),le=b.useCallback(z=>{z.stopPropagation(),o?.(t.path,k,z.currentTarget)},[o,t.path,k]),U=b.useCallback(z=>{z.stopPropagation(),h?.(t.path),O(!1)},[t.path,h]),J=b.useCallback(z=>{z.stopPropagation(),p?.(t.path),O(!1)},[t.path,p]),Q=b.useCallback(z=>{z.stopPropagation(),O(!1),L()},[t.path,L]),Y=b.useCallback(z=>{z.stopPropagation(),O(!1),w(t)},[t,w]),Ce=b.useCallback(z=>{z.stopPropagation(),s?F(z.clientX,z.clientY):H(),O(de=>!de)},[H,F,!!s]),K=b.useCallback(z=>{!ne||!p0(z)||(z.preventDefault(),z.stopPropagation(),F(z.clientX,z.clientY),O(!0))},[ne,F]);return b.useEffect(()=>{if(!D)return;const z=ge=>{const Ie=ge.target;Ie instanceof Node&&($.current?.contains(Ie)||M.current?.contains(Ie))||O(!1)},de=ge=>{ge.key==="Escape"&&O(!1)};return document.addEventListener("pointerdown",z),document.addEventListener("keydown",de),()=>{document.removeEventListener("pointerdown",z),document.removeEventListener("keydown",de)}},[D,M]),l.jsxs("div",{ref:$,className:"relative border-b border-border/10 last:border-b-0",children:[P.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,role:"button",tabIndex:0,onClick:te,onContextMenu:K,onKeyDown:z=>{z.target!==z.currentTarget||z.key!=="Enter"&&z.key!==" "||(z.preventDefault(),te())},className:`group flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-[13px] transition ${A?"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(mc,{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:A?"text-primary":"text-muted-foreground/80",children:Wf(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 ${A?"text-primary":"text-foreground"}`,children:[t.name,t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:C("fileTree.symbolicLink"),children:l.jsx(No,{size:11})})]}),l.jsx("span",{className:"mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/80",children:hu(n,t.path)})]}),l.jsx(h0,{path:t.path}),t.type==="directory"&&(h||f)&&l.jsx("button",{type:"button",onClick:Ce,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 ${$o(D)} ${D?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreDirActions"),"aria-expanded":D,title:C("fileTree.moreDirActions"),children:l.jsx(Pr,{size:13})}),!E&&!s&&l.jsx("button",{type:"button",onClick:Ce,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 ${$o(D||N.status==="pending"||ee||x)} ${D?"bg-surface-elevated text-foreground":x?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreFileActions"),"aria-expanded":D,title:N.status==="error"?N.error??C("rightSidebar.downloadFailed"):C("fileTree.moreFileActions"),children:N.status==="pending"||ee?l.jsx(Je,{size:13,className:"animate-spin"}):l.jsx(Pr,{size:13})}),o&&l.jsx("button",{type:"button",onClick:le,...P(R,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 ${s?"ml-1 min-h-11 min-w-11":Vf(T||_)} ${T||_?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":s?`${s.label}: ${t.name}`:C(_?"rightSidebar.copied":T?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":s?T:void 0,disabled:!!s?.disabled&&!T,title:s?`${s.label}: ${t.name}`:C(_?"rightSidebar.copied":T?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:_||T?l.jsx(Pn,{size:12}):l.jsx(No,{size:12})})]}),l.jsx($x,{status:N.status,error:N.error,cancel:N.cancel,className:"ml-1 text-[10px]"}),ne&&D&&g0(l.jsxs("div",{ref:M,className:`${B?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:B?{left:B.left,top:B.top}:void 0,children:[u&&l.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),u(t.path),O(!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:C("fileTree.openDirRootTitle"),children:[l.jsx(Ns,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.openDirRoot")})]}),f&&l.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),f(t.path),O(!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(pc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.searchFromDir")})]}),h&&l.jsxs("button",{type:"button",onClick:U,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] ${x?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(x?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[x?l.jsx(Gs,{size:13,className:"shrink-0"}):l.jsx(Ks,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(x?"fileTree.unpinDir":"fileTree.pinDir")})]})]}),!!B),!E&&!s&&D&&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:Q,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(hc,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("rightSidebar.downloadFile")})]}),I&&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 transition active:scale-[0.99] ${x?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(x?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[x?l.jsx(Gs,{size:13,className:"shrink-0"}):l.jsx(Ks,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(x?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!v,onClick:Y,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:C("fileTree.deleteFile"),children:[ee?l.jsx(Je,{size:13,className:"shrink-0 animate-spin"}):l.jsx(Mu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.deleteFile")})]})]})]})}),HL=60,_m=60,$L=20;function Lm({count:e,loading:t,engine:n,limited:r,scope:o,content:s}){const{t:i}=At();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(pc,{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(Je,{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 zL(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 qL=b.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}=At(),[p,g]=b.useState(!0),m=t.path===r,w=p?t.matches.slice(0,$L):[],y=t.matches.length-w.length,S=`path:${t.path}`,v=u===S||!!a?.paths.has(t.path),C=f===S,A=c?.(t.path)??t.path,E=Kf(d,!!a);return l.jsxs("div",{className:"border-b border-border/10 last:border-b-0",children:[E.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":"file",role:"button",tabIndex:0,onClick:()=>{oc()||g(x=>!x)},onKeyDown:x=>{x.target!==x.currentTarget||x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),g(I=>!I))},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(Ar,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(Ln,{size:14,className:"shrink-0 text-muted-foreground/80"}),l.jsx("span",{className:m?"text-primary":"text-muted-foreground/80",children:Wf(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:hu(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(DL,{path:t.path}),i&&l.jsx("button",{type:"button",onClick:x=>{x.stopPropagation(),i(t.path,S,x.currentTarget)},...E(A,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 ${a?"ml-1 min-h-11 min-w-11":Vf(v||C)} ${v||C?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":a?`${a.label}: ${t.name}`:h(C?"rightSidebar.copied":v?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":a?v:void 0,disabled:!!a?.disabled&&!v,title:a?`${a.label}: ${t.name}`:h(C?"rightSidebar.copied":v?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:C||v?l.jsx(Pn,{size:12}):l.jsx(No,{size:12})})]}),p&&l.jsxs("div",{className:"mb-1 ml-3 border-l border-border/20 pl-1",children:[w.map((x,I)=>l.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{oc()||s?.(t.path,x.line)},onKeyDown:k=>{k.target!==k.currentTarget||k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),s?.(t.path,x.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:`${hu(n,t.path)}:${x.line}`,children:[l.jsx("span",{className:"shrink-0 select-none tabular-nums text-muted-foreground/60",children:x.line}),l.jsx("span",{className:"min-w-0 flex-1 truncate whitespace-pre select-text",children:zL(x.text,o)})]},`${x.line}-${I}`)),y>0&&l.jsx("div",{className:"px-2 py-1 text-[10px] text-muted-foreground/70",children:h("fileTree.moreMatches",{count:y})})]})]})});function KL(e){const t=l.jsx(GL,{...e});return e.directoriesOnly||e.referenceSelection?l.jsx(AL,{children:t}):t}function GL({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=NL,selectedFilePath:w,query:y="",searchRootPath:S,searchOptions:v={},searchMode:C="name",onContentMatchSelect:A,onDirectoryDropFiles:E,revealDirectory:x}){const{t:I}=At(),k=Gf(),T=b.useId(),_=`${o?"file-tree-reference-root":"file-tree-root"}:${T}:${e}`,R=Sr(V=>e?V.directoryCache.get(e):void 0),P=Sr(V=>V.setDirectoryCache),N=_e(V=>V.showHiddenFiles),L=_e(V=>V.fileSortModesHydrated),D=_e(V=>V.fileSortModes[e]??"name"),O=_e(V=>V.hydrateFileSortModes),B=_e(V=>V.hydrateHideGitIgnoredRoots),M=_e(V=>!!V.hideGitIgnoredRoots[e]),F=_e(V=>V.hideGitIgnoredRootsHydrated),H=_e(V=>JSON.stringify(V.gitIgnoreExceptions[e]??[])),$=Sr(V=>V.invalidateDirectoryCache),ee=`${e}:${D}:${N}:${M}:${H}`,[ne,te]=b.useState("");b.useLayoutEffect(()=>{e&&$(e,!0),te(ee)},[e,M,H,$,ee]);const[le,U]=b.useState(!1),[J,Q]=b.useState(!1),[Y,Ce]=b.useState(null),[K,z]=b.useState(L&&F),de=L&&F||K;b.useEffect(()=>{let V=!1;return Promise.all([O(),B()]).catch(()=>{}).finally(()=>{V||z(!0)}),()=>{V=!0}},[O,B]);const[ge,Ie]=b.useState([]),[Pe,Re]=b.useState(null),[q,ce]=b.useState(Am),[he,je]=b.useState([]),[pe,We]=b.useState(null),be=b.useRef({busy:!1}),Ke=b.useRef(0),De=b.useRef(e);De.current=e,b.useEffect(()=>{const V=()=>{Ke.current++};for(const ue of["pagehide","auth:unauthorized",vt])window.addEventListener(ue,V);return()=>{V();for(const ue of["pagehide","auth:unauthorized",vt])window.removeEventListener(ue,V)}},[]);const Pt=b.useRef(null),Nt=b.useRef(0),it=y.trim().toLowerCase(),Ze=C==="content",W=S||e,re=v.excludePatterns??_L,ie=re.join(`
|
|
7
|
+
`);b.useEffect(()=>{const V=x?.path;if(!V||!V.startsWith(`${e}/`)&&V!==e)return;const ue=V.slice(e.length).replace(/^\/+/,""),ke=ue?ue.split("/"):[],me=ke.map((Ve,wt)=>`${e}/${ke.slice(0,wt+1).join("/")}`),Me=k.getState(),G=me.filter(Ve=>!Me.expandedPaths.has(Ve));G.length>0&&k.setState(Ve=>({expandedPaths:new Set([...Ve.expandedPaths,...G])}));let fe=!1,ve=0;const Ee=()=>{if(fe)return;const Ve=Array.from(document.querySelectorAll("[data-file-tree-path]")).find(wt=>wt.dataset.fileTreePath===V);if(Ve){Ve.scrollIntoView({block:"center",behavior:"smooth"});return}ve+=1,ve<80&&window.setTimeout(Ee,50)},Te=window.requestAnimationFrame(Ee);return()=>{fe=!0,window.cancelAnimationFrame(Te)}},[x?.nonce,x?.path,e,k]);const Se=b.useCallback(async V=>{if(be.current.busy||V.type==="directory")return;const ue=Ke.current,ke=se(),me=Fe(),Me=e,G=V.path.slice(0,V.path.lastIndexOf("/"))||"/",fe=()=>k.getState().directoryCache.get(G)?.find(Qe=>Qe.path===V.path),ve=Qe=>JSON.stringify([Qe.path,Qe.name,Qe.type,Qe.isSymlink,Qe.modified]),Ee=ve(V),Te=fe(),Ve=Te?ve(Te):null;let wt=!1;const Yr=()=>{const Qe=fe();return ue===Ke.current&&Me===De.current&&ke===se()&&me===Fe()&&!me?.closed&&ve(V)===Ee&&(Qe?ve(Qe)===(Ve??Ee):Ve===null||wt)};await K_(be.current,{current:Yr,confirm:()=>z_({title:I("fileTree.deleteFile"),message:I("fileTree.deleteFileConfirm",{name:V.name}),confirmLabel:I("fileTree.deleteFile"),cancelLabel:I("common.cancel")}),submit:async Qe=>{await Px(V.path,Qe),wt=!0},apply:()=>{_e.getState().applyFileWatchEvents([{type:"deleted",path:V.path}]),Ie(Qe=>Qe.filter(gn=>gn.path!==V.path)),je(Qe=>Qe.filter(gn=>gn.path!==V.path)),m.has(V.path)&&h?.(V.path)},pending:Qe=>{ue===Ke.current&&We(Qe?V.path:null)},failure:Qe=>q_(I("fileTree.deleteFileFailed",{message:Qe})),expiredMessage:"File deletion context changed"})},[e,h,m,I,k]),{loading:ae,error:Z,reload:oe}=u0({path:e,enabled:de&&ne===ee&&!it&&!R,showHidden:N,action:"load_file_tree_root",requestSlotId:_,sortMode:D,gitIgnoreRoot:e,onLoad:V=>{U(!!V.truncated),P(e,fu(V.entries))}});b.useEffect(()=>{if(!W||!it){Q(!1),Ce(null),Ie([]),je([]),Re(null);return}let V=!1;const ue=new AbortController,ke=new Set;Q(!0),Ce(null),Ie([]),je([]),ce(Ze?HL:Am),Re({truncated:!1,total:0,engine:"rg",limited:!1,done:!1});const me=`file-search:${T}:${W}:${++Nt.current}`;let Me=!1;const G=()=>Rx(W,y.trim(),ve=>{if(!V){if(ve.engine&&Re(Ee=>({truncated:Ee?.truncated??!1,total:Ee?.total??0,engine:ve.engine,limited:ve.limited??Ee?.limited??!1,done:Ee?.done??!1})),ve.entries?.length){const Ee=ve.entries.filter(Te=>ke.has(Te.path)?!1:(ke.add(Te.path),!0));Ee.length>0&&(Ie(Te=>[...Te,...fu(Ee)]),Re(Te=>Te?{...Te,total:ke.size}:{truncated:!1,total:ke.size,engine:"rg",limited:!1,done:!1}))}if(ve.contentEntries?.length){const Ee=ve.contentEntries.filter(Te=>ke.has(Te.path)?!1:(ke.add(Te.path),!0));Ee.length>0&&(je(Te=>[...Te,...Ee]),Re(Te=>Te?{...Te,total:ke.size}:{truncated:!1,total:ke.size,engine:"rg",limited:!1,done:!1}))}ve.done&&Re(Ee=>({truncated:!!ve.truncated,total:typeof ve.total=="number"?ve.total:ke.size,engine:ve.engine??Ee?.engine??"rg",limited:!!ve.limited,done:!0}))}},ue.signal,N,C,me,{excludePatterns:re,caseSensitive:v.caseSensitive,wholeWord:v.wholeWord,regex:v.regex}).catch(ve=>{V||OL(ve)||(Ce(ve instanceof Error?ve.message:"Failed to search files"),Ie([]),je([]),Re(null))}).finally(()=>{V||Q(!1)}),fe=window.setTimeout(()=>{Me=!0,G()},180);return()=>{V=!0,window.clearTimeout(fe),ue.abort(),Me&&_f(me)}},[W,ie,Ze,y,it,C,v.caseSensitive,v.regex,v.wholeWord,N,!!o,T]),b.useEffect(()=>{if(!it)return;const V=Pt.current;if(!V)return;const ue=Ze?he.length:ge.length,ke=Ze?_m:Pm,me=new IntersectionObserver(Me=>{Me.some(G=>G.isIntersecting)&&ce(G=>Math.min(G+ke,ue))},{rootMargin:"160px 0px"});return me.observe(V),()=>me.disconnect()},[it,ge.length,he.length,Ze]);const ye=b.useMemo(()=>{if(!R)return;if(!it)return n?R.filter(ue=>ue.type==="directory"):R;const V=k.getState().directoryCache;return R.filter(ue=>(!n||ue.type==="directory")&&Yf(ue,it,V))},[n,it,R,k]);if(!e)return l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:I("fileTree.noWorkingDir")});if(ae||!de)return l.jsx(G_,{});if(it&&Ze){const V=Pe?.total??he.length,ue=he.slice(0,q),ke=q<he.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(Lm,{count:V,loading:J,engine:Pe?.engine,limited:Pe?.limited,scope:W,content:!0}),Y?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:[I("fileTree.contentSearchNeedsRipgrep"),l.jsx("div",{className:"mt-1 break-words text-[11px] text-muted-foreground/70",children:Y})]}):J&&he.length===0?l.jsx(lm,{label:I("fileTree.searching"),className:"py-8"}):he.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:I("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:I("fileTree.searchTruncatedHint",{count:Pe.total})}),ue.map(me=>l.jsx(qL,{entry:me,rootPath:W,selectedFilePath:w,query:y.trim(),onContentMatchSelect:A,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,insertedReferenceKey:a,copiedReferenceKey:c},me.path)),l.jsx("div",{ref:Pt,className:"py-2 text-center text-[11px] text-muted-foreground",children:ke?l.jsx("button",{type:"button",onClick:()=>ce(me=>Math.min(me+_m,he.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:I("fileTree.loadMoreSearchResults",{shown:ue.length,total:he.length})}):J?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Je,{size:10,className:"animate-spin"}),I("fileTree.searchStillRunning")]}):ue.length>0?l.jsx("span",{children:I("fileTree.showingSearchResults",{shown:ue.length,total:V})}):null})]})]})}if(it){const V=Pe?.total??ge.length,ue=ge.slice(0,q),ke=q<ge.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(Lm,{count:V,loading:J,engine:Pe?.engine,limited:Pe?.limited,scope:W,content:!1}),J&&ge.length===0?l.jsx(lm,{label:I("fileTree.searching"),className:"py-8"}):Y?l.jsx("div",{className:"px-4 py-4 text-sm text-destructive",children:Y}):ge.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:I("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:I("fileTree.searchTruncatedHint",{count:Pe.total})}),ue.map(me=>l.jsx(UL,{node:me,rootPath:W,onFileSelect:t,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,pinnedPaths:m,selectedFilePath:w,insertedReferenceKey:a,copiedReferenceKey:c,onFileDeleteRequest:Se,deletingFilePath:pe},me.path)),l.jsx("div",{ref:Pt,className:"py-2 text-center text-[11px] text-muted-foreground",children:ke?l.jsx("button",{type:"button",onClick:()=>ce(me=>Math.min(me+Pm,ge.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:I("fileTree.loadMoreSearchResults",{shown:ue.length,total:ge.length})}):J?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Je,{size:10,className:"animate-spin"}),I("fileTree.searchStillRunning")]}):ue.length>0?l.jsx("span",{children:I("fileTree.showingSearchResults",{shown:ue.length,total:V})}):null})]})]})}return Z?l.jsxs("div",{role:o?"alert":void 0,className:"px-4 py-4 text-sm text-destructive",children:[Z,l.jsx("button",{type:"button",onClick:oe,className:"mt-2 block rounded-md bg-surface-2 px-3 py-2 text-foreground hover:bg-surface-elevated",children:I("common.retry")})]}):!R||R.length===0?l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:I("fileTree.emptyDir")}):!ye||ye.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:I("fileTree.noMatchingFiles")}):l.jsxs("div",{className:"termdock-native-select w-max min-w-full space-y-px px-2 py-2",children:[le&&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:I("fileTree.truncatedHint")}),ye.map(V=>l.jsx(FL,{node:V,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:w,queryLower:it,insertedReferenceKey:a,copiedReferenceKey:c,onDirectoryDropFiles:E,onFileDeleteRequest:Se,deletingFilePath:pe,revealedDirectoryPath:x?.path},V.path))]})}const na="min-h-11 rounded-lg border border-border bg-background px-2 text-sm",io="min-h-11 rounded-lg px-3 text-sm hover:bg-surface-2 disabled:opacity-50";function WL({value:e,onChange:t,expanded:n=!1}){const[r,o]=b.useState([]),[s,i]=b.useState([]),[a,c]=b.useState(!0),[d,u]=b.useState(""),[f,h]=b.useState(""),[p,g]=b.useState(!1),m=b.useRef(null);vi(m,p,()=>g(!1));const[w,y]=b.useState(()=>_e.getState().rootPath||"/"),[S,v]=b.useState(0),C=Ux(r,e.android),A=C.filter(x=>x.access).length;b.useEffect(()=>{let x=!0;return c(!0),u(""),Promise.allSettled([Bx(),fetch("/api/computer/preferences").then(async I=>{if(!I.ok)throw new Error;return I.json()})]).then(([I,k])=>{if(x){if(I.status==="fulfilled"&&o(I.value.devices),k.status==="fulfilled"){const T=L_(k.value.preferences);i([T.local,T.remote].filter((_,R,P)=>_.host&&P.findIndex(N=>N.host===_.host&&N.protocol===_.protocol&&N.port===_.port)===R))}(I.status==="rejected"||k.status==="rejected")&&u("部分设备暂时无法读取,可重试;目录分享仍可配置。"),c(!1)}}),()=>{x=!1}},[S]);const E=()=>{const x=f.trim().replace(/\/+$/,"")||(f.trim()==="/"?"/":"");if(!x||!x.startsWith("/")&&!/^[A-Za-z]:[\\/]/.test(x)){u("请填写完整目录路径。");return}e.directories?.some(I=>I.path===x)||t({...e,directories:[...e.directories??[],{path:x,access:"read"}]}),h(""),u("")};return p?$n.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:x=>{x.target===x.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:io,onClick:()=>g(!1),children:"取消"})]}),l.jsx("p",{className:"shrink-0 break-all px-4 py-3 text-xs text-muted-foreground",children:w}),l.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:l.jsx(KL,{rootPath:w,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:`${io} w-full bg-primary text-primary-foreground`,onClick:()=>{e.directories?.some(x=>x.path===w)||t({...e,directories:[...e.directories??[],{path:w,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(gc,{size:15,className:"mr-2 inline"}),"手机设备 ",l.jsx("span",{className:"text-muted-foreground",children:A?`已选 ${A} 台`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[C.map(({device:x,serials:I,access:k})=>{const T=!!k;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:T,onChange:_=>t({...e,android:pm(e.android,I,_.target.checked?"view":void 0)})}),l.jsxs("span",{className:"min-w-0 break-all",children:[x.model||x.serial,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[x.state==="device"?"已连接":"离线或尚未授权",I.length>1?` · ${I.length} 个连接地址`:""]})]})]}),T&&l.jsxs("select",{className:na,"aria-label":`${x.model||x.serial}权限`,value:k,onChange:_=>t({...e,android:pm(e.android,I,_.target.value)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},x.serial)}),!C.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(Lu,{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(x=>{const I=x.protocol==="vnc"?5900:Number(x.port||3389),k=`${x.host}:${I}`,T=e.computers?.find(_=>_.host===x.host&&_.protocol===x.protocol&&_.port===I);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:!!T,onChange:_=>t({...e,computers:_.target.checked?[...e.computers??[],{host:x.host,protocol:x.protocol,port:I,access:"view"}]:e.computers?.filter(R=>R!==T)})}),l.jsxs("span",{className:"break-all",children:[x.host==="127.0.0.1"?"服务所在电脑":x.host,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[x.protocol.toUpperCase()," · ",I]})]})]}),T&&l.jsxs("select",{className:na,"aria-label":`${x.host}权限`,value:T.access,onChange:_=>t({...e,computers:e.computers?.map(R=>R===T?{...R,access:_.target.value}:R)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},k)}),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(mc,{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(x=>l.jsxs("div",{className:"rounded-lg bg-surface-2 p-2",children:[l.jsx("p",{className:"break-all text-xs",children:x.path}),l.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[l.jsxs("select",{className:na,"aria-label":`${x.path}权限`,value:x.access,onChange:I=>t({...e,directories:e.directories?.map(k=>k.path===x.path?{...k,access:I.target.value}:k)}),children:[l.jsx("option",{value:"read",children:"仅查看与下载"}),l.jsx("option",{value:"write",children:"可修改、上传与删除"})]}),l.jsx("button",{type:"button",className:io,"aria-label":`移除${x.path}`,onClick:()=>t({...e,directories:e.directories?.filter(I=>I.path!==x.path)}),children:l.jsx(ai,{size:16})})]})]},x.path)),l.jsx("label",{className:"block text-xs text-muted-foreground",htmlFor:"share-directory",children:"目录及其所有子目录"}),l.jsx("input",{id:"share-directory",className:`${na} w-full`,placeholder:"例如 /home/user/project",value:f,onChange:x=>h(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),E())}}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:io,onClick:()=>g(!0),children:"浏览目录"}),l.jsx("button",{type:"button",className:io,disabled:!f.trim(),onClick:E,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:io,"aria-label":"重新读取设备",onClick:()=>v(x=>x+1),children:l.jsx(Ou,{size:14})})]})]})}function _l({resources:e}){const[t,n]=b.useState([]),r=!!e?.android?.length;if(b.useEffect(()=>{if(!r)return;let s=!0;return Bx().then(i=>{s&&n(i.devices)}).catch(()=>{}),()=>{s=!1}},[r]),!e)return null;const o=Ux(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 pu=["message","sparkles","bot","code","file","briefcase","lightbulb","rocket"],Ll=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Xf(e){return typeof e=="string"&&e.length<=32&&(pu.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 VL(e,t){if(!Ll(t)||t.kind!=="sessions"||!Array.isArray(t.sessionIds))return!1;const n=t.sessionIds;return Ll(e)&&Object.keys(e).length<=256&&Object.entries(e).every(([r,o])=>n.includes(r)&&Ll(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||Xf(o.icon)))}const YL={message:si,sparkles:aw,bot:ry,code:by,file:Ty,briefcase:ay,lightbulb:Dy,rocket:tw},Dm={message:"对话",sparkles:"灵感",bot:"智能体",code:"代码",file:"文档",briefcase:"工作",lightbulb:"想法",rocket:"项目"};function ti({icon:e,size:t=20}){const n=YL[e];return n?l.jsx(n,{size:t,"aria-hidden":"true"}):e&&Xf(e)?l.jsx("span",{"aria-hidden":"true",className:"leading-none",style:{fontSize:t},children:e}):l.jsx(si,{size:t,"aria-hidden":"true"})}function XL({sessions:e,value:t,onChange:n}){const[r,o]=b.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(ti,{icon:a,size:23}),l.jsx(Ar,{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(rw,{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:pu.map(d=>l.jsx("button",{type:"button",title:Dm[d],"aria-label":`使用${Dm[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(ti,{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:pu.includes(a)?"":a,onChange:d=>c({...i,icon:d.target.value||void 0})})]}),i.icon&&!Xf(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 Om(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:fr({error:t}),blocked:!0}:{error:Un(e).message}}function JL({service:e,onBusyChange:t,onConnect:n,onConnectWithPassword:r}){const[o,s]=b.useState(),[i,a]=b.useState(!0),[c,d]=b.useState(!1),[u,f]=b.useState(""),[h,p]=b.useState(0),[g,m]=b.useState(),[w,y]=b.useState(""),[S,v]=b.useState({});b.useEffect(()=>{let E=!1,x=!1,I;const k=new AbortController,T=new Map;a(!0),f(""),s(void 0),v({}),m(void 0),y("");const _=async R=>{try{const P=await l2(e);if(E)return;x=!0,s(P),f(""),a(!1);const N=P.items.filter(D=>D.available&&D.authorized);let L=0;await Promise.all(Array.from({length:Math.min(3,N.length)},async()=>{for(;!E&&L<N.length;){const D=N[L++],O=T.get(D.serviceId);if(O&&Date.now()-O.at<1e4)continue;let B;try{const M=await Gd({url:P.route.url,entryServiceId:P.route.targetPeerId,targetPeerId:D.serviceId,routes:[P.route]},k.signal);B=M==="invitationRequired"?{error:fr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}:{status:M}}catch(M){B=Om(M)}if(E)return;T.set(D.serviceId,{at:Date.now(),value:B}),v(M=>({...M,[D.serviceId]:B}))}}))}catch(P){!E&&(!x||R)&&f(P instanceof Error?P.message:"暂时无法读取中转列表,请重试。")}finally{E||(a(!1),I=setTimeout(()=>{_(!1)},2e3))}};return _(!0),()=>{E=!0,k.abort(),clearTimeout(I)}},[e.id,e.url,h]),b.useEffect(()=>{const E=g&&o?.items.find(x=>x.serviceId===g.targetPeerId);g&&o&&(!E||!E.available)&&(m(void 0),y(""),f(E?fr(E):"该服务已不可见,请刷新列表或联系入口管理员。"))},[o,g]);const C=async E=>{if(!c){d(!0),t(!0),f("");try{await E()}catch(x){f(x instanceof Error?x.message:"暂时无法连接,请重试。")}finally{d(!1),t(!1)}}},A=async E=>{const x=await d2(o.route,E.serviceId);try{const I=await Gd({...x,url:o.route.url,serviceOrigin:void 0,entryServiceId:o.route.targetPeerId,routes:[o.route]});if(I==="invitationRequired"){v(k=>({...k,[E.serviceId]:{error:fr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}}));return}if(I==="passwordRequired"){m(x);return}await n(x)}catch(I){if(!(I instanceof Lt)){const k=Om(I);throw v(T=>({...T,[E.serviceId]:k})),new Error(k.error)}m(x)}};return l.jsxs("div",{className:"service-form",children:[g?l.jsxs("form",{className:"service-form",onSubmit:E=>{E.preventDefault(),C(async()=>{try{await r?.(g,w)}catch(x){const I=Un(x).code;throw(I==="PASSWORD_NOT_CONFIGURED"||I==="TARGET_PASSWORD_REQUIRED"||I==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(v(k=>({...k,[g.targetPeerId]:{error:fr({error:I==="TARGET_SECURITY_UPGRADE_REQUIRED"?I:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}})),m(void 0)),x}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:w,disabled:c,onChange:E=>y(E.target.value)})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:c||!w,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(E=>E+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(Je,{size:16,className:"service-spinning"}),"正在读取可中转的服务…"]}):o&&l.jsxs("div",{className:"service-list",children:[o.items.map(E=>l.jsxs("button",{type:"button",className:"service-row-open service-full-width",disabled:c||!E.available||S[E.serviceId]?.blocked||E.authorized&&!S[E.serviceId],onClick:()=>{C(()=>A(E))},children:[l.jsx("span",{className:"service-icon",children:l.jsx(ii,{size:19})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:Pw(E)}),l.jsxs("span",{className:"service-description",children:[E.serviceId.slice(-12)," · ",E.available?S[E.serviceId]?.error||(E.authorized?S[E.serviceId]?.status==="authorized"?"已获中转和目标访问授权 · 连接":S[E.serviceId]?.status==="passwordRequired"?"已获中转授权 · 此设备未获目标访问授权,请登录目标服务":"已获中转授权 · 正在核验目标访问权限":"尚未获中转授权 · 授权此设备并检查目标权限"):fr(E)]})]}),l.jsx(Ln,{size:16})]},E.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(Je,{size:16,className:"service-spinning"}),"正在授权并连接目标服务…"]}),!i&&l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:c,onClick:()=>p(E=>E+1),children:"刷新列表"})]}),u&&l.jsx("p",{className:"service-error",role:"alert",children:u})]})}function y0({service:e,onBusyChange:t,recoverEntry:n,onRecovered:r,onCancelRecovery:o}){const s={...e,targetPeerId:e.targetPeerId,serviceName:e.label},[i,a]=b.useState(()=>e.routes??Xt(s)),[c,d]=b.useState([]),[u,f]=b.useState(!0),[h,p]=b.useState(!1),[g,m]=b.useState(""),w=U=>{p(U),t(U)},[y,S]=b.useState(),[v,C]=b.useState(""),[A,E]=b.useState(""),[x,I]=b.useState(""),[k,T]=b.useState(!1),[_,R]=b.useState(),P=async()=>{const U=await Il(n,s.targetPeerId),J={canManage:U.canManage,active:U.grants.some(Q=>Q.active)};return R(J),J};b.useEffect(()=>{if(!n)return;let U=!1;return Il(n,s.targetPeerId).then(J=>{U||R({canManage:J.canManage,active:J.grants.some(Q=>Q.active)})}).catch(()=>{U||m("无法核对入口授权,请检查连接或联系入口管理员。")}),()=>{U=!0}},[n?.targetPeerId,n?.url,s.targetPeerId]);const[N,L]=b.useState(),[D,O]=b.useState(),[B,M]=b.useState(!1);b.useEffect(()=>{let U=!1;return yt().then(J=>{U||d(J.filter(Q=>Q.targetPeerId&&Q.targetPeerId!==e.targetPeerId))}).catch(()=>{U||m("暂时无法读取可用服务。")}).finally(()=>{U||f(!1)}),()=>{U=!0}},[e.targetPeerId]);const F=U=>c.find(J=>J.targetPeerId===U.targetPeerId)?.label||new URL(U.url).host,H=async U=>{w(!0),m(""),I("");try{await U()}catch(J){const Q=J instanceof Error?J.message:"";m(/AUTHORIZATION|DENIED/.test(Q)?"当前设备没有入口管理权限。请让管理员分享备用连接邀请,或使用入口密码授权。":"暂时无法完成。请确认入口能连接目标服务,且目标地址、证书和授权有效。")}finally{w(!1)}},$=async(U,J)=>{const Q={url:U.serviceOrigin||U.url,targetPeerId:U.targetPeerId};await H(async()=>{const Y=await Il(Q,s.targetPeerId);if(!Y.grants.some(K=>K.active)){if(!Y.canManage&&J===void 0){S(U);return}await tm(s,Q,J)}const Ce=[...i.filter(K=>K.targetPeerId!==Q.targetPeerId||K.url!==Q.url),Q];await ua(e,Ce),a(Ce),S(void 0),C("")})};if(n)return l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["仅恢复此设备通过“",F(n),"”连接“",e.label,"”的中转权限。目标服务会单独验证访问权限。"]}),!_&&!g&&l.jsx("p",{role:"status",children:"正在核对入口授权…"}),_&&!_.active&&!_.canManage&&l.jsxs("p",{role:"status",className:"service-help",children:["当前设备没有此入口的授权管理权限。请让入口管理员授予此设备到“",e.label,"”的中转权限或分享对应的备用连接邀请。"]}),_&&(_.active||_.canManage)&&l.jsx("button",{className:"service-button service-primary",disabled:h,onClick:()=>{H(async()=>{const U=await P();if(!U.active){if(!U.canManage)throw new Error("AUTHORIZATION_DENIED");await tm(s,n)}if(!(await P()).active)throw new Error("AUTHORIZATION_DENIED");await r?.()})},children:h?"正在核对并连接…":_.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(D)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:D,onFocus:U=>U.target.select()})]}),l.jsxs("button",{type:"button",className:"service-button service-primary",onClick:()=>{qf(D).then(U=>{M(U),U||m("无法自动复制,请长按链接复制。")})},children:[l.jsx(oi,{size:16}),B?"已复制":"复制邀请链接"]}),l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:()=>{O(void 0),M(!1)},children:"返回备用连接"}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g})]});if(y)return l.jsxs("form",{className:"service-form",onSubmit:U=>{U.preventDefault(),$(y,v).finally(()=>C(""))},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:v,onChange:U=>C(U.target.value),autoComplete:"current-password",disabled:h,autoFocus:!0})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:h||!v,children:h?"正在授权…":"授权并启用"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>{S(void 0),C("")},children:"取消"}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g})]});const ee=i.filter(U=>U.targetPeerId===s.targetPeerId),ne=i.filter(U=>U.targetPeerId!==s.targetPeerId),te=c.flatMap(U=>Dt({...U,targetPeerId:U.targetPeerId}).map(J=>({...U,id:JSON.stringify([U.id,J]),url:J,serviceOrigin:J}))),le=async()=>{if(!h){w(!0),T(!0),m(""),I("");try{a(await f2({...e,routes:i},A)),E(""),I("备用地址已验证并保存。")}catch(U){m(U instanceof Error?U.message:"暂时无法添加地址,请重试。")}finally{w(!1),T(!1)}}};return l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"电脑换了网络?添加它在新网络下的地址,原地址连不上时会自动尝试。只接受同一台服务。"}),l.jsxs("form",{className:"service-form",onSubmit:U=>{U.preventDefault(),le()},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"备用地址"}),l.jsx("input",{value:A,onChange:U=>{E(U.target.value),m(""),I("")},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||!A.trim(),children:k?l.jsxs(l.Fragment,{children:[l.jsx(Je,{size:16,className:"service-spinning"}),"正在验证…"]}):"验证并添加"})]}),g&&l.jsx("p",{role:"alert",className:"service-error",children:g}),x&&l.jsx("p",{role:"status",className:"service-help",children:x}),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(U=>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:U.url}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`移除地址 ${U.url}`,disabled:h,onClick:()=>L(U),children:"移除"})]}),N?.targetPeerId===U.targetPeerId&&N.url===U.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:()=>L(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{H(async()=>{const J=i.filter(Q=>Q.targetPeerId!==U.targetPeerId||Q.url!==U.url);await ua(e,J),a(J),L(void 0)})},children:"确认移除"})]})]})]},U.url))}),l.jsxs("details",{className:"service-relay-options",children:[l.jsxs("summary",{children:["通过其他服务中转",ne.length?`(${ne.length})`:""]}),l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"所有直连地址都不可用时,尝试下方已授权入口;直连恢复后自动切回。"}),ne.length>0&&l.jsx("div",{className:"service-list",children:ne.map(U=>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(ii,{size:18})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:F(U)}),l.jsx("span",{className:"service-description",children:U.url})]}),l.jsx(Pn,{size:16,className:"service-selected"})]}),N?.targetPeerId===U.targetPeerId&&N.url===U.url?l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["撤销此设备经“",F(U),"”所有地址连接目标的权限?如当前无法直连,目标服务将断开。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>L(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{H(async()=>{await u2(s.targetPeerId,U);const J=i.filter(Q=>Q.targetPeerId!==U.targetPeerId);await ua(e,J),a(J),L(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:()=>{H(async()=>{const J=await ex(s,U);O(Mf({v:1,routeOnly:!0,serviceId:s.targetPeerId,name:e.label,serviceUrl:e.serviceOrigin||e.url,entryUrl:U.url,entryServiceId:U.targetPeerId,routeCode:J.routeCode}))})},children:"分享备用连接"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>L(U),children:"撤销授权"})]})]},JSON.stringify([U.targetPeerId,U.url])))}),u?l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Je,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{children:[l.jsx("p",{className:"service-help",children:"添加中转入口"}),te.filter(U=>!i.some(J=>J.targetPeerId===U.targetPeerId&&J.url===U.url)).map(U=>l.jsxs("button",{type:"button",className:"service-row-open service-full-width",disabled:h||i.length>=4,onClick:()=>{$(U)},children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:U.label}),l.jsx("span",{className:"service-description",children:U.url})]}),l.jsx(Ln,{size:16})]},U.id)),c.length===0&&l.jsx("p",{className:"service-empty",children:"添加并登录另一台服务后,可以将它设为中转入口。"})]})]})]}),h&&!k&&l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Je,{size:16,className:"service-spinning"}),"正在验证连接与授权…"]})]})}function jm(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 ZL({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}=At(),m=q=>{try{q.includes("#termdock-invite=")?Hn(q):$e(q)}catch{throw new Error(g(q.includes("#termdock-invite=")?"login.invalidInvitation":"login.invalidAddress"))}},w=q=>{try{return m(q),!0}catch(ce){return _(ce.message),!1}},[y,S]=b.useState([]),[v,C]=b.useState(!0),[A,E]=b.useState(h||(d?{kind:"add",input:u}:{kind:"list"})),[x,I]=b.useState(!1),k=b.useCallback(q=>{I(q),c?.(q)},[c]),[T,_]=b.useState(""),[R,P]=b.useState(),[N,L]=b.useState(),[D,O]=b.useState({}),B=b.useRef(0),M=b.useRef(),F=b.useRef(!0),H=b.useRef(!1),$=q=>F.current&&B.current===q,ee=q=>{(!q||M.current===q)&&(M.current=void 0)},ne=()=>{const q=M.current;q&&p?.discard(q).catch(()=>{}).finally(()=>ee(q))},te=()=>{B.current++,ne(),L(void 0)},le=b.useRef(te);le.current=te;const U=b.useCallback(()=>{le.current(),E(q=>q.kind==="routes"||q.kind==="relay-services"?{kind:"edit",service:q.service}:{kind:"list"}),_(""),P(void 0)},[]),J=A.kind==="add"?"添加服务":A.kind==="edit"?"服务设置":A.kind==="routes"?"备用连接":A.kind==="relay-services"?"可中转的服务":void 0;b.useEffect(()=>{a?.({title:J,...J?{back:U}:{}})},[J,U,a]),b.useEffect(()=>{let q=!1,ce=0;const he=async()=>{const pe=++ce;try{const We=await yt();!q&&ce===pe&&(S(We),_(""))}catch{!q&&ce===pe&&_("暂时无法读取服务列表,请重试。")}finally{!q&&ce===pe&&C(!1)}};he();const je=bc(()=>{he()});return()=>{q=!0,je()}},[]),b.useEffect(()=>(F.current=!0,()=>{F.current=!1,B.current++,ne()}),[]),b.useEffect(()=>{te()},[e?.id,e?.url,e?.targetPeerId]),b.useEffect(()=>{const q=B.current;p&&p.listPins().then(ce=>{$(q)&&O(ce)}).catch(()=>{})},[p]);const Q=async(q,ce,he=q)=>{te();const je=B.current,pe={certificateReviewRequired:!0};try{const We=await ce();return $(je)?We:pe}catch(We){if(!$(je))return pe;if(!p||!["PREVIEW_DISCOVERY_FAILED","PREVIEW_CERTIFICATE_REJECTED"].includes(We?.code||""))throw We;try{const be=await p.inspect(q);if(be.origin!==q||!/^[a-f0-9]{64}$/i.test(be.fingerprint)||!be.receipt)throw new Error("Invalid certificate inspection result");$(je)?(M.current=be.receipt,L({origin:q,fingerprint:be.fingerprint,trustedFingerprint:be.trustedFingerprint,receipt:be.receipt,retry:ce,retryInput:he,changed:!!be.trustedFingerprint&&be.trustedFingerprint.toLowerCase()!==be.fingerprint.toLowerCase(),confirmed:!1,generation:je})):p.discard(be.receipt).catch(()=>{})}catch{$(je)&&_("无法读取此地址的 HTTPS 证书。请检查地址和网络后重试。")}return{certificateReviewRequired:!0}}},Y=async()=>{const q=N;!q||!q.confirmed||!p||await Ce(async()=>{try{if(!$(q.generation)||(await p.trust(q.origin,q.fingerprint,q.receipt),ee(q.receipt),!$(q.generation)))return;const ce=await p.listPins();if(!$(q.generation)||(O(ce),L(void 0),!$(q.generation)))return;const he=await q.retry();if(!$(q.generation))return;he?.passwordRequired?E({kind:"add",input:q.retryInput,passwordRequired:!0}):E({kind:"list"})}catch(ce){if(ee(q.receipt),ce?.code==="PREVIEW_CERTIFICATE_CHANGED"&&$(q.generation)){L(void 0);try{const he=await p.inspect(q.origin);if(he.origin!==q.origin||!/^[a-f0-9]{64}$/i.test(he.fingerprint)||!he.receipt)throw new Error("Invalid certificate inspection result");$(q.generation)?(M.current=he.receipt,L({...q,fingerprint:he.fingerprint,trustedFingerprint:he.trustedFingerprint,receipt:he.receipt,changed:!0,confirmed:!1})):p.discard(he.receipt).catch(()=>{}),$(q.generation)&&_("证书在确认期间发生变化。请重新核对新指纹后再决定是否信任。")}catch{$(q.generation)&&_("证书在确认期间发生变化,且无法重新读取。请稍后重试。")}return}if($(q.generation))throw L(void 0),ce}})},Ce=async q=>{if(H.current||!F.current)return;H.current=!0,k(!0),_("");let ce=B.current;try{const he=q();ce=B.current,await he}catch(he){$(ce)&&_(jm(he)||(he instanceof Error?he.message:"暂时无法完成,请重试。"))}finally{H.current=!1,F.current&&k(!1)}},K=async(q,ce)=>{let he;return await Ce(async()=>{P(void 0);const je=q.includes("#termdock-invite=")?Hn(q):void 0,pe=je?.url||$e(q);try{he=await Q(pe,()=>o(q,ce),q)}catch(We){const be=jm(We),Ke=je?Uv(We):void 0;if(be||Ke?.kind==="connection"){const De=je?new URL(q):void 0;De&&(De.hash="",De.search=""),P({origin:pe,...De?.protocol==="http:"&&De.pathname==="/connect"?{setupUrl:De.href}:{}})}throw Ke?new Error(be||`${Ke.title}。${Ke.description}`):We}he?.passwordRequired?E({kind:"add",input:q,passwordRequired:!0}):he?.certificateReviewRequired||U()}),he},z=b.useRef(!1);b.useEffect(()=>{!f||!u||z.current||(z.current=!0,K(u))},[f,u]);const de=A.kind==="edit"||A.kind==="routes"||A.kind==="relay-services"?y.find(q=>nn(q,A.service))||A.service:void 0,ge=e?y.find(q=>nn(q,e))||e:void 0,Ie=y.filter(q=>!e||!nn(q,e)),Pe=ge?[ge,...Ie]:Ie,Re=l.jsxs(l.Fragment,{children:[v?l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Je,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{className:"service-list",children:[Pe.map(q=>{const ce=!!e&&nn(q,e);return l.jsxs("div",{className:"service-row",children:[l.jsxs("button",{type:"button",className:"service-row-open",disabled:x||ce,onClick:()=>{Ce(async()=>{(await Q(q.url,()=>r(q)))?.passwordRequired&&E({kind:"add",input:q.serviceOrigin||q.url,passwordRequired:!0})})},"aria-label":ce?`当前服务 ${q.label}`:`打开 ${q.label}`,children:[l.jsx("span",{className:"service-icon",children:l.jsx(ii,{size:20})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:q.label}),l.jsx("span",{className:"service-description",children:ce?"当前服务":new URL(q.serviceOrigin||q.url).host})]}),ce?l.jsx(Pn,{size:17,className:"service-selected"}):l.jsx(Ln,{size:16,className:"service-muted"})]}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`管理 ${q.label}`,disabled:x,onClick:()=>{te(),E({kind:"edit",service:q}),_("")},children:l.jsx(Pr,{size:19})})]},q.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:x,onClick:()=>{te(),E({kind:"add"}),_("")},children:[l.jsx(Du,{size:16}),"添加服务"]}),s&&l.jsxs("button",{type:"button",className:"service-button service-secondary",disabled:x,onClick:s,children:[l.jsx(gc,{size:16}),"邀请设备"]})]})]});return l.jsxs("div",{className:"service-manager",children:[!i&&l.jsxs("div",{className:"service-heading",children:[J&&l.jsx("button",{type:"button",className:"service-icon-button","aria-label":"返回服务",disabled:x,onClick:U,children:l.jsx(Pu,{size:20})}),l.jsx("h2",{children:J||"服务"})]}),l.jsx("div",{hidden:!!N,children:A.kind==="relay-services"?n?.(de,k):A.kind==="routes"?t?.(de,k):A.kind==="list"?Re:A.kind==="add"?l.jsx(QL,{onValidate:w,onSave:q=>Ce(async()=>{te();const ce=$e(q);S(await On({id:ce,url:ce,label:new URL(ce).host})),U()}),onTargetChange:()=>{te(),P(void 0),_("")},initialInput:A.input,passwordRequired:A.passwordRequired,busy:x,onSubmit:K}):l.jsx(eD,{onRelayServices:n&&A.service.targetPeerId?()=>E({kind:"relay-services",service:A.service}):void 0,onRoutes:t&&A.service.targetPeerId?()=>E({kind:"routes",service:A.service}):void 0,service:de,busy:x,canRemove:!e||!nn(A.service,e),onSave:q=>{Ce(async()=>{S(await On({...de,label:q})),U()})},onRemove:()=>{Ce(async()=>{S(await YS(A.service.id)),U()})}})}),N&&l.jsxs("section",{className:"service-certificate-review","aria-label":"HTTPS 证书确认",children:[l.jsx("h3",{children:"检查 HTTPS 证书"}),l.jsx("p",{children:N.origin}),N.changed&&l.jsx("p",{role:"alert",children:"当前证书与已保存的信任指纹不同。请通过独立可信渠道重新核对,再决定是否更新信任。"}),l.jsx("p",{children:"请通过独立可信渠道向服务管理员核对以下 SHA-256 指纹。仅查看指纹不会信任证书。"}),l.jsx("code",{children:N.fingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()}),N.trustedFingerprint&&l.jsxs("p",{children:["已保存的指纹:",l.jsx("code",{children:N.trustedFingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:N.confirmed,disabled:x,onChange:q=>L(ce=>ce&&{...ce,confirmed:q.target.checked})}),"我已通过独立可信渠道核对该指纹,并明确同意仅对此精确 HTTPS 地址信任。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:te,children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-primary",disabled:x||!N.confirmed,onClick:()=>{Y()},children:"信任此指纹并重试一次"})]})]}),!N&&p&&Object.keys(D).length>0&&l.jsxs("details",{className:"service-certificate-pins",children:[l.jsxs("summary",{children:["已信任的 HTTPS 证书(",Object.keys(D).length,")"]}),Object.entries(D).map(([q,ce])=>l.jsxs("div",{children:[l.jsxs("p",{children:[q,l.jsx("br",{}),l.jsx("code",{children:ce.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:x,onClick:()=>{Ce(async()=>{const he=B.current;if(await p.revoke(q),!$(he))return;const je=await p.listPins();$(he)&&O(je)})},children:"撤销信任"})]},q))]}),T&&l.jsx("p",{className:"service-error",role:"alert",children:T}),T&&R&&l.jsxs("section",{className:"service-connection-help","aria-label":"连接帮助",children:[l.jsxs("p",{className:"service-address",children:["连接地址:",R.origin]}),l.jsx("p",{className:"service-help",children:"局域网地址通常需要在同一网络内访问。请先确认分享电脑上的服务可以打开。"}),R.setupUrl&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"service-help",children:"若浏览器提示证书错误,可先打开引导完成信任设置,再回到这里点“继续”。打开引导不会接受邀请。"}),l.jsx("a",{className:"service-button service-secondary",href:R.setupUrl,target:"_blank",rel:"noopener noreferrer",children:"打开证书连接引导"})]})]})]})}function QL({onValidate:e,busy:t,onSubmit:n,onSave:r,onTargetChange:o,initialInput:s="",passwordRequired:i=!1}){const a=b.useRef(null),c=()=>e(d.trim())?!0:(a.current?.focus(),!1),[d,u]=b.useState(s),[f,h]=b.useState(""),[p,g]=b.useState(i);return b.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(Je,{size:16,className:"service-spinning"}),"正在连接…"]}):p?"登录并连接":"继续"})]})}function eD({service:e,busy:t,canRemove:n,onSave:r,onRemove:o,onRoutes:s,onRelayServices:i}){const[a,c]=b.useState(e.label),[d,u]=b.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(Ln,{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(Ln,{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 ao={},Dl,Mm;function tD(){return Mm||(Mm=1,Dl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Dl}var Ol={},Qn={},Bm;function Wr(){if(Bm)return Qn;Bm=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 Qn.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},Qn.getSymbolTotalCodewords=function(r){return t[r]},Qn.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Qn.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Qn.isKanjiModeEnabled=function(){return typeof e<"u"},Qn.toSJIS=function(r){return e(r)},Qn}var jl={},Fm;function Jf(){return Fm||(Fm=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}}})(jl)),jl}var Ml,Um;function nD(){if(Um)return Ml;Um=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++}},Ml=e,Ml}var Bl,Hm;function rD(){if(Hm)return Bl;Hm=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]},Bl=e,Bl}var Fl={},$m;function oD(){return $m||($m=1,(function(e){const t=Wr().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}})(Fl)),Fl}var Ul={},zm;function sD(){if(zm)return Ul;zm=1;const e=Wr().getSymbolSize,t=7;return Ul.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},Ul}var Hl={},qm;function iD(){return qm||(qm=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}})(Hl)),Hl}var ra={},Km;function w0(){if(Km)return ra;Km=1;const e=Jf(),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 ra.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}},ra.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}},ra}var $l={},ws={},Gm;function aD(){if(Gm)return ws;Gm=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]})(),ws.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},ws.exp=function(r){return e[r]},ws.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},ws}var Wm;function cD(){return Wm||(Wm=1,(function(e){const t=aD();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}})($l)),$l}var zl,Vm;function lD(){if(Vm)return zl;Vm=1;const e=cD();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},zl=t,zl}var ql={},Kl={},Gl={},Ym;function b0(){return Ym||(Ym=1,Gl.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Gl}var un={},Xm;function v0(){if(Xm)return un;Xm=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
|
+
]))+`;un.KANJI=new RegExp(n,"g"),un.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),un.BYTE=new RegExp(r,"g"),un.NUMERIC=new RegExp(e,"g"),un.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return un.testKanji=function(c){return o.test(c)},un.testNumeric=function(c){return s.test(c)},un.testAlphanumeric=function(c){return i.test(c)},un}var Jm;function Vr(){return Jm||(Jm=1,(function(e){const t=b0(),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}}})(Kl)),Kl}var Zm;function dD(){return Zm||(Zm=1,(function(e){const t=Wr(),n=w0(),r=Jf(),o=Vr(),s=b0(),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 w=d(m.mode,p);g+=w+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 w=t.getSymbolTotalCodewords(p),y=n.getTotalCodewordsCount(p,g),S=(w-y)*8;if(m===o.MIXED)return S;const v=S-d(m,p);switch(m){case o.NUMERIC:return Math.floor(v/10*3);case o.ALPHANUMERIC:return Math.floor(v/11*2);case o.KANJI:return Math.floor(v/13);case o.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(p,g){let m;const w=r.from(g,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,w);if(p.length===0)return 1;m=p[0]}else m=p;return c(m.mode,m.getLength(),w)},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}})(ql)),ql}var Wl={},Qm;function uD(){if(Qm)return Wl;Qm=1;const e=Wr(),t=1335,n=21522,r=e.getBCHDigit(t);return Wl.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},Wl}var Vl={},Yl,eg;function fD(){if(eg)return Yl;eg=1;const e=Vr();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))},Yl=t,Yl}var Xl,tg;function hD(){if(tg)return Xl;tg=1;const e=Vr(),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)},Xl=n,Xl}var Jl,ng;function pD(){if(ng)return Jl;ng=1;const e=Vr();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)},Jl=t,Jl}var Zl,rg;function mD(){if(rg)return Zl;rg=1;const e=Vr(),t=Wr();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)}},Zl=n,Zl}var Ql={exports:{}},og;function gD(){return og||(og=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,w;!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],w=typeof i[u]>"u",(w||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})(Ql)),Ql.exports}var sg;function yD(){return sg||(sg=1,(function(e){const t=Vr(),n=fD(),r=hD(),o=pD(),s=mD(),i=v0(),a=Wr(),c=gD();function d(y){return unescape(encodeURIComponent(y)).length}function u(y,S,v){const C=[];let A;for(;(A=y.exec(v))!==null;)C.push({data:A[0],index:A.index,mode:S,length:A[0].length});return C}function f(y){const S=u(i.NUMERIC,t.NUMERIC,y),v=u(i.ALPHANUMERIC,t.ALPHANUMERIC,y);let C,A;return a.isKanjiModeEnabled()?(C=u(i.BYTE,t.BYTE,y),A=u(i.KANJI,t.KANJI,y)):(C=u(i.BYTE_KANJI,t.BYTE,y),A=[]),S.concat(v,C,A).sort(function(x,I){return x.index-I.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function h(y,S){switch(S){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(S,v){const C=S.length-1>=0?S[S.length-1]:null;return C&&C.mode===v.mode?(S[S.length-1].data+=v.data,S):(S.push(v),S)},[])}function g(y){const S=[];for(let v=0;v<y.length;v++){const C=y[v];switch(C.mode){case t.NUMERIC:S.push([C,{data:C.data,mode:t.ALPHANUMERIC,length:C.length},{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.ALPHANUMERIC:S.push([C,{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.KANJI:S.push([C,{data:C.data,mode:t.BYTE,length:d(C.data)}]);break;case t.BYTE:S.push([{data:C.data,mode:t.BYTE,length:d(C.data)}])}}return S}function m(y,S){const v={},C={start:{}};let A=["start"];for(let E=0;E<y.length;E++){const x=y[E],I=[];for(let k=0;k<x.length;k++){const T=x[k],_=""+E+k;I.push(_),v[_]={node:T,lastCount:0},C[_]={};for(let R=0;R<A.length;R++){const P=A[R];v[P]&&v[P].node.mode===T.mode?(C[P][_]=h(v[P].lastCount+T.length,T.mode)-h(v[P].lastCount,T.mode),v[P].lastCount+=T.length):(v[P]&&(v[P].lastCount=T.length),C[P][_]=h(T.length,T.mode)+4+t.getCharCountIndicator(T.mode,S))}}A=I}for(let E=0;E<A.length;E++)C[A[E]].end=0;return{map:C,table:v}}function w(y,S){let v;const C=t.getBestModeForData(y);if(v=t.from(S,C),v!==t.BYTE&&v.bit<C.bit)throw new Error('"'+y+'" cannot be encoded with mode '+t.toString(v)+`.
|
|
11
|
+
Suggested mode is: `+t.toString(C));switch(v===t.KANJI&&!a.isKanjiModeEnabled()&&(v=t.BYTE),v){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(S){return S.reduce(function(v,C){return typeof C=="string"?v.push(w(C,null)):C.data&&v.push(w(C.data,C.mode)),v},[])},e.fromString=function(S,v){const C=f(S,a.isKanjiModeEnabled()),A=g(C),E=m(A,v),x=c.find_path(E.map,"start","end"),I=[];for(let k=1;k<x.length-1;k++)I.push(E.table[x[k]].node);return e.fromArray(p(I))},e.rawSplit=function(S){return e.fromArray(f(S,a.isKanjiModeEnabled()))}})(Vl)),Vl}var ig;function wD(){if(ig)return Ol;ig=1;const e=Wr(),t=Jf(),n=nD(),r=rD(),o=oD(),s=sD(),i=iD(),a=w0(),c=lD(),d=dD(),u=uD(),f=Vr(),h=yD();function p(E,x){const I=E.size,k=s.getPositions(x);for(let T=0;T<k.length;T++){const _=k[T][0],R=k[T][1];for(let P=-1;P<=7;P++)if(!(_+P<=-1||I<=_+P))for(let N=-1;N<=7;N++)R+N<=-1||I<=R+N||(P>=0&&P<=6&&(N===0||N===6)||N>=0&&N<=6&&(P===0||P===6)||P>=2&&P<=4&&N>=2&&N<=4?E.set(_+P,R+N,!0,!0):E.set(_+P,R+N,!1,!0))}}function g(E){const x=E.size;for(let I=8;I<x-8;I++){const k=I%2===0;E.set(I,6,k,!0),E.set(6,I,k,!0)}}function m(E,x){const I=o.getPositions(x);for(let k=0;k<I.length;k++){const T=I[k][0],_=I[k][1];for(let R=-2;R<=2;R++)for(let P=-2;P<=2;P++)R===-2||R===2||P===-2||P===2||R===0&&P===0?E.set(T+R,_+P,!0,!0):E.set(T+R,_+P,!1,!0)}}function w(E,x){const I=E.size,k=d.getEncodedBits(x);let T,_,R;for(let P=0;P<18;P++)T=Math.floor(P/3),_=P%3+I-8-3,R=(k>>P&1)===1,E.set(T,_,R,!0),E.set(_,T,R,!0)}function y(E,x,I){const k=E.size,T=u.getEncodedBits(x,I);let _,R;for(_=0;_<15;_++)R=(T>>_&1)===1,_<6?E.set(_,8,R,!0):_<8?E.set(_+1,8,R,!0):E.set(k-15+_,8,R,!0),_<8?E.set(8,k-_-1,R,!0):_<9?E.set(8,15-_-1+1,R,!0):E.set(8,15-_-1,R,!0);E.set(k-8,8,1,!0)}function S(E,x){const I=E.size;let k=-1,T=I-1,_=7,R=0;for(let P=I-1;P>0;P-=2)for(P===6&&P--;;){for(let N=0;N<2;N++)if(!E.isReserved(T,P-N)){let L=!1;R<x.length&&(L=(x[R]>>>_&1)===1),E.set(T,P-N,L),_--,_===-1&&(R++,_=7)}if(T+=k,T<0||I<=T){T-=k,k=-k;break}}}function v(E,x,I){const k=new n;I.forEach(function(N){k.put(N.mode.bit,4),k.put(N.getLength(),f.getCharCountIndicator(N.mode,E)),N.write(k)});const T=e.getSymbolTotalCodewords(E),_=a.getTotalCodewordsCount(E,x),R=(T-_)*8;for(k.getLengthInBits()+4<=R&&k.put(0,4);k.getLengthInBits()%8!==0;)k.putBit(0);const P=(R-k.getLengthInBits())/8;for(let N=0;N<P;N++)k.put(N%2?17:236,8);return C(k,E,x)}function C(E,x,I){const k=e.getSymbolTotalCodewords(x),T=a.getTotalCodewordsCount(x,I),_=k-T,R=a.getBlocksCount(x,I),P=k%R,N=R-P,L=Math.floor(k/R),D=Math.floor(_/R),O=D+1,B=L-D,M=new c(B);let F=0;const H=new Array(R),$=new Array(R);let ee=0;const ne=new Uint8Array(E.buffer);for(let Q=0;Q<R;Q++){const Y=Q<N?D:O;H[Q]=ne.slice(F,F+Y),$[Q]=M.encode(H[Q]),F+=Y,ee=Math.max(ee,Y)}const te=new Uint8Array(k);let le=0,U,J;for(U=0;U<ee;U++)for(J=0;J<R;J++)U<H[J].length&&(te[le++]=H[J][U]);for(U=0;U<B;U++)for(J=0;J<R;J++)te[le++]=$[J][U];return te}function A(E,x,I,k){let T;if(Array.isArray(E))T=h.fromArray(E);else if(typeof E=="string"){let L=x;if(!L){const D=h.rawSplit(E);L=d.getBestVersionForData(D,I)}T=h.fromString(E,L||40)}else throw new Error("Invalid data");const _=d.getBestVersionForData(T,I);if(!_)throw new Error("The amount of data is too big to be stored in a QR Code");if(!x)x=_;else if(x<_)throw new Error(`
|
|
12
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
13
|
+
Minimum version required to store current data is: `+_+`.
|
|
14
|
+
`);const R=v(x,I,T),P=e.getSymbolSize(x),N=new r(P);return p(N,x),g(N),m(N,x),y(N,I,0),x>=7&&w(N,x),S(N,R),isNaN(k)&&(k=i.getBestMask(N,y.bind(null,N,I))),i.applyMask(k,N),y(N,I,k),{modules:N,version:x,errorCorrectionLevel:I,maskPattern:k,segments:T}}return Ol.create=function(x,I){if(typeof x>"u"||x==="")throw new Error("No input text");let k=t.M,T,_;return typeof I<"u"&&(k=t.from(I.errorCorrectionLevel,t.M),T=d.from(I.version),_=i.from(I.maskPattern),I.toSJISFunc&&e.setToSJISFunction(I.toSJISFunc)),A(x,T,k,_)},Ol}var ed={},td={},ag;function x0(){return ag||(ag=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 w=Math.floor((h-u)/c),y=Math.floor((p-u)/c);m=f[a[w*i+y]?1:0]}r[g++]=m.r,r[g++]=m.g,r[g++]=m.b,r[g]=m.a}}})(td)),td}var cg;function bD(){return cg||(cg=1,(function(e){const t=x0();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)}})(ed)),ed}var nd={},lg;function vD(){if(lg)return nd;lg=1;const e=x0();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 nd.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+'"',w='<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,w),w},nd}var dg;function xD(){if(dg)return ao;dg=1;const e=tD(),t=wD(),n=bD(),r=vD();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 ao.create=t.create,ao.toCanvas=o.bind(null,n.render),ao.toDataURL=o.bind(null,n.renderToDataURL),ao.toString=o.bind(null,function(s,i,a){return r.render(s,a)}),ao}var SD=xD();const en="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",ht="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",er=`${ht.replace("hover:bg-surface-2","")} bg-primary text-primary-foreground hover:opacity-90`;function ED(e){return e.serviceName||new URL(e.url).hostname}function bs(e){return e.includes("service:*")?"完整权限":e.includes("session.input")?"可操作":e.includes("session.view")?"只读":e.includes("route.use")?"仅中转":"自定义权限"}function kD({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 CD({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:w,initialViewMode:y,sessions:S=[],grants:v=[],invitations:C=[],onCreateInvite:A,onRevokeInvitation:E,onRevoke:x,onRename:I,loading:k=!1,loadError:T,onRetry:_}){const[R,P]=b.useState(!1),[N,L]=b.useState(""),[D,O]=b.useState(!1),[B,M]=b.useState(),[F,H]=b.useState(),[$,ee]=b.useState(!1),[ne,te]=b.useState(""),le=B||(D?void 0:h);b.useEffect(()=>{O(!1),M(void 0),H(void 0),P(!1),L(""),ee(!1),te("")},[h?.url,h?.targetPeerId,h?.pairingCode,h?.routeCode]);const[U,J]=b.useState({}),[Q,Y]=b.useState(""),[Ce,K]=b.useState(""),[z,de]=b.useState(!1),[ge,Ie]=b.useState(!!g||!!m?.length),[Pe,Re]=b.useState(!f),[q,ce]=b.useState(!0),[he,je]=b.useState(),[pe,We]=b.useState(""),[be,Ke]=b.useState("read"),[De,Pt]=b.useState("selected"),[Nt,it]=b.useState(()=>{const j=S.find(X=>X.sessionId===g||X.sourceSessionId===g);return j?[j.sessionId]:S.length===1?[S[0].sessionId]:[]}),[Ze,W]=b.useState(y||"chat"),[re,ie]=b.useState({}),[Se,ae]=b.useState({}),[Z,oe]=b.useState(),[ye,V]=b.useState(Date.now);b.useEffect(()=>{const j=setInterval(()=>V(Date.now()),1e3);return()=>clearInterval(j)},[]);const[ue,ke]=b.useState(!1),[me,Me]=b.useState(!1),[G,fe]=b.useState(!1),[ve,Ee]=b.useState("idle"),[Te,Ve]=b.useState("never"),wt=b.useRef(0);b.useEffect(()=>()=>{wt.current++},[]);const[Yr,Qe]=b.useState(""),[gn,Si]=b.useState(""),[ft,Go]=b.useState(),[ih,ah]=b.useState(""),[V0,Ei]=b.useState(),[Y0,ki]=b.useState(),[zn,X0]=b.useState("services"),[Xr,Hc]=b.useState(),[$c,ch]=b.useState(""),[Wo,lh]=b.useState(!1),[dh,Vo]=b.useState(),[cn,Ii]=b.useState(!1),[Jr,uh]=b.useState([]),Ci=m?.length?m:g?[g]:[],zc=JSON.stringify(Ci),fh=b.useRef(),Yo=Ci.filter(j=>!S.some(X=>X.sessionId===j||X.sourceSessionId===j));b.useEffect(()=>{!Ci.length||fh.current===zc||Yo.length||(fh.current=zc,it([...new Set(Ci.map(j=>S.find(X=>X.sessionId===j||X.sourceSessionId===j).sessionId))]),Pt("selected"),Ie(!0),Re(!1))},[zc,S]);const qc=c||location.origin,hh=j=>{try{return["localhost","127.0.0.1","[::1]"].includes(new URL(j).hostname)}catch{return!1}},ph=u.filter(j=>!hh(j.url)),J0=hh(qc)&&(ph.find(j=>!new URL(j.url).hostname.endsWith(".local"))||ph[0])?.url||"",lr=he??J0;let Kc;try{Kc=new URL(lr==="custom"?$e(pe):lr||qc).hostname}catch{}const Z0=!!Kc&&["localhost","127.0.0.1","[::1]"].includes(Kc),Xo=S.filter(j=>Nt.includes(j.sessionId)),Q0=De==="all"||be==="full"?"全部终端":Xo.map(j=>Se[j.sessionId]?.name||j.name).join("、"),eS=j=>{if(Ve(j),j==="never")Si("");else if(j!=="custom"){const X=new Date(Date.now()+Number(j));Si(new Date(X.getTime()-X.getTimezoneOffset()*6e4).toISOString().slice(0,16))}},Gc=v.filter(j=>j.revokedAt===void 0&&(!j.expiresAt||j.expiresAt>Date.now())),Wc=v.filter(j=>!Gc.includes(j)),Jo=[...new Set(Gc.map(j=>j.subjectId))].map(j=>{const X=Gc.filter(Ge=>Ge.subjectId===j);return{subjectId:j,grants:X,name:j===s?"此设备":X.find(Ge=>Ge.label)?.label||"未命名设备"}}).sort((j,X)=>+(X.subjectId===s)-+(j.subjectId===s)),Zr=!Xr&&!Wo&&f&&!Pe&&!ge&&!le,tS=()=>{Hc(void 0),lh(!1),Re(!1),Ie(!1),Go(void 0),ke(!1),Y(""),K(""),Vo(void 0),Ei(void 0),ki(void 0),je(void 0),We(""),Me(!1),fe(!1),Ee("idle"),wt.current++},mh=()=>{Me(!1),fe(!1),Ee("idle"),wt.current++,Go(void 0),oe(void 0),Ie(!0),Re(!1),ke(!1),Y(""),K("")},nS=j=>j.subjectId===s?"此设备":j.label||"未命名设备",Vc=()=>{cn?Ii(!1):$?(ee(!1),te(""),Y("")):t()},Yc=b.useRef(null);vi(Yc,!0,()=>{z||Vc()}),b.useLayoutEffect(()=>{Yc.current?.focus({preventScroll:!0})},[]),b.useEffect(()=>{let j=!1;if(ah(""),ft&&G)try{SD.toDataURL(ft.url,{width:220,margin:3,errorCorrectionLevel:"M",color:ID()}).then(X=>{j||ah(X)}).catch(()=>{})}catch{}return()=>{j=!0}},[ft,G]);async function Ri(j){de(!0),Y(""),K(""),H(void 0);try{await e(j);const{url:X,targetPeerId:Ge,serviceName:qn,serviceOrigin:dr}=j;await On({id:Ge,url:X,targetPeerId:Ge,label:qn||new URL(X).host,serviceOrigin:dr,entryServiceId:j.entryServiceId}),M(void 0),O(!0),Re(!1),K("已连接。")}catch(X){j.routeOnly&&X instanceof Lt?(M(j),P(!0)):j.pairingCode||j.routeCode?(M(j),H(Uv(X))):Y("暂时无法连接,请检查网络后重试。")}finally{de(!1)}}async function gh(j){if(j?.preventDefault(),!A||Yo.length)return;Y(""),K("");const X=Nt.filter(Ot=>S.some(yn=>yn.sessionId===Ot));if(be!=="full"&&De==="selected"&&!X.length){Y("请选择至少一个 Session。");return}const Ge=X.map(Ot=>S.find(yn=>yn.sessionId===Ot)?.sourceSessionId||Ot),qn=Object.fromEntries(X.flatMap(Ot=>{const yn=Se[Ot],Zo=S.find(aS=>aS.sessionId===Ot),Qo=yn?.name?.trim(),Ai=yn?.icon,Qr={...Qo&&Qo!==Zo.name?{name:Qo}:{},...Ai?{icon:Ai}:{}};return Object.keys(Qr).length?[[Zo.sourceSessionId||Ot,Qr]]:[]}));if(be!=="full"&&De==="selected"&&!VL(qn,{kind:"sessions",sessionIds:Ge})){Y("请检查分享名称和图标。");return}const dr=gn?new Date(gn).getTime():void 0;if(dr!==void 0&&(!Number.isFinite(dr)||dr<=Date.now())){Y("授权到期时间必须晚于现在。");return}let Ti;if(lr==="custom")try{Ti=$e(pe)}catch{Y("请输入有效的接入地址,例如 https://192.168.1.23:9834。");return}else lr&&(Ti=lr);de(!0);try{const Ot={viewMode:Ze,...w==="split"&&Ge.length>1?{viewLayout:"split"}:{},...be!=="full"&&De==="selected"&&Object.keys(qn).length?{sessionAppearance:qn}:{},...be!=="full"&&(re.android?.length||re.computers?.length||re.directories?.length)?{resources:re}:{},...d?{includeBackup:q}:{},...Ti?{entryAddress:Ti}:{},scope:be==="full"||De==="all"?{kind:"service"}:{kind:"sessions",sessionIds:Ge},actions:be==="full"?["service:*"]:be==="write"?["session.view","session.input","session.resize"]:["session.view"],...Yr.trim()?{label:Yr.trim()}:{},...dr===void 0?{}:{expiresAt:dr}},yn=++wt.current,Zo=A(Ot),Qo=dm(Zo.then(Qr=>Qr.url)),Ai=await Zo;if(yn!==wt.current)return;oe(Ot),Go(Ai),fe(!1),Ee("idle"),Qo.then(Qr=>{yn===wt.current&&Ee(Qr?"copied":"failed")})}catch(Ot){Y(Ot instanceof Error&&Ot.message.startsWith("无法分享备用连接:")?"无法分享备用连接:需要入口管理员授权。你也可以关闭“包含备用连接”,生成直连邀请。":"暂时无法生成邀请,请确认当前设备有授权管理权限。")}finally{de(!1)}}async function rS(){if(!ft||ft.expiresAt<=Date.now())return;const j=wt.current,X=await dm(ft.url);j===wt.current&&Ee(X?"copied":"failed")}const Xc=(j,X)=>j.kind==="service"?"全部终端":j.sessionIds.map(Ge=>X?.[Ge]?.name||S.find(qn=>qn.sessionId===Ge||qn.sourceSessionId===Ge)?.name||Ge).join("、"),yh=j=>E?V0===j?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:`${ht} text-xs text-muted-foreground`,disabled:z,onClick:()=>Ei(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${ht} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),Y(""),K("");try{await E(j),ft?.id===j&&(wt.current++,Go(void 0),Ee("idle"),fe(!1)),Ei(void 0),K("邀请已撤销,原链接和二维码已失效。")}catch{Y("暂时无法撤销。如果邀请已被接受,请在设备列表撤销访问权限。")}finally{de(!1)}},children:"确认撤销邀请"})]})]}):l.jsx("button",{type:"button",className:`${ht} text-xs text-destructive`,disabled:z,onClick:()=>{Ei(j),K("")},children:"撤销邀请"}):null,oS=$?"输入新的邀请链接":U.title||(Xr?"设备名称":Wo?zn==="devices"?"授权详情":"连接详情":cn?"选择终端":ge?"分享":Pe&&f?"添加服务":f?"服务与设备":"连接 Termdock"),sS=$||!!U.back||!!Xr||Wo||cn||f&&(Pe||ge),iS=()=>{if($){ee(!1),te(""),Y("");return}if(U.back){U.back();return}cn?Ii(!1):tS()},wh=j=>j.every(X=>X.routeTargetServiceId)?`${new Set(j.map(X=>X.routeTargetServiceId)).size} 台服务`:j.some(X=>X.scope.kind==="service")?"全部终端":`${new Set(j.flatMap(X=>X.scope.kind==="sessions"?X.scope.sessionIds:[])).size} 个终端`;return $n.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:j=>{j.target===j.currentTarget&&!z&&Vc()},children:l.jsxs("div",{ref:Yc,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:[sS&&l.jsx("button",{type:"button",className:`${ht} -ml-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:z,onClick:iS,"aria-label":$?"返回邀请":cn?"取消选择终端":zn==="devices"?"返回设备":"返回服务",children:l.jsx(Pu,{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:`${ht} -mr-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:z,onClick:Vc,"aria-label":"关闭",children:l.jsx(ai,{size:20})})]}),Zr&&!U.title&&l.jsx("div",{className:"flex gap-6",role:"tablist","aria-label":"管理内容",children:[["services","服务"],["devices","设备"]].map(([j,X])=>l.jsxs("button",{type:"button",role:"tab","aria-selected":zn===j,"aria-controls":`federation-${j}`,id:`federation-tab-${j}`,className:`min-h-11 border-b-2 px-1 text-sm transition ${zn===j?"border-primary font-medium text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,onClick:()=>{X0(j),ke(!1),Vo(void 0),Y(""),K("")},children:[X,j==="devices"&&Jo.length>0&&l.jsx("span",{className:"ml-1.5 text-xs text-muted-foreground",children:Jo.length})]},j))})]}),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:[(Zr&&zn==="services"||Pe&&!ge&&!le)&&l.jsx(ZL,{initialServicePage:p,renderRelayServices:(j,X)=>l.jsx(JL,{service:j,onBusyChange:X,onConnect:e,onConnectWithPassword:n}),renderRoutes:(j,X)=>l.jsx(y0,{service:j,onBusyChange:X}),hideHeader:!0,initiallyAdding:Pe,current:a?{id:a,targetPeerId:a,url:c||location.origin,label:i||"当前服务"}:void 0,onNavigation:J,onBusyChange:de,onInvite:A?mh:void 0,onOpen:async j=>{if(o)return o(j);j.targetPeerId?await Ri({...j,targetPeerId:j.targetPeerId,serviceName:j.label}):r&&await r(j.url)},onAdd:async(j,X)=>{if(r)return r(j,X);await Ri(Hn(j))}}),Zr&&zn==="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:"可访问此服务的设备"}),k?l.jsxs("p",{role:"status",className:"flex items-center gap-2 py-5 text-sm text-muted-foreground",children:[l.jsx(Je,{size:16,className:"animate-spin"}),"正在读取设备…"]}):l.jsxs("div",{className:"divide-y divide-border",children:[Jo.map(j=>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(j.grants.find(X=>X.label)?.label||(j.subjectId===s?navigator.userAgent:""))?l.jsx(gc,{size:19}):l.jsx(Lu,{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:j.name}),I&&(x||j.subjectId===s)&&l.jsx("button",{type:"button","aria-label":`重命名 ${j.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:()=>{Hc(j.subjectId),ch(j.grants.find(X=>X.label)?.label||"")},children:l.jsx(Wy,{size:14})})]}),j.subjectId===s&&j.grants.find(X=>X.label)?.label&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:j.grants.find(X=>X.label)?.label}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[bs(j.grants.flatMap(X=>X.actions))," · ",wh(j.grants)]})]}),x&&j.subjectId!==s&&dh!==j.subjectId&&l.jsx("button",{type:"button",className:`${ht} -mr-2 text-xs text-muted-foreground hover:text-destructive`,disabled:z,"aria-label":`撤销 ${j.name} 的访问权限`,onClick:()=>Vo(j.subjectId),children:"撤销"})]}),l.jsx(kD,{profile:j.grants.find(X=>X.deviceProfile)?.deviceProfile,subjectId:j.subjectId}),dh===j.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:`${ht} text-xs text-muted-foreground`,disabled:z,onClick:()=>Vo(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${ht} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),Y("");try{for(const X of j.grants)await x?.(X.id);Vo(void 0),K("设备访问权限已撤销。")}catch{Y("暂时无法撤销,请重试。")}finally{de(!1)}},children:"确认撤销"})]})]})]},j.subjectId)),Jo.length===0&&!T&&l.jsxs("p",{className:"py-5 text-sm text-muted-foreground",children:["暂无设备授权。",A?"可通过邀请添加设备。":""]})]}),A&&l.jsxs("button",{type:"button",className:`${ht} mt-4 inline-flex w-full items-center justify-center gap-2 border border-border text-sm`,disabled:z,onClick:mh,children:[l.jsx(Du,{size:16}),"邀请设备"]}),C.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:C.map(j=>l.jsxs("div",{className:"py-3",children:[l.jsx("p",{className:"text-sm",children:j.label||"设备邀请"}),l.jsxs("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:[bs(j.actions)," · ",Xc(j.scope,j.sessionAppearance)]}),l.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[new Date(j.invitationExpiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})," 前有效"]}),l.jsx(_l,{resources:j.resources}),yh(j.id)]},j.id))})]}),Wc.length>0&&l.jsxs("details",{className:"mt-4 text-xs text-muted-foreground",children:[l.jsxs("summary",{className:"cursor-pointer py-2",children:["已失效的授权(",Wc.length,")"]}),l.jsx("div",{className:"mt-1 space-y-2 border-l border-border pl-3",children:Wc.map(j=>l.jsxs("p",{className:"flex gap-3",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate",children:nS(j)}),l.jsx("span",{className:"shrink-0",children:j.revokedAt!==void 0?"已撤销":"已到期"})]},j.id))})]})]}),Xr&&l.jsxs("form",{className:"space-y-4",onSubmit:async j=>{j.preventDefault(),de(!0),Y("");try{await I?.(Xr,$c.trim()),Hc(void 0)}catch{Y("暂时无法保存设备名称,请重试。")}finally{de(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"设备名称"}),l.jsx("input",{autoFocus:!0,className:en,maxLength:80,required:!0,value:$c,onChange:j=>ch(j.target.value),placeholder:"例如:我的 iPhone、办公室电脑"})]}),l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"为设备起一个容易辨认的名字,会同步显示在此服务的设备列表中。"}),l.jsx("button",{type:"submit",className:`${er} w-full`,disabled:z||!$c.trim(),children:z?"正在保存…":"保存名称"})]}),Wo&&l.jsx("section",{className:"space-y-5",children:zn==="devices"?Jo.map(j=>l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-sm font-medium",children:j.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:[bs(j.grants.flatMap(X=>X.actions))," · ",wh(j.grants)]})]}),j.grants.map(X=>l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:X.routeTargetServiceId?"允许经此入口访问":bs(X.actions)}),l.jsxs("dd",{className:"mt-1 leading-relaxed",children:[X.routeTargetServiceId?X.routeTargetName||"指定服务":Xc(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(_l,{resources:X.resources})]}),x&&(X.routeTargetServiceId||j.subjectId!==s)&&(Y0===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:`${ht} text-xs text-muted-foreground`,disabled:z,onClick:()=>ki(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${ht} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),Y("");try{await x(X.id),ki(void 0),K("此项授权已撤销。")}catch{Y("暂时无法撤销,请重试。")}finally{de(!1)}},children:"确认撤销此项授权"})]})]}):l.jsx("button",{type:"button",className:`${ht} mt-1 -ml-3 text-xs text-destructive`,disabled:z,onClick:()=>ki(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:j.subjectId})]})]})]},j.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})]})]})}),$&&l.jsxs("form",{className:"space-y-4 py-1",onSubmit:async j=>{j.preventDefault(),Y("");let X;try{X=Hn(ne.trim())}catch{Y("请输入完整的 Termdock 邀请链接。");return}ee(!1),te(""),await Ri(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:en,type:"text",required:!0,autoFocus:!0,autoComplete:"off",spellCheck:!1,placeholder:"粘贴完整链接",value:ne,onChange:j=>{te(j.target.value),Y("")}})]}),l.jsx("button",{type:"submit",className:`${er} w-full text-sm`,disabled:z||!ne.trim(),children:"接受新邀请"})]}),le&&!ge&&!$&&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(ii,{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:ED(le)})]})]}),F&&l.jsxs("div",{role:"alert",className:"flex gap-3 rounded-xl border border-border bg-surface-2 p-4",children:[F.kind==="connection"?l.jsx(mw,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}):F.kind==="expired"?l.jsx(va,{size:20,className:"mt-0.5 shrink-0 text-warning"}):l.jsx(jy,{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:F.title}),l.jsx("p",{className:"mt-1.5 text-sm leading-6 text-muted-foreground",children:F.description})]})]}),le.routeOnly&&!F&&l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"此邀请提供备用连接,目标服务仍会验证你的访问权限。"}),R?l.jsxs("form",{className:"space-y-3",onSubmit:async j=>{j.preventDefault(),de(!0),Y("");try{await n?.(le,N)}catch(X){Y(X instanceof Error?X.message:"暂时无法登录,请重试。")}finally{L(""),de(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"目标服务密码"}),l.jsx("input",{className:en,type:"password",required:!0,autoFocus:!0,autoComplete:"current-password",value:N,onChange:j=>L(j.target.value)})]}),l.jsx("button",{className:`${er} w-full`,disabled:z||!N,children:z?"正在登录…":"登录并连接"})]}):F&&!F.retryable?l.jsx("button",{type:"button",className:`${er} w-full text-sm`,onClick:()=>{ee(!0),Y("")},children:"输入新的邀请链接"}):l.jsx("button",{type:"button",className:`${er} w-full text-sm`,disabled:z,onClick:()=>{Ri(le)},children:z?"正在连接…":F?"重试连接":"接受邀请"})]}),ge&&!cn&&l.jsxs("section",{children:[!k&&Yo.length>0&&l.jsxs("p",{role:"alert",className:"mb-3 text-xs text-destructive",children:["有 ",Yo.length," 个会话尚未加载或不属于此服务,暂不能生成完整分享。跨服务协作组请分别在所属服务创建邀请。"]}),ft?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(Pn,{size:20})}),l.jsxs("div",{children:[l.jsx("p",{role:"status",className:"text-base font-medium",children:ft.expiresAt<=ye?"邀请链接已过期":ve==="copied"?"链接已复制":"链接已生成"}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:ft.expiresAt<=ye?"重新生成即可获得新链接":"单次使用 · 请在 10 分钟内接受"})]})]}),Z&&l.jsxs("div",{className:"rounded-xl border border-border p-3",children:[l.jsx("p",{className:"break-words text-sm font-medium",children:Xc(Z.scope,Z.sessionAppearance)}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[bs(Z.actions)," · ",Z.viewMode==="chat"?"普通对话":"终端"," · 访问",Z.expiresAt?`至 ${new Date(Z.expiresAt).toLocaleString()}`:"保留至撤销"]}),l.jsx(_l,{resources:Z.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:ft.url,onFocus:j=>j.currentTarget.select(),className:`${en} text-sm`})]}),ft.certificateFingerprint&&l.jsxs("div",{className:"text-xs leading-relaxed text-muted-foreground",children:[l.jsx("p",{children:"接收方会先看到证书安装引导,完成后通过 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:ft.certificateFingerprint})]})]}),ve==="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:"接收者的浏览器须信任 HTTPS 证书;私有 CA 未受信任时会先显示安全拦截。"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1",children:[l.jsxs("button",{type:"button","aria-expanded":G,className:`${ht} inline-flex items-center gap-2 text-xs text-muted-foreground`,onClick:()=>fe(j=>!j),children:[l.jsx(Zy,{size:15}),G?"隐藏二维码":"显示二维码"]}),l.jsx("button",{type:"button",className:`${ht} text-xs text-muted-foreground`,onClick:()=>{wt.current++,Go(void 0),fe(!1),Ee("idle"),K(""),Y("")},children:"调整分享内容 / 重新生成"})]}),G&&(ih?l.jsx("img",{src:ih,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(Je,{size:22,className:"animate-spin text-muted-foreground"})})),ft.id&&yh(ft.id)]}):l.jsxs("form",{id:"federation-invite-form",className:"space-y-3",onSubmit:gh,children:[l.jsxs("fieldset",{disabled:k||z||be==="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(([j,X])=>{const Ge=(be==="full"?"all":De)===j;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 ${Ge?"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:j,checked:Ge,onChange:()=>Pt(j),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${Ge?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:Ge&&l.jsx(Pn,{size:11})}),X]},j)})})]}),De==="selected"&&be!=="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(ti,{icon:Xo.length===1?Se[Xo[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:Q0||(k?"正在准备当前会话…":"选择要分享的会话")})]}),l.jsx("button",{type:"button","aria-label":Nt.length?`已选 ${Nt.length} 个`:"选择终端",className:`${ht} shrink-0 text-xs text-primary`,disabled:k||z,onClick:()=>{uh(Nt),Ii(!0)},children:Nt.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","可操作","允许对话和终端输入"]].map(([j,X,Ge])=>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 ${be===j?"border-primary bg-primary/10":"border-border hover:bg-surface-2"}`,children:[l.jsx("input",{type:"radio",name:"federation-permission",value:j,checked:be===j,onChange:()=>Ke(j),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${be===j?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:be===j&&l.jsx(Pn,{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:Ge})]})]},j))})]}),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","普通对话",si],["terminal","终端",ju]].map(([j,X,Ge])=>l.jsxs("button",{type:"button","aria-pressed":Ze===j,className:`${ht} inline-flex items-center justify-center gap-2 border ${Ze===j?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground"}`,onClick:()=>W(j),children:[l.jsx(Ge,{size:15}),X]},j))})]}),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:`${en} min-w-0 flex-1 text-sm`,value:Te,onChange:j=>eS(j.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:"自定义时间"})]})]}),Te==="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:en,value:gn,onChange:j=>Si(j.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:`${en} min-w-0 flex-1 text-sm`,value:lr,onChange:j=>je(j.target.value),children:[l.jsxs("option",{value:"",children:["当前地址 · ",new URL(qc).host]}),u.map(j=>l.jsxs("option",{value:j.url,children:[j.label," · ",new URL(j.url).host]},j.url)),l.jsx("option",{value:"custom",children:"自定义地址"})]})]}),lr==="custom"&&l.jsx("input",{"aria-label":"自定义接入地址",type:"text",className:en,inputMode:"url",placeholder:"例如:https://192.168.1.23:9834",value:pe,onChange:j=>We(j.target.value)}),Z0&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"当前地址仅供这台电脑使用。其他设备需选择能访问的域名或 IP 地址。"}),be==="write"&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"终端命令可读写该系统用户有权访问的文件。"}),be==="full"&&l.jsx("p",{className:"text-xs leading-5 text-destructive",children:"当前为完整服务权限,包含设置和权限管理。"}),l.jsxs("button",{type:"button","aria-expanded":me,className:"flex min-h-9 w-full items-center justify-between text-xs text-muted-foreground",onClick:()=>Me(j=>!j),children:["更多选项",l.jsxs("span",{className:"flex items-center gap-1",children:["名称、图标与附带资源",l.jsx(Ar,{size:13,className:me?"rotate-180":""})]})]}),me&&l.jsxs("div",{className:"space-y-4 border-t border-border pt-3",children:[be!=="full"&&De==="selected"&&Xo.length>0&&l.jsx(XL,{sessions:Xo,value:Se,onChange:ae}),l.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:en,value:Yr,onChange:j=>Qe(j.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:q,onChange:j=>ce(j.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:be==="full",onChange:j=>Ke(j.target.checked?"full":"read")}),"授予完整服务权限"]}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"完整权限包含所有终端、文件、设备、设置和权限管理。"})]}),be!=="full"&&l.jsx(WL,{value:re,onChange:ie,expanded:!0})]})]})]}),cn&&l.jsxs("section",{children:[l.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"仅允许访问勾选的终端。"}),l.jsxs("div",{className:"space-y-1",children:[S.map(j=>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:Jr.includes(j.sessionId),onChange:X=>uh(X.target.checked?[...Jr,j.sessionId]:Jr.filter(Ge=>Ge!==j.sessionId))}),l.jsx("span",{className:"min-w-0 break-words",children:j.name})]},j.sessionId)),!S.length&&l.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"当前没有可共享的终端。"})]})]}),T&&l.jsxs("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:[T,_&&l.jsx("button",{type:"button",className:`${ht} ml-1 text-sm underline`,onClick:_,children:"重试"})]}),!le&&!U.title&&!Pe&&!Xr&&!Wo&&!cn&&!ft&&!ge&&l.jsxs("div",{className:"mt-4 border-t border-border pt-2",children:[l.jsxs("button",{type:"button",className:`${ht} -ml-3 inline-flex items-center gap-1 bg-transparent text-xs text-muted-foreground`,"aria-expanded":Zr?void 0:ue,onClick:()=>Zr?lh(!0):ke(j=>!j),children:[ge?"有效期与备注":Pe?"手动连接":zn==="devices"?"授权详情":"连接详情",Zr?l.jsx(Ln,{size:14}):l.jsx(Ar,{size:13,className:ue?"rotate-180":""})]}),ue&&l.jsxs("section",{className:"space-y-3 pb-1 pt-2",children:[ge&&l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"block space-y-1 text-sm",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:en,value:Yr,onChange:j=>Qe(j.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:en,value:gn,onChange:j=>Si(j.target.value)})]})]}),!ge&&s&&l.jsxs("p",{className:"break-all text-xs leading-relaxed text-muted-foreground",children:["本设备身份:",s]})]})]}),Q&&l.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:Q}),Ce&&l.jsx("p",{role:"status",className:"mt-3 text-sm text-muted-foreground",children:Ce})]}),ge&&!cn&&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:ft?l.jsxs("button",{type:"button",className:`${er} inline-flex w-full items-center justify-center gap-2`,disabled:z,onClick:()=>{ft.expiresAt<=ye?gh():rS()},children:[l.jsx(oi,{size:16}),z?"正在生成…":ft.expiresAt<=ye?"重新生成链接":"复制邀请链接"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"submit",form:"federation-invite-form",className:`${er} inline-flex w-full items-center justify-center gap-2`,disabled:z||k||Yo.length>0,children:[z&&l.jsx(Je,{size:16,className:"animate-spin"}),z?"正在生成…":k?"正在准备分享…":"生成并复制链接"]}),l.jsxs("p",{className:"mt-2 text-center text-[11px] leading-4 text-muted-foreground",children:["链接 10 分钟内单次接受 · 接收后",gn?"按所选时间到期":"可访问至撤销"]})]})}),cn&&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:`${er} w-full text-sm`,disabled:!Jr.length,onClick:()=>{it(Jr),Pt("selected"),Ii(!1)},children:["使用所选终端(",Jr.length,")"]})})]})}),document.body)}const zo=cr(()=>({modes:{},errors:{}})),ug=e=>zo.setState(t=>({errors:{...t.errors,[e]:void 0}})),In=new Map,sc=e=>e==="terminal"||e==="chat";function Ao(e,t){zo.setState(n=>({modes:{...n.modes,[e]:t}}));try{localStorage.setItem(e,t)}catch{}}const mu=()=>se()?.targetPeerId||location.origin,S0=e=>`termdock:session-view:${mu()}:${e}`;function kB(e){const t=S0(e),n=zo.getState().modes[t];if(n)return n;try{const r=localStorage.getItem(t);if(sc(r))return r}catch{}return"terminal"}function IB(e,t){const n=mu(),r=S0(e);Ao(r,t);let o=In.get(r);o||(o={key:r,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>mu()===n&&!Fe()?.closed},In.set(r,o)),ic(o,t)}async function ic(e,t){if(e.queued=t,e.epoch++,e.writing)return;e.writing=!0;let n=Fe();try{for(;e.queued&&e.current();){const r=e.queued;e.queued=void 0,n=Fe();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(!sc(s.mode))throw new Error("模式保存失败");Fe()===n&&e.current()&&(e.confirmed=s.mode,e.queued||Ao(e.key,s.mode))}}catch{!e.queued&&e.current()&&Fe()===n&&(e.confirmed&&Ao(e.key,e.confirmed),zo.setState(r=>({errors:{...r.errors,[e.key]:"显示模式未保存,请检查连接后重新切换"}})))}finally{e.writing=!1,e.queued&&e.current()?ic(e,e.queued):!e.refs&&In.get(e.key)===e&&In.delete(e.key)}}function RD(e,t=!0,n="terminal",r=!1){const o=se()?.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);sc(u)&&(c=u),sessionStorage.getItem(`termdock:shared-view:${o}`)==="chat"&&(d="chat")}catch{}return b.useEffect(()=>{if(!e||!t)return;let u=In.get(s);u||(u={key:s,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>(se()?.targetPeerId||location.origin)===o&&!Fe()?.closed},In.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=Fe();f.reading=!0;try{const w=await fetch(f.url);if(!w.ok)return;const y=await w.json();if(f.epoch!==g||f.writing||!f.current()||Fe()!==m||In.get(s)!==f)return;if(sc(y.mode))f.confirmed=y.mode,Ao(s,y.mode);else if(y.mode===null&&(r||c)){const S=r?n:c;Ao(s,S),ic(f,S)}}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||In.delete(s))}},[e,t,s,o,n,r]),[i||(r?d:c||d),u=>{if(!e)return;ug(s),Ao(s,u);const f=In.get(s);f&&ic(f,u)},a,()=>ug(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 TD="debug",AD="termdock:debug";function fg(e){return e?new Set(e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean)):new Set}function PD(){if(typeof window>"u")return new Set;const e=fg(new URLSearchParams(window.location.search).get(TD));let t=new Set;try{t=fg(window.localStorage.getItem(AD))}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 ND(e){const t=PD();return t.has("*")||t.has(e)}function _D(e){const t=ND(e);return(...n)=>{t&&console.log(`[debug:${e}]`,...n)}}function jc(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function CB(){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 E0(){if(typeof window>"u")return!1;const e=Be(),t=e.navigator.maxTouchPoints>0||"ontouchstart"in e;return jc()||t&&Math.min(e.innerWidth,e.innerHeight)<768}function Hs(){return jc()}function RB(e){Hs()?e?.focus():e?.focus({preventScroll:!0})}function hg(){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 pg=80,LD=60,DD="termdock:viewport-keyboard-change",OD="termdock:viewport-layout-change",Tn=240,mg=640,gg=360,jD=1500;function MD({measuredHeight:e,documentVisible:t,editableFocused:n}){return t&&n&&e>0}function yg(){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 ac=e=>{const t=typeof e=="number"?e:Number.parseFloat(typeof e=="string"?e:"0");return Number.isFinite(t)&&t>0?Math.round(t):0},k0=(e,t)=>{const n=e.map(ac).filter(r=>r>0);return n.find(r=>r>=Tn)??n[0]??t},$s=()=>typeof window>"u"?mg:k0([Be().innerHeight,document.documentElement?.clientHeight,document.body?.clientHeight,Be().visualViewport?.height,window.screen?.availHeight,window.screen?.height],mg),I0=()=>typeof window>"u"?gg:k0([Be().innerWidth,document.documentElement?.clientWidth,document.body?.clientWidth,Be().visualViewport?.width,window.screen?.availWidth,window.screen?.width],gg),tr=e=>{const t=Number.parseFloat(e||"0");return Number.isFinite(t)?Math.max(0,Math.round(t)):0},C0=jc,R0=()=>typeof window>"u"?!1:Be().navigator.standalone===!0||Be().matchMedia?.("(display-mode: standalone)").matches===!0,T0=()=>{if(typeof window>"u"||!C0()||!R0())return{top:0,right:0,bottom:0,left:0};const e=$s()>=I0(),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(E0()||Be().innerWidth<=768),document.documentElement.dataset.termdockNativeKeyboard=String(Hs()),document.documentElement.dataset.termdockNativePan="false",document.documentElement.dataset.termdockIpadPwa=String(document.documentElement.dataset.termdockPwaStatusBar==="default"&&R0());const t=ac(Be().visualViewport?.height),n=Math.max(0,Math.round(Be().visualViewport?.offsetTop??0)),r=$s(),o=t>=Tn,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,Tn)}px`),a.setProperty("--app-base-vh",`${Math.max(i,Tn)}px`),a.setProperty("--app-visible-vh",`${Math.max(s,Tn)}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=T0();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 FD(e={}){const{cssVarName:t="--app-vh"}=e,n=Mt.useMemo(()=>_D("viewport"),[]),r=Mt.useCallback(()=>{if(typeof window>"u")return 0;const u=Be().visualViewport,f=$s();if(!u)return f;const h=ac(u.height);if(h<Tn&&f>=Tn)return f;const p=u.offsetTop,m=h<f-1&&p>0&&p<=96?h+p:h,w=Math.max(0,Math.min(f,m));return w>0?Math.round(w):f},[]),[o,s]=Mt.useState(r),i=Mt.useRef(0),a=Mt.useRef(0),c=Mt.useRef(0),d=Mt.useRef(!1);return Mt.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},w=()=>{let O={top:0,right:0,bottom:0,left:0};try{const H=m();if(H){const $=getComputedStyle(H);O={top:tr($.paddingTop),right:tr($.paddingRight),bottom:tr($.paddingBottom),left:tr($.paddingLeft)}}}catch{}const B=Be();if(B!==window){const H=B.getComputedStyle(B.document.documentElement);O={top:Math.max(O.top,tr(H.getPropertyValue("--safe-top-inset"))),right:Math.max(O.right,tr(H.getPropertyValue("--safe-right-inset"))),bottom:Math.max(O.bottom,tr(H.getPropertyValue("--safe-bottom-inset"))),left:Math.max(O.left,tr(H.getPropertyValue("--safe-left-inset")))}}const M=T0(),F={top:Math.max(O.top,M.top),right:Math.max(O.right,M.right),bottom:Math.max(O.bottom,M.bottom),left:Math.max(O.left,M.left)};return document.documentElement.style.setProperty("--safe-top-inset",`${F.top}px`),document.documentElement.style.setProperty("--safe-right-inset",`${F.right}px`),document.documentElement.style.setProperty("--safe-bottom-inset",`${F.bottom}px`),document.documentElement.style.setProperty("--safe-left-inset",`${F.left}px`),F},y=(O,B,M,F)=>{const H=Math.max(B,M);if(i.current===0){i.current=H,a.current=O,document.documentElement.style.setProperty("--app-base-vh",`${H}px`);return}const $=Math.abs(O-a.current),ee=F<=pg;($>LD||ee)&&(i.current=H,a.current=O,document.documentElement.style.setProperty("--app-base-vh",`${H}px`))},S=(O="event")=>{u=null,document.documentElement.dataset.termdockNativeKeyboard=String(Hs());const B=Hs()?hg():0;document.documentElement.style.setProperty("--app-native-pan",`${B}px`),document.documentElement.dataset.termdockNativePan=String(B>0),document.documentElement.dataset.termdockTouchViewport=String(E0()||Be().innerWidth<=768);const M=r(),F=Math.round(Be().visualViewport?.offsetTop??0),H=ac(Be().visualViewport?.height),$=H>=Tn?H:M,ee=$s(),ne=I0(),te=Math.max(0,$+F),le=w(),U=le.bottom,J=Math.max(0,i.current-$-U);y(ne,ee,$,J),s(pe=>pe===M?pe:M);const Q=Number.parseInt(document.documentElement.style.getPropertyValue(t)||"0",10);document.documentElement.style.setProperty(t,`${M}px`),document.documentElement.style.setProperty("--app-vv-offset-top",`${F}px`),document.documentElement.style.setProperty("--app-visual-vh",`${$}px`);const Y=i.current,Ce=Math.min(M,$),K=Math.max(0,Math.min(Y,te)),z=Math.max(0,Math.round(Y-Ce-U)),de=yg(),ge=MD({measuredHeight:z,documentVisible:document.visibilityState==="visible",editableFocused:de}),Ie=ge?z:0,Pe=Ie>=pg,Re=-Ie,q=Ie;document.documentElement.style.setProperty("--kb-translate-y",`${Re}px`),document.documentElement.style.setProperty("--kb-margin-top",`${q}px`),document.documentElement.style.setProperty("--kb-height",`${Ie}px`),document.documentElement.style.setProperty("--app-visible-vh",`${K}px`);const ce=Math.abs(Ie-c.current)>1,he=Pe!==d.current;(ce||he)&&(c.current=Ie,d.current=Pe,document.dispatchEvent(new CustomEvent(DD,{detail:{baseHeight:Y,visibleHeight:K,visualViewportHeight:$,offsetTop:F,keyboardHeight:Ie,isOpen:Pe,source:O}}))),(Q!==M||F>0||ce||he)&&n("sync",{cssVarName:t,innerHeight:ee,baseHeight:Y,rawViewportHeight:$,offsetTop:F,visibleHeight:K,rawHeight:M,appliedHeight:M,keyboardViewportHeight:Ce,measuredKeyboardHeight:z,editableFocused:de,applyKeyboardInset:ge,keyboardHeight:Ie,isKeyboardOpen:Pe,safeAreaInsets:le,source:O}),document.dispatchEvent(new CustomEvent(OD,{detail:{height:M,baseHeight:Y,visibleHeight:K,offsetTop:F,source:O}}))},v=()=>{u===null&&(u=window.requestAnimationFrame(()=>{u=null;const O=Be(),B=O.visualViewport,M=[O.innerWidth,O.innerHeight,B?.width,B?.height,B?.offsetTop,B?.offsetLeft,document.visibilityState,yg(),Hs()?hg():0].join(":"),F=h;h=null,(F||M!==p)&&(p=M,S(F||"viewport.settle")),performance.now()<f&&v()}))},C=(O="event")=>{(O.includes("visibilitychange")||O.includes("pageshow"))&&n("schedule",{source:O}),h=O,C0()&&document.visibilityState==="visible"&&(f=performance.now()+jD),v()};C("mount");const A=()=>C("resize"),E=()=>C("native.scroll"),x=()=>C("orientationchange"),I=()=>C("visualViewport.resize"),k=()=>C("visualViewport.scroll"),T=()=>C("focusin"),_=()=>C("focusout"),R=O=>{f=0,c.current=0,d.current=!1;const B=Math.max(i.current,$s(),Tn),M=document.documentElement.style;M.setProperty(t,`${B}px`),M.setProperty("--app-visible-vh",`${B}px`),M.setProperty("--app-vv-offset-top","0px"),M.setProperty("--kb-translate-y","0px"),M.setProperty("--kb-margin-top","0px"),M.setProperty("--kb-height","0px"),s(F=>F===B?F:B),n("keyboard session reset",{source:O,baseHeight:B})};window.addEventListener("resize",A),window.addEventListener("scroll",E,{passive:!0}),Be()!==window&&Be().addEventListener("scroll",E,{passive:!0}),window.addEventListener("orientationchange",x),Be().visualViewport?.addEventListener("resize",I),Be().visualViewport?.addEventListener("scroll",k),document.addEventListener("focusin",T),document.addEventListener("focusout",_);const P=O=>{n("resume",{source:O,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}),C(O)},N=()=>{document.hidden?R("visibilitychange:hidden"):P("visibilitychange")},L=()=>P("pageshow"),D=()=>R("pagehide");return document.addEventListener("visibilitychange",N),window.addEventListener("pageshow",L),window.addEventListener("pagehide",D),()=>{window.removeEventListener("resize",A),window.removeEventListener("scroll",E),Be()!==window&&Be().removeEventListener("scroll",E),window.removeEventListener("orientationchange",x),Be().visualViewport?.removeEventListener("resize",I),Be().visualViewport?.removeEventListener("scroll",k),document.removeEventListener("focusin",T),document.removeEventListener("focusout",_),document.removeEventListener("visibilitychange",N),window.removeEventListener("pageshow",L),window.removeEventListener("pagehide",D),u!==null&&window.cancelAnimationFrame(u),g?.remove()}},[t,n,r]),o}function UD(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 wg=2,HD=new Set(["mount","init-fit","resize","layout-visible","dpr-change","session-key-change","session-reset","tmux-layout"]);function $D(e){const t=e.reason.replace(/^refresh:/,""),n=HD.has(t),r=Math.abs(e.proposedCols-e.currentCols),o=Math.abs(e.proposedRows-e.currentRows);return{accept:n?r>0||o>0:r>=wg||o>=wg,isRealResize:n,colsDelta:r,rowsDelta:o}}function TB(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 AB(e,t){return!e||t}function zD(e,t,n){return e!=="alternate"&&n>=t}function PB(e,t,n){return!n&&(e||t)}function bg(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 vg(e,t=e.rows){const r=e._core?._bufferService?.buffers;return r?bg(r.normal,t)+bg(r.alt,t):0}let co=null;const qD=[{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:"⏺⏸⏹✓✗"}],KD=()=>{if(co)return co;if(typeof document>"u"||!("fonts"in document))return co=Promise.resolve(),co;const e=document.fonts;return co=Promise.allSettled(qD.map(({font:n,text:r})=>e.load(n,r))).then(()=>e.ready).then(()=>{}).catch(()=>{}),co};async function GD(e,t=()=>!0){return await KD(),t()?new lS(typeof e=="function"?e():e):null}class WD{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(!xg(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=$D({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=vg(i,a.rows);let g=0;if(h.accept){c==="update"&&this.options.beforeLiveResize?.();const w=i.buffer.active,y=zD(w.type,w.baseY,w.viewportY),S=i.options.smoothScrollDuration;try{i.options.smoothScrollDuration=0,i.resize(s.cols,s.rows),g=vg(i,s.rows),y&&i.scrollToBottom()}finally{i.options.smoothScrollDuration=S}}(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"||!xg(t)?!1:(this.terminal.resize(t.cols,t.rows),this.measured=null,!0)}}function xg(e){const t=e;return!!t&&Number.isSafeInteger(t.cols)&&Number.isSafeInteger(t.rows)&&t.cols>0&&t.rows>0}function Sg(){return{confirmed:null,pending:null,nextSeq:1}}function Eg(e,t){return e?.cols===t.cols&&e.rows===t.rows}function A0(e,t,n){const r={...t,seq:e.nextSeq,attempt:n};return{state:{...e,pending:r,nextSeq:e.nextSeq+1},request:r}}function VD(e,t){return Eg(e.pending,t)||!e.pending&&Eg(e.confirmed,t)?{state:e,request:null}:A0(e,t,0)}function YD(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 NB(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}:{...A0(e,r,r.attempt+1),exhausted:!1}}function kg(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 _B(e){return{...e,pending:null}}const XD=150;function LB(e=0){return{lastPushAt:e}}function DB(e,t,n=XD){return t-e.lastPushAt>=n?(e.lastPushAt=t,{action:"send"}):{action:"hold",readyAt:e.lastPushAt+n}}function OB(e){return{lastPushAt:e}}const JD={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"},ZD={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 QD(e){return e==="light"?ZD:JD}const gu=new Map;function eO(){for(const e of["mousemove","pointermove","mouseup","pointerup","pointercancel","blur","pagehide","keydown","visibilitychange"]){if(gu.has(e))continue;const t=new Set;gu.set(e,t),(e==="visibilitychange"?document:window).addEventListener(e,r=>{for(const o of[...t])o(r)},!0)}}function tO(e){eO();let t=!1,n;const r=[],o=(d,u,f)=>{const h=gu.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 nO(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),w(),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)},w=tO({onFinish:(y,S)=>{y==="release"&&S&&(i=S.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 Rs(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 jB(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 xi=new Map;function rO(e,t,n,r=!1){if(!n||!t||!Bf(e))return null;const o=`owned-paste-${crypto.randomUUID()}`;return xi.set(o,{source:e,layer:Vt(),sessionId:t,text:n,token:{nonce:o,submitAfterPaste:r}}),{nonce:o,text:n,sessionId:t,paste:!0,submitAfterPaste:r,focus:!1,ownedPaste:!0}}function oO(e){xi.delete(e)}function Zf(e){return e.layer===Vt()&&Bf(e.source)}function MB(e,t){const n=e.nonce?xi.get(e.nonce):void 0;return n&&Zf(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 BB(e,t,n){const r=xi.get(e.nonce);return!r||r.token!==e||r.consumed?!1:(r.consumed=!0,Zf(r)&&r.sessionId===t&&n===Rs(r.text,r.token.submitAfterPaste===!0))}function FB(e,t){const n=xi.get(e.nonce);return!!n&&n.token===e&&n.sessionId===t&&Zf(n)}function UB(e){const t=Vt(),n=se(),r=Fe();return()=>{const o=se();return Vt()===t&&(!e||Bf(e))&&o?.url===n?.url&&o?.targetPeerId===n?.targetPeerId&&Fe()===r&&!r?.closed}}function sO(e,t,n,r,o){if(!e||!t||!n())return Promise.resolve(!1);const s=r?rO(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&&oO(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 ba extends Error{}function P0(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 HB(e,t){const{files:n}=await wi("/tmp",[P0(e)],t);if(!n[0]?.path)throw new Error("Upload did not return an image path");return n[0].path}async function Ig(e){const t=ut();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 iO(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 aO(){const e=lt()?.targetPeerId;let t;try{t=await ut()?.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 ba(s.slice(a+i.length).trim());const c=s.match(/execution error: Error: (复制来源未提供可读取的视频数据[^\r\n]*|无法读取剪贴板视频)(?:\s*\(-\d+\))?\s*$/);throw c?new ba(c[1]):o}if(lt()?.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 ba("复制来源未提供可读取的视频数据,请重新复制视频或选择文件上传");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 $B(e,t){if(!e.length)return[];const{files:n}=await wi("/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 cO(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 lO(e,t=()=>!0){const n=s=>{if(!t())throw new DOMException("目标服务已切换或粘贴操作已取消,请重新粘贴","AbortError");return s};n(null);const r=ut();let o;if(r?.readClipboardFiles)try{const s=n(await aO());if(s.files.length||s.paths.length)return{kind:"files",...s}}catch(s){if(n(null),s instanceof ba)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 iO(i));if(a.length)return{kind:"files",files:a,paths:[]};const c=n(await Ig(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 Ig());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 dO=[640,960,1280,1600,2048,2560,3072,4096],uO=[240,360,480,540,720,1080,1440,2160],Cg={min:.1,max:1,step:.01},Rg={min:25e4,max:2e7,step:25e4},Qf="termdock:mobile-media-compression-v1",lo={showResultToast:!0,imageEnabled:!1,imageMaxDimension:2048,imageQuality:.8,videoEnabled:!1,videoMaxHeight:720,videoBitrate:25e5};function N0(){try{const e=JSON.parse(localStorage.getItem(Qf)||"null");return!e||typeof e!="object"?lo:{showResultToast:e.showResultToast!==!1,imageEnabled:e.imageEnabled===!0,imageMaxDimension:dO.includes(e.imageMaxDimension)?e.imageMaxDimension:lo.imageMaxDimension,imageQuality:typeof e.imageQuality=="number"&&e.imageQuality>=Cg.min&&e.imageQuality<=Cg.max?e.imageQuality:lo.imageQuality,videoEnabled:e.videoEnabled===!0,videoMaxHeight:uO.includes(e.videoMaxHeight)?e.videoMaxHeight:lo.videoMaxHeight,videoBitrate:typeof e.videoBitrate=="number"&&e.videoBitrate>=Rg.min&&e.videoBitrate<=Rg.max?e.videoBitrate:lo.videoBitrate}}catch{return lo}}const _0=cr((e,t)=>({preferences:N0(),saveFailed:!1,update:n=>{const r={...t().preferences,...n};let o=!1;try{localStorage.setItem(Qf,JSON.stringify(r))}catch{o=!0}e({preferences:r,saveFailed:o})}}));typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===Qf||e.key===null)&&_0.setState({preferences:N0(),saveFailed:!1})});function L0(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 fO(e,t,n,r){const o=L0(e,t);if(!o)throw new Error("此文件不需要媒体压缩");const s=()=>{if(!n())throw new DOMException("Cancelled","AbortError")};s();const i=o==="video"?await(await Yt(async()=>{const{compressVideoLocally:a}=await import("./videoCompression-D3xjArgT.js");return{compressVideoLocally:a}},__vite__mapDeps([3,1,2]))).compressVideoLocally(e,{maxHeight:t.videoMaxHeight,videoBitrate:t.videoBitrate,onProgress:a=>{n()&&r(a)}}):await(await Yt(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 hO(e){const t=b.useRef(e);t.current=e;const[n,r]=b.useState(null),[o,s]=b.useState(null);b.useEffect(()=>s(null),[e.sessionId,e.active]);const i=b.useRef(null),a=b.useRef(!0),c=b.useCallback(()=>{i.current?.controller.abort();const m=t.current,w=lt(),y=Fe(),S=Vt(),v=document.activeElement,C=new AbortController,A=m.input.current,E={controller:C,at:t.current.selection?.()??{value:A?.textContent??"",start:(A?.textContent??"").length,end:(A?.textContent??"").length},current:()=>a.current&&!C.signal.aborted&&i.current===E&&t.current.active&&t.current.canWrite&&t.current.sessionId===m.sessionId&<()===w&&Fe()===y&&!y?.closed&&Vt()===S,focus:()=>document.activeElement===v||document.activeElement===m.input.current||document.activeElement===document.body};return i.current=E,E},[]);b.useEffect(()=>{const m=()=>{i.current&&!i.current.current()&&(i.current.controller.abort(),i.current=null,r(null))};m();const w=()=>{i.current?.controller.abort(),i.current=null,r(null),s(null)};return window.addEventListener("termdock:secure-state",m),window.addEventListener("auth:unauthorized",w),document.addEventListener("focusin",m),()=>{window.removeEventListener("termdock:secure-state",m),window.removeEventListener("auth:unauthorized",w),document.removeEventListener("focusin",m)}},[e.active,e.canWrite,e.sessionId]),b.useEffect(()=>(a.current=!0,()=>{a.current=!1,i.current?.controller.abort()}),[]);const d=b.useCallback(async(m,w,y=[],S)=>{if(!m.current())return;const v=_0.getState().preferences,C=S&&JSON.stringify(S.preferences)===JSON.stringify(v),A=C?[...S.prepared]:[],E=C?[...S.results]:[],x=(I,k={})=>{m.current()&&r({stage:I,files:w,paths:y,preferences:v,prepared:[...A],results:[...E],...k})};t.current.error(""),s(null);try{if(w.length&&!t.current.directory&&!t.current.sessionAttachments)throw new Error("附件上传暂不可用,请重试");for(let _=A.length;_<w.length;_++){const R=w[_];if(t.current.mediaCompression&&L0(R,v)){x("compressing",{fileName:R.name,fileIndex:_+1});const P=await fO(R,v,m.current,N=>x("compressing",{percent:Math.round(N),fileName:R.name,fileIndex:_+1}));if(!m.current())return;A.push(P.file),E.push(P)}else A.push(R)}if(!m.current())return;x("uploading",{percent:w.length?0:void 0});const I=_=>x("uploading",{percent:Math.round(_)}),k=w.length?t.current.sessionAttachments?await Nx(t.current.sessionId,A,m.controller.signal,I,m.current):await wi(t.current.directory,A,m.controller.signal,I,m.current):{files:[]};if(!m.current())return;if(k.files.length!==w.length||k.files.some(_=>!_.path))throw new Error("部分文件未上传成功,请重试");const T=[...y,...k.files.map(_=>_.path)];if(!T.length)throw new Error("没有可添加的文件");t.current.attach?t.current.attach([...y.map(_=>({path:_,name:_.split("/").pop()||_})),...k.files.map((_,R)=>({path:_.path,name:A[R].name,type:A[R].type,size:A[R].size}))],m.focus(),m.at):t.current.insert(`${T.map(Rw).join(" ")} `,m.focus()),s(E.at(-1)??null),r(null),i.current=null}catch(I){if(!m.current())return;x("failed"),t.current.error(I instanceof Error?I.message:"文件处理或上传失败,请重试")}},[]),u=b.useCallback(m=>{!t.current.active||!t.current.canWrite||!m.length||d(c(),m)},[c,d]),f=b.useCallback(async m=>{if(!t.current.active||!t.current.canWrite)return;const w=c();r({stage:"reading"}),t.current.error("");const y=S=>{w.current()&&(t.current.insert(S,w.focus()),r(null),i.current=null)};try{const S=await lO(m,w.current);if(S.kind==="text"){y(S.text);return}if(S.kind==="files"){const v=S.files.length===1&&S.files[0].type.startsWith("image/")?[P0(S.files[0])]:S.files;return await d(w,v,S.paths)}throw new Error("剪贴板没有可读取的内容,请使用系统粘贴或选择文件")}catch(S){w.current()&&(r(null),t.current.error(S instanceof Error?S.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=b.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 eh(e,t=()=>!0){return e?qf(e,t):Promise.resolve(!1)}async function pO(e,t,n=()=>yx(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 eh(o.text,t)}const Tg=262144;function mO(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(Tg/3))return!0;let s;try{const i=atob(o);if(i.length>Tg)return!0;s=new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(i,a=>a.charCodeAt(0)))}catch{return!0}return s&&eh(s,e).then(i=>{!i&&e()&&t()}),!0}}function rd(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 gO=b.lazy(()=>Yt(()=>import("./SessionResourceSidebar-DFIIPO6_.js"),__vite__mapDeps([4,1,5,6,7,8,2,9,10])).then(e=>({default:e.SessionResourceSidebar}))),yO=b.lazy(()=>Yt(()=>import("./SessionChatView-BwYmQVwO.js").then(e=>e.S),__vite__mapDeps([11,12,1,13,14,15,16,6,17,18,2,19,20,21,22])).then(e=>({default:e.SessionChatView})));function Ag({client:e,initialSessionId:t,initialViewMode:n,sessions:r,resources:o,directoryError:s}){const[i,a]=b.useState(),c=b.useRef(null),d=b.useRef(null),u=b.useRef(null),f=_e(K=>K.rightSidebarWidth),[h,p]=b.useState(()=>window.innerWidth>=1024),[g,m]=b.useState(()=>window.innerWidth>=1024),[w]=b.useState(()=>{try{return sessionStorage.getItem(`termdock:shared-view:${e.targetPeerId}`)}catch{return null}}),y=n||(w==="chat"?"chat":w==="terminal"?"terminal":se()?.viewMode)||"terminal",[S,v,C]=RD(i?.sourceSessionId||i?.sessionId||"",!0,y,!!(n||w||se()?.viewMode));b.useLayoutEffect(()=>{let K=window.innerWidth>=1024;const z=()=>{const Ie=(c.current?.getBoundingClientRect().width||window.innerWidth)>=1024;m(Ie),K&&!Ie&&p(!1),K=Ie};z();const de=typeof ResizeObserver>"u"?void 0:new ResizeObserver(z);return c.current&&de?.observe(c.current),window.addEventListener("resize",z),()=>{de?.disconnect(),window.removeEventListener("resize",z)}},[]);const[A,E]=b.useState(y==="terminal");b.useEffect(()=>{S==="terminal"&&E(!0)},[S]);const x=b.useRef(S);x.current=S;const I=b.useRef(()=>{});b.useLayoutEffect(()=>{S==="terminal"&&I.current("reveal")},[S]),b.useEffect(()=>()=>u.current?.(),[]);const k=b.useRef(()=>!1),T=i?.attachmentRoot?{...o,directories:[...o.directories??[],{path:i.attachmentRoot,access:"read"}]}:o,_=H_(i,T),R=_.has("session.view"),P=_.has("session.input"),N=_.has("session.resize"),L=Gx(o).length>0,D=async(K,z)=>{if(!i||!P)return!1;const de=S==="chat"?await sO(K,i.sourceSessionId||i.sessionId,()=>!e.closed,z):k.current(Rs(K,!1));return de&&!g&&p(!1),de},O=b.useRef();b.useEffect(()=>{if(!t||O.current===t)return;const K=r.find(z=>z.sessionId===t||z.sourceSessionId===t);K&&(O.current=t,a(K))},[r,t]);const[B,M]=b.useState(0),[F,H]=b.useState("正在读取会话…"),[$,ee]=b.useState(()=>document.documentElement.dataset.theme==="light"?"light":"dark");b.useEffect(()=>{const K=new MutationObserver(()=>ee(document.documentElement.dataset.theme==="light"?"light":"dark"));return K.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>K.disconnect()},[]);const ne=b.useRef(null),te=b.useRef(null),le=b.useRef(()=>""),U=b.useRef(async()=>!1),[J,Q]=b.useState(""),Y=hO({sessionId:i?.sourceSessionId||i?.sessionId||"",active:S==="terminal",canWrite:P,input:ne,sessionAttachments:!0,error:Q,insert:K=>{if(!k.current(Rs(rd(K),!1)))throw new Error("终端未连接,内容尚未插入,请重连后重试")}}),Ce=async()=>{const K=U.current;try{const z=await K();K===U.current&&Q(z?"":"请先选择需要复制的终端内容")}catch(z){K===U.current&&Q(z instanceof Error?z.message:"复制失败,请重试")}};return b.useEffect(()=>{a(K=>{if(!K)return r.length===1?r[0]:(H(s||(r.length?"请选择会话":"暂无可用会话")),K);const z=r.find(de=>de.sessionId===K.sessionId);if(!z){H(s||"会话已不可用,请联系分享者");return}return z.name===K.name&&z.icon===K.icon&&z.attachmentRoot===K.attachmentRoot&&z.canWrite===K.canWrite&&z.canResize===K.canResize?K:z})},[r,s]),b.useEffect(()=>{if(!i||!R||!ne.current||!A)return;let K=!1;const z=[],de=()=>{I.current=()=>{},k.current=()=>!1,le.current=()=>"",U.current=async()=>!1;for(const Ie of z.splice(0).reverse())Ie()};return(async()=>{let Ie=0,Pe;const Re=await GD({theme:QD($),cursorBlink:P,disableStdin:!P,mouseEventsRequireAlt:!P,convertEol:!1},()=>!K&&!!ne.current);if(!Re||!ne.current)return;z.push(()=>Re.dispose()),le.current=()=>Re.getSelection(),Re.attachCustomKeyEventHandler(ae=>{if(ae.type==="keydown"&&(ae.ctrlKey||ae.metaKey)&&!ae.altKey){if(ae.key.toLowerCase()==="v")return ae.preventDefault(),P&&Y.paste(),!1;if(ae.key.toLowerCase()==="c"&&(Re.hasSelection()||ae.metaKey||ae.shiftKey))return ae.preventDefault(),Ce(),!1}return!0});const q=new dS;Re.loadAddon(q),Re.open(ne.current);const ce=new WD(Re,q,ne.current,{authority:N?"viewport":"server"});N&&ce.fit("initialize",x.current==="terminal");const he=ce.dimensions;H("正在连接…");const je=new URLSearchParams({flow:"2",...N?{transport:"tmux-client",...he?{cols:String(he.cols),rows:String(he.rows)}:{}}:{}}),pe=e.openSocket(`/api/terminal/${encodeURIComponent(i.sessionId)}/ws?${je}`);let We=!1,be=0;const Ke=()=>!K&&!e.closed&&x.current==="terminal",De=new Map,Pt=()=>{for(const ae of De.values())clearTimeout(ae.timer),ae.reject(new Error("连接已断开,请重连后复制"));De.clear()};z.push(Pt);const Nt=()=>new Promise((ae,Z)=>{if(!Ke()||pe.readyState!==1){Z(new Error("终端未连接,请重连后复制"));return}const oe=crypto.randomUUID(),ye=setTimeout(()=>{De.delete(oe),Z(new Error("复制超时,请重试"))},1e4);De.set(oe,{resolve:ae,reject:Z,timer:ye});try{pe.send(JSON.stringify({type:"tmux",action:"copy-selection",reqId:oe}))}catch(V){clearTimeout(ye),De.delete(oe),Z(V)}});U.current=async()=>{const ae=Re.getSelection();return ae?eh(ae,Ke):P?pO(i.sessionId,Ke,Nt):!1};const it=Re.parser.registerOscHandler(52,mO(()=>Ke()&&be===0,()=>{Ke()&&Q("复制失败,请重试")}));z.push(()=>it.dispose());let Ze=Sg();z.push(()=>{pe.onclose=null,pe.onerror=null,pe.close()});const W=(ae="update")=>{if(K||x.current!=="terminal"||!ne.current?.clientWidth||!ne.current?.clientHeight)return;if(!N){const oe=ne.current.querySelector(".xterm-screen"),ye=ne.current.querySelector(".xterm");if(oe&&ye&&oe.offsetWidth&&oe.offsetHeight){const V=Math.min(1,(ne.current.clientWidth-16)/oe.offsetWidth,(ne.current.clientHeight-16)/oe.offsetHeight);ye.style.transformOrigin="top left",ye.style.transform=`scale(${Math.max(.1,V)})`}return}ce.fit(ae,!0,"resize");const Z=ce.dimensions;if(Z&&We&&pe.readyState===1){const oe=VD(Ze,Z);Ze=oe.state,oe.request&&pe.send(JSON.stringify({type:"resize",...Z,seq:oe.request.seq}))}};I.current=W,pe.onopen=()=>{H(P?"":"只读"),W()},pe.onmessage=ae=>{try{const Z=JSON.parse(ae.data);if(K)return;if(Z.type==="connected"){We=!0,Ze=kg(Sg(),Z),Pe=typeof Z.streamEpoch=="string"?Z.streamEpoch:void 0,Ie=Number.isSafeInteger(Z.replayLastSeq)?Z.replayLastSeq:0,N||ce.applyRemoteSize(Z);const oe=Array.isArray(Z.replayChunks)?Z.replayChunks.filter(ye=>typeof ye=="string").join(""):"";be++,Re.write((Z.replayOutOfWindow?"\x1Bc":"")+oe,()=>{be--,W()})}else if(Z.type==="tmux-result"){const oe=De.get(Z.reqId);oe&&(De.delete(Z.reqId),clearTimeout(oe.timer),Z.success===!0?oe.resolve(Z):oe.reject(new Error(Z.error||"复制失败,请重试")))}else Z.type==="resize-ack"?Ze=YD(Ze,{...Z,ok:Z.ok!==!1}).state:Z.type==="data"&&typeof Z.data=="string"?Re.write(Z.data,()=>{K||(Number.isSafeInteger(Z.seq)&&(Ie=Math.max(Ie,Z.seq)),pe.readyState===1&&Number.isSafeInteger(Z.flowSeq)&&pe.send(JSON.stringify({type:"output-ack",flowSeq:Z.flowSeq,since:Ie,epoch:Pe})))}):Z.type==="pty-size"&&Number.isSafeInteger(Z.cols)&&Number.isSafeInteger(Z.rows)&&Z.cols>0&&Z.rows>0?(Ze=kg(Ze,Z),N||(ce.applyRemoteSize(Z),requestAnimationFrame(()=>W()))):Z.type==="error"&&H("无法连接,请联系分享者")}catch{H("终端数据无效"),pe.close()}},pe.onclose=()=>{Pt(),H("连接已断开,请重连")},pe.onerror=()=>H("连接失败,请重试"),k.current=ae=>!P||pe.readyState!==1?!1:(pe.send(JSON.stringify({type:"input",data:ae})),!0);const re=Re.onData(ae=>{P&&pe.readyState===1&&pe.send(JSON.stringify({type:"input",data:ae}))});z.push(()=>re.dispose());const ie=setInterval(()=>{pe.readyState===1&&pe.send(JSON.stringify({type:"ping"}))},2e4);z.push(()=>clearInterval(ie));const Se=new ResizeObserver(()=>W());z.push(()=>Se.disconnect()),Se.observe(ne.current)})().catch(()=>{K||(de(),H("终端初始化失败,请重试"))}),()=>{K=!0,de()}},[e,i?.sessionId,R,P,N,$,A,B]),l.jsx(Wx.Provider,{value:T,children:l.jsx(Vx.Provider,{value:_,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(ti,{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&&!P?"只读":S==="terminal"?F:""})]}),l.jsxs("button",{type:"button",onClick:()=>v(S==="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:[S==="chat"?l.jsx(ju,{size:15}):l.jsx(si,{size:15}),S==="chat"?"终端":"对话"]}),l.jsx("button",{type:"button","aria-label":"重新连接会话",onClick:()=>M(K=>K+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(Ou,{size:15})}),S==="terminal"&&i&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"复制终端选区",title:"选择终端内容后复制",onClick:()=>{Ce()},className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(oi,{size:15})}),P&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"粘贴到终端",onClick:()=>{Y.paste()},className:"min-h-11 rounded-lg px-3 text-xs hover:bg-surface-2",children:"粘贴"}),l.jsx("button",{type:"button","aria-label":"上传文件到终端",onClick:()=>te.current?.click(),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(Ky,{size:15})}),l.jsx("input",{ref:te,type:"file",multiple:!0,className:"hidden","aria-label":"选择终端附件",onChange:K=>{Y.addFiles(Array.from(K.target.files||[])),K.target.value=""}})]})]}),L&&l.jsxs("button",{type:"button","aria-expanded":h,onClick:()=>p(K=>!K),className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",children:[l.jsx(zy,{size:15}),"侧栏"]})]}),J&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:J}),Y.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:Y.transfer.stage==="reading"?"正在读取剪贴板…":Y.transfer.stage==="uploading"?`正在上传文件 · ${Y.transfer.percent??0}%`:Y.transfer.stage==="cancelled"?"已取消上传":"上传未完成,内容尚未插入"}),Y.busy?l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:Y.cancel,children:"取消"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:Y.retry,children:"重试上传"}),l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:Y.dismiss,children:"关闭上传提示"})]})]}),C&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:C}),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(K=>l.jsxs("button",{"aria-pressed":i?.sessionId===K.sessionId,className:`inline-flex min-h-11 shrink-0 items-center gap-2 rounded-lg px-3 text-xs ${i?.sessionId===K.sessionId?"bg-surface-2":"text-muted-foreground hover:bg-surface-2"}`,onClick:()=>a({...K}),children:[l.jsx(ti,{icon:K.icon,size:15}),K.name,K.canWrite?"":" · 只读"]},`${e.targetPeerId}:${K.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:K=>{S==="terminal"&&le.current()?K.stopPropagation():$_(K)},children:[l.jsx("div",{ref:ne,"aria-label":"共享终端",onCopyCapture:K=>{const z=le.current();K.preventDefault(),K.stopPropagation(),z?K.clipboardData.setData("text/plain",z):Ce()},onPasteCapture:K=>{S==="terminal"&&(K.preventDefault(),K.stopPropagation(),P&&Y.paste(cO(K.clipboardData)))},onDragOver:K=>{K.preventDefault(),K.dataTransfer.dropEffect=P?"copy":"none"},onDrop:K=>{if(K.preventDefault(),K.stopPropagation(),!!P)try{const z=qx(K.dataTransfer);if(z){k.current(Rs(rd(z),!1));return}const de=Array.from(K.dataTransfer.files);if(de.length)Y.addFiles(de);else{const ge=K.dataTransfer.getData("text/plain");ge&&k.current(Rs(rd(ge),!1))}}catch(z){Q(z instanceof Error?z.message:"文件引用无效")}},className:`min-h-0 flex-1 overflow-auto p-2 ${S!=="terminal"?"hidden":""}`}),i&&R&&S==="chat"&&l.jsx("div",{className:"min-h-0 flex-1",children:l.jsx(b.Suspense,{fallback:l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"正在打开对话…"}),children:l.jsx(yO,{sessionId:i.sourceSessionId||i.sessionId,name:i.name,terminalLink:!1,canWrite:P,onTerminal:()=>v("terminal")},i.sourceSessionId||i.sessionId)})}),!i&&l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:F})]}),L&&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:K=>{d.current&&(K.preventDefault(),u.current?.(),u.current=nO(d.current,K.clientX,d.current.getBoundingClientRect().width,z=>Math.max(280,Math.min(z,window.innerWidth-360)),z=>_e.getState().setRightSidebarWidth(z),-1))},onKeyDown:K=>{(K.key==="ArrowLeft"||K.key==="ArrowRight")&&(K.preventDefault(),_e.getState().setRightSidebarWidth(Math.max(280,Math.min(f+(K.key==="ArrowLeft"?24:-24),window.innerWidth-360))))}}),l.jsx(b.Suspense,{fallback:l.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"正在打开侧栏…"}),children:l.jsx(gO,{resources:o,canWrite:P,sessionId:i?.sourceSessionId||i?.sessionId,pinned:g,open:h,onClose:()=>p(!1),onInsert:D})})]})]})]})})})}function wO({client:e,initialSessionId:t,initialViewMode:n,initialViewLayout:r}){FD();const[o,s]=b.useState([]),[i,a]=b.useState({}),[c,d]=b.useState(""),[u,f]=b.useState(()=>{try{const m=sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`);if(m)return m==="split"}catch{}return r==="split"});b.useEffect(()=>{if(r==="split"){try{if(sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`))return}catch{}f(!0)}},[r,e.targetPeerId]),b.useEffect(()=>{let m=!0,w=!1;const y=async()=>{if(!w){w=!0;try{const v=await e.request({type:"session-list"});m&&(s(v.items),d(""))}catch{m&&(s([]),d("连接暂时中断,请重试"))}try{const v=await e.request({type:"permissions"});m&&a(Array.isArray(v.grants)?UD(v.grants.map(C=>C.resources)):{})}catch{m&&a({})}finally{w=!1}}};y();const S=setInterval(()=>{y()},15e3);return()=>{m=!1,clearInterval(S)}},[e]);const h=o.find(m=>m.sessionId===t||m.sourceSessionId===t)||o[0],p=o.find(m=>m.sessionId!==h?.sessionId),g=u&&!!p;return l.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-[var(--chrome-bg)] text-foreground",children:[o.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":g,className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",onClick:()=>{f(!g);try{sessionStorage.setItem(`termdock:shared-layout:${e.targetPeerId}`,g?"single":"split")}catch{}},children:[l.jsx(xy,{size:15}),g?"单会话":"分屏查看"]})}),l.jsxs("div",{className:`flex min-h-0 flex-1 ${g?"flex-col lg:flex-row":""}`,children:[l.jsx("section",{className:"min-h-0 min-w-0 flex-1","aria-label":g?"第一个共享会话":"共享会话",children:l.jsx(Ag,{client:e,initialSessionId:g?h?.sessionId:t,initialViewMode:n,sessions:g?o.filter(m=>m.sessionId!==p?.sessionId):o,resources:i,directoryError:c})}),g&&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(Ag,{client:e,initialSessionId:p.sessionId,initialViewMode:n,sessions:o.filter(m=>m.sessionId!==h?.sessionId),resources:i,directoryError:c})})]})]})}const bO=String.raw`
|
|
16
|
+
████████ ███████ ██████ ███ ███ ██████ ██████ ██████ ██ ██
|
|
17
|
+
██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██
|
|
18
|
+
██ █████ ██████ ██ ████ ██ ██ ██ ██ ██ ██ █████
|
|
19
|
+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
20
|
+
██ ███████ ██ ██ ██ ██ ██████ ██████ ██████ ██ ██
|
|
21
|
+
`;function D0({onLoginSuccess:e,focusEnabled:t=!0,serviceOrigin:n,serviceName:r,entryOrigin:o,entryName:s,onManageServices:i}){const{t:a}=At(),[c,d]=b.useState(""),[u,f]=b.useState(!1),[h,p]=b.useState(null),[g,m]=b.useState(0),w=b.useRef(null);b.useEffect(()=>{t&&!u&&g===0&&w.current?.focus()},[t,u,g]),b.useEffect(()=>{if(g<=0)return;const E=setInterval(()=>{m(x=>x>1?x-1:0)},1e3);return()=>clearInterval(E)},[g]);const y=g>0,S=h==="login.passwordNotConfigured"||h==="login.targetPasswordRequired"||h==="login.securityUpgradeRequired",v=t&&!u&&!y&&!S&&c.length>0,C=async E=>{if(E.preventDefault(),!!v){f(!0),p(null);try{const x=await bx(c);if(x.ok){d(""),e();return}p(x.rateLimited||x.reason==="rateLimited"?"login.rateLimited":x.reason==="connectionFailed"?"login.failed":x.reason==="identityMismatch"?"login.identityMismatch":x.reason==="unavailable"?"login.unavailable":x.reason==="authorizationRequired"?"login.authorizationRequired":x.reason==="passwordNotConfigured"?"login.passwordNotConfigured":x.reason==="targetPasswordRequired"?"login.targetPasswordRequired":x.reason==="securityUpgradeRequired"?"login.securityUpgradeRequired":"login.invalidPassword"),x.reason==="passwordNotConfigured"&&d(""),x.rateLimited&&typeof x.retryAfterMs=="number"&&m(Math.max(1,Math.ceil(x.retryAfterMs/1e3)))}catch{p("login.failed")}finally{f(!1)}}},A=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:bO}),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:C,className:"w-full max-w-xs",children:[!S&&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:w,type:"password",autoComplete:"current-password",value:c,placeholder:A,"aria-label":a("login.placeholder"),onChange:E=>{d(E.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:!v,"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(Je,{size:16,className:"animate-spin"}):l.jsx(Zg,{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 cc="termdock:open-services";function vO(){window.dispatchEvent(new Event(cc))}function zB(e){window.dispatchEvent(new CustomEvent(cc,{detail:e}))}const xO={activeKey:"root",items:[]},SO=()=>()=>{},EO=()=>xO,yu="termdock:open-saved-service";function kO(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 qB(e,t,n){b.useEffect(()=>{window.termdockDesktop?.reportServiceActivity?.({runningCount:e,reviewCount:t})},[e,t]),b.useEffect(()=>{uo({runningCount:e,reviewCount:t,attentionSessions:n})},[e,t,n])}function IO({onReselect:e}){return window.termdockDesktop?null:l.jsx(CO,{onReselect:e})}function CO({onReselect:e}){const[t,n]=b.useState([]),[r,o]=b.useState([]),[s,i]=b.useState(se()?.targetPeerId),[a,c]=b.useState(""),[d,u]=b.useState(!1),[f,h]=b.useState(!1),p=b.useRef(0),g=b.useRef(!1);b.useEffect(()=>{let E=!1;const x=()=>{const I=p.current;rr().then(k=>{!E&&!g.current&&I===p.current&&u(k.serviceSwitcherExpanded===!0)}).catch(()=>{})};return x(),window.addEventListener(vt,x),()=>{E=!0,window.removeEventListener(vt,x)}},[]);const m=async()=>{if(g.current)return;const E=d;p.current+=1,g.current=!0,h(!0),u(!E),c("");try{const x=await $t({serviceSwitcherExpanded:!E});u(x.serviceSwitcherExpanded===!0)}catch{u(E),c("展开状态保存失败,请重试")}finally{g.current=!1,h(!1)}},w=b.useRef(null),y=pn(),S=b.useSyncExternalStore(y?.subscribe||SO,y?.snapshot||EO);b.useEffect(()=>{let E=!1,x=0;const I=()=>{const _=++x;i(se()?.targetPeerId),yt().then(R=>{if(!(E||_!==x)){try{const P="termdock-secure-service-order",N=JSON.parse(localStorage.getItem(P)||"[]"),L=Array.isArray(N)?N.filter(M=>typeof M=="string"):[],D=M=>M.targetPeerId||M.id,O=[...L.filter(M=>R.some(F=>D(F)===M)),...R.map(D).filter(M=>!L.includes(M))];R.sort((M,F)=>O.indexOf(D(M))-O.indexOf(D(F)));const B=JSON.stringify(O);B!==localStorage.getItem(P)&&localStorage.setItem(P,B)}catch{}n(R)}}).catch(()=>{})};I();const k=bc(I),T=window.termdockDesktop?.onServiceActivity?.(o);return window.addEventListener(vt,I),()=>{E=!0,k(),T?.(),window.removeEventListener(vt,I)}},[]),b.useEffect(()=>{const E=w.current,x=E?.querySelector('[aria-current="page"]');if(!E||!x)return;const I=x.offsetLeft,k=I+x.offsetWidth;I<E.scrollLeft?E.scrollLeft=I:k>E.scrollLeft+E.clientWidth&&(E.scrollLeft=k-E.clientWidth)},[s,t,d]);const v=async E=>{if(c(""),E.targetPeerId&&E.targetPeerId===s){e?.();return}try{const x=window.termdockDesktop;if(x?.openServiceConnection){const I=await x.openServiceConnection(E);if(!I.ok)throw new Error(I.error||"暂时无法打开服务")}else Ya(E)||window.dispatchEvent(new CustomEvent(yu,{detail:E}))}catch(x){c(x instanceof Error?x.message:"暂时无法切换服务")}},C=E=>{const x=S.items.find(k=>k.service?.targetPeerId===E.targetPeerId),I=r.find(k=>k.targetPeerId&&k.targetPeerId===E.targetPeerId||k.origin===(E.serviceOrigin||E.url));return{phase:x?.phase,running:x?.runningCount??I?.runningCount??0,review:x?.reviewCount??I?.reviewCount??0}},A=E=>{const x=C(E);return x.review?l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-0.5 text-[color:var(--warning)]",title:"等待处理",children:[l.jsx(Nu,{size:11}),x.review]}):x.phase==="connecting"||x.phase==="reconnecting"?l.jsx(Je,{size:12,className:"shrink-0 animate-spin","aria-label":"正在连接"}):x.phase==="offline"||x.phase==="login"?l.jsx("span",{className:"shrink-0 text-[color:var(--warning)]",title:x.phase==="login"?"需要登录":"连接已断开",children:"!"}):x.running?l.jsx("span",{className:"shrink-0 text-[color:var(--success)]",title:"运行中",children:x.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(Ar,{size:16}):l.jsx(fy,{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:w,"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(E=>l.jsx("button",{type:"button",onClick:()=>{v(E)},"aria-current":E.targetPeerId===s?"page":void 0,"aria-label":E.label,title:E.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 ${E.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 ${E.targetPeerId===s?"bg-surface-elevated md:bg-transparent":""}`,children:[l.jsx("span",{className:"max-w-[11rem] truncate md:hidden",children:kO(E,t)}),l.jsx("span",{className:"hidden truncate md:inline",children:E.label}),A(E)]})},E.id))}),l.jsx("button",{type:"button",onClick:vO,"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(Pr,{size:18})})]}),a&&l.jsx("p",{role:"alert",className:"mt-1 text-[11px] text-[color:var(--warning)]",children:a})]})}function RO({failure:e,target:t,onSettings:n,onRecovered:r,settingsOpen:o=!1}){const[s,i]=b.useState("notice"),[a,c]=b.useState([]),[d,u]=b.useState(""),[f,h]=b.useState(!1),[p,g]=b.useState("checking"),[m,w]=b.useState(""),[y,S]=b.useState(0),v=b.useRef(null),C=b.useRef(s);C.current=s,b.useLayoutEffect(()=>{v.current?.toggleAttribute("inert",o)},[o]),b.useEffect(()=>()=>{C.current="cancelled"},[]),vi(v,!o,()=>{f||i(s==="notice"?"cancelled":"notice")}),b.useEffect(()=>{let O=!1;return yt().then(B=>{O||c(B)}).catch(()=>{}),()=>{O=!0}},[]);const A=t?.serviceName||a.find(O=>O.targetPeerId===e.context.targetServiceId)?.label||"目标服务",E=e.context.entryServiceId||t?.entryServiceId,x=e.context.entryUrl||(t?.entryServiceId?t.url:void 0),k=a.find(O=>O.targetPeerId===E)?.label||"已保存的入口",T=e.code==="RELAY_AUTHORIZATION_REQUIRED",_=e.code==="TARGET_AUTHORIZATION_REQUIRED",R=e.code==="TARGET_PASSWORD_REQUIRED"||e.code==="TARGET_SECURITY_UPGRADE_REQUIRED",P=JSON.stringify(t);b.useEffect(()=>{if(!_||!P||P==="null")return;const O=new AbortController;return g("checking"),w(""),Gd(JSON.parse(P),O.signal).then(B=>{O.signal.aborted||g(B)}).catch(B=>{O.signal.aborted||w(Un(B).message)}),()=>O.abort()},[_,P,y]);const N=T?`通过“${k}”连接“${A}”需要中转授权`:R?`“${A}”已禁用中转`:_?`“${A}”需要设备访问授权`:e.code==="TARGET_IDENTITY_MISMATCH"?`“${A}”的服务身份不一致`:e.code==="RELAY_SELF_TARGET"?`“${A}”的中转配置指向自身`:`当前权限无法访问“${A}”`,L=async()=>{if(C.current!=="route"&&C.current!=="login")throw new Error("RECOVERY_CANCELLED");await r()},D=async()=>{if(C.current==="login"){u("");try{await L()}catch{u("授权尚未核验通过,请检查连接设置或联系对应服务管理员。")}}};return l.jsx("div",{ref:v,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(D0,{serviceOrigin:t?Dt(t)[0]:void 0,serviceName:A,entryOrigin:x,entryName:k,focusEnabled:!o,onLoginSuccess:()=>{D()},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:N}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s==="cancelled"?T?"已取消中转授权操作。直连恢复后会自动连接;保存的服务、终端和草稿保持不变。":"连接已暂停。保存的服务、终端和草稿保持不变。":T?"此中转路线没有有效授权,已暂停中转重试。直连恢复后会自动连接,不会自动重新授权。":R?e.message:_?m||(p==="checking"?"正在核验目标服务的设备授权与登录方式…":p==="invitationRequired"?"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。":p==="authorized"?"已核验目标服务的设备访问授权,可以重新连接。":"此设备尚未获得目标服务的访问授权。请使用目标服务的密码登录,或让目标服务管理员发送邀请。"):"连接已暂停。请核对保存的身份或联系管理员确认具体权限;不会替换身份或扩大授权。"}),(_||R)&&x&&l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["目标:“",A,"”;经入口“",k,"”(",new URL(x).host,")中转。入口的中转授权不能代替目标服务的访问授权。"]}),s==="route"&&t&&e.context.entryServiceId&&e.context.entryUrl?l.jsx("div",{className:"mt-5",children:l.jsx(y0,{service:{...t,id:t.targetPeerId,label:A},onBusyChange:h,recoverEntry:{targetPeerId:e.context.entryServiceId,url:e.context.entryUrl},onRecovered:L,onCancelRecovery:()=>i("notice")})}):l.jsxs("div",{className:"mt-5 flex flex-col gap-2",children:[s!=="cancelled"&&T&&e.context.entryServiceId&&e.context.entryUrl&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("route"),children:"重新授权"}),s!=="cancelled"&&_&&p==="passwordRequired"&&!m&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("login"),children:"登录目标服务"}),s!=="cancelled"&&(R||_&&p==="authorized"&&!m)&&l.jsx("button",{className:"service-button service-primary",disabled:f,onClick:()=>{h(!0),u(""),r().catch(O=>{u(R?Un(O).message:"授权尚未核验通过,请重新检查或联系目标服务管理员。"),S(B=>B+1)}).finally(()=>h(!1))},children:R?"重新检查中转":"重新连接"}),s!=="cancelled"&&_&&(m||p==="invitationRequired")&&l.jsx("button",{className:"service-button service-secondary",disabled:f,onClick:()=>S(O=>O+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 vs=(()=>{if(location.hash.startsWith("#termdock-invite="))try{return Hn(location.href)}catch{return}finally{history.replaceState(null,"",location.pathname+location.search)}})(),wu="termdock-secure-open-session";let od;function TO(){try{const e=JSON.parse(sessionStorage.getItem(wu)??"null");return e?.serviceId===se()?.targetPeerId?e.sessionId:void 0}catch{return}}function AO({children:e}){const{t}=At(),n=b.useRef(),r=b.useRef(0),o=b.useRef(!1);b.useEffect(()=>{const W=()=>{r.current++};return window.addEventListener("pagehide",W),()=>{W(),window.removeEventListener("pagehide",W)}},[]);const[s,i]=b.useState(),[a,c]=b.useState(vs),[d,u]=b.useState(!1),[f,h]=b.useState(!!vs),p=b.useRef(!!vs),g=b.useRef(0);p.current=!!a&&f;const[m,w]=b.useState(!vs),[y,S]=b.useState(!1),[v,C]=b.useState(),A=b.useRef(),[E,x]=b.useState("正在连接服务…"),[I,k]=b.useState([]),[T,_]=b.useState([]),[R,P]=b.useState([]),[N,L]=b.useState(),[D,O]=b.useState(vs?.viewLayout),[B,M]=b.useState(!1),[F,H]=b.useState(!1),[$,ee]=b.useState(""),[ne,te]=b.useState(!1),[le,U]=b.useState(""),[J,Q]=b.useState(se()?.serviceName??location.hostname),Y=se(),Ce=Y?.serviceOrigin||Y?.url||s?.serviceOrigin||s?.url||location.origin,K=!Y||Y.targetPeerId===s?.targetPeerId&&(Y.serviceOrigin||Y.url)===(s?.serviceOrigin||s?.url),z=Y?.serviceName||(K?s?.label:void 0)||J,[de,ge]=b.useState(TO),[Ie,Pe]=b.useState(!1),Re=W=>{if(o.current)return!0;const re=se(),ie=Dn(W);return!window.termdockDesktop||!ie?.targetPeerId||!re||re.targetPeerId===ie.targetPeerId?!1:(o.current=!0,r.current++,u(!1),w(!0),S(!1),h(!1),x("正在恢复此窗口的服务…"),Ja(),Au({...ie,targetPeerId:ie.targetPeerId,serviceName:ie.label}),location.reload(),!0)};b.useEffect(()=>{const W=window.termdockDesktop;if(!W?.getServiceConnection)return;let re=!1;const ie=async()=>{const ae=JSON.stringify(se()),Z=r.current;n.current??=W.getServiceConnection();const oe=await n.current;re||Z!==r.current||ae!==JSON.stringify(se())||Re(oe)},Se=()=>{ie().catch(()=>{})};return Se(),window.addEventListener("focus",Se),window.addEventListener("pageshow",Se),window.addEventListener(vt,Se),()=>{re=!0,window.removeEventListener("focus",Se),window.removeEventListener("pageshow",Se),window.removeEventListener(vt,Se)}},[]),b.useEffect(()=>{if(!m||y)return;const W=window.setTimeout(()=>Pe(!0),8e3);return()=>window.clearTimeout(W)},[m,y]),b.useEffect(()=>{(!d&&!m||d&&(!B||de))&&uo({rendered:!0})},[d,m,B,de]),b.useEffect(()=>{Zt().then(W=>ee(W.peerId)).catch(()=>S(!0))},[]),b.useEffect(()=>{let W=!1,re=0;const ie=Se=>{const{origin:ae,sessionId:Z}=Se.detail,oe=++re;(async()=>{const ye=(await yt()).filter(me=>!!me.targetPeerId);let V=ye.find(me=>Dt(me).some(Me=>new URL(Me).origin===new URL(ae).origin));if(!V){const me=await(await qt()).fetch("/api/terminal/operations/collaboration-directory",{signal:AbortSignal.timeout(5e3)});if(!me.ok)throw new Error("暂时无法读取协作服务目录,请重试。");const G=(await me.json()).services?.find(fe=>fe.origin===ae&&fe.serviceId);V=ye.find(fe=>fe.targetPeerId===G?.serviceId)}if(W||oe!==re)return;if(!V){h(!0);return}const ue=window.termdockDesktop;if(ue?.collaborationFocus){const me=`remote:${encodeURIComponent(ae)}:${encodeURIComponent(Z)}`;if(await ue.collaborationFocus(me,V.targetPeerId))return;if(ue.openServiceConnection){const Me=await ue.openServiceConnection(V);if(W||oe!==re||Me?.ok&&await ue.collaborationFocus(me,V.targetPeerId))return;throw new Error("目标服务窗口尚未就绪,请重试切换会话。")}}if(pn()?.focusSession(V.targetPeerId,Z))return;const ke={...V,serviceName:V.label};sessionStorage.setItem(wu,JSON.stringify({serviceId:ke.targetPeerId,sessionId:Z})),await Kt(ke),!W&&oe===re&&(ge(Z),u(!0))})().catch(ye=>{W||oe!==re||(U(ye instanceof Error?ye.message:"暂时无法打开远程会话"),h(!0))})};return window.addEventListener("termdock:open-remote-session",ie),()=>{W=!0,window.removeEventListener("termdock:open-remote-session",ie)}},[]);const q=async(W=5e3)=>{const re=r.current,ie=se(),Se=fe=>fe?JSON.stringify([fe.targetPeerId,fe.serviceOrigin||fe.url]):"",ae=Se(ie),Z=Fe(),oe=await qt().catch(fe=>{throw re!==r.current||ae!==Se(se())||Z!==Fe()?new Error("SERVICE_SELECTION_CHANGED"):fe}),ye=()=>re===r.current&&ae===Se(se())&&oe===Fe();let V;try{V=await qr(oe,{timeoutMs:W})}catch(fe){throw ye()?fe:new Error("SERVICE_SELECTION_CHANGED")}if(!ye())throw new Error("SERVICE_SELECTION_CHANGED");const ue=window.termdockDesktop?.acknowledgeServiceInvitation,ke=n.current;if(ue&&ke){const fe=await ke,ve=()=>re===r.current&&ke===n.current&&oe===Fe()&&!oe.closed&&ie===se()&&ie?.targetPeerId===oe.targetPeerId&&fe?.targetPeerId===oe.targetPeerId;if(fe?.invitation&&ve())try{const Ee=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(fe.invitation)),Te=Array.from(new Uint8Array(Ee),Ve=>Ve.toString(16).padStart(2,"0")).join("");ve()&&await ue({targetPeerId:oe.targetPeerId,fingerprint:Te},ve)&&ve()&&(n.current=Promise.resolve({...fe,invitation:void 0}),c(void 0))}catch{}}const me=i2(),Me=XA()?.targetPeerId;Promise.all([k_(),yt()]).then(([fe,ve])=>{const Ee=ve.find(Ve=>Ve.targetPeerId===Me),Te=me==="relay"?`经 ${Ee?.label||Me?.slice(-12)||"入口服务"} 中转`:"直连";return oe.request({type:"device-name",name:Dx(),onlyIfMissing:!0,profile:{...fe,route:Te}})}).catch(()=>{}),M(V.fullService),H(V.canManage),u(!0),w(!1),S(!1),_s("ready");const G=se();uo({phase:"ready",...G?{service:{...G,id:G.targetPeerId,label:G.serviceName||location.host}}:{}}),Rr()&&s2()};b.useEffect(()=>{let W=!1,re=!1,ie=0,Se,ae;const Z=async()=>{if(W||o.current||re||p.current||g.current)return;const Me=se();if(Se&&!Wd(Me,Se)||ie&&(document.hidden||!Rr()))return;if(!navigator.onLine){_s("offline"),w(!0),S(!0),x("网络已断开,恢复后会自动连接"),uo({phase:"offline"});return}re=!0,clearTimeout(ae);const G=performance.now(),fe=Fe();try{if(fc&&!se())throw new Error("工作区的服务记录已移除,请重新添加服务。");const ve=()=>{const Ve=se();return Ve?JSON.stringify([Ve.targetPeerId,Ve.url,Ve.serviceOrigin]):void 0},Ee=ve();n.current??=window.termdockDesktop?.getServiceConnection?.();const Te=await n.current;if(W||o.current)return;if(Te&&Ee===ve()&&(!se()||se()?.targetPeerId===Te.targetPeerId))try{const Ve=$e(Te.serviceOrigin||Te.url);i({url:Ve,serviceOrigin:Ve,label:Te.label,targetPeerId:Te.targetPeerId})}catch{}if(Te?.invitation){c(Hn(Te.invitation)),h(!0),w(!1);return}if(!se()){if(a){w(!1);return}if(od??=(async()=>{if(Te?.targetPeerId){await Kt({...Te,targetPeerId:Te.targetPeerId,serviceName:Te.label});return}await QA()})(),await od,!se()){W||(u(!1),w(!1),S(!1));return}}if(Se&&await a2(),W)return;await q(fe?.canSwitchTransport?2500:5e3),Se&&(Se=void 0,C(void 0)),ie=0,performance.measure("termdock:connection-ready",{start:G,end:performance.now()})}catch(ve){if(W||p.current||g.current||ve instanceof Error&&ve.message==="SERVICE_SELECTION_CHANGED")return;const Ee=Nr(ve,{targetServiceId:se()?.targetPeerId});if(Ee?.context.targetServiceId&&Ee.context.targetServiceId!==se()?.targetPeerId)return;Ee?(Se=Ee,clearTimeout(ae),Qs(Ee),C(Ee),w(!1),h(!1),S(!1),uo({phase:"login",rendered:!0}),Wd(se(),Ee)&&(ae=setTimeout(()=>{Z()},300))):(fe&&Fe()===fe&&Ja(),S(!0),w(!0),od=void 0,x("连接暂未恢复,正在重试…"),_s(navigator.onLine?"reconnecting":"offline"),uo({phase:"reconnecting"}),ie++,ae=setTimeout(()=>{Z()},Math.min(5e3,300*2**Math.min(ie-1,5))),console.debug("[connection] retry",{elapsedMs:Math.round(performance.now()-G),attempt:ie,reason:ve instanceof Error?ve.message:"unknown"}))}finally{re=!1}};A.current=()=>{Se=void 0,ie=0};const oe=()=>{document.visibilityState==="visible"&&Rr()&&Z()},ye=oe,V=()=>{ie=0,oe()},ue=()=>{_e.getState().openLeft(),oe()};window.addEventListener(Mr,oe),window.addEventListener(qd,ue),pn()?.attach(Lc(),window),Z(),document.addEventListener("visibilitychange",ye),window.addEventListener("focus",oe),window.addEventListener("online",V),window.addEventListener("offline",oe),window.addEventListener("pageshow",oe);const ke=navigator.connection;ke?.addEventListener("change",V),window.addEventListener("auth:unauthorized",oe),window.addEventListener(vt,oe);const me=setInterval(oe,3e4);return()=>{W=!0,clearTimeout(ae),clearInterval(me),A.current=void 0,window.removeEventListener(Mr,oe),window.removeEventListener(qd,ue),document.removeEventListener("visibilitychange",ye),window.removeEventListener("focus",oe),window.removeEventListener("online",V),window.removeEventListener("offline",oe),window.removeEventListener("pageshow",oe),ke?.removeEventListener("change",V),window.removeEventListener("auth:unauthorized",oe),window.removeEventListener(vt,oe)}},[]);const ce=async(W=[])=>{const re=Fe();if(re){te(!0),U("");try{let ie=await re.request({type:"session-list"});if(F&&W.length){const Se=ie.items,ae=[...new Set(W)].filter(Z=>!Se.some(oe=>oe.sessionId===Z||oe.sourceSessionId===Z));for(const Z of ae)if(!(await re.fetch("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferredFrontendSessionId:Z,requireExisting:!0})})).ok)throw new Error("SHARE_SESSION_UNAVAILABLE");ae.length&&(ie=await re.request({type:"session-list"}))}P(ie.items)}catch(ie){U(ie instanceof Error&&ie.message==="SHARE_SESSION_UNAVAILABLE"?"此会话暂时无法分享,请确认终端仍在运行后重试。":"暂时无法读取终端列表,请重试。")}try{if(F){const ie=await re.request({type:"grants-list"});_(ie.invitations??[]);const Se=ie.subjectLabels??{},ae=await re.request({type:"route-access"}),Z=await yt(),oe=(Array.isArray(ae.grants)?ae.grants:[]).map(ye=>({id:`route:${ye.id}`,subjectId:ye.subjectId,scope:{kind:"service"},actions:["route.use"],routeTargetServiceId:ye.targetServiceId,routeTargetName:Z.find(V=>V.targetPeerId===ye.targetServiceId)?.label||"指定服务",...ye.active?{}:{revokedAt:ye.revokedAt??0}}));k([...ie.grants,...oe].map(ye=>({...ye,label:Se[ye.subjectId],deviceProfile:ie.deviceProfiles?.[ye.subjectId]})))}else{_([]);const ie=await re.request({type:"permissions"});k(ie.grants??[])}}catch{U("暂时无法读取设备权限,请重试。")}finally{te(!1)}}};b.useEffect(()=>{const W=re=>{const ie=re.detail;L(ie),h(!0),d&&ce(ie?.inviteSessionIds||(ie?.inviteSessionId?[ie.inviteSessionId]:[]))};return window.addEventListener(cc,W),()=>window.removeEventListener(cc,W)},[d,F]);const[he,je]=b.useState([]),pe=b.useRef(),We=b.useRef();b.useEffect(()=>{if(!f||!F)return;let W=!1;return pe.current=void 0,je([]),We.current=(async()=>{const re=await qt(),Se=await(await re.fetch("/api/terminal/settings")).json();if(W)return;const ae=Se.localAccess??{},Z=[],oe=[],ye=(V,ue)=>{try{const ke=new URL(V);if(ke.protocol==="http:"&&!["localhost","127.0.0.1","[::1]"].includes(ke.hostname))return;const me=ke.origin;if(oe.push(me),me===location.origin||Z.some(Me=>Me.url===me))return;Z.push({url:me,label:ue})}catch{}};if(ae.status==="active"&&typeof ae.url=="string"&&ye(ae.url,"服务域名"),Array.isArray(ae.interfaces))for(const V of ae.interfaces){const ue=V;typeof ue.url=="string"&&ye(ue.url,typeof ue.label=="string"&&ue.label||typeof ue.name=="string"&&ue.name||"IP 地址")}je(Z),pe.current=typeof ae.onboardingUrl=="string"&&typeof ae.caFingerprint=="string"&&ae.status!=="loopback-only"?{serviceId:re.targetPeerId,url:ae.onboardingUrl,fingerprint:ae.caFingerprint,origins:oe}:void 0})().catch(()=>{}),()=>{W=!0}},[f,F,Ce]);const be=async W=>{const re=window.termdockDesktop;if(!re?.openServiceConnection||!W.targetPeerId)return!1;const ie=r.current;n.current??=re.getServiceConnection?.();const Se=await n.current;if(ie!==r.current)throw new Error("SERVICE_SELECTION_CHANGED");if(Re(Se))return!0;const ae=v_(W),Z=se(),oe=Se||(Z?{...Z,id:Z.targetPeerId,label:Z.serviceName||""}:void 0);return!oe||nn(oe,ae.connection)?!1:(await ou(re,ae.connection,ae.invitation),h(!1),!0)},Ke=async W=>{g.current++;try{if(await be(W))return;if(!W.pairingCode&&!W.routeCode&&se()?.targetPeerId!==W.targetPeerId&&pn()){const re={...W,id:W.targetPeerId,label:W.serviceName||new URL(W.serviceOrigin||W.url).host};if(await On(re),Ya(re)){h(!1);return}}await Kt(W),O(W.viewLayout);try{sessionStorage.setItem(`termdock:shared-layout:${W.targetPeerId}`,W.viewLayout||"single")}catch{}if(W.viewMode)try{sessionStorage.setItem(`termdock:shared-view:${W.targetPeerId}`,W.viewMode)}catch{}ge(void 0),sessionStorage.removeItem(wu),Q(W.serviceName??new URL(W.url).hostname),await q(),C(void 0),A.current?.(),n.current&&(n.current=n.current.then(re=>re?{...re,invitation:void 0}:null)),c(void 0),h(!1),S(!1)}finally{g.current--}},De=async(W,re)=>{await be(W)||(await nm(W,re),v?await Ze():await q(),h(!1))},Pt=async W=>{const re=window.termdockDesktop;if(re?.openServiceConnection){n.current??=re.getServiceConnection?.();const ie=await n.current;if(ie&&nn(ie,W)&&Re(ie))return;await ou(re,W),h(!1);return}if(Ya(W)){h(!1);return}if(W.targetPeerId)try{await Ke({...W,targetPeerId:W.targetPeerId,serviceName:W.label});return}catch(ie){if(!(ie instanceof Lt))throw ie}return Qp(W.serviceOrigin||W.url)};b.useEffect(()=>{const W=re=>{Pt(re.detail).catch(ie=>{h(!0),U(ie instanceof Error?ie.message:"暂时无法打开服务")})};return window.addEventListener(yu,W),()=>window.removeEventListener(yu,W)});const Nt=async(W,re)=>{if(window.termdockDesktop?.openServiceConnection){await S_(window.termdockDesktop,W),h(!1);return}if(W.includes("#termdock-invite=")){const ie=Hn(W);if(re!==void 0&&ie.routeOnly){await nm(ie,re),await q(),h(!1);return}try{await Ke(ie)}catch(Se){if(ie.routeOnly&&Se instanceof Lt)return{passwordRequired:!0};throw Se}return}return Qp($e(W),re)},it=async W=>{const re=await qt();await We.current;const{includeBackup:ie=!0,entryAddress:Se,viewMode:ae,viewLayout:Z,...oe}=W,ye=se(),V=ye?Xt(ye):[];let ue;if(ie&&V.length){for(const Ee of V)try{const Te=await ex({...ye,targetPeerId:re.targetPeerId},Ee);ue={...Ee,routeCode:Te.routeCode};break}catch{}if(!ue)throw new Error("无法分享备用连接:需要入口管理员授权。也可以关闭此选项,生成直接连接邀请。")}let ke=ye?.serviceOrigin||ye?.url||location.origin;if(Se)try{ke=new URL(Se).origin}catch{throw new Error("邀请接入地址无效。")}if(ae&&oe.scope.kind==="sessions"){for(const Ee of oe.scope.sessionIds)if(!(await re.fetch(`/api/terminal/${encodeURIComponent(Ee)}/view-mode`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:ae})})).ok)throw new Error("无法保存邀请的默认显示方式,请重试")}const me=await re.request({type:"invite-create",...oe});if(typeof me.code!="string"||typeof me.expiresAt!="number")throw new Error("暂时无法生成邀请。");window.dispatchEvent(new Event("termdock:sharing-changed")),await ce();let Me=Mf({viewMode:ae,viewLayout:Z,v:1,serviceId:re.targetPeerId,code:me.code,entryUrl:ue?.url||ke,serviceUrl:ke,name:J,entryServiceId:ue?.targetPeerId,routeCode:ue?.routeCode});const G=pe.current,fe=new URL(ke).hostname,ve=fe.endsWith(".local")||/^(?:192\.168\.|10\.|172\.(?:1[6-9]|2\d|3[01])\.)/.test(fe)||fe.startsWith("[fd")||fe.startsWith("[fc");if(!ue&&ve&&G?.serviceId===re.targetPeerId&&G.origins.includes(new URL(ke).origin))try{Me=b_(Me,G.url)}catch{throw new Error("证书引导地址暂不可用,请重新打开分享后重试。")}return{id:typeof me.invitationId=="string"?me.invitationId:void 0,url:Me,...Me.startsWith("http:")&&G?{certificateFingerprint:G.fingerprint}:{},expiresAt:me.expiresAt}},Ze=async(W=se()?.targetPeerId)=>{if(W!==se()?.targetPeerId)throw new Error("SERVICE_SELECTION_CHANGED");YA();try{await q(),A.current?.(),C(void 0)}catch(re){const ie=Nr(re,{targetServiceId:se()?.targetPeerId});throw ie&&(Qs(ie),C(ie)),re}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"h-full min-h-0",style:v?{visibility:"hidden"}:void 0,ref:W=>W?.toggleAttribute("inert",!!v),"aria-hidden":v?!0:void 0,children:d?B&&!de?e:l.jsx(wO,{client:Fe(),initialSessionId:de,initialViewLayout:D||se()?.viewLayout,initialViewMode:se()?.viewMode}):v?null:m&&!y&&!f?l.jsx(jf,{status:Ie?"连接时间较长,仍在等待服务…":E,detail:Ie?z:void 0,actionLabel:Ie?"管理服务":void 0,onAction:()=>h(!0)}):m?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(dw,{size:24,strokeWidth:1.5})}),l.jsx("h1",{className:"max-w-full truncate text-base font-medium tracking-tight",title:z,children:z}),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:[!y&&l.jsx(Je,{size:13,className:"shrink-0 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),l.jsx("span",{children:E})]}),y&&l.jsx("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:t(se()?"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:()=>h(!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(D0,{serviceOrigin:Ce,onManageServices:()=>h(!0),focusEnabled:!f,onLoginSuccess:()=>{q().catch(()=>S(!0))}})]})}),v&&l.jsx(RO,{failure:v,target:se(),settingsOpen:f,onRecovered:()=>Ze(v.context.targetServiceId),onSettings:()=>h(!0)},JSON.stringify([v.code,v.context])),f&&l.jsx(CD,{initialShareSessionId:N?.inviteSessionId,initialShareSessionIds:N?.inviteSessionIds,initialViewLayout:N?.viewLayout,initialViewMode:N?.viewMode,onConnect:Ke,onClose:()=>{h(!1),L(void 0)},onAddService:Nt,onOpenService:Pt,onConnectWithPassword:De,paired:d||!!se(),initialInvite:a,initialServicePage:v&&se()?{kind:v.code==="RELAY_AUTHORIZATION_REQUIRED"?"routes":"edit",service:{...se(),id:se().targetPeerId,label:z}}:void 0,currentServiceName:z,currentServiceId:Fe()?.targetPeerId||se()?.targetPeerId,currentServiceOrigin:Ce,currentIdentity:$,grants:I,sessions:R,loading:ne,loadError:le,onRetry:()=>{ce()},onRename:async(W,re)=>{await(await qt()).request({type:"device-name",subjectId:W,name:re}),await ce()},hasBackup:!!se()&&Xt(se()).length>0,inviteAddresses:he,onCreateInvite:F?it:void 0,invitations:F?T:[],onRevokeInvitation:F?async W=>{try{if((await(await qt()).request({type:"invite-revoke",invitationId:W})).revoked!==!0)throw new Error("INVITATION_NOT_PENDING")}finally{await ce()}}:void 0,onRevoke:F?async W=>{await(await qt()).request(W.startsWith("route:")?{type:"route-revoke",grantId:W.slice(6)}:{type:"revoke",grantId:W}),await ce()}:void 0})]})}function PO(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 NO(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 _O({error:e,componentStack:t}){const{t:n}=At(),[r,o]=Mt.useState("idle"),s=async()=>{const i=PO(e,t,{url:window.location.href,userAgent:navigator.userAgent,capturedAt:new Date().toISOString()});o(await NO(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 LO extends Mt.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(_O,{error:this.state.error,componentStack:this.state.componentStack}):this.props.children}}const DO=1e3,OO=2e4,jO=9e4,MO=5e3,Ne={ws:null,listeners:new Set,reconnectAttempt:0,reconnectTimer:null,idleCloseTimer:null,closing:!1};let oa=0,Po=null;function BO(){return typeof window>"u"?null:`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/control/ws`}function O0(){Ne.idleCloseTimer&&(clearTimeout(Ne.idleCloseTimer),Ne.idleCloseTimer=null)}function FO(){O0(),!(Ne.ws&&Ne.ws.readyState===WebSocket.OPEN)&&(Ne.idleCloseTimer=setTimeout(()=>{Ne.idleCloseTimer=null,Ne.listeners.size===0&&UO()},MO))}function UO(){if(Ne.ws){try{Ne.ws.close()}catch{}Ne.ws=null}Po&&(clearInterval(Po),Po=null)}function Pg(){if(Ne.reconnectTimer)return;const e=Math.min(DO*Math.pow(2,Ne.reconnectAttempt),OO);Ne.reconnectAttempt+=1,Ne.reconnectTimer=setTimeout(()=>{Ne.reconnectTimer=null,j0()},e)}function j0(){const e=BO();if(!e||Ne.ws&&Ne.ws.readyState===WebSocket.OPEN)return;let t;try{t=Qv(e)}catch{Pg();return}Ne.ws=t,t.onopen=()=>{Ne.reconnectAttempt=0,oa=Date.now(),Po||(Po=setInterval(()=>{if(!(!Ne.ws||Ne.ws.readyState!==WebSocket.OPEN)&&oa>0&&Date.now()-oa>jO)try{Ne.ws.close()}catch{}},3e4),Po.unref?.())},t.onmessage=n=>{oa=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&&Pg()},t.onerror=()=>{}}function HO(e){return Ne.listeners.add(e),O0(),Ne.ws||j0(),()=>{Ne.listeners.delete(e),Ne.listeners.size===0&&FO()}}const sd=cr(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 $O(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:zO}=Mt;function qO(e){const t=zO();return n=>{const r=e(n);return $O(t.current,r)?t.current:t.current=r}}function M0(e,t){return`termdock:chat-viewed:${se()?.targetPeerId||location.origin}:${e}:${t}`}function Ng(e,t){try{const n=JSON.parse(localStorage.getItem(M0(e,t.conversationId))||"[]");return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function _g(e,t,n){try{localStorage.setItem(M0(e,t.conversationId),JSON.stringify(t.messageIds.filter(r=>n.has(r))))}catch{}}const An=new Map,zs=()=>se()?.targetPeerId||location.origin;async function th(e,t){if(t.running||!t.ids.size||zs()!==t.scope)return;clearTimeout(t.timer),t.timer=void 0,t.running=!0;const n=[...t.ids].slice(0,100),r=Fe();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)){An.delete(e);return}throw new Error("Viewing acknowledgement unavailable")}const s=await o.json();if(An.get(e)!==t)return;if(zs()!==t.scope||Fe()!==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,zs()===t.scope&&t.apply(s.chatIndex)}catch{t.failures++}finally{t.running=!1,An.get(e)===t&&(t.ids.size?t.timer=setTimeout(()=>{t.timer=void 0,th(e,t)},t.failures?Math.min(3e4,1e3*2**Math.min(5,t.failures-1)):0):An.delete(e))}}function Lg(e,t,n,r){if(!n.length||t.viewedMessageIds===void 0)return;const o=zs(),s=`${o}:${e}:${t.conversationId}`;let i=An.get(s);i||(i={sessionId:e,conversationId:t.conversationId,scope:o,ids:new Set,apply:r,running:!1,failures:0},An.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,th(s,a)},0)}}function KO(){for(const e of An.values())clearTimeout(e.timer);An.clear()}if(typeof window<"u"){const e=()=>{for(const[t,n]of An)zs()===n.scope&&th(t,n)};window.addEventListener("online",e),window.addEventListener("termdock:secure-ready",e),window.addEventListener("auth:unauthorized",KO)}const GO=256*1024,WO=256*1024,VO=128;function Dg(e,t=GO){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 YO(e,t=WO,n=VO){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 B0(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 XO=e=>B0(t=>t.put(e,e.targetPeerId),!0),JO=e=>B0(t=>t.delete(e),!0),F0="termdock-pwa-notifications-enabled",U0="termdock-pwa-ai-notifications-enabled",H0="termdock-pwa-exit-notifications-enabled",$0="termdock-pwa-notification-alert-style",ZO="termdock-notification-claim:",bu=5e3,QO=1500,vu="termdock-push-last-sync",Og=360*60*1e3,ej=10080*60*1e3,qs=new Map;function nh(){return ut()?!0:typeof window<"u"&&typeof Notification<"u"&&"serviceWorker"in navigator&&window.isSecureContext}function tj(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function nj(){return typeof window>"u"?!1:!!(window.matchMedia("(display-mode: standalone)").matches||"standalone"in navigator&&navigator.standalone===!0)}function rj(){return ut()?!0:!(!nh()||tj()&&!nj())}function KB(){return ut()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function rh(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(F0)==="true"}catch{return!1}}function GB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(F0,String(e))}catch{}}function lc(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(U0);return e===null?!0:e==="true"}catch{return!0}}function WB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(U0,String(e))}catch{}}function xu(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(H0)==="true"}catch{return!1}}function VB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(H0,String(e))}catch{}}function ni(){if(typeof window>"u")return"normal";try{const e=window.localStorage.getItem($0);if(e==="quiet"||e==="persistent")return e}catch{}return"normal"}function YB(e){if(!(typeof window>"u"))try{window.localStorage.setItem($0,e)}catch{}}async function XB(){return ut()?"granted":nh()?Notification.permission==="default"?Notification.requestPermission():Notification.permission:"unsupported"}function oj(){return typeof document>"u"?!0:document.visibilityState==="visible"&&document.hasFocus()}function sj(e){for(const[t,n]of qs)e-n>bu&&qs.delete(t)}function ij(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 aj(e){const t=ij(e);if(!t)return!0;const n=Date.now();sj(n);const r=qs.get(t)??0;if(n-r<bu)return!1;try{if(typeof window<"u"&&window.localStorage){const o=`${ZO}${t}`,s=Number(window.localStorage.getItem(o)??"0");if(Number.isFinite(s)&&n-s<bu)return qs.set(t,s),!1;Number.isFinite(s)&&s>0&&window.localStorage.removeItem(o),window.localStorage.setItem(o,String(n))}}catch{}return qs.set(t,n),!0}async function Mc(){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),QO)})])??e}catch{return null}}function cj(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 oh(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 lj(e=!1,t=!1){if(ut())return!0;if(!rh()||!rj()||Notification.permission!=="granted")return!1;const n=await Mc();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()<ej);if(!s)try{s=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:cj(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(vu)??"0"),c=!o.subscription||o.subscription.endpoint!==s.endpoint||Date.now()-(o.subscription.updatedAt??0)>=Og;if(e||c||Date.now()-a>=Og||i){if(!(await oh("subscribe",{subscription:s.toJSON(),aiEnabled:lc(),exitEnabled:xu(),alertStyle:ni(),locale:navigator.language})).ok)return!1;window.localStorage.setItem(vu,String(Date.now()))}const d=se();return d&&await XO({targetPeerId:d.targetPeerId,addresses:Dt(d),routes:Xt(d),publicKey:o.publicKey,preferences:{aiEnabled:lc(),exitEnabled:xu(),alertStyle:ni(),locale:navigator.language}}),!0}catch(r){return console.warn("[PWA notifications] Push subscription sync failed:",r),!1}}async function JB(){if(ut())return;const t=await(await Mc())?.pushManager?.getSubscription();try{await oh("unsubscribe",{endpoint:t?.endpoint})}finally{const n=se();n&&await JO(n.targetPeerId),await t?.unsubscribe();try{window.localStorage.removeItem(vu)}catch{}}}async function ZB(){if(ut()||!rh())return;(await oh("preferences",{aiEnabled:lc(),exitEnabled:xu(),alertStyle:ni(),locale:navigator.language})).status===404&&await lj(!0)}async function QB(){if(!ut())try{const e=navigator;typeof e.clearAppBadge=="function"&&await e.clearAppBadge()}catch{}}async function e3(e){if(!ut())try{const t=await Mc();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 id(e){if(!rh()||!nh())return!1;if(e.requireHidden!==!1&&oj())return!0;const t=ut();if(t){const s=e.alertStyle??ni(),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 Mc();if(e.deferToPush&&await n?.pushManager?.getSubscription())return!0;if(e.requireHidden!==!1){if(await n?.pushManager?.getSubscription())return!0}if(!aj(e))return!0;const r=e.alertStyle??ni(),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 dj(){try{return localStorage.getItem("termdock:locale")||"en"}catch{return"en"}}function uj(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 jg=1e6;function Gt(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 Bc="termdock-shell-titles-v1";function Fc(){if(typeof window>"u")return{};try{const e=localStorage.getItem(Bc);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function Mg(e){return Fc()[e]??null}function fj(e,t){if(!(typeof window>"u"))try{const n=Fc();t?n[e]=t:delete n[e],localStorage.setItem(Bc,JSON.stringify(n))}catch{}}function hj(e){if(!(typeof window>"u"))try{const t=Fc();delete t[e],localStorage.setItem(Bc,JSON.stringify(t))}catch{}}const Uc="termdock-agent-cache-v1";function sh(){if(typeof window>"u")return{};try{const e=localStorage.getItem(Uc);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function Bg(e,t){if(!(typeof window>"u"))try{const n=sh();t?n[e]=t:delete n[e],localStorage.setItem(Uc,JSON.stringify(n))}catch{}}function pj(e){if(!(typeof window>"u"))try{const t=sh();delete t[e],localStorage.setItem(Uc,JSON.stringify(t))}catch{}}function mj(){if(!(typeof window>"u"))try{localStorage.removeItem(Uc)}catch{}}function Su(e){return sh()[e]??null}function gj(){if(!(typeof window>"u"))try{localStorage.removeItem(Bc)}catch{}}const dc=cr((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)??Gt(p),w=g.length>0?[...m.bufferChunks]:m.bufferChunks;let y=m.bufferLength;for(const S of g){const v=f++;w.push({id:v,data:S}),c.set(p,v),y+=S.length}for(;g.length>0&&m.mode!=="tmux"&&y>jg&&w.length>1;){const S=w.shift();if(!S)break;y-=S.data.length}u.set(p,{...m,bufferChunks:w,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=YO(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?Gt(i):u??Gt(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??Su(i)??h.agent,agentResumeRecovered:u?.agentResumeRecovered??h.agentResumeRecovered,chatAttention:u?.chatAttention,shellTitle:u?.shellTitle??Fc()[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)??Gt(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)??Gt(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)??Gt(i);return d.set(i,{...u,cwd:a,updatedAt:Date.now()}),{sessions:d}})},setSessionShellTitle:(i,a)=>{e(c=>{const d=c.sessions.get(i)??Gt(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}}),fj(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)=>{Bg(i,a),e(c=>{const d=c.sessions.get(i)??Gt(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,w=a.agentResumeRecovered!==void 0?a.agentResumeRecovered:d.agentResumeRecovered,y=a.agentRich??d.agentRich,S=a.agentActivity??d.agentActivity,v=a.agentCwd!==void 0?a.agentCwd:d.agentCwd,C=c.activeSessionId!==i,A=d.agentStatus==="working"||d.agentStatus==="waiting"||d.agentStatus==="done",E=a.reviewed===!1||a.reviewed===null&&u===null&&A&&C;if(d.agentStatus===u&&d.agentIndicator===f&&d.agentStatusDetail===h&&d.agent===p&&d.agentMessage===g&&d.agentNativeSessionId===m&&d.agentResumeRecovered===w&&d.agentRich===y&&d.agentActivity===S&&d.agentCwd===v&&d.agentNeedsReview===E)return;const x=new Map(c.sessions);if(x.set(i,{...d,agentStatus:u,agentIndicator:f,agentStatusDetail:h,agent:p,agentMessage:g,agentNativeSessionId:m,agentResumeRecovered:w,agentRich:y,agentActivity:S,agentCwd:v,agentNeedsReview:E,updatedAt:Date.now()}),e({sessions:x}),p&&Bg(i,p),!lc())return;const I=p?.displayName??d.agent?.displayName??"Agent",k=dj(),T=uj(k,I);if(u==="waiting"&&d.agentStatus!=="waiting"&&C){id({title:T.waitingTitle,body:g??T.waitingBody,tag:`agent:${i}`,dedupKey:`agent:${i}:waiting:${S}`,data:{url:"/",sessionId:i},deferToPush:!0});return}if(u==="done"&&d.agentStatus!=="done"&&C){id({title:T.doneTitle,body:T.doneBody,tag:`agent:${i}`,dedupKey:`agent:${i}:done:${S}`,data:{url:"/",sessionId:i},deferToPush:!0});return}u===null&&(d.agentStatus==="working"||d.agentStatus==="waiting")&&C&&id({title:T.exitedTitle,body:T.exitedBody,tag:`agent:${i}`,dedupKey:`agent:${i}:exited:${S}`,data:{url:"/",sessionId:i},deferToPush:!0})},setAgentResumeRecovered:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??Gt(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&&gx(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=Ng(i,a),u=a.viewedMessageIds!==void 0;if(e(f=>{const h=f.sessions.get(i)??{...Gt(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 S of p.index.messageIds)m.has(S)||g.add(S);const w=a.messageIds.filter(S=>!g.has(S));if(JSON.stringify(p?.index)===JSON.stringify(a)&&JSON.stringify(p?.unreadIds)===JSON.stringify(w))return f;const y=new Map(f.sessions);return y.set(i,{...h,chatAttention:{mode:p?.mode??!1,index:a,unreadIds:w}}),{sessions:y}}),u){const f=new Set(a.viewedMessageIds);for(const p of f)d.add(p);_g(i,a,d);const h=a.messageIds.filter(p=>d.has(p)&&!f.has(p));Lg(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)??{...Gt(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}}),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=Ng(i,d.index);for(const m of d.index.messageIds)h.has(m)||p.add(m);if(_g(i,d.index,p),d.index.viewedMessageIds!==void 0){Lg(i,d.index,a.filter(m=>d.unreadIds.includes(m)),m=>{const w=t().sessions.get(i)?.chatAttention?.index;w?.conversationId===m.conversationId&&t().setSessionChatIndex(i,{...w,viewedMessageIds:[...new Set([...w.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)??Gt(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(...Dg(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 w of Dg(m)){const y=h++;p.push({id:y,data:w}),c=y,g+=w.length}for(;f.mode!=="tmux"&&g>jg&&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}}),hj(i),pj(i)},clearAllTerminalSessions:()=>{n.pendingChunksBySession.clear(),n.outputAtBySession.clear(),n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e({sessions:new Map,nextChunkId:1}),gj(),mj()}}}),uc=cr(e=>({records:[],shellNames:yc,setShellNames:t=>e({shellNames:new Set(t)}),replace:t=>e({records:t})})),t3=e=>uc.getState().setShellNames(e);function yj(e,t,n=yc){const r=t&&(!e.backendSessionId||!t.terminalSessionId||e.backendSessionId===t.terminalSessionId),o={...e,shellTitle:e.shellTitle??(!t||r?Mg(e.sessionId):null),agent:e.agent??(!t||r?Su(e.sessionId):null),...r?{activeProgram:t.activeProgram??e.activeProgram,cwd:t.cwd??e.cwd,shellTitle:t.shellTitle??e.shellTitle??Mg(e.sessionId),promptState:t.promptState??e.promptState,agent:t.agent??e.agent??Su(e.sessionId)}:{}};return{sessionId:e.sessionId,mode:e.mode??null,collectionRunId:e.collectionRunId??null,...bw(o,n),cwd:o.cwd??null,agent:o.agent??null,lastActivity:e.lastActivity}}function z0(){const e=dc.getState().sessions,{records:t,shellNames:n}=uc.getState();return t.map(r=>yj(r,e.get(r.sessionId),n))}function wj(){const e=uc(r=>r.records),t=uc(r=>r.shellNames),n=dc(qO(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 b.useMemo(()=>z0(),[e,n,t])}function n3(e){const t=wj();return b.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??Bu(r);return{...r,displayName:s,displaySubtitle:i}})},[e,t])}const Eu="termdock:session-notice";function bj(){return b.useEffect(()=>{const e=()=>sd.getState().view(!document.hidden&&Rr()?dc.getState().activeSessionId:null);e();const t=dc.subscribe((n,r)=>{n.activeSessionId!==r.activeSessionId&&e()});return document.addEventListener("visibilitychange",e),window.addEventListener(Mr,e),()=>{t(),document.removeEventListener("visibilitychange",e),window.removeEventListener(Mr,e),sd.getState().view(null)}},[]),b.useEffect(()=>HO(e=>{if(e.type!=="session-notice")return;sd.getState().receive(e.sessionId,e.id);const t=se()?.targetPeerId,n=pn(),r=window.parent,o=z0().find(a=>a.sessionId===e.sessionId)?.displayName??Bu({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(Eu,!1,!1,s),r.dispatchEvent(i)}),[]),null}function vj(){const{locale:e}=At(),t=e==="zh",[n,r]=b.useState([]);b.useEffect(()=>{const i=a=>{const c=a.detail;r(d=>d.some(u=>u.key===c.key)?d:[...d,c])};return window.addEventListener(Eu,i),()=>window.removeEventListener(Eu,i)},[]);const o=b.useCallback(i=>{r(a=>a.filter(c=>c.key!==i))},[]),s=n[0];return s?$n.createPortal(l.jsx(xj,{notice:s,remaining:n.length-1,chinese:t,onDismiss:o},s.key),document.body):null}function xj({notice:e,remaining:t,chinese:n,onDismiss:r}){const[o,s]=b.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(Nu,{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(ey,{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(ai,{size:14})})]})}const Fg=5*6e4;let ku,q0=!1,K0=!1,Ug=!1;const Iu=new Set;function Cu(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&&Cu(r)}}async function r3(){const e=window.top&&window.top.location.origin===location.origin?window.top:window;Cu(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"})})}Cu(e),e.location.reload()}function Hg(){q0=!0,Iu.forEach(e=>e())}function Sj(){return b.useSyncExternalStore(e=>(Iu.add(e),()=>{Iu.delete(e)}),()=>q0,()=>!1)}function Ej(){window.dispatchEvent(new Event("termdock:before-update")),K0=!0,ku?.waiting?ku.waiting.postMessage({type:"SKIP_WAITING"}):window.location.reload()}function kj(e,t){let n=e;return()=>{if(!n){n=!0;return}t()}}function Ij(){if(Ug||typeof window>"u"||!("serviceWorker"in navigator))return;Ug=!0,navigator.serviceWorker.addEventListener("controllerchange",kj(!!navigator.serviceWorker.controller,()=>{K0?window.location.reload():Hg()}));const e=()=>{navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}).then(t=>{ku=t;const n=()=>{t.waiting&&Hg()},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<Fg||(o=Date.now(),t.update().then(n).catch(()=>{}))};s(),window.setInterval(s,Fg),document.addEventListener("visibilitychange",s)}).catch(()=>{})};document.readyState==="complete"?e():window.addEventListener("load",e,{once:!0})}function Cj(){const e=Sj(),[t,n]=b.useState(!1),{locale:r}=At();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:Ej,children:o?"重新加载":"Reload"}),l.jsx("button",{type:"button",className:"whitespace-nowrap text-muted-foreground",onClick:()=>n(!0),children:o?"稍后":"Later"})]})}let Ts=[],ad=!1;function Rj(e,t,n={}){typeof window>"u"||(Ts.push(JSON.stringify({level:e,message:t,data:{ts:Date.now(),...n}})),Tj())}async function Tj(){if(!ad){ad=!0;try{for(;Ts.length>0;){const e=Ts[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),Ts.shift()}catch{Ts=[];break}}}finally{ad=!1}}}function Aj(){const e=b.useRef(null),t=navigator.standalone===!0||window.matchMedia?.("(display-mode: standalone)").matches===!0,n=window.parent===window&&jc()&&t;return b.useEffect(()=>{if(!n)return;const r=()=>{const o=e.current;if(!o)return;const s=o.getBoundingClientRect(),i=getComputedStyle(o);Rj("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?$n.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 G0(e){const t=document.querySelector('meta[name="theme-color"]');t&&t.setAttribute("content",e==="light"?"#FFFCF0":"#1C1B1A")}const W0=b.createContext(void 0);function o3({children:e}){const t=b.useContext(W0),n=t===void 0?typeof document>"u"?null:document.body:t;return n?$n.createPortal(e,n):null}const Pj={activeKey:"root",items:[]},Nj=()=>()=>{},_j=()=>Pj;function Lj({host:e,item:t,visible:n,active:r}){const o=b.useRef(null);return b.useEffect(()=>{o.current?.toggleAttribute("inert",!r)},[r]),b.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]),$n.createPortal(l.jsx("iframe",{ref:o,title:t.service?.label||"服务工作区","data-workspace-key":t.key,src:`/workspace.html?${Gv}=${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 Dj({children:e}){const t=window.parent===window?pn():void 0,n=b.useSyncExternalStore(t?.subscribe||Nj,t?.snapshot||_j),[r,o]=b.useState(null),[s,i]=b.useState(()=>n.activeKey==="root"?"root":null),[a,c]=b.useState(),[d,u]=b.useState(!1),[f,h]=b.useState(),p=n.items.find(v=>v.key===n.activeKey),g=p?.rendered||a===n.activeKey?n.activeKey:s,m=g!==n.activeKey,w=m&&s===null;b.useLayoutEffect(()=>{if(!m||w){h(void 0);return}const v=()=>{const C=Array.from(document.querySelectorAll("iframe[data-workspace-key]")).find(_=>_.dataset.workspaceKey===s),I=(s==="root"?r:C?.contentDocument)?.querySelector('nav[aria-label="切换服务"]')?.closest("[data-sidebar-gesture-ignore]")?.getBoundingClientRect();if(!I||I.width===0||I.right<=0){h(void 0);return}const k=C?.getBoundingClientRect(),T=I.top+(k?.top??0)>=160;h({left:I.left+(k?.left??0)+12,top:(T?I.top-8:I.bottom+8)+(k?.top??0),width:Math.max(0,I.width-24),transform:T?"translateY(-100%)":"none"})};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[m,w,s,r]),b.useLayoutEffect(()=>{t?.present(g),m||i(g),r?.toggleAttribute("inert",g!=="root"||m)},[t,r,g,m]),b.useEffect(()=>{if(u(!1),!m)return;const v=setTimeout(()=>u(!0),8e3);return()=>clearTimeout(v)},[n.activeKey,m]),b.useEffect(()=>{c(void 0)},[n.activeKey]);const y=n.items.find(v=>v.key===s),S=p?.phase==="offline"?"网络已断开,等待恢复…":p?.phase==="reconnecting"?"连接暂未恢复,正在重试…":d?"连接时间较长,仍在等待服务…":w?"正在恢复服务…":"正在切换服务…";return b.useEffect(()=>{if(!t)return;const v=()=>{try{const C=JSON.parse(localStorage.getItem("termdock-color-theme")||"null");(C==="dark"||C==="light")&&(document.documentElement.dataset.theme=C,G0(C))}catch{}};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[t]),b.useEffect(()=>{if(!t||!("serviceWorker"in navigator))return;const v=E=>{if(E.source!==navigator.serviceWorker.controller)return;const x=E.data;x?.type==="termdock:focus-session"&&typeof x.targetPeerId=="string"&&typeof x.sessionId=="string"&&t.focusSession(x.targetPeerId,x.sessionId)&&(E.ports[0]?.postMessage({type:"termdock:focus-session-ack"}),E.stopImmediatePropagation())},C=async()=>{if("caches"in window)try{const E=await caches.open("termdock-notification-target-v1"),x=await E.match("/__termdock-notification-target");if(!x)return;const I=await x.json();typeof I.targetPeerId=="string"&&typeof I.sessionId=="string"&&Date.now()-I.clickedAt<3e4&&t.focusSession(I.targetPeerId,I.sessionId)&&await E.delete("/__termdock-notification-target")}catch{}},A=()=>{document.hidden||C()};return navigator.serviceWorker.addEventListener("message",v),document.addEventListener("visibilitychange",A),C(),()=>{navigator.serviceWorker.removeEventListener("message",v),document.removeEventListener("visibilitychange",A)}},[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(W0.Provider,{value:r,children:e})}),n.items.filter(v=>v.key!=="root").map(v=>l.jsx(Lj,{host:t,item:v,visible:g===v.key,active:!m&&g===v.key},v.key)),w&&l.jsx(jf,{className:"z-modal-panel",status:S,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&&!w&&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:v=>{if(v.key==="Escape"&&y?.service&&(v.preventDefault(),t.activate(y.service)),v.key==="Tab"){const C=Array.from(v.currentTarget.querySelectorAll("button")),A=C[0],E=C[C.length-1];v.shiftKey&&document.activeElement===A?(v.preventDefault(),E?.focus()):!v.shiftKey&&document.activeElement===E&&(v.preventDefault(),A?.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(Je,{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:S})]})]}),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 Oj=b.lazy(()=>Yt(()=>import("./App-B2ioVIx_.js").then(e=>e.b),__vite__mapDeps([23,12,1,13,24,25,2,26,27,15,16,28,10,29,30,31,32,33,34,35,36,37,38,39,40,41,5,6,7,8,9,42,43,44,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]))),jj=b.lazy(()=>Yt(()=>import("./DagPlayground-0oF_gy27.js"),__vite__mapDeps([98,99,1,100,2,101,55,64,27])).then(e=>({default:e.DagPlayground}))),Mj=b.lazy(()=>Yt(()=>import("./DiffLab-DhMOv8st.js"),__vite__mapDeps([102,1,103,17,65,2,104,105])).then(e=>({default:e.DiffLab}))),Bj=b.lazy(()=>Yt(()=>import("./DiffReviewLab-Dk7fmTHI.js"),__vite__mapDeps([106,1,107,7,15,16,108,2,18,103,17,65,104,105])).then(e=>({default:e.DiffReviewLab})));BD();c2();p_();window.parent===window&&Ij();const As=se();As&&Yt(()=>import("./App-B2ioVIx_.js").then(e=>e.b),__vite__mapDeps([23,12,1,13,24,25,2,26,27,15,16,28,10,29,30,31,32,33,34,35,36,37,38,39,40,41,5,6,7,8,9,42,43,44,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")&&VA(As?{...As,id:As.targetPeerId,label:As.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,G0(e))}catch{}y_.createRoot(document.getElementById("root")).render(l.jsxs(Mt.StrictMode,{children:[l.jsx(Aj,{}),l.jsx(u_,{}),l.jsxs(a_,{children:[window.parent===window&&l.jsxs(l.Fragment,{children:[l.jsx(Cj,{}),l.jsx(vj,{})]}),l.jsx(LO,{children:l.jsx(b.Suspense,{fallback:l.jsx(jf,{}),children:(()=>{const e=new URLSearchParams(window.location.search);return e.get("dag-playground")==="1"?l.jsx(jj,{}):e.get("diff-review-lab")==="1"?l.jsx(Bj,{}):e.get("diff-lab")==="1"?l.jsx(Mj,{}):l.jsx(Dj,{children:l.jsxs(AO,{children:[l.jsx(bj,{}),l.jsx(Oj,{}),l.jsx(h_,{})]})})})()})})]})]}));export{ii as $,Fx as A,Nu as B,Pn as C,hm as D,ox as E,_u as F,Cg as G,Fy as H,dO as I,Je as J,lm as K,No as L,zA as M,rx as N,si as O,Lu as P,iu as Q,Ky as R,Wy as S,Ks as T,Gs as U,Du as V,Ou as W,rw as X,MS as Y,vt as Z,fd as _,Af as a,wB as a$,IO as a0,Wx as a1,gc as a2,aw as a3,ju as a4,jf as a5,dw as a6,He as a7,WD as a8,Mu as a9,Kj as aA,Gj as aB,Wj as aC,Vj as aD,SD as aE,Rs as aF,Kx as aG,rN as aH,mB as aI,gm as aJ,B_ as aK,QP as aL,uf as aM,I_ as aN,_f as aO,BA as aP,UB as aQ,Yj as aR,MP as aS,XC as aT,y2 as aU,lP as aV,Xj as aW,Jj as aX,Zj as aY,Qj as aZ,eM as a_,Jd as aa,Rg as ab,uO as ac,OD as ad,hw as ae,Mr as af,o3 as ag,ai as ah,Yt as ai,YD as aj,rP as ak,Ya as al,df as am,iB as an,nB as ao,sB as ap,Bn as aq,AN as ar,t_ as as,Hj as at,$j as au,zj as av,qj as aw,XM as ax,MB as ay,nO as az,Yg as b,Cu as b$,xB as b0,Ir as b1,kN as b2,EN as b3,_B as b4,QB as b5,EP as b6,Rj as b7,cO as b8,tM as b9,mO as bA,LB as bB,Sg as bC,V2 as bD,gl as bE,i2 as bF,XA as bG,Fe as bH,__ as bI,UP as bJ,jB as bK,uB as bL,e3 as bM,x2 as bN,gP as bO,FP as bP,sM as bQ,Tx as bR,iM as bS,b2 as bT,r_ as bU,Rw as bV,tx as bW,S2 as bX,lM as bY,aM as bZ,cM as b_,aP as ba,nM as bb,BM as bc,Ea as bd,FM as be,KS as bf,rM as bg,fB as bh,L_ as bi,z_ as bj,w2 as bk,rB as bl,Y2 as bm,Dt as bn,Xt as bo,BB as bp,ZM as bq,hB as br,oM as bs,pO as bt,cr as bu,OP as bv,GD as bw,_N as bx,_D as by,we as bz,Pu as c,ww as c$,Y_ as c0,JS as c1,RB as c2,fM as c3,dM as c4,uM as c5,dP as c6,qt as c7,Vt as c8,NP as c9,wP as cA,bw as cB,Bu as cC,rr as cD,lc as cE,xu as cF,ni as cG,rh as cH,ut as cI,nx as cJ,N2 as cK,QD as cL,CP as cM,fP as cN,kP as cO,IN as cP,xx as cQ,pn as cR,Mx as cS,yg as cT,QM as cU,Yb as cV,mv as cW,IB as cX,dN as cY,_P as cZ,jP as c_,PP as ca,DP as cb,W2 as cc,SN as cd,bN as ce,Su as cf,wN as cg,NN as ch,vN as ci,RP as cj,xe as ck,Ni as cl,tN as cm,mN as cn,TN as co,aN as cp,CN as cq,yN as cr,fN as cs,WP as ct,KB as cu,xN as cv,uu as cw,v2 as cx,z0 as cy,qS as cz,Zg as d,QN as d$,O_ as d0,tc as d1,vx as d2,jc as d3,T_ as d4,Bf as d5,FB as d6,CB as d7,eN as d8,nN as d9,gM as dA,AP as dB,OB as dC,hg as dD,yM as dE,wM as dF,GN as dG,oB as dH,ei as dI,tO as dJ,kg as dK,r2 as dL,hN as dM,vO as dN,bP as dO,zB as dP,qe as dQ,bM as dR,vM as dS,W_ as dT,xM as dU,SM as dV,EM as dW,DB as dX,kM as dY,zP as dZ,eO as d_,JP as da,kx as db,Sx as dc,rj as dd,nh as de,Yx as df,Rr as dg,l as dh,JM as di,hP as dj,J2 as dk,hM as dl,mM as dm,pM as dn,DN as dp,$P as dq,Bx as dr,aB as ds,Of as dt,XN as du,PN as dv,Cx as dw,e_ as dx,yt as dy,uP as dz,ey as e,Qv as e$,Q2 as e0,IM as e1,Lr as e2,mn as e3,lO as e4,pB as e5,qr as e6,lN as e7,iN as e8,qx as e9,GP as eA,iP as eB,M_ as eC,tB as eD,SB as eE,cP as eF,pP as eG,$N as eH,n_ as eI,C_ as eJ,HP as eK,UN as eL,NB as eM,RM as eN,TM as eO,VM as eP,ZS as eQ,jN as eR,K_ as eS,RN as eT,rd as eU,ON as eV,dB as eW,KN as eX,Ax as eY,se as eZ,ZN as e_,cN as ea,uN as eb,EB as ec,kB as ed,$M as ee,eP as ef,CM as eg,E2 as eh,UM as ei,yB as ej,r3 as ek,xs as el,BN as em,qP as en,HN as eo,YN as ep,SP as eq,xP as er,VP as es,KP as et,IP as eu,uo as ev,XB as ew,sO as ex,VD as ey,YP as ez,ry as f,u0 as f$,lt as f0,JN as f1,sP as f2,nP as f3,Z2 as f4,oP as f5,yx as f6,AM as f7,yj as f8,MN as f9,HO as fA,FN as fB,HM as fC,tP as fD,YM as fE,ZB as fF,lj as fG,G0 as fH,LM as fI,DM as fJ,X2 as fK,WM as fL,LP as fM,JB as fN,BP as fO,LN as fP,TP as fQ,vP as fR,$t as fS,wi as fT,Nx as fU,$B as fV,HB as fW,f_ as fX,hO as fY,Iw as fZ,yw as f_,qN as fa,zN as fb,VN as fc,t3 as fd,WB as fe,VB as ff,YB as fg,GB as fh,mx as fi,G2 as fj,mP as fk,yl as fl,vB as fm,Gx as fn,$_ as fo,AB as fp,TB as fq,PB as fr,q_ as fs,id as ft,PM as fu,NM as fv,WN as fw,_M as fx,cB as fy,lB as fz,Ar as g,D_ as g0,Ff as g1,At as g2,vi as g3,eB as g4,_0 as g5,Kf as g6,qB as g7,gB as g8,wj as g9,uc as ga,sd as gb,n3 as gc,RD as gd,qO as ge,Hf as gf,_e as gg,dc as gh,FD as gi,Hs as gj,E0 as gk,OM as gl,Be as gm,sN as gn,jM as go,Lc as gp,Jt as gq,bB as gr,qf as gs,eh as gt,zM as gu,MM as gv,Ln as h,fy as i,py as j,gy as k,va as l,xy as m,dt as n,oi as o,V_ as p,hc as q,$x as r,Pr as s,LO as t,Cy as u,Ty as v,KL as w,mc as x,Ns as y,pc as z};
|