@qwen-code/qwen-code 0.21.1-simplify-system-prompt.0 → 0.21.1

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 (405) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +38 -28
  3. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/channels/github.md +107 -0
  5. package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
  6. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  7. package/bundled/qc-helper/docs/features/hooks.md +52 -15
  8. package/bundled/qc-helper/docs/features/mcp.md +9 -1
  9. package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
  10. package/bundled/qc-helper/docs/features/sub-agents.md +20 -0
  11. package/bundled/qc-helper/docs/qwen-serve.md +4 -2
  12. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  13. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  14. package/bundled/review/DESIGN.md +19 -0
  15. package/bundled/review/SKILL.md +120 -61
  16. package/chunks/MaxSizedBox-VI3ROJJA.js +84 -0
  17. package/chunks/{StandaloneSessionPicker-O6RKBPU4.js → StandaloneSessionPicker-LYXKD2EV.js} +66 -68
  18. package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
  19. package/chunks/{acpAgent-HYFVXVDR.js → acpAgent-WN5SRDQO.js} +1317 -542
  20. package/chunks/agent-K6ECSM64.js +80 -0
  21. package/chunks/agent-headless-NO4Y2HOE.js +74 -0
  22. package/chunks/{anthropicContentGenerator-LXUXMOE7.js → anthropicContentGenerator-V2QOGVYD.js} +61 -20
  23. package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-6K6U7XYJ.js} +4 -4
  24. package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-GD2IJJ7I.js} +4 -4
  25. package/chunks/bridge-3KJEWDNE.js +90 -0
  26. package/chunks/{build-RV63TIRH.js → build-S6DO7LMM.js} +1 -1
  27. package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
  28. package/chunks/{channel-management-service-G74LFADV.js → channel-management-service-XR7GZSWF.js} +4 -4
  29. package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
  30. package/chunks/{channel-worker-group-PTJIJSKC.js → channel-worker-group-XDPTDWTX.js} +9 -5
  31. package/chunks/{channel-worker-manager-WIMGM2FD.js → channel-worker-manager-YYEHVRRE.js} +9 -5
  32. package/chunks/{channel-worker-supervisor-KUFTR6P5.js → channel-worker-supervisor-74HTWA2G.js} +5 -4
  33. package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
  34. package/chunks/{chunk-WDSWXQU3.js → chunk-2FAK6PNM.js} +2 -2
  35. package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
  36. package/chunks/{chunk-EPDRMGT4.js → chunk-2LKVPASC.js} +4 -28
  37. package/chunks/{chunk-PWTZEM3C.js → chunk-2LQTH543.js} +3 -37
  38. package/chunks/{chunk-PANH4R3B.js → chunk-2N7CODY5.js} +18 -12
  39. package/chunks/{chunk-ER5LWJR6.js → chunk-2XSLTRFZ.js} +3 -3
  40. package/chunks/{chunk-6PSLCFQ2.js → chunk-3EFXSQCM.js} +18 -9
  41. package/chunks/{chunk-HIJQF5B5.js → chunk-3L2SPEBH.js} +1 -1
  42. package/chunks/{chunk-BIQWWWJN.js → chunk-4G2BISNC.js} +1 -1
  43. package/chunks/{chunk-B4UMZKMU.js → chunk-52ZSWYEG.js} +1 -1
  44. package/chunks/{chunk-YAF5VNU7.js → chunk-5KTQXHPY.js} +4 -5
  45. package/chunks/{chunk-2YZJCM5T.js → chunk-5MKRTI4T.js} +4 -4
  46. package/chunks/{chunk-DHHOYAPR.js → chunk-5TBMQLGG.js} +7 -7
  47. package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
  48. package/chunks/{chunk-FY3M44RD.js → chunk-5YKDXHUY.js} +3 -3
  49. package/chunks/{chunk-TF2X2WCT.js → chunk-5ZF5XXTS.js} +2 -2
  50. package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
  51. package/chunks/{chunk-B7QDM6Z7.js → chunk-657BH7VM.js} +2 -2
  52. package/chunks/{chunk-5THCYPLO.js → chunk-65PQENQP.js} +14 -7
  53. package/chunks/{chunk-J6D3VXCC.js → chunk-6PE7N3A4.js} +17 -6
  54. package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
  55. package/chunks/{chunk-Z5BLYMZM.js → chunk-6RPMI2AB.js} +6 -6
  56. package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
  57. package/chunks/{chunk-BO4XCS7P.js → chunk-75MIQ3LV.js} +20 -85
  58. package/chunks/{chunk-52O2CIUL.js → chunk-7AEJDLRA.js} +130 -5
  59. package/chunks/{chunk-BYFNTGKI.js → chunk-7BAU433D.js} +2287 -941
  60. package/chunks/{chunk-ZE5WPL4I.js → chunk-7DXQIJID.js} +3 -3
  61. package/chunks/{chunk-ML52PL6O.js → chunk-7I5GTCT4.js} +483 -248
  62. package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
  63. package/chunks/{chunk-C3NS4F2Q.js → chunk-A2D5BAVP.js} +1 -1
  64. package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
  65. package/chunks/{chunk-2JM6GZ5D.js → chunk-A4COXFB3.js} +8 -13
  66. package/chunks/{chunk-CC4N4M36.js → chunk-AQIDMUGU.js} +1 -1
  67. package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
  68. package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
  69. package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
  70. package/chunks/{chunk-SRZ6DXVG.js → chunk-BGTQCTQW.js} +44 -136
  71. package/chunks/{chunk-PSWQZHEA.js → chunk-BMFALVGQ.js} +1 -1
  72. package/chunks/{chunk-XHRTVPG2.js → chunk-BNWB5CYE.js} +7 -7
  73. package/chunks/{chunk-P5V4T7NK.js → chunk-BPZKP57P.js} +11 -3
  74. package/chunks/{chunk-2OM7GEXO.js → chunk-CAPPWD3X.js} +3 -3
  75. package/chunks/{chunk-LNURQEMZ.js → chunk-CQL64ESB.js} +7 -7
  76. package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
  77. package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
  78. package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
  79. package/chunks/{chunk-SQBYH7PX.js → chunk-DZLYR4U3.js} +1 -1
  80. package/chunks/{chunk-JALU3ZDU.js → chunk-EIF3FXTB.js} +117 -24
  81. package/chunks/{chunk-TQCBGUHN.js → chunk-EJGJIBRS.js} +5 -5
  82. package/chunks/{chunk-5U4IPFBR.js → chunk-EVKE2FZL.js} +4 -4
  83. package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
  84. package/chunks/{chunk-KU5XMLDK.js → chunk-FTD6DP4T.js} +3 -1
  85. package/chunks/chunk-FYJ7W2PI.js +194 -0
  86. package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
  87. package/chunks/{chunk-MVS3NS2N.js → chunk-GEBV2JGB.js} +28 -5
  88. package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
  89. package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
  90. package/chunks/{chunk-N3FAY5CM.js → chunk-GNR2RNMP.js} +157 -4
  91. package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
  92. package/chunks/{chunk-HV3G62R6.js → chunk-GZ3RCT54.js} +1 -1
  93. package/chunks/{chunk-QY5MMZ6O.js → chunk-HMRM2A3U.js} +3 -3
  94. package/chunks/chunk-HV26XH34.js +319 -0
  95. package/chunks/{chunk-M4UKFCZ2.js → chunk-J7OACQDE.js} +193 -155
  96. package/chunks/{chunk-3HBZKBMQ.js → chunk-JFMA7Y5M.js} +5 -5
  97. package/chunks/{chunk-OJGCZBB7.js → chunk-JHNRZMHI.js} +41 -36
  98. package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
  99. package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
  100. package/chunks/{chunk-KIUFNBHR.js → chunk-JTV5K7NH.js} +1 -1
  101. package/chunks/{chunk-PHVR5UUY.js → chunk-JX27F6QS.js} +1 -1
  102. package/chunks/chunk-JYBU6YUE.js +378 -0
  103. package/chunks/{chunk-A6UO2C7C.js → chunk-KAMYKP7E.js} +167 -81
  104. package/chunks/{chunk-LG4GZIVV.js → chunk-KCO4FLFJ.js} +4 -4
  105. package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
  106. package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
  107. package/chunks/{chunk-DM22XS4K.js → chunk-LO4ROVP4.js} +261 -15
  108. package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
  109. package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
  110. package/chunks/{chunk-V6VRAM7B.js → chunk-MHAIJPTD.js} +12 -12
  111. package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
  112. package/chunks/{chunk-LZEMEFKY.js → chunk-MR5EAQ5M.js} +1 -1
  113. package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
  114. package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
  115. package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
  116. package/chunks/{chunk-B6ZJ7SI6.js → chunk-OCESJA77.js} +391 -328
  117. package/chunks/chunk-OCPBI7J5.js +18 -0
  118. package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
  119. package/chunks/{chunk-2Q3OT4OV.js → chunk-P4WOAOJW.js} +141 -64
  120. package/chunks/{chunk-4M377AZG.js → chunk-PB3MBFKG.js} +6 -6
  121. package/chunks/{chunk-QPDRAXDJ.js → chunk-PLDQBIO6.js} +1 -1
  122. package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
  123. package/chunks/{chunk-RWS5VYWC.js → chunk-PT722TDT.js} +267 -378
  124. package/chunks/chunk-Q43KPN7X.js +2196 -0
  125. package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
  126. package/chunks/{chunk-SASBXAQL.js → chunk-QIZKCVM3.js} +4 -4
  127. package/chunks/{chunk-32MVHM4T.js → chunk-RCUQIPTN.js} +1 -1
  128. package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
  129. package/chunks/{chunk-3IXOIAKE.js → chunk-S4WJVPZW.js} +18 -6
  130. package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
  131. package/chunks/{chunk-INADJJGW.js → chunk-S7W2GKIO.js} +0 -2
  132. package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
  133. package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
  134. package/chunks/chunk-T26EAKDL.js +13 -0
  135. package/chunks/{chunk-3MSHSCSN.js → chunk-T2QMKU3R.js} +79 -1
  136. package/chunks/{chunk-VFSJ5VRH.js → chunk-T3O2B4XO.js} +3 -3
  137. package/chunks/{chunk-MSLKI6C2.js → chunk-T4TXDL7G.js} +32 -21
  138. package/chunks/{chunk-E5WH5O3C.js → chunk-TBBV36Y4.js} +4 -4
  139. package/chunks/{chunk-VV6XU5L7.js → chunk-TCIFAA7K.js} +16 -11
  140. package/chunks/{chunk-DN6ZX5AY.js → chunk-TDL6LB4K.js} +46 -11
  141. package/chunks/{chunk-W4CQXHT6.js → chunk-TFRMVU6R.js} +1 -1
  142. package/chunks/{chunk-GDIPH4JY.js → chunk-TV64SXKD.js} +6 -6
  143. package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
  144. package/chunks/{chunk-7FZEBPKS.js → chunk-UBEPNVDI.js} +23 -18
  145. package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
  146. package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
  147. package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
  148. package/chunks/{chunk-U7TXFVUN.js → chunk-VCPIZRYH.js} +118 -95
  149. package/chunks/{chunk-LNARWLZQ.js → chunk-VWOOBLTY.js} +2 -2
  150. package/chunks/{chunk-I7XZ3RY5.js → chunk-VYOXCEPJ.js} +1 -1
  151. package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
  152. package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
  153. package/chunks/{chunk-G4WFQUYQ.js → chunk-WUZ7H6DP.js} +1 -1
  154. package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
  155. package/chunks/{chunk-DM4Q4JJH.js → chunk-X5WNMMIA.js} +22506 -33611
  156. package/chunks/{chunk-MK7VQDN3.js → chunk-XBYYDKAZ.js} +7 -6
  157. package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
  158. package/chunks/{chunk-BRRAJXPA.js → chunk-XFZYFU3I.js} +1 -1
  159. package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
  160. package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
  161. package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
  162. package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
  163. package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
  164. package/chunks/{chunk-3JAQDSXN.js → chunk-YGF33UXG.js} +70 -8
  165. package/chunks/chunk-Z4X5MTRT.js +133 -0
  166. package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
  167. package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
  168. package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
  169. package/chunks/{chunk-66RMLJHC.js → chunk-ZURDMIDR.js} +355 -143
  170. package/chunks/{computer-use-DOFAHZAB.js → computer-use-ZTIDHMMA.js} +48 -50
  171. package/chunks/{config-utils-VFQXVGNR.js → config-utils-NYSXDMEQ.js} +4 -4
  172. package/chunks/contextCommand-2PIEU37Z.js +79 -0
  173. package/chunks/core-runtime-3XEYLQFK.js +133 -0
  174. package/chunks/{create-sub-session-7543K2QA.js → create-sub-session-R76FVXCI.js} +45 -47
  175. package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
  176. package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
  177. package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
  178. package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
  179. package/chunks/{daemon-VOMQW7KZ.js → daemon-Q2AB5Z23.js} +167 -15
  180. package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
  181. package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
  182. package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
  183. package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
  184. package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
  185. package/chunks/dist-BSTVRPMT.js +4227 -0
  186. package/chunks/{dist-NNVBBOGU.js → dist-DOLYHMXE.js} +2 -2
  187. package/chunks/{dist-RTJFMNEZ.js → dist-HVRQ2CFL.js} +271 -11
  188. package/chunks/{dist-ANLAT3GS.js → dist-IXQEQWRG.js} +2 -1
  189. package/chunks/{dist-BRB6EXK4.js → dist-SSU66DM4.js} +3 -3
  190. package/chunks/{dist-KTYYJ2C5.js → dist-SV7Q3AWJ.js} +1 -1
  191. package/chunks/{dist-K6Y4E7FX.js → dist-YGBBMK3Z.js} +1 -1
  192. package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
  193. package/chunks/{edit-RIEOJWKB.js → edit-HHGIOTQ2.js} +47 -49
  194. package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
  195. package/chunks/{enter-worktree-OGK5FQ3R.js → enter-worktree-ZN7PUQ46.js} +47 -49
  196. package/chunks/{enterPlanMode-IWZYALIB.js → enterPlanMode-EIFIDSIV.js} +47 -49
  197. package/chunks/{environment-VZ7BRI4Q.js → environment-XXQ75D2Q.js} +47 -49
  198. package/chunks/errors-4GMVU7CK.js +87 -0
  199. package/chunks/esm-K5FARBNI.js +5548 -0
  200. package/chunks/{exit-worktree-4TEYVIVP.js → exit-worktree-GXMI4ATY.js} +47 -49
  201. package/chunks/exitPlanMode-34UVY7M6.js +72 -0
  202. package/chunks/{fast-path-HYE7IFEV.js → fast-path-VPIVA7L6.js} +13 -3
  203. package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
  204. package/chunks/{gemini-NGRQX3YJ.js → gemini-4BWIK4WD.js} +103 -103
  205. package/chunks/{geminiContentGenerator-FQHPFZSR.js → geminiContentGenerator-3XVV5MSS.js} +7 -7
  206. package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
  207. package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
  208. package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
  209. package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
  210. package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
  211. package/chunks/{glob-FRTM3X2E.js → glob-TZ2ABCJG.js} +47 -49
  212. package/chunks/{grep-RKWVROCW.js → grep-BEF463NA.js} +49 -50
  213. package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
  214. package/chunks/i18n-FMM5FDXR.js +96 -0
  215. package/chunks/{image-gen-WIEM7KZA.js → image-gen-HHVLF7HS.js} +12 -12
  216. package/chunks/initializer-625TIAIO.js +85 -0
  217. package/chunks/installationInfo-6AM4I2Y3.js +79 -0
  218. package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
  219. package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
  220. package/chunks/lib-RUF3WZA6.js +9 -0
  221. package/chunks/list-L2GA674Y.js +88 -0
  222. package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
  223. package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
  224. package/chunks/{loggingContentGenerator-WGM27QAW.js → loggingContentGenerator-LKOF7XI7.js} +31 -30
  225. package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
  226. package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
  227. package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
  228. package/chunks/{managed-npm-update-JQ2CG3RH.js → managed-npm-update-ACQGGIN5.js} +46 -48
  229. package/chunks/mcp-SZLHKFJW.js +82 -0
  230. package/chunks/{monitor-7FEWXX5F.js → monitor-DF52UVHI.js} +47 -49
  231. package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
  232. package/chunks/{notebook-edit-JGJV2K6J.js → notebook-edit-FCWS4XVN.js} +47 -49
  233. package/chunks/{openaiContentGenerator-JPVXDTAO.js → openaiContentGenerator-7LDK3DCJ.js} +25 -27
  234. package/chunks/pidfile-6ERW3DF4.js +85 -0
  235. package/chunks/process-registry-2CHQBXH5.js +157 -0
  236. package/chunks/{processUtils-V2LCK6T6.js → processUtils-COKZAMUP.js} +2 -2
  237. package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
  238. package/chunks/{qwenContentGenerator-TICV2W2Z.js → qwenContentGenerator-TKWUMR7N.js} +51 -53
  239. package/chunks/{qwenOAuth2-XGFI5XJG.js → qwenOAuth2-7HMU47SF.js} +10 -10
  240. package/chunks/read-file-X6DRC574.js +29 -0
  241. package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
  242. package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
  243. package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
  244. package/chunks/ripGrep-OWV2IVJC.js +72 -0
  245. package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
  246. package/chunks/{run-qwen-serve-3VCV4I7E.js → run-qwen-serve-TSTCO4XE.js} +917 -249
  247. package/chunks/{runtime-AXJWIEDU.js → runtime-DAUPSUKI.js} +55 -57
  248. package/chunks/{scheduler-RS2I6RU5.js → scheduler-KMADMT26.js} +45 -47
  249. package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
  250. package/chunks/{sdk-exporters-http-FS6ZV7MF.js → sdk-exporters-http-WO556XNU.js} +7 -7
  251. package/chunks/{sdk-impl-7FZSCSXB.js → sdk-impl-LPAVACSF.js} +10 -10
  252. package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
  253. package/chunks/serve-NNRWS6F4.js +88 -0
  254. package/chunks/{server-HRZ23U7M.js → server-WEH7DVCH.js} +3304 -842
  255. package/chunks/{session-7XHZKTVV.js → session-WXC56V2I.js} +94 -94
  256. package/chunks/{settings-7ZGZDXAS.js → settings-DJDXFDZ3.js} +54 -56
  257. package/chunks/shell-JN5VRQXD.js +82 -0
  258. package/chunks/{skill-LIWXNLDW.js → skill-SGXPKJCS.js} +20 -22
  259. package/chunks/skill-settings-VJ5PDMZI.js +90 -0
  260. package/chunks/spawnChannel-ETMJW7YX.js +81 -0
  261. package/chunks/standalone-update-MK3Z7KBI.js +91 -0
  262. package/chunks/{startInteractiveUI-IW3CSKHA.js → startInteractiveUI-ZCGIXPGT.js} +715 -373
  263. package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
  264. package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
  265. package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
  266. package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
  267. package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
  268. package/chunks/{team-create-O2FROQ4R.js → team-create-QQGAJG7P.js} +49 -51
  269. package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
  270. package/chunks/{team-plan-approval-Q6WDBXTQ.js → team-plan-approval-RT7Q5R6O.js} +47 -49
  271. package/chunks/theme-manager-EEWIQJ7J.js +76 -0
  272. package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
  273. package/chunks/{tool-search-APECNQ3Z.js → tool-search-Z3Z4AYKP.js} +19 -21
  274. package/chunks/total-session-admission-44JKRWQD.js +84 -0
  275. package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
  276. package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
  277. package/chunks/trustedFolders-X2JEIO57.js +94 -0
  278. package/chunks/{update-relaunch-ON5MDJQG.js → update-relaunch-VWNPYDIP.js} +5 -5
  279. package/chunks/updateCheck-KAQH67DV.js +91 -0
  280. package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
  281. package/chunks/{validateNonInterActiveAuth-JBLKBKRD.js → validateNonInterActiveAuth-GIUJ2UFS.js} +88 -88
  282. package/chunks/{version-LTNUBQJY.js → version-BGLYIJUY.js} +1 -1
  283. package/chunks/{web-fetch-L5UTI53V.js → web-fetch-OTDU4VQF.js} +19 -21
  284. package/chunks/{web-search-KM33JOS3.js → web-search-FP6SIHPR.js} +13 -13
  285. package/chunks/{workflow-K7FAWV77.js → workflow-YCIVBYSB.js} +48 -50
  286. package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
  287. package/chunks/{workspace-registration-store-6TGVDJV5.js → workspace-registration-store-OTMS3H4C.js} +1 -1
  288. package/chunks/workspace-registry-O63R6IZ4.js +92 -0
  289. package/chunks/workspace-service-M6LLHKJ5.js +99 -0
  290. package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
  291. package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
  292. package/chunks/write-file-3BZC3EAE.js +72 -0
  293. package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
  294. package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
  295. package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
  296. package/chunks/zoom-image-TZ6S2O57.js +351 -0
  297. package/cli.js +13 -13
  298. package/locales/ca.js +7 -2
  299. package/locales/de.js +7 -2
  300. package/locales/en.js +10 -2
  301. package/locales/fr.js +7 -2
  302. package/locales/ja.js +7 -2
  303. package/locales/pt.js +7 -2
  304. package/locales/ru.js +7 -2
  305. package/locales/zh-TW.js +10 -2
  306. package/locales/zh.js +10 -2
  307. package/package.json +5 -4
  308. package/web-shell/assets/{arc-BbHijhiN.js → arc-75-Wdeo3.js} +1 -1
  309. package/web-shell/assets/{architectureDiagram-3BPJPVTR-Cb4B_JD0.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
  310. package/web-shell/assets/{blockDiagram-GPEHLZMM-Dsjlh3H-.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
  311. package/web-shell/assets/{c4Diagram-AAUBKEIU-Cp5AeR4U.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
  312. package/web-shell/assets/channel-DPYMT76A.js +1 -0
  313. package/web-shell/assets/{chunk-2J33WTMH-CLcY7W2e.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
  314. package/web-shell/assets/{chunk-4BX2VUAB-BUhvY2LR.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
  315. package/web-shell/assets/{chunk-55IACEB6-kDIFC_71.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
  316. package/web-shell/assets/{chunk-727SXJPM-CIBO15f2.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
  317. package/web-shell/assets/{chunk-AQP2D5EJ-BJ_T_slV.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
  318. package/web-shell/assets/{chunk-FMBD7UC4-BEkW35J8.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
  319. package/web-shell/assets/{chunk-ND2GUHAM-GGPxofay.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
  320. package/web-shell/assets/{chunk-QZHKN3VN-Bifllrb6.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
  321. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
  322. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
  323. package/web-shell/assets/{cose-bilkent-S5V4N54A-C-Add_Dp.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
  324. package/web-shell/assets/{dagre-BM42HDAG-B7MfwNq2.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
  325. package/web-shell/assets/{diagram-2AECGRRQ-CY_0zuDz.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
  326. package/web-shell/assets/{diagram-5GNKFQAL-VyYSbCgA.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
  327. package/web-shell/assets/{diagram-KO2AKTUF-CBiIZ2PL.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
  328. package/web-shell/assets/{diagram-LMA3HP47-BL3CrVOx.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
  329. package/web-shell/assets/{diagram-OG6HWLK6-CZUPx96P.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
  330. package/web-shell/assets/{erDiagram-TEJ5UH35-B81xHr1-.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
  331. package/web-shell/assets/{flowDiagram-I6XJVG4X-EZWhir-J.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
  332. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CVFSuIAg.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
  333. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-C1H2uQDv.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
  334. package/web-shell/assets/{index-BYo99NBH.js → index-CKIadvET.js} +1 -1
  335. package/web-shell/assets/index-D1eXNRHe.js +1389 -0
  336. package/web-shell/assets/index-DVLD4CQq.css +5 -0
  337. package/web-shell/assets/{infoDiagram-5YYISTIA-BwyFMlF8.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
  338. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
  339. package/web-shell/assets/{journeyDiagram-JHISSGLW-CJn2sf0l.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
  340. package/web-shell/assets/{kanban-definition-UN3LZRKU-DaNRqwVN.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
  341. package/web-shell/assets/{linear-DCKODZe2.js → linear-Dpigcc62.js} +1 -1
  342. package/web-shell/assets/{mermaid.core-CTGJOk27.js → mermaid.core-Ct97pqgW.js} +5 -5
  343. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BKU3_3rg.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
  344. package/web-shell/assets/{pieDiagram-4H26LBE5-COcwBJ82.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
  345. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CQnQ443x.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
  346. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ2oj5cD.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
  347. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BxAv5mNu.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
  348. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CztaySPs.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
  349. package/web-shell/assets/{stateDiagram-AJRCARHV-CTQT1oGD.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
  350. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
  351. package/web-shell/assets/{timeline-definition-PNZ67QCA-K9Mkex5A.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
  352. package/web-shell/assets/{vennDiagram-CIIHVFJN-B2rVIw76.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
  353. package/web-shell/assets/{wardley-L42UT6IY-Z1w2JR4M.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
  354. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CIX9aKXf.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
  355. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CI9DLIKB.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
  356. package/web-shell/index.html +2 -2
  357. package/chunks/MaxSizedBox-INHRH72H.js +0 -86
  358. package/chunks/agent-VXDAN5JK.js +0 -82
  359. package/chunks/agent-headless-K4ZMMNBD.js +0 -76
  360. package/chunks/bridge-LGPZCFHO.js +0 -91
  361. package/chunks/channel-settings-store-CHCDRTPY.js +0 -89
  362. package/chunks/chunk-SZRN75WQ.js +0 -29
  363. package/chunks/chunk-UGYMA4EI.js +0 -219
  364. package/chunks/chunk-VCBZUOSI.js +0 -8575
  365. package/chunks/contextCommand-QIZYHDR5.js +0 -81
  366. package/chunks/daemon-status-provider-OS5UWBHV.js +0 -90
  367. package/chunks/earlyInputCapture-WQT24RWD.js +0 -83
  368. package/chunks/errors-PCX25DVP.js +0 -89
  369. package/chunks/exitPlanMode-GHPUHBZJ.js +0 -423
  370. package/chunks/handleAutoUpdate-2CZQRJ66.js +0 -82
  371. package/chunks/i18n-XEQVMRKN.js +0 -98
  372. package/chunks/initializer-OVGZ4FLY.js +0 -87
  373. package/chunks/installationInfo-5UUQJI6Y.js +0 -81
  374. package/chunks/list-HODU6RXD.js +0 -90
  375. package/chunks/loadedSettingsAdapter-TYNLBALY.js +0 -84
  376. package/chunks/mcp-J3DFWX4A.js +0 -84
  377. package/chunks/nonInteractiveCli-F4GYSMHT.js +0 -144
  378. package/chunks/pidfile-4VNAR3EP.js +0 -87
  379. package/chunks/read-file-LZXUR4TO.js +0 -31
  380. package/chunks/resumeHistoryUtils-65OX3SGJ.js +0 -92
  381. package/chunks/ripGrep-2U2FRGMV.js +0 -74
  382. package/chunks/serve-W2GC47CM.js +0 -90
  383. package/chunks/shell-45IPBDP5.js +0 -84
  384. package/chunks/spawnChannel-PVXQ5AGV.js +0 -83
  385. package/chunks/src-AY65BYR7.js +0 -3166
  386. package/chunks/standalone-update-ZMFNKAEY.js +0 -93
  387. package/chunks/theme-manager-YYPZFBAH.js +0 -78
  388. package/chunks/total-session-admission-JXES723M.js +0 -85
  389. package/chunks/trustedFolders-HVI7IXUH.js +0 -94
  390. package/chunks/updateCheck-WUJGHWZZ.js +0 -93
  391. package/chunks/useAutoAcceptIndicator-CHSTZLZD.js +0 -94
  392. package/chunks/workspace-providers-status-GAKSF4LL.js +0 -87
  393. package/chunks/workspace-registry-A7NQUONG.js +0 -89
  394. package/chunks/workspace-service-STGVSO4N.js +0 -99
  395. package/chunks/workspace-skills-status-66AK3DUA.js +0 -86
  396. package/chunks/write-file-HUUCEG4P.js +0 -74
  397. package/web-shell/assets/channel-Bzdx6E8P.js +0 -1
  398. package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +0 -1
  399. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +0 -1
  400. package/web-shell/assets/index-B2bXx96W.js +0 -1249
  401. package/web-shell/assets/index-_8mKjx8q.css +0 -5
  402. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +0 -1
  403. package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
  404. package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
  405. /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
@@ -0,0 +1,3475 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-5O2XNYP6.js";
6
+ import {
7
+ __commonJS,
8
+ __name
9
+ } from "./chunk-J2S4EL5Y.js";
10
+
11
+ // node_modules/@xterm/headless/lib-headless/xterm-headless.js
12
+ var require_xterm_headless = __commonJS({
13
+ "node_modules/@xterm/headless/lib-headless/xterm-headless.js"(exports) {
14
+ init_esbuild_shims();
15
+ (() => {
16
+ "use strict";
17
+ var e = { 349: (e2, t2, i2) => {
18
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CircularList = void 0;
19
+ const s2 = i2(460), r2 = i2(844);
20
+ class n2 extends r2.Disposable {
21
+ static {
22
+ __name(this, "n");
23
+ }
24
+ constructor(e3) {
25
+ super(), this._maxLength = e3, this.onDeleteEmitter = this.register(new s2.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new s2.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new s2.EventEmitter()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
26
+ }
27
+ get maxLength() {
28
+ return this._maxLength;
29
+ }
30
+ set maxLength(e3) {
31
+ if (this._maxLength === e3) return;
32
+ const t3 = new Array(e3);
33
+ for (let i3 = 0; i3 < Math.min(e3, this.length); i3++) t3[i3] = this._array[this._getCyclicIndex(i3)];
34
+ this._array = t3, this._maxLength = e3, this._startIndex = 0;
35
+ }
36
+ get length() {
37
+ return this._length;
38
+ }
39
+ set length(e3) {
40
+ if (e3 > this._length) for (let t3 = this._length; t3 < e3; t3++) this._array[t3] = void 0;
41
+ this._length = e3;
42
+ }
43
+ get(e3) {
44
+ return this._array[this._getCyclicIndex(e3)];
45
+ }
46
+ set(e3, t3) {
47
+ this._array[this._getCyclicIndex(e3)] = t3;
48
+ }
49
+ push(e3) {
50
+ this._array[this._getCyclicIndex(this._length)] = e3, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
51
+ }
52
+ recycle() {
53
+ if (this._length !== this._maxLength) throw new Error("Can only recycle when the buffer is full");
54
+ return this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1), this._array[this._getCyclicIndex(this._length - 1)];
55
+ }
56
+ get isFull() {
57
+ return this._length === this._maxLength;
58
+ }
59
+ pop() {
60
+ return this._array[this._getCyclicIndex(this._length-- - 1)];
61
+ }
62
+ splice(e3, t3, ...i3) {
63
+ if (t3) {
64
+ for (let i4 = e3; i4 < this._length - t3; i4++) this._array[this._getCyclicIndex(i4)] = this._array[this._getCyclicIndex(i4 + t3)];
65
+ this._length -= t3, this.onDeleteEmitter.fire({ index: e3, amount: t3 });
66
+ }
67
+ for (let t4 = this._length - 1; t4 >= e3; t4--) this._array[this._getCyclicIndex(t4 + i3.length)] = this._array[this._getCyclicIndex(t4)];
68
+ for (let t4 = 0; t4 < i3.length; t4++) this._array[this._getCyclicIndex(e3 + t4)] = i3[t4];
69
+ if (i3.length && this.onInsertEmitter.fire({ index: e3, amount: i3.length }), this._length + i3.length > this._maxLength) {
70
+ const e4 = this._length + i3.length - this._maxLength;
71
+ this._startIndex += e4, this._length = this._maxLength, this.onTrimEmitter.fire(e4);
72
+ } else this._length += i3.length;
73
+ }
74
+ trimStart(e3) {
75
+ e3 > this._length && (e3 = this._length), this._startIndex += e3, this._length -= e3, this.onTrimEmitter.fire(e3);
76
+ }
77
+ shiftElements(e3, t3, i3) {
78
+ if (!(t3 <= 0)) {
79
+ if (e3 < 0 || e3 >= this._length) throw new Error("start argument out of range");
80
+ if (e3 + i3 < 0) throw new Error("Cannot shift elements in list beyond index 0");
81
+ if (i3 > 0) {
82
+ for (let s4 = t3 - 1; s4 >= 0; s4--) this.set(e3 + s4 + i3, this.get(e3 + s4));
83
+ const s3 = e3 + t3 + i3 - this._length;
84
+ if (s3 > 0) for (this._length += s3; this._length > this._maxLength; ) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
85
+ } else for (let s3 = 0; s3 < t3; s3++) this.set(e3 + s3 + i3, this.get(e3 + s3));
86
+ }
87
+ }
88
+ _getCyclicIndex(e3) {
89
+ return (this._startIndex + e3) % this._maxLength;
90
+ }
91
+ }
92
+ t2.CircularList = n2;
93
+ }, 439: (e2, t2) => {
94
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.clone = void 0, t2.clone = /* @__PURE__ */ __name(function e3(t3, i2 = 5) {
95
+ if ("object" != typeof t3) return t3;
96
+ const s2 = Array.isArray(t3) ? [] : {};
97
+ for (const r2 in t3) s2[r2] = i2 <= 1 ? t3[r2] : t3[r2] && e3(t3[r2], i2 - 1);
98
+ return s2;
99
+ }, "e");
100
+ }, 969: (e2, t2, i2) => {
101
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreTerminal = void 0;
102
+ const s2 = i2(844), r2 = i2(585), n2 = i2(348), a = i2(866), o = i2(744), h = i2(302), c = i2(83), l = i2(460), _ = i2(753), d = i2(480), f = i2(994), u = i2(282), p = i2(435), g = i2(981), v = i2(660);
103
+ let b = false;
104
+ class S extends s2.Disposable {
105
+ static {
106
+ __name(this, "S");
107
+ }
108
+ get onScroll() {
109
+ return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event((e3) => {
110
+ this._onScrollApi?.fire(e3.position);
111
+ })), this._onScrollApi.event;
112
+ }
113
+ get cols() {
114
+ return this._bufferService.cols;
115
+ }
116
+ get rows() {
117
+ return this._bufferService.rows;
118
+ }
119
+ get buffers() {
120
+ return this._bufferService.buffers;
121
+ }
122
+ get options() {
123
+ return this.optionsService.options;
124
+ }
125
+ set options(e3) {
126
+ for (const t3 in e3) this.optionsService.options[t3] = e3[t3];
127
+ }
128
+ constructor(e3) {
129
+ super(), this._windowsWrappingHeuristics = this.register(new s2.MutableDisposable()), this._onBinary = this.register(new l.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new l.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new l.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new l.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new l.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new l.EventEmitter()), this._instantiationService = new n2.InstantiationService(), this.optionsService = this.register(new h.OptionsService(e3)), this._instantiationService.setService(r2.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(o.BufferService)), this._instantiationService.setService(r2.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(a.LogService)), this._instantiationService.setService(r2.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(c.CoreService)), this._instantiationService.setService(r2.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(_.CoreMouseService)), this._instantiationService.setService(r2.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(d.UnicodeService)), this._instantiationService.setService(r2.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(f.CharsetService), this._instantiationService.setService(r2.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(v.OscLinkService), this._instantiationService.setService(r2.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new p.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, l.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, l.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, l.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, l.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this.register(this._bufferService.onScroll((e4) => {
130
+ this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
131
+ })), this.register(this._inputHandler.onScroll((e4) => {
132
+ this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
133
+ })), this._writeBuffer = this.register(new g.WriteBuffer((e4, t3) => this._inputHandler.parse(e4, t3))), this.register((0, l.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
134
+ }
135
+ write(e3, t3) {
136
+ this._writeBuffer.write(e3, t3);
137
+ }
138
+ writeSync(e3, t3) {
139
+ this._logService.logLevel <= r2.LogLevelEnum.WARN && !b && (this._logService.warn("writeSync is unreliable and will be removed soon."), b = true), this._writeBuffer.writeSync(e3, t3);
140
+ }
141
+ input(e3, t3 = true) {
142
+ this.coreService.triggerDataEvent(e3, t3);
143
+ }
144
+ resize(e3, t3) {
145
+ isNaN(e3) || isNaN(t3) || (e3 = Math.max(e3, o.MINIMUM_COLS), t3 = Math.max(t3, o.MINIMUM_ROWS), this._bufferService.resize(e3, t3));
146
+ }
147
+ scroll(e3, t3 = false) {
148
+ this._bufferService.scroll(e3, t3);
149
+ }
150
+ scrollLines(e3, t3, i3) {
151
+ this._bufferService.scrollLines(e3, t3, i3);
152
+ }
153
+ scrollPages(e3) {
154
+ this.scrollLines(e3 * (this.rows - 1));
155
+ }
156
+ scrollToTop() {
157
+ this.scrollLines(-this._bufferService.buffer.ydisp);
158
+ }
159
+ scrollToBottom() {
160
+ this.scrollLines(this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
161
+ }
162
+ scrollToLine(e3) {
163
+ const t3 = e3 - this._bufferService.buffer.ydisp;
164
+ 0 !== t3 && this.scrollLines(t3);
165
+ }
166
+ registerEscHandler(e3, t3) {
167
+ return this._inputHandler.registerEscHandler(e3, t3);
168
+ }
169
+ registerDcsHandler(e3, t3) {
170
+ return this._inputHandler.registerDcsHandler(e3, t3);
171
+ }
172
+ registerCsiHandler(e3, t3) {
173
+ return this._inputHandler.registerCsiHandler(e3, t3);
174
+ }
175
+ registerOscHandler(e3, t3) {
176
+ return this._inputHandler.registerOscHandler(e3, t3);
177
+ }
178
+ _setup() {
179
+ this._handleWindowsPtyOptionChange();
180
+ }
181
+ reset() {
182
+ this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
183
+ }
184
+ _handleWindowsPtyOptionChange() {
185
+ let e3 = false;
186
+ const t3 = this.optionsService.rawOptions.windowsPty;
187
+ t3 && void 0 !== t3.buildNumber && void 0 !== t3.buildNumber ? e3 = !!("conpty" === t3.backend && t3.buildNumber < 21376) : this.optionsService.rawOptions.windowsMode && (e3 = true), e3 ? this._enableWindowsWrappingHeuristics() : this._windowsWrappingHeuristics.clear();
188
+ }
189
+ _enableWindowsWrappingHeuristics() {
190
+ if (!this._windowsWrappingHeuristics.value) {
191
+ const e3 = [];
192
+ e3.push(this.onLineFeed(u.updateWindowsModeWrappedState.bind(null, this._bufferService))), e3.push(this.registerCsiHandler({ final: "H" }, () => ((0, u.updateWindowsModeWrappedState)(this._bufferService), false))), this._windowsWrappingHeuristics.value = (0, s2.toDisposable)(() => {
193
+ for (const t3 of e3) t3.dispose();
194
+ });
195
+ }
196
+ }
197
+ }
198
+ t2.CoreTerminal = S;
199
+ }, 460: (e2, t2) => {
200
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
201
+ constructor() {
202
+ this._listeners = [], this._disposed = false;
203
+ }
204
+ get event() {
205
+ return this._event || (this._event = (e3) => {
206
+ this._listeners.push(e3);
207
+ const t3 = { dispose: /* @__PURE__ */ __name(() => {
208
+ if (!this._disposed) {
209
+ for (let t4 = 0; t4 < this._listeners.length; t4++) if (this._listeners[t4] === e3) return void this._listeners.splice(t4, 1);
210
+ }
211
+ }, "dispose") };
212
+ return t3;
213
+ }), this._event;
214
+ }
215
+ fire(e3, t3) {
216
+ const i2 = [];
217
+ for (let e4 = 0; e4 < this._listeners.length; e4++) i2.push(this._listeners[e4]);
218
+ for (let s2 = 0; s2 < i2.length; s2++) i2[s2].call(void 0, e3, t3);
219
+ }
220
+ dispose() {
221
+ this.clearListeners(), this._disposed = true;
222
+ }
223
+ clearListeners() {
224
+ this._listeners && (this._listeners.length = 0);
225
+ }
226
+ }, t2.forwardEvent = function(e3, t3) {
227
+ return e3((e4) => t3.fire(e4));
228
+ }, t2.runAndSubscribe = function(e3, t3) {
229
+ return t3(void 0), e3((e4) => t3(e4));
230
+ };
231
+ }, 435: function(e2, t2, i2) {
232
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
233
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
234
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
235
+ else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
236
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
237
+ }, r2 = this && this.__param || function(e3, t3) {
238
+ return function(i3, s3) {
239
+ t3(i3, s3, e3);
240
+ };
241
+ };
242
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.InputHandler = t2.WindowsOptionsReportType = void 0;
243
+ const n2 = i2(584), a = i2(116), o = i2(15), h = i2(844), c = i2(482), l = i2(437), _ = i2(460), d = i2(643), f = i2(511), u = i2(734), p = i2(585), g = i2(480), v = i2(242), b = i2(351), S = i2(941), m = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, C = 131072;
244
+ function y(e3, t3) {
245
+ if (e3 > 24) return t3.setWinLines || false;
246
+ switch (e3) {
247
+ case 1:
248
+ return !!t3.restoreWin;
249
+ case 2:
250
+ return !!t3.minimizeWin;
251
+ case 3:
252
+ return !!t3.setWinPosition;
253
+ case 4:
254
+ return !!t3.setWinSizePixels;
255
+ case 5:
256
+ return !!t3.raiseWin;
257
+ case 6:
258
+ return !!t3.lowerWin;
259
+ case 7:
260
+ return !!t3.refreshWin;
261
+ case 8:
262
+ return !!t3.setWinSizeChars;
263
+ case 9:
264
+ return !!t3.maximizeWin;
265
+ case 10:
266
+ return !!t3.fullscreenWin;
267
+ case 11:
268
+ return !!t3.getWinState;
269
+ case 13:
270
+ return !!t3.getWinPosition;
271
+ case 14:
272
+ return !!t3.getWinSizePixels;
273
+ case 15:
274
+ return !!t3.getScreenSizePixels;
275
+ case 16:
276
+ return !!t3.getCellSizePixels;
277
+ case 18:
278
+ return !!t3.getWinSizeChars;
279
+ case 19:
280
+ return !!t3.getScreenSizeChars;
281
+ case 20:
282
+ return !!t3.getIconTitle;
283
+ case 21:
284
+ return !!t3.getWinTitle;
285
+ case 22:
286
+ return !!t3.pushTitle;
287
+ case 23:
288
+ return !!t3.popTitle;
289
+ case 24:
290
+ return !!t3.setWinLines;
291
+ }
292
+ return false;
293
+ }
294
+ __name(y, "y");
295
+ var w;
296
+ !function(e3) {
297
+ e3[e3.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e3[e3.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
298
+ }(w || (t2.WindowsOptionsReportType = w = {}));
299
+ let B = 0;
300
+ class E extends h.Disposable {
301
+ static {
302
+ __name(this, "E");
303
+ }
304
+ getAttrData() {
305
+ return this._curAttrData;
306
+ }
307
+ constructor(e3, t3, i3, s3, r3, h2, d2, u2, p2 = new o.EscapeSequenceParser()) {
308
+ super(), this._bufferService = e3, this._charsetService = t3, this._coreService = i3, this._logService = s3, this._optionsService = r3, this._oscLinkService = h2, this._coreMouseService = d2, this._unicodeService = u2, this._parser = p2, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new f.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new _.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new _.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new _.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new _.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new _.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new _.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new _.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new _.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new _.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new _.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new _.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new _.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new _.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: false, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new A(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((e4) => this._activeBuffer = e4.activeBuffer)), this._parser.setCsiHandlerFallback((e4, t4) => {
309
+ this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(e4), params: t4.toArray() });
310
+ }), this._parser.setEscHandlerFallback((e4) => {
311
+ this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(e4) });
312
+ }), this._parser.setExecuteHandlerFallback((e4) => {
313
+ this._logService.debug("Unknown EXECUTE code: ", { code: e4 });
314
+ }), this._parser.setOscHandlerFallback((e4, t4, i4) => {
315
+ this._logService.debug("Unknown OSC code: ", { identifier: e4, action: t4, data: i4 });
316
+ }), this._parser.setDcsHandlerFallback((e4, t4, i4) => {
317
+ "HOOK" === t4 && (i4 = i4.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(e4), action: t4, payload: i4 });
318
+ }), this._parser.setPrintHandler((e4, t4, i4) => this.print(e4, t4, i4)), this._parser.registerCsiHandler({ final: "@" }, (e4) => this.insertChars(e4)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (e4) => this.scrollLeft(e4)), this._parser.registerCsiHandler({ final: "A" }, (e4) => this.cursorUp(e4)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (e4) => this.scrollRight(e4)), this._parser.registerCsiHandler({ final: "B" }, (e4) => this.cursorDown(e4)), this._parser.registerCsiHandler({ final: "C" }, (e4) => this.cursorForward(e4)), this._parser.registerCsiHandler({ final: "D" }, (e4) => this.cursorBackward(e4)), this._parser.registerCsiHandler({ final: "E" }, (e4) => this.cursorNextLine(e4)), this._parser.registerCsiHandler({ final: "F" }, (e4) => this.cursorPrecedingLine(e4)), this._parser.registerCsiHandler({ final: "G" }, (e4) => this.cursorCharAbsolute(e4)), this._parser.registerCsiHandler({ final: "H" }, (e4) => this.cursorPosition(e4)), this._parser.registerCsiHandler({ final: "I" }, (e4) => this.cursorForwardTab(e4)), this._parser.registerCsiHandler({ final: "J" }, (e4) => this.eraseInDisplay(e4, false)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (e4) => this.eraseInDisplay(e4, true)), this._parser.registerCsiHandler({ final: "K" }, (e4) => this.eraseInLine(e4, false)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (e4) => this.eraseInLine(e4, true)), this._parser.registerCsiHandler({ final: "L" }, (e4) => this.insertLines(e4)), this._parser.registerCsiHandler({ final: "M" }, (e4) => this.deleteLines(e4)), this._parser.registerCsiHandler({ final: "P" }, (e4) => this.deleteChars(e4)), this._parser.registerCsiHandler({ final: "S" }, (e4) => this.scrollUp(e4)), this._parser.registerCsiHandler({ final: "T" }, (e4) => this.scrollDown(e4)), this._parser.registerCsiHandler({ final: "X" }, (e4) => this.eraseChars(e4)), this._parser.registerCsiHandler({ final: "Z" }, (e4) => this.cursorBackwardTab(e4)), this._parser.registerCsiHandler({ final: "`" }, (e4) => this.charPosAbsolute(e4)), this._parser.registerCsiHandler({ final: "a" }, (e4) => this.hPositionRelative(e4)), this._parser.registerCsiHandler({ final: "b" }, (e4) => this.repeatPrecedingCharacter(e4)), this._parser.registerCsiHandler({ final: "c" }, (e4) => this.sendDeviceAttributesPrimary(e4)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (e4) => this.sendDeviceAttributesSecondary(e4)), this._parser.registerCsiHandler({ final: "d" }, (e4) => this.linePosAbsolute(e4)), this._parser.registerCsiHandler({ final: "e" }, (e4) => this.vPositionRelative(e4)), this._parser.registerCsiHandler({ final: "f" }, (e4) => this.hVPosition(e4)), this._parser.registerCsiHandler({ final: "g" }, (e4) => this.tabClear(e4)), this._parser.registerCsiHandler({ final: "h" }, (e4) => this.setMode(e4)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (e4) => this.setModePrivate(e4)), this._parser.registerCsiHandler({ final: "l" }, (e4) => this.resetMode(e4)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (e4) => this.resetModePrivate(e4)), this._parser.registerCsiHandler({ final: "m" }, (e4) => this.charAttributes(e4)), this._parser.registerCsiHandler({ final: "n" }, (e4) => this.deviceStatus(e4)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (e4) => this.deviceStatusPrivate(e4)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (e4) => this.softReset(e4)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (e4) => this.setCursorStyle(e4)), this._parser.registerCsiHandler({ final: "r" }, (e4) => this.setScrollRegion(e4)), this._parser.registerCsiHandler({ final: "s" }, (e4) => this.saveCursor(e4)), this._parser.registerCsiHandler({ final: "t" }, (e4) => this.windowOptions(e4)), this._parser.registerCsiHandler({ final: "u" }, (e4) => this.restoreCursor(e4)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (e4) => this.insertColumns(e4)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (e4) => this.deleteColumns(e4)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (e4) => this.selectProtected(e4)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (e4) => this.requestMode(e4, true)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (e4) => this.requestMode(e4, false)), this._parser.setExecuteHandler(n2.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(n2.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(n2.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(n2.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(n2.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(n2.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(n2.C0.HT, () => this.tab()), this._parser.setExecuteHandler(n2.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(n2.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(n2.C1.IND, () => this.index()), this._parser.setExecuteHandler(n2.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(n2.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new v.OscHandler((e4) => (this.setTitle(e4), this.setIconName(e4), true))), this._parser.registerOscHandler(1, new v.OscHandler((e4) => this.setIconName(e4))), this._parser.registerOscHandler(2, new v.OscHandler((e4) => this.setTitle(e4))), this._parser.registerOscHandler(4, new v.OscHandler((e4) => this.setOrReportIndexedColor(e4))), this._parser.registerOscHandler(8, new v.OscHandler((e4) => this.setHyperlink(e4))), this._parser.registerOscHandler(10, new v.OscHandler((e4) => this.setOrReportFgColor(e4))), this._parser.registerOscHandler(11, new v.OscHandler((e4) => this.setOrReportBgColor(e4))), this._parser.registerOscHandler(12, new v.OscHandler((e4) => this.setOrReportCursorColor(e4))), this._parser.registerOscHandler(104, new v.OscHandler((e4) => this.restoreIndexedColor(e4))), this._parser.registerOscHandler(110, new v.OscHandler((e4) => this.restoreFgColor(e4))), this._parser.registerOscHandler(111, new v.OscHandler((e4) => this.restoreBgColor(e4))), this._parser.registerOscHandler(112, new v.OscHandler((e4) => this.restoreCursorColor(e4))), 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());
319
+ for (const e4 in a.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: e4 }, () => this.selectCharset("(" + e4)), this._parser.registerEscHandler({ intermediates: ")", final: e4 }, () => this.selectCharset(")" + e4)), this._parser.registerEscHandler({ intermediates: "*", final: e4 }, () => this.selectCharset("*" + e4)), this._parser.registerEscHandler({ intermediates: "+", final: e4 }, () => this.selectCharset("+" + e4)), this._parser.registerEscHandler({ intermediates: "-", final: e4 }, () => this.selectCharset("-" + e4)), this._parser.registerEscHandler({ intermediates: ".", final: e4 }, () => this.selectCharset("." + e4)), this._parser.registerEscHandler({ intermediates: "/", final: e4 }, () => this.selectCharset("/" + e4));
320
+ this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((e4) => (this._logService.error("Parsing error: ", e4), e4)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new b.DcsHandler((e4, t4) => this.requestStatusString(e4, t4)));
321
+ }
322
+ _preserveStack(e3, t3, i3, s3) {
323
+ this._parseStack.paused = true, this._parseStack.cursorStartX = e3, this._parseStack.cursorStartY = t3, this._parseStack.decodedLength = i3, this._parseStack.position = s3;
324
+ }
325
+ _logSlowResolvingAsync(e3) {
326
+ this._logService.logLevel <= p.LogLevelEnum.WARN && Promise.race([e3, new Promise((e4, t3) => setTimeout(() => t3("#SLOW_TIMEOUT"), 5e3))]).catch((e4) => {
327
+ if ("#SLOW_TIMEOUT" !== e4) throw e4;
328
+ console.warn("async parser handler taking longer than 5000 ms");
329
+ });
330
+ }
331
+ _getCurrentLinkId() {
332
+ return this._curAttrData.extended.urlId;
333
+ }
334
+ parse(e3, t3) {
335
+ let i3, s3 = this._activeBuffer.x, r3 = this._activeBuffer.y, n3 = 0;
336
+ const a2 = this._parseStack.paused;
337
+ if (a2) {
338
+ if (i3 = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t3)) return this._logSlowResolvingAsync(i3), i3;
339
+ s3 = this._parseStack.cursorStartX, r3 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > C && (n3 = this._parseStack.position + C);
340
+ }
341
+ if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e3 ? ` "${e3}"` : ` "${Array.prototype.map.call(e3, (e4) => String.fromCharCode(e4)).join("")}"`), "string" == typeof e3 ? e3.split("").map((e4) => e4.charCodeAt(0)) : e3), this._parseBuffer.length < e3.length && this._parseBuffer.length < C && (this._parseBuffer = new Uint32Array(Math.min(e3.length, C))), a2 || this._dirtyRowTracker.clearRange(), e3.length > C) for (let t4 = n3; t4 < e3.length; t4 += C) {
342
+ const n4 = t4 + C < e3.length ? t4 + C : e3.length, a3 = "string" == typeof e3 ? this._stringDecoder.decode(e3.substring(t4, n4), this._parseBuffer) : this._utf8Decoder.decode(e3.subarray(t4, n4), this._parseBuffer);
343
+ if (i3 = this._parser.parse(this._parseBuffer, a3)) return this._preserveStack(s3, r3, a3, t4), this._logSlowResolvingAsync(i3), i3;
344
+ }
345
+ else if (!a2) {
346
+ const t4 = "string" == typeof e3 ? this._stringDecoder.decode(e3, this._parseBuffer) : this._utf8Decoder.decode(e3, this._parseBuffer);
347
+ if (i3 = this._parser.parse(this._parseBuffer, t4)) return this._preserveStack(s3, r3, t4, 0), this._logSlowResolvingAsync(i3), i3;
348
+ }
349
+ this._activeBuffer.x === s3 && this._activeBuffer.y === r3 || this._onCursorMove.fire();
350
+ const o2 = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), h2 = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
351
+ h2 < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h2, this._bufferService.rows - 1), Math.min(o2, this._bufferService.rows - 1));
352
+ }
353
+ print(e3, t3, i3) {
354
+ let s3, r3;
355
+ const n3 = this._charsetService.charset, a2 = this._optionsService.rawOptions.screenReaderMode, o2 = this._bufferService.cols, h2 = this._coreService.decPrivateModes.wraparound, _2 = this._coreService.modes.insertMode, f2 = this._curAttrData;
356
+ let u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
357
+ this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i3 - t3 > 0 && 2 === u2.getWidth(this._activeBuffer.x - 1) && u2.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, f2);
358
+ let p2 = this._parser.precedingJoinState;
359
+ for (let v2 = t3; v2 < i3; ++v2) {
360
+ if (s3 = e3[v2], s3 < 127 && n3) {
361
+ const e4 = n3[String.fromCharCode(s3)];
362
+ e4 && (s3 = e4.charCodeAt(0));
363
+ }
364
+ const t4 = this._unicodeService.charProperties(s3, p2);
365
+ r3 = g.UnicodeService.extractWidth(t4);
366
+ const i4 = g.UnicodeService.extractShouldJoin(t4), b2 = i4 ? g.UnicodeService.extractWidth(p2) : 0;
367
+ if (p2 = t4, a2 && this._onA11yChar.fire((0, c.stringFromCodePoint)(s3)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + r3 - b2 > o2) {
368
+ if (h2) {
369
+ const e4 = u2;
370
+ let t5 = this._activeBuffer.x - b2;
371
+ for (this._activeBuffer.x = b2, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), true)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = true), u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), b2 > 0 && u2 instanceof l.BufferLine && u2.copyCellsFrom(e4, t5, 0, b2, false); t5 < o2; ) e4.setCellFromCodepoint(t5++, 0, 1, f2);
372
+ } else if (this._activeBuffer.x = o2 - 1, 2 === r3) continue;
373
+ }
374
+ if (i4 && this._activeBuffer.x) {
375
+ const e4 = u2.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
376
+ u2.addCodepointToCell(this._activeBuffer.x - e4, s3, r3);
377
+ for (let e5 = r3 - b2; --e5 >= 0; ) u2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, f2);
378
+ } else if (_2 && (u2.insertCells(this._activeBuffer.x, r3 - b2, this._activeBuffer.getNullCell(f2)), 2 === u2.getWidth(o2 - 1) && u2.setCellFromCodepoint(o2 - 1, d.NULL_CELL_CODE, d.NULL_CELL_WIDTH, f2)), u2.setCellFromCodepoint(this._activeBuffer.x++, s3, r3, f2), r3 > 0) for (; --r3; ) u2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, f2);
379
+ }
380
+ this._parser.precedingJoinState = p2, this._activeBuffer.x < o2 && i3 - t3 > 0 && 0 === u2.getWidth(this._activeBuffer.x) && !u2.hasContent(this._activeBuffer.x) && u2.setCellFromCodepoint(this._activeBuffer.x, 0, 1, f2), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
381
+ }
382
+ registerCsiHandler(e3, t3) {
383
+ return "t" !== e3.final || e3.prefix || e3.intermediates ? this._parser.registerCsiHandler(e3, t3) : this._parser.registerCsiHandler(e3, (e4) => !y(e4.params[0], this._optionsService.rawOptions.windowOptions) || t3(e4));
384
+ }
385
+ registerDcsHandler(e3, t3) {
386
+ return this._parser.registerDcsHandler(e3, new b.DcsHandler(t3));
387
+ }
388
+ registerEscHandler(e3, t3) {
389
+ return this._parser.registerEscHandler(e3, t3);
390
+ }
391
+ registerOscHandler(e3, t3) {
392
+ return this._parser.registerOscHandler(e3, new v.OscHandler(t3));
393
+ }
394
+ bell() {
395
+ return this._onRequestBell.fire(), true;
396
+ }
397
+ lineFeed() {
398
+ return this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._optionsService.rawOptions.convertEol && (this._activeBuffer.x = 0), 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._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.x >= this._bufferService.cols && this._activeBuffer.x--, this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._onLineFeed.fire(), true;
399
+ }
400
+ carriageReturn() {
401
+ return this._activeBuffer.x = 0, true;
402
+ }
403
+ backspace() {
404
+ if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, true;
405
+ if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;
406
+ else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
407
+ this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
408
+ const e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
409
+ e3.hasWidth(this._activeBuffer.x) && !e3.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
410
+ }
411
+ return this._restrictCursor(), true;
412
+ }
413
+ tab() {
414
+ if (this._activeBuffer.x >= this._bufferService.cols) return true;
415
+ const e3 = this._activeBuffer.x;
416
+ return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - e3), true;
417
+ }
418
+ shiftOut() {
419
+ return this._charsetService.setgLevel(1), true;
420
+ }
421
+ shiftIn() {
422
+ return this._charsetService.setgLevel(0), true;
423
+ }
424
+ _restrictCursor(e3 = this._bufferService.cols - 1) {
425
+ this._activeBuffer.x = Math.min(e3, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
426
+ }
427
+ _setCursor(e3, t3) {
428
+ this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = e3, this._activeBuffer.y = this._activeBuffer.scrollTop + t3) : (this._activeBuffer.x = e3, this._activeBuffer.y = t3), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
429
+ }
430
+ _moveCursor(e3, t3) {
431
+ this._restrictCursor(), this._setCursor(this._activeBuffer.x + e3, this._activeBuffer.y + t3);
432
+ }
433
+ cursorUp(e3) {
434
+ const t3 = this._activeBuffer.y - this._activeBuffer.scrollTop;
435
+ return t3 >= 0 ? this._moveCursor(0, -Math.min(t3, e3.params[0] || 1)) : this._moveCursor(0, -(e3.params[0] || 1)), true;
436
+ }
437
+ cursorDown(e3) {
438
+ const t3 = this._activeBuffer.scrollBottom - this._activeBuffer.y;
439
+ return t3 >= 0 ? this._moveCursor(0, Math.min(t3, e3.params[0] || 1)) : this._moveCursor(0, e3.params[0] || 1), true;
440
+ }
441
+ cursorForward(e3) {
442
+ return this._moveCursor(e3.params[0] || 1, 0), true;
443
+ }
444
+ cursorBackward(e3) {
445
+ return this._moveCursor(-(e3.params[0] || 1), 0), true;
446
+ }
447
+ cursorNextLine(e3) {
448
+ return this.cursorDown(e3), this._activeBuffer.x = 0, true;
449
+ }
450
+ cursorPrecedingLine(e3) {
451
+ return this.cursorUp(e3), this._activeBuffer.x = 0, true;
452
+ }
453
+ cursorCharAbsolute(e3) {
454
+ return this._setCursor((e3.params[0] || 1) - 1, this._activeBuffer.y), true;
455
+ }
456
+ cursorPosition(e3) {
457
+ return this._setCursor(e3.length >= 2 ? (e3.params[1] || 1) - 1 : 0, (e3.params[0] || 1) - 1), true;
458
+ }
459
+ charPosAbsolute(e3) {
460
+ return this._setCursor((e3.params[0] || 1) - 1, this._activeBuffer.y), true;
461
+ }
462
+ hPositionRelative(e3) {
463
+ return this._moveCursor(e3.params[0] || 1, 0), true;
464
+ }
465
+ linePosAbsolute(e3) {
466
+ return this._setCursor(this._activeBuffer.x, (e3.params[0] || 1) - 1), true;
467
+ }
468
+ vPositionRelative(e3) {
469
+ return this._moveCursor(0, e3.params[0] || 1), true;
470
+ }
471
+ hVPosition(e3) {
472
+ return this.cursorPosition(e3), true;
473
+ }
474
+ tabClear(e3) {
475
+ const t3 = e3.params[0];
476
+ return 0 === t3 ? delete this._activeBuffer.tabs[this._activeBuffer.x] : 3 === t3 && (this._activeBuffer.tabs = {}), true;
477
+ }
478
+ cursorForwardTab(e3) {
479
+ if (this._activeBuffer.x >= this._bufferService.cols) return true;
480
+ let t3 = e3.params[0] || 1;
481
+ for (; t3--; ) this._activeBuffer.x = this._activeBuffer.nextStop();
482
+ return true;
483
+ }
484
+ cursorBackwardTab(e3) {
485
+ if (this._activeBuffer.x >= this._bufferService.cols) return true;
486
+ let t3 = e3.params[0] || 1;
487
+ for (; t3--; ) this._activeBuffer.x = this._activeBuffer.prevStop();
488
+ return true;
489
+ }
490
+ selectProtected(e3) {
491
+ const t3 = e3.params[0];
492
+ return 1 === t3 && (this._curAttrData.bg |= 536870912), 2 !== t3 && 0 !== t3 || (this._curAttrData.bg &= -536870913), true;
493
+ }
494
+ _eraseInBufferLine(e3, t3, i3, s3 = false, r3 = false) {
495
+ const n3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
496
+ n3.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()), r3), s3 && (n3.isWrapped = false);
497
+ }
498
+ _resetBufferLine(e3, t3 = false) {
499
+ const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
500
+ i3 && (i3.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), t3), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + e3), i3.isWrapped = false);
501
+ }
502
+ eraseInDisplay(e3, t3 = false) {
503
+ let i3;
504
+ switch (this._restrictCursor(this._bufferService.cols), e3.params[0]) {
505
+ case 0:
506
+ for (i3 = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i3), this._eraseInBufferLine(i3++, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t3); i3 < this._bufferService.rows; i3++) this._resetBufferLine(i3, t3);
507
+ this._dirtyRowTracker.markDirty(i3);
508
+ break;
509
+ case 1:
510
+ for (i3 = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i3), this._eraseInBufferLine(i3, 0, this._activeBuffer.x + 1, true, t3), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(i3 + 1).isWrapped = false); i3--; ) this._resetBufferLine(i3, t3);
511
+ this._dirtyRowTracker.markDirty(0);
512
+ break;
513
+ case 2:
514
+ for (i3 = this._bufferService.rows, this._dirtyRowTracker.markDirty(i3 - 1); i3--; ) this._resetBufferLine(i3, t3);
515
+ this._dirtyRowTracker.markDirty(0);
516
+ break;
517
+ case 3:
518
+ const e4 = this._activeBuffer.lines.length - this._bufferService.rows;
519
+ e4 > 0 && (this._activeBuffer.lines.trimStart(e4), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - e4, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - e4, 0), this._onScroll.fire(0));
520
+ }
521
+ return true;
522
+ }
523
+ eraseInLine(e3, t3 = false) {
524
+ switch (this._restrictCursor(this._bufferService.cols), e3.params[0]) {
525
+ case 0:
526
+ this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t3);
527
+ break;
528
+ case 1:
529
+ this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false, t3);
530
+ break;
531
+ case 2:
532
+ this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true, t3);
533
+ }
534
+ return this._dirtyRowTracker.markDirty(this._activeBuffer.y), true;
535
+ }
536
+ insertLines(e3) {
537
+ this._restrictCursor();
538
+ let t3 = e3.params[0] || 1;
539
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
540
+ const i3 = this._activeBuffer.ybase + this._activeBuffer.y, s3 = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, r3 = this._bufferService.rows - 1 + this._activeBuffer.ybase - s3 + 1;
541
+ for (; t3--; ) this._activeBuffer.lines.splice(r3 - 1, 1), this._activeBuffer.lines.splice(i3, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
542
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, true;
543
+ }
544
+ deleteLines(e3) {
545
+ this._restrictCursor();
546
+ let t3 = e3.params[0] || 1;
547
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
548
+ const i3 = this._activeBuffer.ybase + this._activeBuffer.y;
549
+ let s3;
550
+ for (s3 = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, s3 = this._bufferService.rows - 1 + this._activeBuffer.ybase - s3; t3--; ) this._activeBuffer.lines.splice(i3, 1), this._activeBuffer.lines.splice(s3, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
551
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, true;
552
+ }
553
+ insertChars(e3) {
554
+ this._restrictCursor();
555
+ const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
556
+ return t3 && (t3.insertCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
557
+ }
558
+ deleteChars(e3) {
559
+ this._restrictCursor();
560
+ const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
561
+ return t3 && (t3.deleteCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
562
+ }
563
+ scrollUp(e3) {
564
+ let t3 = e3.params[0] || 1;
565
+ for (; t3--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
566
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
567
+ }
568
+ scrollDown(e3) {
569
+ let t3 = e3.params[0] || 1;
570
+ for (; t3--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));
571
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
572
+ }
573
+ scrollLeft(e3) {
574
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
575
+ const t3 = e3.params[0] || 1;
576
+ for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
577
+ const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
578
+ i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
579
+ }
580
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
581
+ }
582
+ scrollRight(e3) {
583
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
584
+ const t3 = e3.params[0] || 1;
585
+ for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
586
+ const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
587
+ i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
588
+ }
589
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
590
+ }
591
+ insertColumns(e3) {
592
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
593
+ const t3 = e3.params[0] || 1;
594
+ for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
595
+ const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
596
+ i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
597
+ }
598
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
599
+ }
600
+ deleteColumns(e3) {
601
+ if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
602
+ const t3 = e3.params[0] || 1;
603
+ for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
604
+ const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
605
+ i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
606
+ }
607
+ return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
608
+ }
609
+ eraseChars(e3) {
610
+ this._restrictCursor();
611
+ const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
612
+ return t3 && (t3.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e3.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
613
+ }
614
+ repeatPrecedingCharacter(e3) {
615
+ const t3 = this._parser.precedingJoinState;
616
+ if (!t3) return true;
617
+ const i3 = e3.params[0] || 1, s3 = g.UnicodeService.extractWidth(t3), r3 = this._activeBuffer.x - s3, n3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(r3), a2 = new Uint32Array(n3.length * i3);
618
+ let o2 = 0;
619
+ for (let e4 = 0; e4 < n3.length; ) {
620
+ const t4 = n3.codePointAt(e4) || 0;
621
+ a2[o2++] = t4, e4 += t4 > 65535 ? 2 : 1;
622
+ }
623
+ let h2 = o2;
624
+ for (let e4 = 1; e4 < i3; ++e4) a2.copyWithin(h2, 0, o2), h2 += o2;
625
+ return this.print(a2, 0, h2), true;
626
+ }
627
+ sendDeviceAttributesPrimary(e3) {
628
+ return e3.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n2.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n2.C0.ESC + "[?6c")), true;
629
+ }
630
+ sendDeviceAttributesSecondary(e3) {
631
+ return e3.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(n2.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(n2.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(e3.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(n2.C0.ESC + "[>83;40003;0c")), true;
632
+ }
633
+ _is(e3) {
634
+ return 0 === (this._optionsService.rawOptions.termName + "").indexOf(e3);
635
+ }
636
+ setMode(e3) {
637
+ for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
638
+ case 4:
639
+ this._coreService.modes.insertMode = true;
640
+ break;
641
+ case 20:
642
+ this._optionsService.options.convertEol = true;
643
+ }
644
+ return true;
645
+ }
646
+ setModePrivate(e3) {
647
+ for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
648
+ case 1:
649
+ this._coreService.decPrivateModes.applicationCursorKeys = true;
650
+ break;
651
+ case 2:
652
+ this._charsetService.setgCharset(0, a.DEFAULT_CHARSET), this._charsetService.setgCharset(1, a.DEFAULT_CHARSET), this._charsetService.setgCharset(2, a.DEFAULT_CHARSET), this._charsetService.setgCharset(3, a.DEFAULT_CHARSET);
653
+ break;
654
+ case 3:
655
+ this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
656
+ break;
657
+ case 6:
658
+ this._coreService.decPrivateModes.origin = true, this._setCursor(0, 0);
659
+ break;
660
+ case 7:
661
+ this._coreService.decPrivateModes.wraparound = true;
662
+ break;
663
+ case 12:
664
+ this._optionsService.options.cursorBlink = true;
665
+ break;
666
+ case 45:
667
+ this._coreService.decPrivateModes.reverseWraparound = true;
668
+ break;
669
+ case 66:
670
+ this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = true, this._onRequestSyncScrollBar.fire();
671
+ break;
672
+ case 9:
673
+ this._coreMouseService.activeProtocol = "X10";
674
+ break;
675
+ case 1e3:
676
+ this._coreMouseService.activeProtocol = "VT200";
677
+ break;
678
+ case 1002:
679
+ this._coreMouseService.activeProtocol = "DRAG";
680
+ break;
681
+ case 1003:
682
+ this._coreMouseService.activeProtocol = "ANY";
683
+ break;
684
+ case 1004:
685
+ this._coreService.decPrivateModes.sendFocus = true, this._onRequestSendFocus.fire();
686
+ break;
687
+ case 1005:
688
+ this._logService.debug("DECSET 1005 not supported (see #2507)");
689
+ break;
690
+ case 1006:
691
+ this._coreMouseService.activeEncoding = "SGR";
692
+ break;
693
+ case 1015:
694
+ this._logService.debug("DECSET 1015 not supported (see #2507)");
695
+ break;
696
+ case 1016:
697
+ this._coreMouseService.activeEncoding = "SGR_PIXELS";
698
+ break;
699
+ case 25:
700
+ this._coreService.isCursorHidden = false;
701
+ break;
702
+ case 1048:
703
+ this.saveCursor();
704
+ break;
705
+ case 1049:
706
+ this.saveCursor();
707
+ case 47:
708
+ case 1047:
709
+ this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()), this._coreService.isCursorInitialized = true, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
710
+ break;
711
+ case 2004:
712
+ this._coreService.decPrivateModes.bracketedPasteMode = true;
713
+ }
714
+ return true;
715
+ }
716
+ resetMode(e3) {
717
+ for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
718
+ case 4:
719
+ this._coreService.modes.insertMode = false;
720
+ break;
721
+ case 20:
722
+ this._optionsService.options.convertEol = false;
723
+ }
724
+ return true;
725
+ }
726
+ resetModePrivate(e3) {
727
+ for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
728
+ case 1:
729
+ this._coreService.decPrivateModes.applicationCursorKeys = false;
730
+ break;
731
+ case 3:
732
+ this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(80, this._bufferService.rows), this._onRequestReset.fire());
733
+ break;
734
+ case 6:
735
+ this._coreService.decPrivateModes.origin = false, this._setCursor(0, 0);
736
+ break;
737
+ case 7:
738
+ this._coreService.decPrivateModes.wraparound = false;
739
+ break;
740
+ case 12:
741
+ this._optionsService.options.cursorBlink = false;
742
+ break;
743
+ case 45:
744
+ this._coreService.decPrivateModes.reverseWraparound = false;
745
+ break;
746
+ case 66:
747
+ this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = false, this._onRequestSyncScrollBar.fire();
748
+ break;
749
+ case 9:
750
+ case 1e3:
751
+ case 1002:
752
+ case 1003:
753
+ this._coreMouseService.activeProtocol = "NONE";
754
+ break;
755
+ case 1004:
756
+ this._coreService.decPrivateModes.sendFocus = false;
757
+ break;
758
+ case 1005:
759
+ this._logService.debug("DECRST 1005 not supported (see #2507)");
760
+ break;
761
+ case 1006:
762
+ case 1016:
763
+ this._coreMouseService.activeEncoding = "DEFAULT";
764
+ break;
765
+ case 1015:
766
+ this._logService.debug("DECRST 1015 not supported (see #2507)");
767
+ break;
768
+ case 25:
769
+ this._coreService.isCursorHidden = true;
770
+ break;
771
+ case 1048:
772
+ this.restoreCursor();
773
+ break;
774
+ case 1049:
775
+ case 47:
776
+ case 1047:
777
+ this._bufferService.buffers.activateNormalBuffer(), 1049 === e3.params[t3] && this.restoreCursor(), this._coreService.isCursorInitialized = true, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
778
+ break;
779
+ case 2004:
780
+ this._coreService.decPrivateModes.bracketedPasteMode = false;
781
+ }
782
+ return true;
783
+ }
784
+ requestMode(e3, t3) {
785
+ const i3 = this._coreService.decPrivateModes, { activeProtocol: s3, activeEncoding: r3 } = this._coreMouseService, a2 = this._coreService, { buffers: o2, cols: h2 } = this._bufferService, { active: c2, alt: l2 } = o2, _2 = this._optionsService.rawOptions, d2 = /* @__PURE__ */ __name((e4) => e4 ? 1 : 2, "d"), f2 = e3.params[0];
786
+ return u2 = f2, p2 = t3 ? 2 === f2 ? 4 : 4 === f2 ? d2(a2.modes.insertMode) : 12 === f2 ? 3 : 20 === f2 ? d2(_2.convertEol) : 0 : 1 === f2 ? d2(i3.applicationCursorKeys) : 3 === f2 ? _2.windowOptions.setWinLines ? 80 === h2 ? 2 : 132 === h2 ? 1 : 0 : 0 : 6 === f2 ? d2(i3.origin) : 7 === f2 ? d2(i3.wraparound) : 8 === f2 ? 3 : 9 === f2 ? d2("X10" === s3) : 12 === f2 ? d2(_2.cursorBlink) : 25 === f2 ? d2(!a2.isCursorHidden) : 45 === f2 ? d2(i3.reverseWraparound) : 66 === f2 ? d2(i3.applicationKeypad) : 67 === f2 ? 4 : 1e3 === f2 ? d2("VT200" === s3) : 1002 === f2 ? d2("DRAG" === s3) : 1003 === f2 ? d2("ANY" === s3) : 1004 === f2 ? d2(i3.sendFocus) : 1005 === f2 ? 4 : 1006 === f2 ? d2("SGR" === r3) : 1015 === f2 ? 4 : 1016 === f2 ? d2("SGR_PIXELS" === r3) : 1048 === f2 ? 1 : 47 === f2 || 1047 === f2 || 1049 === f2 ? d2(c2 === l2) : 2004 === f2 ? d2(i3.bracketedPasteMode) : 0, a2.triggerDataEvent(`${n2.C0.ESC}[${t3 ? "" : "?"}${u2};${p2}$y`), true;
787
+ var u2, p2;
788
+ }
789
+ _updateAttrColor(e3, t3, i3, s3, r3) {
790
+ return 2 === t3 ? (e3 |= 50331648, e3 &= -16777216, e3 |= u.AttributeData.fromColorRGB([i3, s3, r3])) : 5 === t3 && (e3 &= -50331904, e3 |= 33554432 | 255 & i3), e3;
791
+ }
792
+ _extractColor(e3, t3, i3) {
793
+ const s3 = [0, 0, -1, 0, 0, 0];
794
+ let r3 = 0, n3 = 0;
795
+ do {
796
+ if (s3[n3 + r3] = e3.params[t3 + n3], e3.hasSubParams(t3 + n3)) {
797
+ const i4 = e3.getSubParams(t3 + n3);
798
+ let a2 = 0;
799
+ do {
800
+ 5 === s3[1] && (r3 = 1), s3[n3 + a2 + 1 + r3] = i4[a2];
801
+ } while (++a2 < i4.length && a2 + n3 + 1 + r3 < s3.length);
802
+ break;
803
+ }
804
+ if (5 === s3[1] && n3 + r3 >= 2 || 2 === s3[1] && n3 + r3 >= 5) break;
805
+ s3[1] && (r3 = 1);
806
+ } while (++n3 + t3 < e3.length && n3 + r3 < s3.length);
807
+ for (let e4 = 2; e4 < s3.length; ++e4) -1 === s3[e4] && (s3[e4] = 0);
808
+ switch (s3[0]) {
809
+ case 38:
810
+ i3.fg = this._updateAttrColor(i3.fg, s3[1], s3[3], s3[4], s3[5]);
811
+ break;
812
+ case 48:
813
+ i3.bg = this._updateAttrColor(i3.bg, s3[1], s3[3], s3[4], s3[5]);
814
+ break;
815
+ case 58:
816
+ i3.extended = i3.extended.clone(), i3.extended.underlineColor = this._updateAttrColor(i3.extended.underlineColor, s3[1], s3[3], s3[4], s3[5]);
817
+ }
818
+ return n3;
819
+ }
820
+ _processUnderline(e3, t3) {
821
+ t3.extended = t3.extended.clone(), (!~e3 || e3 > 5) && (e3 = 1), t3.extended.underlineStyle = e3, t3.fg |= 268435456, 0 === e3 && (t3.fg &= -268435457), t3.updateExtended();
822
+ }
823
+ _processSGR0(e3) {
824
+ e3.fg = l.DEFAULT_ATTR_DATA.fg, e3.bg = l.DEFAULT_ATTR_DATA.bg, e3.extended = e3.extended.clone(), e3.extended.underlineStyle = 0, e3.extended.underlineColor &= -67108864, e3.updateExtended();
825
+ }
826
+ charAttributes(e3) {
827
+ if (1 === e3.length && 0 === e3.params[0]) return this._processSGR0(this._curAttrData), true;
828
+ const t3 = e3.length;
829
+ let i3;
830
+ const s3 = this._curAttrData;
831
+ for (let r3 = 0; r3 < t3; r3++) i3 = e3.params[r3], i3 >= 30 && i3 <= 37 ? (s3.fg &= -50331904, s3.fg |= 16777216 | i3 - 30) : i3 >= 40 && i3 <= 47 ? (s3.bg &= -50331904, s3.bg |= 16777216 | i3 - 40) : i3 >= 90 && i3 <= 97 ? (s3.fg &= -50331904, s3.fg |= 16777224 | i3 - 90) : i3 >= 100 && i3 <= 107 ? (s3.bg &= -50331904, s3.bg |= 16777224 | i3 - 100) : 0 === i3 ? this._processSGR0(s3) : 1 === i3 ? s3.fg |= 134217728 : 3 === i3 ? s3.bg |= 67108864 : 4 === i3 ? (s3.fg |= 268435456, this._processUnderline(e3.hasSubParams(r3) ? e3.getSubParams(r3)[0] : 1, s3)) : 5 === i3 ? s3.fg |= 536870912 : 7 === i3 ? s3.fg |= 67108864 : 8 === i3 ? s3.fg |= 1073741824 : 9 === i3 ? s3.fg |= 2147483648 : 2 === i3 ? s3.bg |= 134217728 : 21 === i3 ? this._processUnderline(2, s3) : 22 === i3 ? (s3.fg &= -134217729, s3.bg &= -134217729) : 23 === i3 ? s3.bg &= -67108865 : 24 === i3 ? (s3.fg &= -268435457, this._processUnderline(0, s3)) : 25 === i3 ? s3.fg &= -536870913 : 27 === i3 ? s3.fg &= -67108865 : 28 === i3 ? s3.fg &= -1073741825 : 29 === i3 ? s3.fg &= 2147483647 : 39 === i3 ? (s3.fg &= -67108864, s3.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg) : 49 === i3 ? (s3.bg &= -67108864, s3.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : 38 === i3 || 48 === i3 || 58 === i3 ? r3 += this._extractColor(e3, r3, s3) : 53 === i3 ? s3.bg |= 1073741824 : 55 === i3 ? s3.bg &= -1073741825 : 59 === i3 ? (s3.extended = s3.extended.clone(), s3.extended.underlineColor = -1, s3.updateExtended()) : 100 === i3 ? (s3.fg &= -67108864, s3.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg, s3.bg &= -67108864, s3.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", i3);
832
+ return true;
833
+ }
834
+ deviceStatus(e3) {
835
+ switch (e3.params[0]) {
836
+ case 5:
837
+ this._coreService.triggerDataEvent(`${n2.C0.ESC}[0n`);
838
+ break;
839
+ case 6:
840
+ const e4 = this._activeBuffer.y + 1, t3 = this._activeBuffer.x + 1;
841
+ this._coreService.triggerDataEvent(`${n2.C0.ESC}[${e4};${t3}R`);
842
+ }
843
+ return true;
844
+ }
845
+ deviceStatusPrivate(e3) {
846
+ if (6 === e3.params[0]) {
847
+ const e4 = this._activeBuffer.y + 1, t3 = this._activeBuffer.x + 1;
848
+ this._coreService.triggerDataEvent(`${n2.C0.ESC}[?${e4};${t3}R`);
849
+ }
850
+ return true;
851
+ }
852
+ softReset(e3) {
853
+ return this._coreService.isCursorHidden = false, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = false, true;
854
+ }
855
+ setCursorStyle(e3) {
856
+ const t3 = e3.params[0] || 1;
857
+ switch (t3) {
858
+ case 1:
859
+ case 2:
860
+ this._optionsService.options.cursorStyle = "block";
861
+ break;
862
+ case 3:
863
+ case 4:
864
+ this._optionsService.options.cursorStyle = "underline";
865
+ break;
866
+ case 5:
867
+ case 6:
868
+ this._optionsService.options.cursorStyle = "bar";
869
+ }
870
+ const i3 = t3 % 2 == 1;
871
+ return this._optionsService.options.cursorBlink = i3, true;
872
+ }
873
+ setScrollRegion(e3) {
874
+ const t3 = e3.params[0] || 1;
875
+ let i3;
876
+ return (e3.length < 2 || (i3 = e3.params[1]) > this._bufferService.rows || 0 === i3) && (i3 = this._bufferService.rows), i3 > t3 && (this._activeBuffer.scrollTop = t3 - 1, this._activeBuffer.scrollBottom = i3 - 1, this._setCursor(0, 0)), true;
877
+ }
878
+ windowOptions(e3) {
879
+ if (!y(e3.params[0], this._optionsService.rawOptions.windowOptions)) return true;
880
+ const t3 = e3.length > 1 ? e3.params[1] : 0;
881
+ switch (e3.params[0]) {
882
+ case 14:
883
+ 2 !== t3 && this._onRequestWindowsOptionsReport.fire(w.GET_WIN_SIZE_PIXELS);
884
+ break;
885
+ case 16:
886
+ this._onRequestWindowsOptionsReport.fire(w.GET_CELL_SIZE_PIXELS);
887
+ break;
888
+ case 18:
889
+ this._bufferService && this._coreService.triggerDataEvent(`${n2.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
890
+ break;
891
+ case 22:
892
+ 0 !== t3 && 2 !== t3 || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), 0 !== t3 && 1 !== t3 || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
893
+ break;
894
+ case 23:
895
+ 0 !== t3 && 2 !== t3 || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), 0 !== t3 && 1 !== t3 || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
896
+ }
897
+ return true;
898
+ }
899
+ saveCursor(e3) {
900
+ return this._activeBuffer.savedX = this._activeBuffer.x, this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, true;
901
+ }
902
+ restoreCursor(e3) {
903
+ return this._activeBuffer.x = this._activeBuffer.savedX || 0, this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0), this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg, this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg, this._charsetService.charset = this._savedCharset, this._activeBuffer.savedCharset && (this._charsetService.charset = this._activeBuffer.savedCharset), this._restrictCursor(), true;
904
+ }
905
+ setTitle(e3) {
906
+ return this._windowTitle = e3, this._onTitleChange.fire(e3), true;
907
+ }
908
+ setIconName(e3) {
909
+ return this._iconName = e3, true;
910
+ }
911
+ setOrReportIndexedColor(e3) {
912
+ const t3 = [], i3 = e3.split(";");
913
+ for (; i3.length > 1; ) {
914
+ const e4 = i3.shift(), s3 = i3.shift();
915
+ if (/^\d+$/.exec(e4)) {
916
+ const i4 = parseInt(e4);
917
+ if (L(i4)) if ("?" === s3) t3.push({ type: 0, index: i4 });
918
+ else {
919
+ const e5 = (0, S.parseColor)(s3);
920
+ e5 && t3.push({ type: 1, index: i4, color: e5 });
921
+ }
922
+ }
923
+ }
924
+ return t3.length && this._onColor.fire(t3), true;
925
+ }
926
+ setHyperlink(e3) {
927
+ const t3 = e3.split(";");
928
+ return !(t3.length < 2) && (t3[1] ? this._createHyperlink(t3[0], t3[1]) : !t3[0] && this._finishHyperlink());
929
+ }
930
+ _createHyperlink(e3, t3) {
931
+ this._getCurrentLinkId() && this._finishHyperlink();
932
+ const i3 = e3.split(":");
933
+ let s3;
934
+ const r3 = i3.findIndex((e4) => e4.startsWith("id="));
935
+ return -1 !== r3 && (s3 = i3[r3].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: s3, uri: t3 }), this._curAttrData.updateExtended(), true;
936
+ }
937
+ _finishHyperlink() {
938
+ return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), true;
939
+ }
940
+ _setOrReportSpecialColor(e3, t3) {
941
+ const i3 = e3.split(";");
942
+ for (let e4 = 0; e4 < i3.length && !(t3 >= this._specialColors.length); ++e4, ++t3) if ("?" === i3[e4]) this._onColor.fire([{ type: 0, index: this._specialColors[t3] }]);
943
+ else {
944
+ const s3 = (0, S.parseColor)(i3[e4]);
945
+ s3 && this._onColor.fire([{ type: 1, index: this._specialColors[t3], color: s3 }]);
946
+ }
947
+ return true;
948
+ }
949
+ setOrReportFgColor(e3) {
950
+ return this._setOrReportSpecialColor(e3, 0);
951
+ }
952
+ setOrReportBgColor(e3) {
953
+ return this._setOrReportSpecialColor(e3, 1);
954
+ }
955
+ setOrReportCursorColor(e3) {
956
+ return this._setOrReportSpecialColor(e3, 2);
957
+ }
958
+ restoreIndexedColor(e3) {
959
+ if (!e3) return this._onColor.fire([{ type: 2 }]), true;
960
+ const t3 = [], i3 = e3.split(";");
961
+ for (let e4 = 0; e4 < i3.length; ++e4) if (/^\d+$/.exec(i3[e4])) {
962
+ const s3 = parseInt(i3[e4]);
963
+ L(s3) && t3.push({ type: 2, index: s3 });
964
+ }
965
+ return t3.length && this._onColor.fire(t3), true;
966
+ }
967
+ restoreFgColor(e3) {
968
+ return this._onColor.fire([{ type: 2, index: 256 }]), true;
969
+ }
970
+ restoreBgColor(e3) {
971
+ return this._onColor.fire([{ type: 2, index: 257 }]), true;
972
+ }
973
+ restoreCursorColor(e3) {
974
+ return this._onColor.fire([{ type: 2, index: 258 }]), true;
975
+ }
976
+ nextLine() {
977
+ return this._activeBuffer.x = 0, this.index(), true;
978
+ }
979
+ keypadApplicationMode() {
980
+ return this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = true, this._onRequestSyncScrollBar.fire(), true;
981
+ }
982
+ keypadNumericMode() {
983
+ return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = false, this._onRequestSyncScrollBar.fire(), true;
984
+ }
985
+ selectDefaultCharset() {
986
+ return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, a.DEFAULT_CHARSET), true;
987
+ }
988
+ selectCharset(e3) {
989
+ return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(m[e3[0]], a.CHARSETS[e3[1]] || a.DEFAULT_CHARSET), true);
990
+ }
991
+ index() {
992
+ 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;
993
+ }
994
+ tabSet() {
995
+ return this._activeBuffer.tabs[this._activeBuffer.x] = true, true;
996
+ }
997
+ reverseIndex() {
998
+ if (this._restrictCursor(), this._activeBuffer.y === this._activeBuffer.scrollTop) {
999
+ const e3 = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
1000
+ this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, e3, 1), this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData())), this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
1001
+ } else this._activeBuffer.y--, this._restrictCursor();
1002
+ return true;
1003
+ }
1004
+ fullReset() {
1005
+ return this._parser.reset(), this._onRequestReset.fire(), true;
1006
+ }
1007
+ reset() {
1008
+ this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone();
1009
+ }
1010
+ _eraseAttrData() {
1011
+ return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
1012
+ }
1013
+ setgLevel(e3) {
1014
+ return this._charsetService.setgLevel(e3), true;
1015
+ }
1016
+ screenAlignmentPattern() {
1017
+ const e3 = new f.CellData();
1018
+ e3.content = 1 << 22 | "E".charCodeAt(0), e3.fg = this._curAttrData.fg, e3.bg = this._curAttrData.bg, this._setCursor(0, 0);
1019
+ for (let t3 = 0; t3 < this._bufferService.rows; ++t3) {
1020
+ const i3 = this._activeBuffer.ybase + this._activeBuffer.y + t3, s3 = this._activeBuffer.lines.get(i3);
1021
+ s3 && (s3.fill(e3), s3.isWrapped = false);
1022
+ }
1023
+ return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), true;
1024
+ }
1025
+ requestStatusString(e3, t3) {
1026
+ const i3 = this._bufferService.buffer, s3 = this._optionsService.rawOptions;
1027
+ return ((e4) => (this._coreService.triggerDataEvent(`${n2.C0.ESC}${e4}${n2.C0.ESC}\\`), true))('"q' === e3 ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : '"p' === e3 ? 'P1$r61;1"p' : "r" === e3 ? `P1$r${i3.scrollTop + 1};${i3.scrollBottom + 1}r` : "m" === e3 ? "P1$r0m" : " q" === e3 ? `P1$r${{ block: 2, underline: 4, bar: 6 }[s3.cursorStyle] - (s3.cursorBlink ? 1 : 0)} q` : "P0$r");
1028
+ }
1029
+ markRangeDirty(e3, t3) {
1030
+ this._dirtyRowTracker.markRangeDirty(e3, t3);
1031
+ }
1032
+ }
1033
+ t2.InputHandler = E;
1034
+ let A = class {
1035
+ static {
1036
+ __name(this, "A");
1037
+ }
1038
+ constructor(e3) {
1039
+ this._bufferService = e3, this.clearRange();
1040
+ }
1041
+ clearRange() {
1042
+ this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
1043
+ }
1044
+ markDirty(e3) {
1045
+ e3 < this.start ? this.start = e3 : e3 > this.end && (this.end = e3);
1046
+ }
1047
+ markRangeDirty(e3, t3) {
1048
+ e3 > t3 && (B = e3, e3 = t3, t3 = B), e3 < this.start && (this.start = e3), t3 > this.end && (this.end = t3);
1049
+ }
1050
+ markAllDirty() {
1051
+ this.markRangeDirty(0, this._bufferService.rows - 1);
1052
+ }
1053
+ };
1054
+ function L(e3) {
1055
+ return 0 <= e3 && e3 < 256;
1056
+ }
1057
+ __name(L, "L");
1058
+ A = s2([r2(0, p.IBufferService)], A);
1059
+ }, 844: (e2, t2) => {
1060
+ function i2(e3) {
1061
+ for (const t3 of e3) t3.dispose();
1062
+ e3.length = 0;
1063
+ }
1064
+ __name(i2, "i");
1065
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.getDisposeArrayDisposable = t2.disposeArray = t2.toDisposable = t2.MutableDisposable = t2.Disposable = void 0, t2.Disposable = class {
1066
+ constructor() {
1067
+ this._disposables = [], this._isDisposed = false;
1068
+ }
1069
+ dispose() {
1070
+ this._isDisposed = true;
1071
+ for (const e3 of this._disposables) e3.dispose();
1072
+ this._disposables.length = 0;
1073
+ }
1074
+ register(e3) {
1075
+ return this._disposables.push(e3), e3;
1076
+ }
1077
+ unregister(e3) {
1078
+ const t3 = this._disposables.indexOf(e3);
1079
+ -1 !== t3 && this._disposables.splice(t3, 1);
1080
+ }
1081
+ }, t2.MutableDisposable = class {
1082
+ constructor() {
1083
+ this._isDisposed = false;
1084
+ }
1085
+ get value() {
1086
+ return this._isDisposed ? void 0 : this._value;
1087
+ }
1088
+ set value(e3) {
1089
+ this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
1090
+ }
1091
+ clear() {
1092
+ this.value = void 0;
1093
+ }
1094
+ dispose() {
1095
+ this._isDisposed = true, this._value?.dispose(), this._value = void 0;
1096
+ }
1097
+ }, t2.toDisposable = function(e3) {
1098
+ return { dispose: e3 };
1099
+ }, t2.disposeArray = i2, t2.getDisposeArrayDisposable = function(e3) {
1100
+ return { dispose: /* @__PURE__ */ __name(() => i2(e3), "dispose") };
1101
+ };
1102
+ }, 114: (e2, t2) => {
1103
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.isChromeOS = t2.isLinux = t2.isWindows = t2.isIphone = t2.isIpad = t2.isMac = t2.getSafariVersion = t2.isSafari = t2.isLegacyEdge = t2.isFirefox = t2.isNode = void 0, t2.isNode = "undefined" != typeof process && "title" in process;
1104
+ const i2 = t2.isNode ? "node" : navigator.userAgent, s2 = t2.isNode ? "node" : navigator.platform;
1105
+ t2.isFirefox = i2.includes("Firefox"), t2.isLegacyEdge = i2.includes("Edge"), t2.isSafari = /^((?!chrome|android).)*safari/i.test(i2), t2.getSafariVersion = function() {
1106
+ if (!t2.isSafari) return 0;
1107
+ const e3 = i2.match(/Version\/(\d+)/);
1108
+ return null === e3 || e3.length < 2 ? 0 : parseInt(e3[1]);
1109
+ }, t2.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s2), t2.isIpad = "iPad" === s2, t2.isIphone = "iPhone" === s2, t2.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s2), t2.isLinux = s2.indexOf("Linux") >= 0, t2.isChromeOS = /\bCrOS\b/.test(i2);
1110
+ }, 226: (e2, t2, i2) => {
1111
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DebouncedIdleTask = t2.IdleTaskQueue = t2.PriorityTaskQueue = void 0;
1112
+ const s2 = i2(114);
1113
+ class r2 {
1114
+ static {
1115
+ __name(this, "r");
1116
+ }
1117
+ constructor() {
1118
+ this._tasks = [], this._i = 0;
1119
+ }
1120
+ enqueue(e3) {
1121
+ this._tasks.push(e3), this._start();
1122
+ }
1123
+ flush() {
1124
+ for (; this._i < this._tasks.length; ) this._tasks[this._i]() || this._i++;
1125
+ this.clear();
1126
+ }
1127
+ clear() {
1128
+ this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
1129
+ }
1130
+ _start() {
1131
+ this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
1132
+ }
1133
+ _process(e3) {
1134
+ this._idleCallback = void 0;
1135
+ let t3 = 0, i3 = 0, s3 = e3.timeRemaining(), r3 = 0;
1136
+ for (; this._i < this._tasks.length; ) {
1137
+ if (t3 = Date.now(), this._tasks[this._i]() || this._i++, t3 = Math.max(1, Date.now() - t3), i3 = Math.max(t3, i3), r3 = e3.timeRemaining(), 1.5 * i3 > r3) return s3 - t3 < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s3 - t3))}ms`), void this._start();
1138
+ s3 = r3;
1139
+ }
1140
+ this.clear();
1141
+ }
1142
+ }
1143
+ class n2 extends r2 {
1144
+ static {
1145
+ __name(this, "n");
1146
+ }
1147
+ _requestCallback(e3) {
1148
+ return setTimeout(() => e3(this._createDeadline(16)));
1149
+ }
1150
+ _cancelCallback(e3) {
1151
+ clearTimeout(e3);
1152
+ }
1153
+ _createDeadline(e3) {
1154
+ const t3 = Date.now() + e3;
1155
+ return { timeRemaining: /* @__PURE__ */ __name(() => Math.max(0, t3 - Date.now()), "timeRemaining") };
1156
+ }
1157
+ }
1158
+ t2.PriorityTaskQueue = n2, t2.IdleTaskQueue = !s2.isNode && "requestIdleCallback" in window ? class extends r2 {
1159
+ _requestCallback(e3) {
1160
+ return requestIdleCallback(e3);
1161
+ }
1162
+ _cancelCallback(e3) {
1163
+ cancelIdleCallback(e3);
1164
+ }
1165
+ } : n2, t2.DebouncedIdleTask = class {
1166
+ constructor() {
1167
+ this._queue = new t2.IdleTaskQueue();
1168
+ }
1169
+ set(e3) {
1170
+ this._queue.clear(), this._queue.enqueue(e3);
1171
+ }
1172
+ flush() {
1173
+ this._queue.flush();
1174
+ }
1175
+ };
1176
+ }, 282: (e2, t2, i2) => {
1177
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.updateWindowsModeWrappedState = void 0;
1178
+ const s2 = i2(643);
1179
+ t2.updateWindowsModeWrappedState = function(e3) {
1180
+ const t3 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y - 1), i3 = t3?.get(e3.cols - 1), r2 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y);
1181
+ r2 && i3 && (r2.isWrapped = i3[s2.CHAR_DATA_CODE_INDEX] !== s2.NULL_CELL_CODE && i3[s2.CHAR_DATA_CODE_INDEX] !== s2.WHITESPACE_CELL_CODE);
1182
+ };
1183
+ }, 734: (e2, t2) => {
1184
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.ExtendedAttrs = t2.AttributeData = void 0;
1185
+ class i2 {
1186
+ static {
1187
+ __name(this, "i");
1188
+ }
1189
+ constructor() {
1190
+ this.fg = 0, this.bg = 0, this.extended = new s2();
1191
+ }
1192
+ static toColorRGB(e3) {
1193
+ return [e3 >>> 16 & 255, e3 >>> 8 & 255, 255 & e3];
1194
+ }
1195
+ static fromColorRGB(e3) {
1196
+ return (255 & e3[0]) << 16 | (255 & e3[1]) << 8 | 255 & e3[2];
1197
+ }
1198
+ clone() {
1199
+ const e3 = new i2();
1200
+ return e3.fg = this.fg, e3.bg = this.bg, e3.extended = this.extended.clone(), e3;
1201
+ }
1202
+ isInverse() {
1203
+ return 67108864 & this.fg;
1204
+ }
1205
+ isBold() {
1206
+ return 134217728 & this.fg;
1207
+ }
1208
+ isUnderline() {
1209
+ return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
1210
+ }
1211
+ isBlink() {
1212
+ return 536870912 & this.fg;
1213
+ }
1214
+ isInvisible() {
1215
+ return 1073741824 & this.fg;
1216
+ }
1217
+ isItalic() {
1218
+ return 67108864 & this.bg;
1219
+ }
1220
+ isDim() {
1221
+ return 134217728 & this.bg;
1222
+ }
1223
+ isStrikethrough() {
1224
+ return 2147483648 & this.fg;
1225
+ }
1226
+ isProtected() {
1227
+ return 536870912 & this.bg;
1228
+ }
1229
+ isOverline() {
1230
+ return 1073741824 & this.bg;
1231
+ }
1232
+ getFgColorMode() {
1233
+ return 50331648 & this.fg;
1234
+ }
1235
+ getBgColorMode() {
1236
+ return 50331648 & this.bg;
1237
+ }
1238
+ isFgRGB() {
1239
+ return 50331648 == (50331648 & this.fg);
1240
+ }
1241
+ isBgRGB() {
1242
+ return 50331648 == (50331648 & this.bg);
1243
+ }
1244
+ isFgPalette() {
1245
+ return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
1246
+ }
1247
+ isBgPalette() {
1248
+ return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
1249
+ }
1250
+ isFgDefault() {
1251
+ return 0 == (50331648 & this.fg);
1252
+ }
1253
+ isBgDefault() {
1254
+ return 0 == (50331648 & this.bg);
1255
+ }
1256
+ isAttributeDefault() {
1257
+ return 0 === this.fg && 0 === this.bg;
1258
+ }
1259
+ getFgColor() {
1260
+ switch (50331648 & this.fg) {
1261
+ case 16777216:
1262
+ case 33554432:
1263
+ return 255 & this.fg;
1264
+ case 50331648:
1265
+ return 16777215 & this.fg;
1266
+ default:
1267
+ return -1;
1268
+ }
1269
+ }
1270
+ getBgColor() {
1271
+ switch (50331648 & this.bg) {
1272
+ case 16777216:
1273
+ case 33554432:
1274
+ return 255 & this.bg;
1275
+ case 50331648:
1276
+ return 16777215 & this.bg;
1277
+ default:
1278
+ return -1;
1279
+ }
1280
+ }
1281
+ hasExtendedAttrs() {
1282
+ return 268435456 & this.bg;
1283
+ }
1284
+ updateExtended() {
1285
+ this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
1286
+ }
1287
+ getUnderlineColor() {
1288
+ if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
1289
+ case 16777216:
1290
+ case 33554432:
1291
+ return 255 & this.extended.underlineColor;
1292
+ case 50331648:
1293
+ return 16777215 & this.extended.underlineColor;
1294
+ default:
1295
+ return this.getFgColor();
1296
+ }
1297
+ return this.getFgColor();
1298
+ }
1299
+ getUnderlineColorMode() {
1300
+ return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
1301
+ }
1302
+ isUnderlineColorRGB() {
1303
+ return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
1304
+ }
1305
+ isUnderlineColorPalette() {
1306
+ return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
1307
+ }
1308
+ isUnderlineColorDefault() {
1309
+ return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
1310
+ }
1311
+ getUnderlineStyle() {
1312
+ return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
1313
+ }
1314
+ getUnderlineVariantOffset() {
1315
+ return this.extended.underlineVariantOffset;
1316
+ }
1317
+ }
1318
+ t2.AttributeData = i2;
1319
+ class s2 {
1320
+ static {
1321
+ __name(this, "s");
1322
+ }
1323
+ get ext() {
1324
+ return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
1325
+ }
1326
+ set ext(e3) {
1327
+ this._ext = e3;
1328
+ }
1329
+ get underlineStyle() {
1330
+ return this._urlId ? 5 : (469762048 & this._ext) >> 26;
1331
+ }
1332
+ set underlineStyle(e3) {
1333
+ this._ext &= -469762049, this._ext |= e3 << 26 & 469762048;
1334
+ }
1335
+ get underlineColor() {
1336
+ return 67108863 & this._ext;
1337
+ }
1338
+ set underlineColor(e3) {
1339
+ this._ext &= -67108864, this._ext |= 67108863 & e3;
1340
+ }
1341
+ get urlId() {
1342
+ return this._urlId;
1343
+ }
1344
+ set urlId(e3) {
1345
+ this._urlId = e3;
1346
+ }
1347
+ get underlineVariantOffset() {
1348
+ const e3 = (3758096384 & this._ext) >> 29;
1349
+ return e3 < 0 ? 4294967288 ^ e3 : e3;
1350
+ }
1351
+ set underlineVariantOffset(e3) {
1352
+ this._ext &= 536870911, this._ext |= e3 << 29 & 3758096384;
1353
+ }
1354
+ constructor(e3 = 0, t3 = 0) {
1355
+ this._ext = 0, this._urlId = 0, this._ext = e3, this._urlId = t3;
1356
+ }
1357
+ clone() {
1358
+ return new s2(this._ext, this._urlId);
1359
+ }
1360
+ isEmpty() {
1361
+ return 0 === this.underlineStyle && 0 === this._urlId;
1362
+ }
1363
+ }
1364
+ t2.ExtendedAttrs = s2;
1365
+ }, 92: (e2, t2, i2) => {
1366
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Buffer = t2.MAX_BUFFER_SIZE = void 0;
1367
+ const s2 = i2(349), r2 = i2(226), n2 = i2(734), a = i2(437), o = i2(634), h = i2(511), c = i2(643), l = i2(863), _ = i2(116);
1368
+ t2.MAX_BUFFER_SIZE = 4294967295, t2.Buffer = class {
1369
+ constructor(e3, t3, i3) {
1370
+ this._hasScrollback = e3, this._optionsService = t3, this._bufferService = i3, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = a.DEFAULT_ATTR_DATA.clone(), this.savedCharset = _.DEFAULT_CHARSET, this.markers = [], this._nullCell = h.CellData.fromCharData([0, c.NULL_CELL_CHAR, c.NULL_CELL_WIDTH, c.NULL_CELL_CODE]), this._whitespaceCell = h.CellData.fromCharData([0, c.WHITESPACE_CELL_CHAR, c.WHITESPACE_CELL_WIDTH, c.WHITESPACE_CELL_CODE]), this._isClearing = false, this._memoryCleanupQueue = new r2.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new s2.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
1371
+ }
1372
+ getNullCell(e3) {
1373
+ return e3 ? (this._nullCell.fg = e3.fg, this._nullCell.bg = e3.bg, this._nullCell.extended = e3.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new n2.ExtendedAttrs()), this._nullCell;
1374
+ }
1375
+ getWhitespaceCell(e3) {
1376
+ return e3 ? (this._whitespaceCell.fg = e3.fg, this._whitespaceCell.bg = e3.bg, this._whitespaceCell.extended = e3.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new n2.ExtendedAttrs()), this._whitespaceCell;
1377
+ }
1378
+ getBlankLine(e3, t3) {
1379
+ return new a.BufferLine(this._bufferService.cols, this.getNullCell(e3), t3);
1380
+ }
1381
+ get hasScrollback() {
1382
+ return this._hasScrollback && this.lines.maxLength > this._rows;
1383
+ }
1384
+ get isCursorInViewport() {
1385
+ const e3 = this.ybase + this.y - this.ydisp;
1386
+ return e3 >= 0 && e3 < this._rows;
1387
+ }
1388
+ _getCorrectBufferLength(e3) {
1389
+ if (!this._hasScrollback) return e3;
1390
+ const i3 = e3 + this._optionsService.rawOptions.scrollback;
1391
+ return i3 > t2.MAX_BUFFER_SIZE ? t2.MAX_BUFFER_SIZE : i3;
1392
+ }
1393
+ fillViewportRows(e3) {
1394
+ if (0 === this.lines.length) {
1395
+ void 0 === e3 && (e3 = a.DEFAULT_ATTR_DATA);
1396
+ let t3 = this._rows;
1397
+ for (; t3--; ) this.lines.push(this.getBlankLine(e3));
1398
+ }
1399
+ }
1400
+ clear() {
1401
+ this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new s2.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
1402
+ }
1403
+ resize(e3, t3) {
1404
+ const i3 = this.getNullCell(a.DEFAULT_ATTR_DATA);
1405
+ let s3 = 0;
1406
+ const r3 = this._getCorrectBufferLength(t3);
1407
+ if (r3 > this.lines.maxLength && (this.lines.maxLength = r3), this.lines.length > 0) {
1408
+ if (this._cols < e3) for (let t4 = 0; t4 < this.lines.length; t4++) s3 += +this.lines.get(t4).resize(e3, i3);
1409
+ let n3 = 0;
1410
+ if (this._rows < t3) for (let s4 = this._rows; s4 < t3; s4++) this.lines.length < t3 + this.ybase && (this._optionsService.rawOptions.windowsMode || void 0 !== this._optionsService.rawOptions.windowsPty.backend || void 0 !== this._optionsService.rawOptions.windowsPty.buildNumber ? this.lines.push(new a.BufferLine(e3, i3)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + n3 + 1 ? (this.ybase--, n3++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new a.BufferLine(e3, i3)));
1411
+ else for (let e4 = this._rows; e4 > t3; e4--) this.lines.length > t3 + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
1412
+ if (r3 < this.lines.maxLength) {
1413
+ const e4 = this.lines.length - r3;
1414
+ e4 > 0 && (this.lines.trimStart(e4), this.ybase = Math.max(this.ybase - e4, 0), this.ydisp = Math.max(this.ydisp - e4, 0), this.savedY = Math.max(this.savedY - e4, 0)), this.lines.maxLength = r3;
1415
+ }
1416
+ this.x = Math.min(this.x, e3 - 1), this.y = Math.min(this.y, t3 - 1), n3 && (this.y += n3), this.savedX = Math.min(this.savedX, e3 - 1), this.scrollTop = 0;
1417
+ }
1418
+ if (this.scrollBottom = t3 - 1, this._isReflowEnabled && (this._reflow(e3, t3), this._cols > e3)) for (let t4 = 0; t4 < this.lines.length; t4++) s3 += +this.lines.get(t4).resize(e3, i3);
1419
+ this._cols = e3, this._rows = t3, this._memoryCleanupQueue.clear(), s3 > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
1420
+ }
1421
+ _batchedMemoryCleanup() {
1422
+ let e3 = true;
1423
+ this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, e3 = false);
1424
+ let t3 = 0;
1425
+ for (; this._memoryCleanupPosition < this.lines.length; ) if (t3 += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), t3 > 100) return true;
1426
+ return e3;
1427
+ }
1428
+ get _isReflowEnabled() {
1429
+ const e3 = this._optionsService.rawOptions.windowsPty;
1430
+ return e3 && e3.buildNumber ? this._hasScrollback && "conpty" === e3.backend && e3.buildNumber >= 21376 : this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
1431
+ }
1432
+ _reflow(e3, t3) {
1433
+ this._cols !== e3 && (e3 > this._cols ? this._reflowLarger(e3, t3) : this._reflowSmaller(e3, t3));
1434
+ }
1435
+ _reflowLarger(e3, t3) {
1436
+ const i3 = (0, o.reflowLargerGetLinesToRemove)(this.lines, this._cols, e3, this.ybase + this.y, this.getNullCell(a.DEFAULT_ATTR_DATA));
1437
+ if (i3.length > 0) {
1438
+ const s3 = (0, o.reflowLargerCreateNewLayout)(this.lines, i3);
1439
+ (0, o.reflowLargerApplyNewLayout)(this.lines, s3.layout), this._reflowLargerAdjustViewport(e3, t3, s3.countRemoved);
1440
+ }
1441
+ }
1442
+ _reflowLargerAdjustViewport(e3, t3, i3) {
1443
+ const s3 = this.getNullCell(a.DEFAULT_ATTR_DATA);
1444
+ let r3 = i3;
1445
+ for (; r3-- > 0; ) 0 === this.ybase ? (this.y > 0 && this.y--, this.lines.length < t3 && this.lines.push(new a.BufferLine(e3, s3))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
1446
+ this.savedY = Math.max(this.savedY - i3, 0);
1447
+ }
1448
+ _reflowSmaller(e3, t3) {
1449
+ const i3 = this.getNullCell(a.DEFAULT_ATTR_DATA), s3 = [];
1450
+ let r3 = 0;
1451
+ for (let n3 = this.lines.length - 1; n3 >= 0; n3--) {
1452
+ let h2 = this.lines.get(n3);
1453
+ if (!h2 || !h2.isWrapped && h2.getTrimmedLength() <= e3) continue;
1454
+ const c2 = [h2];
1455
+ for (; h2.isWrapped && n3 > 0; ) h2 = this.lines.get(--n3), c2.unshift(h2);
1456
+ const l2 = this.ybase + this.y;
1457
+ if (l2 >= n3 && l2 < n3 + c2.length) continue;
1458
+ const _2 = c2[c2.length - 1].getTrimmedLength(), d = (0, o.reflowSmallerGetNewLineLengths)(c2, this._cols, e3), f = d.length - c2.length;
1459
+ let u;
1460
+ u = 0 === this.ybase && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + f) : Math.max(0, this.lines.length - this.lines.maxLength + f);
1461
+ const p = [];
1462
+ for (let e4 = 0; e4 < f; e4++) {
1463
+ const e5 = this.getBlankLine(a.DEFAULT_ATTR_DATA, true);
1464
+ p.push(e5);
1465
+ }
1466
+ p.length > 0 && (s3.push({ start: n3 + c2.length + r3, newLines: p }), r3 += p.length), c2.push(...p);
1467
+ let g = d.length - 1, v = d[g];
1468
+ 0 === v && (g--, v = d[g]);
1469
+ let b = c2.length - f - 1, S = _2;
1470
+ for (; b >= 0; ) {
1471
+ const e4 = Math.min(S, v);
1472
+ if (void 0 === c2[g]) break;
1473
+ if (c2[g].copyCellsFrom(c2[b], S - e4, v - e4, e4, true), v -= e4, 0 === v && (g--, v = d[g]), S -= e4, 0 === S) {
1474
+ b--;
1475
+ const e5 = Math.max(b, 0);
1476
+ S = (0, o.getWrappedLineTrimmedLength)(c2, e5, this._cols);
1477
+ }
1478
+ }
1479
+ for (let t4 = 0; t4 < c2.length; t4++) d[t4] < e3 && c2[t4].setCell(d[t4], i3);
1480
+ let m = f - u;
1481
+ for (; m-- > 0; ) 0 === this.ybase ? this.y < t3 - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + r3) - t3 && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
1482
+ this.savedY = Math.min(this.savedY + f, this.ybase + t3 - 1);
1483
+ }
1484
+ if (s3.length > 0) {
1485
+ const e4 = [], t4 = [];
1486
+ for (let e5 = 0; e5 < this.lines.length; e5++) t4.push(this.lines.get(e5));
1487
+ const i4 = this.lines.length;
1488
+ let n3 = i4 - 1, a2 = 0, o2 = s3[a2];
1489
+ this.lines.length = Math.min(this.lines.maxLength, this.lines.length + r3);
1490
+ let h2 = 0;
1491
+ for (let c3 = Math.min(this.lines.maxLength - 1, i4 + r3 - 1); c3 >= 0; c3--) if (o2 && o2.start > n3 + h2) {
1492
+ for (let e5 = o2.newLines.length - 1; e5 >= 0; e5--) this.lines.set(c3--, o2.newLines[e5]);
1493
+ c3++, e4.push({ index: n3 + 1, amount: o2.newLines.length }), h2 += o2.newLines.length, o2 = s3[++a2];
1494
+ } else this.lines.set(c3, t4[n3--]);
1495
+ let c2 = 0;
1496
+ for (let t5 = e4.length - 1; t5 >= 0; t5--) e4[t5].index += c2, this.lines.onInsertEmitter.fire(e4[t5]), c2 += e4[t5].amount;
1497
+ const l2 = Math.max(0, i4 + r3 - this.lines.maxLength);
1498
+ l2 > 0 && this.lines.onTrimEmitter.fire(l2);
1499
+ }
1500
+ }
1501
+ translateBufferLineToString(e3, t3, i3 = 0, s3) {
1502
+ const r3 = this.lines.get(e3);
1503
+ return r3 ? r3.translateToString(t3, i3, s3) : "";
1504
+ }
1505
+ getWrappedRangeForLine(e3) {
1506
+ let t3 = e3, i3 = e3;
1507
+ for (; t3 > 0 && this.lines.get(t3).isWrapped; ) t3--;
1508
+ for (; i3 + 1 < this.lines.length && this.lines.get(i3 + 1).isWrapped; ) i3++;
1509
+ return { first: t3, last: i3 };
1510
+ }
1511
+ setupTabStops(e3) {
1512
+ for (null != e3 ? this.tabs[e3] || (e3 = this.prevStop(e3)) : (this.tabs = {}, e3 = 0); e3 < this._cols; e3 += this._optionsService.rawOptions.tabStopWidth) this.tabs[e3] = true;
1513
+ }
1514
+ prevStop(e3) {
1515
+ for (null == e3 && (e3 = this.x); !this.tabs[--e3] && e3 > 0; ) ;
1516
+ return e3 >= this._cols ? this._cols - 1 : e3 < 0 ? 0 : e3;
1517
+ }
1518
+ nextStop(e3) {
1519
+ for (null == e3 && (e3 = this.x); !this.tabs[++e3] && e3 < this._cols; ) ;
1520
+ return e3 >= this._cols ? this._cols - 1 : e3 < 0 ? 0 : e3;
1521
+ }
1522
+ clearMarkers(e3) {
1523
+ this._isClearing = true;
1524
+ for (let t3 = 0; t3 < this.markers.length; t3++) this.markers[t3].line === e3 && (this.markers[t3].dispose(), this.markers.splice(t3--, 1));
1525
+ this._isClearing = false;
1526
+ }
1527
+ clearAllMarkers() {
1528
+ this._isClearing = true;
1529
+ for (let e3 = 0; e3 < this.markers.length; e3++) this.markers[e3].dispose(), this.markers.splice(e3--, 1);
1530
+ this._isClearing = false;
1531
+ }
1532
+ addMarker(e3) {
1533
+ const t3 = new l.Marker(e3);
1534
+ return this.markers.push(t3), t3.register(this.lines.onTrim((e4) => {
1535
+ t3.line -= e4, t3.line < 0 && t3.dispose();
1536
+ })), t3.register(this.lines.onInsert((e4) => {
1537
+ t3.line >= e4.index && (t3.line += e4.amount);
1538
+ })), t3.register(this.lines.onDelete((e4) => {
1539
+ t3.line >= e4.index && t3.line < e4.index + e4.amount && t3.dispose(), t3.line > e4.index && (t3.line -= e4.amount);
1540
+ })), t3.register(t3.onDispose(() => this._removeMarker(t3))), t3;
1541
+ }
1542
+ _removeMarker(e3) {
1543
+ this._isClearing || this.markers.splice(this.markers.indexOf(e3), 1);
1544
+ }
1545
+ };
1546
+ }, 437: (e2, t2, i2) => {
1547
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferLine = t2.DEFAULT_ATTR_DATA = void 0;
1548
+ const s2 = i2(734), r2 = i2(511), n2 = i2(643), a = i2(482);
1549
+ t2.DEFAULT_ATTR_DATA = Object.freeze(new s2.AttributeData());
1550
+ let o = 0;
1551
+ class h {
1552
+ static {
1553
+ __name(this, "h");
1554
+ }
1555
+ constructor(e3, t3, i3 = false) {
1556
+ this.isWrapped = i3, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e3);
1557
+ const s3 = t3 || r2.CellData.fromCharData([0, n2.NULL_CELL_CHAR, n2.NULL_CELL_WIDTH, n2.NULL_CELL_CODE]);
1558
+ for (let t4 = 0; t4 < e3; ++t4) this.setCell(t4, s3);
1559
+ this.length = e3;
1560
+ }
1561
+ get(e3) {
1562
+ const t3 = this._data[3 * e3 + 0], i3 = 2097151 & t3;
1563
+ return [this._data[3 * e3 + 1], 2097152 & t3 ? this._combined[e3] : i3 ? (0, a.stringFromCodePoint)(i3) : "", t3 >> 22, 2097152 & t3 ? this._combined[e3].charCodeAt(this._combined[e3].length - 1) : i3];
1564
+ }
1565
+ set(e3, t3) {
1566
+ this._data[3 * e3 + 1] = t3[n2.CHAR_DATA_ATTR_INDEX], t3[n2.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e3] = t3[1], this._data[3 * e3 + 0] = 2097152 | e3 | t3[n2.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e3 + 0] = t3[n2.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | t3[n2.CHAR_DATA_WIDTH_INDEX] << 22;
1567
+ }
1568
+ getWidth(e3) {
1569
+ return this._data[3 * e3 + 0] >> 22;
1570
+ }
1571
+ hasWidth(e3) {
1572
+ return 12582912 & this._data[3 * e3 + 0];
1573
+ }
1574
+ getFg(e3) {
1575
+ return this._data[3 * e3 + 1];
1576
+ }
1577
+ getBg(e3) {
1578
+ return this._data[3 * e3 + 2];
1579
+ }
1580
+ hasContent(e3) {
1581
+ return 4194303 & this._data[3 * e3 + 0];
1582
+ }
1583
+ getCodePoint(e3) {
1584
+ const t3 = this._data[3 * e3 + 0];
1585
+ return 2097152 & t3 ? this._combined[e3].charCodeAt(this._combined[e3].length - 1) : 2097151 & t3;
1586
+ }
1587
+ isCombined(e3) {
1588
+ return 2097152 & this._data[3 * e3 + 0];
1589
+ }
1590
+ getString(e3) {
1591
+ const t3 = this._data[3 * e3 + 0];
1592
+ return 2097152 & t3 ? this._combined[e3] : 2097151 & t3 ? (0, a.stringFromCodePoint)(2097151 & t3) : "";
1593
+ }
1594
+ isProtected(e3) {
1595
+ return 536870912 & this._data[3 * e3 + 2];
1596
+ }
1597
+ loadCell(e3, t3) {
1598
+ return o = 3 * e3, t3.content = this._data[o + 0], t3.fg = this._data[o + 1], t3.bg = this._data[o + 2], 2097152 & t3.content && (t3.combinedData = this._combined[e3]), 268435456 & t3.bg && (t3.extended = this._extendedAttrs[e3]), t3;
1599
+ }
1600
+ setCell(e3, t3) {
1601
+ 2097152 & t3.content && (this._combined[e3] = t3.combinedData), 268435456 & t3.bg && (this._extendedAttrs[e3] = t3.extended), this._data[3 * e3 + 0] = t3.content, this._data[3 * e3 + 1] = t3.fg, this._data[3 * e3 + 2] = t3.bg;
1602
+ }
1603
+ setCellFromCodepoint(e3, t3, i3, s3) {
1604
+ 268435456 & s3.bg && (this._extendedAttrs[e3] = s3.extended), this._data[3 * e3 + 0] = t3 | i3 << 22, this._data[3 * e3 + 1] = s3.fg, this._data[3 * e3 + 2] = s3.bg;
1605
+ }
1606
+ addCodepointToCell(e3, t3, i3) {
1607
+ let s3 = this._data[3 * e3 + 0];
1608
+ 2097152 & s3 ? this._combined[e3] += (0, a.stringFromCodePoint)(t3) : 2097151 & s3 ? (this._combined[e3] = (0, a.stringFromCodePoint)(2097151 & s3) + (0, a.stringFromCodePoint)(t3), s3 &= -2097152, s3 |= 2097152) : s3 = t3 | 1 << 22, i3 && (s3 &= -12582913, s3 |= i3 << 22), this._data[3 * e3 + 0] = s3;
1609
+ }
1610
+ insertCells(e3, t3, i3) {
1611
+ if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length - e3) {
1612
+ const s3 = new r2.CellData();
1613
+ for (let i4 = this.length - e3 - t3 - 1; i4 >= 0; --i4) this.setCell(e3 + t3 + i4, this.loadCell(e3 + i4, s3));
1614
+ for (let s4 = 0; s4 < t3; ++s4) this.setCell(e3 + s4, i3);
1615
+ } else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
1616
+ 2 === this.getWidth(this.length - 1) && this.setCellFromCodepoint(this.length - 1, 0, 1, i3);
1617
+ }
1618
+ deleteCells(e3, t3, i3) {
1619
+ if (e3 %= this.length, t3 < this.length - e3) {
1620
+ const s3 = new r2.CellData();
1621
+ for (let i4 = 0; i4 < this.length - e3 - t3; ++i4) this.setCell(e3 + i4, this.loadCell(e3 + t3 + i4, s3));
1622
+ for (let e4 = this.length - t3; e4 < this.length; ++e4) this.setCell(e4, i3);
1623
+ } else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
1624
+ e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), 0 !== this.getWidth(e3) || this.hasContent(e3) || this.setCellFromCodepoint(e3, 0, 1, i3);
1625
+ }
1626
+ replaceCells(e3, t3, i3, s3 = false) {
1627
+ if (s3) for (e3 && 2 === this.getWidth(e3 - 1) && !this.isProtected(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && !this.isProtected(t3) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.isProtected(e3) || this.setCell(e3, i3), e3++;
1628
+ else for (e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.setCell(e3++, i3);
1629
+ }
1630
+ resize(e3, t3) {
1631
+ if (e3 === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
1632
+ const i3 = 3 * e3;
1633
+ if (e3 > this.length) {
1634
+ if (this._data.buffer.byteLength >= 4 * i3) this._data = new Uint32Array(this._data.buffer, 0, i3);
1635
+ else {
1636
+ const e4 = new Uint32Array(i3);
1637
+ e4.set(this._data), this._data = e4;
1638
+ }
1639
+ for (let i4 = this.length; i4 < e3; ++i4) this.setCell(i4, t3);
1640
+ } else {
1641
+ this._data = this._data.subarray(0, i3);
1642
+ const t4 = Object.keys(this._combined);
1643
+ for (let i4 = 0; i4 < t4.length; i4++) {
1644
+ const s4 = parseInt(t4[i4], 10);
1645
+ s4 >= e3 && delete this._combined[s4];
1646
+ }
1647
+ const s3 = Object.keys(this._extendedAttrs);
1648
+ for (let t5 = 0; t5 < s3.length; t5++) {
1649
+ const i4 = parseInt(s3[t5], 10);
1650
+ i4 >= e3 && delete this._extendedAttrs[i4];
1651
+ }
1652
+ }
1653
+ return this.length = e3, 4 * i3 * 2 < this._data.buffer.byteLength;
1654
+ }
1655
+ cleanupMemory() {
1656
+ if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
1657
+ const e3 = new Uint32Array(this._data.length);
1658
+ return e3.set(this._data), this._data = e3, 1;
1659
+ }
1660
+ return 0;
1661
+ }
1662
+ fill(e3, t3 = false) {
1663
+ if (t3) for (let t4 = 0; t4 < this.length; ++t4) this.isProtected(t4) || this.setCell(t4, e3);
1664
+ else {
1665
+ this._combined = {}, this._extendedAttrs = {};
1666
+ for (let t4 = 0; t4 < this.length; ++t4) this.setCell(t4, e3);
1667
+ }
1668
+ }
1669
+ copyFrom(e3) {
1670
+ this.length !== e3.length ? this._data = new Uint32Array(e3._data) : this._data.set(e3._data), this.length = e3.length, this._combined = {};
1671
+ for (const t3 in e3._combined) this._combined[t3] = e3._combined[t3];
1672
+ this._extendedAttrs = {};
1673
+ for (const t3 in e3._extendedAttrs) this._extendedAttrs[t3] = e3._extendedAttrs[t3];
1674
+ this.isWrapped = e3.isWrapped;
1675
+ }
1676
+ clone() {
1677
+ const e3 = new h(0);
1678
+ e3._data = new Uint32Array(this._data), e3.length = this.length;
1679
+ for (const t3 in this._combined) e3._combined[t3] = this._combined[t3];
1680
+ for (const t3 in this._extendedAttrs) e3._extendedAttrs[t3] = this._extendedAttrs[t3];
1681
+ return e3.isWrapped = this.isWrapped, e3;
1682
+ }
1683
+ getTrimmedLength() {
1684
+ for (let e3 = this.length - 1; e3 >= 0; --e3) if (4194303 & this._data[3 * e3 + 0]) return e3 + (this._data[3 * e3 + 0] >> 22);
1685
+ return 0;
1686
+ }
1687
+ getNoBgTrimmedLength() {
1688
+ for (let e3 = this.length - 1; e3 >= 0; --e3) if (4194303 & this._data[3 * e3 + 0] || 50331648 & this._data[3 * e3 + 2]) return e3 + (this._data[3 * e3 + 0] >> 22);
1689
+ return 0;
1690
+ }
1691
+ copyCellsFrom(e3, t3, i3, s3, r3) {
1692
+ const n3 = e3._data;
1693
+ if (r3) for (let r4 = s3 - 1; r4 >= 0; r4--) {
1694
+ for (let e4 = 0; e4 < 3; e4++) this._data[3 * (i3 + r4) + e4] = n3[3 * (t3 + r4) + e4];
1695
+ 268435456 & n3[3 * (t3 + r4) + 2] && (this._extendedAttrs[i3 + r4] = e3._extendedAttrs[t3 + r4]);
1696
+ }
1697
+ else for (let r4 = 0; r4 < s3; r4++) {
1698
+ for (let e4 = 0; e4 < 3; e4++) this._data[3 * (i3 + r4) + e4] = n3[3 * (t3 + r4) + e4];
1699
+ 268435456 & n3[3 * (t3 + r4) + 2] && (this._extendedAttrs[i3 + r4] = e3._extendedAttrs[t3 + r4]);
1700
+ }
1701
+ const a2 = Object.keys(e3._combined);
1702
+ for (let s4 = 0; s4 < a2.length; s4++) {
1703
+ const r4 = parseInt(a2[s4], 10);
1704
+ r4 >= t3 && (this._combined[r4 - t3 + i3] = e3._combined[r4]);
1705
+ }
1706
+ }
1707
+ translateToString(e3, t3, i3, s3) {
1708
+ t3 = t3 ?? 0, i3 = i3 ?? this.length, e3 && (i3 = Math.min(i3, this.getTrimmedLength())), s3 && (s3.length = 0);
1709
+ let r3 = "";
1710
+ for (; t3 < i3; ) {
1711
+ const e4 = this._data[3 * t3 + 0], i4 = 2097151 & e4, o2 = 2097152 & e4 ? this._combined[t3] : i4 ? (0, a.stringFromCodePoint)(i4) : n2.WHITESPACE_CELL_CHAR;
1712
+ if (r3 += o2, s3) for (let e5 = 0; e5 < o2.length; ++e5) s3.push(t3);
1713
+ t3 += e4 >> 22 || 1;
1714
+ }
1715
+ return s3 && s3.push(t3), r3;
1716
+ }
1717
+ }
1718
+ t2.BufferLine = h;
1719
+ }, 634: (e2, t2) => {
1720
+ function i2(e3, t3, i3) {
1721
+ if (t3 === e3.length - 1) return e3[t3].getTrimmedLength();
1722
+ const s2 = !e3[t3].hasContent(i3 - 1) && 1 === e3[t3].getWidth(i3 - 1), r2 = 2 === e3[t3 + 1].getWidth(0);
1723
+ return s2 && r2 ? i3 - 1 : i3;
1724
+ }
1725
+ __name(i2, "i");
1726
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.getWrappedLineTrimmedLength = t2.reflowSmallerGetNewLineLengths = t2.reflowLargerApplyNewLayout = t2.reflowLargerCreateNewLayout = t2.reflowLargerGetLinesToRemove = void 0, t2.reflowLargerGetLinesToRemove = function(e3, t3, s2, r2, n2) {
1727
+ const a = [];
1728
+ for (let o = 0; o < e3.length - 1; o++) {
1729
+ let h = o, c = e3.get(++h);
1730
+ if (!c.isWrapped) continue;
1731
+ const l = [e3.get(o)];
1732
+ for (; h < e3.length && c.isWrapped; ) l.push(c), c = e3.get(++h);
1733
+ if (r2 >= o && r2 < h) {
1734
+ o += l.length - 1;
1735
+ continue;
1736
+ }
1737
+ let _ = 0, d = i2(l, _, t3), f = 1, u = 0;
1738
+ for (; f < l.length; ) {
1739
+ const e4 = i2(l, f, t3), r3 = e4 - u, a2 = s2 - d, o2 = Math.min(r3, a2);
1740
+ l[_].copyCellsFrom(l[f], u, d, o2, false), d += o2, d === s2 && (_++, d = 0), u += o2, u === e4 && (f++, u = 0), 0 === d && 0 !== _ && 2 === l[_ - 1].getWidth(s2 - 1) && (l[_].copyCellsFrom(l[_ - 1], s2 - 1, d++, 1, false), l[_ - 1].setCell(s2 - 1, n2));
1741
+ }
1742
+ l[_].replaceCells(d, s2, n2);
1743
+ let p = 0;
1744
+ for (let e4 = l.length - 1; e4 > 0 && (e4 > _ || 0 === l[e4].getTrimmedLength()); e4--) p++;
1745
+ p > 0 && (a.push(o + l.length - p), a.push(p)), o += l.length - 1;
1746
+ }
1747
+ return a;
1748
+ }, t2.reflowLargerCreateNewLayout = function(e3, t3) {
1749
+ const i3 = [];
1750
+ let s2 = 0, r2 = t3[s2], n2 = 0;
1751
+ for (let a = 0; a < e3.length; a++) if (r2 === a) {
1752
+ const i4 = t3[++s2];
1753
+ e3.onDeleteEmitter.fire({ index: a - n2, amount: i4 }), a += i4 - 1, n2 += i4, r2 = t3[++s2];
1754
+ } else i3.push(a);
1755
+ return { layout: i3, countRemoved: n2 };
1756
+ }, t2.reflowLargerApplyNewLayout = function(e3, t3) {
1757
+ const i3 = [];
1758
+ for (let s2 = 0; s2 < t3.length; s2++) i3.push(e3.get(t3[s2]));
1759
+ for (let t4 = 0; t4 < i3.length; t4++) e3.set(t4, i3[t4]);
1760
+ e3.length = t3.length;
1761
+ }, t2.reflowSmallerGetNewLineLengths = function(e3, t3, s2) {
1762
+ const r2 = [], n2 = e3.map((s3, r3) => i2(e3, r3, t3)).reduce((e4, t4) => e4 + t4);
1763
+ let a = 0, o = 0, h = 0;
1764
+ for (; h < n2; ) {
1765
+ if (n2 - h < s2) {
1766
+ r2.push(n2 - h);
1767
+ break;
1768
+ }
1769
+ a += s2;
1770
+ const c = i2(e3, o, t3);
1771
+ a > c && (a -= c, o++);
1772
+ const l = 2 === e3[o].getWidth(a - 1);
1773
+ l && a--;
1774
+ const _ = l ? s2 - 1 : s2;
1775
+ r2.push(_), h += _;
1776
+ }
1777
+ return r2;
1778
+ }, t2.getWrappedLineTrimmedLength = i2;
1779
+ }, 295: (e2, t2, i2) => {
1780
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferSet = void 0;
1781
+ const s2 = i2(460), r2 = i2(844), n2 = i2(92);
1782
+ class a extends r2.Disposable {
1783
+ static {
1784
+ __name(this, "a");
1785
+ }
1786
+ constructor(e3, t3) {
1787
+ super(), this._optionsService = e3, this._bufferService = t3, this._onBufferActivate = this.register(new s2.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
1788
+ }
1789
+ reset() {
1790
+ this._normal = new n2.Buffer(true, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new n2.Buffer(false, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
1791
+ }
1792
+ get alt() {
1793
+ return this._alt;
1794
+ }
1795
+ get active() {
1796
+ return this._activeBuffer;
1797
+ }
1798
+ get normal() {
1799
+ return this._normal;
1800
+ }
1801
+ activateNormalBuffer() {
1802
+ this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }));
1803
+ }
1804
+ activateAltBuffer(e3) {
1805
+ this._activeBuffer !== this._alt && (this._alt.fillViewportRows(e3), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({ activeBuffer: this._alt, inactiveBuffer: this._normal }));
1806
+ }
1807
+ resize(e3, t3) {
1808
+ this._normal.resize(e3, t3), this._alt.resize(e3, t3), this.setupTabStops(e3);
1809
+ }
1810
+ setupTabStops(e3) {
1811
+ this._normal.setupTabStops(e3), this._alt.setupTabStops(e3);
1812
+ }
1813
+ }
1814
+ t2.BufferSet = a;
1815
+ }, 511: (e2, t2, i2) => {
1816
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CellData = void 0;
1817
+ const s2 = i2(482), r2 = i2(643), n2 = i2(734);
1818
+ class a extends n2.AttributeData {
1819
+ static {
1820
+ __name(this, "a");
1821
+ }
1822
+ constructor() {
1823
+ super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new n2.ExtendedAttrs(), this.combinedData = "";
1824
+ }
1825
+ static fromCharData(e3) {
1826
+ const t3 = new a();
1827
+ return t3.setFromCharData(e3), t3;
1828
+ }
1829
+ isCombined() {
1830
+ return 2097152 & this.content;
1831
+ }
1832
+ getWidth() {
1833
+ return this.content >> 22;
1834
+ }
1835
+ getChars() {
1836
+ return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s2.stringFromCodePoint)(2097151 & this.content) : "";
1837
+ }
1838
+ getCode() {
1839
+ return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
1840
+ }
1841
+ setFromCharData(e3) {
1842
+ this.fg = e3[r2.CHAR_DATA_ATTR_INDEX], this.bg = 0;
1843
+ let t3 = false;
1844
+ if (e3[r2.CHAR_DATA_CHAR_INDEX].length > 2) t3 = true;
1845
+ else if (2 === e3[r2.CHAR_DATA_CHAR_INDEX].length) {
1846
+ const i3 = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
1847
+ if (55296 <= i3 && i3 <= 56319) {
1848
+ const s3 = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
1849
+ 56320 <= s3 && s3 <= 57343 ? this.content = 1024 * (i3 - 55296) + s3 - 56320 + 65536 | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22 : t3 = true;
1850
+ } else t3 = true;
1851
+ } else this.content = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22;
1852
+ t3 && (this.combinedData = e3[r2.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22);
1853
+ }
1854
+ getAsCharData() {
1855
+ return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
1856
+ }
1857
+ }
1858
+ t2.CellData = a;
1859
+ }, 643: (e2, t2) => {
1860
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.WHITESPACE_CELL_CODE = t2.WHITESPACE_CELL_WIDTH = t2.WHITESPACE_CELL_CHAR = t2.NULL_CELL_CODE = t2.NULL_CELL_WIDTH = t2.NULL_CELL_CHAR = t2.CHAR_DATA_CODE_INDEX = t2.CHAR_DATA_WIDTH_INDEX = t2.CHAR_DATA_CHAR_INDEX = t2.CHAR_DATA_ATTR_INDEX = t2.DEFAULT_EXT = t2.DEFAULT_ATTR = t2.DEFAULT_COLOR = void 0, t2.DEFAULT_COLOR = 0, t2.DEFAULT_ATTR = 256 | t2.DEFAULT_COLOR << 9, t2.DEFAULT_EXT = 0, t2.CHAR_DATA_ATTR_INDEX = 0, t2.CHAR_DATA_CHAR_INDEX = 1, t2.CHAR_DATA_WIDTH_INDEX = 2, t2.CHAR_DATA_CODE_INDEX = 3, t2.NULL_CELL_CHAR = "", t2.NULL_CELL_WIDTH = 1, t2.NULL_CELL_CODE = 0, t2.WHITESPACE_CELL_CHAR = " ", t2.WHITESPACE_CELL_WIDTH = 1, t2.WHITESPACE_CELL_CODE = 32;
1861
+ }, 863: (e2, t2, i2) => {
1862
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Marker = void 0;
1863
+ const s2 = i2(460), r2 = i2(844);
1864
+ class n2 {
1865
+ static {
1866
+ __name(this, "n");
1867
+ }
1868
+ get id() {
1869
+ return this._id;
1870
+ }
1871
+ constructor(e3) {
1872
+ this.line = e3, this.isDisposed = false, this._disposables = [], this._id = n2._nextId++, this._onDispose = this.register(new s2.EventEmitter()), this.onDispose = this._onDispose.event;
1873
+ }
1874
+ dispose() {
1875
+ this.isDisposed || (this.isDisposed = true, this.line = -1, this._onDispose.fire(), (0, r2.disposeArray)(this._disposables), this._disposables.length = 0);
1876
+ }
1877
+ register(e3) {
1878
+ return this._disposables.push(e3), e3;
1879
+ }
1880
+ }
1881
+ t2.Marker = n2, n2._nextId = 1;
1882
+ }, 116: (e2, t2) => {
1883
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DEFAULT_CHARSET = t2.CHARSETS = void 0, t2.CHARSETS = {}, t2.DEFAULT_CHARSET = t2.CHARSETS.B, t2.CHARSETS[0] = { "`": "\u25C6", a: "\u2592", b: "\u2409", c: "\u240C", d: "\u240D", e: "\u240A", f: "\xB0", g: "\xB1", h: "\u2424", i: "\u240B", j: "\u2518", k: "\u2510", l: "\u250C", m: "\u2514", n: "\u253C", o: "\u23BA", p: "\u23BB", q: "\u2500", r: "\u23BC", s: "\u23BD", t: "\u251C", u: "\u2524", v: "\u2534", w: "\u252C", x: "\u2502", y: "\u2264", z: "\u2265", "{": "\u03C0", "|": "\u2260", "}": "\xA3", "~": "\xB7" }, t2.CHARSETS.A = { "#": "\xA3" }, t2.CHARSETS.B = void 0, t2.CHARSETS[4] = { "#": "\xA3", "@": "\xBE", "[": "ij", "\\": "\xBD", "]": "|", "{": "\xA8", "|": "f", "}": "\xBC", "~": "\xB4" }, t2.CHARSETS.C = t2.CHARSETS[5] = { "[": "\xC4", "\\": "\xD6", "]": "\xC5", "^": "\xDC", "`": "\xE9", "{": "\xE4", "|": "\xF6", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS.R = { "#": "\xA3", "@": "\xE0", "[": "\xB0", "\\": "\xE7", "]": "\xA7", "{": "\xE9", "|": "\xF9", "}": "\xE8", "~": "\xA8" }, t2.CHARSETS.Q = { "@": "\xE0", "[": "\xE2", "\\": "\xE7", "]": "\xEA", "^": "\xEE", "`": "\xF4", "{": "\xE9", "|": "\xF9", "}": "\xE8", "~": "\xFB" }, t2.CHARSETS.K = { "@": "\xA7", "[": "\xC4", "\\": "\xD6", "]": "\xDC", "{": "\xE4", "|": "\xF6", "}": "\xFC", "~": "\xDF" }, t2.CHARSETS.Y = { "#": "\xA3", "@": "\xA7", "[": "\xB0", "\\": "\xE7", "]": "\xE9", "`": "\xF9", "{": "\xE0", "|": "\xF2", "}": "\xE8", "~": "\xEC" }, t2.CHARSETS.E = t2.CHARSETS[6] = { "@": "\xC4", "[": "\xC6", "\\": "\xD8", "]": "\xC5", "^": "\xDC", "`": "\xE4", "{": "\xE6", "|": "\xF8", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS.Z = { "#": "\xA3", "@": "\xA7", "[": "\xA1", "\\": "\xD1", "]": "\xBF", "{": "\xB0", "|": "\xF1", "}": "\xE7" }, t2.CHARSETS.H = t2.CHARSETS[7] = { "@": "\xC9", "[": "\xC4", "\\": "\xD6", "]": "\xC5", "^": "\xDC", "`": "\xE9", "{": "\xE4", "|": "\xF6", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS["="] = { "#": "\xF9", "@": "\xE0", "[": "\xE9", "\\": "\xE7", "]": "\xEA", "^": "\xEE", _: "\xE8", "`": "\xF4", "{": "\xE4", "|": "\xF6", "}": "\xFC", "~": "\xFB" };
1884
+ }, 584: (e2, t2) => {
1885
+ var i2, s2, r2;
1886
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.C1_ESCAPED = t2.C1 = t2.C0 = void 0, function(e3) {
1887
+ e3.NUL = "\0", e3.SOH = "", e3.STX = "", e3.ETX = "", e3.EOT = "", e3.ENQ = "", e3.ACK = "", e3.BEL = "\x07", e3.BS = "\b", e3.HT = " ", e3.LF = "\n", e3.VT = "\v", e3.FF = "\f", e3.CR = "\r", e3.SO = "", e3.SI = "", e3.DLE = "", e3.DC1 = "", e3.DC2 = "", e3.DC3 = "", e3.DC4 = "", e3.NAK = "", e3.SYN = "", e3.ETB = "", e3.CAN = "", e3.EM = "", e3.SUB = "", e3.ESC = "\x1B", e3.FS = "", e3.GS = "", e3.RS = "", e3.US = "", e3.SP = " ", e3.DEL = "\x7F";
1888
+ }(i2 || (t2.C0 = i2 = {})), function(e3) {
1889
+ e3.PAD = "\x80", e3.HOP = "\x81", e3.BPH = "\x82", e3.NBH = "\x83", e3.IND = "\x84", e3.NEL = "\x85", e3.SSA = "\x86", e3.ESA = "\x87", e3.HTS = "\x88", e3.HTJ = "\x89", e3.VTS = "\x8A", e3.PLD = "\x8B", e3.PLU = "\x8C", e3.RI = "\x8D", e3.SS2 = "\x8E", e3.SS3 = "\x8F", e3.DCS = "\x90", e3.PU1 = "\x91", e3.PU2 = "\x92", e3.STS = "\x93", e3.CCH = "\x94", e3.MW = "\x95", e3.SPA = "\x96", e3.EPA = "\x97", e3.SOS = "\x98", e3.SGCI = "\x99", e3.SCI = "\x9A", e3.CSI = "\x9B", e3.ST = "\x9C", e3.OSC = "\x9D", e3.PM = "\x9E", e3.APC = "\x9F";
1890
+ }(s2 || (t2.C1 = s2 = {})), function(e3) {
1891
+ e3.ST = `${i2.ESC}\\`;
1892
+ }(r2 || (t2.C1_ESCAPED = r2 = {}));
1893
+ }, 482: (e2, t2) => {
1894
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Utf8ToUtf32 = t2.StringToUtf32 = t2.utf32ToString = t2.stringFromCodePoint = void 0, t2.stringFromCodePoint = function(e3) {
1895
+ return e3 > 65535 ? (e3 -= 65536, String.fromCharCode(55296 + (e3 >> 10)) + String.fromCharCode(e3 % 1024 + 56320)) : String.fromCharCode(e3);
1896
+ }, t2.utf32ToString = function(e3, t3 = 0, i2 = e3.length) {
1897
+ let s2 = "";
1898
+ for (let r2 = t3; r2 < i2; ++r2) {
1899
+ let t4 = e3[r2];
1900
+ t4 > 65535 ? (t4 -= 65536, s2 += String.fromCharCode(55296 + (t4 >> 10)) + String.fromCharCode(t4 % 1024 + 56320)) : s2 += String.fromCharCode(t4);
1901
+ }
1902
+ return s2;
1903
+ }, t2.StringToUtf32 = class {
1904
+ constructor() {
1905
+ this._interim = 0;
1906
+ }
1907
+ clear() {
1908
+ this._interim = 0;
1909
+ }
1910
+ decode(e3, t3) {
1911
+ const i2 = e3.length;
1912
+ if (!i2) return 0;
1913
+ let s2 = 0, r2 = 0;
1914
+ if (this._interim) {
1915
+ const i3 = e3.charCodeAt(r2++);
1916
+ 56320 <= i3 && i3 <= 57343 ? t3[s2++] = 1024 * (this._interim - 55296) + i3 - 56320 + 65536 : (t3[s2++] = this._interim, t3[s2++] = i3), this._interim = 0;
1917
+ }
1918
+ for (let n2 = r2; n2 < i2; ++n2) {
1919
+ const r3 = e3.charCodeAt(n2);
1920
+ if (55296 <= r3 && r3 <= 56319) {
1921
+ if (++n2 >= i2) return this._interim = r3, s2;
1922
+ const a = e3.charCodeAt(n2);
1923
+ 56320 <= a && a <= 57343 ? t3[s2++] = 1024 * (r3 - 55296) + a - 56320 + 65536 : (t3[s2++] = r3, t3[s2++] = a);
1924
+ } else 65279 !== r3 && (t3[s2++] = r3);
1925
+ }
1926
+ return s2;
1927
+ }
1928
+ }, t2.Utf8ToUtf32 = class {
1929
+ constructor() {
1930
+ this.interim = new Uint8Array(3);
1931
+ }
1932
+ clear() {
1933
+ this.interim.fill(0);
1934
+ }
1935
+ decode(e3, t3) {
1936
+ const i2 = e3.length;
1937
+ if (!i2) return 0;
1938
+ let s2, r2, n2, a, o = 0, h = 0, c = 0;
1939
+ if (this.interim[0]) {
1940
+ let s3 = false, r3 = this.interim[0];
1941
+ r3 &= 192 == (224 & r3) ? 31 : 224 == (240 & r3) ? 15 : 7;
1942
+ let n3, a2 = 0;
1943
+ for (; (n3 = 63 & this.interim[++a2]) && a2 < 4; ) r3 <<= 6, r3 |= n3;
1944
+ const h2 = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4, l2 = h2 - a2;
1945
+ for (; c < l2; ) {
1946
+ if (c >= i2) return 0;
1947
+ if (n3 = e3[c++], 128 != (192 & n3)) {
1948
+ c--, s3 = true;
1949
+ break;
1950
+ }
1951
+ this.interim[a2++] = n3, r3 <<= 6, r3 |= 63 & n3;
1952
+ }
1953
+ s3 || (2 === h2 ? r3 < 128 ? c-- : t3[o++] = r3 : 3 === h2 ? r3 < 2048 || r3 >= 55296 && r3 <= 57343 || 65279 === r3 || (t3[o++] = r3) : r3 < 65536 || r3 > 1114111 || (t3[o++] = r3)), this.interim.fill(0);
1954
+ }
1955
+ const l = i2 - 4;
1956
+ let _ = c;
1957
+ for (; _ < i2; ) {
1958
+ for (; !(!(_ < l) || 128 & (s2 = e3[_]) || 128 & (r2 = e3[_ + 1]) || 128 & (n2 = e3[_ + 2]) || 128 & (a = e3[_ + 3])); ) t3[o++] = s2, t3[o++] = r2, t3[o++] = n2, t3[o++] = a, _ += 4;
1959
+ if (s2 = e3[_++], s2 < 128) t3[o++] = s2;
1960
+ else if (192 == (224 & s2)) {
1961
+ if (_ >= i2) return this.interim[0] = s2, o;
1962
+ if (r2 = e3[_++], 128 != (192 & r2)) {
1963
+ _--;
1964
+ continue;
1965
+ }
1966
+ if (h = (31 & s2) << 6 | 63 & r2, h < 128) {
1967
+ _--;
1968
+ continue;
1969
+ }
1970
+ t3[o++] = h;
1971
+ } else if (224 == (240 & s2)) {
1972
+ if (_ >= i2) return this.interim[0] = s2, o;
1973
+ if (r2 = e3[_++], 128 != (192 & r2)) {
1974
+ _--;
1975
+ continue;
1976
+ }
1977
+ if (_ >= i2) return this.interim[0] = s2, this.interim[1] = r2, o;
1978
+ if (n2 = e3[_++], 128 != (192 & n2)) {
1979
+ _--;
1980
+ continue;
1981
+ }
1982
+ if (h = (15 & s2) << 12 | (63 & r2) << 6 | 63 & n2, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
1983
+ t3[o++] = h;
1984
+ } else if (240 == (248 & s2)) {
1985
+ if (_ >= i2) return this.interim[0] = s2, o;
1986
+ if (r2 = e3[_++], 128 != (192 & r2)) {
1987
+ _--;
1988
+ continue;
1989
+ }
1990
+ if (_ >= i2) return this.interim[0] = s2, this.interim[1] = r2, o;
1991
+ if (n2 = e3[_++], 128 != (192 & n2)) {
1992
+ _--;
1993
+ continue;
1994
+ }
1995
+ if (_ >= i2) return this.interim[0] = s2, this.interim[1] = r2, this.interim[2] = n2, o;
1996
+ if (a = e3[_++], 128 != (192 & a)) {
1997
+ _--;
1998
+ continue;
1999
+ }
2000
+ if (h = (7 & s2) << 18 | (63 & r2) << 12 | (63 & n2) << 6 | 63 & a, h < 65536 || h > 1114111) continue;
2001
+ t3[o++] = h;
2002
+ }
2003
+ }
2004
+ return o;
2005
+ }
2006
+ };
2007
+ }, 225: (e2, t2, i2) => {
2008
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeV6 = void 0;
2009
+ const s2 = i2(480), r2 = [[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]], n2 = [[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]];
2010
+ let a;
2011
+ t2.UnicodeV6 = class {
2012
+ constructor() {
2013
+ if (this.version = "6", !a) {
2014
+ a = new Uint8Array(65536), a.fill(1), a[0] = 0, a.fill(0, 1, 32), a.fill(0, 127, 160), a.fill(2, 4352, 4448), a[9001] = 2, a[9002] = 2, a.fill(2, 11904, 42192), a[12351] = 1, a.fill(2, 44032, 55204), a.fill(2, 63744, 64256), a.fill(2, 65040, 65050), a.fill(2, 65072, 65136), a.fill(2, 65280, 65377), a.fill(2, 65504, 65511);
2015
+ for (let e3 = 0; e3 < r2.length; ++e3) a.fill(0, r2[e3][0], r2[e3][1] + 1);
2016
+ }
2017
+ }
2018
+ wcwidth(e3) {
2019
+ return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ? a[e3] : function(e4, t3) {
2020
+ let i3, s3 = 0, r3 = t3.length - 1;
2021
+ if (e4 < t3[0][0] || e4 > t3[r3][1]) return false;
2022
+ for (; r3 >= s3; ) if (i3 = s3 + r3 >> 1, e4 > t3[i3][1]) s3 = i3 + 1;
2023
+ else {
2024
+ if (!(e4 < t3[i3][0])) return true;
2025
+ r3 = i3 - 1;
2026
+ }
2027
+ return false;
2028
+ }(e3, n2) ? 0 : e3 >= 131072 && e3 <= 196605 || e3 >= 196608 && e3 <= 262141 ? 2 : 1;
2029
+ }
2030
+ charProperties(e3, t3) {
2031
+ let i3 = this.wcwidth(e3), r3 = 0 === i3 && 0 !== t3;
2032
+ if (r3) {
2033
+ const e4 = s2.UnicodeService.extractWidth(t3);
2034
+ 0 === e4 ? r3 = false : e4 > i3 && (i3 = e4);
2035
+ }
2036
+ return s2.UnicodeService.createPropertyValue(0, i3, r3);
2037
+ }
2038
+ };
2039
+ }, 981: (e2, t2, i2) => {
2040
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.WriteBuffer = void 0;
2041
+ const s2 = i2(460), r2 = i2(844);
2042
+ class n2 extends r2.Disposable {
2043
+ static {
2044
+ __name(this, "n");
2045
+ }
2046
+ constructor(e3) {
2047
+ super(), this._action = e3, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = false, this._syncCalls = 0, this._didUserInput = false, this._onWriteParsed = this.register(new s2.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
2048
+ }
2049
+ handleUserInput() {
2050
+ this._didUserInput = true;
2051
+ }
2052
+ writeSync(e3, t3) {
2053
+ if (void 0 !== t3 && this._syncCalls > t3) return void (this._syncCalls = 0);
2054
+ if (this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
2055
+ let i3;
2056
+ for (this._isSyncWriting = true; i3 = this._writeBuffer.shift(); ) {
2057
+ this._action(i3);
2058
+ const e4 = this._callbacks.shift();
2059
+ e4 && e4();
2060
+ }
2061
+ this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = false, this._syncCalls = 0;
2062
+ }
2063
+ write(e3, t3) {
2064
+ if (this._pendingData > 5e7) throw new Error("write data discarded, use flow control to avoid losing data");
2065
+ if (!this._writeBuffer.length) {
2066
+ if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = false, this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(t3), void this._innerWrite();
2067
+ setTimeout(() => this._innerWrite());
2068
+ }
2069
+ this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(t3);
2070
+ }
2071
+ _innerWrite(e3 = 0, t3 = true) {
2072
+ const i3 = e3 || Date.now();
2073
+ for (; this._writeBuffer.length > this._bufferOffset; ) {
2074
+ const e4 = this._writeBuffer[this._bufferOffset], s3 = this._action(e4, t3);
2075
+ if (s3) {
2076
+ const e5 = /* @__PURE__ */ __name((e6) => Date.now() - i3 >= 12 ? setTimeout(() => this._innerWrite(0, e6)) : this._innerWrite(i3, e6), "e");
2077
+ return void s3.catch((e6) => (queueMicrotask(() => {
2078
+ throw e6;
2079
+ }), Promise.resolve(false))).then(e5);
2080
+ }
2081
+ const r3 = this._callbacks[this._bufferOffset];
2082
+ if (r3 && r3(), this._bufferOffset++, this._pendingData -= e4.length, Date.now() - i3 >= 12) break;
2083
+ }
2084
+ this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout(() => this._innerWrite())) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
2085
+ }
2086
+ }
2087
+ t2.WriteBuffer = n2;
2088
+ }, 941: (e2, t2) => {
2089
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.toRgbString = t2.parseColor = void 0;
2090
+ const i2 = /^([\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})$/, s2 = /^[\da-f]+$/;
2091
+ function r2(e3, t3) {
2092
+ const i3 = e3.toString(16), s3 = i3.length < 2 ? "0" + i3 : i3;
2093
+ switch (t3) {
2094
+ case 4:
2095
+ return i3[0];
2096
+ case 8:
2097
+ return s3;
2098
+ case 12:
2099
+ return (s3 + s3).slice(0, 3);
2100
+ default:
2101
+ return s3 + s3;
2102
+ }
2103
+ }
2104
+ __name(r2, "r");
2105
+ t2.parseColor = function(e3) {
2106
+ if (!e3) return;
2107
+ let t3 = e3.toLowerCase();
2108
+ if (0 === t3.indexOf("rgb:")) {
2109
+ t3 = t3.slice(4);
2110
+ const e4 = i2.exec(t3);
2111
+ if (e4) {
2112
+ const t4 = e4[1] ? 15 : e4[4] ? 255 : e4[7] ? 4095 : 65535;
2113
+ return [Math.round(parseInt(e4[1] || e4[4] || e4[7] || e4[10], 16) / t4 * 255), Math.round(parseInt(e4[2] || e4[5] || e4[8] || e4[11], 16) / t4 * 255), Math.round(parseInt(e4[3] || e4[6] || e4[9] || e4[12], 16) / t4 * 255)];
2114
+ }
2115
+ } else if (0 === t3.indexOf("#") && (t3 = t3.slice(1), s2.exec(t3) && [3, 6, 9, 12].includes(t3.length))) {
2116
+ const e4 = t3.length / 3, i3 = [0, 0, 0];
2117
+ for (let s3 = 0; s3 < 3; ++s3) {
2118
+ const r3 = parseInt(t3.slice(e4 * s3, e4 * s3 + e4), 16);
2119
+ i3[s3] = 1 === e4 ? r3 << 4 : 2 === e4 ? r3 : 3 === e4 ? r3 >> 4 : r3 >> 8;
2120
+ }
2121
+ return i3;
2122
+ }
2123
+ }, t2.toRgbString = function(e3, t3 = 16) {
2124
+ const [i3, s3, n2] = e3;
2125
+ return `rgb:${r2(i3, t3)}/${r2(s3, t3)}/${r2(n2, t3)}`;
2126
+ };
2127
+ }, 770: (e2, t2) => {
2128
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.PAYLOAD_LIMIT = void 0, t2.PAYLOAD_LIMIT = 1e7;
2129
+ }, 351: (e2, t2, i2) => {
2130
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DcsHandler = t2.DcsParser = void 0;
2131
+ const s2 = i2(482), r2 = i2(742), n2 = i2(770), a = [];
2132
+ t2.DcsParser = class {
2133
+ constructor() {
2134
+ this._handlers = /* @__PURE__ */ Object.create(null), this._active = a, this._ident = 0, this._handlerFb = () => {
2135
+ }, this._stack = { paused: false, loopPosition: 0, fallThrough: false };
2136
+ }
2137
+ dispose() {
2138
+ this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
2139
+ }, this._active = a;
2140
+ }
2141
+ registerHandler(e3, t3) {
2142
+ void 0 === this._handlers[e3] && (this._handlers[e3] = []);
2143
+ const i3 = this._handlers[e3];
2144
+ return i3.push(t3), { dispose: /* @__PURE__ */ __name(() => {
2145
+ const e4 = i3.indexOf(t3);
2146
+ -1 !== e4 && i3.splice(e4, 1);
2147
+ }, "dispose") };
2148
+ }
2149
+ clearHandler(e3) {
2150
+ this._handlers[e3] && delete this._handlers[e3];
2151
+ }
2152
+ setHandlerFallback(e3) {
2153
+ this._handlerFb = e3;
2154
+ }
2155
+ reset() {
2156
+ if (this._active.length) for (let e3 = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e3 >= 0; --e3) this._active[e3].unhook(false);
2157
+ this._stack.paused = false, this._active = a, this._ident = 0;
2158
+ }
2159
+ hook(e3, t3) {
2160
+ if (this.reset(), this._ident = e3, this._active = this._handlers[e3] || a, this._active.length) for (let e4 = this._active.length - 1; e4 >= 0; e4--) this._active[e4].hook(t3);
2161
+ else this._handlerFb(this._ident, "HOOK", t3);
2162
+ }
2163
+ put(e3, t3, i3) {
2164
+ if (this._active.length) for (let s3 = this._active.length - 1; s3 >= 0; s3--) this._active[s3].put(e3, t3, i3);
2165
+ else this._handlerFb(this._ident, "PUT", (0, s2.utf32ToString)(e3, t3, i3));
2166
+ }
2167
+ unhook(e3, t3 = true) {
2168
+ if (this._active.length) {
2169
+ let i3 = false, s3 = this._active.length - 1, r3 = false;
2170
+ if (this._stack.paused && (s3 = this._stack.loopPosition - 1, i3 = t3, r3 = this._stack.fallThrough, this._stack.paused = false), !r3 && false === i3) {
2171
+ for (; s3 >= 0 && (i3 = this._active[s3].unhook(e3), true !== i3); s3--) if (i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = false, i3;
2172
+ s3--;
2173
+ }
2174
+ for (; s3 >= 0; s3--) if (i3 = this._active[s3].unhook(false), i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = true, i3;
2175
+ } else this._handlerFb(this._ident, "UNHOOK", e3);
2176
+ this._active = a, this._ident = 0;
2177
+ }
2178
+ };
2179
+ const o = new r2.Params();
2180
+ o.addParam(0), t2.DcsHandler = class {
2181
+ constructor(e3) {
2182
+ this._handler = e3, this._data = "", this._params = o, this._hitLimit = false;
2183
+ }
2184
+ hook(e3) {
2185
+ this._params = e3.length > 1 || e3.params[0] ? e3.clone() : o, this._data = "", this._hitLimit = false;
2186
+ }
2187
+ put(e3, t3, i3) {
2188
+ this._hitLimit || (this._data += (0, s2.utf32ToString)(e3, t3, i3), this._data.length > n2.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = true));
2189
+ }
2190
+ unhook(e3) {
2191
+ let t3 = false;
2192
+ if (this._hitLimit) t3 = false;
2193
+ else if (e3 && (t3 = this._handler(this._data, this._params), t3 instanceof Promise)) return t3.then((e4) => (this._params = o, this._data = "", this._hitLimit = false, e4));
2194
+ return this._params = o, this._data = "", this._hitLimit = false, t3;
2195
+ }
2196
+ };
2197
+ }, 15: (e2, t2, i2) => {
2198
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.EscapeSequenceParser = t2.VT500_TRANSITION_TABLE = t2.TransitionTable = void 0;
2199
+ const s2 = i2(844), r2 = i2(742), n2 = i2(242), a = i2(351);
2200
+ class o {
2201
+ static {
2202
+ __name(this, "o");
2203
+ }
2204
+ constructor(e3) {
2205
+ this.table = new Uint8Array(e3);
2206
+ }
2207
+ setDefault(e3, t3) {
2208
+ this.table.fill(e3 << 4 | t3);
2209
+ }
2210
+ add(e3, t3, i3, s3) {
2211
+ this.table[t3 << 8 | e3] = i3 << 4 | s3;
2212
+ }
2213
+ addMany(e3, t3, i3, s3) {
2214
+ for (let r3 = 0; r3 < e3.length; r3++) this.table[t3 << 8 | e3[r3]] = i3 << 4 | s3;
2215
+ }
2216
+ }
2217
+ t2.TransitionTable = o;
2218
+ const h = 160;
2219
+ t2.VT500_TRANSITION_TABLE = function() {
2220
+ const e3 = new o(4095), t3 = Array.apply(null, Array(256)).map((e4, t4) => t4), i3 = /* @__PURE__ */ __name((e4, i4) => t3.slice(e4, i4), "i"), s3 = i3(32, 127), r3 = i3(0, 24);
2221
+ r3.push(25), r3.push.apply(r3, i3(28, 32));
2222
+ const n3 = i3(0, 14);
2223
+ let a2;
2224
+ for (a2 in e3.setDefault(1, 0), e3.addMany(s3, 0, 2, 0), n3) e3.addMany([24, 26, 153, 154], a2, 3, 0), e3.addMany(i3(128, 144), a2, 3, 0), e3.addMany(i3(144, 152), a2, 3, 0), e3.add(156, a2, 0, 0), e3.add(27, a2, 11, 1), e3.add(157, a2, 4, 8), e3.addMany([152, 158, 159], a2, 0, 7), e3.add(155, a2, 11, 3), e3.add(144, a2, 11, 9);
2225
+ return e3.addMany(r3, 0, 3, 0), e3.addMany(r3, 1, 3, 1), e3.add(127, 1, 0, 1), e3.addMany(r3, 8, 0, 8), e3.addMany(r3, 3, 3, 3), e3.add(127, 3, 0, 3), e3.addMany(r3, 4, 3, 4), e3.add(127, 4, 0, 4), e3.addMany(r3, 6, 3, 6), e3.addMany(r3, 5, 3, 5), e3.add(127, 5, 0, 5), e3.addMany(r3, 2, 3, 2), e3.add(127, 2, 0, 2), e3.add(93, 1, 4, 8), e3.addMany(s3, 8, 5, 8), e3.add(127, 8, 5, 8), e3.addMany([156, 27, 24, 26, 7], 8, 6, 0), e3.addMany(i3(28, 32), 8, 0, 8), e3.addMany([88, 94, 95], 1, 0, 7), e3.addMany(s3, 7, 0, 7), e3.addMany(r3, 7, 0, 7), e3.add(156, 7, 0, 0), e3.add(127, 7, 0, 7), e3.add(91, 1, 11, 3), e3.addMany(i3(64, 127), 3, 7, 0), e3.addMany(i3(48, 60), 3, 8, 4), e3.addMany([60, 61, 62, 63], 3, 9, 4), e3.addMany(i3(48, 60), 4, 8, 4), e3.addMany(i3(64, 127), 4, 7, 0), e3.addMany([60, 61, 62, 63], 4, 0, 6), e3.addMany(i3(32, 64), 6, 0, 6), e3.add(127, 6, 0, 6), e3.addMany(i3(64, 127), 6, 0, 0), e3.addMany(i3(32, 48), 3, 9, 5), e3.addMany(i3(32, 48), 5, 9, 5), e3.addMany(i3(48, 64), 5, 0, 6), e3.addMany(i3(64, 127), 5, 7, 0), e3.addMany(i3(32, 48), 4, 9, 5), e3.addMany(i3(32, 48), 1, 9, 2), e3.addMany(i3(32, 48), 2, 9, 2), e3.addMany(i3(48, 127), 2, 10, 0), e3.addMany(i3(48, 80), 1, 10, 0), e3.addMany(i3(81, 88), 1, 10, 0), e3.addMany([89, 90, 92], 1, 10, 0), e3.addMany(i3(96, 127), 1, 10, 0), e3.add(80, 1, 11, 9), e3.addMany(r3, 9, 0, 9), e3.add(127, 9, 0, 9), e3.addMany(i3(28, 32), 9, 0, 9), e3.addMany(i3(32, 48), 9, 9, 12), e3.addMany(i3(48, 60), 9, 8, 10), e3.addMany([60, 61, 62, 63], 9, 9, 10), e3.addMany(r3, 11, 0, 11), e3.addMany(i3(32, 128), 11, 0, 11), e3.addMany(i3(28, 32), 11, 0, 11), e3.addMany(r3, 10, 0, 10), e3.add(127, 10, 0, 10), e3.addMany(i3(28, 32), 10, 0, 10), e3.addMany(i3(48, 60), 10, 8, 10), e3.addMany([60, 61, 62, 63], 10, 0, 11), e3.addMany(i3(32, 48), 10, 9, 12), e3.addMany(r3, 12, 0, 12), e3.add(127, 12, 0, 12), e3.addMany(i3(28, 32), 12, 0, 12), e3.addMany(i3(32, 48), 12, 9, 12), e3.addMany(i3(48, 64), 12, 0, 11), e3.addMany(i3(64, 127), 12, 12, 13), e3.addMany(i3(64, 127), 10, 12, 13), e3.addMany(i3(64, 127), 9, 12, 13), e3.addMany(r3, 13, 13, 13), e3.addMany(s3, 13, 13, 13), e3.add(127, 13, 0, 13), e3.addMany([27, 156, 24, 26], 13, 14, 0), e3.add(h, 0, 2, 0), e3.add(h, 8, 5, 8), e3.add(h, 6, 0, 6), e3.add(h, 11, 0, 11), e3.add(h, 13, 13, 13), e3;
2226
+ }();
2227
+ class c extends s2.Disposable {
2228
+ static {
2229
+ __name(this, "c");
2230
+ }
2231
+ constructor(e3 = t2.VT500_TRANSITION_TABLE) {
2232
+ super(), this._transitions = e3, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new r2.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (e4, t3, i3) => {
2233
+ }, this._executeHandlerFb = (e4) => {
2234
+ }, this._csiHandlerFb = (e4, t3) => {
2235
+ }, this._escHandlerFb = (e4) => {
2236
+ }, this._errorHandlerFb = (e4) => e4, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, s2.toDisposable)(() => {
2237
+ this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
2238
+ })), this._oscParser = this.register(new n2.OscParser()), this._dcsParser = this.register(new a.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => true);
2239
+ }
2240
+ _identifier(e3, t3 = [64, 126]) {
2241
+ let i3 = 0;
2242
+ if (e3.prefix) {
2243
+ if (e3.prefix.length > 1) throw new Error("only one byte as prefix supported");
2244
+ if (i3 = e3.prefix.charCodeAt(0), i3 && 60 > i3 || i3 > 63) throw new Error("prefix must be in range 0x3c .. 0x3f");
2245
+ }
2246
+ if (e3.intermediates) {
2247
+ if (e3.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
2248
+ for (let t4 = 0; t4 < e3.intermediates.length; ++t4) {
2249
+ const s4 = e3.intermediates.charCodeAt(t4);
2250
+ if (32 > s4 || s4 > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
2251
+ i3 <<= 8, i3 |= s4;
2252
+ }
2253
+ }
2254
+ if (1 !== e3.final.length) throw new Error("final must be a single byte");
2255
+ const s3 = e3.final.charCodeAt(0);
2256
+ if (t3[0] > s3 || s3 > t3[1]) throw new Error(`final must be in range ${t3[0]} .. ${t3[1]}`);
2257
+ return i3 <<= 8, i3 |= s3, i3;
2258
+ }
2259
+ identToString(e3) {
2260
+ const t3 = [];
2261
+ for (; e3; ) t3.push(String.fromCharCode(255 & e3)), e3 >>= 8;
2262
+ return t3.reverse().join("");
2263
+ }
2264
+ setPrintHandler(e3) {
2265
+ this._printHandler = e3;
2266
+ }
2267
+ clearPrintHandler() {
2268
+ this._printHandler = this._printHandlerFb;
2269
+ }
2270
+ registerEscHandler(e3, t3) {
2271
+ const i3 = this._identifier(e3, [48, 126]);
2272
+ void 0 === this._escHandlers[i3] && (this._escHandlers[i3] = []);
2273
+ const s3 = this._escHandlers[i3];
2274
+ return s3.push(t3), { dispose: /* @__PURE__ */ __name(() => {
2275
+ const e4 = s3.indexOf(t3);
2276
+ -1 !== e4 && s3.splice(e4, 1);
2277
+ }, "dispose") };
2278
+ }
2279
+ clearEscHandler(e3) {
2280
+ this._escHandlers[this._identifier(e3, [48, 126])] && delete this._escHandlers[this._identifier(e3, [48, 126])];
2281
+ }
2282
+ setEscHandlerFallback(e3) {
2283
+ this._escHandlerFb = e3;
2284
+ }
2285
+ setExecuteHandler(e3, t3) {
2286
+ this._executeHandlers[e3.charCodeAt(0)] = t3;
2287
+ }
2288
+ clearExecuteHandler(e3) {
2289
+ this._executeHandlers[e3.charCodeAt(0)] && delete this._executeHandlers[e3.charCodeAt(0)];
2290
+ }
2291
+ setExecuteHandlerFallback(e3) {
2292
+ this._executeHandlerFb = e3;
2293
+ }
2294
+ registerCsiHandler(e3, t3) {
2295
+ const i3 = this._identifier(e3);
2296
+ void 0 === this._csiHandlers[i3] && (this._csiHandlers[i3] = []);
2297
+ const s3 = this._csiHandlers[i3];
2298
+ return s3.push(t3), { dispose: /* @__PURE__ */ __name(() => {
2299
+ const e4 = s3.indexOf(t3);
2300
+ -1 !== e4 && s3.splice(e4, 1);
2301
+ }, "dispose") };
2302
+ }
2303
+ clearCsiHandler(e3) {
2304
+ this._csiHandlers[this._identifier(e3)] && delete this._csiHandlers[this._identifier(e3)];
2305
+ }
2306
+ setCsiHandlerFallback(e3) {
2307
+ this._csiHandlerFb = e3;
2308
+ }
2309
+ registerDcsHandler(e3, t3) {
2310
+ return this._dcsParser.registerHandler(this._identifier(e3), t3);
2311
+ }
2312
+ clearDcsHandler(e3) {
2313
+ this._dcsParser.clearHandler(this._identifier(e3));
2314
+ }
2315
+ setDcsHandlerFallback(e3) {
2316
+ this._dcsParser.setHandlerFallback(e3);
2317
+ }
2318
+ registerOscHandler(e3, t3) {
2319
+ return this._oscParser.registerHandler(e3, t3);
2320
+ }
2321
+ clearOscHandler(e3) {
2322
+ this._oscParser.clearHandler(e3);
2323
+ }
2324
+ setOscHandlerFallback(e3) {
2325
+ this._oscParser.setHandlerFallback(e3);
2326
+ }
2327
+ setErrorHandler(e3) {
2328
+ this._errorHandler = e3;
2329
+ }
2330
+ clearErrorHandler() {
2331
+ this._errorHandler = this._errorHandlerFb;
2332
+ }
2333
+ reset() {
2334
+ this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
2335
+ }
2336
+ _preserveStack(e3, t3, i3, s3, r3) {
2337
+ this._parseStack.state = e3, this._parseStack.handlers = t3, this._parseStack.handlerPos = i3, this._parseStack.transition = s3, this._parseStack.chunkPos = r3;
2338
+ }
2339
+ parse(e3, t3, i3) {
2340
+ let s3, r3 = 0, n3 = 0, a2 = 0;
2341
+ if (this._parseStack.state) if (2 === this._parseStack.state) this._parseStack.state = 0, a2 = this._parseStack.chunkPos + 1;
2342
+ else {
2343
+ if (void 0 === i3 || 1 === this._parseStack.state) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
2344
+ const t4 = this._parseStack.handlers;
2345
+ let n4 = this._parseStack.handlerPos - 1;
2346
+ switch (this._parseStack.state) {
2347
+ case 3:
2348
+ if (false === i3 && n4 > -1) {
2349
+ for (; n4 >= 0 && (s3 = t4[n4](this._params), true !== s3); n4--) if (s3 instanceof Promise) return this._parseStack.handlerPos = n4, s3;
2350
+ }
2351
+ this._parseStack.handlers = [];
2352
+ break;
2353
+ case 4:
2354
+ if (false === i3 && n4 > -1) {
2355
+ for (; n4 >= 0 && (s3 = t4[n4](), true !== s3); n4--) if (s3 instanceof Promise) return this._parseStack.handlerPos = n4, s3;
2356
+ }
2357
+ this._parseStack.handlers = [];
2358
+ break;
2359
+ case 6:
2360
+ if (r3 = e3[this._parseStack.chunkPos], s3 = this._dcsParser.unhook(24 !== r3 && 26 !== r3, i3), s3) return s3;
2361
+ 27 === r3 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
2362
+ break;
2363
+ case 5:
2364
+ if (r3 = e3[this._parseStack.chunkPos], s3 = this._oscParser.end(24 !== r3 && 26 !== r3, i3), s3) return s3;
2365
+ 27 === r3 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
2366
+ }
2367
+ this._parseStack.state = 0, a2 = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
2368
+ }
2369
+ for (let i4 = a2; i4 < t3; ++i4) {
2370
+ switch (r3 = e3[i4], n3 = this._transitions.table[this.currentState << 8 | (r3 < 160 ? r3 : h)], n3 >> 4) {
2371
+ case 2:
2372
+ for (let s4 = i4 + 1; ; ++s4) {
2373
+ if (s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h) {
2374
+ this._printHandler(e3, i4, s4), i4 = s4 - 1;
2375
+ break;
2376
+ }
2377
+ if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h) {
2378
+ this._printHandler(e3, i4, s4), i4 = s4 - 1;
2379
+ break;
2380
+ }
2381
+ if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h) {
2382
+ this._printHandler(e3, i4, s4), i4 = s4 - 1;
2383
+ break;
2384
+ }
2385
+ if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h) {
2386
+ this._printHandler(e3, i4, s4), i4 = s4 - 1;
2387
+ break;
2388
+ }
2389
+ }
2390
+ break;
2391
+ case 3:
2392
+ this._executeHandlers[r3] ? this._executeHandlers[r3]() : this._executeHandlerFb(r3), this.precedingJoinState = 0;
2393
+ break;
2394
+ case 0:
2395
+ break;
2396
+ case 1:
2397
+ if (this._errorHandler({ position: i4, code: r3, currentState: this.currentState, collect: this._collect, params: this._params, abort: false }).abort) return;
2398
+ break;
2399
+ case 7:
2400
+ const a3 = this._csiHandlers[this._collect << 8 | r3];
2401
+ let o2 = a3 ? a3.length - 1 : -1;
2402
+ for (; o2 >= 0 && (s3 = a3[o2](this._params), true !== s3); o2--) if (s3 instanceof Promise) return this._preserveStack(3, a3, o2, n3, i4), s3;
2403
+ o2 < 0 && this._csiHandlerFb(this._collect << 8 | r3, this._params), this.precedingJoinState = 0;
2404
+ break;
2405
+ case 8:
2406
+ do {
2407
+ switch (r3) {
2408
+ case 59:
2409
+ this._params.addParam(0);
2410
+ break;
2411
+ case 58:
2412
+ this._params.addSubParam(-1);
2413
+ break;
2414
+ default:
2415
+ this._params.addDigit(r3 - 48);
2416
+ }
2417
+ } while (++i4 < t3 && (r3 = e3[i4]) > 47 && r3 < 60);
2418
+ i4--;
2419
+ break;
2420
+ case 9:
2421
+ this._collect <<= 8, this._collect |= r3;
2422
+ break;
2423
+ case 10:
2424
+ const c2 = this._escHandlers[this._collect << 8 | r3];
2425
+ let l = c2 ? c2.length - 1 : -1;
2426
+ for (; l >= 0 && (s3 = c2[l](), true !== s3); l--) if (s3 instanceof Promise) return this._preserveStack(4, c2, l, n3, i4), s3;
2427
+ l < 0 && this._escHandlerFb(this._collect << 8 | r3), this.precedingJoinState = 0;
2428
+ break;
2429
+ case 11:
2430
+ this._params.reset(), this._params.addParam(0), this._collect = 0;
2431
+ break;
2432
+ case 12:
2433
+ this._dcsParser.hook(this._collect << 8 | r3, this._params);
2434
+ break;
2435
+ case 13:
2436
+ for (let s4 = i4 + 1; ; ++s4) if (s4 >= t3 || 24 === (r3 = e3[s4]) || 26 === r3 || 27 === r3 || r3 > 127 && r3 < h) {
2437
+ this._dcsParser.put(e3, i4, s4), i4 = s4 - 1;
2438
+ break;
2439
+ }
2440
+ break;
2441
+ case 14:
2442
+ if (s3 = this._dcsParser.unhook(24 !== r3 && 26 !== r3), s3) return this._preserveStack(6, [], 0, n3, i4), s3;
2443
+ 27 === r3 && (n3 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
2444
+ break;
2445
+ case 4:
2446
+ this._oscParser.start();
2447
+ break;
2448
+ case 5:
2449
+ for (let s4 = i4 + 1; ; s4++) if (s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 127 && r3 < h) {
2450
+ this._oscParser.put(e3, i4, s4), i4 = s4 - 1;
2451
+ break;
2452
+ }
2453
+ break;
2454
+ case 6:
2455
+ if (s3 = this._oscParser.end(24 !== r3 && 26 !== r3), s3) return this._preserveStack(5, [], 0, n3, i4), s3;
2456
+ 27 === r3 && (n3 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
2457
+ }
2458
+ this.currentState = 15 & n3;
2459
+ }
2460
+ }
2461
+ }
2462
+ t2.EscapeSequenceParser = c;
2463
+ }, 242: (e2, t2, i2) => {
2464
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.OscHandler = t2.OscParser = void 0;
2465
+ const s2 = i2(770), r2 = i2(482), n2 = [];
2466
+ t2.OscParser = class {
2467
+ constructor() {
2468
+ this._state = 0, this._active = n2, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
2469
+ }, this._stack = { paused: false, loopPosition: 0, fallThrough: false };
2470
+ }
2471
+ registerHandler(e3, t3) {
2472
+ void 0 === this._handlers[e3] && (this._handlers[e3] = []);
2473
+ const i3 = this._handlers[e3];
2474
+ return i3.push(t3), { dispose: /* @__PURE__ */ __name(() => {
2475
+ const e4 = i3.indexOf(t3);
2476
+ -1 !== e4 && i3.splice(e4, 1);
2477
+ }, "dispose") };
2478
+ }
2479
+ clearHandler(e3) {
2480
+ this._handlers[e3] && delete this._handlers[e3];
2481
+ }
2482
+ setHandlerFallback(e3) {
2483
+ this._handlerFb = e3;
2484
+ }
2485
+ dispose() {
2486
+ this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
2487
+ }, this._active = n2;
2488
+ }
2489
+ reset() {
2490
+ if (2 === this._state) for (let e3 = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e3 >= 0; --e3) this._active[e3].end(false);
2491
+ this._stack.paused = false, this._active = n2, this._id = -1, this._state = 0;
2492
+ }
2493
+ _start() {
2494
+ if (this._active = this._handlers[this._id] || n2, this._active.length) for (let e3 = this._active.length - 1; e3 >= 0; e3--) this._active[e3].start();
2495
+ else this._handlerFb(this._id, "START");
2496
+ }
2497
+ _put(e3, t3, i3) {
2498
+ if (this._active.length) for (let s3 = this._active.length - 1; s3 >= 0; s3--) this._active[s3].put(e3, t3, i3);
2499
+ else this._handlerFb(this._id, "PUT", (0, r2.utf32ToString)(e3, t3, i3));
2500
+ }
2501
+ start() {
2502
+ this.reset(), this._state = 1;
2503
+ }
2504
+ put(e3, t3, i3) {
2505
+ if (3 !== this._state) {
2506
+ if (1 === this._state) for (; t3 < i3; ) {
2507
+ const i4 = e3[t3++];
2508
+ if (59 === i4) {
2509
+ this._state = 2, this._start();
2510
+ break;
2511
+ }
2512
+ if (i4 < 48 || 57 < i4) return void (this._state = 3);
2513
+ -1 === this._id && (this._id = 0), this._id = 10 * this._id + i4 - 48;
2514
+ }
2515
+ 2 === this._state && i3 - t3 > 0 && this._put(e3, t3, i3);
2516
+ }
2517
+ }
2518
+ end(e3, t3 = true) {
2519
+ if (0 !== this._state) {
2520
+ if (3 !== this._state) if (1 === this._state && this._start(), this._active.length) {
2521
+ let i3 = false, s3 = this._active.length - 1, r3 = false;
2522
+ if (this._stack.paused && (s3 = this._stack.loopPosition - 1, i3 = t3, r3 = this._stack.fallThrough, this._stack.paused = false), !r3 && false === i3) {
2523
+ for (; s3 >= 0 && (i3 = this._active[s3].end(e3), true !== i3); s3--) if (i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = false, i3;
2524
+ s3--;
2525
+ }
2526
+ for (; s3 >= 0; s3--) if (i3 = this._active[s3].end(false), i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = true, i3;
2527
+ } else this._handlerFb(this._id, "END", e3);
2528
+ this._active = n2, this._id = -1, this._state = 0;
2529
+ }
2530
+ }
2531
+ }, t2.OscHandler = class {
2532
+ constructor(e3) {
2533
+ this._handler = e3, this._data = "", this._hitLimit = false;
2534
+ }
2535
+ start() {
2536
+ this._data = "", this._hitLimit = false;
2537
+ }
2538
+ put(e3, t3, i3) {
2539
+ this._hitLimit || (this._data += (0, r2.utf32ToString)(e3, t3, i3), this._data.length > s2.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = true));
2540
+ }
2541
+ end(e3) {
2542
+ let t3 = false;
2543
+ if (this._hitLimit) t3 = false;
2544
+ else if (e3 && (t3 = this._handler(this._data), t3 instanceof Promise)) return t3.then((e4) => (this._data = "", this._hitLimit = false, e4));
2545
+ return this._data = "", this._hitLimit = false, t3;
2546
+ }
2547
+ };
2548
+ }, 742: (e2, t2) => {
2549
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Params = void 0;
2550
+ const i2 = 2147483647;
2551
+ class s2 {
2552
+ static {
2553
+ __name(this, "s");
2554
+ }
2555
+ static fromArray(e3) {
2556
+ const t3 = new s2();
2557
+ if (!e3.length) return t3;
2558
+ for (let i3 = Array.isArray(e3[0]) ? 1 : 0; i3 < e3.length; ++i3) {
2559
+ const s3 = e3[i3];
2560
+ if (Array.isArray(s3)) for (let e4 = 0; e4 < s3.length; ++e4) t3.addSubParam(s3[e4]);
2561
+ else t3.addParam(s3);
2562
+ }
2563
+ return t3;
2564
+ }
2565
+ constructor(e3 = 32, t3 = 32) {
2566
+ if (this.maxLength = e3, this.maxSubParamsLength = t3, t3 > 256) throw new Error("maxSubParamsLength must not be greater than 256");
2567
+ this.params = new Int32Array(e3), this.length = 0, this._subParams = new Int32Array(t3), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(e3), this._rejectDigits = false, this._rejectSubDigits = false, this._digitIsSub = false;
2568
+ }
2569
+ clone() {
2570
+ const e3 = new s2(this.maxLength, this.maxSubParamsLength);
2571
+ return e3.params.set(this.params), e3.length = this.length, e3._subParams.set(this._subParams), e3._subParamsLength = this._subParamsLength, e3._subParamsIdx.set(this._subParamsIdx), e3._rejectDigits = this._rejectDigits, e3._rejectSubDigits = this._rejectSubDigits, e3._digitIsSub = this._digitIsSub, e3;
2572
+ }
2573
+ toArray() {
2574
+ const e3 = [];
2575
+ for (let t3 = 0; t3 < this.length; ++t3) {
2576
+ e3.push(this.params[t3]);
2577
+ const i3 = this._subParamsIdx[t3] >> 8, s3 = 255 & this._subParamsIdx[t3];
2578
+ s3 - i3 > 0 && e3.push(Array.prototype.slice.call(this._subParams, i3, s3));
2579
+ }
2580
+ return e3;
2581
+ }
2582
+ reset() {
2583
+ this.length = 0, this._subParamsLength = 0, this._rejectDigits = false, this._rejectSubDigits = false, this._digitIsSub = false;
2584
+ }
2585
+ addParam(e3) {
2586
+ if (this._digitIsSub = false, this.length >= this.maxLength) this._rejectDigits = true;
2587
+ else {
2588
+ if (e3 < -1) throw new Error("values lesser than -1 are not allowed");
2589
+ this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = e3 > i2 ? i2 : e3;
2590
+ }
2591
+ }
2592
+ addSubParam(e3) {
2593
+ if (this._digitIsSub = true, this.length) if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) this._rejectSubDigits = true;
2594
+ else {
2595
+ if (e3 < -1) throw new Error("values lesser than -1 are not allowed");
2596
+ this._subParams[this._subParamsLength++] = e3 > i2 ? i2 : e3, this._subParamsIdx[this.length - 1]++;
2597
+ }
2598
+ }
2599
+ hasSubParams(e3) {
2600
+ return (255 & this._subParamsIdx[e3]) - (this._subParamsIdx[e3] >> 8) > 0;
2601
+ }
2602
+ getSubParams(e3) {
2603
+ const t3 = this._subParamsIdx[e3] >> 8, i3 = 255 & this._subParamsIdx[e3];
2604
+ return i3 - t3 > 0 ? this._subParams.subarray(t3, i3) : null;
2605
+ }
2606
+ getSubParamsAll() {
2607
+ const e3 = {};
2608
+ for (let t3 = 0; t3 < this.length; ++t3) {
2609
+ const i3 = this._subParamsIdx[t3] >> 8, s3 = 255 & this._subParamsIdx[t3];
2610
+ s3 - i3 > 0 && (e3[t3] = this._subParams.slice(i3, s3));
2611
+ }
2612
+ return e3;
2613
+ }
2614
+ addDigit(e3) {
2615
+ let t3;
2616
+ if (this._rejectDigits || !(t3 = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
2617
+ const s3 = this._digitIsSub ? this._subParams : this.params, r2 = s3[t3 - 1];
2618
+ s3[t3 - 1] = ~r2 ? Math.min(10 * r2 + e3, i2) : e3;
2619
+ }
2620
+ }
2621
+ t2.Params = s2;
2622
+ }, 741: (e2, t2) => {
2623
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.AddonManager = void 0, t2.AddonManager = class {
2624
+ constructor() {
2625
+ this._addons = [];
2626
+ }
2627
+ dispose() {
2628
+ for (let e3 = this._addons.length - 1; e3 >= 0; e3--) this._addons[e3].instance.dispose();
2629
+ }
2630
+ loadAddon(e3, t3) {
2631
+ const i2 = { instance: t3, dispose: t3.dispose, isDisposed: false };
2632
+ this._addons.push(i2), t3.dispose = () => this._wrappedAddonDispose(i2), t3.activate(e3);
2633
+ }
2634
+ _wrappedAddonDispose(e3) {
2635
+ if (e3.isDisposed) return;
2636
+ let t3 = -1;
2637
+ for (let i2 = 0; i2 < this._addons.length; i2++) if (this._addons[i2] === e3) {
2638
+ t3 = i2;
2639
+ break;
2640
+ }
2641
+ if (-1 === t3) throw new Error("Could not dispose an addon that has not been loaded");
2642
+ e3.isDisposed = true, e3.dispose.apply(e3.instance), this._addons.splice(t3, 1);
2643
+ }
2644
+ };
2645
+ }, 771: (e2, t2, i2) => {
2646
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferApiView = void 0;
2647
+ const s2 = i2(785), r2 = i2(511);
2648
+ t2.BufferApiView = class {
2649
+ constructor(e3, t3) {
2650
+ this._buffer = e3, this.type = t3;
2651
+ }
2652
+ init(e3) {
2653
+ return this._buffer = e3, this;
2654
+ }
2655
+ get cursorY() {
2656
+ return this._buffer.y;
2657
+ }
2658
+ get cursorX() {
2659
+ return this._buffer.x;
2660
+ }
2661
+ get viewportY() {
2662
+ return this._buffer.ydisp;
2663
+ }
2664
+ get baseY() {
2665
+ return this._buffer.ybase;
2666
+ }
2667
+ get length() {
2668
+ return this._buffer.lines.length;
2669
+ }
2670
+ getLine(e3) {
2671
+ const t3 = this._buffer.lines.get(e3);
2672
+ if (t3) return new s2.BufferLineApiView(t3);
2673
+ }
2674
+ getNullCell() {
2675
+ return new r2.CellData();
2676
+ }
2677
+ };
2678
+ }, 785: (e2, t2, i2) => {
2679
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferLineApiView = void 0;
2680
+ const s2 = i2(511);
2681
+ t2.BufferLineApiView = class {
2682
+ constructor(e3) {
2683
+ this._line = e3;
2684
+ }
2685
+ get isWrapped() {
2686
+ return this._line.isWrapped;
2687
+ }
2688
+ get length() {
2689
+ return this._line.length;
2690
+ }
2691
+ getCell(e3, t3) {
2692
+ if (!(e3 < 0 || e3 >= this._line.length)) return t3 ? (this._line.loadCell(e3, t3), t3) : this._line.loadCell(e3, new s2.CellData());
2693
+ }
2694
+ translateToString(e3, t3, i3) {
2695
+ return this._line.translateToString(e3, t3, i3);
2696
+ }
2697
+ };
2698
+ }, 285: (e2, t2, i2) => {
2699
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferNamespaceApi = void 0;
2700
+ const s2 = i2(771), r2 = i2(460), n2 = i2(844);
2701
+ class a extends n2.Disposable {
2702
+ static {
2703
+ __name(this, "a");
2704
+ }
2705
+ constructor(e3) {
2706
+ super(), this._core = e3, this._onBufferChange = this.register(new r2.EventEmitter()), this.onBufferChange = this._onBufferChange.event, this._normal = new s2.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new s2.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
2707
+ }
2708
+ get active() {
2709
+ if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
2710
+ if (this._core.buffers.active === this._core.buffers.alt) return this.alternate;
2711
+ throw new Error("Active buffer is neither normal nor alternate");
2712
+ }
2713
+ get normal() {
2714
+ return this._normal.init(this._core.buffers.normal);
2715
+ }
2716
+ get alternate() {
2717
+ return this._alternate.init(this._core.buffers.alt);
2718
+ }
2719
+ }
2720
+ t2.BufferNamespaceApi = a;
2721
+ }, 975: (e2, t2) => {
2722
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.ParserApi = void 0, t2.ParserApi = class {
2723
+ constructor(e3) {
2724
+ this._core = e3;
2725
+ }
2726
+ registerCsiHandler(e3, t3) {
2727
+ return this._core.registerCsiHandler(e3, (e4) => t3(e4.toArray()));
2728
+ }
2729
+ addCsiHandler(e3, t3) {
2730
+ return this.registerCsiHandler(e3, t3);
2731
+ }
2732
+ registerDcsHandler(e3, t3) {
2733
+ return this._core.registerDcsHandler(e3, (e4, i2) => t3(e4, i2.toArray()));
2734
+ }
2735
+ addDcsHandler(e3, t3) {
2736
+ return this.registerDcsHandler(e3, t3);
2737
+ }
2738
+ registerEscHandler(e3, t3) {
2739
+ return this._core.registerEscHandler(e3, t3);
2740
+ }
2741
+ addEscHandler(e3, t3) {
2742
+ return this.registerEscHandler(e3, t3);
2743
+ }
2744
+ registerOscHandler(e3, t3) {
2745
+ return this._core.registerOscHandler(e3, t3);
2746
+ }
2747
+ addOscHandler(e3, t3) {
2748
+ return this.registerOscHandler(e3, t3);
2749
+ }
2750
+ };
2751
+ }, 90: (e2, t2) => {
2752
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeApi = void 0, t2.UnicodeApi = class {
2753
+ constructor(e3) {
2754
+ this._core = e3;
2755
+ }
2756
+ register(e3) {
2757
+ this._core.unicodeService.register(e3);
2758
+ }
2759
+ get versions() {
2760
+ return this._core.unicodeService.versions;
2761
+ }
2762
+ get activeVersion() {
2763
+ return this._core.unicodeService.activeVersion;
2764
+ }
2765
+ set activeVersion(e3) {
2766
+ this._core.unicodeService.activeVersion = e3;
2767
+ }
2768
+ };
2769
+ }, 744: function(e2, t2, i2) {
2770
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
2771
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
2772
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
2773
+ else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
2774
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
2775
+ }, r2 = this && this.__param || function(e3, t3) {
2776
+ return function(i3, s3) {
2777
+ t3(i3, s3, e3);
2778
+ };
2779
+ };
2780
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferService = t2.MINIMUM_ROWS = t2.MINIMUM_COLS = void 0;
2781
+ const n2 = i2(460), a = i2(844), o = i2(295), h = i2(585);
2782
+ t2.MINIMUM_COLS = 2, t2.MINIMUM_ROWS = 1;
2783
+ let c = t2.BufferService = class extends a.Disposable {
2784
+ get buffer() {
2785
+ return this.buffers.active;
2786
+ }
2787
+ constructor(e3) {
2788
+ super(), this.isUserScrolling = false, this._onResize = this.register(new n2.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new n2.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e3.rawOptions.cols || 0, t2.MINIMUM_COLS), this.rows = Math.max(e3.rawOptions.rows || 0, t2.MINIMUM_ROWS), this.buffers = this.register(new o.BufferSet(e3, this));
2789
+ }
2790
+ resize(e3, t3) {
2791
+ this.cols = e3, this.rows = t3, this.buffers.resize(e3, t3), this._onResize.fire({ cols: e3, rows: t3 });
2792
+ }
2793
+ reset() {
2794
+ this.buffers.reset(), this.isUserScrolling = false;
2795
+ }
2796
+ scroll(e3, t3 = false) {
2797
+ const i3 = this.buffer;
2798
+ let s3;
2799
+ s3 = this._cachedBlankLine, s3 && s3.length === this.cols && s3.getFg(0) === e3.fg && s3.getBg(0) === e3.bg || (s3 = i3.getBlankLine(e3, t3), this._cachedBlankLine = s3), s3.isWrapped = t3;
2800
+ const r3 = i3.ybase + i3.scrollTop, n3 = i3.ybase + i3.scrollBottom;
2801
+ if (0 === i3.scrollTop) {
2802
+ const e4 = i3.lines.isFull;
2803
+ n3 === i3.lines.length - 1 ? e4 ? i3.lines.recycle().copyFrom(s3) : i3.lines.push(s3.clone()) : i3.lines.splice(n3 + 1, 0, s3.clone()), e4 ? this.isUserScrolling && (i3.ydisp = Math.max(i3.ydisp - 1, 0)) : (i3.ybase++, this.isUserScrolling || i3.ydisp++);
2804
+ } else {
2805
+ const e4 = n3 - r3 + 1;
2806
+ i3.lines.shiftElements(r3 + 1, e4 - 1, -1), i3.lines.set(n3, s3.clone());
2807
+ }
2808
+ this.isUserScrolling || (i3.ydisp = i3.ybase), this._onScroll.fire(i3.ydisp);
2809
+ }
2810
+ scrollLines(e3, t3, i3) {
2811
+ const s3 = this.buffer;
2812
+ if (e3 < 0) {
2813
+ if (0 === s3.ydisp) return;
2814
+ this.isUserScrolling = true;
2815
+ } else e3 + s3.ydisp >= s3.ybase && (this.isUserScrolling = false);
2816
+ const r3 = s3.ydisp;
2817
+ s3.ydisp = Math.max(Math.min(s3.ydisp + e3, s3.ybase), 0), r3 !== s3.ydisp && (t3 || this._onScroll.fire(s3.ydisp));
2818
+ }
2819
+ };
2820
+ t2.BufferService = c = s2([r2(0, h.IOptionsService)], c);
2821
+ }, 994: (e2, t2) => {
2822
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CharsetService = void 0, t2.CharsetService = class {
2823
+ constructor() {
2824
+ this.glevel = 0, this._charsets = [];
2825
+ }
2826
+ reset() {
2827
+ this.charset = void 0, this._charsets = [], this.glevel = 0;
2828
+ }
2829
+ setgLevel(e3) {
2830
+ this.glevel = e3, this.charset = this._charsets[e3];
2831
+ }
2832
+ setgCharset(e3, t3) {
2833
+ this._charsets[e3] = t3, this.glevel === e3 && (this.charset = t3);
2834
+ }
2835
+ };
2836
+ }, 753: function(e2, t2, i2) {
2837
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
2838
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
2839
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
2840
+ else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
2841
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
2842
+ }, r2 = this && this.__param || function(e3, t3) {
2843
+ return function(i3, s3) {
2844
+ t3(i3, s3, e3);
2845
+ };
2846
+ };
2847
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreMouseService = void 0;
2848
+ const n2 = i2(585), a = i2(460), o = i2(844), h = { NONE: { events: 0, restrict: /* @__PURE__ */ __name(() => false, "restrict") }, X10: { events: 1, restrict: /* @__PURE__ */ __name((e3) => 4 !== e3.button && 1 === e3.action && (e3.ctrl = false, e3.alt = false, e3.shift = false, true), "restrict") }, VT200: { events: 19, restrict: /* @__PURE__ */ __name((e3) => 32 !== e3.action, "restrict") }, DRAG: { events: 23, restrict: /* @__PURE__ */ __name((e3) => 32 !== e3.action || 3 !== e3.button, "restrict") }, ANY: { events: 31, restrict: /* @__PURE__ */ __name((e3) => true, "restrict") } };
2849
+ function c(e3, t3) {
2850
+ let i3 = (e3.ctrl ? 16 : 0) | (e3.shift ? 4 : 0) | (e3.alt ? 8 : 0);
2851
+ return 4 === e3.button ? (i3 |= 64, i3 |= e3.action) : (i3 |= 3 & e3.button, 4 & e3.button && (i3 |= 64), 8 & e3.button && (i3 |= 128), 32 === e3.action ? i3 |= 32 : 0 !== e3.action || t3 || (i3 |= 3)), i3;
2852
+ }
2853
+ __name(c, "c");
2854
+ const l = String.fromCharCode, _ = { DEFAULT: /* @__PURE__ */ __name((e3) => {
2855
+ const t3 = [c(e3, false) + 32, e3.col + 32, e3.row + 32];
2856
+ return t3[0] > 255 || t3[1] > 255 || t3[2] > 255 ? "" : `\x1B[M${l(t3[0])}${l(t3[1])}${l(t3[2])}`;
2857
+ }, "DEFAULT"), SGR: /* @__PURE__ */ __name((e3) => {
2858
+ const t3 = 0 === e3.action && 4 !== e3.button ? "m" : "M";
2859
+ return `\x1B[<${c(e3, true)};${e3.col};${e3.row}${t3}`;
2860
+ }, "SGR"), SGR_PIXELS: /* @__PURE__ */ __name((e3) => {
2861
+ const t3 = 0 === e3.action && 4 !== e3.button ? "m" : "M";
2862
+ return `\x1B[<${c(e3, true)};${e3.x};${e3.y}${t3}`;
2863
+ }, "SGR_PIXELS") };
2864
+ let d = t2.CoreMouseService = class extends o.Disposable {
2865
+ constructor(e3, t3) {
2866
+ super(), this._bufferService = e3, this._coreService = t3, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new a.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
2867
+ for (const e4 of Object.keys(h)) this.addProtocol(e4, h[e4]);
2868
+ for (const e4 of Object.keys(_)) this.addEncoding(e4, _[e4]);
2869
+ this.reset();
2870
+ }
2871
+ addProtocol(e3, t3) {
2872
+ this._protocols[e3] = t3;
2873
+ }
2874
+ addEncoding(e3, t3) {
2875
+ this._encodings[e3] = t3;
2876
+ }
2877
+ get activeProtocol() {
2878
+ return this._activeProtocol;
2879
+ }
2880
+ get areMouseEventsActive() {
2881
+ return 0 !== this._protocols[this._activeProtocol].events;
2882
+ }
2883
+ set activeProtocol(e3) {
2884
+ if (!this._protocols[e3]) throw new Error(`unknown protocol "${e3}"`);
2885
+ this._activeProtocol = e3, this._onProtocolChange.fire(this._protocols[e3].events);
2886
+ }
2887
+ get activeEncoding() {
2888
+ return this._activeEncoding;
2889
+ }
2890
+ set activeEncoding(e3) {
2891
+ if (!this._encodings[e3]) throw new Error(`unknown encoding "${e3}"`);
2892
+ this._activeEncoding = e3;
2893
+ }
2894
+ reset() {
2895
+ this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
2896
+ }
2897
+ triggerMouseEvent(e3) {
2898
+ if (e3.col < 0 || e3.col >= this._bufferService.cols || e3.row < 0 || e3.row >= this._bufferService.rows) return false;
2899
+ if (4 === e3.button && 32 === e3.action) return false;
2900
+ if (3 === e3.button && 32 !== e3.action) return false;
2901
+ if (4 !== e3.button && (2 === e3.action || 3 === e3.action)) return false;
2902
+ if (e3.col++, e3.row++, 32 === e3.action && this._lastEvent && this._equalEvents(this._lastEvent, e3, "SGR_PIXELS" === this._activeEncoding)) return false;
2903
+ if (!this._protocols[this._activeProtocol].restrict(e3)) return false;
2904
+ const t3 = this._encodings[this._activeEncoding](e3);
2905
+ return t3 && ("DEFAULT" === this._activeEncoding ? this._coreService.triggerBinaryEvent(t3) : this._coreService.triggerDataEvent(t3, true)), this._lastEvent = e3, true;
2906
+ }
2907
+ explainEvents(e3) {
2908
+ return { down: !!(1 & e3), up: !!(2 & e3), drag: !!(4 & e3), move: !!(8 & e3), wheel: !!(16 & e3) };
2909
+ }
2910
+ _equalEvents(e3, t3, i3) {
2911
+ if (i3) {
2912
+ if (e3.x !== t3.x) return false;
2913
+ if (e3.y !== t3.y) return false;
2914
+ } else {
2915
+ if (e3.col !== t3.col) return false;
2916
+ if (e3.row !== t3.row) return false;
2917
+ }
2918
+ return e3.button === t3.button && e3.action === t3.action && e3.ctrl === t3.ctrl && e3.alt === t3.alt && e3.shift === t3.shift;
2919
+ }
2920
+ };
2921
+ t2.CoreMouseService = d = s2([r2(0, n2.IBufferService), r2(1, n2.ICoreService)], d);
2922
+ }, 83: function(e2, t2, i2) {
2923
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
2924
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
2925
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
2926
+ else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
2927
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
2928
+ }, r2 = this && this.__param || function(e3, t3) {
2929
+ return function(i3, s3) {
2930
+ t3(i3, s3, e3);
2931
+ };
2932
+ };
2933
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreService = void 0;
2934
+ const n2 = i2(439), a = i2(460), o = i2(844), h = i2(585), c = Object.freeze({ insertMode: false }), l = Object.freeze({ applicationCursorKeys: false, applicationKeypad: false, bracketedPasteMode: false, origin: false, reverseWraparound: false, sendFocus: false, wraparound: true });
2935
+ let _ = t2.CoreService = class extends o.Disposable {
2936
+ constructor(e3, t3, i3) {
2937
+ super(), this._bufferService = e3, this._logService = t3, this._optionsService = i3, this.isCursorInitialized = false, this.isCursorHidden = false, this._onData = this.register(new a.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new a.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new a.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new a.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, n2.clone)(c), this.decPrivateModes = (0, n2.clone)(l);
2938
+ }
2939
+ reset() {
2940
+ this.modes = (0, n2.clone)(c), this.decPrivateModes = (0, n2.clone)(l);
2941
+ }
2942
+ triggerDataEvent(e3, t3 = false) {
2943
+ if (this._optionsService.rawOptions.disableStdin) return;
2944
+ const i3 = this._bufferService.buffer;
2945
+ t3 && this._optionsService.rawOptions.scrollOnUserInput && i3.ybase !== i3.ydisp && this._onRequestScrollToBottom.fire(), t3 && this._onUserInput.fire(), this._logService.debug(`sending data "${e3}"`, () => e3.split("").map((e4) => e4.charCodeAt(0))), this._onData.fire(e3);
2946
+ }
2947
+ triggerBinaryEvent(e3) {
2948
+ this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${e3}"`, () => e3.split("").map((e4) => e4.charCodeAt(0))), this._onBinary.fire(e3));
2949
+ }
2950
+ };
2951
+ t2.CoreService = _ = s2([r2(0, h.IBufferService), r2(1, h.ILogService), r2(2, h.IOptionsService)], _);
2952
+ }, 348: (e2, t2, i2) => {
2953
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.InstantiationService = t2.ServiceCollection = void 0;
2954
+ const s2 = i2(585), r2 = i2(343);
2955
+ class n2 {
2956
+ static {
2957
+ __name(this, "n");
2958
+ }
2959
+ constructor(...e3) {
2960
+ this._entries = /* @__PURE__ */ new Map();
2961
+ for (const [t3, i3] of e3) this.set(t3, i3);
2962
+ }
2963
+ set(e3, t3) {
2964
+ const i3 = this._entries.get(e3);
2965
+ return this._entries.set(e3, t3), i3;
2966
+ }
2967
+ forEach(e3) {
2968
+ for (const [t3, i3] of this._entries.entries()) e3(t3, i3);
2969
+ }
2970
+ has(e3) {
2971
+ return this._entries.has(e3);
2972
+ }
2973
+ get(e3) {
2974
+ return this._entries.get(e3);
2975
+ }
2976
+ }
2977
+ t2.ServiceCollection = n2, t2.InstantiationService = class {
2978
+ constructor() {
2979
+ this._services = new n2(), this._services.set(s2.IInstantiationService, this);
2980
+ }
2981
+ setService(e3, t3) {
2982
+ this._services.set(e3, t3);
2983
+ }
2984
+ getService(e3) {
2985
+ return this._services.get(e3);
2986
+ }
2987
+ createInstance(e3, ...t3) {
2988
+ const i3 = (0, r2.getServiceDependencies)(e3).sort((e4, t4) => e4.index - t4.index), s3 = [];
2989
+ for (const t4 of i3) {
2990
+ const i4 = this._services.get(t4.id);
2991
+ if (!i4) throw new Error(`[createInstance] ${e3.name} depends on UNKNOWN service ${t4.id}.`);
2992
+ s3.push(i4);
2993
+ }
2994
+ const n3 = i3.length > 0 ? i3[0].index : t3.length;
2995
+ if (t3.length !== n3) throw new Error(`[createInstance] First service dependency of ${e3.name} at position ${n3 + 1} conflicts with ${t3.length} static arguments`);
2996
+ return new e3(...[...t3, ...s3]);
2997
+ }
2998
+ };
2999
+ }, 866: function(e2, t2, i2) {
3000
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
3001
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
3002
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
3003
+ else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
3004
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
3005
+ }, r2 = this && this.__param || function(e3, t3) {
3006
+ return function(i3, s3) {
3007
+ t3(i3, s3, e3);
3008
+ };
3009
+ };
3010
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.traceCall = t2.setTraceLogger = t2.LogService = void 0;
3011
+ const n2 = i2(844), a = i2(585), o = { trace: a.LogLevelEnum.TRACE, debug: a.LogLevelEnum.DEBUG, info: a.LogLevelEnum.INFO, warn: a.LogLevelEnum.WARN, error: a.LogLevelEnum.ERROR, off: a.LogLevelEnum.OFF };
3012
+ let h, c = t2.LogService = class extends n2.Disposable {
3013
+ get logLevel() {
3014
+ return this._logLevel;
3015
+ }
3016
+ constructor(e3) {
3017
+ super(), this._optionsService = e3, this._logLevel = a.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
3018
+ }
3019
+ _updateLogLevel() {
3020
+ this._logLevel = o[this._optionsService.rawOptions.logLevel];
3021
+ }
3022
+ _evalLazyOptionalParams(e3) {
3023
+ for (let t3 = 0; t3 < e3.length; t3++) "function" == typeof e3[t3] && (e3[t3] = e3[t3]());
3024
+ }
3025
+ _log(e3, t3, i3) {
3026
+ this._evalLazyOptionalParams(i3), e3.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t3, ...i3);
3027
+ }
3028
+ trace(e3, ...t3) {
3029
+ this._logLevel <= a.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
3030
+ }
3031
+ debug(e3, ...t3) {
3032
+ this._logLevel <= a.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
3033
+ }
3034
+ info(e3, ...t3) {
3035
+ this._logLevel <= a.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e3, t3);
3036
+ }
3037
+ warn(e3, ...t3) {
3038
+ this._logLevel <= a.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e3, t3);
3039
+ }
3040
+ error(e3, ...t3) {
3041
+ this._logLevel <= a.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e3, t3);
3042
+ }
3043
+ };
3044
+ t2.LogService = c = s2([r2(0, a.IOptionsService)], c), t2.setTraceLogger = function(e3) {
3045
+ h = e3;
3046
+ }, t2.traceCall = function(e3, t3, i3) {
3047
+ if ("function" != typeof i3.value) throw new Error("not supported");
3048
+ const s3 = i3.value;
3049
+ i3.value = function(...e4) {
3050
+ if (h.logLevel !== a.LogLevelEnum.TRACE) return s3.apply(this, e4);
3051
+ h.trace(`GlyphRenderer#${s3.name}(${e4.map((e5) => JSON.stringify(e5)).join(", ")})`);
3052
+ const t4 = s3.apply(this, e4);
3053
+ return h.trace(`GlyphRenderer#${s3.name} return`, t4), t4;
3054
+ };
3055
+ };
3056
+ }, 302: (e2, t2, i2) => {
3057
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.OptionsService = t2.DEFAULT_OPTIONS = void 0;
3058
+ const s2 = i2(460), r2 = i2(844), n2 = i2(114);
3059
+ t2.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: false, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: true, drawBoldTextInBrightColors: true, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: false, rightClickSelectsWord: n2.isMac, windowOptions: {}, windowsMode: false, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", cancelEvents: false, overviewRulerWidth: 0 };
3060
+ const a = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
3061
+ class o extends r2.Disposable {
3062
+ static {
3063
+ __name(this, "o");
3064
+ }
3065
+ constructor(e3) {
3066
+ super(), this._onOptionChange = this.register(new s2.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
3067
+ const i3 = { ...t2.DEFAULT_OPTIONS };
3068
+ for (const t3 in e3) if (t3 in i3) try {
3069
+ const s3 = e3[t3];
3070
+ i3[t3] = this._sanitizeAndValidateOption(t3, s3);
3071
+ } catch (e4) {
3072
+ console.error(e4);
3073
+ }
3074
+ this.rawOptions = i3, this.options = { ...i3 }, this._setupOptions(), this.register((0, r2.toDisposable)(() => {
3075
+ this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
3076
+ }));
3077
+ }
3078
+ onSpecificOptionChange(e3, t3) {
3079
+ return this.onOptionChange((i3) => {
3080
+ i3 === e3 && t3(this.rawOptions[e3]);
3081
+ });
3082
+ }
3083
+ onMultipleOptionChange(e3, t3) {
3084
+ return this.onOptionChange((i3) => {
3085
+ -1 !== e3.indexOf(i3) && t3();
3086
+ });
3087
+ }
3088
+ _setupOptions() {
3089
+ const e3 = /* @__PURE__ */ __name((e4) => {
3090
+ if (!(e4 in t2.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e4}"`);
3091
+ return this.rawOptions[e4];
3092
+ }, "e"), i3 = /* @__PURE__ */ __name((e4, i4) => {
3093
+ if (!(e4 in t2.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e4}"`);
3094
+ i4 = this._sanitizeAndValidateOption(e4, i4), this.rawOptions[e4] !== i4 && (this.rawOptions[e4] = i4, this._onOptionChange.fire(e4));
3095
+ }, "i");
3096
+ for (const t3 in this.rawOptions) {
3097
+ const s3 = { get: e3.bind(this, t3), set: i3.bind(this, t3) };
3098
+ Object.defineProperty(this.options, t3, s3);
3099
+ }
3100
+ }
3101
+ _sanitizeAndValidateOption(e3, i3) {
3102
+ switch (e3) {
3103
+ case "cursorStyle":
3104
+ if (i3 || (i3 = t2.DEFAULT_OPTIONS[e3]), !/* @__PURE__ */ function(e4) {
3105
+ return "block" === e4 || "underline" === e4 || "bar" === e4;
3106
+ }(i3)) throw new Error(`"${i3}" is not a valid value for ${e3}`);
3107
+ break;
3108
+ case "wordSeparator":
3109
+ i3 || (i3 = t2.DEFAULT_OPTIONS[e3]);
3110
+ break;
3111
+ case "fontWeight":
3112
+ case "fontWeightBold":
3113
+ if ("number" == typeof i3 && 1 <= i3 && i3 <= 1e3) break;
3114
+ i3 = a.includes(i3) ? i3 : t2.DEFAULT_OPTIONS[e3];
3115
+ break;
3116
+ case "cursorWidth":
3117
+ i3 = Math.floor(i3);
3118
+ case "lineHeight":
3119
+ case "tabStopWidth":
3120
+ if (i3 < 1) throw new Error(`${e3} cannot be less than 1, value: ${i3}`);
3121
+ break;
3122
+ case "minimumContrastRatio":
3123
+ i3 = Math.max(1, Math.min(21, Math.round(10 * i3) / 10));
3124
+ break;
3125
+ case "scrollback":
3126
+ if ((i3 = Math.min(i3, 4294967295)) < 0) throw new Error(`${e3} cannot be less than 0, value: ${i3}`);
3127
+ break;
3128
+ case "fastScrollSensitivity":
3129
+ case "scrollSensitivity":
3130
+ if (i3 <= 0) throw new Error(`${e3} cannot be less than or equal to 0, value: ${i3}`);
3131
+ break;
3132
+ case "rows":
3133
+ case "cols":
3134
+ if (!i3 && 0 !== i3) throw new Error(`${e3} must be numeric, value: ${i3}`);
3135
+ break;
3136
+ case "windowsPty":
3137
+ i3 = i3 ?? {};
3138
+ }
3139
+ return i3;
3140
+ }
3141
+ }
3142
+ t2.OptionsService = o;
3143
+ }, 660: function(e2, t2, i2) {
3144
+ var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
3145
+ var r3, n3 = arguments.length, a2 = n3 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
3146
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
3147
+ else for (var o = e3.length - 1; o >= 0; o--) (r3 = e3[o]) && (a2 = (n3 < 3 ? r3(a2) : n3 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
3148
+ return n3 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
3149
+ }, r2 = this && this.__param || function(e3, t3) {
3150
+ return function(i3, s3) {
3151
+ t3(i3, s3, e3);
3152
+ };
3153
+ };
3154
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.OscLinkService = void 0;
3155
+ const n2 = i2(585);
3156
+ let a = t2.OscLinkService = class {
3157
+ constructor(e3) {
3158
+ this._bufferService = e3, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
3159
+ }
3160
+ registerLink(e3) {
3161
+ const t3 = this._bufferService.buffer;
3162
+ if (void 0 === e3.id) {
3163
+ const i4 = t3.addMarker(t3.ybase + t3.y), s4 = { data: e3, id: this._nextId++, lines: [i4] };
3164
+ return i4.onDispose(() => this._removeMarkerFromLink(s4, i4)), this._dataByLinkId.set(s4.id, s4), s4.id;
3165
+ }
3166
+ const i3 = e3, s3 = this._getEntryIdKey(i3), r3 = this._entriesWithId.get(s3);
3167
+ if (r3) return this.addLineToLink(r3.id, t3.ybase + t3.y), r3.id;
3168
+ const n3 = t3.addMarker(t3.ybase + t3.y), a2 = { id: this._nextId++, key: this._getEntryIdKey(i3), data: i3, lines: [n3] };
3169
+ return n3.onDispose(() => this._removeMarkerFromLink(a2, n3)), this._entriesWithId.set(a2.key, a2), this._dataByLinkId.set(a2.id, a2), a2.id;
3170
+ }
3171
+ addLineToLink(e3, t3) {
3172
+ const i3 = this._dataByLinkId.get(e3);
3173
+ if (i3 && i3.lines.every((e4) => e4.line !== t3)) {
3174
+ const e4 = this._bufferService.buffer.addMarker(t3);
3175
+ i3.lines.push(e4), e4.onDispose(() => this._removeMarkerFromLink(i3, e4));
3176
+ }
3177
+ }
3178
+ getLinkData(e3) {
3179
+ return this._dataByLinkId.get(e3)?.data;
3180
+ }
3181
+ _getEntryIdKey(e3) {
3182
+ return `${e3.id};;${e3.uri}`;
3183
+ }
3184
+ _removeMarkerFromLink(e3, t3) {
3185
+ const i3 = e3.lines.indexOf(t3);
3186
+ -1 !== i3 && (e3.lines.splice(i3, 1), 0 === e3.lines.length && (void 0 !== e3.data.id && this._entriesWithId.delete(e3.key), this._dataByLinkId.delete(e3.id)));
3187
+ }
3188
+ };
3189
+ t2.OscLinkService = a = s2([r2(0, n2.IBufferService)], a);
3190
+ }, 343: (e2, t2) => {
3191
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.createDecorator = t2.getServiceDependencies = t2.serviceRegistry = void 0;
3192
+ const i2 = "di$target", s2 = "di$dependencies";
3193
+ t2.serviceRegistry = /* @__PURE__ */ new Map(), t2.getServiceDependencies = function(e3) {
3194
+ return e3[s2] || [];
3195
+ }, t2.createDecorator = function(e3) {
3196
+ if (t2.serviceRegistry.has(e3)) return t2.serviceRegistry.get(e3);
3197
+ const r2 = /* @__PURE__ */ __name(function(e4, t3, n2) {
3198
+ if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
3199
+ !function(e5, t4, r3) {
3200
+ t4[i2] === t4 ? t4[s2].push({ id: e5, index: r3 }) : (t4[s2] = [{ id: e5, index: r3 }], t4[i2] = t4);
3201
+ }(r2, e4, n2);
3202
+ }, "r");
3203
+ return r2.toString = () => e3, t2.serviceRegistry.set(e3, r2), r2;
3204
+ };
3205
+ }, 585: (e2, t2, i2) => {
3206
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.IDecorationService = t2.IUnicodeService = t2.IOscLinkService = t2.IOptionsService = t2.ILogService = t2.LogLevelEnum = t2.IInstantiationService = t2.ICharsetService = t2.ICoreService = t2.ICoreMouseService = t2.IBufferService = void 0;
3207
+ const s2 = i2(343);
3208
+ var r2;
3209
+ t2.IBufferService = (0, s2.createDecorator)("BufferService"), t2.ICoreMouseService = (0, s2.createDecorator)("CoreMouseService"), t2.ICoreService = (0, s2.createDecorator)("CoreService"), t2.ICharsetService = (0, s2.createDecorator)("CharsetService"), t2.IInstantiationService = (0, s2.createDecorator)("InstantiationService"), function(e3) {
3210
+ e3[e3.TRACE = 0] = "TRACE", e3[e3.DEBUG = 1] = "DEBUG", e3[e3.INFO = 2] = "INFO", e3[e3.WARN = 3] = "WARN", e3[e3.ERROR = 4] = "ERROR", e3[e3.OFF = 5] = "OFF";
3211
+ }(r2 || (t2.LogLevelEnum = r2 = {})), t2.ILogService = (0, s2.createDecorator)("LogService"), t2.IOptionsService = (0, s2.createDecorator)("OptionsService"), t2.IOscLinkService = (0, s2.createDecorator)("OscLinkService"), t2.IUnicodeService = (0, s2.createDecorator)("UnicodeService"), t2.IDecorationService = (0, s2.createDecorator)("DecorationService");
3212
+ }, 480: (e2, t2, i2) => {
3213
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeService = void 0;
3214
+ const s2 = i2(460), r2 = i2(225);
3215
+ class n2 {
3216
+ static {
3217
+ __name(this, "n");
3218
+ }
3219
+ static extractShouldJoin(e3) {
3220
+ return 0 != (1 & e3);
3221
+ }
3222
+ static extractWidth(e3) {
3223
+ return e3 >> 1 & 3;
3224
+ }
3225
+ static extractCharKind(e3) {
3226
+ return e3 >> 3;
3227
+ }
3228
+ static createPropertyValue(e3, t3, i3 = false) {
3229
+ return (16777215 & e3) << 3 | (3 & t3) << 1 | (i3 ? 1 : 0);
3230
+ }
3231
+ constructor() {
3232
+ this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new s2.EventEmitter(), this.onChange = this._onChange.event;
3233
+ const e3 = new r2.UnicodeV6();
3234
+ this.register(e3), this._active = e3.version, this._activeProvider = e3;
3235
+ }
3236
+ dispose() {
3237
+ this._onChange.dispose();
3238
+ }
3239
+ get versions() {
3240
+ return Object.keys(this._providers);
3241
+ }
3242
+ get activeVersion() {
3243
+ return this._active;
3244
+ }
3245
+ set activeVersion(e3) {
3246
+ if (!this._providers[e3]) throw new Error(`unknown Unicode version "${e3}"`);
3247
+ this._active = e3, this._activeProvider = this._providers[e3], this._onChange.fire(e3);
3248
+ }
3249
+ register(e3) {
3250
+ this._providers[e3.version] = e3;
3251
+ }
3252
+ wcwidth(e3) {
3253
+ return this._activeProvider.wcwidth(e3);
3254
+ }
3255
+ getStringCellWidth(e3) {
3256
+ let t3 = 0, i3 = 0;
3257
+ const s3 = e3.length;
3258
+ for (let r3 = 0; r3 < s3; ++r3) {
3259
+ let a = e3.charCodeAt(r3);
3260
+ if (55296 <= a && a <= 56319) {
3261
+ if (++r3 >= s3) return t3 + this.wcwidth(a);
3262
+ const i4 = e3.charCodeAt(r3);
3263
+ 56320 <= i4 && i4 <= 57343 ? a = 1024 * (a - 55296) + i4 - 56320 + 65536 : t3 += this.wcwidth(i4);
3264
+ }
3265
+ const o = this.charProperties(a, i3);
3266
+ let h = n2.extractWidth(o);
3267
+ n2.extractShouldJoin(o) && (h -= n2.extractWidth(i3)), t3 += h, i3 = o;
3268
+ }
3269
+ return t3;
3270
+ }
3271
+ charProperties(e3, t3) {
3272
+ return this._activeProvider.charProperties(e3, t3);
3273
+ }
3274
+ }
3275
+ t2.UnicodeService = n2;
3276
+ }, 781: (e2, t2, i2) => {
3277
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Terminal = void 0;
3278
+ const s2 = i2(437), r2 = i2(969), n2 = i2(460);
3279
+ class a extends r2.CoreTerminal {
3280
+ static {
3281
+ __name(this, "a");
3282
+ }
3283
+ constructor(e3 = {}) {
3284
+ super(e3), this._onBell = this.register(new n2.EventEmitter()), this.onBell = this._onBell.event, this._onCursorMove = this.register(new n2.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onTitleChange = this.register(new n2.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onA11yCharEmitter = this.register(new n2.EventEmitter()), this.onA11yChar = this._onA11yCharEmitter.event, this._onA11yTabEmitter = this.register(new n2.EventEmitter()), this.onA11yTab = this._onA11yTabEmitter.event, this._setup(), this.register(this._inputHandler.onRequestBell(() => this.bell())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register((0, n2.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, n2.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, n2.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, n2.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter));
3285
+ }
3286
+ get buffer() {
3287
+ return this.buffers.active;
3288
+ }
3289
+ get markers() {
3290
+ return this.buffer.markers;
3291
+ }
3292
+ addMarker(e3) {
3293
+ if (this.buffer === this.buffers.normal) return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + e3);
3294
+ }
3295
+ bell() {
3296
+ this._onBell.fire();
3297
+ }
3298
+ input(e3, t3 = true) {
3299
+ this.coreService.triggerDataEvent(e3, t3);
3300
+ }
3301
+ resize(e3, t3) {
3302
+ e3 === this.cols && t3 === this.rows || super.resize(e3, t3);
3303
+ }
3304
+ clear() {
3305
+ if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
3306
+ this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
3307
+ for (let e3 = 1; e3 < this.rows; e3++) this.buffer.lines.push(this.buffer.getBlankLine(s2.DEFAULT_ATTR_DATA));
3308
+ this._onScroll.fire({ position: this.buffer.ydisp, source: 0 });
3309
+ }
3310
+ }
3311
+ reset() {
3312
+ this.options.rows = this.rows, this.options.cols = this.cols, this._setup(), super.reset();
3313
+ }
3314
+ }
3315
+ t2.Terminal = a;
3316
+ } }, t = {};
3317
+ function i(s2) {
3318
+ var r2 = t[s2];
3319
+ if (void 0 !== r2) return r2.exports;
3320
+ var n2 = t[s2] = { exports: {} };
3321
+ return e[s2].call(n2.exports, n2, n2.exports, i), n2.exports;
3322
+ }
3323
+ __name(i, "i");
3324
+ var s = {};
3325
+ (() => {
3326
+ var e2 = s;
3327
+ Object.defineProperty(e2, "__esModule", { value: true }), e2.Terminal = void 0;
3328
+ const t2 = i(285), r2 = i(975), n2 = i(90), a = i(781), o = i(741), h = i(844), c = ["cols", "rows"];
3329
+ class l extends h.Disposable {
3330
+ static {
3331
+ __name(this, "l");
3332
+ }
3333
+ constructor(e3) {
3334
+ super(), this._core = this.register(new a.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = { ...this._core.options };
3335
+ const t3 = /* @__PURE__ */ __name((e4) => this._core.options[e4], "t"), i2 = /* @__PURE__ */ __name((e4, t4) => {
3336
+ this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
3337
+ }, "i");
3338
+ for (const e4 in this._core.options) {
3339
+ Object.defineProperty(this._publicOptions, e4, { get: /* @__PURE__ */ __name(() => this._core.options[e4], "get"), set: /* @__PURE__ */ __name((t4) => {
3340
+ this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
3341
+ }, "set") });
3342
+ const s2 = { get: t3.bind(this, e4), set: i2.bind(this, e4) };
3343
+ Object.defineProperty(this._publicOptions, e4, s2);
3344
+ }
3345
+ }
3346
+ _checkReadonlyOptions(e3) {
3347
+ if (c.includes(e3)) throw new Error(`Option "${e3}" can only be set in the constructor`);
3348
+ }
3349
+ _checkProposedApi() {
3350
+ if (!this._core.optionsService.options.allowProposedApi) throw new Error("You must set the allowProposedApi option to true to use proposed API");
3351
+ }
3352
+ get onBell() {
3353
+ return this._core.onBell;
3354
+ }
3355
+ get onBinary() {
3356
+ return this._core.onBinary;
3357
+ }
3358
+ get onCursorMove() {
3359
+ return this._core.onCursorMove;
3360
+ }
3361
+ get onData() {
3362
+ return this._core.onData;
3363
+ }
3364
+ get onLineFeed() {
3365
+ return this._core.onLineFeed;
3366
+ }
3367
+ get onResize() {
3368
+ return this._core.onResize;
3369
+ }
3370
+ get onScroll() {
3371
+ return this._core.onScroll;
3372
+ }
3373
+ get onTitleChange() {
3374
+ return this._core.onTitleChange;
3375
+ }
3376
+ get parser() {
3377
+ return this._checkProposedApi(), this._parser || (this._parser = new r2.ParserApi(this._core)), this._parser;
3378
+ }
3379
+ get unicode() {
3380
+ return this._checkProposedApi(), new n2.UnicodeApi(this._core);
3381
+ }
3382
+ get rows() {
3383
+ return this._core.rows;
3384
+ }
3385
+ get cols() {
3386
+ return this._core.cols;
3387
+ }
3388
+ get buffer() {
3389
+ return this._checkProposedApi(), this._buffer || (this._buffer = this.register(new t2.BufferNamespaceApi(this._core))), this._buffer;
3390
+ }
3391
+ get markers() {
3392
+ return this._checkProposedApi(), this._core.markers;
3393
+ }
3394
+ get modes() {
3395
+ const e3 = this._core.coreService.decPrivateModes;
3396
+ let t3 = "none";
3397
+ switch (this._core.coreMouseService.activeProtocol) {
3398
+ case "X10":
3399
+ t3 = "x10";
3400
+ break;
3401
+ case "VT200":
3402
+ t3 = "vt200";
3403
+ break;
3404
+ case "DRAG":
3405
+ t3 = "drag";
3406
+ break;
3407
+ case "ANY":
3408
+ t3 = "any";
3409
+ }
3410
+ return { applicationCursorKeysMode: e3.applicationCursorKeys, applicationKeypadMode: e3.applicationKeypad, bracketedPasteMode: e3.bracketedPasteMode, insertMode: this._core.coreService.modes.insertMode, mouseTrackingMode: t3, originMode: e3.origin, reverseWraparoundMode: e3.reverseWraparound, sendFocusMode: e3.sendFocus, wraparoundMode: e3.wraparound };
3411
+ }
3412
+ get options() {
3413
+ return this._publicOptions;
3414
+ }
3415
+ set options(e3) {
3416
+ for (const t3 in e3) this._publicOptions[t3] = e3[t3];
3417
+ }
3418
+ input(e3, t3 = true) {
3419
+ this._core.input(e3, t3);
3420
+ }
3421
+ resize(e3, t3) {
3422
+ this._verifyIntegers(e3, t3), this._core.resize(e3, t3);
3423
+ }
3424
+ registerMarker(e3 = 0) {
3425
+ return this._checkProposedApi(), this._verifyIntegers(e3), this._core.addMarker(e3);
3426
+ }
3427
+ addMarker(e3) {
3428
+ return this.registerMarker(e3);
3429
+ }
3430
+ dispose() {
3431
+ super.dispose();
3432
+ }
3433
+ scrollLines(e3) {
3434
+ this._verifyIntegers(e3), this._core.scrollLines(e3);
3435
+ }
3436
+ scrollPages(e3) {
3437
+ this._verifyIntegers(e3), this._core.scrollPages(e3);
3438
+ }
3439
+ scrollToTop() {
3440
+ this._core.scrollToTop();
3441
+ }
3442
+ scrollToBottom() {
3443
+ this._core.scrollToBottom();
3444
+ }
3445
+ scrollToLine(e3) {
3446
+ this._verifyIntegers(e3), this._core.scrollToLine(e3);
3447
+ }
3448
+ clear() {
3449
+ this._core.clear();
3450
+ }
3451
+ write(e3, t3) {
3452
+ this._core.write(e3, t3);
3453
+ }
3454
+ writeln(e3, t3) {
3455
+ this._core.write(e3), this._core.write("\r\n", t3);
3456
+ }
3457
+ reset() {
3458
+ this._core.reset();
3459
+ }
3460
+ loadAddon(e3) {
3461
+ this._addonManager.loadAddon(this, e3);
3462
+ }
3463
+ _verifyIntegers(...e3) {
3464
+ for (const t3 of e3) if (t3 === 1 / 0 || isNaN(t3) || t3 % 1 != 0) throw new Error("This API only accepts integers");
3465
+ }
3466
+ }
3467
+ e2.Terminal = l;
3468
+ })();
3469
+ var r = exports;
3470
+ for (var n in s) r[n] = s[n];
3471
+ s.__esModule && Object.defineProperty(r, "__esModule", { value: true });
3472
+ })();
3473
+ }
3474
+ });
3475
+ export default require_xterm_headless();