@band-app/server 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/client/assets/{TerminalPanel-CSIo5ni0.js → TerminalPanel-BlzUBzmR.js} +1 -1
  2. package/dist/client/assets/{_basePickBy-CdaZY6mI.js → _basePickBy-78hIlKHL.js} +1 -1
  3. package/dist/client/assets/{_baseUniq-Cbf2JylA.js → _baseUniq-C_y7bQp7.js} +1 -1
  4. package/dist/client/assets/addon-search-BvnuewQv.js +1 -0
  5. package/dist/client/assets/addon-unicode11-C7S6GMMR.js +1 -0
  6. package/dist/client/assets/{addon-webgl-q3t2iERs.js → addon-webgl-D9URxm_b.js} +5 -5
  7. package/dist/client/assets/{arc-93kXHiVA.js → arc-DHUj8i-C.js} +1 -1
  8. package/dist/client/assets/{architectureDiagram-VXUJARFQ-mXd7ilfO.js → architectureDiagram-VXUJARFQ-D4Gtstny.js} +1 -1
  9. package/dist/client/assets/{blockDiagram-VD42YOAC-DpjfCZDe.js → blockDiagram-VD42YOAC-BnvoqD8n.js} +1 -1
  10. package/dist/client/assets/{c4Diagram-YG6GDRKO-D17zktyo.js → c4Diagram-YG6GDRKO-B3kFa8rY.js} +1 -1
  11. package/dist/client/assets/channel-C2tC7nD9.js +1 -0
  12. package/dist/client/assets/{chunk-4BX2VUAB-UK3Q89L4.js → chunk-4BX2VUAB-Cry6RdNE.js} +1 -1
  13. package/dist/client/assets/{chunk-55IACEB6-DOnNiKCE.js → chunk-55IACEB6-B2Hcf4yS.js} +1 -1
  14. package/dist/client/assets/{chunk-B4BG7PRW-RuY3pvrs.js → chunk-B4BG7PRW-BqTOv_Q4.js} +1 -1
  15. package/dist/client/assets/{chunk-DI55MBZ5-CLkaHQD0.js → chunk-DI55MBZ5-BHJn8-Rw.js} +1 -1
  16. package/dist/client/assets/{chunk-FMBD7UC4-B2_FpfY1.js → chunk-FMBD7UC4-D2HIyXOe.js} +1 -1
  17. package/dist/client/assets/{chunk-QN33PNHL-BJ5cRImN.js → chunk-QN33PNHL-BSLNMHFq.js} +1 -1
  18. package/dist/client/assets/{chunk-QZHKN3VN-DWhBc9Ty.js → chunk-QZHKN3VN-BuBnSFe-.js} +1 -1
  19. package/dist/client/assets/{chunk-TZMSLE5B-C6dn9jrV.js → chunk-TZMSLE5B-DiQMwPjF.js} +1 -1
  20. package/dist/client/assets/classDiagram-2ON5EDUG-BWbZZspv.js +1 -0
  21. package/dist/client/assets/classDiagram-v2-WZHVMYZB-BWbZZspv.js +1 -0
  22. package/dist/client/assets/clone-BxWL4DUp.js +1 -0
  23. package/dist/client/assets/{cose-bilkent-S5V4N54A-CApk1lUu.js → cose-bilkent-S5V4N54A-Db5PXk3I.js} +1 -1
  24. package/dist/client/assets/{dagre-6UL2VRFP-BmLALXZu.js → dagre-6UL2VRFP-COrq1-o3.js} +1 -1
  25. package/dist/client/assets/{diagram-PSM6KHXK-C2cPLLkQ.js → diagram-PSM6KHXK-BEFxHLpj.js} +1 -1
  26. package/dist/client/assets/{diagram-QEK2KX5R-vmbBSzsB.js → diagram-QEK2KX5R-K9i-foPa.js} +1 -1
  27. package/dist/client/assets/{diagram-S2PKOQOG-RgcJYL9S.js → diagram-S2PKOQOG-5WsQ8w0M.js} +1 -1
  28. package/dist/client/assets/{erDiagram-Q2GNP2WA-CpoxBAoy.js → erDiagram-Q2GNP2WA-CzYts47e.js} +1 -1
  29. package/dist/client/assets/{flowDiagram-NV44I4VS-DxnlkHRY.js → flowDiagram-NV44I4VS-BHSMXKBN.js} +1 -1
  30. package/dist/client/assets/{ganttDiagram-JELNMOA3-DsnoA6Bi.js → ganttDiagram-JELNMOA3-lrI55nIi.js} +1 -1
  31. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-CRGiaUIP.js → gitGraphDiagram-V2S2FVAM-BR9i1nFI.js} +1 -1
  32. package/dist/client/assets/{graph-B0pjD7JO.js → graph-CHzn7hGd.js} +1 -1
  33. package/dist/client/assets/{highlighted-body-B3W2YXNL-B-sBG2bX.js → highlighted-body-B3W2YXNL-pf8CG4LE.js} +1 -1
  34. package/dist/client/assets/{index-DoBYcXmW.js → index-B1M1Nr1U.js} +1 -1
  35. package/dist/client/assets/{index-Ct8NuxSL.js → index-B3_tKObw.js} +1 -1
  36. package/dist/client/assets/{index-DHizjwkP.js → index-BFvt5Udm.js} +1 -1
  37. package/dist/client/assets/{index-ftqQmu5s.js → index-BZejpLSO.js} +1 -1
  38. package/dist/client/assets/{index-U5JB6u6d.js → index-C4WPBk8W.js} +1 -1
  39. package/dist/client/assets/{index-CrCMXmx8.js → index-CAapUiFF.js} +1 -1
  40. package/dist/client/assets/{index-THSuS9sd.js → index-C_k8X250.js} +1 -1
  41. package/dist/client/assets/{index-sHvOWbSE.js → index-Cg2goL7s.js} +1 -1
  42. package/dist/client/assets/{index-C08rV2E6.js → index-CprTy2ja.js} +1 -1
  43. package/dist/client/assets/{index-2xKJ9Khi.js → index-DOz7KiMS.js} +1 -1
  44. package/dist/client/assets/{index-TNsDOp6e.js → index-DRbvI3mJ.js} +1 -1
  45. package/dist/client/assets/{index-BuhLC7zE.js → index-iDhzXhLS.js} +1 -1
  46. package/dist/client/assets/{index-C5lac708.js → index-sjjEn2vn.js} +1 -1
  47. package/dist/client/assets/{infoDiagram-HS3SLOUP-CRp6iT8d.js → infoDiagram-HS3SLOUP-CPWEaaXS.js} +1 -1
  48. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BQ2WA6b4.js → journeyDiagram-XKPGCS4Q-IpZXRX_B.js} +1 -1
  49. package/dist/client/assets/{kanban-definition-3W4ZIXB7-D-VXNhIi.js → kanban-definition-3W4ZIXB7-BcAUFQlt.js} +1 -1
  50. package/dist/client/assets/{layout-DqRyDMTL.js → layout-CIxVWn8u.js} +1 -1
  51. package/dist/client/assets/main-Bx2dZBHM.css +1 -0
  52. package/dist/client/assets/{main-CsKfm_iE.js → main-D13cBYQG.js} +280 -274
  53. package/dist/client/assets/{mindmap-definition-VGOIOE7T-DF_KVmYJ.js → mindmap-definition-VGOIOE7T-CX1T1sUN.js} +1 -1
  54. package/dist/client/assets/{pieDiagram-ADFJNKIX-X9Gpsupa.js → pieDiagram-ADFJNKIX-DyLrkF8x.js} +2 -2
  55. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-Dv43A6Kl.js → quadrantDiagram-AYHSOK5B-B_-kuE5u.js} +1 -1
  56. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-Bsm1ID8v.js → requirementDiagram-UZGBJVZJ-CW2Pkh0d.js} +1 -1
  57. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-C89ZzNUa.js → sankeyDiagram-TZEHDZUN-SH3i00se.js} +1 -1
  58. package/dist/client/assets/{sequenceDiagram-WL72ISMW-DCEzHjMR.js → sequenceDiagram-WL72ISMW-reJi3BTh.js} +1 -1
  59. package/dist/client/assets/{stateDiagram-FKZM4ZOC-DL_-FpOq.js → stateDiagram-FKZM4ZOC-CjXJfQgu.js} +1 -1
  60. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-XtJwX8Ka.js +1 -0
  61. package/dist/client/assets/{timeline-definition-IT6M3QCI-BklAlKxM.js → timeline-definition-IT6M3QCI-B96AUWWH.js} +1 -1
  62. package/dist/client/assets/{treemap-GDKQZRPO-DugwR-ad.js → treemap-GDKQZRPO-DoFQQo5a.js} +1 -1
  63. package/dist/client/assets/workspace._workspaceId-XsdwFk5t.js +1 -0
  64. package/dist/client/assets/{workspace._workspaceId-CvpowXC8.js → workspace._workspaceId-ftjuXabJ.js} +1 -1
  65. package/dist/client/assets/xterm-EbFzQDSP.js +10 -0
  66. package/dist/client/assets/{xychartDiagram-PRI3JC2R-DEyS0s6m.js → xychartDiagram-PRI3JC2R-v-oqC6We.js} +1 -1
  67. package/dist/migrations/20260927123820_agent_sessions/migration.sql +16 -0
  68. package/dist/migrations/20260927123820_agent_sessions/snapshot.json +1675 -0
  69. package/dist/migrations/20260927210840_client_state/migration.sql +11 -0
  70. package/dist/migrations/20260927210840_client_state/snapshot.json +1763 -0
  71. package/dist/openapi.json +1724 -218
  72. package/dist/server/assets/{TerminalPanel-BVyQf1VK.js → TerminalPanel-DJnQglDZ.js} +1 -1
  73. package/dist/server/assets/{_basePickBy-DRh75DZA.js → _basePickBy-RSzPH-5U.js} +2 -2
  74. package/dist/server/assets/{_baseUniq-DxwDPh9u.js → _baseUniq-Cp_Qm3uS.js} +1 -1
  75. package/dist/server/assets/_tanstack-start-manifest_v-GQWxvAsR.js +4 -0
  76. package/dist/server/assets/{addon-search-WCacnXal.js → addon-search-BUjn-C-R.js} +190 -176
  77. package/dist/server/assets/{addon-unicode11-BhCmKRb7.js → addon-unicode11-BQz-Cn6z.js} +14 -20
  78. package/dist/server/assets/{addon-webgl-hypMW_go.js → addon-webgl-CgJYuUAA.js} +47 -48
  79. package/dist/server/assets/{arc-d221pGej.js → arc-BAImyMJ-.js} +1 -1
  80. package/dist/server/assets/{architecture-7HQA4BMR-CDuqFHS1.js → architecture-7HQA4BMR-BldYj4EA.js} +6 -6
  81. package/dist/server/assets/{architectureDiagram-VXUJARFQ-LivVdR2U.js → architectureDiagram-VXUJARFQ-iEEYNhTp.js} +6 -6
  82. package/dist/server/assets/{blockDiagram-VD42YOAC-Cpsga8jz.js → blockDiagram-VD42YOAC-CpXPlM5p.js} +6 -6
  83. package/dist/server/assets/{c4Diagram-YG6GDRKO-CR3dewU0.js → c4Diagram-YG6GDRKO-C0jPSgch.js} +2 -2
  84. package/dist/server/assets/{channel-CznEvUJx.js → channel-BXmVLq-u.js} +1 -1
  85. package/dist/server/assets/{chunk-4BX2VUAB-2XGKksov.js → chunk-4BX2VUAB-BRh-MKqM.js} +1 -1
  86. package/dist/server/assets/{chunk-55IACEB6-D_sfF6RU.js → chunk-55IACEB6-D-II5Uvr.js} +1 -1
  87. package/dist/server/assets/{chunk-B4BG7PRW-DE9YZpuI.js → chunk-B4BG7PRW-CLc3MoS-.js} +4 -4
  88. package/dist/server/assets/{chunk-DI55MBZ5-1WmBcjv0.js → chunk-DI55MBZ5-rIuRlmCw.js} +3 -3
  89. package/dist/server/assets/{chunk-FMBD7UC4-0hzwdviV.js → chunk-FMBD7UC4-CwpJS1jy.js} +1 -1
  90. package/dist/server/assets/{chunk-QN33PNHL-sglY-9R6.js → chunk-QN33PNHL-DDjZ9iRW.js} +1 -1
  91. package/dist/server/assets/{chunk-QZHKN3VN-BL0yO15_.js → chunk-QZHKN3VN-CqXxabdj.js} +1 -1
  92. package/dist/server/assets/{chunk-TZMSLE5B-CRCOAzqG.js → chunk-TZMSLE5B-YmXbykHL.js} +1 -1
  93. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-GVVGcmAY.js → classDiagram-2ON5EDUG-B5goRv2J.js} +5 -5
  94. package/dist/server/assets/{classDiagram-2ON5EDUG-GVVGcmAY.js → classDiagram-v2-WZHVMYZB-B5goRv2J.js} +5 -5
  95. package/dist/server/assets/{clone-Cw9PiOA8.js → clone-8krOB2fX.js} +1 -1
  96. package/dist/server/assets/{cose-bilkent-S5V4N54A-xdF6iXS1.js → cose-bilkent-S5V4N54A-CT0fXZG5.js} +1 -1
  97. package/dist/server/assets/{dagre-6UL2VRFP-ZMimZN6M.js → dagre-6UL2VRFP-BKnoyRYf.js} +6 -6
  98. package/dist/server/assets/{diagram-PSM6KHXK-AtdXKese.js → diagram-PSM6KHXK-3yiYIfYG.js} +7 -7
  99. package/dist/server/assets/{diagram-QEK2KX5R-to1VE7Ky.js → diagram-QEK2KX5R-BZS0Hd_d.js} +6 -6
  100. package/dist/server/assets/{diagram-S2PKOQOG-lJFLwEPR.js → diagram-S2PKOQOG-BkGWooM_.js} +6 -6
  101. package/dist/server/assets/{erDiagram-Q2GNP2WA-CbevyytQ.js → erDiagram-Q2GNP2WA-BlJW8Tz3.js} +4 -4
  102. package/dist/server/assets/{flowDiagram-NV44I4VS-DTd0gkkY.js → flowDiagram-NV44I4VS-BGWlA0EG.js} +5 -5
  103. package/dist/server/assets/{ganttDiagram-JELNMOA3-YwmrEI5N.js → ganttDiagram-JELNMOA3-Cf3LALG6.js} +1 -1
  104. package/dist/server/assets/{gitGraph-G5XIXVHT-BArDd0OC.js → gitGraph-G5XIXVHT-B9S3heYN.js} +6 -6
  105. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-BTThcyM8.js → gitGraphDiagram-V2S2FVAM-C4_f3rx4.js} +7 -7
  106. package/dist/server/assets/{graph-BOO01qmU.js → graph-DYj8A2bp.js} +2 -2
  107. package/dist/server/assets/{highlighted-body-B3W2YXNL-Cym8kCCk.js → highlighted-body-B3W2YXNL-Df68BBlw.js} +1 -1
  108. package/dist/server/assets/{index-CBT9vLeO.js → index-7UlzI_dK.js} +1 -1
  109. package/dist/server/assets/{index-CaFux-EA.js → index-B5gG6MB7.js} +1 -1
  110. package/dist/server/assets/{index-CQd5Q7Kt.js → index-BDEhO1ya.js} +1 -1
  111. package/dist/server/assets/{index-3bt1s3HG.js → index-BYKwSvPL.js} +1 -1
  112. package/dist/server/assets/{index-DVBTKosE.js → index-BiwgNHMQ.js} +1 -1
  113. package/dist/server/assets/{index-Z7BJHwYS.js → index-CISg2hqm.js} +1 -1
  114. package/dist/server/assets/{index-7I7gBKIT.js → index-CMq_WJJ7.js} +1 -1
  115. package/dist/server/assets/{index-Ckc3EtXO.js → index-ChV05j8R.js} +1 -1
  116. package/dist/server/assets/{index-caXQk3Nh.js → index-CopZNvBd.js} +1 -1
  117. package/dist/server/assets/{index-DZfyQWn7.js → index-CxMB5JY7.js} +1 -1
  118. package/dist/server/assets/{index-BQaiSrqT.js → index-DIuiSZSj.js} +1 -1
  119. package/dist/server/assets/{index-DX1Ugorr.js → index-DqsmbFGQ.js} +1 -1
  120. package/dist/server/assets/{index-CsHpsK-4.js → index-DyUjxC3i.js} +1 -1
  121. package/dist/server/assets/{info-VBDWY6EO-D4lcUmb_.js → info-VBDWY6EO-BmkTQbMv.js} +6 -6
  122. package/dist/server/assets/{infoDiagram-HS3SLOUP-C1ai--xt.js → infoDiagram-HS3SLOUP-CKR2MY9e.js} +5 -5
  123. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-qel6lxPz.js → journeyDiagram-XKPGCS4Q-DPsUHcaJ.js} +4 -4
  124. package/dist/server/assets/{kanban-definition-3W4ZIXB7-BQPKgoP_.js → kanban-definition-3W4ZIXB7-C5QIVVhD.js} +2 -2
  125. package/dist/server/assets/{layout-D_wAQ9pE.js → layout-R-e4wg8W.js} +4 -4
  126. package/dist/server/assets/{mermaid-3ZIDBTTL-CtNgetEO.js → mermaid-3ZIDBTTL-ByDi8HnK.js} +1 -1
  127. package/dist/server/assets/{mermaid-parser.core-BwjOeEsU.js → mermaid-parser.core-C9wm222O.js} +11 -11
  128. package/dist/server/assets/{mindmap-definition-VGOIOE7T-DYdatMwP.js → mindmap-definition-VGOIOE7T-1gh-bXjE.js} +3 -3
  129. package/dist/server/assets/{packet-DYOGHKS2-_TbN3RWI.js → packet-DYOGHKS2-Bxy3z0_p.js} +6 -6
  130. package/dist/server/assets/{pie-VRWISCQL-D9Z5k3qi.js → pie-VRWISCQL-BlDk8RiA.js} +6 -6
  131. package/dist/server/assets/{pieDiagram-ADFJNKIX-COmj-G7F.js → pieDiagram-ADFJNKIX-CwnESx-9.js} +7 -7
  132. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-BajsyCAd.js → quadrantDiagram-AYHSOK5B-B-US3olm.js} +1 -1
  133. package/dist/server/assets/{radar-ZZBFDIW7-DLipfn_u.js → radar-ZZBFDIW7-Dy71dV8F.js} +6 -6
  134. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-BGEkpdbY.js → requirementDiagram-UZGBJVZJ-DZZQz_qm.js} +3 -3
  135. package/dist/server/assets/{router-Dpb0Z442.js → router-C6awDsR6.js} +16463 -11602
  136. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-CWd3AEju.js → sankeyDiagram-TZEHDZUN-DMIqo7mj.js} +1 -1
  137. package/dist/server/assets/{sequenceDiagram-WL72ISMW-BMTkK0JQ.js → sequenceDiagram-WL72ISMW-B8koBIGl.js} +3 -3
  138. package/dist/server/assets/{stateDiagram-FKZM4ZOC-CpBXq11c.js → stateDiagram-FKZM4ZOC-BHze-gTI.js} +8 -8
  139. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-DNuppjf9.js → stateDiagram-v2-4FDKWEC3-DRFmfjyi.js} +4 -4
  140. package/dist/server/assets/{timeline-definition-IT6M3QCI-YTyqSIDt.js → timeline-definition-IT6M3QCI-CEkzxLSR.js} +2 -2
  141. package/dist/server/assets/{treemap-GDKQZRPO-BeWiYXRR.js → treemap-GDKQZRPO-0VBmxaAW.js} +6 -6
  142. package/dist/server/assets/{workspace._workspaceId-t0HaEyN5.js → workspace._workspaceId-BtMBxm9H.js} +93 -71
  143. package/dist/server/assets/{workspace._workspaceId-Ce_eap6T.js → workspace._workspaceId-C7ra183B.js} +1 -1
  144. package/dist/server/assets/{xterm-DnMRSOdQ.js → xterm-CsaVCelU.js} +517 -579
  145. package/dist/server/assets/{xychartDiagram-PRI3JC2R-Dlgz7zKK.js → xychartDiagram-PRI3JC2R-BQCIxu2L.js} +1 -1
  146. package/dist/server/server.js +2 -2
  147. package/dist/start-server.mjs +34624 -30192
  148. package/dist/terminal-daemon.mjs +635 -335
  149. package/package.json +14 -12
  150. package/dist/client/assets/addon-search-DBOYg5r3.js +0 -1
  151. package/dist/client/assets/addon-unicode11-LsnDChsR.js +0 -1
  152. package/dist/client/assets/channel-C4GiEGw4.js +0 -1
  153. package/dist/client/assets/classDiagram-2ON5EDUG-y6v_VfOs.js +0 -1
  154. package/dist/client/assets/classDiagram-v2-WZHVMYZB-y6v_VfOs.js +0 -1
  155. package/dist/client/assets/clone-B_3XeJsO.js +0 -1
  156. package/dist/client/assets/main-CmUn6n9o.css +0 -1
  157. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-D5laPTLF.js +0 -1
  158. package/dist/client/assets/workspace._workspaceId-CdoxJFsY.js +0 -1
  159. package/dist/client/assets/xterm-CPJFL3h0.js +0 -10
  160. package/dist/server/assets/_tanstack-start-manifest_v-CfuLu7F9.js +0 -4
@@ -1,37 +1,37 @@
1
- var Ms = Object.defineProperty;
2
- var kn = Object.getOwnPropertyDescriptor;
3
- var Mn = (n10, i) => {
4
- for (var e in i) Ms(n10, e, { get: i[e], enumerable: true });
1
+ var ks = Object.defineProperty;
2
+ var Ln = Object.getOwnPropertyDescriptor;
3
+ var An = (n10, i) => {
4
+ for (var e in i) ks(n10, e, { get: i[e], enumerable: true });
5
5
  };
6
6
  var y = (n10, i, e, t) => {
7
- for (var r = t > 1 ? void 0 : t ? kn(i, e) : i, s = n10.length - 1, o; s >= 0; s--) (o = n10[s]) && (r = (t ? o(i, e, r) : o(r)) || r);
8
- return t && r && Ms(i, e, r), r;
7
+ for (var r = t > 1 ? void 0 : t ? Ln(i, e) : i, s = n10.length - 1, o; s >= 0; s--) (o = n10[s]) && (r = (t ? o(i, e, r) : o(r)) || r);
8
+ return t && r && ks(i, e, r), r;
9
9
  }, m = (n10, i) => (e, t) => i(e, t, n10);
10
- var Bs = "Terminal input", Ut = { get: () => Bs, set: (n10) => Bs = n10 }, Ps = "Too much output to announce, navigate to rows manually to read", Ze = { get: () => Ps, set: (n10) => Ps = n10 };
11
- function Bn(n10) {
10
+ var Ms = "Terminal input", Ut = { get: () => Ms, set: (n10) => Ms = n10 }, Ps = "Too much output to announce, navigate to rows manually to read", Ze = { get: () => Ps, set: (n10) => Ps = n10 };
11
+ function kn(n10) {
12
12
  return n10.replace(/\r?\n/g, "\r");
13
13
  }
14
- function Pn(n10, i) {
14
+ function Mn(n10, i) {
15
15
  return i ? `\x1B[200~${n10.replace(/\x1b/g, "␛")}\x1B[201~` : n10;
16
16
  }
17
- function Os(n10, i) {
17
+ function Bs(n10, i) {
18
18
  n10.clipboardData && n10.clipboardData.setData("text/plain", i.selectionText), n10.preventDefault();
19
19
  }
20
- function Ns(n10, i, e, t) {
20
+ function Os(n10, i, e, t) {
21
21
  if (n10.stopPropagation(), n10.clipboardData) {
22
22
  let r = n10.clipboardData.getData("text/plain");
23
- Nr(r, i, e, t);
23
+ Pr(r, i, e, t);
24
24
  }
25
25
  }
26
- function Nr(n10, i, e, t) {
27
- n10 = Bn(n10), n10 = Pn(n10, e.decPrivateModes.bracketedPasteMode && t.rawOptions.ignoreBracketedPasteMode !== true), e.triggerDataEvent(n10, true), i.value = "";
26
+ function Pr(n10, i, e, t) {
27
+ n10 = kn(n10), n10 = Mn(n10, e.decPrivateModes.bracketedPasteMode && t.rawOptions.ignoreBracketedPasteMode !== true), e.triggerDataEvent(n10, true), i.value = "";
28
28
  }
29
- function Fr(n10, i, e) {
29
+ function Br(n10, i, e) {
30
30
  let t = e.getBoundingClientRect(), r = n10.clientX - t.left - 10, s = n10.clientY - t.top - 10;
31
31
  i.style.width = "20px", i.style.height = "20px", i.style.left = `${r}px`, i.style.top = `${s}px`, i.style.zIndex = "1000", i.focus();
32
32
  }
33
- function Hr(n10, i, e, t, r) {
34
- Fr(n10, i, e), r && t.rightClickSelect(n10), i.value = t.selectionText, i.select();
33
+ function Or(n10, i, e, t, r) {
34
+ Br(n10, i, e), r && t.rightClickSelect(n10), i.value = t.selectionText, i.select();
35
35
  }
36
36
  function be(n10) {
37
37
  return n10 > 65535 ? (n10 -= 65536, String.fromCharCode((n10 >> 10) + 55296) + String.fromCharCode(n10 % 1024 + 56320)) : String.fromCharCode(n10);
@@ -44,7 +44,7 @@ function ye(n10, i = 0, e = n10.length) {
44
44
  }
45
45
  return t;
46
46
  }
47
- var mi = class {
47
+ var pi = class {
48
48
  constructor() {
49
49
  this._interim = 0;
50
50
  }
@@ -71,7 +71,7 @@ var mi = class {
71
71
  }
72
72
  return r;
73
73
  }
74
- }, bi = class {
74
+ }, mi = class {
75
75
  constructor() {
76
76
  this.interim = new Uint8Array(3);
77
77
  }
@@ -374,23 +374,23 @@ var F = class n3 extends ue {
374
374
  return !(this.isOverline() !== e.isOverline() || this.isBlink() !== e.isBlink() || this.isInvisible() !== e.isInvisible() || this.isItalic() !== e.isItalic() || this.isDim() !== e.isDim() || this.isStrikethrough() !== e.isStrikethrough());
375
375
  }
376
376
  };
377
- var zr = /* @__PURE__ */ new Map();
378
- function Hs(n10) {
377
+ var Wr = /* @__PURE__ */ new Map();
378
+ function Fs(n10) {
379
379
  return n10.di$dependencies || [];
380
380
  }
381
381
  function H(n10) {
382
- if (zr.has(n10)) return zr.get(n10);
382
+ if (Wr.has(n10)) return Wr.get(n10);
383
383
  let i = function(e, t, r) {
384
384
  if (arguments.length !== 3) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
385
- Fn(i, e, r);
385
+ On(i, e, r);
386
386
  };
387
- return i._id = n10, zr.set(n10, i), i;
387
+ return i._id = n10, Wr.set(n10, i), i;
388
388
  }
389
- function Fn(n10, i, e) {
389
+ function On(n10, i, e) {
390
390
  i.di$target === i ? i.di$dependencies.push({ id: n10, index: e }) : (i.di$dependencies = [{ id: n10, index: e }], i.di$target = i);
391
391
  }
392
- var D = H("BufferService"), Me = H("MouseStateService"), Y = H("CoreService"), Ws = H("CharsetService"), Qe = H("InstantiationService");
393
- var fe = H("LogService"), R = H("OptionsService"), vi = H("OscLinkService"), Us = H("UnicodeService"), ge = H("DecorationService");
392
+ var D = H("BufferService"), Me = H("MouseStateService"), Y = H("CoreService"), Hs = H("CharsetService"), Qe = H("InstantiationService");
393
+ var fe = H("LogService"), R = H("OptionsService"), bi = H("OscLinkService"), Ws = H("UnicodeService"), ge = H("DecorationService");
394
394
  var et = class {
395
395
  constructor(i, e, t) {
396
396
  this._bufferService = i;
@@ -421,7 +421,7 @@ var et = class {
421
421
  } catch {
422
422
  v = true;
423
423
  }
424
- v || r.push({ text: u, range: p, activate: (f, S) => s ? s.activate(f, S, p) : Hn(f, S), hover: (f, S) => s?.hover?.(f, S, p), leave: (f, S) => s?.leave?.(f, S, p) });
424
+ v || r.push({ text: u, range: p, activate: (f, S) => s ? s.activate(f, S, p) : Nn(f, S), hover: (f, S) => s?.hover?.(f, S, p), leave: (f, S) => s?.leave?.(f, S, p) });
425
425
  }
426
426
  d = false, o.hasExtendedAttrs() && o.extended.urlId ? (h = c, l = o.extended.urlId) : (h = -1, l = -1);
427
427
  }
@@ -459,8 +459,8 @@ var et = class {
459
459
  return i.loadCell(e, r), !!r.hasExtendedAttrs() && r.extended.urlId === t;
460
460
  }
461
461
  };
462
- et = y([m(0, D), m(1, R), m(2, vi)], et);
463
- function Hn(n10, i) {
462
+ et = y([m(0, D), m(1, R), m(2, bi)], et);
463
+ function Nn(n10, i) {
464
464
  if (confirm(`Do you want to navigate to ${i}?
465
465
 
466
466
  WARNING: This link could potentially be dangerous`)) {
@@ -474,7 +474,7 @@ WARNING: This link could potentially be dangerous`)) {
474
474
  } else console.warn("Opening link blocked as opener could not be cleared");
475
475
  }
476
476
  }
477
- var Be = H("CharSizeService"), G = H("CoreBrowserService"), Pe = H("MouseCoordsService"), Ks = H("MouseService"), V = H("RenderService"), Si = H("SelectionService"), gi = H("CharacterJoinerService"), _e = H("ThemeService"), Ii = H("LinkProviderService"), zs = H("KeyboardService");
477
+ var Pe = H("CharSizeService"), G = H("CoreBrowserService"), Be = H("MouseCoordsService"), Us = H("MouseService"), V = H("RenderService"), vi = H("SelectionService"), Si = H("CharacterJoinerService"), _e = H("ThemeService"), gi = H("LinkProviderService"), Ks = H("KeyboardService");
478
478
  function E(n10) {
479
479
  return { dispose: n10 };
480
480
  }
@@ -521,7 +521,7 @@ var pe = class {
521
521
  };
522
522
  g.None = Object.freeze({ dispose() {
523
523
  } });
524
- var P = class {
524
+ var B = class {
525
525
  constructor() {
526
526
  this._isDisposed = false;
527
527
  }
@@ -538,14 +538,6 @@ var P = class {
538
538
  this._isDisposed = true, this._value?.dispose(), this._value = void 0;
539
539
  }
540
540
  };
541
- function Gs(n10, i = 0, e) {
542
- let t = setTimeout(() => {
543
- n10();
544
- }, i), r = E(() => {
545
- clearTimeout(t);
546
- });
547
- return r;
548
- }
549
541
  var Ie = class {
550
542
  constructor() {
551
543
  this._token = -1;
@@ -569,7 +561,7 @@ var Ie = class {
569
561
  this._token = -1, i();
570
562
  }, e));
571
563
  }
572
- }, Ci = class {
564
+ }, Ii = class {
573
565
  constructor() {
574
566
  this._isScheduled = false;
575
567
  this._isDisposed = false;
@@ -586,7 +578,7 @@ var Ie = class {
586
578
  this._isScheduled && (this._isScheduled = false, i());
587
579
  }));
588
580
  }
589
- }, Ei = class {
581
+ }, Ci = class {
590
582
  constructor() {
591
583
  this._isDisposed = false;
592
584
  }
@@ -613,7 +605,7 @@ function se(n10) {
613
605
  let e = n10;
614
606
  return e?.view ? e.view : window;
615
607
  }
616
- var Gr = class {
608
+ var Ur = class {
617
609
  constructor(i, e, t, r) {
618
610
  this._node = i, this._type = e, this._handler = t, this._options = r, i.addEventListener(e, t, r);
619
611
  }
@@ -622,17 +614,17 @@ var Gr = class {
622
614
  }
623
615
  };
624
616
  function C(n10, i, e, t) {
625
- return new Gr(n10, i, e, t);
617
+ return new Ur(n10, i, e, t);
626
618
  }
627
- function Vr(n10, i, e, t) {
619
+ function Kr(n10, i, e, t) {
628
620
  return C(n10, i, e, t);
629
621
  }
630
622
  var le = { CLICK: "click", MOUSE_OVER: "mouseover", MOUSE_LEAVE: "mouseleave", POINTER_DOWN: "pointerdown", POINTER_MOVE: "pointermove", POINTER_UP: "pointerup", MOUSE_WHEEL: "wheel" };
631
- function $s(n10) {
623
+ function Gs(n10) {
632
624
  let i = n10.getBoundingClientRect(), e = se(n10);
633
625
  return { left: i.left + e.scrollX, top: i.top + e.scrollY, width: i.width, height: i.height };
634
626
  }
635
- var yi = class {
627
+ var Ei = class {
636
628
  constructor(i, e) {
637
629
  this._runner = i;
638
630
  this.priority = e;
@@ -651,21 +643,21 @@ var yi = class {
651
643
  static sort(i, e) {
652
644
  return e.priority - i.priority;
653
645
  }
654
- }, Vs = /* @__PURE__ */ new Map();
655
- function qs(n10) {
656
- let i = Vs.get(n10);
657
- return i || (i = { next: [], current: [], animFrameRequested: false, inAnimationFrameRunner: false }, Vs.set(n10, i)), i;
646
+ }, zs = /* @__PURE__ */ new Map();
647
+ function Vs(n10) {
648
+ let i = zs.get(n10);
649
+ return i || (i = { next: [], current: [], animFrameRequested: false, inAnimationFrameRunner: false }, zs.set(n10, i)), i;
658
650
  }
659
- function Wn(n10) {
660
- let i = qs(n10);
661
- for (i.animFrameRequested = false, i.current = i.next, i.next = [], i.inAnimationFrameRunner = true; i.current.length > 0; ) i.current.sort(yi.sort), i.current.shift().execute();
651
+ function Fn(n10) {
652
+ let i = Vs(n10);
653
+ for (i.animFrameRequested = false, i.current = i.next, i.next = [], i.inAnimationFrameRunner = true; i.current.length > 0; ) i.current.sort(Ei.sort), i.current.shift().execute();
662
654
  i.inAnimationFrameRunner = false;
663
655
  }
664
656
  function tt(n10, i, e = 0) {
665
- let t = qs(n10), r = new yi(i, e);
666
- return t.next.push(r), t.animFrameRequested || (t.animFrameRequested = true, n10.requestAnimationFrame(() => Wn(n10))), r;
657
+ let t = Vs(n10), r = new Ei(i, e);
658
+ return t.next.push(r), t.animFrameRequested || (t.animFrameRequested = true, n10.requestAnimationFrame(() => Fn(n10))), r;
667
659
  }
668
- var xi = class extends Ei {
660
+ var yi = class extends Ci {
669
661
  constructor(i) {
670
662
  super(), this._defaultTarget = i ? se(i) : void 0;
671
663
  }
@@ -734,19 +726,19 @@ function rt(n10) {
734
726
  return typeof n10 == "number" ? `${n10}px` : n10;
735
727
  }
736
728
  var Ke = {};
737
- Mn(Ke, { getSafariVersion: () => Kn, getZoomFactor: () => Xr, isChrome: () => Kt, isChromeOS: () => Yr, isFirefox: () => nt, isLegacyEdge: () => Un, isLinux: () => zt, isMac: () => ie, isNode: () => $r, isSafari: () => wi, isWindows: () => Ue });
738
- var $r = !!(typeof process < "u" && "title" in process && (typeof navigator > "u" || navigator.userAgent.startsWith("Node.js/"))), st = $r ? "node" : navigator.userAgent, qr = $r ? "node" : navigator.platform, nt = st.includes("Firefox"), Kt = st.includes("Chrome"), Un = st.includes("Edge"), wi = /^((?!chrome|android).)*safari/i.test(st);
739
- function Xr(n10) {
729
+ An(Ke, { getSafariVersion: () => Wn, getZoomFactor: () => Vr, isChrome: () => Kt, isChromeOS: () => $r, isFirefox: () => nt, isLegacyEdge: () => Hn, isLinux: () => zt, isMac: () => ie, isNode: () => zr, isSafari: () => xi, isWindows: () => Ue });
730
+ var zr = !!(typeof process < "u" && "title" in process && (typeof navigator > "u" || navigator.userAgent.startsWith("Node.js/"))), st = zr ? "node" : navigator.userAgent, Gr = zr ? "node" : navigator.platform, nt = st.includes("Firefox"), Kt = st.includes("Chrome"), Hn = st.includes("Edge"), xi = /^((?!chrome|android).)*safari/i.test(st);
731
+ function Vr(n10) {
740
732
  return 1;
741
733
  }
742
- function Kn() {
743
- if (!wi) return 0;
734
+ function Wn() {
735
+ if (!xi) return 0;
744
736
  let n10 = st.match(/Version\/(\d+)/);
745
737
  return n10 === null || n10.length < 2 ? 0 : parseInt(n10[1], 10);
746
738
  }
747
- var ie = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(qr), Ue = ["Windows", "Win16", "Win32", "WinCE"].includes(qr), zt = qr.indexOf("Linux") >= 0, Yr = /\bCrOS\b/.test(st);
748
- var Xs = /* @__PURE__ */ new WeakMap();
749
- function zn(n10) {
739
+ var ie = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(Gr), Ue = ["Windows", "Win16", "Win32", "WinCE"].includes(Gr), zt = Gr.indexOf("Linux") >= 0, $r = /\bCrOS\b/.test(st);
740
+ var $s = /* @__PURE__ */ new WeakMap();
741
+ function Un(n10) {
750
742
  if (!n10.parent || n10.parent === n10) return null;
751
743
  try {
752
744
  let i = n10.location, e = n10.parent.location;
@@ -756,14 +748,14 @@ function zn(n10) {
756
748
  }
757
749
  return n10.parent;
758
750
  }
759
- var jr = class {
751
+ var qr = class {
760
752
  static _getSameOriginWindowChain(i) {
761
- let e = Xs.get(i);
753
+ let e = $s.get(i);
762
754
  if (!e) {
763
- e = [], Xs.set(i, e);
755
+ e = [], $s.set(i, e);
764
756
  let t = i, r;
765
757
  do
766
- r = zn(t), r ? e.push({ window: new WeakRef(t), iframeElement: t.frameElement ?? null }) : e.push({ window: new WeakRef(t), iframeElement: null }), t = r;
758
+ r = Un(t), r ? e.push({ window: new WeakRef(t), iframeElement: t.frameElement ?? null }) : e.push({ window: new WeakRef(t), iframeElement: null }), t = r;
767
759
  while (t);
768
760
  }
769
761
  return e.slice(0);
@@ -782,7 +774,7 @@ var jr = class {
782
774
  }, ot = class {
783
775
  constructor(i, e) {
784
776
  this.timestamp = Date.now(), this.browserEvent = e, this.leftButton = e.button === 0, this.middleButton = e.button === 1, this.rightButton = e.button === 2, this.buttons = e.buttons, this.target = e.target, this.detail = e.detail ?? 1, e.type === "dblclick" && (this.detail = 2), this.ctrlKey = e.ctrlKey, this.shiftKey = e.shiftKey, this.altKey = e.altKey, this.metaKey = e.metaKey, typeof e.pageX == "number" ? (this.posx = e.pageX, this.posy = e.pageY) : (this.posx = e.clientX + this.target.ownerDocument.body.scrollLeft + this.target.ownerDocument.documentElement.scrollLeft, this.posy = e.clientY + this.target.ownerDocument.body.scrollTop + this.target.ownerDocument.documentElement.scrollTop);
785
- let t = jr.getPositionOfChildWindowRelativeToAncestorWindow(i, e.view);
777
+ let t = qr.getPositionOfChildWindowRelativeToAncestorWindow(i, e.view);
786
778
  this.posx -= t.left, this.posy -= t.top;
787
779
  }
788
780
  preventDefault() {
@@ -807,7 +799,7 @@ var jr = class {
807
799
  let l = i;
808
800
  l.deltaMode === l.DOM_DELTA_LINE ? nt && !ie ? this.deltaY = -i.deltaY / 3 : this.deltaY = -i.deltaY : this.deltaY = -i.deltaY / 40;
809
801
  }
810
- if (typeof s.wheelDeltaX < "u") wi && Ue ? this.deltaX = -(s.wheelDeltaX / 120) : r ? this.deltaX = s.wheelDeltaX / (120 * a) : this.deltaX = s.wheelDeltaX / 120;
802
+ if (typeof s.wheelDeltaX < "u") xi && Ue ? this.deltaX = -(s.wheelDeltaX / 120) : r ? this.deltaX = s.wheelDeltaX / (120 * a) : this.deltaX = s.wheelDeltaX / 120;
811
803
  else if (typeof o.HORIZONTAL_AXIS < "u" && o.axis === o.HORIZONTAL_AXIS) this.deltaX = -i.detail / 3;
812
804
  else if (i.type === "wheel") {
813
805
  let l = i;
@@ -874,11 +866,11 @@ var Ne = class extends g {
874
866
  this._register(C(i, le.MOUSE_LEAVE, (t) => e(new ot(se(i), t))));
875
867
  }
876
868
  };
877
- var Ti = class extends Ne {
869
+ var wi = class extends Ne {
878
870
  constructor(i) {
879
871
  super(), this._handleActivate = i.handleActivate, this.bgDomNode = document.createElement("div"), this.bgDomNode.className = "xterm-arrow-background", this.bgDomNode.style.position = "absolute", this.bgDomNode.style.width = i.bgWidth + "px", this.bgDomNode.style.height = i.bgHeight + "px", typeof i.top < "u" && (this.bgDomNode.style.top = "0px"), typeof i.left < "u" && (this.bgDomNode.style.left = "0px"), typeof i.bottom < "u" && (this.bgDomNode.style.bottom = "0px"), typeof i.right < "u" && (this.bgDomNode.style.right = "0px"), this.domNode = document.createElement("div"), this.domNode.className = i.className, this.domNode.style.position = "absolute";
880
872
  let e = Math.min(i.bgWidth, i.bgHeight);
881
- this.domNode.style.width = e + "px", this.domNode.style.height = e + "px", typeof i.top < "u" && (this.domNode.style.top = i.top + "px"), typeof i.left < "u" && (this.domNode.style.left = i.left + "px"), typeof i.bottom < "u" && (this.domNode.style.bottom = i.bottom + "px"), typeof i.right < "u" && (this.domNode.style.right = i.right + "px"), this._pointerMoveMonitor = this._register(new at()), this._register(Vr(this.bgDomNode, le.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(Vr(this.domNode, le.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new xi()), this._pointerdownScheduleRepeatTimer = this._register(new Ie());
873
+ this.domNode.style.width = e + "px", this.domNode.style.height = e + "px", typeof i.top < "u" && (this.domNode.style.top = i.top + "px"), typeof i.left < "u" && (this.domNode.style.left = i.left + "px"), typeof i.bottom < "u" && (this.domNode.style.bottom = i.bottom + "px"), typeof i.right < "u" && (this.domNode.style.right = i.right + "px"), this._pointerMoveMonitor = this._register(new at()), this._register(Kr(this.bgDomNode, le.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(Kr(this.domNode, le.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new yi()), this._pointerdownScheduleRepeatTimer = this._register(new Ie());
882
874
  }
883
875
  _arrowPointerDown(i) {
884
876
  if (!i.target || !(i.target instanceof Element)) return;
@@ -901,28 +893,22 @@ var b = class {
901
893
  if (this._disposed) return E(() => {
902
894
  });
903
895
  let r = { fn: i, thisArgs: e };
904
- this._listeners.push(r);
896
+ this._listeners = this._listeners.slice(), this._listeners.push(r);
905
897
  let s = E(() => {
906
898
  let o = this._listeners.indexOf(r);
907
- o !== -1 && this._listeners.splice(o, 1);
899
+ o !== -1 && (this._listeners = this._listeners.slice(), this._listeners.splice(o, 1));
908
900
  });
909
901
  return t && (Array.isArray(t) ? t.push(s) : t.add(s)), s;
910
902
  }, this._event);
911
903
  }
912
904
  fire(i) {
913
- if (!this._disposed) switch (this._listeners.length) {
914
- case 0:
915
- return;
916
- case 1: {
917
- let { fn: e, thisArgs: t } = this._listeners[0];
918
- e.call(t, i);
919
- return;
920
- }
921
- default: {
922
- let e = this._listeners.slice();
923
- for (let { fn: t, thisArgs: r } of e) t.call(r, i);
924
- }
905
+ if (this._disposed || !this._listeners.length) return;
906
+ if (this._listeners.length === 1) {
907
+ this._listeners[0].fn.call(this._listeners[0].thisArgs, i);
908
+ return;
925
909
  }
910
+ let e = this._listeners;
911
+ for (let t = 0, r = e.length; t < r; ++t) e[t].fn.call(e[t].thisArgs, i);
926
912
  }
927
913
  dispose() {
928
914
  this._disposed || (this._disposed = true, this._listeners.length = 0);
@@ -950,7 +936,7 @@ var b = class {
950
936
  }
951
937
  r.runAndSubscribe = t;
952
938
  })(j ||= {});
953
- var Jr = class n4 {
939
+ var Yr = class n4 {
954
940
  constructor(i, e, t, r, s, o, a) {
955
941
  this._forceIntegerValues = i;
956
942
  this._scrollStateBrand = void 0;
@@ -975,7 +961,7 @@ var Jr = class n4 {
975
961
  this._scrollableBrand = void 0;
976
962
  this._onScroll = this._register(new b());
977
963
  this.onScroll = this._onScroll.event;
978
- this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new Jr(e.forceIntegerValues, 0, 0, 0, 0, 0, 0), this._smoothScrolling = null;
964
+ this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new Yr(e.forceIntegerValues, 0, 0, 0, 0, 0, 0), this._smoothScrolling = null;
979
965
  }
980
966
  dispose() {
981
967
  this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), super.dispose();
@@ -1042,18 +1028,18 @@ var Jr = class n4 {
1042
1028
  let r = this._state;
1043
1029
  r.equals(e) || (this._state = e, this._onScroll.fire(this._state.createScrollEvent(r, t)));
1044
1030
  }
1045
- }, Di = class {
1031
+ }, Ti = class {
1046
1032
  constructor(i, e, t) {
1047
1033
  this.scrollLeft = i, this.scrollTop = e, this.isDone = t;
1048
1034
  }
1049
1035
  };
1050
- function Zr(n10, i) {
1036
+ function Xr(n10, i) {
1051
1037
  let e = i - n10;
1052
1038
  return function(t) {
1053
- return n10 + e * $n(t);
1039
+ return n10 + e * Gn(t);
1054
1040
  };
1055
1041
  }
1056
- function Gn(n10, i, e) {
1042
+ function Kn(n10, i, e) {
1057
1043
  return function(t) {
1058
1044
  return t < e ? n10(t / e) : i((t - e) / (1 - e));
1059
1045
  };
@@ -1068,9 +1054,9 @@ var Vt = class n5 {
1068
1054
  _initAnimation(i, e, t) {
1069
1055
  if (Math.abs(i - e) > 2.5 * t) {
1070
1056
  let s, o;
1071
- return i < e ? (s = i + 0.75 * t, o = e - 0.75 * t) : (s = i - 0.75 * t, o = e + 0.75 * t), Gn(Zr(i, s), Zr(o, e), 0.33);
1057
+ return i < e ? (s = i + 0.75 * t, o = e - 0.75 * t) : (s = i - 0.75 * t, o = e + 0.75 * t), Kn(Xr(i, s), Xr(o, e), 0.33);
1072
1058
  }
1073
- return Zr(i, e);
1059
+ return Xr(i, e);
1074
1060
  }
1075
1061
  dispose() {
1076
1062
  this.animationFrameDisposable !== null && (this.animationFrameDisposable.dispose(), this.animationFrameDisposable = null);
@@ -1085,9 +1071,9 @@ var Vt = class n5 {
1085
1071
  let e = (i - this.startTime) / this.duration;
1086
1072
  if (e < 1) {
1087
1073
  let t = this._scrollLeft(e), r = this._scrollTop(e);
1088
- return new Di(t, r, false);
1074
+ return new Ti(t, r, false);
1089
1075
  }
1090
- return new Di(this.to.scrollLeft, this.to.scrollTop, true);
1076
+ return new Ti(this.to.scrollLeft, this.to.scrollTop, true);
1091
1077
  }
1092
1078
  static start(i, e, t) {
1093
1079
  t = t + 10;
@@ -1095,13 +1081,13 @@ var Vt = class n5 {
1095
1081
  return new n5(i, e, r, t);
1096
1082
  }
1097
1083
  };
1098
- function Vn(n10) {
1084
+ function zn(n10) {
1099
1085
  return Math.pow(n10, 3);
1100
1086
  }
1101
- function $n(n10) {
1102
- return 1 - Vn(1 - n10);
1087
+ function Gn(n10) {
1088
+ return 1 - zn(1 - n10);
1103
1089
  }
1104
- var Ri = class extends g {
1090
+ var Di = class extends g {
1105
1091
  constructor(i, e, t) {
1106
1092
  super(), this._visibility = i, this._visibleClassName = e, this._invisibleClassName = t, this._domNode = null, this._isVisible = false, this._isNeeded = false, this._rawShouldBeVisible = false, this._shouldBeVisible = false, this._revealTimer = this._register(new Ie());
1107
1093
  }
@@ -1140,12 +1126,12 @@ var Ri = class extends g {
1140
1126
  this._revealTimer.cancel(), this._isVisible && (this._isVisible = false, this._domNode?.setClassName(this._invisibleClassName + (i ? " xterm-fade" : "")));
1141
1127
  }
1142
1128
  };
1143
- var qn = 140, ct = class extends Ne {
1129
+ var Vn = 140, ct = class extends Ne {
1144
1130
  constructor(i) {
1145
- super(), this._lazyRender = i.lazyRender, this._host = i.host, this._scrollable = i.scrollable, this._scrollByPage = i.scrollByPage, this._scrollbarState = i.scrollbarState, this._visibilityController = this._register(new Ri(i.visibility, "xterm-visible xterm-scrollbar " + i.extraScrollbarClassName, "xterm-invisible xterm-scrollbar " + i.extraScrollbarClassName)), this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._pointerMoveMonitor = this._register(new at()), this._shouldRender = true, this.domNode = new we(document.createElement("div")), this.domNode.setAttribute("role", "presentation"), this.domNode.setAttribute("aria-hidden", "true"), this._visibilityController.setDomNode(this.domNode), this.domNode.setPosition("absolute"), this._register(C(this.domNode.domNode, le.POINTER_DOWN, (e) => this._domNodePointerDown(e)));
1131
+ super(), this._lazyRender = i.lazyRender, this._host = i.host, this._scrollable = i.scrollable, this._scrollByPage = i.scrollByPage, this._scrollbarState = i.scrollbarState, this._visibilityController = this._register(new Di(i.visibility, "xterm-visible xterm-scrollbar " + i.extraScrollbarClassName, "xterm-invisible xterm-scrollbar " + i.extraScrollbarClassName)), this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._pointerMoveMonitor = this._register(new at()), this._shouldRender = true, this.domNode = new we(document.createElement("div")), this.domNode.setAttribute("role", "presentation"), this.domNode.setAttribute("aria-hidden", "true"), this._visibilityController.setDomNode(this.domNode), this.domNode.setPosition("absolute"), this._register(C(this.domNode.domNode, le.POINTER_DOWN, (e) => this._domNodePointerDown(e)));
1146
1132
  }
1147
1133
  _createArrow(i) {
1148
- let e = this._register(new Ti(i));
1134
+ let e = this._register(new wi(i));
1149
1135
  return this.domNode.domNode.appendChild(e.bgDomNode), this.domNode.domNode.appendChild(e.domNode), e;
1150
1136
  }
1151
1137
  _createSlider(i, e, t, r) {
@@ -1184,7 +1170,7 @@ var qn = 140, ct = class extends Ne {
1184
1170
  let e, t;
1185
1171
  if (i.target === this.domNode.domNode && typeof i.offsetX == "number" && typeof i.offsetY == "number") e = i.offsetX, t = i.offsetY;
1186
1172
  else {
1187
- let s = $s(this.domNode.domNode);
1173
+ let s = Gs(this.domNode.domNode);
1188
1174
  e = i.pageX - s.left, t = i.pageY - s.top;
1189
1175
  }
1190
1176
  let r = this._pointerDownRelativePosition(e, t);
@@ -1195,7 +1181,7 @@ var qn = 140, ct = class extends Ne {
1195
1181
  let e = this._sliderPointerPosition(i), t = this._sliderOrthogonalPointerPosition(i), r = this._scrollbarState.clone();
1196
1182
  this.slider.toggleClassName("xterm-active", true), this._pointerMoveMonitor.startMonitoring(i.target, i.pointerId, i.buttons, (s) => {
1197
1183
  let o = this._sliderOrthogonalPointerPosition(s), a = Math.abs(o - t);
1198
- if (Ue && a > qn) {
1184
+ if (Ue && a > Vn) {
1199
1185
  this._setDesiredScrollPositionNow(r.getScrollPosition());
1200
1186
  return;
1201
1187
  }
@@ -1292,7 +1278,7 @@ var ht = class n6 {
1292
1278
  return Math.round(e / this._computedSliderRatio);
1293
1279
  }
1294
1280
  };
1295
- var Ai = class extends ct {
1281
+ var Li = class extends ct {
1296
1282
  constructor(i, e, t) {
1297
1283
  let r = i.getScrollDimensions(), s = i.getCurrentScrollPosition();
1298
1284
  if (super({ lazyRender: e.lazyRender, host: t, scrollbarState: new ht(e.horizontalHasArrows ? e.horizontalScrollbarSize : 0, e.horizontal === 2 ? 0 : e.horizontalScrollbarSize, e.vertical === 2 ? 0 : e.verticalScrollbarSize, r.width, r.scrollWidth, s.scrollLeft), visibility: e.horizontal, extraScrollbarClassName: "xterm-horizontal", scrollable: i, scrollByPage: e.scrollByPage }), e.horizontalHasArrows) throw new Error("horizontalHasArrows is not supported in xterm.js");
@@ -1326,7 +1312,7 @@ var Ai = class extends ct {
1326
1312
  this.updateScrollbarSize(i.horizontal === 2 ? 0 : i.horizontalScrollbarSize), this._scrollbarState.setOppositeScrollbarSize(i.vertical === 2 ? 0 : i.verticalScrollbarSize), this._visibilityController.setVisibility(i.horizontal), this._scrollByPage = i.scrollByPage;
1327
1313
  }
1328
1314
  };
1329
- var ki = class extends ct {
1315
+ var Ai = class extends ct {
1330
1316
  constructor(e, t, r) {
1331
1317
  let s = e.getScrollDimensions(), o = e.getCurrentScrollPosition(), a = t.verticalHasArrows;
1332
1318
  super({ lazyRender: t.lazyRender, host: r, scrollbarState: new ht(a ? t.verticalScrollbarSize : 0, t.vertical === 2 ? 0 : t.verticalScrollbarSize, 0, s.height, s.scrollHeight, o.scrollTop), visibility: t.vertical, extraScrollbarClassName: "xterm-vertical", scrollable: e, scrollByPage: t.scrollByPage });
@@ -1374,11 +1360,11 @@ var ki = class extends ct {
1374
1360
  this._scrollbarState.setArrowSize(t), this._setArrows(e.verticalHasArrows, e.verticalScrollbarSize), this.updateScrollbarSize(e.vertical === 2 ? 0 : e.verticalScrollbarSize), this._scrollbarState.setOppositeScrollbarSize(0), this._visibilityController.setVisibility(e.vertical), this._scrollByPage = e.scrollByPage;
1375
1361
  }
1376
1362
  };
1377
- var Qr = class {
1363
+ var jr = class {
1378
1364
  constructor(i, e, t) {
1379
1365
  this.timestamp = i, this.deltaX = e, this.deltaY = t, this.score = 0;
1380
1366
  }
1381
- }, Bi = class Bi2 {
1367
+ }, Mi = class Mi2 {
1382
1368
  constructor() {
1383
1369
  this._capacity = 5, this._memory = [], this._front = -1, this._rear = -1;
1384
1370
  }
@@ -1395,12 +1381,12 @@ var Qr = class {
1395
1381
  acceptStandardWheelEvent(i) {
1396
1382
  if (Kt) {
1397
1383
  se(i.browserEvent);
1398
- let t = Xr();
1384
+ let t = Vr();
1399
1385
  this.accept(Date.now(), i.deltaX * t, i.deltaY * t);
1400
1386
  } else this.accept(Date.now(), i.deltaX, i.deltaY);
1401
1387
  }
1402
1388
  accept(i, e, t) {
1403
- let r = null, s = new Qr(i, e, t);
1389
+ let r = null, s = new jr(i, e, t);
1404
1390
  this._front === -1 && this._rear === -1 ? (this._memory[0] = s, this._front = 0, this._rear = 0) : (r = this._memory[this._rear], this._rear = (this._rear + 1) % this._capacity, this._rear === this._front && (this._front = (this._front + 1) % this._capacity), this._memory[this._rear] = s), s.score = this._computeScore(s, r);
1405
1391
  }
1406
1392
  _computeScore(i, e) {
@@ -1416,19 +1402,19 @@ var Qr = class {
1416
1402
  return Math.abs(Math.round(i) - i) < 0.01;
1417
1403
  }
1418
1404
  };
1419
- Bi.INSTANCE = new Bi();
1420
- var es = Bi, Mi = class extends Ne {
1405
+ Mi.INSTANCE = new Mi();
1406
+ var Zr = Mi, ki = class extends Ne {
1421
1407
  constructor(e, t, r) {
1422
1408
  super();
1423
1409
  this._onScroll = this._register(new b());
1424
1410
  this.onScroll = this._onScroll.event;
1425
1411
  t = t ?? {};
1426
1412
  let s, o = !r;
1427
- r ? s = r : (t.mouseWheelSmoothScroll = false, s = new lt({ forceIntegerValues: true, smoothScrollDuration: 0, scheduleAtNextAnimationFrame: (l) => tt(se(e), l) })), this._options = Xn(t), this._scrollable = s, this._register(this._scrollable.onScroll((l) => {
1413
+ r ? s = r : (t.mouseWheelSmoothScroll = false, s = new lt({ forceIntegerValues: true, smoothScrollDuration: 0, scheduleAtNextAnimationFrame: (l) => tt(se(e), l) })), this._options = $n(t), this._scrollable = s, this._register(this._scrollable.onScroll((l) => {
1428
1414
  this._handleScroll(l), this._onScroll.fire(l);
1429
1415
  })), o && this._register(this._scrollable);
1430
1416
  let a = { handleMouseWheel: (l) => this._handleMouseWheel(l), handleDragStart: () => this._handleDragStart(), handleDragEnd: () => this._handleDragEnd() };
1431
- this._verticalScrollbar = this._register(new ki(this._scrollable, this._options, a)), this._horizontalScrollbar = this._register(new Ai(this._scrollable, this._options, a)), this._domNode = document.createElement("div"), this._domNode.className = "xterm-scrollable-element " + this._options.className, this._domNode.setAttribute("role", "presentation"), this._domNode.style.position = "relative", this._domNode.appendChild(e), this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows ? (this._leftShadowDomNode = new we(document.createElement("div")), this._leftShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = new we(document.createElement("div")), this._topShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), this._topLeftShadowDomNode = new we(document.createElement("div")), this._topLeftShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._topLeftShadowDomNode.domNode)) : (this._leftShadowDomNode = null, this._topShadowDomNode = null, this._topLeftShadowDomNode = null), this._listenOnDomNode = this._options.listenOnDomNode ?? this._domNode, this._mouseWheelToDispose = [], this._setListeningToMouseWheel(this._options.handleMouseWheel), this._onmouseover(this._listenOnDomNode, (l) => this._handleMouseOver(l)), this._onmouseleave(this._listenOnDomNode, (l) => this._handleMouseLeave(l)), this._hideTimeout = this._register(new Ie()), this._isDragging = false, this._mouseIsOver = false, this._shouldRender = true, this._revealOnScroll = true;
1417
+ this._verticalScrollbar = this._register(new Ai(this._scrollable, this._options, a)), this._horizontalScrollbar = this._register(new Li(this._scrollable, this._options, a)), this._domNode = document.createElement("div"), this._domNode.className = "xterm-scrollable-element " + this._options.className, this._domNode.setAttribute("role", "presentation"), this._domNode.style.position = "relative", this._domNode.appendChild(e), this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows ? (this._leftShadowDomNode = new we(document.createElement("div")), this._leftShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = new we(document.createElement("div")), this._topShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), this._topLeftShadowDomNode = new we(document.createElement("div")), this._topLeftShadowDomNode.setClassName("xterm-shadow"), this._domNode.appendChild(this._topLeftShadowDomNode.domNode)) : (this._leftShadowDomNode = null, this._topShadowDomNode = null, this._topLeftShadowDomNode = null), this._listenOnDomNode = this._options.listenOnDomNode ?? this._domNode, this._mouseWheelToDispose = [], this._setListeningToMouseWheel(this._options.handleMouseWheel), this._onmouseover(this._listenOnDomNode, (l) => this._handleMouseOver(l)), this._onmouseleave(this._listenOnDomNode, (l) => this._handleMouseLeave(l)), this._hideTimeout = this._register(new Ie()), this._isDragging = false, this._mouseIsOver = false, this._shouldRender = true, this._revealOnScroll = true;
1432
1418
  }
1433
1419
  get options() {
1434
1420
  return this._options;
@@ -1470,7 +1456,7 @@ var es = Bi, Mi = class extends Ne {
1470
1456
  }
1471
1457
  _handleMouseWheel(e) {
1472
1458
  if (e.browserEvent?.defaultPrevented) return;
1473
- let t = es.INSTANCE;
1459
+ let t = Zr.INSTANCE;
1474
1460
  t.acceptStandardWheelEvent(e);
1475
1461
  let r = false;
1476
1462
  if (e.deltaY || e.deltaX) {
@@ -1527,7 +1513,7 @@ var es = Bi, Mi = class extends Ne {
1527
1513
  !this._mouseIsOver && !this._isDragging && this._hideTimeout.cancelAndSet(() => this._hide(), 500);
1528
1514
  }
1529
1515
  };
1530
- function Xn(n10) {
1516
+ function $n(n10) {
1531
1517
  let i = { lazyRender: typeof n10.lazyRender < "u" ? n10.lazyRender : false, className: typeof n10.className < "u" ? n10.className : "", useShadows: typeof n10.useShadows < "u" ? n10.useShadows : true, handleMouseWheel: typeof n10.handleMouseWheel < "u" ? n10.handleMouseWheel : true, flipAxes: typeof n10.flipAxes < "u" ? n10.flipAxes : false, consumeMouseWheelIfScrollbarIsNeeded: typeof n10.consumeMouseWheelIfScrollbarIsNeeded < "u" ? n10.consumeMouseWheelIfScrollbarIsNeeded : false, alwaysConsumeMouseWheel: typeof n10.alwaysConsumeMouseWheel < "u" ? n10.alwaysConsumeMouseWheel : false, scrollYToX: typeof n10.scrollYToX < "u" ? n10.scrollYToX : false, mouseWheelScrollSensitivity: typeof n10.mouseWheelScrollSensitivity < "u" ? n10.mouseWheelScrollSensitivity : 1, fastScrollSensitivity: typeof n10.fastScrollSensitivity < "u" ? n10.fastScrollSensitivity : 5, scrollPredominantAxis: typeof n10.scrollPredominantAxis < "u" ? n10.scrollPredominantAxis : true, mouseWheelSmoothScroll: typeof n10.mouseWheelSmoothScroll < "u" ? n10.mouseWheelSmoothScroll : true, listenOnDomNode: typeof n10.listenOnDomNode < "u" ? n10.listenOnDomNode : null, horizontal: typeof n10.horizontal < "u" ? n10.horizontal : 1, horizontalScrollbarSize: typeof n10.horizontalScrollbarSize < "u" ? n10.horizontalScrollbarSize : 10, horizontalSliderSize: typeof n10.horizontalSliderSize < "u" ? n10.horizontalSliderSize : 0, horizontalHasArrows: typeof n10.horizontalHasArrows < "u" ? n10.horizontalHasArrows : false, vertical: typeof n10.vertical < "u" ? n10.vertical : 1, verticalScrollbarSize: typeof n10.verticalScrollbarSize < "u" ? n10.verticalScrollbarSize : 10, verticalHasArrows: typeof n10.verticalHasArrows < "u" ? n10.verticalHasArrows : false, verticalSliderSize: typeof n10.verticalSliderSize < "u" ? n10.verticalSliderSize : 0, scrollByPage: typeof n10.scrollByPage < "u" ? n10.scrollByPage : false };
1532
1518
  return i.horizontalSliderSize = typeof n10.horizontalSliderSize < "u" ? n10.horizontalSliderSize : i.horizontalScrollbarSize, i.verticalSliderSize = typeof n10.verticalSliderSize < "u" ? n10.verticalSliderSize : i.verticalScrollbarSize, ie && (i.className += " xterm-mac"), i;
1533
1519
  }
@@ -1547,7 +1533,7 @@ var dt = class extends g {
1547
1533
  let c = this._register(new lt({ forceIntegerValues: false, smoothScrollDuration: this._optionsService.rawOptions.smoothScrollDuration, scheduleAtNextAnimationFrame: (u) => tt(s.window, u) }));
1548
1534
  this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration", () => {
1549
1535
  c.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration);
1550
- })), this._scrollableElement = this._register(new Mi(t, { vertical: 1, horizontal: 2, useShadows: false, mouseWheelSmoothScroll: true, verticalHasArrows: this._optionsService.rawOptions.scrollbar?.showArrows ?? false, ...this._getChangeOptions() }, c)), this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity", "fastScrollSensitivity", "scrollbar"], () => this._scrollableElement.updateOptions(this._getChangeOptions()))), this._register(a.onProtocolChange((u) => {
1536
+ })), this._scrollableElement = this._register(new ki(t, { vertical: 1, horizontal: 2, useShadows: false, mouseWheelSmoothScroll: true, verticalHasArrows: this._optionsService.rawOptions.scrollbar?.showArrows ?? false, ...this._getChangeOptions() }, c)), this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity", "fastScrollSensitivity", "scrollbar"], () => this._scrollableElement.updateOptions(this._getChangeOptions()))), this._register(a.onProtocolChange((u) => {
1551
1537
  this._scrollableElement.updateOptions({ handleMouseWheel: !(u & 16) });
1552
1538
  })), this._scrollableElement.setScrollDimensions({ height: 0, scrollHeight: 0 }), this._register(j.runAndSubscribe(l.onChangeColors, () => {
1553
1539
  e.style.backgroundColor = l.colors.background.css, this._scrollableElement.getDomNode().style.backgroundColor = l.colors.background.css;
@@ -1847,7 +1833,7 @@ var ft = class {
1847
1833
  }
1848
1834
  };
1849
1835
  ft = y([m(2, D), m(3, R), m(4, Y), m(5, V)], ft);
1850
- var J = 0, Q = 0, ee = 0, W = 0, ts = { css: "#00000000", rgba: 0 }, O;
1836
+ var J = 0, Q = 0, ee = 0, W = 0, Jr = { css: "#00000000", rgba: 0 }, O;
1851
1837
  ((t) => {
1852
1838
  function n10(r, s, o, a) {
1853
1839
  return a !== void 0 ? `#${Ve(r)}${Ve(s)}${Ve(o)}${Ve(a)}` : `#${Ve(r)}${Ve(s)}${Ve(o)}`;
@@ -1877,17 +1863,17 @@ var k;
1877
1863
  }
1878
1864
  a.isOpaque = i;
1879
1865
  function e(l, h, d) {
1880
- let c = Oi.ensureContrastRatio(l.rgba, h.rgba, d);
1866
+ let c = Bi.ensureContrastRatio(l.rgba, h.rgba, d);
1881
1867
  if (c) return O.toColor(c >> 24 & 255, c >> 16 & 255, c >> 8 & 255);
1882
1868
  }
1883
1869
  a.ensureContrastRatio = e;
1884
1870
  function t(l) {
1885
1871
  let h = (l.rgba | 255) >>> 0;
1886
- return [J, Q, ee] = Oi.toChannels(h), { css: O.toCss(J, Q, ee), rgba: h };
1872
+ return [J, Q, ee] = Bi.toChannels(h), { css: O.toCss(J, Q, ee), rgba: h };
1887
1873
  }
1888
1874
  a.opaque = t;
1889
1875
  function r(l, h) {
1890
- return W = Math.round(h * 255), [J, Q, ee] = Oi.toChannels(l.rgba), { css: O.toCss(J, Q, ee, W), rgba: O.toRgba(J, Q, ee, W) };
1876
+ return W = Math.round(h * 255), [J, Q, ee] = Bi.toChannels(l.rgba), { css: O.toCss(J, Q, ee, W), rgba: O.toRgba(J, Q, ee, W) };
1891
1877
  }
1892
1878
  a.opacity = r;
1893
1879
  function s(l, h) {
@@ -1899,7 +1885,7 @@ var k;
1899
1885
  }
1900
1886
  a.toColorRGB = o;
1901
1887
  })(k ||= {});
1902
- var B;
1888
+ var P;
1903
1889
  ((t) => {
1904
1890
  let n10, i;
1905
1891
  try {
@@ -1929,7 +1915,7 @@ var B;
1929
1915
  return { rgba: O.toRgba(J, Q, ee, W), css: r };
1930
1916
  }
1931
1917
  t.toColor = e;
1932
- })(B ||= {});
1918
+ })(P ||= {});
1933
1919
  var Z;
1934
1920
  ((e) => {
1935
1921
  function n10(t) {
@@ -1942,7 +1928,7 @@ var Z;
1942
1928
  }
1943
1929
  e.relativeLuminance2 = i;
1944
1930
  })(Z ||= {});
1945
- var Oi;
1931
+ var Bi;
1946
1932
  ((s) => {
1947
1933
  function n10(o, a) {
1948
1934
  if (W = (a & 255) / 255, W === 1) return a;
@@ -1986,7 +1972,7 @@ var Oi;
1986
1972
  return [o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, o & 255];
1987
1973
  }
1988
1974
  s.toChannels = r;
1989
- })(Oi ||= {});
1975
+ })(Bi ||= {});
1990
1976
  function Ve(n10) {
1991
1977
  let i = n10.toString(16);
1992
1978
  return i.length < 2 ? "0" + i : i;
@@ -1994,7 +1980,7 @@ function Ve(n10) {
1994
1980
  function Te(n10, i) {
1995
1981
  return n10 < i ? (i + 0.05) / (n10 + 0.05) : (n10 + 0.05) / (i + 0.05);
1996
1982
  }
1997
- var Ni = class extends ue {
1983
+ var Oi = class extends ue {
1998
1984
  constructor(e, t, r) {
1999
1985
  super();
2000
1986
  this.content = 0;
@@ -2105,23 +2091,23 @@ var Ni = class extends ue {
2105
2091
  }
2106
2092
  };
2107
2093
  He = y([m(0, D)], He);
2108
- function is(n10) {
2094
+ function Qr(n10) {
2109
2095
  if (!n10) throw new Error("value must not be falsy");
2110
2096
  return n10;
2111
2097
  }
2112
- function Yn(n10) {
2098
+ function qn(n10) {
2113
2099
  return 57508 <= n10 && n10 <= 57558;
2114
2100
  }
2115
- function jn(n10) {
2101
+ function Xn(n10) {
2116
2102
  return 9472 <= n10 && n10 <= 9631;
2117
2103
  }
2118
- function js(n10) {
2119
- return Yn(n10) || jn(n10);
2104
+ function Xs(n10) {
2105
+ return qn(n10) || Xn(n10);
2120
2106
  }
2121
- function Zs() {
2122
- return { css: { canvas: Fi(), cell: Fi() }, device: { canvas: Fi(), cell: Fi(), char: { width: 0, height: 0, left: 0, top: 0 } } };
2107
+ function Ys() {
2108
+ return { css: { canvas: Ni(), cell: Ni() }, device: { canvas: Ni(), cell: Ni(), char: { width: 0, height: 0, left: 0, top: 0 } } };
2123
2109
  }
2124
- function Fi() {
2110
+ function Ni() {
2125
2111
  return { width: 0, height: 0 };
2126
2112
  }
2127
2113
  var _t = class {
@@ -2145,30 +2131,30 @@ var _t = class {
2145
2131
  _ && (_.hasBlinkingCells = false);
2146
2132
  let v = this._characterJoinerService.getJoinedCharacters(e), f = this._themeService.colors, S = i.getNoBgTrimmedLength();
2147
2133
  t && S < o + 1 && (S = o + 1);
2148
- let I, w = 0, L = "", T, te = 0, Ds = 0, Rs = 0, Ls = false, As = 0, ui = false, Ot, ks = 0, N = [], An = c !== -1 && u !== -1;
2134
+ let I, w = 0, L = "", T, te = 0, Ts = 0, Ds = 0, Rs = false, Ls = 0, di = false, Ot, As = 0, N = [], Rn = c !== -1 && u !== -1;
2149
2135
  for (let ae = 0; ae < S; ae++) {
2150
2136
  i.loadCell(ae, this._workCell);
2151
- let Rr = this._workCell.getWidth();
2152
- if (Rr === 0) continue;
2153
- let fi = false, je = ae >= ks, Lr = ae, x = this._workCell;
2137
+ let wr = this._workCell.getWidth();
2138
+ if (wr === 0) continue;
2139
+ let ui = false, je = ae >= As, Tr = ae, x = this._workCell;
2154
2140
  if (v.length > 0 && ae === v[0][0] && je) {
2155
- let A = v.shift(), Pr = this._isCellInSelection(A[0], e);
2156
- for (T = A[0] + 1; T < A[1]; T++) je &&= Pr === this._isCellInSelection(T, e);
2157
- je &&= !t || o < A[0] || o >= A[1], je ? (fi = true, x = new Ni(this._workCell, i.translateToString(true, A[0], A[1]), A[1] - A[0]), Lr = A[1] - 1, Rr = x.getWidth()) : ks = A[1];
2141
+ let A = v.shift(), kr = this._isCellInSelection(A[0], e);
2142
+ for (T = A[0] + 1; T < A[1]; T++) je &&= kr === this._isCellInSelection(T, e);
2143
+ je &&= !t || o < A[0] || o >= A[1], je ? (ui = true, x = new Oi(this._workCell, i.translateToString(true, A[0], A[1]), A[1] - A[0]), Tr = A[1] - 1, wr = x.getWidth()) : As = A[1];
2158
2144
  }
2159
- let Nt = this._isCellInSelection(ae, e), Ar = t && ae === o, kr = An && ae >= c && ae <= u;
2145
+ let Nt = this._isCellInSelection(ae, e), Dr = t && ae === o, Rr = Rn && ae >= c && ae <= u;
2160
2146
  _ && x.isBlink() && (_.hasBlinkingCells = true), !l && x.isBlink() && N.push("xterm-blink-hidden");
2161
- let Mr = false;
2147
+ let Lr = false;
2162
2148
  this._decorationService.forEachDecorationAtCell(ae, e, void 0, (A) => {
2163
- Mr = true;
2149
+ Lr = true;
2164
2150
  });
2165
- let _i = x.getChars() || " ";
2166
- if (_i === " " && (x.isUnderline() || x.isOverline()) && (_i = " "), Ot = Rr * h - d.get(_i, x.isBold(), x.isItalic()), !I) I = this._document.createElement("span");
2167
- else if (w && (Nt && ui || !Nt && !ui && x.bg === te) && (Nt && ui && f.selectionForeground || x.fg === Ds) && x.extended.ext === Rs && kr === Ls && Ot === As && !Ar && !fi && !Mr && je) {
2168
- x.isInvisible() ? L += " " : L += _i, w++;
2151
+ let fi = x.getChars() || " ";
2152
+ if (fi === " " && (x.isUnderline() || x.isOverline()) && (fi = " "), Ot = wr * h - d.get(fi, x.isBold(), x.isItalic()), !I) I = this._document.createElement("span");
2153
+ else if (w && (Nt && di || !Nt && !di && x.bg === te) && (Nt && di && f.selectionForeground || x.fg === Ts) && x.extended.ext === Ds && Rr === Rs && Ot === Ls && !Dr && !ui && !Lr && je) {
2154
+ x.isInvisible() ? L += " " : L += fi, w++;
2169
2155
  continue;
2170
2156
  } else w && (I.textContent = L), I = this._document.createElement("span"), w = 0, L = "";
2171
- if (te = x.bg, Ds = x.fg, Rs = x.extended.ext, Ls = kr, As = Ot, ui = Nt, fi && o >= ae && o <= Lr && (o = ae), !this._coreService.isCursorHidden && Ar && this._coreService.isCursorInitialized) {
2157
+ if (te = x.bg, Ts = x.fg, Ds = x.extended.ext, Rs = Rr, Ls = Ot, di = Nt, ui && o >= ae && o <= Tr && (o = ae), !this._coreService.isCursorHidden && Dr && this._coreService.isCursorInitialized) {
2172
2158
  if (N.push("xterm-cursor"), this._coreBrowserService.isFocused) a && N.push("xterm-cursor-blink"), N.push(r === "bar" ? "xterm-cursor-bar" : r === "underline" ? "xterm-cursor-underline" : "xterm-cursor-block");
2173
2159
  else if (s) switch (s) {
2174
2160
  case "outline":
@@ -2190,18 +2176,18 @@ var _t = class {
2190
2176
  let A = x.getUnderlineColor();
2191
2177
  this._optionsService.rawOptions.drawBoldTextInBrightColors && x.isBold() && A < 8 && (A += 8), I.style.textDecorationColor = f.ansi[A].css;
2192
2178
  }
2193
- x.isOverline() && (N.push("xterm-overline"), L === " " && (L = " ")), x.isStrikethrough() && N.push("xterm-strikethrough"), kr && (I.style.textDecoration = "underline");
2194
- let de = x.getFgColor(), Ft = x.getFgColorMode(), Se = x.getBgColor(), Ht = x.getBgColorMode(), Br = !!x.isInverse();
2195
- if (Br) {
2179
+ x.isOverline() && (N.push("xterm-overline"), L === " " && (L = " ")), x.isStrikethrough() && N.push("xterm-strikethrough"), Rr && (I.style.textDecoration = "underline");
2180
+ let de = x.getFgColor(), Ft = x.getFgColorMode(), Se = x.getBgColor(), Ht = x.getBgColorMode(), Ar = !!x.isInverse();
2181
+ if (Ar) {
2196
2182
  let A = de;
2197
2183
  de = Se, Se = A;
2198
- let Pr = Ft;
2199
- Ft = Ht, Ht = Pr;
2184
+ let kr = Ft;
2185
+ Ft = Ht, Ht = kr;
2200
2186
  }
2201
- let Le, pi, Wt = false;
2187
+ let Le, _i, Wt = false;
2202
2188
  this._decorationService.forEachDecorationAtCell(ae, e, void 0, (A) => {
2203
- A.options.layer !== "top" && Wt || (A.backgroundColorRGB && (Ht = 50331648, Se = A.backgroundColorRGB.rgba >> 8 & 16777215, Le = A.backgroundColorRGB), A.foregroundColorRGB && (Ft = 50331648, de = A.foregroundColorRGB.rgba >> 8 & 16777215, pi = A.foregroundColorRGB), Wt = A.options.layer === "top");
2204
- }), !Wt && Nt && (Le = this._coreBrowserService.isFocused ? f.selectionBackgroundOpaque : f.selectionInactiveBackgroundOpaque, Se = Le.rgba >> 8 & 16777215, Ht = 50331648, Wt = true, f.selectionForeground && (Ft = 50331648, de = f.selectionForeground.rgba >> 8 & 16777215, pi = f.selectionForeground)), Wt && N.push("xterm-decoration-top");
2189
+ A.options.layer !== "top" && Wt || (A.backgroundColorRGB && (Ht = 50331648, Se = A.backgroundColorRGB.rgba >> 8 & 16777215, Le = A.backgroundColorRGB), A.foregroundColorRGB && (Ft = 50331648, de = A.foregroundColorRGB.rgba >> 8 & 16777215, _i = A.foregroundColorRGB), Wt = A.options.layer === "top");
2190
+ }), !Wt && Nt && (Le = this._coreBrowserService.isFocused ? f.selectionBackgroundOpaque : f.selectionInactiveBackgroundOpaque, Se = Le.rgba >> 8 & 16777215, Ht = 50331648, Wt = true, f.selectionForeground && (Ft = 50331648, de = f.selectionForeground.rgba >> 8 & 16777215, _i = f.selectionForeground)), Wt && N.push("xterm-decoration-top");
2205
2191
  let Ae;
2206
2192
  switch (Ht) {
2207
2193
  case 16777216:
@@ -2213,7 +2199,7 @@ var _t = class {
2213
2199
  break;
2214
2200
  case 0:
2215
2201
  default:
2216
- Br ? (Ae = f.foreground, N.push(`xterm-bg-${257}`)) : Ae = f.background;
2202
+ Ar ? (Ae = f.foreground, N.push(`xterm-bg-${257}`)) : Ae = f.background;
2217
2203
  }
2218
2204
  switch (Le || x.isDim() && (Le = k.multiplyOpacity(Ae, 0.5)), Ft) {
2219
2205
  case 16777216:
@@ -2222,18 +2208,18 @@ var _t = class {
2222
2208
  break;
2223
2209
  case 50331648:
2224
2210
  let A = O.toColor(de >> 16 & 255, de >> 8 & 255, de & 255);
2225
- this._applyMinimumContrast(I, Ae, A, x, Le, pi) || this._addStyle(I, `color:#${de.toString(16).padStart(6, "0")}`);
2211
+ this._applyMinimumContrast(I, Ae, A, x, Le, _i) || this._addStyle(I, `color:#${de.toString(16).padStart(6, "0")}`);
2226
2212
  break;
2227
2213
  case 0:
2228
2214
  default:
2229
- this._applyMinimumContrast(I, Ae, f.foreground, x, Le, pi) || Br && N.push(`xterm-fg-${257}`);
2215
+ this._applyMinimumContrast(I, Ae, f.foreground, x, Le, _i) || Ar && N.push(`xterm-fg-${257}`);
2230
2216
  }
2231
- N.length && (I.className = N.join(" "), N.length = 0), !Ar && !fi && !Mr && je ? w++ : I.textContent = L, Ot !== this.defaultSpacing && (I.style.letterSpacing = `${Ot}px`), p.push(I), ae = Lr;
2217
+ N.length && (I.className = N.join(" "), N.length = 0), !Dr && !ui && !Lr && je ? w++ : I.textContent = L, Ot !== this.defaultSpacing && (I.style.letterSpacing = `${Ot}px`), p.push(I), ae = Tr;
2232
2218
  }
2233
2219
  return I && w && (I.textContent = L), p;
2234
2220
  }
2235
2221
  _applyMinimumContrast(i, e, t, r, s, o) {
2236
- if (this._optionsService.rawOptions.minimumContrastRatio === 1 || js(r.getCode())) return false;
2222
+ if (this._optionsService.rawOptions.minimumContrastRatio === 1 || Xs(r.getCode())) return false;
2237
2223
  let a = this._getContrastCache(r), l;
2238
2224
  if (!s && !o && (l = a.getColor(e.rgba, t.rgba)), l === void 0) {
2239
2225
  let h = this._optionsService.rawOptions.minimumContrastRatio / (r.isDim() ? 2 : 1);
@@ -2252,9 +2238,9 @@ var _t = class {
2252
2238
  return !t || !r ? false : this._columnSelectMode ? t[0] <= r[0] ? i >= t[0] && e >= t[1] && i < r[0] && e <= r[1] : i < t[0] && e >= t[1] && i >= r[0] && e <= r[1] : e > t[1] && e < r[1] || t[1] === r[1] && e === t[1] && i >= t[0] && i < r[0] || t[1] < r[1] && e === r[1] && i < r[0] || t[1] < r[1] && e === t[1] && i >= t[0];
2253
2239
  }
2254
2240
  };
2255
- _t = y([m(1, gi), m(2, R), m(3, G), m(4, Y), m(5, ge), m(6, _e)], _t);
2256
- var Hi = class {
2257
- constructor(i = () => new rs()) {
2241
+ _t = y([m(1, Si), m(2, R), m(3, G), m(4, Y), m(5, ge), m(6, _e)], _t);
2242
+ var Fi = class {
2243
+ constructor(i = () => new es()) {
2258
2244
  this._flat = new Float32Array(256);
2259
2245
  this._font = "";
2260
2246
  this._fontSize = 0;
@@ -2291,9 +2277,9 @@ var Hi = class {
2291
2277
  _measure(i, e) {
2292
2278
  return this._canvasElements[e].measure(i);
2293
2279
  }
2294
- }, rs = class {
2280
+ }, es = class {
2295
2281
  constructor() {
2296
- typeof OffscreenCanvas < "u" ? (this._canvas = new OffscreenCanvas(1, 1), this._ctx = is(this._canvas.getContext("2d"))) : (this._canvas = document.createElement("canvas"), this._canvas.width = 1, this._canvas.height = 1, this._ctx = is(this._canvas.getContext("2d")));
2282
+ typeof OffscreenCanvas < "u" ? (this._canvas = new OffscreenCanvas(1, 1), this._ctx = Qr(this._canvas.getContext("2d"))) : (this._canvas = document.createElement("canvas"), this._canvas.width = 1, this._canvas.height = 1, this._ctx = Qr(this._canvas.getContext("2d")));
2297
2283
  }
2298
2284
  setFont(i, e, t, r) {
2299
2285
  let s = r ? "italic" : "";
@@ -2303,7 +2289,7 @@ var Hi = class {
2303
2289
  return this._ctx.measureText(i).width;
2304
2290
  }
2305
2291
  };
2306
- var ss = class {
2292
+ var ts = class {
2307
2293
  constructor() {
2308
2294
  this.clear();
2309
2295
  }
@@ -2326,10 +2312,10 @@ var ss = class {
2326
2312
  return this.hasSelection ? (t -= i.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? e >= this.startCol && t >= this.viewportCappedStartRow && e < this.endCol && t <= this.viewportCappedEndRow : e < this.startCol && t >= this.viewportCappedStartRow && e >= this.endCol && t <= this.viewportCappedEndRow : t > this.viewportStartRow && t < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && t === this.viewportStartRow && e >= this.startCol && e < this.endCol || this.viewportStartRow < this.viewportEndRow && t === this.viewportEndRow && e < this.endCol || this.viewportStartRow < this.viewportEndRow && t === this.viewportStartRow && e >= this.startCol) : false;
2327
2313
  }
2328
2314
  };
2329
- function Js() {
2330
- return new ss();
2315
+ function js() {
2316
+ return new ts();
2331
2317
  }
2332
- var Wi = class extends g {
2318
+ var Hi = class extends g {
2333
2319
  constructor(e, t, r) {
2334
2320
  super();
2335
2321
  this._renderCallback = e;
@@ -2373,7 +2359,7 @@ var Wi = class extends g {
2373
2359
  this._interval !== void 0 && (this._coreBrowserService.window.clearInterval(this._interval), this._interval = void 0);
2374
2360
  }
2375
2361
  };
2376
- var Zn = 1, mt = class extends g {
2362
+ var Yn = 1, mt = class extends g {
2377
2363
  constructor(e, t, r, s, o, a, l, h, d, c, u, _, p, v) {
2378
2364
  super();
2379
2365
  this._terminal = e;
@@ -2389,17 +2375,17 @@ var Zn = 1, mt = class extends g {
2389
2375
  this._coreService = _;
2390
2376
  this._coreBrowserService = p;
2391
2377
  this._themeService = v;
2392
- this._terminalClass = Zn++;
2378
+ this._terminalClass = Yn++;
2393
2379
  this._rowElements = [];
2394
- this._selectionRenderModel = Js();
2380
+ this._selectionRenderModel = js();
2395
2381
  this._lastSelectionColumnMode = false;
2396
2382
  this._rowHasBlinkingCells = [];
2397
2383
  this._rowHasBlinkingCellsCount = 0;
2398
2384
  this._onRequestRedraw = this._register(new b());
2399
2385
  this.onRequestRedraw = this._onRequestRedraw.event;
2400
- this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add("xterm-rows"), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add("xterm-selection"), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = Zs(), this._updateDimensions(), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._themeService.onChangeColors((f) => this._injectCss(f))), this._injectCss(this._themeService.colors), this._rowFactory = h.createInstance(_t, document), this._element.classList.add("xterm-dom-renderer-owner-" + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this._register(this._linkifier2.onShowLinkUnderline((f) => this._handleLinkHover(f))), this._register(this._linkifier2.onHideLinkUnderline((f) => this._handleLinkLeave(f))), this._cursorBlinkStateManager = new ns(this._rowContainer, this._coreBrowserService), this._register(C(this._document, "mousedown", () => this._cursorBlinkStateManager.restartBlinkAnimation())), this._register(E(() => this._cursorBlinkStateManager.dispose())), this._textBlinkStateManager = this._register(new Wi(() => this._onRequestRedraw.fire({ start: 0, end: this._bufferService.rows - 1 }), this._coreBrowserService, this._optionsService)), this._register(E(() => {
2386
+ this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add("xterm-rows"), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add("xterm-selection"), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = Ys(), this._updateDimensions(), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._themeService.onChangeColors((f) => this._injectCss(f))), this._injectCss(this._themeService.colors), this._rowFactory = h.createInstance(_t, document), this._element.classList.add("xterm-dom-renderer-owner-" + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this._register(this._linkifier2.onShowLinkUnderline((f) => this._handleLinkHover(f))), this._register(this._linkifier2.onHideLinkUnderline((f) => this._handleLinkLeave(f))), this._cursorBlinkStateManager = new is(this._rowContainer, this._coreBrowserService), this._register(C(this._document, "mousedown", () => this._cursorBlinkStateManager.restartBlinkAnimation())), this._register(E(() => this._cursorBlinkStateManager.dispose())), this._textBlinkStateManager = this._register(new Hi(() => this._onRequestRedraw.fire({ start: 0, end: this._bufferService.rows - 1 }), this._coreBrowserService, this._optionsService)), this._register(E(() => {
2401
2387
  this._element.classList.remove("xterm-dom-renderer-owner-" + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
2402
- })), this._widthCache = new Hi(), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
2388
+ })), this._widthCache = new Fi(), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
2403
2389
  }
2404
2390
  _updateDimensions() {
2405
2391
  let e = this._coreBrowserService.dpr;
@@ -2541,8 +2527,8 @@ var Zn = 1, mt = class extends g {
2541
2527
  this._textBlinkStateManager.setNeedsBlinkInViewport(this._rowHasBlinkingCellsCount > 0);
2542
2528
  }
2543
2529
  };
2544
- mt = y([m(7, Qe), m(8, Be), m(9, R), m(10, D), m(11, Y), m(12, G), m(13, _e)], mt);
2545
- var ns = class {
2530
+ mt = y([m(7, Qe), m(8, Pe), m(9, R), m(10, D), m(11, Y), m(12, G), m(13, _e)], mt);
2531
+ var is = class {
2546
2532
  constructor(i, e) {
2547
2533
  this._rowContainer = i;
2548
2534
  this._coreBrowserService = e;
@@ -2582,9 +2568,9 @@ var bt = class extends g {
2582
2568
  this._onCharSizeChange = this._register(new b());
2583
2569
  this.onCharSizeChange = this._onCharSizeChange.event;
2584
2570
  try {
2585
- this._measureStrategy = this._register(new as(this._optionsService));
2571
+ this._measureStrategy = this._register(new ss(this._optionsService));
2586
2572
  } catch {
2587
- this._measureStrategy = this._register(new os(e, t, this._optionsService));
2573
+ this._measureStrategy = this._register(new rs(e, t, this._optionsService));
2588
2574
  }
2589
2575
  this._register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
2590
2576
  }
@@ -2597,7 +2583,7 @@ var bt = class extends g {
2597
2583
  }
2598
2584
  };
2599
2585
  bt = y([m(2, R)], bt);
2600
- var Ui = class extends g {
2586
+ var Wi = class extends g {
2601
2587
  constructor() {
2602
2588
  super(...arguments);
2603
2589
  this._result = { width: 0, height: 0 };
@@ -2605,7 +2591,7 @@ var Ui = class extends g {
2605
2591
  _validateAndSet(e, t) {
2606
2592
  e !== void 0 && e > 0 && t !== void 0 && t > 0 && (this._result.width = e, this._result.height = t);
2607
2593
  }
2608
- }, os = class extends Ui {
2594
+ }, rs = class extends Wi {
2609
2595
  constructor(e, t, r) {
2610
2596
  super();
2611
2597
  this._document = e;
@@ -2616,7 +2602,7 @@ var Ui = class extends g {
2616
2602
  measure() {
2617
2603
  return this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`, this._validateAndSet(Number(this._measureElement.offsetWidth) / 32, Number(this._measureElement.offsetHeight)), this._result;
2618
2604
  }
2619
- }, as = class extends Ui {
2605
+ }, ss = class extends Wi {
2620
2606
  constructor(e) {
2621
2607
  super();
2622
2608
  this._optionsService = e;
@@ -2630,7 +2616,7 @@ var Ui = class extends g {
2630
2616
  return this._validateAndSet(e.width, e.fontBoundingBoxAscent + e.fontBoundingBoxDescent), this._result;
2631
2617
  }
2632
2618
  };
2633
- var Ki = class extends g {
2619
+ var Ui = class extends g {
2634
2620
  constructor(e, t, r) {
2635
2621
  super();
2636
2622
  this._textarea = e;
@@ -2642,7 +2628,7 @@ var Ki = class extends g {
2642
2628
  this.onDprChange = this._onDprChange.event;
2643
2629
  this._onWindowChange = this._register(new b());
2644
2630
  this.onWindowChange = this._onWindowChange.event;
2645
- this._screenDprMonitor = this._register(new ls(this._window)), this._register(this.onWindowChange((s) => this._screenDprMonitor.setWindow(s))), this._register(j.forward(this._screenDprMonitor.onDprChange, this._onDprChange)), this._register(C(this._textarea, "focus", () => this._isFocused = true)), this._register(C(this._textarea, "blur", () => this._isFocused = false));
2631
+ this._screenDprMonitor = this._register(new ns(this._window)), this._register(this.onWindowChange((s) => this._screenDprMonitor.setWindow(s))), this._register(j.forward(this._screenDprMonitor.onDprChange, this._onDprChange)), this._register(C(this._textarea, "focus", () => this._isFocused = true)), this._register(C(this._textarea, "blur", () => this._isFocused = false));
2646
2632
  }
2647
2633
  get window() {
2648
2634
  return this._window;
@@ -2656,11 +2642,11 @@ var Ki = class extends g {
2656
2642
  get isFocused() {
2657
2643
  return this._cachedIsFocused === void 0 && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
2658
2644
  }
2659
- }, ls = class extends g {
2645
+ }, ns = class extends g {
2660
2646
  constructor(e) {
2661
2647
  super();
2662
2648
  this._parentWindow = e;
2663
- this._windowResizeListener = this._register(new P());
2649
+ this._windowResizeListener = this._register(new B());
2664
2650
  this._onDprChange = this._register(new b());
2665
2651
  this.onDprChange = this._onDprChange.event;
2666
2652
  this._outerListener = () => this._setDprAndFireIfDiffers(), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._updateDpr(), this._setWindowResizeListener(), this._register(E(() => this.clearListener()));
@@ -2681,7 +2667,7 @@ var Ki = class extends g {
2681
2667
  !this._resolutionMediaMatchList || !this._outerListener || (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
2682
2668
  }
2683
2669
  };
2684
- var zi = class extends g {
2670
+ var Ki = class extends g {
2685
2671
  constructor() {
2686
2672
  super();
2687
2673
  this.linkProviders = [];
@@ -2698,7 +2684,7 @@ function qt(n10, i, e) {
2698
2684
  let t = e.getBoundingClientRect(), r = n10.getComputedStyle(e), s = parseInt(r.getPropertyValue("padding-left"), 10), o = parseInt(r.getPropertyValue("padding-top"), 10);
2699
2685
  return [i.clientX - t.left - s, i.clientY - t.top - o];
2700
2686
  }
2701
- function Qs(n10, i, e, t, r, s, o, a, l) {
2687
+ function Zs(n10, i, e, t, r, s, o, a, l) {
2702
2688
  if (!s) return;
2703
2689
  let h = qt(n10, i, e);
2704
2690
  return h[0] = Math.ceil((h[0] + (l ? o / 2 : 0)) / o), h[1] = Math.ceil(h[1] / a), h[0] = Math.min(Math.max(h[0], 1), t + (l ? 1 : 0)), h[1] = Math.min(Math.max(h[1], 1), r), h;
@@ -2709,19 +2695,19 @@ var vt = class {
2709
2695
  this._renderService = e;
2710
2696
  }
2711
2697
  getCoords(i, e, t, r, s) {
2712
- return Qs(se(e), i, e, t, r, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, s);
2698
+ return Zs(se(e), i, e, t, r, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, s);
2713
2699
  }
2714
2700
  getMouseReportCoords(i, e) {
2715
2701
  let t = qt(se(e), i, e);
2716
2702
  if (this._charSizeService.hasValidSize) return t[0] = Math.min(Math.max(t[0], 0), this._renderService.dimensions.css.canvas.width - 1), t[1] = Math.min(Math.max(t[1], 0), this._renderService.dimensions.css.canvas.height - 1), { col: Math.floor(t[0] / this._renderService.dimensions.css.cell.width), row: Math.floor(t[1] / this._renderService.dimensions.css.cell.height), x: Math.floor(t[0]), y: Math.floor(t[1]) };
2717
2703
  }
2718
2704
  };
2719
- vt = y([m(0, Be), m(1, V)], vt);
2720
- var en = typeof window == "object" ? window : globalThis;
2705
+ vt = y([m(0, Pe), m(1, V)], vt);
2706
+ var Js = typeof window == "object" ? window : globalThis;
2721
2707
  function ce(n10, i = 0) {
2722
2708
  return n10[n10.length - (1 + i)];
2723
2709
  }
2724
- function Jn(n10, i, e) {
2710
+ function jn(n10, i, e) {
2725
2711
  let t = null, r = null;
2726
2712
  if (typeof e.value == "function" ? (t = "value", r = e.value, r.length !== 0 && console.warn("Memoize should only be used in functions with zero parameters")) : typeof e.get == "function" && (t = "get", r = e.get), !r || !t) throw new Error("not supported");
2727
2713
  let s = `$memoize$${i}`, o = e;
@@ -2735,7 +2721,7 @@ var St = class St2 {
2735
2721
  }
2736
2722
  };
2737
2723
  St.Undefined = new St(void 0);
2738
- var re = St, Gi = class {
2724
+ var re = St, zi = class {
2739
2725
  constructor() {
2740
2726
  this._first = re.Undefined;
2741
2727
  this._last = re.Undefined;
@@ -2774,10 +2760,10 @@ var K = class K2 extends g {
2774
2760
  constructor() {
2775
2761
  super();
2776
2762
  this._dispatched = false;
2777
- this._targets = new Gi();
2778
- this._ignoreTargets = new Gi();
2763
+ this._targets = new zi();
2764
+ this._ignoreTargets = new zi();
2779
2765
  this._activeTouches = {}, this._handle = null, this._lastSetTapCountTime = 0;
2780
- let e = en;
2766
+ let e = Js;
2781
2767
  this._register(C(e.document, "touchstart", (t) => this._handleTouchStart(t), { passive: false })), this._register(C(e.document, "touchend", (t) => this._handleTouchEnd(e, t))), this._register(C(e.document, "touchmove", (t) => this._handleTouchMove(t), { passive: false }));
2782
2768
  }
2783
2769
  static addTarget(e) {
@@ -2793,7 +2779,7 @@ var K = class K2 extends g {
2793
2779
  return E(t);
2794
2780
  }
2795
2781
  static isTouchDevice() {
2796
- return "ontouchstart" in en || navigator.maxTouchPoints > 0;
2782
+ return "ontouchstart" in Js || navigator.maxTouchPoints > 0;
2797
2783
  }
2798
2784
  dispose() {
2799
2785
  this._handle && (this._handle.dispose(), this._handle = null), super.dispose();
@@ -2875,8 +2861,8 @@ var K = class K2 extends g {
2875
2861
  this._dispatched && (e.preventDefault(), e.stopPropagation(), this._dispatched = false);
2876
2862
  }
2877
2863
  };
2878
- K._scrollFriction = -5e-3, K._holdDelay = 700, K._clearTapCountTime = 400, y([Jn], K, "isTouchDevice", 1);
2879
- var Vi = K;
2864
+ K._scrollFriction = -5e-3, K._holdDelay = 700, K._clearTapCountTime = 400, y([jn], K, "isTouchDevice", 1);
2865
+ var Gi = K;
2880
2866
  var gt = class {
2881
2867
  constructor(i, e, t, r, s, o, a, l, h) {
2882
2868
  this._renderService = i;
@@ -2893,14 +2879,14 @@ var gt = class {
2893
2879
  this._touchScrollAccumulator = 0;
2894
2880
  }
2895
2881
  bindMouse(i, e, t) {
2896
- let { element: r, document: s } = i, o = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, a = new P(), l = new P();
2882
+ let { element: r, document: s } = i, o = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, a = new B(), l = new B();
2897
2883
  e(a), e(l);
2898
2884
  let h = { target: i, focus: t, requestedEvents: o, mouseupListener: a, mousedragListener: l }, d = { mouseup: (c) => this._handleMouseUp(h, c), wheel: (c) => this._handleWheel(h, c), mousedrag: (c) => this._handleMouseDrag(h, c), mousemove: (c) => this._handleMouseMove(h, c) };
2899
- this._altMouseCursor = new cs(r, s, () => this._mouseStateService.areMouseEventsActive && !!this._optionsService.rawOptions.mouseEventsRequireAlt), e(this._altMouseCursor), e(this._mouseStateService.onProtocolChange((c) => {
2885
+ this._altMouseCursor = new os(r, s, () => this._mouseStateService.areMouseEventsActive && !!this._optionsService.rawOptions.mouseEventsRequireAlt), e(this._altMouseCursor), e(this._mouseStateService.onProtocolChange((c) => {
2900
2886
  this._handleProtocolChange(h, d, c);
2901
2887
  })), e(this._optionsService.onSpecificOptionChange("mouseEventsRequireAlt", () => {
2902
2888
  this._syncMouseModeState(r), this._altMouseCursor?.sync();
2903
- })), this._mouseStateService.activeProtocol = this._mouseStateService.activeProtocol, e(C(r, "mousedown", (c) => this._handleMouseDown(h, c))), e(C(r, "wheel", (c) => this._handlePassiveWheel(h, c), { passive: false })), e(Vi.addTarget(i.screenElement)), e(C(i.screenElement, he.START, () => this._handleTouchStart())), e(C(i.screenElement, he.CHANGE, (c) => this._handleTouchChange(h, c)));
2889
+ })), this._mouseStateService.activeProtocol = this._mouseStateService.activeProtocol, e(C(r, "mousedown", (c) => this._handleMouseDown(h, c))), e(C(r, "wheel", (c) => this._handlePassiveWheel(h, c), { passive: false })), e(Gi.addTarget(i.screenElement)), e(C(i.screenElement, he.START, () => this._handleTouchStart())), e(C(i.screenElement, he.CHANGE, (c) => this._handleTouchChange(h, c)));
2904
2890
  }
2905
2891
  _sendEvent(i, e) {
2906
2892
  let t = this._mouseCoordsService.getMouseReportCoords(e, i.target.screenElement);
@@ -3025,13 +3011,13 @@ var gt = class {
3025
3011
  return !(i.button !== e.button || i.action !== e.action || i.ctrl !== e.ctrl || i.alt !== e.alt || i.shift !== e.shift);
3026
3012
  }
3027
3013
  };
3028
- gt = y([m(0, V), m(1, Pe), m(2, Me), m(3, Y), m(4, D), m(5, R), m(6, Si), m(7, fe), m(8, G)], gt);
3029
- var cs = class {
3014
+ gt = y([m(0, V), m(1, Be), m(2, Me), m(3, Y), m(4, D), m(5, R), m(6, vi), m(7, fe), m(8, G)], gt);
3015
+ var os = class {
3030
3016
  constructor(i, e, t) {
3031
3017
  this._element = i;
3032
3018
  this._document = e;
3033
3019
  this._isActive = t;
3034
- this._listeners = new P();
3020
+ this._listeners = new B();
3035
3021
  }
3036
3022
  dispose() {
3037
3023
  this._listeners.dispose();
@@ -3055,7 +3041,7 @@ var cs = class {
3055
3041
  i ? this._element.classList.add("enable-mouse-events") : this._element.classList.remove("enable-mouse-events");
3056
3042
  }
3057
3043
  };
3058
- var $i = class {
3044
+ var Vi = class {
3059
3045
  constructor(i, e) {
3060
3046
  this._renderCallback = i;
3061
3047
  this._coreBrowserService = e;
@@ -3083,7 +3069,7 @@ var $i = class {
3083
3069
  this._refreshCallbacks = [];
3084
3070
  }
3085
3071
  };
3086
- var qi = class {
3072
+ var $i = class {
3087
3073
  constructor(i) {
3088
3074
  this._tasks = [];
3089
3075
  this._i = 0;
@@ -3114,7 +3100,7 @@ var qi = class {
3114
3100
  }
3115
3101
  this.clear();
3116
3102
  }
3117
- }, hs = class extends qi {
3103
+ }, as = class extends $i {
3118
3104
  _requestCallback(i) {
3119
3105
  return setTimeout(() => i(this._createDeadline(16)));
3120
3106
  }
@@ -3125,14 +3111,14 @@ var qi = class {
3125
3111
  let e = performance.now() + i;
3126
3112
  return { timeRemaining: () => Math.max(0, e - performance.now()) };
3127
3113
  }
3128
- }, ds = class extends qi {
3114
+ }, ls = class extends $i {
3129
3115
  _requestCallback(i) {
3130
3116
  return requestIdleCallback(i);
3131
3117
  }
3132
3118
  _cancelCallback(i) {
3133
3119
  cancelIdleCallback(i);
3134
3120
  }
3135
- }, It = "requestIdleCallback" in globalThis ? ds : hs, Xi = class {
3121
+ }, It = "requestIdleCallback" in globalThis ? ls : as, qi = class {
3136
3122
  constructor(i) {
3137
3123
  this._queue = new It(i);
3138
3124
  }
@@ -3155,8 +3141,8 @@ var Ct = class extends g {
3155
3141
  this._charSizeService = o;
3156
3142
  this._coreService = a;
3157
3143
  this._coreBrowserService = d;
3158
- this._renderer = this._register(new P());
3159
- this._observerDisposable = this._register(new P());
3144
+ this._renderer = this._register(new B());
3145
+ this._observerDisposable = this._register(new B());
3160
3146
  this._isPaused = false;
3161
3147
  this._needsFullRefresh = false;
3162
3148
  this._isNextRenderRedrawOnly = true;
@@ -3172,7 +3158,7 @@ var Ct = class extends g {
3172
3158
  this.onRender = this._onRender.event;
3173
3159
  this._onRefreshRequest = this._register(new b());
3174
3160
  this.onRefreshRequest = this._onRefreshRequest.event;
3175
- this._pausedResizeTask = this._register(new Xi(this._logService)), this._renderDebouncer = new $i((u, _) => this._renderRows(u, _), this._coreBrowserService), this._register(this._renderDebouncer), this._syncOutputHandler = new us(this._coreBrowserService, this._coreService, () => this._fullRefresh()), this._register(E(() => this._syncOutputHandler.dispose())), this._register(this._coreBrowserService.onDprChange(() => this.handleDevicePixelRatioChange())), this._register(h.onResize(() => this._fullRefresh())), this._register(h.buffers.onBufferActivate(() => this._renderer.value?.clear())), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this._register(l.onDecorationRegistered(() => this._fullRefresh())), this._register(l.onDecorationRemoved(() => this._fullRefresh())), this._register(this._optionsService.onMultipleOptionChange(["drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio", "rescaleOverlappingGlyphs"], () => {
3161
+ this._pausedResizeTask = this._register(new qi(this._logService)), this._renderDebouncer = new Vi((u, _) => this._renderRows(u, _), this._coreBrowserService), this._register(this._renderDebouncer), this._syncOutputHandler = new cs(this._coreBrowserService, this._coreService, () => this._fullRefresh()), this._register(E(() => this._syncOutputHandler.dispose())), this._register(this._coreBrowserService.onDprChange(() => this.handleDevicePixelRatioChange())), this._register(h.onResize(() => this._fullRefresh())), this._register(h.buffers.onBufferActivate(() => this._renderer.value?.clear())), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this._register(l.onDecorationRegistered(() => this._fullRefresh())), this._register(l.onDecorationRemoved(() => this._fullRefresh())), this._register(this._optionsService.onMultipleOptionChange(["drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio", "rescaleOverlappingGlyphs"], () => {
3176
3162
  this.clear(), this.handleResize(h.cols, h.rows), this._fullRefresh();
3177
3163
  })), this._register(this._optionsService.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(h.buffer.y, h.buffer.y, void 0, true))), this._register(c.onChangeColors(() => this._fullRefresh())), this._registerIntersectionObserver(this._coreBrowserService.window, t), this._register(this._coreBrowserService.onWindowChange((u) => this._registerIntersectionObserver(u, t)));
3178
3164
  }
@@ -3260,8 +3246,8 @@ var Ct = class extends g {
3260
3246
  this._renderer.value?.clear();
3261
3247
  }
3262
3248
  };
3263
- Ct = y([m(2, R), m(3, fe), m(4, Be), m(5, Y), m(6, ge), m(7, D), m(8, G), m(9, _e)], Ct);
3264
- var us = class {
3249
+ Ct = y([m(2, R), m(3, fe), m(4, Pe), m(5, Y), m(6, ge), m(7, D), m(8, G), m(9, _e)], Ct);
3250
+ var cs = class {
3265
3251
  constructor(i, e, t) {
3266
3252
  this._coreBrowserService = i;
3267
3253
  this._coreService = e;
@@ -3284,38 +3270,38 @@ var us = class {
3284
3270
  this._timeout !== void 0 && (this._coreBrowserService.window.clearTimeout(this._timeout), this._timeout = void 0);
3285
3271
  }
3286
3272
  };
3287
- function tn(n10, i, e, t) {
3273
+ function Qs(n10, i, e, t) {
3288
3274
  let r = e.buffer.x, s = e.buffer.y;
3289
- if (!e.buffer.hasScrollback) return ro(r, s, n10, i, e, t) + Yi(s, i, e, t) + so(r, s, n10, i, e, t);
3275
+ if (!e.buffer.hasScrollback) return to(r, s, n10, i, e, t) + Xi(s, i, e, t) + io(r, s, n10, i, e, t);
3290
3276
  let o;
3291
3277
  if (s === i) return o = r > n10 ? "D" : "C", Yt(Math.abs(r - n10), Xt(o, t));
3292
3278
  o = s > i ? "D" : "C";
3293
- let a = Math.abs(s - i), l = io(s > i ? n10 : r, e) + (a - 1) * e.cols + 1 + to(s > i ? r : n10);
3279
+ let a = Math.abs(s - i), l = eo(s > i ? n10 : r, e) + (a - 1) * e.cols + 1 + Qn(s > i ? r : n10);
3294
3280
  return Yt(l, Xt(o, t));
3295
3281
  }
3296
- function to(n10, i) {
3282
+ function Qn(n10, i) {
3297
3283
  return n10 - 1;
3298
3284
  }
3299
- function io(n10, i) {
3285
+ function eo(n10, i) {
3300
3286
  return i.cols - n10;
3301
3287
  }
3302
- function ro(n10, i, e, t, r, s) {
3303
- return Yi(i, t, r, s).length === 0 ? "" : Yt(sn(n10, i, n10, i - $e(i, r), false, r).length, Xt("D", s));
3288
+ function to(n10, i, e, t, r, s) {
3289
+ return Xi(i, t, r, s).length === 0 ? "" : Yt(tn(n10, i, n10, i - $e(i, r), false, r).length, Xt("D", s));
3304
3290
  }
3305
- function Yi(n10, i, e, t) {
3306
- let r = n10 - $e(n10, e), s = i - $e(i, e), o = Math.abs(r - s) - no(n10, i, e);
3307
- return Yt(o, Xt(rn(n10, i), t));
3291
+ function Xi(n10, i, e, t) {
3292
+ let r = n10 - $e(n10, e), s = i - $e(i, e), o = Math.abs(r - s) - ro(n10, i, e);
3293
+ return Yt(o, Xt(en(n10, i), t));
3308
3294
  }
3309
- function so(n10, i, e, t, r, s) {
3295
+ function io(n10, i, e, t, r, s) {
3310
3296
  let o;
3311
- Yi(i, t, r, s).length > 0 ? o = t - $e(t, r) : o = i;
3312
- let a = t, l = oo(n10, i, e, t, r, s);
3313
- return Yt(sn(n10, o, e, a, l === "C", r).length, Xt(l, s));
3297
+ Xi(i, t, r, s).length > 0 ? o = t - $e(t, r) : o = i;
3298
+ let a = t, l = so(n10, i, e, t, r, s);
3299
+ return Yt(tn(n10, o, e, a, l === "C", r).length, Xt(l, s));
3314
3300
  }
3315
- function no(n10, i, e) {
3301
+ function ro(n10, i, e) {
3316
3302
  let t = 0, r = n10 - $e(n10, e), s = i - $e(i, e);
3317
3303
  for (let o = 0; o < Math.abs(r - s); o++) {
3318
- let a = rn(n10, i) === "A" ? -1 : 1;
3304
+ let a = en(n10, i) === "A" ? -1 : 1;
3319
3305
  e.buffer.lines.get(r + a * o)?.isWrapped && t++;
3320
3306
  }
3321
3307
  return t;
@@ -3325,14 +3311,14 @@ function $e(n10, i) {
3325
3311
  for (; r && n10 >= 0 && n10 < i.rows; ) e++, t = i.buffer.lines.get(--n10), r = t?.isWrapped;
3326
3312
  return e;
3327
3313
  }
3328
- function oo(n10, i, e, t, r, s) {
3314
+ function so(n10, i, e, t, r, s) {
3329
3315
  let o;
3330
- return Yi(i, t, r, s).length > 0 ? o = t - $e(t, r) : o = i, n10 < e && o <= t || n10 >= e && o < t ? "C" : "D";
3316
+ return Xi(i, t, r, s).length > 0 ? o = t - $e(t, r) : o = i, n10 < e && o <= t || n10 >= e && o < t ? "C" : "D";
3331
3317
  }
3332
- function rn(n10, i) {
3318
+ function en(n10, i) {
3333
3319
  return n10 > i ? "A" : "B";
3334
3320
  }
3335
- function sn(n10, i, e, t, r, s) {
3321
+ function tn(n10, i, e, t, r, s) {
3336
3322
  let o = n10, a = i, l = "";
3337
3323
  for (; (o !== e || a !== t) && a >= 0 && a < s.buffer.lines.length; ) o += r ? 1 : -1, r && o > s.cols - 1 ? (l += s.buffer.translateBufferLineToString(a, false, n10, o), o = 0, n10 = 0, a++) : !r && o < 0 && (l += s.buffer.translateBufferLineToString(a, false, 0, n10 + 1), o = s.cols - 1, n10 = o, a--);
3338
3324
  return l + s.buffer.translateBufferLineToString(a, false, n10, o);
@@ -3347,7 +3333,7 @@ function Yt(n10, i) {
3347
3333
  for (let t = 0; t < n10; t++) e += i;
3348
3334
  return e;
3349
3335
  }
3350
- var ji = class {
3336
+ var Yi = class {
3351
3337
  constructor(i) {
3352
3338
  this._bufferService = i;
3353
3339
  this.isSelectAllActive = false;
@@ -3381,11 +3367,11 @@ var ji = class {
3381
3367
  return this.selectionStart && (this.selectionStart[1] -= i), this.selectionEnd && (this.selectionEnd[1] -= i), this.selectionEnd && this.selectionEnd[1] < 0 ? (this.clearSelection(), true) : this.selectionStart && this.selectionStart[1] < 0 ? (this.selectionStart = [0, 0], true) : false;
3382
3368
  }
3383
3369
  };
3384
- function fs(n10, i) {
3370
+ function hs(n10, i) {
3385
3371
  if (n10.start.y > n10.end.y) throw new Error(`Buffer range end (${n10.end.x}, ${n10.end.y}) cannot be before start (${n10.start.x}, ${n10.start.y})`);
3386
3372
  return i * (n10.end.y - n10.start.y) + (n10.end.x - n10.start.x + 1);
3387
3373
  }
3388
- var ao = " ", lo = new RegExp(ao, "g");
3374
+ var no = " ", oo = new RegExp(no, "g");
3389
3375
  var Et = class extends g {
3390
3376
  constructor(e, t, r, s, o, a, l, h, d, c) {
3391
3377
  super();
@@ -3401,7 +3387,7 @@ var Et = class extends g {
3401
3387
  this._coreBrowserService = c;
3402
3388
  this._dragScrollAmount = 0;
3403
3389
  this._enabled = true;
3404
- this._trimListener = this._register(new P());
3390
+ this._trimListener = this._register(new B());
3405
3391
  this._workCell = new F();
3406
3392
  this._mouseDownTimeStamp = 0;
3407
3393
  this._oldHasSelection = false;
@@ -3417,7 +3403,7 @@ var Et = class extends g {
3417
3403
  this.onRequestScrollLines = this._onRequestScrollLines.event;
3418
3404
  this._mouseMoveListener = (u) => this._handleMouseMove(u), this._mouseUpListener = (u) => this._handleMouseUp(u), this._coreService.onUserInput(() => {
3419
3405
  this.hasSelection && this.clearSelection();
3420
- }), this._trimListener.value = this._bufferService.buffer.lines.onTrim((u) => this._handleTrim(u)), this._register(this._bufferService.buffers.onBufferActivate((u) => this._handleBufferActivate(u))), this.enable(), this._model = new ji(this._bufferService), this._activeSelectionMode = 0, this._register(E(() => {
3406
+ }), this._trimListener.value = this._bufferService.buffer.lines.onTrim((u) => this._handleTrim(u)), this._register(this._bufferService.buffers.onBufferActivate((u) => this._handleBufferActivate(u))), this.enable(), this._model = new Yi(this._bufferService), this._activeSelectionMode = 0, this._register(E(() => {
3421
3407
  this._removeMouseDownListeners();
3422
3408
  })), this._register(this._bufferService.onResize((u) => {
3423
3409
  u.rowsChanged && this.clearSelection();
@@ -3465,7 +3451,7 @@ var Et = class extends g {
3465
3451
  l && l.isWrapped ? s[s.length - 1] += h : s.push(h);
3466
3452
  }
3467
3453
  }
3468
- return s.map((a) => a.replace(lo, " ")).join(Ue ? `\r
3454
+ return s.map((a) => a.replace(oo, " ")).join(Ue ? `\r
3469
3455
  ` : `
3470
3456
  `);
3471
3457
  }
@@ -3491,7 +3477,7 @@ var Et = class extends g {
3491
3477
  }
3492
3478
  _selectWordAtCursor(e, t) {
3493
3479
  let r = this._linkifier.currentLink?.link?.range;
3494
- if (r) return this._model.selectionStart = [r.start.x - 1, r.start.y - 1], this._model.selectionStartLength = fs(r, this._bufferService.cols), this._model.selectionEnd = void 0, true;
3480
+ if (r) return this._model.selectionStart = [r.start.x - 1, r.start.y - 1], this._model.selectionStartLength = hs(r, this._bufferService.cols), this._model.selectionEnd = void 0, true;
3495
3481
  let s = this._getMouseBufferCoords(e);
3496
3482
  return s ? (this._selectWordAt(s, t), this._model.selectionEnd = void 0, true) : false;
3497
3483
  }
@@ -3578,7 +3564,7 @@ var Et = class extends g {
3578
3564
  if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
3579
3565
  let r = this._mouseCoordsService.getCoords(e, this._element, this._bufferService.cols, this._bufferService.rows, false);
3580
3566
  if (r && r[0] !== void 0 && r[1] !== void 0) {
3581
- let s = tn(r[0] - 1, r[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
3567
+ let s = Qs(r[0] - 1, r[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
3582
3568
  this._coreService.triggerDataEvent(s, true);
3583
3569
  }
3584
3570
  }
@@ -3679,10 +3665,10 @@ var Et = class extends g {
3679
3665
  }
3680
3666
  _selectLineAt(e) {
3681
3667
  let t = this._bufferService.buffer.getWrappedRangeForLine(e), r = { start: { x: 0, y: t.first }, end: { x: this._bufferService.cols - 1, y: t.last } };
3682
- this._model.selectionStart = [0, t.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = fs(r, this._bufferService.cols);
3668
+ this._model.selectionStart = [0, t.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = hs(r, this._bufferService.cols);
3683
3669
  }
3684
3670
  };
3685
- Et = y([m(3, D), m(4, Y), m(5, Pe), m(6, R), m(7, Me), m(8, V), m(9, G)], Et);
3671
+ Et = y([m(3, D), m(4, Y), m(5, Be), m(6, R), m(7, Me), m(8, V), m(9, G)], Et);
3686
3672
  var jt = class {
3687
3673
  constructor() {
3688
3674
  this._data = {};
@@ -3719,7 +3705,7 @@ var Zt = class {
3719
3705
  }
3720
3706
  };
3721
3707
  var $ = Object.freeze((() => {
3722
- let n10 = [B.toColor("#2e3436"), B.toColor("#cc0000"), B.toColor("#4e9a06"), B.toColor("#c4a000"), B.toColor("#3465a4"), B.toColor("#75507b"), B.toColor("#06989a"), B.toColor("#d3d7cf"), B.toColor("#555753"), B.toColor("#ef2929"), B.toColor("#8ae234"), B.toColor("#fce94f"), B.toColor("#729fcf"), B.toColor("#ad7fa8"), B.toColor("#34e2e2"), B.toColor("#eeeeec")], i = [0, 95, 135, 175, 215, 255];
3708
+ let n10 = [P.toColor("#2e3436"), P.toColor("#cc0000"), P.toColor("#4e9a06"), P.toColor("#c4a000"), P.toColor("#3465a4"), P.toColor("#75507b"), P.toColor("#06989a"), P.toColor("#d3d7cf"), P.toColor("#555753"), P.toColor("#ef2929"), P.toColor("#8ae234"), P.toColor("#fce94f"), P.toColor("#729fcf"), P.toColor("#ad7fa8"), P.toColor("#34e2e2"), P.toColor("#eeeeec")], i = [0, 95, 135, 175, 215, 255];
3723
3709
  for (let e = 0; e < 216; e++) {
3724
3710
  let t = i[e / 36 % 6 | 0], r = i[e / 6 % 6 | 0], s = i[e % 6];
3725
3711
  n10.push({ css: O.toCss(t, r, s), rgba: O.toRgba(t, r, s) });
@@ -3730,7 +3716,7 @@ var $ = Object.freeze((() => {
3730
3716
  }
3731
3717
  return n10;
3732
3718
  })());
3733
- var qe = B.toColor("#ffffff"), Qt = B.toColor("#000000"), nn = B.toColor("#ffffff"), on = Qt, Jt = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 }, co = qe, yt = class extends g {
3719
+ var qe = P.toColor("#ffffff"), Qt = P.toColor("#000000"), rn = P.toColor("#ffffff"), sn = Qt, Jt = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 }, ao = qe, yt = class extends g {
3734
3720
  constructor(e) {
3735
3721
  super();
3736
3722
  this._optionsService = e;
@@ -3738,14 +3724,14 @@ var qe = B.toColor("#ffffff"), Qt = B.toColor("#000000"), nn = B.toColor("#fffff
3738
3724
  this._halfContrastCache = new Zt();
3739
3725
  this._onChangeColors = this._register(new b());
3740
3726
  this.onChangeColors = this._onChangeColors.event;
3741
- this._colors = { foreground: qe, background: Qt, cursor: nn, cursorAccent: on, selectionForeground: void 0, selectionBackgroundTransparent: Jt, selectionBackgroundOpaque: k.blend(Qt, Jt), selectionInactiveBackgroundTransparent: Jt, selectionInactiveBackgroundOpaque: k.blend(Qt, Jt), scrollbarSliderBackground: k.opacity(qe, 0.2), scrollbarSliderHoverBackground: k.opacity(qe, 0.4), scrollbarSliderActiveBackground: k.opacity(qe, 0.5), overviewRulerBorder: qe, ansi: $.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this._register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
3727
+ this._colors = { foreground: qe, background: Qt, cursor: rn, cursorAccent: sn, selectionForeground: void 0, selectionBackgroundTransparent: Jt, selectionBackgroundOpaque: k.blend(Qt, Jt), selectionInactiveBackgroundTransparent: Jt, selectionInactiveBackgroundOpaque: k.blend(Qt, Jt), scrollbarSliderBackground: k.opacity(qe, 0.2), scrollbarSliderHoverBackground: k.opacity(qe, 0.4), scrollbarSliderActiveBackground: k.opacity(qe, 0.5), overviewRulerBorder: qe, ansi: $.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this._register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
3742
3728
  }
3743
3729
  get colors() {
3744
3730
  return this._colors;
3745
3731
  }
3746
3732
  _setTheme(e = {}) {
3747
3733
  let t = this._colors;
3748
- if (t.foreground = M(e.foreground, qe), t.background = M(e.background, Qt), t.cursor = k.blend(t.background, M(e.cursor, nn)), t.cursorAccent = k.blend(t.background, M(e.cursorAccent, on)), t.selectionBackgroundTransparent = M(e.selectionBackground, Jt), t.selectionBackgroundOpaque = k.blend(t.background, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundTransparent = M(e.selectionInactiveBackground, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundOpaque = k.blend(t.background, t.selectionInactiveBackgroundTransparent), t.selectionForeground = e.selectionForeground ? M(e.selectionForeground, ts) : void 0, t.selectionForeground === ts && (t.selectionForeground = void 0), k.isOpaque(t.selectionBackgroundTransparent) && (t.selectionBackgroundTransparent = k.opacity(t.selectionBackgroundTransparent, 0.3)), k.isOpaque(t.selectionInactiveBackgroundTransparent) && (t.selectionInactiveBackgroundTransparent = k.opacity(t.selectionInactiveBackgroundTransparent, 0.3)), t.scrollbarSliderBackground = M(e.scrollbarSliderBackground, k.opacity(t.foreground, 0.2)), t.scrollbarSliderHoverBackground = M(e.scrollbarSliderHoverBackground, k.opacity(t.foreground, 0.4)), t.scrollbarSliderActiveBackground = M(e.scrollbarSliderActiveBackground, k.opacity(t.foreground, 0.5)), t.overviewRulerBorder = M(e.overviewRulerBorder, co), t.ansi = $.slice(), t.ansi[0] = M(e.black, $[0]), t.ansi[1] = M(e.red, $[1]), t.ansi[2] = M(e.green, $[2]), t.ansi[3] = M(e.yellow, $[3]), t.ansi[4] = M(e.blue, $[4]), t.ansi[5] = M(e.magenta, $[5]), t.ansi[6] = M(e.cyan, $[6]), t.ansi[7] = M(e.white, $[7]), t.ansi[8] = M(e.brightBlack, $[8]), t.ansi[9] = M(e.brightRed, $[9]), t.ansi[10] = M(e.brightGreen, $[10]), t.ansi[11] = M(e.brightYellow, $[11]), t.ansi[12] = M(e.brightBlue, $[12]), t.ansi[13] = M(e.brightMagenta, $[13]), t.ansi[14] = M(e.brightCyan, $[14]), t.ansi[15] = M(e.brightWhite, $[15]), e.extendedAnsi) {
3734
+ if (t.foreground = M(e.foreground, qe), t.background = M(e.background, Qt), t.cursor = k.blend(t.background, M(e.cursor, rn)), t.cursorAccent = k.blend(t.background, M(e.cursorAccent, sn)), t.selectionBackgroundTransparent = M(e.selectionBackground, Jt), t.selectionBackgroundOpaque = k.blend(t.background, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundTransparent = M(e.selectionInactiveBackground, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundOpaque = k.blend(t.background, t.selectionInactiveBackgroundTransparent), t.selectionForeground = e.selectionForeground ? M(e.selectionForeground, Jr) : void 0, t.selectionForeground === Jr && (t.selectionForeground = void 0), k.isOpaque(t.selectionBackgroundTransparent) && (t.selectionBackgroundTransparent = k.opacity(t.selectionBackgroundTransparent, 0.3)), k.isOpaque(t.selectionInactiveBackgroundTransparent) && (t.selectionInactiveBackgroundTransparent = k.opacity(t.selectionInactiveBackgroundTransparent, 0.3)), t.scrollbarSliderBackground = M(e.scrollbarSliderBackground, k.opacity(t.foreground, 0.2)), t.scrollbarSliderHoverBackground = M(e.scrollbarSliderHoverBackground, k.opacity(t.foreground, 0.4)), t.scrollbarSliderActiveBackground = M(e.scrollbarSliderActiveBackground, k.opacity(t.foreground, 0.5)), t.overviewRulerBorder = M(e.overviewRulerBorder, ao), t.ansi = $.slice(), t.ansi[0] = M(e.black, $[0]), t.ansi[1] = M(e.red, $[1]), t.ansi[2] = M(e.green, $[2]), t.ansi[3] = M(e.yellow, $[3]), t.ansi[4] = M(e.blue, $[4]), t.ansi[5] = M(e.magenta, $[5]), t.ansi[6] = M(e.cyan, $[6]), t.ansi[7] = M(e.white, $[7]), t.ansi[8] = M(e.brightBlack, $[8]), t.ansi[9] = M(e.brightRed, $[9]), t.ansi[10] = M(e.brightGreen, $[10]), t.ansi[11] = M(e.brightYellow, $[11]), t.ansi[12] = M(e.brightBlue, $[12]), t.ansi[13] = M(e.brightMagenta, $[13]), t.ansi[14] = M(e.brightCyan, $[14]), t.ansi[15] = M(e.brightWhite, $[15]), e.extendedAnsi) {
3749
3735
  let r = Math.min(t.ansi.length - 16, e.extendedAnsi.length);
3750
3736
  for (let s = 0; s < r; s++) t.ansi[s + 16] = M(e.extendedAnsi[s], $[s + 16]);
3751
3737
  }
@@ -3783,13 +3769,13 @@ var qe = B.toColor("#ffffff"), Qt = B.toColor("#000000"), nn = B.toColor("#fffff
3783
3769
  yt = y([m(0, R)], yt);
3784
3770
  function M(n10, i) {
3785
3771
  if (n10 !== void 0) try {
3786
- return B.toColor(n10);
3772
+ return P.toColor(n10);
3787
3773
  } catch {
3788
3774
  }
3789
3775
  return i;
3790
3776
  }
3791
- var ho = { 48: ["0", ")"], 49: ["1", "!"], 50: ["2", "@"], 51: ["3", "#"], 52: ["4", "$"], 53: ["5", "%"], 54: ["6", "^"], 55: ["7", "&"], 56: ["8", "*"], 57: ["9", "("], 186: [";", ":"], 187: ["=", "+"], 188: [",", "<"], 189: ["-", "_"], 190: [".", ">"], 191: ["/", "?"], 192: ["`", "~"], 219: ["[", "{"], 220: ["\\", "|"], 221: ["]", "}"], 222: ["'", '"'] };
3792
- function ln(n10, i, e, t) {
3777
+ var lo = { 48: ["0", ")"], 49: ["1", "!"], 50: ["2", "@"], 51: ["3", "#"], 52: ["4", "$"], 53: ["5", "%"], 54: ["6", "^"], 55: ["7", "&"], 56: ["8", "*"], 57: ["9", "("], 186: [";", ":"], 187: ["=", "+"], 188: [",", "<"], 189: ["-", "_"], 190: [".", ">"], 191: ["/", "?"], 192: ["`", "~"], 219: ["[", "{"], 220: ["\\", "|"], 221: ["]", "}"], 222: ["'", '"'] };
3778
+ function on(n10, i, e, t) {
3793
3779
  let r = { type: 0, cancel: false, key: void 0 }, s = (n10.shiftKey ? 1 : 0) | (n10.altKey ? 2 : 0) | (n10.ctrlKey ? 4 : 0) | (n10.metaKey ? 8 : 0);
3794
3780
  switch (n10.keyCode) {
3795
3781
  case 0:
@@ -3884,7 +3870,7 @@ function ln(n10, i, e, t) {
3884
3870
  default:
3885
3871
  if (n10.ctrlKey && !n10.shiftKey && !n10.altKey && !n10.metaKey) n10.keyCode >= 65 && n10.keyCode <= 90 ? r.key = String.fromCharCode(n10.keyCode - 64) : n10.keyCode === 32 ? r.key = "\0" : n10.keyCode >= 51 && n10.keyCode <= 55 ? r.key = String.fromCharCode(n10.keyCode - 51 + 27) : n10.keyCode === 56 ? r.key = "" : n10.key === "/" ? r.key = "" : n10.keyCode === 219 ? r.key = "\x1B" : n10.keyCode === 220 ? r.key = "" : n10.keyCode === 221 && (r.key = "");
3886
3872
  else if ((!e || t) && n10.altKey && !n10.metaKey) {
3887
- let a = ho[n10.keyCode]?.[n10.shiftKey ? 1 : 0];
3873
+ let a = lo[n10.keyCode]?.[n10.shiftKey ? 1 : 0];
3888
3874
  if (a) r.key = "\x1B" + a;
3889
3875
  else if (n10.keyCode >= 65 && n10.keyCode <= 90) {
3890
3876
  let l = n10.ctrlKey ? n10.keyCode - 64 : n10.keyCode + 32, h = String.fromCharCode(l);
@@ -4040,7 +4026,7 @@ var ei = class {
4040
4026
  return i > 0;
4041
4027
  }
4042
4028
  };
4043
- var Zi = class {
4029
+ var ji = class {
4044
4030
  constructor() {
4045
4031
  this._codeToVk = { KeyA: 65, KeyB: 66, KeyC: 67, KeyD: 68, KeyE: 69, KeyF: 70, KeyG: 71, KeyH: 72, KeyI: 73, KeyJ: 74, KeyK: 75, KeyL: 76, KeyM: 77, KeyN: 78, KeyO: 79, KeyP: 80, KeyQ: 81, KeyR: 82, KeyS: 83, KeyT: 84, KeyU: 85, KeyV: 86, KeyW: 87, KeyX: 88, KeyY: 89, KeyZ: 90, Digit0: 48, Digit1: 49, Digit2: 50, Digit3: 51, Digit4: 52, Digit5: 53, Digit6: 54, Digit7: 55, Digit8: 56, Digit9: 57, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, F13: 124, F14: 125, F15: 126, F16: 127, F17: 128, F18: 129, F19: 130, F20: 131, F21: 132, F22: 133, F23: 134, F24: 135, Numpad0: 96, Numpad1: 97, Numpad2: 98, Numpad3: 99, Numpad4: 100, Numpad5: 101, Numpad6: 102, Numpad7: 103, Numpad8: 104, Numpad9: 105, NumpadMultiply: 106, NumpadAdd: 107, NumpadSeparator: 108, NumpadSubtract: 109, NumpadDecimal: 110, NumpadDivide: 111, NumpadEnter: 13, NumLock: 144, ArrowUp: 38, ArrowDown: 40, ArrowLeft: 37, ArrowRight: 39, Home: 36, End: 35, PageUp: 33, PageDown: 34, Insert: 45, Delete: 46, ShiftLeft: 16, ShiftRight: 16, ControlLeft: 17, ControlRight: 17, AltLeft: 18, AltRight: 18, MetaLeft: 91, MetaRight: 92, CapsLock: 20, ScrollLock: 145, Escape: 27, Enter: 13, Tab: 9, Space: 32, Backspace: 8, Pause: 19, ContextMenu: 93, PrintScreen: 44, Semicolon: 186, Equal: 187, Comma: 188, Minus: 189, Period: 190, Slash: 191, Backquote: 192, BracketLeft: 219, Backslash: 220, BracketRight: 221, Quote: 222, IntlBackslash: 226 };
4046
4032
  this._codeToScancode = { KeyQ: 16, KeyW: 17, KeyE: 18, KeyR: 19, KeyT: 20, KeyY: 21, KeyU: 22, KeyI: 23, KeyO: 24, KeyP: 25, KeyA: 30, KeyS: 31, KeyD: 32, KeyF: 33, KeyG: 34, KeyH: 35, KeyJ: 36, KeyK: 37, KeyL: 38, KeyZ: 44, KeyX: 45, KeyC: 46, KeyV: 47, KeyB: 48, KeyN: 49, KeyM: 50, Digit1: 2, Digit2: 3, Digit3: 4, Digit4: 5, Digit5: 6, Digit6: 7, Digit7: 8, Digit8: 9, Digit9: 10, Digit0: 11, F1: 59, F2: 60, F3: 61, F4: 62, F5: 63, F6: 64, F7: 65, F8: 66, F9: 67, F10: 68, F11: 87, F12: 88, Numpad0: 82, Numpad1: 79, Numpad2: 80, Numpad3: 81, Numpad4: 75, Numpad5: 76, Numpad6: 77, Numpad7: 71, Numpad8: 72, Numpad9: 73, NumpadMultiply: 55, NumpadAdd: 78, NumpadSubtract: 74, NumpadDecimal: 83, NumpadDivide: 53, NumpadEnter: 28, NumLock: 69, ArrowUp: 72, ArrowDown: 80, ArrowLeft: 75, ArrowRight: 77, Home: 71, End: 79, PageUp: 73, PageDown: 81, Insert: 82, Delete: 83, ShiftLeft: 42, ShiftRight: 54, ControlLeft: 29, ControlRight: 29, AltLeft: 56, AltRight: 56, CapsLock: 58, ScrollLock: 70, Escape: 1, Enter: 28, Tab: 15, Space: 57, Backspace: 14, Pause: 69, Semicolon: 39, Equal: 13, Comma: 51, Minus: 12, Period: 52, Slash: 53, Backquote: 41, BracketLeft: 26, Backslash: 43, BracketRight: 27, Quote: 40 };
@@ -4086,7 +4072,7 @@ var xt = class {
4086
4072
  this._optionsService = e;
4087
4073
  }
4088
4074
  _getWin32InputMode() {
4089
- return this._win32InputMode ??= new Zi(), this._win32InputMode;
4075
+ return this._win32InputMode ??= new ji(), this._win32InputMode;
4090
4076
  }
4091
4077
  _getKittyKeyboard() {
4092
4078
  return this._kittyKeyboard ??= new ei(), this._kittyKeyboard;
@@ -4094,7 +4080,7 @@ var xt = class {
4094
4080
  evaluateKeyDown(i) {
4095
4081
  if (this.useWin32InputMode) return this._getWin32InputMode().evaluateKeyboardEvent(i, true);
4096
4082
  let e = this._coreService.kittyKeyboard.flags;
4097
- return this.useKitty ? this._getKittyKeyboard().evaluate(i, e, i.repeat ? 2 : 1, ie && this._optionsService.rawOptions.macOptionIsMeta) : ln(i, this._coreService.decPrivateModes.applicationCursorKeys, ie, this._optionsService.rawOptions.macOptionIsMeta);
4083
+ return this.useKitty ? this._getKittyKeyboard().evaluate(i, e, i.repeat ? 2 : 1, ie && this._optionsService.rawOptions.macOptionIsMeta) : on(i, this._coreService.decPrivateModes.applicationCursorKeys, ie, this._optionsService.rawOptions.macOptionIsMeta);
4098
4084
  }
4099
4085
  evaluateKeyUp(i) {
4100
4086
  if (this.useWin32InputMode) return this._getWin32InputMode().evaluateKeyboardEvent(i, false);
@@ -4110,7 +4096,7 @@ var xt = class {
4110
4096
  }
4111
4097
  };
4112
4098
  xt = y([m(0, Y), m(1, R)], xt);
4113
- var ps = class {
4099
+ var us = class {
4114
4100
  constructor(...i) {
4115
4101
  this._entries = /* @__PURE__ */ new Map();
4116
4102
  for (let [e, t] of i) this.set(e, t);
@@ -4128,9 +4114,9 @@ var ps = class {
4128
4114
  get(i) {
4129
4115
  return this._entries.get(i);
4130
4116
  }
4131
- }, Ji = class {
4117
+ }, Zi = class {
4132
4118
  constructor() {
4133
- this._services = new ps();
4119
+ this._services = new us();
4134
4120
  this._services.set(Qe, this);
4135
4121
  }
4136
4122
  setService(i, e) {
@@ -4140,7 +4126,7 @@ var ps = class {
4140
4126
  return this._services.get(i);
4141
4127
  }
4142
4128
  createInstance(i, ...e) {
4143
- let t = Hs(i).sort((o, a) => o.index - a.index), r = [];
4129
+ let t = Fs(i).sort((o, a) => o.index - a.index), r = [];
4144
4130
  for (let o of t) {
4145
4131
  let a = this._services.get(o.id);
4146
4132
  if (!a) throw new Error(`[createInstance] ${i.name} depends on UNKNOWN service ${o.id._id}.`);
@@ -4151,7 +4137,7 @@ var ps = class {
4151
4137
  return new i(...e, ...r);
4152
4138
  }
4153
4139
  };
4154
- var uo = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, off: 5 }, fo = "xterm.js: ", wt = class extends g {
4140
+ var co = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, off: 5 }, ho = "xterm.js: ", wt = class extends g {
4155
4141
  constructor(e) {
4156
4142
  super();
4157
4143
  this._optionsService = e;
@@ -4162,13 +4148,13 @@ var uo = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, off: 5 }, fo = "xterm
4162
4148
  return this._logLevel;
4163
4149
  }
4164
4150
  _updateLogLevel() {
4165
- this._logLevel = uo[this._optionsService.rawOptions.logLevel];
4151
+ this._logLevel = co[this._optionsService.rawOptions.logLevel];
4166
4152
  }
4167
4153
  _evalLazyOptionalParams(e) {
4168
4154
  for (let t = 0; t < e.length; t++) typeof e[t] == "function" && (e[t] = e[t]());
4169
4155
  }
4170
4156
  _log(e, t, r) {
4171
- this._evalLazyOptionalParams(r), e.call(console, (this._optionsService.options.logger ? "" : fo) + t, ...r);
4157
+ this._evalLazyOptionalParams(r), e.call(console, (this._optionsService.options.logger ? "" : ho) + t, ...r);
4172
4158
  }
4173
4159
  trace(e, ...t) {
4174
4160
  this._logLevel <= 0 && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, t);
@@ -4264,61 +4250,25 @@ var ti = class extends g {
4264
4250
  return (this._startIndex + e) % this._maxLength;
4265
4251
  }
4266
4252
  };
4267
- var ii = class {
4268
- constructor() {
4269
- this._chunks = [];
4270
- this._length = 0;
4271
- }
4272
- get length() {
4273
- return this._length;
4274
- }
4275
- reset() {
4276
- this._chunks.length = 0, this._length = 0;
4277
- }
4278
- append(i) {
4279
- this._chunks.push(i), this._length += i.length;
4280
- }
4281
- toString() {
4282
- return this._chunks.join("");
4283
- }
4284
- }, We = class {
4285
- constructor(i) {
4286
- this._limit = i;
4287
- this._builder = new ii();
4288
- }
4289
- get length() {
4290
- return this._builder.length;
4291
- }
4292
- get limit() {
4293
- return this._limit;
4294
- }
4295
- reset() {
4296
- this._builder.reset();
4297
- }
4298
- append(i) {
4299
- return this._builder.append(i), this._builder.length > this._limit ? (this._builder.reset(), true) : false;
4300
- }
4301
- toString() {
4302
- return this._builder.toString();
4303
- }
4304
- };
4305
- var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class n7 {
4306
- constructor(i, e, t, r = false) {
4307
- this._stringCache = i;
4308
- this.isWrapped = r;
4253
+ var U = Object.freeze(new ue()), Ji = 0, ln = new F(), fs = U.extended.clone(), De = class n7 {
4254
+ constructor(i, e, t = false) {
4255
+ this.isWrapped = t;
4309
4256
  this._combined = {};
4310
4257
  this._extendedAttrs = {};
4311
- this._data = new Uint32Array(e * 3);
4312
- let s = t ?? F.fromCharData([0, "", 1, 0]);
4313
- for (let o = 0; o < e; ++o) this.setCell(o, s);
4314
- this.length = e;
4258
+ this._cacheValid = false;
4259
+ this._cache = "";
4260
+ this._cacheTrimmed = false;
4261
+ this._data = new Uint32Array(i * 3);
4262
+ let r = e ?? F.fromCharData([0, "", 1, 0]);
4263
+ for (let s = 0; s < i; ++s) this.setCell(s, r);
4264
+ this.length = i;
4315
4265
  }
4316
4266
  get(i) {
4317
4267
  let e = this._data[i * 3 + 0], t = e & 2097151;
4318
4268
  return [this._data[i * 3 + 1], e & 2097152 ? this._combined[i] : t ? be(t) : "", e >> 22, e & 2097152 ? this._combined[i].charCodeAt(this._combined[i].length - 1) : t];
4319
4269
  }
4320
4270
  set(i, e) {
4321
- this._invalidateStringCache(), this._data[i * 3 + 1] = e[0], e[1].length > 1 ? (this._combined[i] = e[1], this._data[i * 3 + 0] = i | 2097152 | e[2] << 22) : this._data[i * 3 + 0] = e[1].charCodeAt(0) | e[2] << 22;
4271
+ this._cacheValid = false, this._data[i * 3 + 1] = e[0], e[1].length > 1 ? (this._combined[i] = e[1], this._data[i * 3 + 0] = i | 2097152 | e[2] << 22) : this._data[i * 3 + 0] = e[1].charCodeAt(0) | e[2] << 22;
4322
4272
  }
4323
4273
  getWidth(i) {
4324
4274
  return this._data[i * 3 + 0] >> 22;
@@ -4350,42 +4300,44 @@ var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class
4350
4300
  return this._data[i * 3 + 2] & 536870912;
4351
4301
  }
4352
4302
  loadCell(i, e) {
4353
- return Qi = i * 3, e.content = this._data[Qi + 0], e.fg = this._data[Qi + 1], e.bg = this._data[Qi + 2], e.content & 2097152 ? e.combinedData = this._combined[i] : e.combinedData = "", e.bg & 268435456 ? e.extended = this._extendedAttrs[i] : e.extended = U.extended.clone(), e;
4303
+ return Ji = i * 3, e.content = this._data[Ji + 0], e.fg = this._data[Ji + 1], e.bg = this._data[Ji + 2], e.content & 2097152 ? e.combinedData = this._combined[i] : e.combinedData = "", e.bg & 268435456 ? e.extended = this._extendedAttrs[i] : (fs._ext = 0, fs._urlId = 0, e.extended = fs), e;
4354
4304
  }
4355
4305
  setCell(i, e) {
4356
- this._invalidateStringCache(), e.content & 2097152 && (this._combined[i] = e.combinedData), e.bg & 268435456 && (this._extendedAttrs[i] = e.extended), this._data[i * 3 + 0] = e.content, this._data[i * 3 + 1] = e.fg, this._data[i * 3 + 2] = e.bg;
4306
+ this._cacheValid = false, e.content & 2097152 && (this._combined[i] = e.combinedData), e.bg & 268435456 && (this._extendedAttrs[i] = e.extended), this._data[i * 3 + 0] = e.content, this._data[i * 3 + 1] = e.fg, this._data[i * 3 + 2] = e.bg;
4357
4307
  }
4358
4308
  setCellFromCodepoint(i, e, t, r) {
4359
- this._invalidateStringCache(), r.bg & 268435456 && (this._extendedAttrs[i] = r.extended), this._data[i * 3 + 0] = e | t << 22, this._data[i * 3 + 1] = r.fg, this._data[i * 3 + 2] = r.bg;
4309
+ this._cacheValid = false, r.bg & 268435456 && (this._extendedAttrs[i] = r.extended);
4310
+ let s = i * 3;
4311
+ this._data[s + 0] = e | t << 22, this._data[s + 1] = r.fg, this._data[s + 2] = r.bg;
4360
4312
  }
4361
4313
  addCodepointToCell(i, e, t) {
4362
- this._invalidateStringCache();
4314
+ this._cacheValid = false;
4363
4315
  let r = this._data[i * 3 + 0];
4364
4316
  r & 2097152 ? this._combined[i] += be(e) : r & 2097151 ? (this._combined[i] = be(r & 2097151) + be(e), r &= -2097152, r |= 2097152) : r = e | 1 << 22, t && (r &= -12582913, r |= t << 22), this._data[i * 3 + 0] = r;
4365
4317
  }
4366
4318
  insertCells(i, e, t) {
4367
- if (this._invalidateStringCache(), i %= this.length, i && this.getWidth(i - 1) === 2 && this.setCellFromCodepoint(i - 1, 0, 1, t), e < this.length - i) {
4368
- for (let r = this.length - i - e - 1; r >= 0; --r) this.setCell(i + e + r, this.loadCell(i + r, hn));
4319
+ if (this._cacheValid = false, i %= this.length, i && this.getWidth(i - 1) === 2 && this.setCellFromCodepoint(i - 1, 0, 1, t), e < this.length - i) {
4320
+ for (let r = this.length - i - e - 1; r >= 0; --r) this.setCell(i + e + r, this.loadCell(i + r, ln));
4369
4321
  for (let r = 0; r < e; ++r) this.setCell(i + r, t);
4370
4322
  } else for (let r = i; r < this.length; ++r) this.setCell(r, t);
4371
4323
  this.getWidth(this.length - 1) === 2 && this.setCellFromCodepoint(this.length - 1, 0, 1, t);
4372
4324
  }
4373
4325
  deleteCells(i, e, t) {
4374
- if (this._invalidateStringCache(), i %= this.length, e < this.length - i) {
4375
- for (let r = 0; r < this.length - i - e; ++r) this.setCell(i + r, this.loadCell(i + e + r, hn));
4326
+ if (this._cacheValid = false, i %= this.length, e < this.length - i) {
4327
+ for (let r = 0; r < this.length - i - e; ++r) this.setCell(i + r, this.loadCell(i + e + r, ln));
4376
4328
  for (let r = this.length - e; r < this.length; ++r) this.setCell(r, t);
4377
4329
  } else for (let r = i; r < this.length; ++r) this.setCell(r, t);
4378
4330
  i && this.getWidth(i - 1) === 2 && this.setCellFromCodepoint(i - 1, 0, 1, t), this.getWidth(i) === 0 && !this.hasContent(i) && this.setCellFromCodepoint(i, 0, 1, t);
4379
4331
  }
4380
4332
  replaceCells(i, e, t, r = false) {
4381
- if (this._invalidateStringCache(), r) {
4333
+ if (this._cacheValid = false, r) {
4382
4334
  for (i && this.getWidth(i - 1) === 2 && !this.isProtected(i - 1) && this.setCellFromCodepoint(i - 1, 0, 1, t), e < this.length && this.getWidth(e - 1) === 2 && !this.isProtected(e) && this.setCellFromCodepoint(e, 0, 1, t); i < e && i < this.length; ) this.isProtected(i) || this.setCell(i, t), i++;
4383
4335
  return;
4384
4336
  }
4385
4337
  for (i && this.getWidth(i - 1) === 2 && this.setCellFromCodepoint(i - 1, 0, 1, t), e < this.length && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e, 0, 1, t); i < e && i < this.length; ) this.setCell(i++, t);
4386
4338
  }
4387
4339
  resize(i, e) {
4388
- if (this._invalidateStringCache(), i === this.length) return this._data.length * 4 * 2 < this._data.buffer.byteLength;
4340
+ if (this._cacheValid = false, i === this.length) return this._data.length * 4 * 2 < this._data.buffer.byteLength;
4389
4341
  let t = i * 3;
4390
4342
  if (i > this.length) {
4391
4343
  if (this._data.buffer.byteLength >= t * 4) this._data = new Uint32Array(this._data.buffer, 0, t);
@@ -4417,19 +4369,19 @@ var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class
4417
4369
  return 0;
4418
4370
  }
4419
4371
  fill(i, e = false) {
4420
- if (this._invalidateStringCache(), e) {
4372
+ if (this._cacheValid = false, e) {
4421
4373
  for (let t = 0; t < this.length; ++t) this.isProtected(t) || this.setCell(t, i);
4422
4374
  return;
4423
4375
  }
4424
4376
  this._combined = {}, this._extendedAttrs = {};
4425
4377
  for (let t = 0; t < this.length; ++t) this.setCell(t, i);
4426
4378
  }
4427
- copyFrom(i) {
4428
- this._invalidateStringCache(), this.length !== i.length ? this._data = new Uint32Array(i._data) : this._data.set(i._data), this.length = i.length, this._copySparseMapsFrom(i), this.isWrapped = i.isWrapped;
4379
+ copyFrom(i, e) {
4380
+ this.length !== i.length ? this._data = new Uint32Array(i._data) : this._data.set(i._data), this.length = i.length, e ? (this._combined = {}, this._extendedAttrs = {}) : this._copySparseMapsFrom(i), this._cache = "", this._cacheValid = false, this.isWrapped = i.isWrapped;
4429
4381
  }
4430
- clone() {
4431
- let i = new n7(this._stringCache, 0, void 0, false);
4432
- return i._data = new Uint32Array(this._data), i.length = this.length, i._copySparseMapsFrom(this), i.isWrapped = this.isWrapped, i;
4382
+ clone(i) {
4383
+ let e = new n7(0, void 0, false);
4384
+ return e._data = new Uint32Array(this._data), e.length = this.length, i || e._copySparseMapsFrom(this), e.isWrapped = this.isWrapped, e;
4433
4385
  }
4434
4386
  getTrimmedLength() {
4435
4387
  for (let i = this.length - 1; i >= 0; --i) if (this._data[i * 3 + 0] & 4194303) return i + (this._data[i * 3 + 0] >> 22);
@@ -4440,7 +4392,7 @@ var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class
4440
4392
  return 0;
4441
4393
  }
4442
4394
  copyCellsFrom(i, e, t, r, s) {
4443
- this._invalidateStringCache();
4395
+ this._cacheValid = false;
4444
4396
  let o = i._data;
4445
4397
  if (s) for (let a = r - 1; a >= 0; a--) {
4446
4398
  for (let l = 0; l < 3; l++) this._data[(t + a) * 3 + l] = o[(e + a) * 3 + l];
@@ -4453,35 +4405,20 @@ var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class
4453
4405
  }
4454
4406
  translateToString(i, e, t, r) {
4455
4407
  let s = (e === void 0 || e === 0) && t === void 0 && r === void 0;
4456
- s && this._stringCache.touch?.();
4457
- let o = s ? this._getStringCacheEntry(false) : void 0;
4458
- if (s && o?.value !== void 0) {
4459
- if (i) return o.isTrimmed ? o.value : o.value.trimEnd();
4460
- if (!o.isTrimmed) return o.value;
4408
+ if (s && this._cacheValid) {
4409
+ if (i) return this._cacheTrimmed ? this._cache : this._cache.trimEnd();
4410
+ if (!this._cacheTrimmed) return this._cache;
4461
4411
  }
4462
- for (e = e ?? 0, t = t ?? this.length, i && (t = Math.min(t, this.getTrimmedLength())), r && (r.length = 0), er.reset(); e < t; ) {
4412
+ e = e ?? 0, t = t ?? this.length, i && (t = Math.min(t, this.getTrimmedLength())), r && (r.length = 0);
4413
+ let o = [];
4414
+ for (; e < t; ) {
4463
4415
  let l = this._data[e * 3 + 0], h = l & 2097151, d = l & 2097152 ? this._combined[e] : h ? be(h) : " ";
4464
- if (er.append(d), r) for (let c = 0; c < d.length; ++c) r.push(e);
4416
+ if (o.push(d), r) for (let c = 0; c < d.length; ++c) r.push(e);
4465
4417
  e += l >> 22 || 1;
4466
4418
  }
4467
4419
  r && r.push(e);
4468
- let a = er.toString();
4469
- if (er.reset(), s) {
4470
- let l = this._getStringCacheEntry(true);
4471
- l.value = a, l.isTrimmed = !!i;
4472
- }
4473
- return a;
4474
- }
4475
- _getStringCacheEntry(i) {
4476
- let e = this._stringCacheEntryRef?.deref();
4477
- if (e && e.generation === this._stringCache.generation) return e;
4478
- if (!i) return;
4479
- let t = this._stringCache.allocateEntry();
4480
- return this._stringCacheEntryRef = new WeakRef(t), t;
4481
- }
4482
- _invalidateStringCache() {
4483
- let i = this._getStringCacheEntry(false);
4484
- i && (i.value = void 0, i.isTrimmed = false);
4420
+ let a = o.join("");
4421
+ return s && (this._cache = a, this._cacheValid = true, this._cacheTrimmed = !!i), a;
4485
4422
  }
4486
4423
  _copyCellMapsFrom(i, e, t) {
4487
4424
  let r = e * 3;
@@ -4492,42 +4429,7 @@ var U = Object.freeze(new ue()), Qi = 0, hn = new F(), er = new ii(), De = class
4492
4429
  for (let e = 0; e < i.length; e++) this._copyCellMapsFrom(i, e, e);
4493
4430
  }
4494
4431
  };
4495
- var tr = class extends g {
4496
- constructor() {
4497
- super();
4498
- this.generation = 0;
4499
- this.entries = /* @__PURE__ */ new Set();
4500
- this._clearTimeout = this._register(new P());
4501
- this._lastAccessTimestamp = 0;
4502
- this._register(E(() => this.entries.clear()));
4503
- }
4504
- touch() {
4505
- this._scheduleClear();
4506
- }
4507
- allocateEntry() {
4508
- let e = { value: void 0, isTrimmed: false, generation: this.generation };
4509
- return this.entries.add(e), this._scheduleClear(), e;
4510
- }
4511
- clear() {
4512
- this._clearTimeout.clear(), this._lastAccessTimestamp = 0, this.generation++;
4513
- for (let e of this.entries) e.value = void 0, e.isTrimmed = false;
4514
- this.entries.clear();
4515
- }
4516
- _scheduleClear() {
4517
- this._lastAccessTimestamp = Date.now(), !this._clearTimeout.value && this._scheduleClearTimeout(15e3);
4518
- }
4519
- _scheduleClearTimeout(e) {
4520
- this._clearTimeout.value = Gs(() => {
4521
- let t = Date.now() - this._lastAccessTimestamp;
4522
- if (t >= 15e3) {
4523
- this.clear();
4524
- return;
4525
- }
4526
- this._scheduleClearTimeout(15e3 - t);
4527
- }, e);
4528
- }
4529
- };
4530
- function dn(n10, i, e, t, r, s) {
4432
+ function cn(n10, i, e, t, r, s) {
4531
4433
  let o = [];
4532
4434
  for (let a = 0; a < n10.length - 1; a++) {
4533
4435
  let l = a, h = n10.get(++l);
@@ -4550,7 +4452,7 @@ function dn(n10, i, e, t, r, s) {
4550
4452
  }
4551
4453
  return o;
4552
4454
  }
4553
- function un(n10, i) {
4455
+ function hn(n10, i) {
4554
4456
  let e = [], t = 0, r = i[t], s = 0;
4555
4457
  for (let o = 0; o < n10.length; o++) if (r === o) {
4556
4458
  let a = i[++t];
@@ -4558,13 +4460,13 @@ function un(n10, i) {
4558
4460
  } else e.push(o);
4559
4461
  return { layout: e, countRemoved: s };
4560
4462
  }
4561
- function fn(n10, i) {
4463
+ function dn(n10, i) {
4562
4464
  let e = [];
4563
4465
  for (let t = 0; t < i.length; t++) e.push(n10.get(i[t]));
4564
4466
  for (let t = 0; t < e.length; t++) n10.set(t, e[t]);
4565
4467
  n10.length = i.length;
4566
4468
  }
4567
- function _n(n10, i, e) {
4469
+ function un(n10, i, e) {
4568
4470
  let t = [], r = 0;
4569
4471
  for (let l = 0; l < n10.length; l++) r += Tt(n10, l, i);
4570
4472
  let s = 0, o = 0, a = 0;
@@ -4588,12 +4490,12 @@ function Tt(n10, i, e) {
4588
4490
  let t = !n10[i].hasContent(e - 1) && n10[i].getWidth(e - 1) === 1, r = n10[i + 1].getWidth(0) === 2;
4589
4491
  return t && r ? e - 1 : e;
4590
4492
  }
4591
- var rr = class rr2 {
4493
+ var er = class er2 {
4592
4494
  constructor(i) {
4593
4495
  this.line = i;
4594
4496
  this.isDisposed = false;
4595
4497
  this._disposables = [];
4596
- this._id = rr2._nextId++;
4498
+ this._id = er2._nextId++;
4597
4499
  this._onDispose = this.register(new b());
4598
4500
  this.onDispose = this._onDispose.event;
4599
4501
  }
@@ -4607,8 +4509,8 @@ var rr = class rr2 {
4607
4509
  return this._disposables.push(i), i;
4608
4510
  }
4609
4511
  };
4610
- rr._nextId = 1;
4611
- var ir = rr;
4512
+ er._nextId = 1;
4513
+ var Qi = er;
4612
4514
  var q = {}, Re = q.B;
4613
4515
  q[0] = { "`": "◆", 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: "≥", "{": "π", "|": "≠", "}": "£", "~": "·" };
4614
4516
  q.A = { "#": "£" };
@@ -4623,7 +4525,7 @@ q.E = q[6] = { "@": "Ä", "[": "Æ", "\\": "Ø", "]": "Å", "^": "Ü", "`": "ä"
4623
4525
  q.Z = { "#": "£", "@": "§", "[": "¡", "\\": "Ñ", "]": "¿", "{": "°", "|": "ñ", "}": "ç" };
4624
4526
  q.H = q[7] = { "@": "É", "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" };
4625
4527
  q["="] = { "#": "ù", "@": "à", "[": "é", "\\": "ç", "]": "ê", "^": "î", _: "è", "`": "ô", "{": "ä", "|": "ö", "}": "ü", "~": "û" };
4626
- var pn = 4294967295, si = class extends g {
4528
+ var fn = 4294967295, ri = class extends g {
4627
4529
  constructor(e, t, r, s) {
4628
4530
  super();
4629
4531
  this._hasScrollback = e;
@@ -4648,7 +4550,7 @@ var pn = 4294967295, si = class extends g {
4648
4550
  this._whitespaceCell = F.fromCharData([0, " ", 1, 32]);
4649
4551
  this._isClearing = false;
4650
4552
  this._memoryCleanupPosition = 0;
4651
- this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new ti(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops(), this._memoryCleanupQueue = new It(this._logService), this._register(E(() => this._memoryCleanupQueue.clear())), this._register(E(() => this.clearAllMarkers())), this._stringCache = this._register(new tr());
4553
+ this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new ti(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops(), this._memoryCleanupQueue = new It(this._logService), this._register(E(() => this._memoryCleanupQueue.clear())), this._register(E(() => this.clearAllMarkers()));
4652
4554
  }
4653
4555
  getNullCell(e) {
4654
4556
  return e ? (this._nullCell.fg = e.fg, this._nullCell.bg = e.bg, this._nullCell.extended = e.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new ke()), this._nullCell;
@@ -4657,7 +4559,7 @@ var pn = 4294967295, si = class extends g {
4657
4559
  return e ? (this._whitespaceCell.fg = e.fg, this._whitespaceCell.bg = e.bg, this._whitespaceCell.extended = e.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new ke()), this._whitespaceCell;
4658
4560
  }
4659
4561
  getBlankLine(e, t) {
4660
- return new De(this._stringCache, this._bufferService.cols, this.getNullCell(e), t);
4562
+ return new De(this._bufferService.cols, this.getNullCell(e), t);
4661
4563
  }
4662
4564
  get hasScrollback() {
4663
4565
  return this._hasScrollback && this.lines.maxLength > this._rows;
@@ -4669,7 +4571,7 @@ var pn = 4294967295, si = class extends g {
4669
4571
  _getCorrectBufferLength(e) {
4670
4572
  if (!this._hasScrollback) return e;
4671
4573
  let t = e + this._optionsService.rawOptions.scrollback;
4672
- return t > pn ? pn : t;
4574
+ return t > fn ? fn : t;
4673
4575
  }
4674
4576
  fillViewportRows(e) {
4675
4577
  if (this.lines.length === 0) {
@@ -4679,16 +4581,14 @@ var pn = 4294967295, si = class extends g {
4679
4581
  }
4680
4582
  }
4681
4583
  clear() {
4682
- this._stringCache.clear(), this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new ti(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
4584
+ this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new ti(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
4683
4585
  }
4684
4586
  resize(e, t) {
4685
- let r = this.getNullCell(U);
4686
- this._stringCache.clear();
4687
- let s = 0, o = this._getCorrectBufferLength(t);
4587
+ let r = this.getNullCell(U), s = 0, o = this._getCorrectBufferLength(t);
4688
4588
  if (o > this.lines.maxLength && (this.lines.maxLength = o), this.lines.length > 0) {
4689
4589
  if (this._cols < e) for (let l = 0; l < this.lines.length; l++) s += +this.lines.get(l).resize(e, r);
4690
4590
  let a = 0;
4691
- if (this._rows < t) for (let l = this._rows; l < t; l++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new De(this._stringCache, e, r, false)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + a + 1 ? (this.ybase--, a++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new De(this._stringCache, e, r, false)));
4591
+ if (this._rows < t) for (let l = this._rows; l < t; l++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new De(e, r, false)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + a + 1 ? (this.ybase--, a++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new De(e, r, false)));
4692
4592
  else for (let l = this._rows; l > t; l--) this.lines.length > t + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
4693
4593
  if (o < this.lines.maxLength) {
4694
4594
  let l = this.lines.length - o;
@@ -4718,15 +4618,15 @@ var pn = 4294967295, si = class extends g {
4718
4618
  this._cols !== e && (e > this._cols ? this._reflowLarger(e, t) : this._reflowSmaller(e, t));
4719
4619
  }
4720
4620
  _reflowLarger(e, t) {
4721
- let r = this._optionsService.rawOptions.reflowCursorLine, s = dn(this.lines, this._cols, e, this.ybase + this.y, this.getNullCell(U), r);
4621
+ let r = this._optionsService.rawOptions.reflowCursorLine, s = cn(this.lines, this._cols, e, this.ybase + this.y, this.getNullCell(U), r);
4722
4622
  if (s.length > 0) {
4723
- let o = un(this.lines, s);
4724
- fn(this.lines, o.layout), this._reflowLargerAdjustViewport(e, t, o.countRemoved);
4623
+ let o = hn(this.lines, s);
4624
+ dn(this.lines, o.layout), this._reflowLargerAdjustViewport(e, t, o.countRemoved);
4725
4625
  }
4726
4626
  }
4727
4627
  _reflowLargerAdjustViewport(e, t, r) {
4728
4628
  let s = this.getNullCell(U), o = r;
4729
- for (; o-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < t && this.lines.push(new De(this._stringCache, e, s, false))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
4629
+ for (; o-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < t && this.lines.push(new De(e, s, false))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
4730
4630
  this.savedY = Math.max(this.savedY - r, 0);
4731
4631
  }
4732
4632
  _reflowSmaller(e, t) {
@@ -4740,7 +4640,7 @@ var pn = 4294967295, si = class extends g {
4740
4640
  let T = this.ybase + this.y;
4741
4641
  if (T >= l && T < l + d.length) continue;
4742
4642
  }
4743
- let c = d[d.length - 1].getTrimmedLength(), u = _n(d, this._cols, e), _ = u.length - d.length, p;
4643
+ let c = d[d.length - 1].getTrimmedLength(), u = un(d, this._cols, e), _ = u.length - d.length, p;
4744
4644
  this.ybase === 0 && this.y !== this.lines.length - 1 ? p = Math.max(0, this.y - this.lines.maxLength + _) : p = Math.max(0, this.lines.length - this.lines.maxLength + _);
4745
4645
  let v = [];
4746
4646
  for (let T = 0; T < _; T++) {
@@ -4813,7 +4713,7 @@ var pn = 4294967295, si = class extends g {
4813
4713
  this.markers.length = 0, this._isClearing = false;
4814
4714
  }
4815
4715
  addMarker(e) {
4816
- let t = new ir(e);
4716
+ let t = new Qi(e);
4817
4717
  return this.markers.push(t), t.register(this.lines.onTrim((r) => {
4818
4718
  t.line -= r, t.line < 0 && t.dispose();
4819
4719
  })), t.register(this.lines.onInsert((r) => {
@@ -4826,20 +4726,20 @@ var pn = 4294967295, si = class extends g {
4826
4726
  this._isClearing || this.markers.splice(this.markers.indexOf(e), 1);
4827
4727
  }
4828
4728
  };
4829
- var sr = class extends g {
4729
+ var tr = class extends g {
4830
4730
  constructor(e, t, r) {
4831
4731
  super();
4832
4732
  this._optionsService = e;
4833
4733
  this._bufferService = t;
4834
4734
  this._logService = r;
4835
- this._normalBuffer = this._register(new P());
4836
- this._altBuffer = this._register(new P());
4735
+ this._normalBuffer = this._register(new B());
4736
+ this._altBuffer = this._register(new B());
4837
4737
  this._onBufferActivate = this._register(new b());
4838
4738
  this.onBufferActivate = this._onBufferActivate.event;
4839
4739
  this.reset(), this._register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this._register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
4840
4740
  }
4841
4741
  reset() {
4842
- this._normal = new si(true, this._optionsService, this._bufferService, this._logService), this._normalBuffer.value = this._normal, this._normal.fillViewportRows(), this._alt = new si(false, this._optionsService, this._bufferService, this._logService), this._altBuffer.value = this._alt, this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
4742
+ this._normal = new ri(true, this._optionsService, this._bufferService, this._logService), this._normalBuffer.value = this._normal, this._normal.fillViewportRows(), this._alt = new ri(false, this._optionsService, this._bufferService, this._logService), this._altBuffer.value = this._alt, this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
4843
4743
  }
4844
4744
  get alt() {
4845
4745
  return this._alt;
@@ -4871,7 +4771,7 @@ var Dt = class extends g {
4871
4771
  this.onResize = this._onResize.event;
4872
4772
  this._onScroll = this._register(new b());
4873
4773
  this.onScroll = this._onScroll.event;
4874
- this.cols = Math.max(e.rawOptions.cols || 0, 2), this.rows = Math.max(e.rawOptions.rows || 0, 1), this.buffers = this._register(new sr(e, this, t)), this._register(this.buffers.onBufferActivate((r) => {
4774
+ this.cols = Math.max(e.rawOptions.cols || 0, 2), this.rows = Math.max(e.rawOptions.rows || 0, 1), this.buffers = this._register(new tr(e, this, t)), this._register(this.buffers.onBufferActivate((r) => {
4875
4775
  this._onScroll.fire(r.activeBuffer.ydisp);
4876
4776
  }));
4877
4777
  }
@@ -4891,10 +4791,10 @@ var Dt = class extends g {
4891
4791
  let o = r.ybase + r.scrollTop, a = r.ybase + r.scrollBottom;
4892
4792
  if (r.scrollTop === 0) {
4893
4793
  let l = r.lines.isFull;
4894
- a === r.lines.length - 1 ? l ? r.lines.recycle().copyFrom(s) : r.lines.push(s.clone()) : r.lines.splice(a + 1, 0, s.clone()), l ? this.isUserScrolling && (r.ydisp = Math.max(r.ydisp - 1, 0)) : (r.ybase++, this.isUserScrolling || r.ydisp++);
4794
+ a === r.lines.length - 1 ? l ? r.lines.recycle().copyFrom(s, true) : r.lines.push(s.clone(true)) : r.lines.splice(a + 1, 0, s.clone(true)), l ? this.isUserScrolling && (r.ydisp = Math.max(r.ydisp - 1, 0)) : (r.ybase++, this.isUserScrolling || r.ydisp++);
4895
4795
  } else {
4896
4796
  let l = a - o + 1;
4897
- r.lines.shiftElements(o + 1, l - 1, -1), r.lines.set(a, s.clone());
4797
+ r.lines.shiftElements(o + 1, l - 1, -1), r.lines.set(a, s.clone(true));
4898
4798
  }
4899
4799
  this.isUserScrolling || (r.ydisp = r.ybase), this._onScroll.fire(r.ydisp);
4900
4800
  }
@@ -4909,7 +4809,7 @@ var Dt = class extends g {
4909
4809
  }
4910
4810
  };
4911
4811
  Dt = y([m(0, R), m(1, fe)], Dt);
4912
- var Rt = { cols: 80, rows: 24, showCursorImmediately: false, cursorBlink: false, blinkIntervalDuration: 0, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", drawBoldTextInBrightColors: true, documentOverride: null, fastScrollSensitivity: 5, fontFamily: "monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollbar: { showScrollbar: true }, scrollOnEraseInDisplay: false, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, mouseEventsRequireAlt: false, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, reflowCursorLine: false, rescaleOverlappingGlyphs: false, rightClickSelectsWord: ie, windowOptions: {}, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", quirks: {}, vtExtensions: {} }, po = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"], nr = class extends g {
4812
+ var Rt = { cols: 80, rows: 24, showCursorImmediately: false, cursorBlink: false, blinkIntervalDuration: 0, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", drawBoldTextInBrightColors: true, documentOverride: null, fastScrollSensitivity: 5, fontFamily: "monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollbar: { showScrollbar: true }, scrollOnEraseInDisplay: false, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, mouseEventsRequireAlt: false, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, reflowCursorLine: false, rescaleOverlappingGlyphs: false, rightClickSelectsWord: ie, windowOptions: {}, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", quirks: {}, vtExtensions: {} }, fo = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"], ir = class extends g {
4913
4813
  constructor(e) {
4914
4814
  super();
4915
4815
  this._onOptionChange = this._register(new b());
@@ -4951,7 +4851,7 @@ var Rt = { cols: 80, rows: 24, showCursorImmediately: false, cursorBlink: false,
4951
4851
  _sanitizeAndValidateOption(e, t) {
4952
4852
  switch (e) {
4953
4853
  case "cursorStyle":
4954
- if (t || (t = Rt[e]), !mo(t)) throw new Error(`"${t}" is not a valid value for ${e}`);
4854
+ if (t || (t = Rt[e]), !_o(t)) throw new Error(`"${t}" is not a valid value for ${e}`);
4955
4855
  break;
4956
4856
  case "wordSeparator":
4957
4857
  t || (t = Rt[e]);
@@ -4959,7 +4859,7 @@ var Rt = { cols: 80, rows: 24, showCursorImmediately: false, cursorBlink: false,
4959
4859
  case "fontWeight":
4960
4860
  case "fontWeightBold":
4961
4861
  if (typeof t == "number" && 1 <= t && t <= 1e3) break;
4962
- t = po.includes(t) ? t : Rt[e];
4862
+ t = fo.includes(t) ? t : Rt[e];
4963
4863
  break;
4964
4864
  case "blinkIntervalDuration":
4965
4865
  if (t = Math.floor(t), t < 0) throw new Error(`${e} cannot be less than 0, value: ${t}`);
@@ -4991,10 +4891,10 @@ var Rt = { cols: 80, rows: 24, showCursorImmediately: false, cursorBlink: false,
4991
4891
  return t;
4992
4892
  }
4993
4893
  };
4994
- function mo(n10) {
4894
+ function _o(n10) {
4995
4895
  return n10 === "block" || n10 === "underline" || n10 === "bar";
4996
4896
  }
4997
- var mn = Object.freeze({ insertMode: false }), bn = Object.freeze({ applicationCursorKeys: false, applicationKeypad: false, bracketedPasteMode: false, colorSchemeUpdates: false, cursorBlink: void 0, cursorStyle: void 0, origin: false, reverseWraparound: false, sendFocus: false, synchronizedOutput: false, win32InputMode: false, wraparound: true }), vn = () => ({ flags: 0, mainFlags: 0, altFlags: 0, mainStack: [], altStack: [] }), Lt = class extends g {
4897
+ var _n = Object.freeze({ insertMode: false }), pn = Object.freeze({ applicationCursorKeys: false, applicationKeypad: false, bracketedPasteMode: false, colorSchemeUpdates: false, cursorBlink: void 0, cursorStyle: void 0, origin: false, reverseWraparound: false, sendFocus: false, synchronizedOutput: false, win32InputMode: false, wraparound: true }), mn = () => ({ flags: 0, mainFlags: 0, altFlags: 0, mainStack: [], altStack: [] }), Lt = class extends g {
4998
4898
  constructor(e, t, r) {
4999
4899
  super();
5000
4900
  this._bufferService = e;
@@ -5009,10 +4909,10 @@ var mn = Object.freeze({ insertMode: false }), bn = Object.freeze({ applicationC
5009
4909
  this.onBinary = this._onBinary.event;
5010
4910
  this._onRequestScrollToBottom = this._register(new b());
5011
4911
  this.onRequestScrollToBottom = this._onRequestScrollToBottom.event;
5012
- this.isCursorInitialized = r.rawOptions.showCursorImmediately ?? false, this.modes = structuredClone(mn), this.decPrivateModes = structuredClone(bn), this.kittyKeyboard = vn();
4912
+ this.isCursorInitialized = r.rawOptions.showCursorImmediately ?? false, this.modes = structuredClone(_n), this.decPrivateModes = structuredClone(pn), this.kittyKeyboard = mn();
5013
4913
  }
5014
4914
  reset() {
5015
- this.modes = structuredClone(mn), this.decPrivateModes = structuredClone(bn), this.kittyKeyboard = vn();
4915
+ this.modes = structuredClone(_n), this.decPrivateModes = structuredClone(pn), this.kittyKeyboard = mn();
5016
4916
  }
5017
4917
  triggerDataEvent(e, t = false) {
5018
4918
  if (this._optionsService.rawOptions.disableStdin) return;
@@ -5024,21 +4924,21 @@ var mn = Object.freeze({ insertMode: false }), bn = Object.freeze({ applicationC
5024
4924
  }
5025
4925
  };
5026
4926
  Lt = y([m(0, D), m(1, fe), m(2, R)], Lt);
5027
- var Sn = { NONE: { events: 0, restrict: () => false }, X10: { events: 1, restrict: (n10) => n10.button === 4 || n10.action !== 1 ? false : (n10.ctrl = false, n10.alt = false, n10.shift = false, true) }, VT200: { events: 19, restrict: (n10) => n10.action !== 32 }, DRAG: { events: 23, restrict: (n10) => !(n10.action === 32 && n10.button === 3) }, ANY: { events: 31, restrict: (n10) => true } };
5028
- function vs(n10, i) {
4927
+ var bn = { NONE: { events: 0, restrict: () => false }, X10: { events: 1, restrict: (n10) => n10.button === 4 || n10.action !== 1 ? false : (n10.ctrl = false, n10.alt = false, n10.shift = false, true) }, VT200: { events: 19, restrict: (n10) => n10.action !== 32 }, DRAG: { events: 23, restrict: (n10) => !(n10.action === 32 && n10.button === 3) }, ANY: { events: 31, restrict: (n10) => true } };
4928
+ function ms(n10, i) {
5029
4929
  let e = (n10.ctrl ? 16 : 0) | (n10.shift ? 4 : 0) | (n10.alt ? 8 : 0);
5030
4930
  return n10.button === 4 ? (e |= 64, e |= n10.action) : (e |= n10.button & 3, n10.button & 4 && (e |= 64), n10.button & 8 && (e |= 128), n10.action === 32 ? e |= 32 : n10.action === 0 && !i && (e |= 3)), e;
5031
4931
  }
5032
- var Ss = String.fromCharCode, gn = { DEFAULT: (n10) => {
5033
- let i = [vs(n10, false) + 32, n10.col + 32, n10.row + 32];
5034
- return i[0] > 255 || i[1] > 255 || i[2] > 255 ? "" : `\x1B[M${Ss(i[0])}${Ss(i[1])}${Ss(i[2])}`;
4932
+ var bs = String.fromCharCode, vn = { DEFAULT: (n10) => {
4933
+ let i = [ms(n10, false) + 32, n10.col + 32, n10.row + 32];
4934
+ return i[0] > 255 || i[1] > 255 || i[2] > 255 ? "" : `\x1B[M${bs(i[0])}${bs(i[1])}${bs(i[2])}`;
5035
4935
  }, SGR: (n10) => {
5036
4936
  let i = n10.action === 0 && n10.button !== 4 ? "m" : "M";
5037
- return `\x1B[<${vs(n10, true)};${n10.col};${n10.row}${i}`;
4937
+ return `\x1B[<${ms(n10, true)};${n10.col};${n10.row}${i}`;
5038
4938
  }, SGR_PIXELS: (n10) => {
5039
4939
  let i = n10.action === 0 && n10.button !== 4 ? "m" : "M";
5040
- return `\x1B[<${vs(n10, true)};${n10.x};${n10.y}${i}`;
5041
- } }, or = class extends g {
4940
+ return `\x1B[<${ms(n10, true)};${n10.x};${n10.y}${i}`;
4941
+ } }, rr = class extends g {
5042
4942
  constructor() {
5043
4943
  super();
5044
4944
  this._protocols = {};
@@ -5047,8 +4947,8 @@ var Ss = String.fromCharCode, gn = { DEFAULT: (n10) => {
5047
4947
  this._activeEncoding = "";
5048
4948
  this._onProtocolChange = this._register(new b());
5049
4949
  this.onProtocolChange = this._onProtocolChange.event;
5050
- for (let e of Object.keys(Sn)) this.addProtocol(e, Sn[e]);
5051
- for (let e of Object.keys(gn)) this.addEncoding(e, gn[e]);
4950
+ for (let e of Object.keys(bn)) this.addProtocol(e, bn[e]);
4951
+ for (let e of Object.keys(vn)) this.addEncoding(e, vn[e]);
5052
4952
  this.reset();
5053
4953
  }
5054
4954
  addProtocol(e, t) {
@@ -5152,8 +5052,8 @@ var me = class n8 {
5152
5052
  return this._activeProvider.charProperties(i, e);
5153
5053
  }
5154
5054
  };
5155
- var gs = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], bo = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]], X;
5156
- function vo(n10, i) {
5055
+ var vs = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], po = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]], X;
5056
+ function mo(n10, i) {
5157
5057
  let e = 0, t = i.length - 1, r;
5158
5058
  if (n10 < i[0][0] || n10 > i[t][1]) return false;
5159
5059
  for (; t >= e; ) if (r = e + t >> 1, n10 > i[r][1]) e = r + 1;
@@ -5161,16 +5061,16 @@ function vo(n10, i) {
5161
5061
  else return true;
5162
5062
  return false;
5163
5063
  }
5164
- var ar = class {
5064
+ var sr = class {
5165
5065
  constructor() {
5166
5066
  this.version = "6";
5167
5067
  if (!X) {
5168
5068
  X = new Uint8Array(65536), X.fill(1), X[0] = 0, X.fill(0, 1, 32), X.fill(0, 127, 160), X.fill(2, 4352, 4448), X[9001] = 2, X[9002] = 2, X.fill(2, 11904, 42192), X[12351] = 1, X.fill(2, 44032, 55204), X.fill(2, 63744, 64256), X.fill(2, 65040, 65050), X.fill(2, 65072, 65136), X.fill(2, 65280, 65377), X.fill(2, 65504, 65511);
5169
- for (let i = 0; i < gs.length; ++i) X.fill(0, gs[i][0], gs[i][1] + 1);
5069
+ for (let i = 0; i < vs.length; ++i) X.fill(0, vs[i][0], vs[i][1] + 1);
5170
5070
  }
5171
5071
  }
5172
5072
  wcwidth(i) {
5173
- return i < 32 ? 0 : i < 127 ? 1 : i < 65536 ? X[i] : vo(i, bo) ? 0 : i >= 131072 && i <= 196605 || i >= 196608 && i <= 262141 ? 2 : 1;
5073
+ return i < 32 ? 0 : i < 127 ? 1 : i < 65536 ? X[i] : mo(i, po) ? 0 : i >= 131072 && i <= 196605 || i >= 196608 && i <= 262141 ? 2 : 1;
5174
5074
  }
5175
5075
  charProperties(i, e) {
5176
5076
  let t = this.wcwidth(i), r = t === 0 && e !== 0;
@@ -5181,7 +5081,7 @@ var ar = class {
5181
5081
  return me.createPropertyValue(0, t, r);
5182
5082
  }
5183
5083
  };
5184
- var lr = class {
5084
+ var nr = class {
5185
5085
  constructor() {
5186
5086
  this.glevel = 0;
5187
5087
  this._charsets = [];
@@ -5199,7 +5099,7 @@ var lr = class {
5199
5099
  this._charsets[i] = e, this.glevel === i && (this.charset = e);
5200
5100
  }
5201
5101
  };
5202
- function Is(n10) {
5102
+ function Ss(n10) {
5203
5103
  let e = n10.buffer.lines.get(n10.buffer.ybase + n10.buffer.y - 1)?.get(n10.cols - 1), t = n10.buffer.lines.get(n10.buffer.ybase + n10.buffer.y);
5204
5104
  t && e && (t.isWrapped = e[3] !== 0 && e[3] !== 32);
5205
5105
  }
@@ -5279,10 +5179,48 @@ var At = class n9 {
5279
5179
  t[e - 1] = ~r ? Math.min(r * 10 + i, 2147483647) : i;
5280
5180
  }
5281
5181
  };
5282
- var ni = [], cr = class {
5182
+ var gs = class {
5183
+ constructor() {
5184
+ this._chunks = [];
5185
+ this._length = 0;
5186
+ }
5187
+ get length() {
5188
+ return this._length;
5189
+ }
5190
+ reset() {
5191
+ this._chunks.length = 0, this._length = 0;
5192
+ }
5193
+ append(i) {
5194
+ this._chunks.push(i), this._length += i.length;
5195
+ }
5196
+ toString() {
5197
+ return this._chunks.join("");
5198
+ }
5199
+ }, We = class {
5200
+ constructor(i) {
5201
+ this._limit = i;
5202
+ this._builder = new gs();
5203
+ }
5204
+ get length() {
5205
+ return this._builder.length;
5206
+ }
5207
+ get limit() {
5208
+ return this._limit;
5209
+ }
5210
+ reset() {
5211
+ this._builder.reset();
5212
+ }
5213
+ append(i) {
5214
+ return this._builder.append(i), this._builder.length > this._limit ? (this._builder.reset(), true) : false;
5215
+ }
5216
+ toString() {
5217
+ return this._builder.toString();
5218
+ }
5219
+ };
5220
+ var si = [], or = class {
5283
5221
  constructor() {
5284
5222
  this._state = 0;
5285
- this._active = ni;
5223
+ this._active = si;
5286
5224
  this._id = -1;
5287
5225
  this._handlers = /* @__PURE__ */ Object.create(null);
5288
5226
  this._handlerFb = () => {
@@ -5305,14 +5243,14 @@ var ni = [], cr = class {
5305
5243
  }
5306
5244
  dispose() {
5307
5245
  this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
5308
- }, this._active = ni;
5246
+ }, this._active = si;
5309
5247
  }
5310
5248
  reset() {
5311
5249
  if (this._state === 2) for (let i = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; i >= 0; --i) this._active[i].end(false);
5312
- this._stack.paused = false, this._active = ni, this._id = -1, this._state = 0;
5250
+ this._stack.paused = false, this._active = si, this._id = -1, this._state = 0;
5313
5251
  }
5314
5252
  _start() {
5315
- if (this._active = this._handlers[this._id] || ni, !this._active.length) this._handlerFb(this._id, "START");
5253
+ if (this._active = this._handlers[this._id] || si, !this._active.length) this._handlerFb(this._id, "START");
5316
5254
  else for (let i = this._active.length - 1; i >= 0; i--) this._active[i].start();
5317
5255
  }
5318
5256
  _put(i, e, t) {
@@ -5350,13 +5288,13 @@ var ni = [], cr = class {
5350
5288
  }
5351
5289
  for (; r >= 0; r--) if (t = this._active[r].end(false), t instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = r, this._stack.fallThrough = true, t;
5352
5290
  }
5353
- this._active = ni, this._id = -1, this._state = 0;
5291
+ this._active = si, this._id = -1, this._state = 0;
5354
5292
  }
5355
5293
  }
5356
- }, hr = class hr2 {
5294
+ }, ar = class ar2 {
5357
5295
  constructor(i) {
5358
5296
  this._handler = i;
5359
- this._data = new We(hr2._payloadLimit);
5297
+ this._data = new We(ar2._payloadLimit);
5360
5298
  this._hitLimit = false;
5361
5299
  }
5362
5300
  start() {
@@ -5372,12 +5310,12 @@ var ni = [], cr = class {
5372
5310
  return this._data.reset(), this._hitLimit = false, e;
5373
5311
  }
5374
5312
  };
5375
- hr._payloadLimit = 1e7;
5376
- var ne = hr;
5377
- var oi = [], dr = class {
5313
+ ar._payloadLimit = 1e7;
5314
+ var ne = ar;
5315
+ var ni = [], lr = class {
5378
5316
  constructor() {
5379
5317
  this._handlers = /* @__PURE__ */ Object.create(null);
5380
- this._active = oi;
5318
+ this._active = ni;
5381
5319
  this._ident = 0;
5382
5320
  this._handlerFb = () => {
5383
5321
  };
@@ -5385,7 +5323,7 @@ var oi = [], dr = class {
5385
5323
  }
5386
5324
  dispose() {
5387
5325
  this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
5388
- }, this._active = oi;
5326
+ }, this._active = ni;
5389
5327
  }
5390
5328
  registerHandler(i, e) {
5391
5329
  this._handlers[i] ??= [];
@@ -5403,10 +5341,10 @@ var oi = [], dr = class {
5403
5341
  }
5404
5342
  reset() {
5405
5343
  if (this._active.length) for (let i = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; i >= 0; --i) this._active[i].unhook(false);
5406
- this._stack.paused = false, this._active = oi, this._ident = 0;
5344
+ this._stack.paused = false, this._active = ni, this._ident = 0;
5407
5345
  }
5408
5346
  hook(i, e) {
5409
- if (this.reset(), this._ident = i, this._active = this._handlers[i] || oi, !this._active.length) this._handlerFb(this._ident, "HOOK", e);
5347
+ if (this.reset(), this._ident = i, this._active = this._handlers[i] || ni, !this._active.length) this._handlerFb(this._ident, "HOOK", e);
5410
5348
  else for (let t = this._active.length - 1; t >= 0; t--) this._active[t].hook(e);
5411
5349
  }
5412
5350
  put(i, e, t) {
@@ -5423,19 +5361,19 @@ var oi = [], dr = class {
5423
5361
  }
5424
5362
  for (; r >= 0; r--) if (t = this._active[r].unhook(false), t instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = r, this._stack.fallThrough = true, t;
5425
5363
  }
5426
- this._active = oi, this._ident = 0;
5364
+ this._active = ni, this._ident = 0;
5427
5365
  }
5428
- }, ai = new At();
5429
- ai.addParam(0);
5430
- var ur = class ur2 {
5366
+ }, oi = new At();
5367
+ oi.addParam(0);
5368
+ var cr = class cr2 {
5431
5369
  constructor(i) {
5432
5370
  this._handler = i;
5433
- this._data = new We(ur2._payloadLimit);
5434
- this._params = ai;
5371
+ this._data = new We(cr2._payloadLimit);
5372
+ this._params = oi;
5435
5373
  this._hitLimit = false;
5436
5374
  }
5437
5375
  hook(i) {
5438
- this._params = i.length > 1 || i.params[0] ? i.clone() : ai, this._data.reset(), this._hitLimit = false;
5376
+ this._params = i.length > 1 || i.params[0] ? i.clone() : oi, this._data.reset(), this._hitLimit = false;
5439
5377
  }
5440
5378
  put(i, e, t) {
5441
5379
  this._hitLimit || this._data.append(ye(i, e, t)) && (this._hitLimit = true);
@@ -5443,16 +5381,16 @@ var ur = class ur2 {
5443
5381
  unhook(i) {
5444
5382
  let e = false;
5445
5383
  if (this._hitLimit) e = false;
5446
- else if (i && (e = this._handler(this._data.toString(), this._params), e instanceof Promise)) return e.then((t) => (this._params = ai, this._data.reset(), this._hitLimit = false, t));
5447
- return this._params = ai, this._data.reset(), this._hitLimit = false, e;
5384
+ else if (i && (e = this._handler(this._data.toString(), this._params), e instanceof Promise)) return e.then((t) => (this._params = oi, this._data.reset(), this._hitLimit = false, t));
5385
+ return this._params = oi, this._data.reset(), this._hitLimit = false, e;
5448
5386
  }
5449
5387
  };
5450
- ur._payloadLimit = 1e7;
5451
- var li = ur;
5452
- var ci = [], fr = class {
5388
+ cr._payloadLimit = 1e7;
5389
+ var ai = cr;
5390
+ var li = [], hr = class {
5453
5391
  constructor() {
5454
5392
  this._handlers = /* @__PURE__ */ Object.create(null);
5455
- this._active = ci;
5393
+ this._active = li;
5456
5394
  this._ident = 0;
5457
5395
  this._handlerFb = () => {
5458
5396
  };
@@ -5474,14 +5412,14 @@ var ci = [], fr = class {
5474
5412
  }
5475
5413
  dispose() {
5476
5414
  this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
5477
- }, this._active = ci;
5415
+ }, this._active = li;
5478
5416
  }
5479
5417
  reset() {
5480
5418
  if (this._active.length) for (let i = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; i >= 0; --i) this._active[i].end(false);
5481
- this._stack.paused = false, this._active = ci, this._ident = 0;
5419
+ this._stack.paused = false, this._active = li, this._ident = 0;
5482
5420
  }
5483
5421
  start(i) {
5484
- if (this.reset(), this._ident = i, this._active = this._handlers[i] || ci, !this._active.length) this._handlerFb(this._ident, "START");
5422
+ if (this.reset(), this._ident = i, this._active = this._handlers[i] || li, !this._active.length) this._handlerFb(this._ident, "START");
5485
5423
  else for (let e = this._active.length - 1; e >= 0; e--) this._active[e].start();
5486
5424
  }
5487
5425
  put(i, e, t) {
@@ -5498,12 +5436,12 @@ var ci = [], fr = class {
5498
5436
  }
5499
5437
  for (; r >= 0; r--) if (t = this._active[r].end(false), t instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = r, this._stack.fallThrough = true, t;
5500
5438
  }
5501
- this._active = ci, this._ident = 0;
5439
+ this._active = li, this._ident = 0;
5502
5440
  }
5503
- }, pr = class pr2 {
5441
+ }, ur = class ur2 {
5504
5442
  constructor(i) {
5505
5443
  this._handler = i;
5506
- this._data = new We(pr2._payloadLimit);
5444
+ this._data = new We(ur2._payloadLimit);
5507
5445
  this._hitLimit = false;
5508
5446
  }
5509
5447
  start() {
@@ -5519,9 +5457,9 @@ var ci = [], fr = class {
5519
5457
  return this._data.reset(), this._hitLimit = false, e;
5520
5458
  }
5521
5459
  };
5522
- pr._payloadLimit = 1e7;
5523
- var _r = pr;
5524
- var Cs = class {
5460
+ ur._payloadLimit = 1e7;
5461
+ var dr = ur;
5462
+ var Is = class {
5525
5463
  constructor(i) {
5526
5464
  this.table = new Uint16Array(i);
5527
5465
  }
@@ -5534,15 +5472,15 @@ var Cs = class {
5534
5472
  addMany(i, e, t, r) {
5535
5473
  for (let s = 0; s < i.length; s++) this.table[e << 8 | i[s]] = t << 8 | r;
5536
5474
  }
5537
- }, oe = 160, So = (function() {
5538
- let n10 = new Cs(4257), e = Array.apply(null, Array(256)).map((a, l) => l), t = (a, l) => e.slice(a, l), r = t(32, 127), s = t(0, 24);
5475
+ }, oe = 160, bo = (function() {
5476
+ let n10 = new Is(4257), e = Array.apply(null, Array(256)).map((a, l) => l), t = (a, l) => e.slice(a, l), r = t(32, 127), s = t(0, 24);
5539
5477
  s.push(25), s.push.apply(s, t(28, 32));
5540
5478
  let o = t(0, 17);
5541
5479
  n10.setDefault(1, 0), n10.addMany(r, 0, 2, 0);
5542
5480
  for (let a of o) n10.addMany([24, 26, 153, 154], a, 3, 0), n10.addMany(t(128, 144), a, 3, 0), n10.addMany(t(144, 152), a, 3, 0), n10.add(156, a, 0, 0), n10.add(27, a, 11, 1), n10.add(157, a, 4, 8), n10.addMany([152, 158], a, 0, 7), n10.add(159, a, 11, 14), n10.add(155, a, 11, 3), n10.add(144, a, 11, 9);
5543
5481
  return n10.addMany(s, 0, 3, 0), n10.addMany(s, 1, 3, 1), n10.add(127, 1, 0, 1), n10.addMany(s, 8, 0, 8), n10.addMany(s, 3, 3, 3), n10.add(127, 3, 0, 3), n10.addMany(s, 4, 3, 4), n10.add(127, 4, 0, 4), n10.addMany(s, 6, 3, 6), n10.addMany(s, 5, 3, 5), n10.add(127, 5, 0, 5), n10.addMany(s, 2, 3, 2), n10.add(127, 2, 0, 2), n10.add(93, 1, 4, 8), n10.addMany(r, 8, 5, 8), n10.add(127, 8, 5, 8), n10.addMany([156, 27, 24, 26, 7], 8, 6, 0), n10.addMany(t(28, 32), 8, 0, 8), n10.addMany([88, 94], 1, 0, 7), n10.addMany(r, 7, 0, 7), n10.addMany(s, 7, 0, 7), n10.add(156, 7, 0, 0), n10.add(127, 7, 0, 7), n10.add(95, 1, 11, 14), n10.addMany(s, 14, 0, 14), n10.add(127, 14, 0, 14), n10.addMany(t(32, 48), 14, 9, 15), n10.addMany(t(48, 127), 14, 15, 16), n10.addMany(t(48, 127), 15, 15, 16), n10.addMany(s, 15, 0, 15), n10.addMany(t(32, 48), 15, 9, 15), n10.add(127, 15, 0, 15), n10.addMany(r, 16, 16, 16), n10.addMany(s, 16, 0, 16), n10.addMany(t(8, 14), 16, 16, 16), n10.add(127, 16, 0, 16), n10.addMany([27, 156, 24, 26], 16, 17, 0), n10.add(91, 1, 11, 3), n10.addMany(t(64, 127), 3, 7, 0), n10.addMany(t(48, 60), 3, 8, 4), n10.addMany([60, 61, 62, 63], 3, 9, 4), n10.addMany(t(48, 60), 4, 8, 4), n10.addMany(t(64, 127), 4, 7, 0), n10.addMany([60, 61, 62, 63], 4, 0, 6), n10.addMany(t(32, 64), 6, 0, 6), n10.add(127, 6, 0, 6), n10.addMany(t(64, 127), 6, 0, 0), n10.addMany(t(32, 48), 3, 9, 5), n10.addMany(t(32, 48), 5, 9, 5), n10.addMany(t(48, 64), 5, 0, 6), n10.addMany(t(64, 127), 5, 7, 0), n10.addMany(t(32, 48), 4, 9, 5), n10.addMany(t(32, 48), 1, 9, 2), n10.addMany(t(32, 48), 2, 9, 2), n10.addMany(t(48, 127), 2, 10, 0), n10.addMany(t(48, 80), 1, 10, 0), n10.addMany(t(81, 88), 1, 10, 0), n10.addMany([89, 90, 92], 1, 10, 0), n10.addMany(t(96, 127), 1, 10, 0), n10.add(80, 1, 11, 9), n10.addMany(s, 9, 0, 9), n10.add(127, 9, 0, 9), n10.addMany(t(32, 48), 9, 9, 12), n10.addMany(t(48, 60), 9, 8, 10), n10.addMany([60, 61, 62, 63], 9, 9, 10), n10.addMany(s, 11, 0, 11), n10.addMany(t(32, 128), 11, 0, 11), n10.addMany(s, 10, 0, 10), n10.add(127, 10, 0, 10), n10.addMany(t(48, 60), 10, 8, 10), n10.addMany([60, 61, 62, 63], 10, 0, 11), n10.addMany(t(32, 48), 10, 9, 12), n10.addMany(s, 12, 0, 12), n10.add(127, 12, 0, 12), n10.addMany(t(32, 48), 12, 9, 12), n10.addMany(t(48, 64), 12, 0, 11), n10.addMany(t(64, 127), 12, 12, 13), n10.addMany(t(64, 127), 10, 12, 13), n10.addMany(t(64, 127), 9, 12, 13), n10.addMany(s, 13, 13, 13), n10.addMany(r, 13, 13, 13), n10.add(127, 13, 0, 13), n10.addMany([27, 156, 24, 26], 13, 14, 0), n10.add(oe, 0, 2, 0), n10.add(oe, 8, 5, 8), n10.add(oe, 6, 0, 6), n10.add(oe, 11, 0, 11), n10.add(oe, 13, 13, 13), n10.add(oe, 16, 16, 16), n10;
5544
- })(), mr = class extends g {
5545
- constructor(e = So) {
5482
+ })(), fr = class extends g {
5483
+ constructor(e = bo) {
5546
5484
  super();
5547
5485
  this._transitions = e;
5548
5486
  this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 };
@@ -5552,7 +5490,7 @@ var Cs = class {
5552
5490
  }, this._escHandlerFb = (t) => {
5553
5491
  }, this._errorHandlerFb = (t) => t, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlersArr = new Array(24).fill(void 0), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this._register(E(() => {
5554
5492
  this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlersArr = new Array(24).fill(void 0), this._escHandlers = /* @__PURE__ */ Object.create(null);
5555
- })), this._oscParser = this._register(new cr()), this._dcsParser = this._register(new dr()), this._apcParser = this._register(new fr()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => true);
5493
+ })), this._oscParser = this._register(new or()), this._dcsParser = this._register(new lr()), this._apcParser = this._register(new hr()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => true);
5556
5494
  }
5557
5495
  _identifier(e, t = [64, 126]) {
5558
5496
  let r = 0;
@@ -5810,18 +5748,18 @@ var Cs = class {
5810
5748
  }
5811
5749
  }
5812
5750
  };
5813
- var go = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, Io = /^[\da-f]+$/;
5814
- function ys(n10) {
5751
+ var vo = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, So = /^[\da-f]+$/;
5752
+ function Es(n10) {
5815
5753
  if (!n10) return;
5816
5754
  let i = n10.toLowerCase();
5817
5755
  if (i.startsWith("rgb:")) {
5818
5756
  i = i.slice(4);
5819
- let e = go.exec(i);
5757
+ let e = vo.exec(i);
5820
5758
  if (e) {
5821
5759
  let t = e[1] ? 15 : e[4] ? 255 : e[7] ? 4095 : 65535;
5822
5760
  return [Math.round(parseInt(e[1] || e[4] || e[7] || e[10], 16) / t * 255), Math.round(parseInt(e[2] || e[5] || e[8] || e[11], 16) / t * 255), Math.round(parseInt(e[3] || e[6] || e[9] || e[12], 16) / t * 255)];
5823
5761
  }
5824
- } else if (i.startsWith("#") && (i = i.slice(1), Io.exec(i) && [3, 6, 9, 12].includes(i.length))) {
5762
+ } else if (i.startsWith("#") && (i = i.slice(1), So.exec(i) && [3, 6, 9, 12].includes(i.length))) {
5825
5763
  let e = i.length / 3, t = [0, 0, 0];
5826
5764
  for (let r = 0; r < 3; ++r) {
5827
5765
  let s = parseInt(i.slice(e * r, e * r + e), 16);
@@ -5830,7 +5768,7 @@ function ys(n10) {
5830
5768
  return t;
5831
5769
  }
5832
5770
  }
5833
- function Es(n10, i) {
5771
+ function Cs(n10, i) {
5834
5772
  let e = n10.toString(16), t = e.length < 2 ? "0" + e : e;
5835
5773
  switch (i) {
5836
5774
  case 4:
@@ -5843,13 +5781,13 @@ function Es(n10, i) {
5843
5781
  return t + t;
5844
5782
  }
5845
5783
  }
5846
- function En(n10, i = 16) {
5784
+ function In(n10, i = 16) {
5847
5785
  let [e, t, r] = n10;
5848
- return `rgb:${Es(e, i)}/${Es(t, i)}/${Es(r, i)}`;
5786
+ return `rgb:${Cs(e, i)}/${Cs(t, i)}/${Cs(r, i)}`;
5849
5787
  }
5850
- var yn = "6.1.0-beta.291";
5851
- var Eo = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 };
5852
- function xn(n10, i) {
5788
+ var Cn = "6.1.0-beta.303";
5789
+ var Io = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 };
5790
+ function En(n10, i) {
5853
5791
  if (n10 > 24) return i.setWinLines || false;
5854
5792
  switch (n10) {
5855
5793
  case 1:
@@ -5899,8 +5837,8 @@ function xn(n10, i) {
5899
5837
  }
5900
5838
  return false;
5901
5839
  }
5902
- var wn = 0, br = class extends g {
5903
- constructor(e, t, r, s, o, a, l, h, d = new mr()) {
5840
+ var yn = 0, _r = class extends g {
5841
+ constructor(e, t, r, s, o, a, l, h, d = new fr()) {
5904
5842
  super();
5905
5843
  this._bufferService = e;
5906
5844
  this._charsetService = t;
@@ -5912,8 +5850,8 @@ var wn = 0, br = class extends g {
5912
5850
  this._unicodeService = h;
5913
5851
  this._parser = d;
5914
5852
  this._parseBuffer = new Uint32Array(4096);
5915
- this._stringDecoder = new mi();
5916
- this._utf8Decoder = new bi();
5853
+ this._stringDecoder = new pi();
5854
+ this._utf8Decoder = new mi();
5917
5855
  this._windowTitle = "";
5918
5856
  this._iconName = "";
5919
5857
  this._windowTitleStack = [];
@@ -5950,7 +5888,7 @@ var wn = 0, br = class extends g {
5950
5888
  this.onRequestColorSchemeQuery = this._onRequestColorSchemeQuery.event;
5951
5889
  this._parseStack = { paused: false, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 };
5952
5890
  this._specialColors = [256, 257, 258];
5953
- this._register(this._parser), this._dirtyRowTracker = new hi(this._bufferService), this._activeBuffer = this._bufferService.buffer, this._register(this._bufferService.buffers.onBufferActivate((c) => this._activeBuffer = c.activeBuffer)), this._parser.setCsiHandlerFallback((c, u) => {
5891
+ this._register(this._parser), this._dirtyRowTracker = new ci(this._bufferService), this._activeBuffer = this._bufferService.buffer, this._register(this._bufferService.buffers.onBufferActivate((c) => this._activeBuffer = c.activeBuffer)), this._parser.setCsiHandlerFallback((c, u) => {
5954
5892
  this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(c), params: u.toArray() });
5955
5893
  }), this._parser.setEscHandlerFallback((c) => {
5956
5894
  this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(c) });
@@ -5965,7 +5903,7 @@ var wn = 0, br = class extends g {
5965
5903
  }), this._parser.setPrintHandler((c, u, _) => this.print(c, u, _)), this._parser.registerCsiHandler({ final: "@" }, (c) => this.insertChars(c)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (c) => this.scrollLeft(c)), this._parser.registerCsiHandler({ final: "A" }, (c) => this.cursorUp(c)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (c) => this.scrollRight(c)), this._parser.registerCsiHandler({ final: "B" }, (c) => this.cursorDown(c)), this._parser.registerCsiHandler({ final: "C" }, (c) => this.cursorForward(c)), this._parser.registerCsiHandler({ final: "D" }, (c) => this.cursorBackward(c)), this._parser.registerCsiHandler({ final: "E" }, (c) => this.cursorNextLine(c)), this._parser.registerCsiHandler({ final: "F" }, (c) => this.cursorPrecedingLine(c)), this._parser.registerCsiHandler({ final: "G" }, (c) => this.cursorCharAbsolute(c)), this._parser.registerCsiHandler({ final: "H" }, (c) => this.cursorPosition(c)), this._parser.registerCsiHandler({ final: "I" }, (c) => this.cursorForwardTab(c)), this._parser.registerCsiHandler({ final: "J" }, (c) => this.eraseInDisplay(c, false)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (c) => this.eraseInDisplay(c, true)), this._parser.registerCsiHandler({ final: "K" }, (c) => this.eraseInLine(c, false)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (c) => this.eraseInLine(c, true)), this._parser.registerCsiHandler({ final: "L" }, (c) => this.insertLines(c)), this._parser.registerCsiHandler({ final: "M" }, (c) => this.deleteLines(c)), this._parser.registerCsiHandler({ final: "P" }, (c) => this.deleteChars(c)), this._parser.registerCsiHandler({ final: "S" }, (c) => this.scrollUp(c)), this._parser.registerCsiHandler({ final: "T" }, (c) => this.scrollDown(c)), this._parser.registerCsiHandler({ final: "X" }, (c) => this.eraseChars(c)), this._parser.registerCsiHandler({ final: "Z" }, (c) => this.cursorBackwardTab(c)), this._parser.registerCsiHandler({ final: "^" }, (c) => this.scrollDown(c)), this._parser.registerCsiHandler({ final: "`" }, (c) => this.charPosAbsolute(c)), this._parser.registerCsiHandler({ final: "a" }, (c) => this.hPositionRelative(c)), this._parser.registerCsiHandler({ final: "b" }, (c) => this.repeatPrecedingCharacter(c)), this._parser.registerCsiHandler({ final: "c" }, (c) => this.sendDeviceAttributesPrimary(c)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (c) => this.sendDeviceAttributesSecondary(c)), this._parser.registerCsiHandler({ final: "d" }, (c) => this.linePosAbsolute(c)), this._parser.registerCsiHandler({ final: "e" }, (c) => this.vPositionRelative(c)), this._parser.registerCsiHandler({ final: "f" }, (c) => this.hVPosition(c)), this._parser.registerCsiHandler({ final: "g" }, (c) => this.tabClear(c)), this._parser.registerCsiHandler({ final: "h" }, (c) => this.setMode(c)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (c) => this.setModePrivate(c)), this._parser.registerCsiHandler({ final: "l" }, (c) => this.resetMode(c)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (c) => this.resetModePrivate(c)), this._parser.registerCsiHandler({ final: "m" }, (c) => this.charAttributes(c)), this._parser.registerCsiHandler({ final: "n" }, (c) => this.deviceStatus(c)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (c) => this.deviceStatusPrivate(c)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (c) => this.softReset(c)), this._parser.registerCsiHandler({ prefix: ">", final: "q" }, (c) => this.sendXtVersion(c)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (c) => this.setCursorStyle(c)), this._parser.registerCsiHandler({ final: "r" }, (c) => this.setScrollRegion(c)), this._parser.registerCsiHandler({ final: "s" }, (c) => this.saveCursor(c)), this._parser.registerCsiHandler({ final: "t" }, (c) => this.windowOptions(c)), this._parser.registerCsiHandler({ final: "u" }, (c) => this.restoreCursor(c)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (c) => this.insertColumns(c)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (c) => this.deleteColumns(c)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (c) => this.selectProtected(c)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (c) => this.requestMode(c, true)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (c) => this.requestMode(c, false)), this._parser.registerCsiHandler({ prefix: "=", final: "u" }, (c) => this.kittyKeyboardSet(c)), this._parser.registerCsiHandler({ prefix: "?", final: "u" }, (c) => this.kittyKeyboardQuery(c)), this._parser.registerCsiHandler({ prefix: ">", final: "u" }, (c) => this.kittyKeyboardPush(c)), this._parser.registerCsiHandler({ prefix: "<", final: "u" }, (c) => this.kittyKeyboardPop(c)), this._parser.setExecuteHandler("\x07", () => this.bell()), this._parser.setExecuteHandler(`
5966
5904
  `, () => this.lineFeed()), this._parser.setExecuteHandler("\v", () => this.lineFeed()), this._parser.setExecuteHandler("\f", () => this.lineFeed()), this._parser.setExecuteHandler("\r", () => this.carriageReturn()), this._parser.setExecuteHandler("\b", () => this.backspace()), this._parser.setExecuteHandler(" ", () => this.tab()), this._parser.setExecuteHandler("", () => this.shiftOut()), this._parser.setExecuteHandler("", () => this.shiftIn()), this._parser.setExecuteHandler("„", () => this.index()), this._parser.setExecuteHandler("…", () => this.nextLine()), this._parser.setExecuteHandler("ˆ", () => this.tabSet()), this._parser.registerOscHandler(0, new ne((c) => (this.setTitle(c), this.setIconName(c), true))), this._parser.registerOscHandler(1, new ne((c) => this.setIconName(c))), this._parser.registerOscHandler(2, new ne((c) => this.setTitle(c))), this._parser.registerOscHandler(4, new ne((c) => this.setOrReportIndexedColor(c))), this._parser.registerOscHandler(8, new ne((c) => this.setHyperlink(c))), this._parser.registerOscHandler(10, new ne((c) => this.setOrReportFgColor(c))), this._parser.registerOscHandler(11, new ne((c) => this.setOrReportBgColor(c))), this._parser.registerOscHandler(12, new ne((c) => this.setOrReportCursorColor(c))), this._parser.registerOscHandler(104, new ne((c) => this.restoreIndexedColor(c))), this._parser.registerOscHandler(110, new ne((c) => this.restoreFgColor(c))), this._parser.registerOscHandler(111, new ne((c) => this.restoreBgColor(c))), this._parser.registerOscHandler(112, new ne((c) => this.restoreCursorColor(c))), this._parser.registerEscHandler({ final: "7" }, () => this.saveCursor()), this._parser.registerEscHandler({ final: "8" }, () => this.restoreCursor()), this._parser.registerEscHandler({ final: "D" }, () => this.index()), this._parser.registerEscHandler({ final: "E" }, () => this.nextLine()), this._parser.registerEscHandler({ final: "H" }, () => this.tabSet()), this._parser.registerEscHandler({ final: "M" }, () => this.reverseIndex()), this._parser.registerEscHandler({ final: "=" }, () => this.keypadApplicationMode()), this._parser.registerEscHandler({ final: ">" }, () => this.keypadNumericMode()), this._parser.registerEscHandler({ final: "c" }, () => this.fullReset()), this._parser.registerEscHandler({ final: "n" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "o" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "|" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "}" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "~" }, () => this.setgLevel(1)), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, () => this.selectDefaultCharset()), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, () => this.selectDefaultCharset());
5967
5905
  for (let c in q) this._parser.registerEscHandler({ intermediates: "(", final: c }, () => this.selectCharset("(" + c)), this._parser.registerEscHandler({ intermediates: ")", final: c }, () => this.selectCharset(")" + c)), this._parser.registerEscHandler({ intermediates: "*", final: c }, () => this.selectCharset("*" + c)), this._parser.registerEscHandler({ intermediates: "+", final: c }, () => this.selectCharset("+" + c)), this._parser.registerEscHandler({ intermediates: "-", final: c }, () => this.selectCharset("-" + c)), this._parser.registerEscHandler({ intermediates: ".", final: c }, () => this.selectCharset("." + c)), this._parser.registerEscHandler({ intermediates: "/", final: c }, () => this.selectCharset("/" + c));
5968
- this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((c) => (this._logService.error("Parsing error: ", c), c)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new li((c, u) => this.requestStatusString(c, u)));
5906
+ this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((c) => (this._logService.error("Parsing error: ", c), c)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new ai((c, u) => this.requestStatusString(c, u)));
5969
5907
  }
5970
5908
  getAttrData() {
5971
5909
  return this._curAttrData;
@@ -6041,10 +5979,10 @@ var wn = 0, br = class extends g {
6041
5979
  this._parser.precedingJoinState = p, this._activeBuffer.x < h && r - t > 0 && _.getWidth(this._activeBuffer.x) === 0 && !_.hasContent(this._activeBuffer.x) && _.setCellFromCodepoint(this._activeBuffer.x, 0, 1, u), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
6042
5980
  }
6043
5981
  registerCsiHandler(e, t) {
6044
- return e.final === "t" && !e.prefix && !e.intermediates ? this._parser.registerCsiHandler(e, (r) => xn(r.params[0], this._optionsService.rawOptions.windowOptions) ? t(r) : true) : this._parser.registerCsiHandler(e, t);
5982
+ return e.final === "t" && !e.prefix && !e.intermediates ? this._parser.registerCsiHandler(e, (r) => En(r.params[0], this._optionsService.rawOptions.windowOptions) ? t(r) : true) : this._parser.registerCsiHandler(e, t);
6045
5983
  }
6046
5984
  registerDcsHandler(e, t) {
6047
- return this._parser.registerDcsHandler(e, new li(t));
5985
+ return this._parser.registerDcsHandler(e, new ai(t));
6048
5986
  }
6049
5987
  registerEscHandler(e, t) {
6050
5988
  return this._parser.registerEscHandler(e, t);
@@ -6053,7 +5991,7 @@ var wn = 0, br = class extends g {
6053
5991
  return this._parser.registerOscHandler(e, new ne(t));
6054
5992
  }
6055
5993
  registerApcHandler(e, t) {
6056
- return this._parser.registerApcHandler(e, new _r(t));
5994
+ return this._parser.registerApcHandler(e, new dr(t));
6057
5995
  }
6058
5996
  bell() {
6059
5997
  return this._onRequestBell.fire(), true;
@@ -6190,7 +6128,7 @@ var wn = 0, br = class extends g {
6190
6128
  break;
6191
6129
  case 3:
6192
6130
  let s = this._activeBuffer.lines.length - this._bufferService.rows;
6193
- s > 0 && (this._activeBuffer.lines.trimStart(s), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - s, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - s, 0), this._onScroll.fire(0));
6131
+ s > 0 && (this._activeBuffer.lines.trimStart(s), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - s, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - s, 0), this._activeBuffer === this._bufferService.buffers.normal && (this._bufferService.isUserScrolling = false), this._onScroll.fire(0));
6194
6132
  break;
6195
6133
  }
6196
6134
  return true;
@@ -6305,7 +6243,7 @@ var wn = 0, br = class extends g {
6305
6243
  return e.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent("\x1B[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent("\x1B[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(e.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent("\x1B[>83;40003;0c")), true;
6306
6244
  }
6307
6245
  sendXtVersion(e) {
6308
- return e.params[0] > 0 || this._coreService.triggerDataEvent(`\x1BP>|xterm.js(${yn})\x1B\\`), true;
6246
+ return e.params[0] > 0 || this._coreService.triggerDataEvent(`\x1BP>|xterm.js(${Cn})\x1B\\`), true;
6309
6247
  }
6310
6248
  _is(e) {
6311
6249
  return (this._optionsService.rawOptions.termName + "").startsWith(e);
@@ -6600,7 +6538,7 @@ var wn = 0, br = class extends g {
6600
6538
  return (e.length < 2 || (r = e.params[1]) > this._bufferService.rows || r === 0) && (r = this._bufferService.rows), r > t && (this._activeBuffer.scrollTop = t - 1, this._activeBuffer.scrollBottom = r - 1, this._setCursor(0, 0)), true;
6601
6539
  }
6602
6540
  windowOptions(e) {
6603
- if (!xn(e.params[0], this._optionsService.rawOptions.windowOptions)) return true;
6541
+ if (!En(e.params[0], this._optionsService.rawOptions.windowOptions)) return true;
6604
6542
  let t = e.length > 1 ? e.params[1] : 0;
6605
6543
  switch (e.params[0]) {
6606
6544
  case 14:
@@ -6641,9 +6579,9 @@ var wn = 0, br = class extends g {
6641
6579
  let s = r.shift(), o = r.shift();
6642
6580
  if (/^\d+$/.exec(s)) {
6643
6581
  let a = parseInt(s, 10);
6644
- if (Tn(a)) if (o === "?") t.push({ type: 0, index: a });
6582
+ if (xn(a)) if (o === "?") t.push({ type: 0, index: a });
6645
6583
  else {
6646
- let l = ys(o);
6584
+ let l = Es(o);
6647
6585
  l && t.push({ type: 1, index: a, color: l });
6648
6586
  }
6649
6587
  }
@@ -6668,7 +6606,7 @@ var wn = 0, br = class extends g {
6668
6606
  let r = e.split(";");
6669
6607
  for (let s = 0; s < r.length && !(t >= this._specialColors.length); ++s, ++t) if (r[s] === "?") this._onColor.fire([{ type: 0, index: this._specialColors[t] }]);
6670
6608
  else {
6671
- let o = ys(r[s]);
6609
+ let o = Es(r[s]);
6672
6610
  o && this._onColor.fire([{ type: 1, index: this._specialColors[t], color: o }]);
6673
6611
  }
6674
6612
  return true;
@@ -6687,7 +6625,7 @@ var wn = 0, br = class extends g {
6687
6625
  let t = [], r = e.split(";");
6688
6626
  for (let s = 0; s < r.length; ++s) if (/^\d+$/.exec(r[s])) {
6689
6627
  let o = parseInt(r[s], 10);
6690
- Tn(o) && t.push({ type: 2, index: o });
6628
+ xn(o) && t.push({ type: 2, index: o });
6691
6629
  }
6692
6630
  return t.length && this._onColor.fire(t), true;
6693
6631
  }
@@ -6713,7 +6651,7 @@ var wn = 0, br = class extends g {
6713
6651
  return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, Re), true;
6714
6652
  }
6715
6653
  selectCharset(e) {
6716
- return e.length !== 2 ? (this.selectDefaultCharset(), true) : (e[0] === "/" || this._charsetService.setgCharset(Eo[e[0]], q[e[1]] ?? Re), true);
6654
+ return e.length !== 2 ? (this.selectDefaultCharset(), true) : (e[0] === "/" || this._charsetService.setgCharset(Io[e[0]], q[e[1]] ?? Re), true);
6717
6655
  }
6718
6656
  index() {
6719
6657
  return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), true;
@@ -6788,7 +6726,7 @@ var wn = 0, br = class extends g {
6788
6726
  for (let a = 0; a < t && o.length > 0; a++) r.flags = o.pop();
6789
6727
  return o.length === 0 && t > 0 && (r.flags = 0), true;
6790
6728
  }
6791
- }, hi = class {
6729
+ }, ci = class {
6792
6730
  constructor(i) {
6793
6731
  this._bufferService = i;
6794
6732
  this.clearRange();
@@ -6800,17 +6738,17 @@ var wn = 0, br = class extends g {
6800
6738
  i < this.start ? this.start = i : i > this.end && (this.end = i);
6801
6739
  }
6802
6740
  markRangeDirty(i, e) {
6803
- i > e && (wn = i, i = e, e = wn), i < this.start && (this.start = i), e > this.end && (this.end = e);
6741
+ i > e && (yn = i, i = e, e = yn), i < this.start && (this.start = i), e > this.end && (this.end = e);
6804
6742
  }
6805
6743
  markAllDirty() {
6806
6744
  this.markRangeDirty(0, this._bufferService.rows - 1);
6807
6745
  }
6808
6746
  };
6809
- hi = y([m(0, D)], hi);
6810
- function Tn(n10) {
6747
+ ci = y([m(0, D)], ci);
6748
+ function xn(n10) {
6811
6749
  return 0 <= n10 && n10 < 256;
6812
6750
  }
6813
- var vr = class extends g {
6751
+ var pr = class extends g {
6814
6752
  constructor(e) {
6815
6753
  super();
6816
6754
  this._action = e;
@@ -6931,10 +6869,10 @@ var kt = class {
6931
6869
  }
6932
6870
  };
6933
6871
  kt = y([m(0, D)], kt);
6934
- var Dn = false, Sr = class extends g {
6872
+ var wn = false, mr = class extends g {
6935
6873
  constructor(e) {
6936
6874
  super();
6937
- this._windowsWrappingHeuristics = this._register(new P());
6875
+ this._windowsWrappingHeuristics = this._register(new B());
6938
6876
  this._onBinary = this._register(new b());
6939
6877
  this.onBinary = this._onBinary.event;
6940
6878
  this._onData = this._register(new b());
@@ -6948,9 +6886,9 @@ var Dn = false, Sr = class extends g {
6948
6886
  this._onWriteParsed = this._register(new b());
6949
6887
  this.onWriteParsed = this._onWriteParsed.event;
6950
6888
  this._onScroll = this._register(new b());
6951
- this._instantiationService = new Ji(), this.optionsService = this._register(new nr(e)), this._instantiationService.setService(R, this.optionsService), this._logService = this._register(this._instantiationService.createInstance(wt)), this._instantiationService.setService(fe, this._logService), this._bufferService = this._register(this._instantiationService.createInstance(Dt)), this._instantiationService.setService(D, this._bufferService), this.coreService = this._register(this._instantiationService.createInstance(Lt)), this._instantiationService.setService(Y, this.coreService), this.mouseStateService = this._register(this._instantiationService.createInstance(or)), this._instantiationService.setService(Me, this.mouseStateService), this.unicodeService = this._register(this._instantiationService.createInstance(me)), this.unicodeService.register(new ar()), this._instantiationService.setService(Us, this.unicodeService), this._charsetService = this._instantiationService.createInstance(lr), this._instantiationService.setService(Ws, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(kt), this._instantiationService.setService(vi, this._oscLinkService), this._inputHandler = this._register(new br(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.mouseStateService, this.unicodeService)), this._register(j.forward(this._inputHandler.onLineFeed, this._onLineFeed)), this._register(j.forward(this._bufferService.onResize, this._onResize)), this._register(j.forward(this.coreService.onData, this._onData)), this._register(j.forward(this.coreService.onBinary, this._onBinary)), this._register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom(true))), this._register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this._register(this.optionsService.onMultipleOptionChange(["windowsPty"], () => this._handleWindowsPtyOptionChange())), this._register(this._bufferService.onScroll(() => {
6889
+ this._instantiationService = new Zi(), this.optionsService = this._register(new ir(e)), this._instantiationService.setService(R, this.optionsService), this._logService = this._register(this._instantiationService.createInstance(wt)), this._instantiationService.setService(fe, this._logService), this._bufferService = this._register(this._instantiationService.createInstance(Dt)), this._instantiationService.setService(D, this._bufferService), this.coreService = this._register(this._instantiationService.createInstance(Lt)), this._instantiationService.setService(Y, this.coreService), this.mouseStateService = this._register(this._instantiationService.createInstance(rr)), this._instantiationService.setService(Me, this.mouseStateService), this.unicodeService = this._register(this._instantiationService.createInstance(me)), this.unicodeService.register(new sr()), this._instantiationService.setService(Ws, this.unicodeService), this._charsetService = this._instantiationService.createInstance(nr), this._instantiationService.setService(Hs, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(kt), this._instantiationService.setService(bi, this._oscLinkService), this._inputHandler = this._register(new _r(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.mouseStateService, this.unicodeService)), this._register(j.forward(this._inputHandler.onLineFeed, this._onLineFeed)), this._register(j.forward(this._bufferService.onResize, this._onResize)), this._register(j.forward(this.coreService.onData, this._onData)), this._register(j.forward(this.coreService.onBinary, this._onBinary)), this._register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom(true))), this._register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this._register(this.optionsService.onMultipleOptionChange(["windowsPty"], () => this._handleWindowsPtyOptionChange())), this._register(this._bufferService.onScroll(() => {
6952
6890
  this._onScroll.fire({ position: this._bufferService.buffer.ydisp }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
6953
- })), this._writeBuffer = this._register(new vr((t, r) => this._inputHandler.parse(t, r))), this._register(j.forward(this._writeBuffer.onWriteParsed, this._onWriteParsed));
6891
+ })), this._writeBuffer = this._register(new pr((t, r) => this._inputHandler.parse(t, r))), this._register(j.forward(this._writeBuffer.onWriteParsed, this._onWriteParsed));
6954
6892
  }
6955
6893
  get onScroll() {
6956
6894
  return this._onScrollApi || (this._onScrollApi = this._register(new b()), this._onScroll.event((e) => {
@@ -6976,7 +6914,7 @@ var Dn = false, Sr = class extends g {
6976
6914
  this._writeBuffer.write(e, t);
6977
6915
  }
6978
6916
  writeSync(e, t) {
6979
- this._logService.logLevel <= 3 && !Dn && (this._logService.warn("writeSync is unreliable and will be removed soon."), Dn = true), this._writeBuffer.writeSync(e, t);
6917
+ this._logService.logLevel <= 3 && !wn && (this._logService.warn("writeSync is unreliable and will be removed soon."), wn = true), this._writeBuffer.writeSync(e, t);
6980
6918
  }
6981
6919
  input(e, t = true) {
6982
6920
  this.coreService.triggerDataEvent(e, t);
@@ -7031,13 +6969,13 @@ var Dn = false, Sr = class extends g {
7031
6969
  _enableWindowsWrappingHeuristics() {
7032
6970
  if (!this._windowsWrappingHeuristics.value) {
7033
6971
  let e = [];
7034
- e.push(this.onLineFeed(Is.bind(null, this._bufferService))), e.push(this.registerCsiHandler({ final: "H" }, () => (Is(this._bufferService), false))), this._windowsWrappingHeuristics.value = E(() => {
6972
+ e.push(this.onLineFeed(Ss.bind(null, this._bufferService))), e.push(this.registerCsiHandler({ final: "H" }, () => (Ss(this._bufferService), false))), this._windowsWrappingHeuristics.value = E(() => {
7035
6973
  for (let t of e) t.dispose();
7036
6974
  });
7037
6975
  }
7038
6976
  }
7039
6977
  };
7040
- var z = 0, gr = class {
6978
+ var z = 0, br = class {
7041
6979
  constructor(i, e) {
7042
6980
  this._getKey = i;
7043
6981
  this._array = [];
@@ -7106,17 +7044,17 @@ var z = 0, gr = class {
7106
7044
  return e;
7107
7045
  }
7108
7046
  };
7109
- var Mt = 0, Ir = 0, Bt = class extends g {
7047
+ var Mt = 0, vr = 0, Pt = class extends g {
7110
7048
  constructor(e, t) {
7111
7049
  super();
7112
7050
  this._logService = e;
7113
7051
  this._bufferService = t;
7114
- this._lineCache = this._register(new xs());
7052
+ this._lineCache = this._register(new ys());
7115
7053
  this._onDecorationRegistered = this._register(new b());
7116
7054
  this.onDecorationRegistered = this._onDecorationRegistered.event;
7117
7055
  this._onDecorationRemoved = this._register(new b());
7118
7056
  this.onDecorationRemoved = this._onDecorationRemoved.event;
7119
- this._decorations = new gr((r) => r?.marker.line, this._logService), this._register(E(() => this.reset())), this._register(this._bufferService.buffers.onBufferActivate(() => {
7057
+ this._decorations = new br((r) => r?.marker.line, this._logService), this._register(E(() => this.reset())), this._register(this._bufferService.buffers.onBufferActivate(() => {
7120
7058
  this._lineCache.attachToBufferLines(this._bufferService.buffer.lines);
7121
7059
  })), this._lineCache.attachToBufferLines(this._bufferService.buffer.lines);
7122
7060
  }
@@ -7125,7 +7063,7 @@ var Mt = 0, Ir = 0, Bt = class extends g {
7125
7063
  }
7126
7064
  registerDecoration(e) {
7127
7065
  if (e.marker.isDisposed) return;
7128
- let t = new ws(e);
7066
+ let t = new xs(e);
7129
7067
  if (t) {
7130
7068
  let r = t.marker.onDispose(() => t.dispose()), s = t.onDispose(() => {
7131
7069
  s.dispose(), t && (this._decorations.delete(t) && (this._lineCache.remove(t), this._onDecorationRemoved.fire(t)), r.dispose());
@@ -7140,21 +7078,21 @@ var Mt = 0, Ir = 0, Bt = class extends g {
7140
7078
  }
7141
7079
  *getDecorationsAtCell(e, t, r) {
7142
7080
  let s = this._lineCache.getDecorationsOnLine(t);
7143
- if (s) for (let o of s) Mt = o.options.x ?? 0, Ir = Mt + (o.options.width ?? 1), e >= Mt && e < Ir && (!r || (o.options.layer ?? "bottom") === r) && (yield o);
7081
+ if (s) for (let o of s) Mt = o.options.x ?? 0, vr = Mt + (o.options.width ?? 1), e >= Mt && e < vr && (!r || (o.options.layer ?? "bottom") === r) && (yield o);
7144
7082
  }
7145
7083
  forEachDecorationAtCell(e, t, r, s) {
7146
7084
  let o = this._lineCache.getDecorationsOnLine(t);
7147
- if (o) for (let a of o) Mt = a.options.x ?? 0, Ir = Mt + (a.options.width ?? 1), e >= Mt && e < Ir && (!r || (a.options.layer ?? "bottom") === r) && s(a);
7085
+ if (o) for (let a of o) Mt = a.options.x ?? 0, vr = Mt + (a.options.width ?? 1), e >= Mt && e < vr && (!r || (a.options.layer ?? "bottom") === r) && s(a);
7148
7086
  }
7149
7087
  };
7150
- Bt = y([m(0, fe), m(1, D)], Bt);
7151
- var xs = class extends g {
7088
+ Pt = y([m(0, fe), m(1, D)], Pt);
7089
+ var ys = class extends g {
7152
7090
  constructor() {
7153
7091
  super(...arguments);
7154
7092
  this._decorationsByLine = /* @__PURE__ */ new Map();
7155
7093
  this._decorations = /* @__PURE__ */ new Set();
7156
- this._bufferLineListeners = this._register(new P());
7157
- this._lineIndexSyncTimer = this._register(new Ci());
7094
+ this._bufferLineListeners = this._register(new B());
7095
+ this._lineIndexSyncTimer = this._register(new Ii());
7158
7096
  this._lineIndexSyncCallbacks = [];
7159
7097
  }
7160
7098
  clear() {
@@ -7206,7 +7144,7 @@ var xs = class extends g {
7206
7144
  });
7207
7145
  }
7208
7146
  _handleBufferLinesTrim(e) {
7209
- if (e <= 0) return;
7147
+ if (e <= 0 || !this._decorationsByLine.size) return;
7210
7148
  let t = /* @__PURE__ */ new Map();
7211
7149
  for (let [r, s] of this._decorationsByLine) {
7212
7150
  let o = r - e;
@@ -7261,7 +7199,7 @@ var xs = class extends g {
7261
7199
  }
7262
7200
  for (let o of s) this._reindexDecoration(o);
7263
7201
  }
7264
- }, ws = class extends pe {
7202
+ }, xs = class extends pe {
7265
7203
  constructor(e) {
7266
7204
  super();
7267
7205
  this.options = e;
@@ -7274,17 +7212,17 @@ var xs = class extends g {
7274
7212
  this.marker = e.marker, this._indexedStartLine = e.marker.line, this.options.overviewRulerOptions && !this.options.overviewRulerOptions.position && (this.options.overviewRulerOptions.position = "full");
7275
7213
  }
7276
7214
  get backgroundColorRGB() {
7277
- return this._cachedBg === null && (this.options.backgroundColor ? this._cachedBg = B.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
7215
+ return this._cachedBg === null && (this.options.backgroundColor ? this._cachedBg = P.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
7278
7216
  }
7279
7217
  get foregroundColorRGB() {
7280
- return this._cachedFg === null && (this.options.foregroundColor ? this._cachedFg = B.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
7218
+ return this._cachedFg === null && (this.options.foregroundColor ? this._cachedFg = P.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
7281
7219
  }
7282
7220
  dispose() {
7283
7221
  this._onDispose.fire(), super.dispose();
7284
7222
  }
7285
7223
  };
7286
- var yo = 1e3, Cr = class {
7287
- constructor(i, e = yo) {
7224
+ var Co = 1e3, Sr = class {
7225
+ constructor(i, e = Co) {
7288
7226
  this._renderCallback = i;
7289
7227
  this._debounceThresholdMS = e;
7290
7228
  this._lastRefreshMs = 0;
@@ -7323,7 +7261,7 @@ var Ye = class extends g {
7323
7261
  let o = this._coreBrowserService.mainDocument;
7324
7262
  this._accessibilityContainer = o.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = o.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
7325
7263
  for (let a = 0; a < this._terminal.rows; a++) this._rowElements[a] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[a]);
7326
- if (this._topBoundaryFocusListener = (a) => this._handleBoundaryFocus(a, 0), this._bottomBoundaryFocusListener = (a) => this._handleBoundaryFocus(a, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = o.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this._register(new Cr(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
7264
+ if (this._topBoundaryFocusListener = (a) => this._handleBoundaryFocus(a, 0), this._bottomBoundaryFocusListener = (a) => this._handleBoundaryFocus(a, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = o.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this._register(new Sr(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
7327
7265
  this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this._register(this._terminal.onResize((a) => this._handleResize(a.rows))), this._register(this._terminal.onRender((a) => this._refreshRows(a.start, a.end))), this._register(this._terminal.onScroll(() => this._refreshRows())), this._register(this._terminal.onA11yChar((a) => this._handleChar(a))), this._register(this._terminal.onLineFeed(() => this._handleChar(`
7328
7266
  `))), this._register(this._terminal.onA11yTab((a) => this._handleTab(a))), this._register(this._terminal.onKey((a) => this._handleKey(a.key))), this._register(this._terminal.onBlur(() => this._clearLiveRegion())), this._register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this._register(C(o, "selectionchange", () => this._handleSelectionChange())), this._register(this._coreBrowserService.onDprChange(() => this._refreshRowsDimensions())), this._refreshRowsDimensions(), this._refreshRows(), this._register(E(() => {
7329
7267
  this._accessibilityContainer.remove(), this._rowElements.length = 0;
@@ -7426,7 +7364,7 @@ var Ye = class extends g {
7426
7364
  }
7427
7365
  };
7428
7366
  Ye = y([m(1, Qe), m(2, G), m(3, V)], Ye);
7429
- var Pt = class extends g {
7367
+ var Bt = class extends g {
7430
7368
  constructor(e, t, r, s, o) {
7431
7369
  super();
7432
7370
  this._element = e;
@@ -7525,7 +7463,7 @@ var Pt = class extends g {
7525
7463
  _handleMouseUp(e) {
7526
7464
  if (!this._currentLink) return;
7527
7465
  let t = this._positionFromMouseEvent(e, this._element);
7528
- t && this._mouseDownLink && xo(this._mouseDownLink.link, this._currentLink.link) && this._linkAtPosition(this._currentLink.link, t) && this._currentLink.link.activate(e, this._currentLink.link.text);
7466
+ t && this._mouseDownLink && Eo(this._mouseDownLink.link, this._currentLink.link) && this._linkAtPosition(this._currentLink.link, t) && this._currentLink.link.activate(e, this._currentLink.link.text);
7529
7467
  }
7530
7468
  _clearCurrentLink(e, t) {
7531
7469
  !this._currentLink || !this._lastMouseEvent || (!e || !t || this._currentLink.link.range.start.y >= e && this._currentLink.link.range.end.y <= t) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, Oe(this._linkCacheDisposables), this._linkCacheDisposables.length = 0);
@@ -7568,20 +7506,20 @@ var Pt = class extends g {
7568
7506
  return { x1: e, y1: t, x2: r, y2: s, cols: this._bufferService.cols, fg: o };
7569
7507
  }
7570
7508
  };
7571
- Pt = y([m(1, Pe), m(2, V), m(3, D), m(4, Ii)], Pt);
7572
- function xo(n10, i) {
7509
+ Bt = y([m(1, Be), m(2, V), m(3, D), m(4, gi)], Bt);
7510
+ function Eo(n10, i) {
7573
7511
  return n10.text === i.text && n10.range.start.x === i.range.start.x && n10.range.start.y === i.range.start.y && n10.range.end.x === i.range.end.x && n10.range.end.y === i.range.end.y;
7574
7512
  }
7575
- var Er = class extends Sr {
7513
+ var gr = class extends mr {
7576
7514
  constructor(e = {}) {
7577
7515
  super(e);
7578
- this._linkifier = this._register(new P());
7516
+ this._linkifier = this._register(new B());
7579
7517
  this.browser = Ke;
7580
7518
  this._keyDownHandled = false;
7581
7519
  this._keyDownSeen = false;
7582
7520
  this._keyPressHandled = false;
7583
7521
  this._unprocessedDeadKey = false;
7584
- this._accessibilityManager = this._register(new P());
7522
+ this._accessibilityManager = this._register(new B());
7585
7523
  this._onCursorMove = this._register(new b());
7586
7524
  this.onCursorMove = this._onCursorMove.event;
7587
7525
  this._onKey = this._register(new b());
@@ -7599,7 +7537,7 @@ var Er = class extends Sr {
7599
7537
  this._onWillOpen = this._register(new b());
7600
7538
  this._onDimensionsChange = this._register(new b());
7601
7539
  this.onDimensionsChange = this._onDimensionsChange.event;
7602
- this._setup(), this._decorationService = this._instantiationService.createInstance(Bt), this._instantiationService.setService(ge, this._decorationService), this._keyboardService = this._instantiationService.createInstance(xt), this._instantiationService.setService(zs, this._keyboardService), this._linkProviderService = this._instantiationService.createInstance(zi), this._instantiationService.setService(Ii, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(et)), this._register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this._register(this._inputHandler.onRequestRefreshRows((t) => this.refresh(t?.start ?? 0, t?.end ?? this.rows - 1))), this._register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this._register(this._inputHandler.onRequestReset(() => this.reset())), this._register(this._inputHandler.onRequestWindowsOptionsReport((t) => this._reportWindowsOptions(t))), this._register(this._inputHandler.onColor((t) => this._handleColorEvent(t))), this._register(j.forward(this._inputHandler.onCursorMove, this._onCursorMove)), this._register(j.forward(this._inputHandler.onTitleChange, this._onTitleChange)), this._register(j.forward(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this._register(j.forward(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this._register(this._bufferService.onResize((t) => this._afterResize(t.cols, t.rows))), this._register(E(() => {
7540
+ this._setup(), this._decorationService = this._instantiationService.createInstance(Pt), this._instantiationService.setService(ge, this._decorationService), this._keyboardService = this._instantiationService.createInstance(xt), this._instantiationService.setService(Ks, this._keyboardService), this._linkProviderService = this._instantiationService.createInstance(Ki), this._instantiationService.setService(gi, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(et)), this._register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this._register(this._inputHandler.onRequestRefreshRows((t) => this.refresh(t?.start ?? 0, t?.end ?? this.rows - 1))), this._register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this._register(this._inputHandler.onRequestReset(() => this.reset())), this._register(this._inputHandler.onRequestWindowsOptionsReport((t) => this._reportWindowsOptions(t))), this._register(this._inputHandler.onColor((t) => this._handleColorEvent(t))), this._register(j.forward(this._inputHandler.onCursorMove, this._onCursorMove)), this._register(j.forward(this._inputHandler.onTitleChange, this._onTitleChange)), this._register(j.forward(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this._register(j.forward(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this._register(this._bufferService.onResize((t) => this._afterResize(t.cols, t.rows))), this._register(E(() => {
7603
7541
  this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
7604
7542
  }));
7605
7543
  }
@@ -7645,7 +7583,7 @@ var Er = class extends Sr {
7645
7583
  switch (t.type) {
7646
7584
  case 0:
7647
7585
  let o = k.toColorRGB(r === "ansi" ? this._themeService.colors.ansi[t.index] : this._themeService.colors[r]);
7648
- this.coreService.triggerDataEvent(`\x1B]${s};${En(o)}\x1B\\`);
7586
+ this.coreService.triggerDataEvent(`\x1B]${s};${In(o)}\x1B\\`);
7649
7587
  break;
7650
7588
  case 1:
7651
7589
  if (r === "ansi") this._themeService.modifyColors((a) => a.ansi[t.index] = O.toColor(...t.color));
@@ -7695,15 +7633,15 @@ var Er = class extends Sr {
7695
7633
  }
7696
7634
  _initGlobal() {
7697
7635
  this._bindKeys(), this._register(C(this.element, "copy", (t) => {
7698
- this.hasSelection() && Os(t, this._selectionService);
7636
+ this.hasSelection() && Bs(t, this._selectionService);
7699
7637
  }));
7700
- let e = (t) => Ns(t, this.textarea, this.coreService, this.optionsService);
7638
+ let e = (t) => Os(t, this.textarea, this.coreService, this.optionsService);
7701
7639
  this._register(C(this.textarea, "paste", e)), this._register(C(this.element, "paste", e)), nt ? this._register(C(this.element, "mousedown", (t) => {
7702
- t.button === 2 && Hr(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
7640
+ t.button === 2 && Or(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
7703
7641
  })) : this._register(C(this.element, "contextmenu", (t) => {
7704
- Hr(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
7642
+ Or(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
7705
7643
  })), zt && this._register(C(this.element, "auxclick", (t) => {
7706
- t.button === 1 && Fr(t, this.textarea, this.screenElement);
7644
+ t.button === 1 && Br(t, this.textarea, this.screenElement);
7707
7645
  }));
7708
7646
  }
7709
7647
  _bindKeys() {
@@ -7721,10 +7659,10 @@ var Er = class extends Sr {
7721
7659
  let t = this._document.createDocumentFragment();
7722
7660
  this._viewportElement = this._document.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), t.appendChild(this._viewportElement), this.screenElement = this._document.createElement("div"), this.screenElement.classList.add("xterm-screen"), this._register(C(this.screenElement, "mousemove", (l) => this.updateCursorStyle(l))), this._helperContainer = this._document.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), t.appendChild(this.screenElement);
7723
7661
  let r = this.textarea = this._document.createElement("textarea");
7724
- this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", Ut.get()), Yr || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._register(this.optionsService.onSpecificOptionChange("disableStdin", () => r.readOnly = this.optionsService.rawOptions.disableStdin)), this.textarea.readOnly = this.optionsService.rawOptions.disableStdin, this._coreBrowserService = this._register(this._instantiationService.createInstance(Ki, this.textarea, e.ownerDocument.defaultView ?? window, this._document ?? (typeof window < "u" ? window.document : null))), this._instantiationService.setService(G, this._coreBrowserService), this._register(C(this.textarea, "focus", (l) => this._handleTextAreaFocus(l))), this._register(C(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(bt, this._document, this._helperContainer), this._instantiationService.setService(Be, this._charSizeService), this._themeService = this._instantiationService.createInstance(yt), this._instantiationService.setService(_e, this._themeService), this._register(this._inputHandler.onRequestColorSchemeQuery(() => this._reportColorScheme())), this._register(this._themeService.onChangeColors(() => {
7662
+ this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", Ut.get()), $r || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocomplete", "off"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._register(this.optionsService.onSpecificOptionChange("disableStdin", () => r.readOnly = this.optionsService.rawOptions.disableStdin)), this.textarea.readOnly = this.optionsService.rawOptions.disableStdin, this._coreBrowserService = this._register(this._instantiationService.createInstance(Ui, this.textarea, e.ownerDocument.defaultView ?? window, this._document ?? (typeof window < "u" ? window.document : null))), this._instantiationService.setService(G, this._coreBrowserService), this._register(C(this.textarea, "focus", (l) => this._handleTextAreaFocus(l))), this._register(C(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(bt, this._document, this._helperContainer), this._instantiationService.setService(Pe, this._charSizeService), this._themeService = this._instantiationService.createInstance(yt), this._instantiationService.setService(_e, this._themeService), this._register(this._inputHandler.onRequestColorSchemeQuery(() => this._reportColorScheme())), this._register(this._themeService.onChangeColors(() => {
7725
7663
  this.coreService.decPrivateModes.colorSchemeUpdates && this._reportColorScheme();
7726
- })), this._characterJoinerService = this._instantiationService.createInstance(He), this._instantiationService.setService(gi, this._characterJoinerService), this._renderService = this._register(this._instantiationService.createInstance(Ct, this.rows, this.screenElement)), this._instantiationService.setService(V, this._renderService), this._register(this._renderService.onRenderedViewportChange((l) => this._onRender.fire(l))), this._register(this._renderService.onDimensionsChange((l) => this._onDimensionsChange.fire({ css: { canvas: { ...l.css.canvas }, cell: { ...l.css.cell } }, device: { canvas: { ...l.device.canvas }, cell: { ...l.device.cell }, char: { ...l.device.char } } }))), this.onResize((l) => this._renderService.resize(l.cols, l.rows)), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(ft, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseCoordsService = this._instantiationService.createInstance(vt), this._instantiationService.setService(Pe, this._mouseCoordsService);
7727
- let s = this._linkifier.value = this._register(this._instantiationService.createInstance(Pt, this.screenElement));
7664
+ })), this._characterJoinerService = this._instantiationService.createInstance(He), this._instantiationService.setService(Si, this._characterJoinerService), this._renderService = this._register(this._instantiationService.createInstance(Ct, this.rows, this.screenElement)), this._instantiationService.setService(V, this._renderService), this._register(this._renderService.onRenderedViewportChange((l) => this._onRender.fire(l))), this._register(this._renderService.onDimensionsChange((l) => this._onDimensionsChange.fire({ css: { canvas: { ...l.css.canvas }, cell: { ...l.css.cell } }, device: { canvas: { ...l.device.canvas }, cell: { ...l.device.cell }, char: { ...l.device.char } } }))), this.onResize((l) => this._renderService.resize(l.cols, l.rows)), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(ft, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseCoordsService = this._instantiationService.createInstance(vt), this._instantiationService.setService(Be, this._mouseCoordsService);
7665
+ let s = this._linkifier.value = this._register(this._instantiationService.createInstance(Bt, this.screenElement));
7728
7666
  this.element.appendChild(t);
7729
7667
  try {
7730
7668
  this._onWillOpen.fire(this.element);
@@ -7737,7 +7675,7 @@ var Er = class extends Sr {
7737
7675
  this._renderService.handleResize(this.cols, this.rows), this._syncTextArea();
7738
7676
  })), this._register(this.onBlur(() => this._renderService.handleBlur())), this._register(this.onFocus(() => this._renderService.handleFocus())), this._viewport = this._register(this._instantiationService.createInstance(dt, this.element, this.screenElement)), this._register(this._viewport.onRequestScrollLines((l) => {
7739
7677
  super.scrollLines(l, false), this.refresh(0, this.rows - 1);
7740
- })), this._selectionService = this._register(this._instantiationService.createInstance(Et, this.element, this.screenElement, s)), this._instantiationService.setService(Si, this._selectionService), this._mouseService = this._instantiationService.createInstance(gt), this._instantiationService.setService(Ks, this._mouseService), this._register(this._selectionService.onRequestScrollLines((l) => this.scrollLines(l.amount, l.suppressScrollEvent))), this._register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this._register(this._selectionService.onRequestRedraw((l) => this._renderService.handleSelectionChanged(l.start, l.end, l.columnSelectMode))), this._register(this._selectionService.onLinuxMouseSelection((l) => {
7678
+ })), this._selectionService = this._register(this._instantiationService.createInstance(Et, this.element, this.screenElement, s)), this._instantiationService.setService(vi, this._selectionService), this._mouseService = this._instantiationService.createInstance(gt), this._instantiationService.setService(Us, this._mouseService), this._register(this._selectionService.onRequestScrollLines((l) => this.scrollLines(l.amount, l.suppressScrollEvent))), this._register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this._register(this._selectionService.onRequestRedraw((l) => this._renderService.handleSelectionChanged(l.start, l.end, l.columnSelectMode))), this._register(this._selectionService.onLinuxMouseSelection((l) => {
7741
7679
  this.textarea.value = l, this.textarea.focus(), this.textarea.select();
7742
7680
  })), this._register(j.any(this._onScroll.event, this._inputHandler.onScroll)(() => {
7743
7681
  this._selectionService.refresh(), this._viewport?.queueSync();
@@ -7777,7 +7715,7 @@ var Er = class extends Sr {
7777
7715
  t !== 0 && this.scrollLines(t);
7778
7716
  }
7779
7717
  paste(e) {
7780
- Nr(e, this.textarea, this.coreService, this.optionsService);
7718
+ Pr(e, this.textarea, this.coreService, this.optionsService);
7781
7719
  }
7782
7720
  attachCustomKeyEventHandler(e) {
7783
7721
  this._customKeyEventHandler = e;
@@ -7840,7 +7778,7 @@ var Er = class extends Sr {
7840
7778
  if (r.type === 1 && this.selectAll(), this._isThirdLevelShift(this.browser, e) || (r.cancel && (e.preventDefault(), e.stopPropagation()), !r.key) || !this._keyboardService.useKitty && !this._keyboardService.useWin32InputMode && e.key && !e.ctrlKey && !e.altKey && !e.metaKey && e.key.length === 1 && e.key.charCodeAt(0) >= 65 && e.key.charCodeAt(0) <= 90) return true;
7841
7779
  if (this._unprocessedDeadKey) return this._unprocessedDeadKey = false, true;
7842
7780
  (r.key === "" || r.key === "\r") && (this.textarea.value = "");
7843
- let s = this._keyboardService.useWin32InputMode && Ts(e);
7781
+ let s = this._keyboardService.useWin32InputMode && ws(e);
7844
7782
  if (this._onKey.fire({ key: r.key, domEvent: e }), this._showCursor(), this.coreService.triggerDataEvent(r.key, !s), !this.optionsService.rawOptions.screenReaderMode || e.altKey || e.ctrlKey) return e.preventDefault(), e.stopPropagation(), false;
7845
7783
  this._keyDownHandled = true;
7846
7784
  }
@@ -7850,10 +7788,10 @@ var Er = class extends Sr {
7850
7788
  }
7851
7789
  _keyUp(e) {
7852
7790
  if (this._keyDownSeen = false, this._customKeyEventHandler && this._customKeyEventHandler(e) === false) return;
7853
- Ts(e) || this.focus();
7791
+ ws(e) || this.focus();
7854
7792
  let t = this._keyboardService.evaluateKeyUp(e);
7855
7793
  if (t?.key) {
7856
- let r = this._keyboardService.useWin32InputMode && Ts(e);
7794
+ let r = this._keyboardService.useWin32InputMode && ws(e);
7857
7795
  this.coreService.triggerDataEvent(t.key, !r);
7858
7796
  }
7859
7797
  this.updateCursorStyle(e), this._keyPressHandled = false;
@@ -7915,10 +7853,10 @@ var Er = class extends Sr {
7915
7853
  }
7916
7854
  }
7917
7855
  };
7918
- function Ts(n10) {
7856
+ function ws(n10) {
7919
7857
  return n10.keyCode === 16 || n10.keyCode === 17 || n10.keyCode === 18 || n10.keyCode === 91 || n10.keyCode === 92 || n10.keyCode === 93 || n10.keyCode === 224 || n10.key === "Meta";
7920
7858
  }
7921
- var yr = class {
7859
+ var Ir = class {
7922
7860
  constructor() {
7923
7861
  this._addons = [];
7924
7862
  }
@@ -7940,7 +7878,7 @@ var yr = class {
7940
7878
  i.isDisposed = true, i.dispose.apply(i.instance), this._addons.splice(e, 1);
7941
7879
  }
7942
7880
  };
7943
- var xr = class {
7881
+ var Cr = class {
7944
7882
  constructor(i) {
7945
7883
  this._line = i;
7946
7884
  }
@@ -7957,7 +7895,7 @@ var xr = class {
7957
7895
  return this._line.translateToString(i, e, t);
7958
7896
  }
7959
7897
  };
7960
- var di = class {
7898
+ var hi = class {
7961
7899
  constructor(i, e) {
7962
7900
  this._buffer = i;
7963
7901
  this.type = e;
@@ -7982,19 +7920,19 @@ var di = class {
7982
7920
  }
7983
7921
  getLine(i) {
7984
7922
  let e = this._buffer.lines.get(i);
7985
- if (e) return new xr(e);
7923
+ if (e) return new Cr(e);
7986
7924
  }
7987
7925
  getNullCell() {
7988
7926
  return new F();
7989
7927
  }
7990
7928
  };
7991
- var wr = class extends g {
7929
+ var Er = class extends g {
7992
7930
  constructor(e) {
7993
7931
  super();
7994
7932
  this._core = e;
7995
7933
  this._onBufferChange = this._register(new b());
7996
7934
  this.onBufferChange = this._onBufferChange.event;
7997
- this._normal = new di(this._core.buffers.normal, "normal"), this._alternate = new di(this._core.buffers.alt, "alternate"), this._register(this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active)));
7935
+ this._normal = new hi(this._core.buffers.normal, "normal"), this._alternate = new hi(this._core.buffers.alt, "alternate"), this._register(this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active)));
7998
7936
  }
7999
7937
  get active() {
8000
7938
  if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
@@ -8008,7 +7946,7 @@ var wr = class extends g {
8008
7946
  return this._alternate.init(this._core.buffers.alt);
8009
7947
  }
8010
7948
  };
8011
- var Tr = class {
7949
+ var yr = class {
8012
7950
  constructor(i) {
8013
7951
  this._core = i;
8014
7952
  }
@@ -8040,7 +7978,7 @@ var Tr = class {
8040
7978
  return this._core.registerApcHandler(i, e);
8041
7979
  }
8042
7980
  };
8043
- var Dr = class {
7981
+ var xr = class {
8044
7982
  constructor(i) {
8045
7983
  this._core = i;
8046
7984
  }
@@ -8057,9 +7995,9 @@ var Dr = class {
8057
7995
  this._core.unicodeService.activeVersion = i;
8058
7996
  }
8059
7997
  };
8060
- var wo = ["cols", "rows"], Ee = 0, Ln = class extends g {
7998
+ var yo = ["cols", "rows"], Ee = 0, Dn = class extends g {
8061
7999
  constructor(i) {
8062
- super(), this._core = this._register(new Er(i)), this._addonManager = this._register(new yr()), this._publicOptions = { ...this._core.options };
8000
+ super(), this._core = this._register(new gr(i)), this._addonManager = this._register(new Ir()), this._publicOptions = { ...this._core.options };
8063
8001
  let e = (r) => this._core.options[r], t = (r, s) => {
8064
8002
  this._checkReadonlyOptions(r), this._core.options[r] = s;
8065
8003
  };
@@ -8069,7 +8007,7 @@ var wo = ["cols", "rows"], Ee = 0, Ln = class extends g {
8069
8007
  }
8070
8008
  }
8071
8009
  _checkReadonlyOptions(i) {
8072
- if (wo.includes(i)) throw new Error(`Option "${i}" can only be set in the constructor`);
8010
+ if (yo.includes(i)) throw new Error(`Option "${i}" can only be set in the constructor`);
8073
8011
  }
8074
8012
  _checkProposedApi() {
8075
8013
  if (!this._core.optionsService.rawOptions.allowProposedApi) throw new Error("You must set the allowProposedApi option to true to use proposed API");
@@ -8120,10 +8058,10 @@ var wo = ["cols", "rows"], Ee = 0, Ln = class extends g {
8120
8058
  return this._core.screenElement;
8121
8059
  }
8122
8060
  get parser() {
8123
- return this._parser ??= new Tr(this._core);
8061
+ return this._parser ??= new yr(this._core);
8124
8062
  }
8125
8063
  get unicode() {
8126
- return this._checkProposedApi(), new Dr(this._core);
8064
+ return this._checkProposedApi(), new xr(this._core);
8127
8065
  }
8128
8066
  get textarea() {
8129
8067
  return this._core.textarea;
@@ -8135,7 +8073,7 @@ var wo = ["cols", "rows"], Ee = 0, Ln = class extends g {
8135
8073
  return this._core.cols;
8136
8074
  }
8137
8075
  get buffer() {
8138
- return this._buffer ??= this._register(new wr(this._core));
8076
+ return this._buffer ??= this._register(new Er(this._core));
8139
8077
  }
8140
8078
  get markers() {
8141
8079
  return this._core.markers;
@@ -8286,5 +8224,5 @@ var wo = ["cols", "rows"], Ee = 0, Ln = class extends g {
8286
8224
  }
8287
8225
  };
8288
8226
  export {
8289
- Ln as Terminal
8227
+ Dn as Terminal
8290
8228
  };