@abtnode/blocklet-services 1.16.33-beta-20241011-054050-798b5f46 → 1.16.33-beta-20241014-122831-e6000fb8

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 (201) hide show
  1. package/api/index.js +25 -1
  2. package/api/libs/connect/session.js +8 -9
  3. package/api/routes/env.js +1 -1
  4. package/dist/assets/{Add-CjHtOOsW.js → Add-BJTt1kMd.js} +1 -1
  5. package/dist/assets/{Alert-C1AWoXzB.js → Alert-BteoTFtG.js} +1 -1
  6. package/dist/assets/{ArrowDropDown-5QQoKnLR.js → ArrowDropDown-ZRFTvvxb.js} +1 -1
  7. package/dist/assets/{Avatar-DD_manng.js → Avatar-CSR_wVns.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Dslh4PgR.js → ButtonGroup-Ct_nK4NB.js} +1 -1
  9. package/dist/assets/{CheckCircle-D3la5wZJ.js → CheckCircle-HJjJffHP.js} +1 -1
  10. package/dist/assets/{ChevronLeft-CAbyk7Rn.js → ChevronLeft-DxSg89IP.js} +1 -1
  11. package/dist/assets/{ChevronRight-cHt6B2E_.js → ChevronRight-CM8FbE-F.js} +1 -1
  12. package/dist/assets/{Close-C9Al2sHH.js → Close-2YBZKk5C.js} +1 -1
  13. package/dist/assets/{CloseOutlined-vttxnPOn.js → CloseOutlined-CWTygaxG.js} +1 -1
  14. package/dist/assets/{Delete-DmUC02xh.js → Delete-CfrDr5ng.js} +1 -1
  15. package/dist/assets/{DeleteOutline-Dm_Nsq2F.js → DeleteOutline-BJKAWmBh.js} +1 -1
  16. package/dist/assets/{DialogContentText-Dd6Llavm.js → DialogContentText-DFstBMvJ.js} +1 -1
  17. package/dist/assets/{Done-DNj6bTeJ.js → Done-kYmL-w5Q.js} +1 -1
  18. package/dist/assets/{Download-Ce--U_BZ.js → Download-3i_H1QDL.js} +1 -1
  19. package/dist/assets/{Edit-BJPRqjE_.js → Edit-Byp7cAsU.js} +1 -1
  20. package/dist/assets/{EditIcon-BlL4geyW.js → EditIcon-CCkC5Xqt.js} +1 -1
  21. package/dist/assets/{Error-B3NgNRCx.js → Error-9xJSphOV.js} +1 -1
  22. package/dist/assets/{ExpandMore-DkLjJq9w.js → ExpandMore-DEkGngK0.js} +1 -1
  23. package/dist/assets/{FormControl-CBM31tVk.js → FormControl-B60-pCHh.js} +1 -1
  24. package/dist/assets/{FormControlLabel-Bid6aLDa.js → FormControlLabel-Bluo2zmp.js} +1 -1
  25. package/dist/assets/{FormGroup-CQ2r3LPd.js → FormGroup-DsI9QnWh.js} +1 -1
  26. package/dist/assets/{Google-BDEjIi3K.js → Google-Dxit-RJH.js} +1 -1
  27. package/dist/assets/{Grid-CosTfC_n.js → Grid-CNMlkE7r.js} +1 -1
  28. package/dist/assets/{Hidden-CbT0Nsko.js → Hidden-CDKfZsy3.js} +1 -1
  29. package/dist/assets/{InfoOutlined-B9EO-P9G.js → InfoOutlined-D15IdpTB.js} +1 -1
  30. package/dist/assets/{InputAdornment-CyPi6QAH.js → InputAdornment-D1s-TGB2.js} +1 -1
  31. package/dist/assets/{InputLabel-D4nkCqtD.js → InputLabel-Ou7BDwPq.js} +1 -1
  32. package/dist/assets/{LastPage-D5sEb42F.js → LastPage-3hVq4DnQ.js} +1 -1
  33. package/dist/assets/{Launch-KX5AwGaZ.js → Launch-hsZiLuPF.js} +1 -1
  34. package/dist/assets/{LaunchOutlined-CaL34FcQ.js → LaunchOutlined-CIPUHJYA.js} +1 -1
  35. package/dist/assets/{Link-C4c-c9oW.js → Link-CZ52DbXN.js} +1 -1
  36. package/dist/assets/{ListItemText-SZUZM8zJ.js → ListItemText-7iGJk7-i.js} +1 -1
  37. package/dist/assets/{LoadingButton-BHAAzaqd.js → LoadingButton-BWhIg3J5.js} +1 -1
  38. package/dist/assets/{LockIcon-D_fJE15j.js → LockIcon-D-dObf1I.js} +1 -1
  39. package/dist/assets/{Loop-CGMlnuX2.js → Loop-BZOn9fYq.js} +1 -1
  40. package/dist/assets/{Menu-C6gTV_C5.js → Menu-DSnQZg3F.js} +1 -1
  41. package/dist/assets/{MoreHoriz-91XyooIB.js → MoreHoriz-YKIrf1Wy.js} +1 -1
  42. package/dist/assets/{MoreVert-Dm5VmAN3.js → MoreVert-DHjA3d3K.js} +1 -1
  43. package/dist/assets/{OpenInNew-FWEY5jmN.js → OpenInNew-CI-gm1PI.js} +1 -1
  44. package/dist/assets/{Pagination-CrML4K_7.js → Pagination-C4NMVHZ6.js} +1 -1
  45. package/dist/assets/{PlayArrow-DDVBKikc.js → PlayArrow-Daa-8Tr0.js} +1 -1
  46. package/dist/assets/{QuestionMarkCircle-N_nyomRU.js → QuestionMarkCircle-C8hdkmtm.js} +1 -1
  47. package/dist/assets/{RadioGroup-DQS4l9Qs.js → RadioGroup-DwfAoVB4.js} +1 -1
  48. package/dist/assets/{Search-kaa4IwGB.js → Search-Bn8StOmd.js} +1 -1
  49. package/dist/assets/{Select-3MFmfiU2.js → Select-Djzas9fr.js} +2 -2
  50. package/dist/assets/{ServerLogo-BDPxuR0z.js → ServerLogo-DI-e9hMR.js} +1 -1
  51. package/dist/assets/{Skeleton-DghEtvL_.js → Skeleton-_Fn46ryV.js} +1 -1
  52. package/dist/assets/{Slider-DHap0Syp.js → Slider-BF_Z955S.js} +1 -1
  53. package/dist/assets/{Stack-DOuPfp9P.js → Stack-Bj4-8Xdh.js} +1 -1
  54. package/dist/assets/{Stepper-CEgSJjc5.js → Stepper-eH1_64jM.js} +1 -1
  55. package/dist/assets/{TextField-DFiFTqqd.js → TextField-5Z401EeH.js} +1 -1
  56. package/dist/assets/{Toolbar-Ch5_bErb.js → Toolbar-BaL7nrmh.js} +1 -1
  57. package/dist/assets/{ViewColumn-UerMI3fe.js → ViewColumn-DKpDa9q-.js} +1 -1
  58. package/dist/assets/{ViewList-JPiij74q.js → ViewList-GpC5PoCA.js} +1 -1
  59. package/dist/assets/{access-control-EjYGet_v.js → access-control-C6O5R0mf.js} +1 -1
  60. package/dist/assets/{actions-GskZx_ox.js → actions-Q879Pkne.js} +1 -1
  61. package/dist/assets/{add-component-core-C4W9lOMx.js → add-component-core-CG_HtNm5.js} +55 -55
  62. package/dist/assets/add-resource-JyZLI5Lv.js +1 -0
  63. package/dist/assets/{addon-BPs0htdJ.js → addon-BRVDzo3o.js} +1 -1
  64. package/dist/assets/{analytics-BGp8lvxJ.js → analytics-73N71qjk.js} +1 -1
  65. package/dist/assets/api-CwFLZZbF.js +1 -0
  66. package/dist/assets/{audit-logs-Cnci_r2o.js → audit-logs-puLYB2Eu.js} +1 -1
  67. package/dist/assets/base32-BLifBexi.js +1 -0
  68. package/dist/assets/{bundle-avatar-BuAV52Lr.js → bundle-avatar-DAWVEEnX.js} +1 -1
  69. package/dist/assets/{button-CdCaehQs.js → button-DCt8pvLU.js} +1 -1
  70. package/dist/assets/{click-to-copy-JKdxz45I.js → click-to-copy-BAgLXNYj.js} +1 -1
  71. package/dist/assets/{complete-lZpRAcrs.js → complete-CaqN1wDT.js} +2 -2
  72. package/dist/assets/{component-C0raFocJ.js → component-CgWtMuIX.js} +7 -7
  73. package/dist/assets/{config-BS0f8E6U.js → config-Bmvi5Dgu.js} +1 -1
  74. package/dist/assets/{config-CYMR43Uh.js → config-D0JIeiwj.js} +1 -1
  75. package/dist/assets/{config-navigation-DC5Unmga.js → config-navigation-YaYHtCvs.js} +1 -1
  76. package/dist/assets/confirm-BwEOtmhD.js +7 -0
  77. package/dist/assets/{connect-DNaSl255.js → connect-Dkgw0kOW.js} +1 -1
  78. package/dist/assets/{connect-CDiZvdtC.js → connect-DozpURrA.js} +1 -1
  79. package/dist/assets/{connect-to-D2CuNe81.js → connect-to-C-bgHPhl.js} +1 -1
  80. package/dist/assets/{content-layout-CANmEWo5.js → content-layout-D3ADfzfh.js} +1 -1
  81. package/dist/assets/{dashboard-H4MvXtMx.js → dashboard-DlMIs9-3.js} +3 -3
  82. package/dist/assets/{deprecate-CiQ3rCd1.js → deprecate-CoPtGyVZ.js} +1 -1
  83. package/dist/assets/{did-address-BnBtx4o3.js → did-address-DBf1riah.js} +1 -1
  84. package/dist/assets/domain-BRMsf-pW.js +9 -0
  85. package/dist/assets/domain-list-BZrfjdSX.js +15 -0
  86. package/dist/assets/{email-DyV-6FVc.js → email-VBqJZRKh.js} +3 -3
  87. package/dist/assets/emotion-cache.browser.esm-BlrvwZdS.js +1 -0
  88. package/dist/assets/{exchange-passport-Z_HeEHaC.js → exchange-passport-B5Oos4u1.js} +1 -1
  89. package/dist/assets/{fallback-BiNvsiaq.js → fallback-DZ0HiAyE.js} +1 -1
  90. package/dist/assets/{format-error-CFOsq4HX.js → format-error-CWBrNztU.js} +1 -1
  91. package/dist/assets/{fuel-yExjWSAI.js → fuel-BKQZySp3.js} +1 -1
  92. package/dist/assets/{fullpage-BBGvbVDW.js → fullpage-6nDK23_-.js} +1 -1
  93. package/dist/assets/{home-BRqwH5Nf.js → home-DLCLG-oW.js} +1 -1
  94. package/dist/assets/{iframe-DGAKfP0s.js → iframe-DNIQ3m8W.js} +1 -1
  95. package/dist/assets/{index-XgsqmBi5.js → index-B-dldycO.js} +2 -2
  96. package/dist/assets/{index-ljMFxTRJ.js → index-B5n-3ODS.js} +1 -1
  97. package/dist/assets/{index-CjmnCSHR.js → index-BAAuF9c0.js} +1 -1
  98. package/dist/assets/{index-Bwpc9lYR.js → index-BBCh-jGI.js} +4 -4
  99. package/dist/assets/{index-BF2VCknl.js → index-BOHZnM-f.js} +1 -1
  100. package/dist/assets/{index-CGMrZbj4.js → index-Bh0cHqWf.js} +1 -1
  101. package/dist/assets/{index-Pa_povbs.js → index-C2Oj8_Vp.js} +1 -1
  102. package/dist/assets/{index-DRy-NjFK.js → index-C9CaaXcC.js} +4 -4
  103. package/dist/assets/{index-AxsaK0fs.js → index-CEJ9f9RI.js} +1 -1
  104. package/dist/assets/{index-Cd-oyWSF.js → index-Ci4yVq3f.js} +1 -1
  105. package/dist/assets/{index-D09vFr6D.js → index-CmX29Bgi.js} +1 -1
  106. package/dist/assets/{index-D1cdkATF.js → index-CoMUsX4P.js} +1 -1
  107. package/dist/assets/{index-DMTI-fNK.js → index-CpVWvA1p.js} +1 -1
  108. package/dist/assets/{index-CpiJ7s5C.js → index-CuQ1TF8_.js} +1 -1
  109. package/dist/assets/{index-DdSurbTD.js → index-CxCjOkMI.js} +1 -1
  110. package/dist/assets/{index-DuBaIIFS.js → index-D0YyoivA.js} +1 -1
  111. package/dist/assets/{index--duswiri.js → index-DXCVFJye.js} +1 -1
  112. package/dist/assets/{index-CE8crdfZ.js → index-Dc12GNV6.js} +1 -1
  113. package/dist/assets/{index-CuFxdccR.js → index-DdX2_Z-V.js} +3 -3
  114. package/dist/assets/{index-B2buyTYt.js → index-Dfexb5ST.js} +1 -1
  115. package/dist/assets/{index-oadE3d-r.js → index-DhCJxv9H.js} +1 -1
  116. package/dist/assets/{index-Brct1h9T.js → index-DjThaPGX.js} +1 -1
  117. package/dist/assets/{index-BgbKLD3V.js → index-DmMbCKT9.js} +13 -13
  118. package/dist/assets/{index-DuPJDRpB.js → index-Dv2lov1Q.js} +1 -1
  119. package/dist/assets/{index-DPP6VPXO.js → index-DyJa5tHD.js} +1 -1
  120. package/dist/assets/{index-B7RmJs-M.js → index-J1nJUC6w.js} +1 -1
  121. package/dist/assets/{index-BzI1fpMA.js → index-Q8Ks2tIO.js} +1 -1
  122. package/dist/assets/{index-BCrKZebO.js → index-dRhRTsQa.js} +1 -1
  123. package/dist/assets/{index-fgn9vwq8.js → index-dffxGns1.js} +85 -85
  124. package/dist/assets/{index-CM4OpCGB.js → index-ffVCrZUo.js} +1 -1
  125. package/dist/assets/{index-BjRErSmf.js → index-honENBw_.js} +1 -1
  126. package/dist/assets/{index-DrKbE9ju.js → index-lfUisoFe.js} +1 -1
  127. package/dist/assets/{index-Bv3OaukA.js → index-lt9fyfgM.js} +1 -1
  128. package/dist/assets/{index.es-BAn09M1Y.js → index.es-rdKQq6rd.js} +3 -3
  129. package/dist/assets/{index.esm-B3pQyY3d.js → index.esm-CDLGF2Ok.js} +1 -1
  130. package/dist/assets/{invitation-X778y-7j.js → invitation-CBE8ayy2.js} +1 -1
  131. package/dist/assets/{invite-DW0gtypP.js → invite-DNxG5QuO.js} +1 -1
  132. package/dist/assets/{issue-passport-eUut_p6V.js → issue-passport-DVDraA8b.js} +1 -1
  133. package/dist/assets/{item-jVTYzTUh.js → item-B8ylzOyP.js} +1 -1
  134. package/dist/assets/{jss-plugin-props-sort.esm-BEeq9OWC.js → jss-plugin-props-sort.esm-DEXIj4QJ.js} +1 -1
  135. package/dist/assets/{launch-result-message-abpetv4C.js → launch-result-message-vOpiexOg.js} +1 -1
  136. package/dist/assets/{layout-CEo-nvMH.js → layout-DA_DkjrU.js} +1 -1
  137. package/dist/assets/{list-header-B0DU7iJ8.js → list-header-QKzq_2ym.js} +1 -1
  138. package/dist/assets/localization-CQeVg11p.js +1 -0
  139. package/dist/assets/{log-zgah1FFi.js → log-1cv4Nqfa.js} +9 -10
  140. package/dist/assets/{login-oauth-callback-Dm5-WEz0.js → login-oauth-callback-B7aUPsz7.js} +1 -1
  141. package/dist/assets/{login-BZkTkP-9.js → login-t064HeQt.js} +1 -1
  142. package/dist/assets/{logo-uploader-BtaIWDgJ.js → logo-uploader-VgurHgdV.js} +3 -3
  143. package/dist/assets/{lost-passport-B8wdBerz.js → lost-passport-D6flI-5R.js} +3 -3
  144. package/dist/assets/{lottie-CzdjuVhm.js → lottie-I_rH23zu.js} +1 -1
  145. package/dist/assets/{notifications-D0GXE82s.js → notifications-B6xLuzv9.js} +1 -1
  146. package/dist/assets/{open-window-C-80E_lx.js → open-window-rIdL53L3.js} +1 -1
  147. package/dist/assets/overview-DxvmGAnq.js +12 -0
  148. package/dist/assets/{page-header-CxkULuMr.js → page-header-C4ksffkd.js} +1 -1
  149. package/dist/assets/{permission-BbWaMmK6.js → permission-wKa_U1CI.js} +1 -1
  150. package/dist/assets/{preferences-W2NveEKa.js → preferences-DuMJNXnz.js} +1 -1
  151. package/dist/assets/publish-resource-0gS10xJs.js +1 -0
  152. package/dist/assets/{react-BfXkambL.js → react-B05mWmeW.js} +3 -3
  153. package/dist/assets/{redux-Bj5HJmsh.js → redux-DfuR4m7C.js} +1 -1
  154. package/dist/assets/{resource-dialog-B74wCZrY.js → resource-dialog-Diy0jeEC.js} +1 -1
  155. package/dist/assets/sdk-CDIje09E.js +1 -0
  156. package/dist/assets/{selector-CuYNfwOx.js → selector-46StcO3H.js} +1 -1
  157. package/dist/assets/session-D5nyg1yy.js +1 -0
  158. package/dist/assets/setup-8cMqYLJw.js +19 -0
  159. package/dist/assets/{shorten-label-DXOCGUmG.js → shorten-label-BgvIg6s3.js} +1 -1
  160. package/dist/assets/{slicedToArray-C0WlFNXN.js → slicedToArray-YsdZC5SZ.js} +2 -2
  161. package/dist/assets/{spaces-C30MN-fS.js → spaces-D3oDzkgq.js} +1 -1
  162. package/dist/assets/{start-BrD7qtd7.js → start-CO4thlbA.js} +1 -1
  163. package/dist/assets/{step-actions-pilBvcqr.js → step-actions-DClVmsb6.js} +1 -1
  164. package/dist/assets/{studio-B_REa37-.js → studio-CSSHBcHf.js} +1 -1
  165. package/dist/assets/{switch-control-BxJO_e5C.js → switch-control-CSffO3YM.js} +1 -1
  166. package/dist/assets/{toUpper-DduZg1wT.js → toUpper-B8JrOhOn.js} +1 -1
  167. package/dist/assets/{transfer-BrT_GwZC.js → transfer-BNl3sweY.js} +1 -1
  168. package/dist/assets/{trim-BAyy5nHT.js → trim-iOszuV5t.js} +1 -1
  169. package/dist/assets/{uniqBy-dnuDvtYO.js → uniqBy-lALGeXcn.js} +1 -1
  170. package/dist/assets/{unsubscribe-UP3-zTl3.js → unsubscribe-B0Fo_VJh.js} +1 -1
  171. package/dist/assets/{url-join-FMV_JPfK.js → url-join-BqiDhuv9.js} +1 -1
  172. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-D7ja6RMG.js → use-blocklet-info-for-connect-did-spaces-tjiuk9k8.js} +1 -1
  173. package/dist/assets/{use-mobile-2Gfazu03.js → use-mobile-DM1Tj10j.js} +1 -1
  174. package/dist/assets/{useAsync-Bb8Vv9_h.js → useAsync-DoYCbZEG.js} +1 -1
  175. package/dist/assets/{useFormControl-CGJ6_pv6.js → useFormControl-tCmd2QIL.js} +1 -1
  176. package/dist/assets/{useLocalStorage-Dh2Sw2wx.js → useLocalStorage-BDGPbN_I.js} +1 -1
  177. package/dist/assets/{useSetState-DIdqG-wZ.js → useSetState-ChDKLQb-.js} +1 -1
  178. package/dist/assets/{useSlot-Suwkr6Il.js → useSlot-Hwx0G2AC.js} +1 -1
  179. package/dist/assets/{useSlotProps-Do3AixJL.js → useSlotProps-ClBKOVWk.js} +1 -1
  180. package/dist/assets/useThemeProps-C7VhBkC8.js +1 -0
  181. package/dist/assets/{user-center-D6fHk_Q6.js → user-center-Cv6HUKmm.js} +1 -1
  182. package/dist/assets/{user-sessions-3hW7A5O1.js → user-sessions-D1QtptvG.js} +1 -1
  183. package/dist/assets/{util-B4YWdsL1.js → util-DkfUxkyg.js} +1 -1
  184. package/dist/assets/{wrap-locale-Bx_1JQDo.js → wrap-locale-5MOyASYg.js} +1 -1
  185. package/dist/assets/{zh-tEPjXU3b.js → zh-AGc49itB.js} +1 -1
  186. package/dist/index.html +1 -1
  187. package/dist/service-worker.js +1 -1
  188. package/package.json +27 -26
  189. package/dist/assets/add-resource-HMG5CdPm.js +0 -1
  190. package/dist/assets/api-CTJQFV8E.js +0 -1
  191. package/dist/assets/confirm-DQ3CFWMW.js +0 -7
  192. package/dist/assets/domain-DWy85KB9.js +0 -9
  193. package/dist/assets/domain-list-DN84Sise.js +0 -15
  194. package/dist/assets/emotion-cache.browser.esm-BNDDTfYL.js +0 -1
  195. package/dist/assets/localization-taL-ipRT.js +0 -1
  196. package/dist/assets/overview-CwLJAe7-.js +0 -12
  197. package/dist/assets/publish-resource-DMHR6AkZ.js +0 -1
  198. package/dist/assets/sdk-DmxPo3pC.js +0 -1
  199. package/dist/assets/session-DAMa63sM.js +0 -1
  200. package/dist/assets/setup-CkAqZcwR.js +0 -19
  201. package/dist/assets/useThemeProps-Dc-5SZKE.js +0 -1
@@ -1,18 +1,17 @@
1
- import{r as xe,cn as qr,gw as Nr,gx as zr,j as re,gy as Kr,aP as Mr,$ as Gr,b as Vr,P as be,Z as Or,cm as Yr,b7 as Zr,u as Xr,B as Ke,a1 as Er,n as kr,au as Jr,aT as Dr,bg as $r,t as Qr}from"./index-fgn9vwq8.js";import{_ as ei}from"./useLocalStorage-Dh2Sw2wx.js";import{B as ti}from"./ButtonGroup-Dslh4PgR.js";import{d as ri}from"./Download-Ce--U_BZ.js";import{F as Tr}from"./FormControl-CBM31tVk.js";import{S as Br}from"./Select-3MFmfiU2.js";import"./useFormControl-CGJ6_pv6.js";var pr={},Pr={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(self,function(){return(()=>{var X={4567:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var _=m(9042),f=m(6114),b=m(9924),v=m(3656),s=m(844),a=m(5596),p=m(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,0)},n._bottomBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new b.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(c){return n._onResize(c.rows)})),n.register(n._terminal.onRender(function(c){return n._refreshRows(c.start,c.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(c){return n._onChar(c)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
1
+ import{r as xe,cn as qr,gy as Nr,gz as zr,j as re,gA as Kr,aP as Mr,$ as Gr,b as Vr,P as be,Z as Or,cm as Yr,b7 as Zr,u as Xr,B as Ke,a1 as Er,n as kr,au as Jr,aT as Dr,bg as $r,t as Qr}from"./index-dffxGns1.js";import{_ as ei}from"./useLocalStorage-BDGPbN_I.js";import{B as ti}from"./ButtonGroup-Ct_nK4NB.js";import{d as ri}from"./Download-3i_H1QDL.js";import{F as Tr}from"./FormControl-B60-pCHh.js";import{S as Br}from"./Select-Djzas9fr.js";import"./useFormControl-tCmd2QIL.js";var pr={},Pr={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(self,function(){return(()=>{var X={4567:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var _=m(9042),f=m(6114),b=m(9924),v=m(3656),s=m(844),a=m(5596),p=m(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,0)},n._bottomBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new b.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(c){return n._onResize(c.rows)})),n.register(n._terminal.onRender(function(c){return n._refreshRows(c.start,c.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(c){return n._onChar(c)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
2
2
  `)})),n.register(n._terminal.onA11yTab(function(c){return n._onTab(c)})),n.register(n._terminal.onKey(function(c){return n._onKey(c.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new a.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return d(e,r),e.prototype.dispose=function(){r.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,i){var n=t.target,l=this._rowElements[i===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(i===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var c,y;if(i===0?(c=n,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(c=this._rowElements.shift(),y=n,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){var C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else C=this._createAccessibilityTreeNode(),this._rowElements.push(C),this._rowContainer.appendChild(C);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var i=0;i<t;i++)this._onChar(" ")},e.prototype._onChar=function(t){var i=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)),f.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){i._accessibilityTreeRoot.appendChild(i._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,f.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,i){this._renderRowsDebouncer.refresh(t,i,this._terminal.rows)},e.prototype._renderRows=function(t,i){for(var n=this._terminal.buffer,l=n.lines.length.toString(),c=t;c<=i;c++){var y=n.translateBufferLineToString(n.ydisp+c,!0),C=(n.ydisp+c+1).toString(),g=this._rowElements[c];g&&(y.length===0?g.innerText=" ":g.textContent=y,g.setAttribute("aria-posinset",C),g.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(s.Disposable);o.AccessibilityManager=h},3614:(P,o)=>{function m(f){return f.replace(/\r?\n/g,"\r")}function u(f,b){return b?"\x1B[200~"+f+"\x1B[201~":f}function d(f,b,v){f=u(f=m(f),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(f,!0),b.value=""}function _(f,b,v){var s=v.getBoundingClientRect(),a=f.clientX-s.left-10,p=f.clientY-s.top-10;b.style.width="20px",b.style.height="20px",b.style.left=a+"px",b.style.top=p+"px",b.style.zIndex="1000",b.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=m,o.bracketTextForPaste=u,o.copyHandler=function(f,b){f.clipboardData&&f.clipboardData.setData("text/plain",b.selectionText),f.preventDefault()},o.handlePasteEvent=function(f,b,v){f.stopPropagation(),f.clipboardData&&d(f.clipboardData.getData("text/plain"),b,v)},o.paste=d,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(f,b,v,s,a){_(f,b,v),a&&s.rightClickSelect(f),b.value=s.selectionText,b.select()}},7239:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var m=function(){function u(){this._color={},this._rgba={}}return u.prototype.clear=function(){this._color={},this._rgba={}},u.prototype.setCss=function(d,_,f){this._rgba[d]||(this._rgba[d]={}),this._rgba[d][_]=f},u.prototype.getCss=function(d,_){return this._rgba[d]?this._rgba[d][_]:void 0},u.prototype.setColor=function(d,_,f){this._color[d]||(this._color[d]={}),this._color[d][_]=f},u.prototype.getColor=function(d,_){return this._color[d]?this._color[d][_]:void 0},u}();o.ColorContrastCache=m},5680:function(P,o,m){var u=this&&this.__read||function(h,r){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,i,n=e.call(h),l=[];try{for(;(r===void 0||r-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(c){i={error:c}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return l};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var d=m(8055),_=m(7239),f=d.css.toColor("#ffffff"),b=d.css.toColor("#000000"),v=d.css.toColor("#ffffff"),s=d.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[d.css.toColor("#2e3436"),d.css.toColor("#cc0000"),d.css.toColor("#4e9a06"),d.css.toColor("#c4a000"),d.css.toColor("#3465a4"),d.css.toColor("#75507b"),d.css.toColor("#06989a"),d.css.toColor("#d3d7cf"),d.css.toColor("#555753"),d.css.toColor("#ef2929"),d.css.toColor("#8ae234"),d.css.toColor("#fce94f"),d.css.toColor("#729fcf"),d.css.toColor("#ad7fa8"),d.css.toColor("#34e2e2"),d.css.toColor("#eeeeec")],r=[0,95,135,175,215,255],e=0;e<216;e++){var t=r[e/36%6|0],i=r[e/6%6|0],n=r[e%6];h.push({css:d.channels.toCss(t,i,n),rgba:d.channels.toRgba(t,i,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:d.channels.toCss(l,l,l),rgba:d.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(r,e){this.allowTransparency=e;var t=r.createElement("canvas");t.width=1,t.height=1;var i=t.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new _.ColorContrastCache,this.colors={foreground:f,background:b,cursor:v,cursorAccent:s,selectionTransparent:a,selectionOpaque:d.color.blend(b,a),selectionForeground:void 0,ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(r){r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,f),this.colors.background=this._parseColor(r.background,b),this.colors.cursor=this._parseColor(r.cursor,v,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,s,!0),this.colors.selectionTransparent=this._parseColor(r.selection,a,!0),this.colors.selectionOpaque=d.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=r.selectionForeground?this._parseColor(r.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),d.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=d.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(r.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(r){if(r!==void 0)switch(r){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[r]=this._restoreColors.ansi[r]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(r,e,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+r+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=u(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),4),l=n[0],c=n[1],y=n[2],C=n[3],g=Math.round(255*C);return{rgba:d.channels.toRgba(l,c,y,g),css:r}}return{css:this._ctx.fillStyle,rgba:d.channels.toRgba(i[0],i[1],i[2],i[3])}},h}();o.ColorManager=p},9631:function(P,o){var m=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,_=d&&u[d],f=0;if(_)return _.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&f>=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var u,d,_,f=[],b=0;b<arguments.length;b++)f[b]=arguments[b];try{for(var v=m(f),s=v.next();!s.done;s=v.next()){var a=s.value;(_=a==null?void 0:a.parentElement)===null||_===void 0||_.removeChild(a)}}catch(p){u={error:p}}finally{try{s&&!s.done&&(d=v.return)&&d.call(v)}finally{if(u)throw u.error}}}},3656:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(m,u,d,_){m.addEventListener(u,d,_);var f=!1;return{dispose:function(){f||(f=!0,m.removeEventListener(u,d,_))}}}},3551:function(P,o,m){var u=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},d=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var _=m(8460),f=m(2585),b=function(){function s(a,p,h){this._bufferService=a,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new _.EventEmitter,this._onHideLinkUnderline=new _.EventEmitter,this._onLinkTooltip=new _.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(s.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),s.prototype.attachToDom=function(a,p){this._element=a,this._mouseZoneManager=p},s.prototype.linkifyRows=function(a,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=a,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,a),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(a,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},s._timeBeforeLatency))},s.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var a=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=a.ydisp+this._rowsToLinkify.start;if(!(p>=a.lines.length)){for(var h=a.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,r,r);e.hasNext();)for(var t=e.next(),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[i]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},s.prototype.registerLinkMatcher=function(a,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:a,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(r),r.id},s.prototype._addLinkMatcherToList=function(a){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(a.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,a);this._linkMatchers.splice(0,0,a)}else this._linkMatchers.push(a)},s.prototype.deregisterLinkMatcher=function(a){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===a)return this._linkMatchers.splice(p,1),!0;return!1},s.prototype._doLinkifyRow=function(a,p,h){for(var r,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),i=-1,n=function(){var c=r[typeof h.matchIndex!="number"?0:h.matchIndex];if(!c)return l._logService.debug("match found without corresponding matchIndex",r,h),"break";if(i=p.indexOf(c,i+1),t.lastIndex=i+c.length,i<0)return"break";var y=l._bufferService.buffer.stringIndexToBufferIndex(a,i);if(y[0]<0)return"break";var C=l._bufferService.buffer.lines.get(y[0]);if(!C)return"break";var g=C.getFg(y[1]),S=g?g>>9&511:void 0;h.validationCallback?h.validationCallback(c,function(w){e._rowsTimeoutId||w&&e._addLink(y[1],y[0]-e._bufferService.buffer.ydisp,c,h,S)}):l._addLink(y[1],y[0]-l._bufferService.buffer.ydisp,c,h,S)},l=this;(r=t.exec(p))!==null&&n()!=="break";);},s.prototype._addLink=function(a,p,h,r,e){var t=this;if(this._mouseZoneManager&&this._element){var i=this._unicodeService.getStringCellWidth(h),n=a%this._bufferService.cols,l=p+Math.floor(a/this._bufferService.cols),c=(n+i)%this._bufferService.cols,y=l+Math.floor((n+i)/this._bufferService.cols);c===0&&(c=this._bufferService.cols,y--),this._mouseZoneManager.add(new v(n+1,l+1,c+1,y+1,function(C){if(r.handler)return r.handler(C,h);var g=window.open();g?(g.opener=null,g.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,y,e)),t._element.classList.add("xterm-cursor-pointer")},function(C){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,c,y,e)),r.hoverTooltipCallback&&r.hoverTooltipCallback(C,h,{start:{x:n,y:l},end:{x:c,y}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,y,e)),t._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(C){return!r.willLinkActivate||r.willLinkActivate(C,h)}))}},s.prototype._createLinkHoverEvent=function(a,p,h,r,e){return{x1:a,y1:p,x2:h,y2:r,cols:this._bufferService.cols,fg:e}},s._timeBeforeLatency=200,s=u([d(0,f.IBufferService),d(1,f.ILogService),d(2,f.IUnicodeService)],s)}();o.Linkifier=b;var v=function(s,a,p,h,r,e,t,i,n){this.x1=s,this.y1=a,this.x2=p,this.y2=h,this.clickCallback=r,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=i,this.willLinkActivate=n};o.MouseZone=v},6465:function(P,o,m){var u,d=this&&this.__extends||(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},u(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}u(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),_=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},f=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}},b=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var i=typeof Symbol=="function"&&e[Symbol.iterator];if(!i)return e;var n,l,c=i.call(e),y=[];try{for(;(t===void 0||t-- >0)&&!(n=c.next()).done;)y.push(n.value)}catch(C){l={error:C}}finally{try{n&&!n.done&&(i=c.return)&&i.call(c)}finally{if(l)throw l.error}}return y};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var s=m(2585),a=m(8460),p=m(844),h=m(3656),r=function(e){function t(i){var n=e.call(this)||this;return n._bufferService=i,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new a.EventEmitter),n._onHideLinkUnderline=n.register(new a.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return d(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(i){var n=this;return this._linkProviders.push(i),{dispose:function(){var l=n._linkProviders.indexOf(i);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(i,n,l){var c=this;this._element=i,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(i){if(this._lastMouseEvent=i,this._element&&this._mouseService){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=i.composedPath(),c=0;c<l.length;c++){var y=l[c];if(y.classList.contains("xterm"))break;if(y.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(i){if(this._activeLine!==i.y)return this._clearCurrentLink(),void this._askForLink(i,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))},t.prototype._askForLink=function(i,n){var l,c,y,C,g=this;this._activeProviderReplies&&n||((y=this._activeProviderReplies)===null||y===void 0||y.forEach(function(x){x==null||x.forEach(function(M){M.link.dispose&&M.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);var S=!1,w=function(x,M){n?!((C=R._activeProviderReplies)===null||C===void 0)&&C.get(x)&&(S=R._checkLinkProviderResult(x,i,S)):M.provideLinks(i.y,function(T){var U,q;if(!g._isMouseOut){var F=T==null?void 0:T.map(function(z){return{link:z}});(U=g._activeProviderReplies)===null||U===void 0||U.set(x,F),S=g._checkLinkProviderResult(x,i,S),((q=g._activeProviderReplies)===null||q===void 0?void 0:q.size)===g._linkProviders.length&&g._removeIntersectingLinks(i.y,g._activeProviderReplies)}})},R=this;try{for(var L=b(this._linkProviders.entries()),k=L.next();!k.done;k=L.next()){var E=v(k.value,2);w(E[0],E[1])}}catch(x){l={error:x}}finally{try{k&&!k.done&&(c=L.return)&&c.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(i,n){for(var l=new Set,c=0;c<n.size;c++){var y=n.get(c);if(y)for(var C=0;C<y.length;C++)for(var g=y[C],S=g.link.range.start.y<i?0:g.link.range.start.x,w=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x,R=S;R<=w;R++){if(l.has(R)){y.splice(C--,1);break}l.add(R)}}},t.prototype._checkLinkProviderResult=function(i,n,l){var c,y=this;if(!this._activeProviderReplies)return l;for(var C=this._activeProviderReplies.get(i),g=!1,S=0;S<i;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(g=!0);if(!g&&C){var w=C.find(function(L){return y._linkAtPosition(L.link,n)});w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(S=0;S<this._activeProviderReplies.size;S++){var R=(c=this._activeProviderReplies.get(S))===null||c===void 0?void 0:c.find(function(L){return y._linkAtPosition(L.link,n)});if(R){l=!0,this._handleNewLink(R);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(i){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(i,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(i,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!i||!n||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(i){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(i.link,l)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:function(){var c,y;return(y=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:function(c){var y,C;!((y=n._currentLink)===null||y===void 0)&&y.state&&n._currentLink.state.decorations.pointerCursor!==c&&(n._currentLink.state.decorations.pointerCursor=c,n._currentLink.state.isHovered&&((C=n._element)===null||C===void 0||C.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,y;return(y=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||y===void 0?void 0:y.decorations.underline},set:function(c){var y,C,g;!((y=n._currentLink)===null||y===void 0)&&y.state&&((g=(C=n._currentLink)===null||C===void 0?void 0:C.state)===null||g===void 0?void 0:g.decorations.underline)!==c&&(n._currentLink.state.decorations.underline=c,n._currentLink.state.isHovered&&n._fireUnderlineEvent(i.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(c){var y=c.start===0?0:c.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(y,c.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(i,n){var l=i.range,c=this._bufferService.buffer.ydisp,y=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-c-1,l.end.x,l.end.y-c-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(y)},t.prototype._linkLeave=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(i,n){var l=i.range.start.y===i.range.end.y,c=i.range.start.y<n.y,y=i.range.end.y>n.y;return(l&&i.range.start.x<=n.x&&i.range.end.x>=n.x||c&&i.range.end.x>=n.x||y&&i.range.start.x<=n.x||c&&y)&&i.range.start.y<=n.y&&i.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(i,n,l){var c=l.getCoords(i,n,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(i,n,l,c,y){return{x1:i,y1:n,x2:l,y2:c,cols:this._bufferService.cols,fg:y}},_([f(0,s.IBufferService)],t)}(p.Disposable);o.Linkifier2=r},9042:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(P,o,m){var u,d=this&&this.__extends||(u=function(h,r){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},u(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}u(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),_=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},f=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var b=m(844),v=m(3656),s=m(4725),a=m(2585),p=function(h){function r(e,t,i,n,l,c){var y=h.call(this)||this;return y._element=e,y._screenElement=t,y._bufferService=i,y._mouseService=n,y._selectionService=l,y._optionsService=c,y._zones=[],y._areZonesActive=!1,y._lastHoverCoords=[void 0,void 0],y._initialSelectionLength=0,y.register((0,v.addDisposableDomListener)(y._element,"mousedown",function(C){return y._onMouseDown(C)})),y._mouseMoveListener=function(C){return y._onMouseMove(C)},y._mouseLeaveListener=function(C){return y._onMouseLeave(C)},y._clickListener=function(C){return y._onClick(C)},y}return d(r,h),r.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},r.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},r.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var i=0;i<this._zones.length;i++){var n=this._zones[i];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}this._zones.length===0&&this._deactivate()}},r.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},r.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},r.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},r.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},r.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t==null||t.tooltipCallback(e)},r.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t!=null&&t.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},r.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},r.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},r.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},r.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],n=t[1],l=0;l<this._zones.length;l++){var c=this._zones[l];if(c.y1===c.y2){if(n===c.y1&&i>=c.x1&&i<c.x2)return c}else if(n===c.y1&&i>=c.x1||n===c.y2&&i<c.x2||n>c.y1&&n<c.y2)return c}},_([f(2,a.IBufferService),f(3,s.IMouseService),f(4,s.ISelectionService),f(5,a.IOptionsService)],r)}(b.Disposable);o.MouseZoneManager=p},6193:function(P,o){var m=this&&this.__values||function(d){var _=typeof Symbol=="function"&&Symbol.iterator,f=_&&d[_],b=0;if(f)return f.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&b>=d.length&&(d=void 0),{value:d&&d[b++],done:!d}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var u=function(){function d(_){this._renderCallback=_,this._refreshCallbacks=[]}return d.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},d.prototype.addRefreshCallback=function(_){var f=this;return this._refreshCallbacks.push(_),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return f._innerRefresh()})),this._animationFrame},d.prototype.refresh=function(_,f,b){var v=this;this._rowCount=b,_=_!==void 0?_:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},d.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var _=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(_,f),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},d.prototype._runRefreshCallbacks=function(){var _,f;try{for(var b=m(this._refreshCallbacks),v=b.next();!v.done;v=b.next())(0,v.value)(0)}catch(s){_={error:s}}finally{try{v&&!v.done&&(f=b.return)&&f.call(b)}finally{if(_)throw _.error}}this._refreshCallbacks=[]},d}();o.RenderDebouncer=u},5596:function(P,o,m){var u,d=this&&this.__extends||(u=function(f,b){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,s){v.__proto__=s}||function(v,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(v[a]=s[a])},u(f,b)},function(f,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function v(){this.constructor=f}u(f,b),f.prototype=b===null?Object.create(b):(v.prototype=b.prototype,new v)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var _=function(f){function b(){var v=f!==null&&f.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return d(b,f),b.prototype.setListener=function(v){var s=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){s._listener&&(s._listener(window.devicePixelRatio,s._currentDevicePixelRatio),s._updateDpr())},this._updateDpr()},b.prototype.dispose=function(){f.prototype.dispose.call(this),this.clearListener()},b.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},b.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},b}(m(844).Disposable);o.ScreenDprMonitor=_},3236:function(P,o,m){var u,d=this&&this.__extends||(u=function(J,W){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var j in D)Object.prototype.hasOwnProperty.call(D,j)&&(O[j]=D[j])},u(J,W)},function(J,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function O(){this.constructor=J}u(J,W),J.prototype=W===null?Object.create(W):(O.prototype=W.prototype,new O)}),_=this&&this.__values||function(J){var W=typeof Symbol=="function"&&Symbol.iterator,O=W&&J[W],D=0;if(O)return O.call(J);if(J&&typeof J.length=="number")return{next:function(){return J&&D>=J.length&&(J=void 0),{value:J&&J[D++],done:!J}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(J,W){var O=typeof Symbol=="function"&&J[Symbol.iterator];if(!O)return J;var D,j,V=O.call(J),Y=[];try{for(;(W===void 0||W-- >0)&&!(D=V.next()).done;)Y.push(D.value)}catch(te){j={error:te}}finally{try{D&&!D.done&&(O=V.return)&&O.call(V)}finally{if(j)throw j.error}}return Y},b=this&&this.__spreadArray||function(J,W,O){if(O||arguments.length===2)for(var D,j=0,V=W.length;j<V;j++)!D&&j in W||(D||(D=Array.prototype.slice.call(W,0,j)),D[j]=W[j]);return J.concat(D||Array.prototype.slice.call(W))};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var v=m(2950),s=m(1680),a=m(3614),p=m(2584),h=m(5435),r=m(3525),e=m(3551),t=m(9312),i=m(6114),n=m(3656),l=m(9042),c=m(357),y=m(6954),C=m(4567),g=m(1296),S=m(7399),w=m(8460),R=m(8437),L=m(5680),k=m(3230),E=m(4725),x=m(428),M=m(8934),T=m(6465),U=m(5114),q=m(8969),F=m(8055),z=m(4269),N=m(5941),A=m(3107),ee=m(5744),$=m(9074),oe=m(2585),B=typeof window<"u"?window.document:null,ne=function(J){function W(O){O===void 0&&(O={});var D=J.call(this,O)||this;return D.browser=i,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new w.EventEmitter,D._onKey=new w.EventEmitter,D._onRender=new w.EventEmitter,D._onSelectionChange=new w.EventEmitter,D._onTitleChange=new w.EventEmitter,D._onBell=new w.EventEmitter,D._onFocus=new w.EventEmitter,D._onBlur=new w.EventEmitter,D._onA11yCharEmitter=new w.EventEmitter,D._onA11yTabEmitter=new w.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance($.DecorationService),D._instantiationService.setService(oe.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(j,V){return D.refresh(j,V)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(j){return D._reportWindowsOptions(j)})),D.register(D._inputHandler.onColor(function(j){return D._handleColorEvent(j)})),D.register((0,w.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,w.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(j){return D._afterResize(j.cols,j.rows)})),D}return d(W,J),Object.defineProperty(W.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),W.prototype._handleColorEvent=function(O){var D,j,V,Y;if(this._colorManager){try{for(var te=_(O),ae=te.next();!ae.done;ae=te.next()){var le=ae.value,he=void 0,K="";switch(le.index){case 256:he="foreground",K="10";break;case 257:he="background",K="11";break;case 258:he="cursor",K="12";break;default:he="ansi",K="4;"+le.index}if(he)switch(le.type){case 0:var ue=F.color.toColorRGB(he==="ansi"?this._colorManager.colors.ansi[le.index]:this._colorManager.colors[he]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(ue)+p.C1_ESCAPED.ST);break;case 1:he==="ansi"?this._colorManager.colors.ansi[le.index]=F.rgba.toColor.apply(F.rgba,b([],f(le.color),!1)):this._colorManager.colors[he]=F.rgba.toColor.apply(F.rgba,b([],f(le.color),!1));break;case 2:this._colorManager.restoreColor(le.index)}}}catch(ye){D={error:ye}}finally{try{ae&&!ae.done&&(j=te.return)&&j.call(te)}finally{if(D)throw D.error}}(V=this._renderService)===null||V===void 0||V.setColors(this._colorManager.colors),(Y=this.viewport)===null||Y===void 0||Y.onThemeChange(this._colorManager.colors)}},W.prototype.dispose=function(){var O,D,j;this._isDisposed||(J.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(j=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||j===void 0||j.removeChild(this.element))},W.prototype._setup=function(){J.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(W.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),W.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},W.prototype._updateOptions=function(O){var D,j,V,Y;switch(J.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(j=this._charSizeService)===null||j===void 0||j.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(V=this.viewport)===null||V===void 0||V.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)):((Y=this._accessibilityManager)===null||Y===void 0||Y.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},W.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},W.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},W.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},W.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var j=Math.min(this.buffer.x,this.cols-1),V=this._renderService.dimensions.actualCellHeight,Y=D.getWidth(j),te=this._renderService.dimensions.actualCellWidth*Y,ae=this.buffer.y*this._renderService.dimensions.actualCellHeight,le=j*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=le+"px",this.textarea.style.top=ae+"px",this.textarea.style.width=te+"px",this.textarea.style.height=V+"px",this.textarea.style.lineHeight=V+"px",this.textarea.style.zIndex="-5"}}},W.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(j){O.hasSelection()&&(0,a.copyHandler)(j,O._selectionService)}));var D=function(j){return(0,a.handlePasteEvent)(j,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),i.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(j){j.button===2&&(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(j){(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),i.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(j){j.button===1&&(0,a.moveTextAreaUnderMouseCursor)(j,O.textarea,O.screenElement)}))},W.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._compositionHelper.compositionupdate(D)})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register((0,n.addDisposableDomListener)(this.textarea,"input",function(D){return O._inputEvent(D)},!0)),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(D){return O._queueLinkification(D.start,D.end)}))},W.prototype.open=function(O){var D=this;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),O.appendChild(this.element);var j=B.createDocumentFragment();this._viewportElement=B.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),j.appendChild(this._viewportElement),this._viewportScrollArea=B.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=B.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=B.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),j.appendChild(this.screenElement),this.textarea=B.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,n.addDisposableDomListener)(this.textarea,"focus",function(te){return D._onTextAreaFocus(te)})),this.register((0,n.addDisposableDomListener)(this.textarea,"blur",function(){return D._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var V=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(E.ICoreBrowserService,V),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new L.ColorManager(B,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(te){return D._colorManager.onOptionsChange(te)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(z.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService);var Y=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,Y,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(function(te){return D._onRender.fire(te)})),this.onResize(function(te){return D._renderService.resize(te.cols,te.rows)}),this._compositionView=B.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(j),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(E.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,function(te){return D.scrollLines(te,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return D.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){D._renderService.onCursorMove(),D._syncTextArea()})),this.register(this.onResize(function(){return D._renderService.onResize(D.cols,D.rows)})),this.register(this.onBlur(function(){return D._renderService.onBlur()})),this.register(this.onFocus(function(){return D._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return D.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(te){return D.scrollLines(te.amount,te.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return D._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(te){return D._renderService.onSelectionChanged(te.start,te.end,te.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(te){D.textarea.value=te,D.textarea.focus(),D.textarea.select()})),this.register(this._onScroll.event(function(te){D.viewport.syncScrollArea(),D._selectionService.refresh()})),this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",function(){return D._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return D._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(A.BufferDecorationRenderer,this.screenElement)),this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(te){return D._selectionService.onMouseDown(te)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance(ee.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange(function(){!D._overviewRulerRenderer&&D.options.overviewRulerWidth&&D._viewportElement&&D.screenElement&&(D._overviewRulerRenderer=D._instantiationService.createInstance(ee.OverviewRulerRenderer,D._viewportElement,D.screenElement))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},W.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(r.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(g.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},W.prototype._setTheme=function(O){var D,j,V;this._theme=O,(D=this._colorManager)===null||D===void 0||D.setTheme(O),(j=this._renderService)===null||j===void 0||j.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)},W.prototype.bindMouse=function(){var O=this,D=this,j=this.element;function V(K){var ue,ye,Ee=D._mouseService.getRawByteCoords(K,D.screenElement,D.cols,D.rows);if(!Ee)return!1;switch(K.overrideType||K.type){case"mousemove":ye=32,K.buttons===void 0?(ue=3,K.button!==void 0&&(ue=K.button<3?K.button:3)):ue=1&K.buttons?0:4&K.buttons?1:2&K.buttons?2:3;break;case"mouseup":ye=0,ue=K.button<3?K.button:3;break;case"mousedown":ye=1,ue=K.button<3?K.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(K)===0)return!1;ye=K.deltaY<0?0:1,ue=4;break;default:return!1}return!(ye===void 0||ue===void 0||ue>4)&&D.coreMouseService.triggerMouseEvent({col:Ee.x-33,row:Ee.y-33,button:ue,action:ye,ctrl:K.ctrlKey,alt:K.altKey,shift:K.shiftKey})}var Y={mouseup:null,wheel:null,mousedrag:null,mousemove:null},te=function(K){return V(K),K.buttons||(O._document.removeEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.removeEventListener("mousemove",Y.mousedrag)),O.cancel(K)},ae=function(K){return V(K),O.cancel(K,!0)},le=function(K){K.buttons&&V(K)},he=function(K){K.buttons||V(K)};this.register(this.coreMouseService.onProtocolChange(function(K){K?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(K)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&K?Y.mousemove||(j.addEventListener("mousemove",he),Y.mousemove=he):(j.removeEventListener("mousemove",Y.mousemove),Y.mousemove=null),16&K?Y.wheel||(j.addEventListener("wheel",ae,{passive:!1}),Y.wheel=ae):(j.removeEventListener("wheel",Y.wheel),Y.wheel=null),2&K?Y.mouseup||(Y.mouseup=te):(O._document.removeEventListener("mouseup",Y.mouseup),Y.mouseup=null),4&K?Y.mousedrag||(Y.mousedrag=le):(O._document.removeEventListener("mousemove",Y.mousedrag),Y.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,n.addDisposableDomListener)(j,"mousedown",function(K){if(K.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(K))return V(K),Y.mouseup&&O._document.addEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.addEventListener("mousemove",Y.mousedrag),O.cancel(K)})),this.register((0,n.addDisposableDomListener)(j,"wheel",function(K){if(!Y.wheel){if(!O.buffer.hasScrollback){var ue=O.viewport.getLinesScrolled(K);if(ue===0)return;for(var ye=p.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(K.deltaY<0?"A":"B"),Ee="",Fe=0;Fe<Math.abs(ue);Fe++)Ee+=ye;return O.coreService.triggerDataEvent(Ee,!0),O.cancel(K,!0)}return O.viewport.onWheel(K)?O.cancel(K):void 0}},{passive:!1})),this.register((0,n.addDisposableDomListener)(j,"touchstart",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(K),O.cancel(K)},{passive:!0})),this.register((0,n.addDisposableDomListener)(j,"touchmove",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(K)?void 0:O.cancel(K)},{passive:!1}))},W.prototype.refresh=function(O,D){var j;(j=this._renderService)===null||j===void 0||j.refreshRows(O,D)},W.prototype._queueLinkification=function(O,D){var j;(j=this.linkifier)===null||j===void 0||j.linkifyRows(O,D)},W.prototype.updateCursorStyle=function(O){var D;!((D=this._selectionService)===null||D===void 0)&&D.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},W.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},W.prototype.scrollLines=function(O,D,j){j===void 0&&(j=0),J.prototype.scrollLines.call(this,O,D,j),this.refresh(0,this.rows-1)},W.prototype.paste=function(O){(0,a.paste)(O,this.textarea,this.coreService)},W.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},W.prototype.registerLinkMatcher=function(O,D,j){var V=this.linkifier.registerLinkMatcher(O,D,j);return this.refresh(0,this.rows-1),V},W.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},W.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},W.prototype.registerCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var D=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),D},W.prototype.deregisterCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(W.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),W.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},W.prototype.registerDecoration=function(O){return this._decorationService.registerDecoration(O)},W.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},W.prototype.select=function(O,D,j){this._selectionService.setSelection(O,D,j)},W.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},W.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},W.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},W.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},W.prototype.selectLines=function(O,D){var j;(j=this._selectionService)===null||j===void 0||j.selectLines(O,D)},W.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;var D=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!D&&!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;D||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var j=(0,S.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),j.type===3||j.type===2){var V=this.rows-1;return this.scrollLines(j.type===2?-V:V),this.cancel(O,!0)}return j.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(j.cancel&&this.cancel(O,!0),!j.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(j.key!==p.C0.ETX&&j.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:j.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(j.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0))))},W.prototype._isThirdLevelShift=function(O,D){var j=O.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||O.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||O.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?j:j&&(!D.keyCode||D.keyCode>47)},W.prototype._keyUp=function(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},W.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},W.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},W.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},W.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?J.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},W.prototype._afterResize=function(O,D){var j,V;(j=this._charSizeService)===null||j===void 0||j.measure(),(V=this.viewport)===null||V===void 0||V.syncScrollArea(!0)},W.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),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;for(var O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(R.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},W.prototype.reset=function(){var O,D;this.options.rows=this.rows,this.options.cols=this.cols;var j=this._customKeyEventHandler;this._setup(),J.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1),(D=this.viewport)===null||D===void 0||D.syncScrollArea()},W.prototype.clearTextureAtlas=function(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()},W.prototype._reportFocus=function(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},W.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case h.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),j=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+j+";"+D+"t");break;case h.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var V=this._renderService.dimensions.scaledCellWidth.toFixed(0),Y=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+Y+";"+V+"t")}},W.prototype.cancel=function(O,D){if(this.options.cancelEvents||D)return O.preventDefault(),O.stopPropagation(),!1},W.prototype._visualBell=function(){return!1},W.prototype._soundBell=function(){return this.options.bellStyle==="sound"},W}(q.CoreTerminal);o.Terminal=ne},9924:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0;var m=function(){function u(d,_){_===void 0&&(_=1e3),this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return u.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},u.prototype.refresh=function(d,_,f){var b=this;this._rowCount=f,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var s=v-this._lastRefreshMs,a=this._debounceThresholdMS-s;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){b._lastRefreshMs=Date.now(),b._innerRefresh(),b._additionalRefreshRequested=!1,b._refreshTimeoutID=void 0},a)}},u.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}},u}();o.TimeBasedDebouncer=m},1680:function(P,o,m){var u,d=this&&this.__extends||(u=function(h,r){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},u(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}u(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),_=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},f=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var b=m(844),v=m(3656),s=m(4725),a=m(2585),p=function(h){function r(e,t,i,n,l,c,y,C){var g=h.call(this)||this;return g._scrollLines=e,g._viewportElement=t,g._scrollArea=i,g._element=n,g._bufferService=l,g._optionsService=c,g._charSizeService=y,g._renderService=C,g.scrollBarWidth=0,g._currentRowHeight=0,g._currentScaledCellHeight=0,g._lastRecordedBufferLength=0,g._lastRecordedViewportHeight=0,g._lastRecordedBufferHeight=0,g._lastTouchY=0,g._lastScrollTop=0,g._wheelPartialScroll=0,g._refreshAnimationFrame=null,g._ignoreNextScrollEvent=!1,g.scrollBarWidth=g._viewportElement.offsetWidth-g._scrollArea.offsetWidth||15,g.register((0,v.addDisposableDomListener)(g._viewportElement,"scroll",g._onScroll.bind(g))),g._activeBuffer=g._bufferService.buffer,g.register(g._bufferService.buffers.onBufferActivate(function(S){return g._activeBuffer=S.activeBuffer})),g._renderDimensions=g._renderService.dimensions,g.register(g._renderService.onDimensionsChange(function(S){return g._renderDimensions=S})),setTimeout(function(){return g.syncScrollArea()},0),g}return d(r,h),r.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},r.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return t._innerRefresh()}))},r.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},r.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},r.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},r.prototype._bubbleScroll=function(e,t){var i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&i<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},r.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},r.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},r.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},r.prototype._applyScrollModifier=function(e,t){var i=this._optionsService.rawOptions.fastScrollModifier;return i==="alt"&&t.altKey||i==="ctrl"&&t.ctrlKey||i==="shift"&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},r.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},r.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},_([f(4,a.IBufferService),f(5,a.IOptionsService),f(6,s.ICharSizeService),f(7,s.IRenderService)],r)}(b.Disposable);o.Viewport=p},3107:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),_=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},f=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},b=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;var v=m(3656),s=m(4725),a=m(844),p=m(2585),h=function(r){function e(t,i,n,l){var c=r.call(this)||this;return c._screenElement=t,c._bufferService=i,c._decorationService=n,c._renderService=l,c._decorationElements=new Map,c._altBufferIsActive=!1,c._dimensionsChanged=!1,c._container=document.createElement("div"),c._container.classList.add("xterm-decoration-container"),c._screenElement.appendChild(c._container),c.register(c._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),c.register(c._renderService.onDimensionsChange(function(){c._dimensionsChanged=!0,c._queueRefresh()})),c.register((0,v.addDisposableDomListener)(window,"resize",function(){return c._queueRefresh()})),c.register(c._bufferService.buffers.onBufferActivate(function(){c._altBufferIsActive=c._bufferService.buffer===c._bufferService.buffers.alt})),c.register(c._decorationService.onDecorationRegistered(function(){return c._queueRefresh()})),c.register(c._decorationService.onDecorationRemoved(function(y){return c._removeDecoration(y)})),c}return d(e,r),e.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),r.prototype.dispose.call(this)},e.prototype._queueRefresh=function(){var t=this;this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(function(){t.refreshDecorations(),t._animationFrame=void 0}))},e.prototype.refreshDecorations=function(){var t,i;try{for(var n=b(this._decorationService.decorations),l=n.next();!l.done;l=n.next()){var c=l.value;this._renderDecoration(c)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._dimensionsChanged=!1},e.prototype._renderDecoration=function(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)},e.prototype._createElement=function(t){var i,n=document.createElement("div");n.classList.add("xterm-decoration"),n.style.width=Math.round((t.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",n.style.height=(t.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",n.style.top=(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",n.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var l=(i=t.options.x)!==null&&i!==void 0?i:0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(t,n),n},e.prototype._refreshStyle=function(t){var i=this,n=t.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{var l=this._decorationElements.get(t);l||(t.onDispose(function(){return i._removeDecoration(t)}),l=this._createElement(t),t.element=l,this._decorationElements.set(t,l),this._container.appendChild(l)),l.style.top=n*this._renderService.dimensions.actualCellHeight+"px",l.style.display=this._altBufferIsActive?"none":"block",t.onRenderEmitter.fire(l)}},e.prototype._refreshXPosition=function(t,i){var n;if(i===void 0&&(i=t.element),i){var l=(n=t.options.x)!==null&&n!==void 0?n:0;(t.options.anchor||"left")==="right"?i.style.right=l?l*this._renderService.dimensions.actualCellWidth+"px":"":i.style.left=l?l*this._renderService.dimensions.actualCellWidth+"px":""}},e.prototype._removeDecoration=function(t){var i;(i=this._decorationElements.get(t))===null||i===void 0||i.remove(),this._decorationElements.delete(t)},_([f(1,p.IBufferService),f(2,p.IDecorationService),f(3,s.IRenderService)],e)}(a.Disposable);o.BufferDecorationRenderer=h},5871:function(P,o){var m=this&&this.__values||function(d){var _=typeof Symbol=="function"&&Symbol.iterator,f=_&&d[_],b=0;if(f)return f.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&b>=d.length&&(d=void 0),{value:d&&d[b++],done:!d}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0;var u=function(){function d(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(d.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),d.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},d.prototype.addDecoration=function(_){var f,b;if(_.options.overviewRulerOptions){try{for(var v=m(this._zones),s=v.next();!s.done;s=v.next()){var a=s.value;if(a.color===_.options.overviewRulerOptions.color&&a.position===_.options.overviewRulerOptions.position){if(this._lineIntersectsZone(a,_.marker.line))return;if(this._lineAdjacentToZone(a,_.marker.line,_.options.overviewRulerOptions.position))return void this._addLineToZone(a,_.marker.line)}}}catch(p){f={error:p}}finally{try{s&&!s.done&&(b=v.return)&&b.call(v)}finally{if(f)throw f.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=_.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=_.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=_.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=_.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:_.options.overviewRulerOptions.color,position:_.options.overviewRulerOptions.position,startBufferLine:_.marker.line,endBufferLine:_.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},d.prototype.setPadding=function(_){this._linePadding=_},d.prototype._lineIntersectsZone=function(_,f){return f>=_.startBufferLine&&f<=_.endBufferLine},d.prototype._lineAdjacentToZone=function(_,f,b){return f>=_.startBufferLine-this._linePadding[b||"full"]&&f<=_.endBufferLine+this._linePadding[b||"full"]},d.prototype._addLineToZone=function(_,f){_.startBufferLine=Math.min(_.startBufferLine,f),_.endBufferLine=Math.max(_.endBufferLine,f)},d}();o.ColorZoneStore=u},5744:function(P,o,m){var u,d=this&&this.__extends||(u=function(n,l){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(c[C]=y[C])},u(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}u(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),_=this&&this.__decorate||function(n,l,c,y){var C,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,c):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,y);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(g<3?C(S):g>3?C(l,c,S):C(l,c))||S);return g>3&&S&&Object.defineProperty(l,c,S),S},f=this&&this.__param||function(n,l){return function(c,y){l(c,y,n)}},b=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],y=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;var v=m(5871),s=m(3656),a=m(4725),p=m(844),h=m(2585),r={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},t={full:0,left:0,center:0,right:0},i=function(n){function l(c,y,C,g,S,w){var R,L=n.call(this)||this;L._viewportElement=c,L._screenElement=y,L._bufferService=C,L._decorationService=g,L._renderService=S,L._optionsService=w,L._colorZoneStore=new v.ColorZoneStore,L._shouldUpdateDimensions=!0,L._shouldUpdateAnchor=!0,L._lastKnownBufferLength=0,L._canvas=document.createElement("canvas"),L._canvas.classList.add("xterm-decoration-overview-ruler"),L._refreshCanvasDimensions(),(R=L._viewportElement.parentElement)===null||R===void 0||R.insertBefore(L._canvas,L._viewportElement);var k=L._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");return L._ctx=k,L._registerDecorationListeners(),L._registerBufferChangeListeners(),L._registerDimensionChangeListeners(),L}return d(l,n),Object.defineProperty(l.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),l.prototype._registerDecorationListeners=function(){var c=this;this.register(this._decorationService.onDecorationRegistered(function(){return c._queueRefresh(void 0,!0)})),this.register(this._decorationService.onDecorationRemoved(function(){return c._queueRefresh(void 0,!0)}))},l.prototype._registerBufferChangeListeners=function(){var c=this;this.register(this._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),this.register(this._bufferService.buffers.onBufferActivate(function(){c._canvas.style.display=c._bufferService.buffer===c._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(function(){c._lastKnownBufferLength!==c._bufferService.buffers.normal.lines.length&&(c._refreshDrawHeightConstants(),c._refreshColorZonePadding())}))},l.prototype._registerDimensionChangeListeners=function(){var c=this;this.register(this._renderService.onRender(function(){c._containerHeight&&c._containerHeight===c._screenElement.clientHeight||(c._queueRefresh(!0),c._containerHeight=c._screenElement.clientHeight)})),this.register(this._optionsService.onOptionChange(function(y){y==="overviewRulerWidth"&&c._queueRefresh(!0)})),this.register((0,s.addDisposableDomListener)(window,"resize",function(){c._queueRefresh(!0)})),this._queueRefresh(!0)},l.prototype.dispose=function(){var c;(c=this._canvas)===null||c===void 0||c.remove(),n.prototype.dispose.call(this)},l.prototype._refreshDrawConstants=function(){var c=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=c,e.center=y,e.right=c,this._refreshDrawHeightConstants(),t.full=0,t.left=0,t.center=e.left,t.right=e.left+e.center},l.prototype._refreshDrawHeightConstants=function(){r.full=Math.round(2*window.devicePixelRatio);var c=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(c,12),6)*window.devicePixelRatio);r.left=y,r.center=y,r.right=y},l.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},l.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},l.prototype._refreshDecorations=function(){var c,y,C,g,S,w;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var R=b(this._decorationService.decorations),L=R.next();!L.done;L=R.next()){var k=L.value;this._colorZoneStore.addDecoration(k)}}catch(F){c={error:F}}finally{try{L&&!L.done&&(y=R.return)&&y.call(R)}finally{if(c)throw c.error}}this._ctx.lineWidth=1;var E=this._colorZoneStore.zones;try{for(var x=b(E),M=x.next();!M.done;M=x.next())(q=M.value).position!=="full"&&this._renderColorZone(q)}catch(F){C={error:F}}finally{try{M&&!M.done&&(g=x.return)&&g.call(x)}finally{if(C)throw C.error}}try{for(var T=b(E),U=T.next();!U.done;U=T.next()){var q;(q=U.value).position==="full"&&this._renderColorZone(q)}}catch(F){S={error:F}}finally{try{U&&!U.done&&(w=T.return)&&w.call(T)}finally{if(S)throw S.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},l.prototype._renderColorZone=function(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(t[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-r[c.position||"full"]/2),e[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+r[c.position||"full"]))},l.prototype._queueRefresh=function(c,y){var C=this;this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){C._refreshDecorations(),C._animationFrame=void 0}))},_([f(2,h.IBufferService),f(3,h.IDecorationService),f(4,a.IRenderService),f(5,h.IOptionsService)],l)}(p.Disposable);o.OverviewRulerRenderer=i},2950:function(P,o,m){var u=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},d=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var _=m(4725),f=m(2585),b=function(){function v(s,a,p,h,r,e){this._textarea=s,this._compositionView=a,this._bufferService=p,this._optionsService=h,this._coreService=r,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(s){var a=this;this._compositionView.textContent=s.data,this.updateCompositionElements(),setTimeout(function(){a._compositionPosition.end=a._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(s){if(this._isComposing||this._isSendingComposition){if(s.keyCode===229||s.keyCode===16||s.keyCode===17||s.keyCode===18)return!1;this._finalizeComposition(!1)}return s.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(s){var a=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,s){var p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(a._isSendingComposition){a._isSendingComposition=!1;var r;p.start+=a._dataAlreadySent.length,(r=a._isComposing?a._textarea.value.substring(p.start,p.end):a._textarea.value.substring(p.start)).length>0&&a._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;var h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}},v.prototype._handleAnyTextareaChanges=function(){var s=this,a=this._textarea.value;setTimeout(function(){if(!s._isComposing){var p=s._textarea.value.replace(a,"");p.length>0&&(s._dataAlreadySent=p,s._coreService.triggerDataEvent(p,!0))}},0)},v.prototype.updateCompositionElements=function(s){var a=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.actualCellHeight,r=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=p*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(t.width,1)+"px",this._textarea.style.height=Math.max(t.height,1)+"px",this._textarea.style.lineHeight=t.height+"px"}s||setTimeout(function(){return a.updateCompositionElements(!0)},0)}},u([d(2,f.IBufferService),d(3,f.IOptionsService),d(4,f.ICoreService),d(5,_.IRenderService)],v)}();o.CompositionHelper=b},9806:(P,o)=>{function m(u,d,_){var f=_.getBoundingClientRect(),b=u.getComputedStyle(_),v=parseInt(b.getPropertyValue("padding-left")),s=parseInt(b.getPropertyValue("padding-top"));return[d.clientX-f.left-v,d.clientY-f.top-s]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=m,o.getCoords=function(u,d,_,f,b,v,s,a,p){if(v){var h=m(u,d,_);if(h)return h[0]=Math.ceil((h[0]+(p?s/2:0))/s),h[1]=Math.ceil(h[1]/a),h[0]=Math.min(Math.max(h[0],1),f+(p?1:0)),h[1]=Math.min(Math.max(h[1],1),b),h}},o.getRawByteCoords=function(u){if(u)return{x:u[0]+32,y:u[1]+32}}},9504:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var u=m(2584);function d(a,p,h,r){var e=a-_(h,a),t=p-_(h,p),i=Math.abs(e-t)-function(n,l,c){for(var y=0,C=n-_(c,n),g=l-_(c,l),S=0;S<Math.abs(C-g);S++){var w=f(n,l)==="A"?-1:1,R=c.buffer.lines.get(C+w*S);R!=null&&R.isWrapped&&y++}return y}(a,p,h);return s(i,v(f(a,p),r))}function _(a,p){for(var h=0,r=a.buffer.lines.get(p),e=r==null?void 0:r.isWrapped;e&&p>=0&&p<a.rows;)h++,e=(r=a.buffer.lines.get(--p))==null?void 0:r.isWrapped;return h}function f(a,p){return a>p?"A":"B"}function b(a,p,h,r,e,t){for(var i=a,n=p,l="";i!==h||n!==r;)i+=e?1:-1,e&&i>t.cols-1?(l+=t.buffer.translateBufferLineToString(n,!1,a,i),i=0,a=0,n++):!e&&i<0&&(l+=t.buffer.translateBufferLineToString(n,!1,0,a+1),a=i=t.cols-1,n--);return l+t.buffer.translateBufferLineToString(n,!1,a,i)}function v(a,p){var h=p?"O":"[";return u.C0.ESC+h+a}function s(a,p){a=Math.floor(a);for(var h="",r=0;r<a;r++)h+=p;return h}o.moveToCellSequence=function(a,p,h,r){var e,t=h.buffer.x,i=h.buffer.y;if(!h.buffer.hasScrollback)return function(l,c,y,C,g,S){return d(c,C,g,S).length===0?"":s(b(l,c,l,c-_(g,c),!1,g).length,v("D",S))}(t,i,0,p,h,r)+d(i,p,h,r)+function(l,c,y,C,g,S){var w;w=d(c,C,g,S).length>0?C-_(g,C):c;var R=C,L=function(k,E,x,M,T,U){var q;return q=d(x,M,T,U).length>0?M-_(T,M):E,k<x&&q<=M||k>=x&&q<M?"C":"D"}(l,c,y,C,g,S);return s(b(l,w,y,R,L==="C",g).length,v(L,S))}(t,i,a,p,h,r);if(i===p)return e=t>a?"D":"C",s(Math.abs(t-a),v(e,r));e=i>p?"D":"C";var n=Math.abs(i-p);return s(function(l,c){return c.cols-l}(i>p?a:t,h)+(n-1)*h.cols+1+((i>p?t:a)-1),v(e,r))}},4389:function(P,o,m){var u=this&&this.__assign||function(){return u=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},u.apply(this,arguments)},d=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var _=m(3236),f=m(9042),b=m(7975),v=m(7090),s=m(5741),a=m(8285),p=["cols","rows"],h=function(){function r(e){var t=this;this._core=new _.Terminal(e),this._addonManager=new s.AddonManager,this._publicOptions=u({},this._core.options);var i=function(y){return t._core.options[y]},n=function(y,C){t._checkReadonlyOptions(y),t._core.options[y]=C};for(var l in this._core.options){var c={get:i.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this._publicOptions,l,c)}}return r.prototype._checkReadonlyOptions=function(e){if(p.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},r.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(r.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new b.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"unicode",{get:function(){return this._checkProposedApi(),new v.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new a.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),r.prototype.blur=function(){this._core.blur()},r.prototype.focus=function(){this._core.focus()},r.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},r.prototype.open=function(e){this._core.open(e)},r.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},r.prototype.registerLinkMatcher=function(e,t,i){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,i)},r.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},r.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},r.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},r.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},r.prototype.registerMarker=function(e){return e===void 0&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},r.prototype.registerDecoration=function(e){var t,i,n;return this._checkProposedApi(),this._verifyPositiveIntegers((t=e.x)!==null&&t!==void 0?t:0,(i=e.width)!==null&&i!==void 0?i:0,(n=e.height)!==null&&n!==void 0?n:0),this._core.registerDecoration(e)},r.prototype.addMarker=function(e){return this.registerMarker(e)},r.prototype.hasSelection=function(){return this._core.hasSelection()},r.prototype.select=function(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)},r.prototype.getSelection=function(){return this._core.getSelection()},r.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},r.prototype.clearSelection=function(){this._core.clearSelection()},r.prototype.selectAll=function(){this._core.selectAll()},r.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},r.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},r.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},r.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},r.prototype.scrollToTop=function(){this._core.scrollToTop()},r.prototype.scrollToBottom=function(){this._core.scrollToBottom()},r.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},r.prototype.clear=function(){this._core.clear()},r.prototype.write=function(e,t){this._core.write(e,t)},r.prototype.writeUtf8=function(e,t){this._core.write(e,t)},r.prototype.writeln=function(e,t){this._core.write(e),this._core.write(`\r
4
4
  `,t)},r.prototype.paste=function(e){this._core.paste(e)},r.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},r.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},r.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},r.prototype.reset=function(){this._core.reset()},r.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},r.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(r,"strings",{get:function(){return f},enumerable:!1,configurable:!0}),r.prototype._verifyIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=d(i),c=l.next();!c.done;c=l.next()){var y=c.value;if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r.prototype._verifyPositiveIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=d(i),c=l.next();!c.done;c=l.next()){var y=c.value;if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r}();o.Terminal=h},1546:function(P,o,m){var u=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var d=m(643),_=m(8803),f=m(1420),b=m(3734),v=m(1752),s=m(8055),a=m(9631),p=m(8978),h=function(){function r(e,t,i,n,l,c,y,C,g){this._container=e,this._alpha=n,this._colors=l,this._rendererId=c,this._bufferService=y,this._optionsService=C,this._decorationService=g,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return r.prototype.dispose=function(){var e;(0,a.removeElementFromParent)(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},r.prototype._initCanvas=function(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},r.prototype.onOptionsChanged=function(){},r.prototype.onBlur=function(){},r.prototype.onFocus=function(){},r.prototype.onCursorMove=function(){},r.prototype.onGridChanged=function(e,t){},r.prototype.onSelectionChanged=function(e,t,i){i===void 0&&(i=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i},r.prototype.setColors=function(e){this._refreshCharAtlas(e)},r.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},r.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,f.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},r.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},r.prototype.clearTextureAtlas=function(){var e;(e=this._charAtlas)===null||e===void 0||e.clear()},r.prototype._fillCells=function(e,t,i,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight)},r.prototype._fillMiddleLineAtCells=function(e,t,i){i===void 0&&(i=1);var n=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-n-window.devicePixelRatio,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillBottomLineAtCells=function(e,t,i){i===void 0&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},r.prototype._strokeRectAtCell=function(e,t,i,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},r.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},r.prototype._clearCells=function(e,t,i,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight))},r.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipRow(i);var n=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(n=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),n||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},r.prototype._drawChars=function(e,t,i){var n,l,c,y=this._getContrastColor(e,t,i);if(y||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,i,y);else{var C,g;e.isInverse()?(C=e.isBgDefault()?_.INVERTED_DEFAULT_COLOR:e.getBgColor(),g=e.isFgDefault()?_.INVERTED_DEFAULT_COLOR:e.getFgColor()):(g=e.isBgDefault()?d.DEFAULT_COLOR:e.getBgColor(),C=e.isFgDefault()?d.DEFAULT_COLOR:e.getFgColor()),C+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&C<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||d.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||d.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=g,this._currentGlyphIdentifier.fg=C,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var S=!1;try{for(var w=u(this._decorationService.getDecorationsAtCell(t,i)),R=w.next();!R.done;R=w.next()){var L=R.value;if(L.backgroundColorRGB||L.foregroundColorRGB){S=!0;break}}}catch(k){n={error:k}}finally{try{R&&!R.done&&(l=w.return)&&l.call(w)}finally{if(n)throw n.error}}!S&&(!((c=this._charAtlas)===null||c===void 0)&&c.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,i)}},r.prototype._drawUncachedChars=function(e,t,i,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=_.TEXT_BASELINE,e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=s.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+b.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+b.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var c=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=_.DIM_OPACITY);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},r.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},r.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},r.prototype._getContrastColor=function(e,t,i){var n,l,c,y,C=!1;try{for(var g=u(this._decorationService.getDecorationsAtCell(t,i)),S=g.next();!S.done;S=g.next()){var w=S.value;w.options.layer!=="top"&&C||(w.backgroundColorRGB&&(c=w.backgroundColorRGB.rgba),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba),C=w.options.layer==="top")}}catch(ee){n={error:ee}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(n)throw n.error}}if(C||this._colors.selectionForeground&&this._isCellInSelection(t,i)&&(y=this._colors.selectionForeground.rgba),c||y||this._optionsService.rawOptions.minimumContrastRatio!==1&&!(0,v.excludeFromContrastRatioDemands)(e.getCode())){if(!c&&!y){var R=this._colors.contrastCache.getColor(e.bg,e.fg);if(R!==void 0)return R||void 0}var L=e.getFgColor(),k=e.getFgColorMode(),E=e.getBgColor(),x=e.getBgColorMode(),M=!!e.isInverse(),T=!!e.isInverse();if(M){var U=L;L=E,E=U;var q=k;k=x,x=q}var F=this._resolveBackgroundRgba(c!==void 0?50331648:x,c??E,M),z=this._resolveForegroundRgba(k,L,M,T),N=s.rgba.ensureContrastRatio(c??F,y??z,this._optionsService.rawOptions.minimumContrastRatio);if(!N){if(!y)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);N=y}var A={css:s.channels.toCss(N>>24&255,N>>16&255,N>>8&255),rgba:N};return c||y||this._colors.contrastCache.setColor(e.bg,e.fg,A),A}},r.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},r.prototype._resolveForegroundRgba=function(e,t,i,n){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&n&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},r.prototype._isCellInSelection=function(e,t){var i=this._selectionStart,n=this._selectionEnd;return!(!i||!n)&&(this._columnSelectMode?e>=i[0]&&t>=i[1]&&e<n[0]&&t<n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0])},r}();o.BaseRenderLayer=h},2512:function(P,o,m){var u,d=this&&this.__extends||(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},u(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}u(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),_=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},f=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var b=m(1546),v=m(511),s=m(2585),a=m(4725),p=600,h=function(e){function t(i,n,l,c,y,C,g,S,w,R){var L=e.call(this,i,"cursor",n,!0,l,c,C,g,R)||this;return L._onRequestRedraw=y,L._coreService=S,L._coreBrowserService=w,L._cell=new v.CellData,L._state={x:0,y:0,isFocused:!1,style:"",width:0},L._cursorRenderers={bar:L._renderBarCursor.bind(L),block:L._renderBlockCursor.bind(L),underline:L._renderUnderlineCursor.bind(L)},L}return d(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(i){e.prototype.resize.call(this,i),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var i;this._clearCursor(),(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var i,n=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new r(this._coreBrowserService.isFocused,function(){n._render(!0)})):((i=this._cursorBlinkStateManager)===null||i===void 0||i.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation()},t.prototype.onGridChanged=function(i,n){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(i){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=n-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)this._clearCursor();else{var c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(n).loadCell(c,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var y=this._optionsService.rawOptions.cursorStyle;return y&&y!=="block"?this._cursorRenderers[y](c,l,this._cell):this._renderBlurCursor(c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=y,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===c&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},t.prototype._renderBarCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(i,n,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(i,n,l.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(l,i,n),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(i,n),this._ctx.restore()},t.prototype._renderBlurCursor=function(i,n,l){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(i,n,l.getWidth(),1),this._ctx.restore()},_([f(5,s.IBufferService),f(6,s.IOptionsService),f(7,s.ICoreService),f(8,a.ICoreBrowserService),f(9,s.IDecorationService)],t)}(b.BaseRenderLayer);o.CursorRenderLayer=h;var r=function(){function e(t,i){this._renderCallback=i,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=void 0})))},e.prototype._restartInterval=function(t){var i=this;t===void 0&&(t=p),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(i._animationTimeRestarted){var n=p-(Date.now()-i._animationTimeRestarted);if(i._animationTimeRestarted=void 0,n>0)return void i._restartInterval(n)}i.isCursorVisible=!1,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0}),i._blinkInterval=window.setInterval(function(){if(i._animationTimeRestarted){var l=p-(Date.now()-i._animationTimeRestarted);return i._animationTimeRestarted=void 0,void i._restartInterval(l)}i.isCursorVisible=!i.isCursorVisible,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})},p)},t)},e.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(P,o,m){var u,d,_,f,b,v,s,a,p,h,r,e,t,i,n,l,c,y,C,g,S,w,R,L,k,E,x,M,T,U,q,F,z,N,A,ee,$,oe,B,ne,J,W,O,D,j,V,Y,te,ae,le,he,K,ue,ye,Ee,Fe,zt,Kt,Gt,Vt,Yt,Zt,Ge,Ve,Ye,Ze,Xe,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,dt,_t,pt,vt,yt,gt,mt,bt,St,Ct,wt,Lt,xt,Et,kt,Rt,At,Mt,Ot,Dt,Tt,Bt,Pt,It,Ht,jt,Ft,Wt,Ut,Xt,Jt,$t,Qt,er,tr,rr,ir,nr,or,sr,ar,cr,lr,hr,ur,br=this&&this.__read||function(I,H){var fe=typeof Symbol=="function"&&I[Symbol.iterator];if(!fe)return I;var ge,ke,Se=fe.call(I),ce=[];try{for(;(H===void 0||H-- >0)&&!(ge=Se.next()).done;)ce.push(ge.value)}catch(Ce){ke={error:Ce}}finally{try{ge&&!ge.done&&(fe=Se.return)&&fe.call(Se)}finally{if(ke)throw ke.error}}return ce},fr=this&&this.__values||function(I){var H=typeof Symbol=="function"&&Symbol.iterator,fe=H&&I[H],ge=0;if(fe)return fe.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&ge>=I.length&&(I=void 0),{value:I&&I[ge++],done:!I}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.powerlineDefinitions=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;var Sr=m(1752);o.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var Ur={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"─":(u={},u[1]="M0,.5 L1,.5",u),"━":(d={},d[3]="M0,.5 L1,.5",d),"│":(_={},_[1]="M.5,0 L.5,1",_),"┃":(f={},f[3]="M.5,0 L.5,1",f),"┌":(b={},b[1]="M0.5,1 L.5,.5 L1,.5",b),"┏":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"┐":(s={},s[1]="M0,.5 L.5,.5 L.5,1",s),"┓":(a={},a[3]="M0,.5 L.5,.5 L.5,1",a),"└":(p={},p[1]="M.5,0 L.5,.5 L1,.5",p),"┗":(h={},h[3]="M.5,0 L.5,.5 L1,.5",h),"┘":(r={},r[1]="M.5,0 L.5,.5 L0,.5",r),"┛":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"├":(t={},t[1]="M.5,0 L.5,1 M.5,.5 L1,.5",t),"┣":(i={},i[3]="M.5,0 L.5,1 M.5,.5 L1,.5",i),"┤":(n={},n[1]="M.5,0 L.5,1 M.5,.5 L0,.5",n),"┫":(l={},l[3]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"┬":(c={},c[1]="M0,.5 L1,.5 M.5,.5 L.5,1",c),"┳":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,1",y),"┴":(C={},C[1]="M0,.5 L1,.5 M.5,.5 L.5,0",C),"┻":(g={},g[3]="M0,.5 L1,.5 M.5,.5 L.5,0",g),"┼":(S={},S[1]="M0,.5 L1,.5 M.5,0 L.5,1",S),"╋":(w={},w[3]="M0,.5 L1,.5 M.5,0 L.5,1",w),"╴":(R={},R[1]="M.5,.5 L0,.5",R),"╸":(L={},L[3]="M.5,.5 L0,.5",L),"╵":(k={},k[1]="M.5,.5 L.5,0",k),"╹":(E={},E[3]="M.5,.5 L.5,0",E),"╶":(x={},x[1]="M.5,.5 L1,.5",x),"╺":(M={},M[3]="M.5,.5 L1,.5",M),"╷":(T={},T[1]="M.5,.5 L.5,1",T),"╻":(U={},U[3]="M.5,.5 L.5,1",U),"═":(q={},q[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},q),"║":(F={},F[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},F),"╒":(z={},z[1]=function(I,H){return"M.5,1 L.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},z),"╓":(N={},N[1]=function(I,H){return"M"+(.5-I)+",1 L"+(.5-I)+",.5 L1,.5 M"+(.5+I)+",.5 L"+(.5+I)+",1"},N),"╔":(A={},A[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},A),"╕":(ee={},ee[1]=function(I,H){return"M0,"+(.5-H)+" L.5,"+(.5-H)+" L.5,1 M0,"+(.5+H)+" L.5,"+(.5+H)},ee),"╖":($={},$[1]=function(I,H){return"M"+(.5+I)+",1 L"+(.5+I)+",.5 L0,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1"},$),"╗":(oe={},oe[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",1"},oe),"╘":(B={},B[1]=function(I,H){return"M.5,0 L.5,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5-H)+" L1,"+(.5-H)},B),"╙":(ne={},ne[1]=function(I,H){return"M1,.5 L"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},ne),"╚":(J={},J[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0 M1,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",0"},J),"╛":(W={},W[1]=function(I,H){return"M0,"+(.5+H)+" L.5,"+(.5+H)+" L.5,0 M0,"+(.5-H)+" L.5,"+(.5-H)},W),"╜":(O={},O[1]=function(I,H){return"M0,.5 L"+(.5+I)+",.5 L"+(.5+I)+",0 M"+(.5-I)+",.5 L"+(.5-I)+",0"},O),"╝":(D={},D[1]=function(I,H){return"M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M0,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",0"},D),"╞":(j={},j[1]=function(I,H){return"M.5,0 L.5,1 M.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},j),"╟":(V={},V[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1 M"+(.5+I)+",.5 L1,.5"},V),"╠":(Y={},Y[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Y),"╡":(te={},te[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L.5,"+(.5-H)+" M0,"+(.5+H)+" L.5,"+(.5+H)},te),"╢":(ae={},ae[1]=function(I,H){return"M0,.5 L"+(.5-I)+",.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},ae),"╣":(le={},le[1]=function(I,H){return"M"+(.5+I)+",0 L"+(.5+I)+",1 M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0"},le),"╤":(he={},he[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5+H)+" L.5,1"},he),"╥":(K={},K[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1 M"+(.5+I)+",.5 L"+(.5+I)+",1"},K),"╦":(ue={},ue[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},ue),"╧":(ye={},ye[1]=function(I,H){return"M.5,0 L.5,"+(.5-H)+" M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},ye),"╨":(Ee={},Ee[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},Ee),"╩":(Fe={},Fe[1]=function(I,H){return"M0,"+(.5+H)+" L1,"+(.5+H)+" M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Fe),"╪":(zt={},zt[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},zt),"╫":(Kt={},Kt[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},Kt),"╬":(Gt={},Gt[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Gt),"╱":(Vt={},Vt[1]="M1,0 L0,1",Vt),"╲":(Yt={},Yt[1]="M0,0 L1,1",Yt),"╳":(Zt={},Zt[1]="M1,0 L0,1 M0,0 L1,1",Zt),"╼":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,.5 L1,.5",Ge),"╽":(Ve={},Ve[1]="M.5,.5 L.5,0",Ve[3]="M.5,.5 L.5,1",Ve),"╾":(Ye={},Ye[1]="M.5,.5 L1,.5",Ye[3]="M.5,.5 L0,.5",Ye),"╿":(Ze={},Ze[1]="M.5,.5 L.5,1",Ze[3]="M.5,.5 L.5,0",Ze),"┍":(Xe={},Xe[1]="M.5,.5 L.5,1",Xe[3]="M.5,.5 L1,.5",Xe),"┎":(Je={},Je[1]="M.5,.5 L1,.5",Je[3]="M.5,.5 L.5,1",Je),"┑":($e={},$e[1]="M.5,.5 L.5,1",$e[3]="M.5,.5 L0,.5",$e),"┒":(Qe={},Qe[1]="M.5,.5 L0,.5",Qe[3]="M.5,.5 L.5,1",Qe),"┕":(et={},et[1]="M.5,.5 L.5,0",et[3]="M.5,.5 L1,.5",et),"┖":(tt={},tt[1]="M.5,.5 L1,.5",tt[3]="M.5,.5 L.5,0",tt),"┙":(rt={},rt[1]="M.5,.5 L.5,0",rt[3]="M.5,.5 L0,.5",rt),"┚":(it={},it[1]="M.5,.5 L0,.5",it[3]="M.5,.5 L.5,0",it),"┝":(nt={},nt[1]="M.5,0 L.5,1",nt[3]="M.5,.5 L1,.5",nt),"┞":(ot={},ot[1]="M0.5,1 L.5,.5 L1,.5",ot[3]="M.5,.5 L.5,0",ot),"┟":(st={},st[1]="M.5,0 L.5,.5 L1,.5",st[3]="M.5,.5 L.5,1",st),"┠":(at={},at[1]="M.5,.5 L1,.5",at[3]="M.5,0 L.5,1",at),"┡":(ct={},ct[1]="M.5,.5 L.5,1",ct[3]="M.5,0 L.5,.5 L1,.5",ct),"┢":(lt={},lt[1]="M.5,.5 L.5,0",lt[3]="M0.5,1 L.5,.5 L1,.5",lt),"┥":(ht={},ht[1]="M.5,0 L.5,1",ht[3]="M.5,.5 L0,.5",ht),"┦":(ut={},ut[1]="M0,.5 L.5,.5 L.5,1",ut[3]="M.5,.5 L.5,0",ut),"┧":(ft={},ft[1]="M.5,0 L.5,.5 L0,.5",ft[3]="M.5,.5 L.5,1",ft),"┨":(dt={},dt[1]="M.5,.5 L0,.5",dt[3]="M.5,0 L.5,1",dt),"┩":(_t={},_t[1]="M.5,.5 L.5,1",_t[3]="M.5,0 L.5,.5 L0,.5",_t),"┪":(pt={},pt[1]="M.5,.5 L.5,0",pt[3]="M0,.5 L.5,.5 L.5,1",pt),"┭":(vt={},vt[1]="M0.5,1 L.5,.5 L1,.5",vt[3]="M.5,.5 L0,.5",vt),"┮":(yt={},yt[1]="M0,.5 L.5,.5 L.5,1",yt[3]="M.5,.5 L1,.5",yt),"┯":(gt={},gt[1]="M.5,.5 L.5,1",gt[3]="M0,.5 L1,.5",gt),"┰":(mt={},mt[1]="M0,.5 L1,.5",mt[3]="M.5,.5 L.5,1",mt),"┱":(bt={},bt[1]="M.5,.5 L1,.5",bt[3]="M0,.5 L.5,.5 L.5,1",bt),"┲":(St={},St[1]="M.5,.5 L0,.5",St[3]="M0.5,1 L.5,.5 L1,.5",St),"┵":(Ct={},Ct[1]="M.5,0 L.5,.5 L1,.5",Ct[3]="M.5,.5 L0,.5",Ct),"┶":(wt={},wt[1]="M.5,0 L.5,.5 L0,.5",wt[3]="M.5,.5 L1,.5",wt),"┷":(Lt={},Lt[1]="M.5,.5 L.5,0",Lt[3]="M0,.5 L1,.5",Lt),"┸":(xt={},xt[1]="M0,.5 L1,.5",xt[3]="M.5,.5 L.5,0",xt),"┹":(Et={},Et[1]="M.5,.5 L1,.5",Et[3]="M.5,0 L.5,.5 L0,.5",Et),"┺":(kt={},kt[1]="M.5,.5 L0,.5",kt[3]="M.5,0 L.5,.5 L1,.5",kt),"┽":(Rt={},Rt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Rt[3]="M.5,.5 L0,.5",Rt),"┾":(At={},At[1]="M.5,0 L.5,1 M.5,.5 L0,.5",At[3]="M.5,.5 L1,.5",At),"┿":(Mt={},Mt[1]="M.5,0 L.5,1",Mt[3]="M0,.5 L1,.5",Mt),"╀":(Ot={},Ot[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ot[3]="M.5,.5 L.5,0",Ot),"╁":(Dt={},Dt[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Dt[3]="M.5,.5 L.5,1",Dt),"╂":(Tt={},Tt[1]="M0,.5 L1,.5",Tt[3]="M.5,0 L.5,1",Tt),"╃":(Bt={},Bt[1]="M0.5,1 L.5,.5 L1,.5",Bt[3]="M.5,0 L.5,.5 L0,.5",Bt),"╄":(Pt={},Pt[1]="M0,.5 L.5,.5 L.5,1",Pt[3]="M.5,0 L.5,.5 L1,.5",Pt),"╅":(It={},It[1]="M.5,0 L.5,.5 L1,.5",It[3]="M0,.5 L.5,.5 L.5,1",It),"╆":(Ht={},Ht[1]="M.5,0 L.5,.5 L0,.5",Ht[3]="M0.5,1 L.5,.5 L1,.5",Ht),"╇":(jt={},jt[1]="M.5,.5 L.5,1",jt[3]="M.5,.5 L.5,0 M0,.5 L1,.5",jt),"╈":(Ft={},Ft[1]="M.5,.5 L.5,0",Ft[3]="M0,.5 L1,.5 M.5,.5 L.5,1",Ft),"╉":(Wt={},Wt[1]="M.5,.5 L1,.5",Wt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Wt),"╊":(Ut={},Ut[1]="M.5,.5 L0,.5",Ut[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Ut),"╌":(Xt={},Xt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Xt),"╍":(Jt={},Jt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Jt),"┄":($t={},$t[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",$t),"┅":(Qt={},Qt[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Qt),"┈":(er={},er[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",er),"┉":(tr={},tr[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",tr),"╎":(rr={},rr[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",rr),"╏":(ir={},ir[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",ir),"┆":(nr={},nr[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",nr),"┇":(or={},or[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",or),"┊":(sr={},sr[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",sr),"┋":(ar={},ar[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",ar),"╭":(cr={},cr[1]="C.5,1,.5,.5,1,.5",cr),"╮":(lr={},lr[1]="C.5,1,.5,.5,0,.5",lr),"╯":(hr={},hr[1]="C.5,0,.5,.5,0,.5",hr),"╰":(ur={},ur[1]="C.5,0,.5,.5,1,.5",ur)},o.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0},"":{d:"M0,0 L1,.5 L0,1",type:1,horizontalPadding:.5},"":{d:"M1,0 L0,.5 L1,1",type:0},"":{d:"M1,0 L0,.5 L1,1",type:1,horizontalPadding:.5}},o.tryDrawCustomChar=function(I,H,fe,ge,ke,Se){var ce=o.blockElementDefinitions[H];if(ce)return function(se,me,Ie,He,Te,Be){for(var de=0;de<me.length;de++){var _e=me[de],ie=Te/8,pe=Be/8;se.fillRect(Ie+_e.x*ie,He+_e.y*pe,_e.w*ie,_e.h*pe)}}(I,ce,fe,ge,ke,Se),!0;var Ce=Ur[H];if(Ce)return function(se,me,Ie,He,Te,Be){var de,_e=Cr.get(me);_e||(_e=new Map,Cr.set(me,_e));var ie=se.fillStyle;if(typeof ie!="string")throw new Error('Unexpected fillStyle type "'+ie+'"');var pe=_e.get(ie);if(!pe){var ve=me[0].length,we=me.length,Ae=document.createElement("canvas");Ae.width=ve,Ae.height=we;var je=(0,Sr.throwIfFalsy)(Ae.getContext("2d")),Le=new ImageData(ve,we),We=void 0,Pe=void 0,De=void 0,Ue=void 0;if(ie.startsWith("#"))We=parseInt(ie.slice(1,3),16),Pe=parseInt(ie.slice(3,5),16),De=parseInt(ie.slice(5,7),16),Ue=ie.length>7&&parseInt(ie.slice(7,9),16)||1;else{if(!ie.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+ie+'" when drawing pattern glyph');We=(de=br(ie.substring(5,ie.length-1).split(",").map(function(ze){return parseFloat(ze)}),4))[0],Pe=de[1],De=de[2],Ue=de[3]}for(var Me=0;Me<we;Me++)for(var Oe=0;Oe<ve;Oe++)Le.data[4*(Me*ve+Oe)]=We,Le.data[4*(Me*ve+Oe)+1]=Pe,Le.data[4*(Me*ve+Oe)+2]=De,Le.data[4*(Me*ve+Oe)+3]=me[Me][Oe]*(255*Ue);je.putImageData(Le,0,0),pe=(0,Sr.throwIfFalsy)(se.createPattern(Ae,null)),_e.set(ie,pe)}se.fillStyle=pe,se.fillRect(Ie,He,Te,Be)}(I,Ce,fe,ge,ke,Se),!0;var Re=o.boxDrawingDefinitions[H];if(Re)return function(se,me,Ie,He,Te,Be){var de,_e,ie,pe;se.strokeStyle=se.fillStyle;try{for(var ve=fr(Object.entries(me)),we=ve.next();!we.done;we=ve.next()){var Ae=br(we.value,2),je=Ae[0],Le=Ae[1];se.beginPath(),se.lineWidth=window.devicePixelRatio*Number.parseInt(je);var We=void 0;We=typeof Le=="function"?Le(.15,.15/Be*Te):Le;try{for(var Pe=(ie=void 0,fr(We.split(" "))),De=Pe.next();!De.done;De=Pe.next()){var Ue=De.value,Me=Ue[0],Oe=Lr[Me];if(Oe){var ze=Ue.substring(1).split(",");ze[0]&&ze[1]&&Oe(se,xr(ze,Te,Be,Ie,He))}else console.error('Could not find drawing instructions for "'+Me+'"')}}catch(dr){ie={error:dr}}finally{try{De&&!De.done&&(pe=Pe.return)&&pe.call(Pe)}finally{if(ie)throw ie.error}}se.stroke(),se.closePath()}}catch(dr){de={error:dr}}finally{try{we&&!we.done&&(_e=ve.return)&&_e.call(ve)}finally{if(de)throw de.error}}}(I,Re,fe,ge,ke,Se),!0;var Ne=o.powerlineDefinitions[H];return!!Ne&&(function(se,me,Ie,He,Te,Be){var de,_e;se.beginPath(),se.lineWidth=window.devicePixelRatio;try{for(var ie=fr(me.d.split(" ")),pe=ie.next();!pe.done;pe=ie.next()){var ve=pe.value,we=ve[0],Ae=Lr[we];if(Ae){var je=ve.substring(1).split(",");je[0]&&je[1]&&Ae(se,xr(je,Te,Be,Ie,He,me.horizontalPadding))}else console.error('Could not find drawing instructions for "'+we+'"')}}catch(Le){de={error:Le}}finally{try{pe&&!pe.done&&(_e=ie.return)&&_e.call(ie)}finally{if(de)throw de.error}}me.type===1?(se.strokeStyle=se.fillStyle,se.stroke()):se.fill(),se.closePath()}(I,Ne,fe,ge,ke,Se),!0)};var Cr=new Map;function wr(I,H,fe){return Math.max(Math.min(I,H),fe)}var Lr={C:function(I,H){return I.bezierCurveTo(H[0],H[1],H[2],H[3],H[4],H[5])},L:function(I,H){return I.lineTo(H[0],H[1])},M:function(I,H){return I.moveTo(H[0],H[1])}};function xr(I,H,fe,ge,ke,Se){Se===void 0&&(Se=0);var ce=I.map(function(Ne){return parseFloat(Ne)||parseInt(Ne)});if(ce.length<2)throw new Error("Too few arguments for instruction");for(var Ce=0;Ce<ce.length;Ce+=2)ce[Ce]*=H-2*Se*window.devicePixelRatio,ce[Ce]!==0&&(ce[Ce]=wr(Math.round(ce[Ce]+.5)-.5,H,0)),ce[Ce]+=ge+Se*window.devicePixelRatio;for(var Re=1;Re<ce.length;Re+=2)ce[Re]*=fe,ce[Re]!==0&&(ce[Re]=wr(Math.round(ce[Re]+.5)-.5,fe,0)),ce[Re]+=ke;return ce}},3700:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var m=function(){function u(){this.cache=[]}return u.prototype.resize=function(d,_){for(var f=0;f<d;f++){this.cache.length<=f&&this.cache.push([]);for(var b=this.cache[f].length;b<_;b++)this.cache[f].push(void 0);this.cache[f].length=_}this.cache.length=d},u.prototype.clear=function(){for(var d=0;d<this.cache.length;d++)for(var _=0;_<this.cache[d].length;_++)this.cache[d][_]=void 0},u}();o.GridCache=m},5098:function(P,o,m){var u,d=this&&this.__extends||(u=function(h,r){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},u(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}u(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),_=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},f=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var b=m(1546),v=m(8803),s=m(2040),a=m(2585),p=function(h){function r(e,t,i,n,l,c,y,C,g){var S=h.call(this,e,"link",t,!0,i,n,y,C,g)||this;return l.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),l.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),c.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),c.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),S}return d(r,h),r.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state=void 0},r.prototype.reset=function(){this._clearCurrentLink()},r.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},r.prototype._onShowLinkUnderline=function(e){if(e.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,s.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},r.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},_([f(6,a.IBufferService),f(7,a.IOptionsService),f(8,a.IDecorationService)],r)}(b.BaseRenderLayer);o.LinkRenderLayer=p},3525:function(P,o,m){var u,d=this&&this.__extends||(u=function(c,y){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,g){C.__proto__=g}||function(C,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(C[S]=g[S])},u(c,y)},function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function C(){this.constructor=c}u(c,y),c.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)}),_=this&&this.__decorate||function(c,y,C,g){var S,w=arguments.length,R=w<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,C):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(c,y,C,g);else for(var L=c.length-1;L>=0;L--)(S=c[L])&&(R=(w<3?S(R):w>3?S(y,C,R):S(y,C))||R);return w>3&&R&&Object.defineProperty(y,C,R),R},f=this&&this.__param||function(c,y){return function(C,g){y(C,g,c)}},b=this&&this.__values||function(c){var y=typeof Symbol=="function"&&Symbol.iterator,C=y&&c[y],g=0;if(C)return C.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&g>=c.length&&(c=void 0),{value:c&&c[g++],done:!c}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var v=m(9596),s=m(4149),a=m(2512),p=m(5098),h=m(844),r=m(4725),e=m(2585),t=m(1420),i=m(8460),n=1,l=function(c){function y(C,g,S,w,R,L,k,E){var x=c.call(this)||this;x._colors=C,x._screenElement=g,x._bufferService=L,x._charSizeService=k,x._optionsService=E,x._id=n++,x._onRequestRedraw=new i.EventEmitter;var M=x._optionsService.rawOptions.allowTransparency;return x._renderLayers=[R.createInstance(v.TextRenderLayer,x._screenElement,0,x._colors,M,x._id),R.createInstance(s.SelectionRenderLayer,x._screenElement,1,x._colors,x._id),R.createInstance(p.LinkRenderLayer,x._screenElement,2,x._colors,x._id,S,w),R.createInstance(a.CursorRenderLayer,x._screenElement,3,x._colors,x._id,x._onRequestRedraw)],x.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},x._devicePixelRatio=window.devicePixelRatio,x._updateDimensions(),x.onOptionsChanged(),x}return d(y,c),Object.defineProperty(y.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){var C,g;try{for(var S=b(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.dispose()}catch(R){C={error:R}}finally{try{w&&!w.done&&(g=S.return)&&g.call(S)}finally{if(C)throw C.error}}c.prototype.dispose.call(this),(0,t.removeTerminalFromCache)(this._id)},y.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},y.prototype.setColors=function(C){var g,S;this._colors=C;try{for(var w=b(this._renderLayers),R=w.next();!R.done;R=w.next()){var L=R.value;L.setColors(this._colors),L.reset()}}catch(k){g={error:k}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(g)throw g.error}}},y.prototype.onResize=function(C,g){var S,w;this._updateDimensions();try{for(var R=b(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.resize(this.dimensions)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},y.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},y.prototype.onBlur=function(){this._runOperation(function(C){return C.onBlur()})},y.prototype.onFocus=function(){this._runOperation(function(C){return C.onFocus()})},y.prototype.onSelectionChanged=function(C,g,S){S===void 0&&(S=!1),this._runOperation(function(w){return w.onSelectionChanged(C,g,S)}),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},y.prototype.onCursorMove=function(){this._runOperation(function(C){return C.onCursorMove()})},y.prototype.onOptionsChanged=function(){this._runOperation(function(C){return C.onOptionsChanged()})},y.prototype.clear=function(){this._runOperation(function(C){return C.reset()})},y.prototype._runOperation=function(C){var g,S;try{for(var w=b(this._renderLayers),R=w.next();!R.done;R=w.next())C(R.value)}catch(L){g={error:L}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(g)throw g.error}}},y.prototype.renderRows=function(C,g){var S,w;try{for(var R=b(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.onGridChanged(C,g)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}},y.prototype.clearTextureAtlas=function(){var C,g;try{for(var S=b(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.clearTextureAtlas()}catch(R){C={error:R}}finally{try{w&&!w.done&&(g=S.return)&&g.call(S)}finally{if(C)throw C.error}}},y.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},_([f(4,e.IInstantiationService),f(5,e.IBufferService),f(6,r.ICharSizeService),f(7,e.IOptionsService)],y)}(h.Disposable);o.Renderer=l},1752:(P,o)=>{function m(u){return 57508<=u&&u<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.excludeFromContrastRatioDemands=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(u){if(!u)throw new Error("value must not be falsy");return u},o.isPowerlineGlyph=m,o.excludeFromContrastRatioDemands=function(u){return m(u)||function(d){return 9472<=d&&d<=9631}(u)}},4149:function(P,o,m){var u,d=this&&this.__extends||(u=function(a,p){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(h[e]=r[e])},u(a,p)},function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function h(){this.constructor=a}u(a,p),a.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}),_=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},f=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var b=m(1546),v=m(2585),s=function(a){function p(h,r,e,t,i,n,l){var c=a.call(this,h,"selection",r,!0,e,t,i,n,l)||this;return c._clearState(),c}return d(p,a),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(h){a.prototype.resize.call(this,h),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(h,r,e){if(a.prototype.onSelectionChanged.call(this,h,r,e),this._didStateChange(h,r,e,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var t=h[1]-this._bufferService.buffer.ydisp,i=r[1]-this._bufferService.buffer.ydisp,n=Math.max(t,0),l=Math.min(i,this._bufferService.rows-1);if(n>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var c=h[0],y=r[0]-c,C=l-n+1;this._fillCells(c,n,y,C)}else{c=t===n?h[0]:0;var g=n===i?r[0]:this._bufferService.cols;this._fillCells(c,n,g-c,1);var S=Math.max(l-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,S),n!==l){var w=i===l?r[0]:this._bufferService.cols;this._fillCells(0,l,w,1)}}this._state.start=[h[0],h[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(h,r,e,t){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||e!==this._state.columnSelectMode||t!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},_([f(4,v.IBufferService),f(5,v.IOptionsService),f(6,v.IDecorationService)],p)}(b.BaseRenderLayer);o.SelectionRenderLayer=s},9596:function(P,o,m){var u,d=this&&this.__extends||(u=function(n,l){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(c[C]=y[C])},u(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}u(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),_=this&&this.__decorate||function(n,l,c,y){var C,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,c):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,y);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(g<3?C(S):g>3?C(l,c,S):C(l,c))||S);return g>3&&S&&Object.defineProperty(l,c,S),S},f=this&&this.__param||function(n,l){return function(c,y){l(c,y,n)}},b=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],y=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var v=m(3700),s=m(1546),a=m(3734),p=m(643),h=m(511),r=m(2585),e=m(4725),t=m(4269),i=function(n){function l(c,y,C,g,S,w,R,L,k){var E=n.call(this,c,"text",y,g,C,S,w,R,k)||this;return E._characterJoinerService=L,E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new h.CellData,E._state=new v.GridCache,E}return d(l,n),l.prototype.resize=function(c){n.prototype.resize.call(this,c);var y=this._getFont(!1,!1);this._characterWidth===c.scaledCharWidth&&this._characterFont===y||(this._characterWidth=c.scaledCharWidth,this._characterFont=y,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(c,y,C){for(var g=c;g<=y;g++)for(var S=g+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.lines.get(S),R=this._characterJoinerService.getJoinedCharacters(S),L=0;L<this._bufferService.cols;L++){w.loadCell(L,this._workCell);var k=this._workCell,E=!1,x=L;if(k.getWidth()!==0){if(R.length>0&&L===R[0][0]){E=!0;var M=R.shift();k=new t.JoinedCellData(this._workCell,w.translateToString(!0,M[0],M[1]),M[1]-M[0]),x=M[1]-1}!E&&this._isOverlapping(k)&&x<w.length-1&&w.getCodePoint(x+1)===p.NULL_CELL_CODE&&(k.content&=-12582913,k.content|=2<<22),C(k,L,g),L=x}}},l.prototype._drawBackground=function(c,y){var C=this,g=this._ctx,S=this._bufferService.cols,w=0,R=0,L=null;g.save(),this._forEachCell(c,y,function(k,E,x){var M,T,U=null;k.isInverse()?U=k.isFgDefault()?C._colors.foreground.css:k.isFgRGB()?"rgb("+a.AttributeData.toColorRGB(k.getFgColor()).join(",")+")":C._colors.ansi[k.getFgColor()].css:k.isBgRGB()?U="rgb("+a.AttributeData.toColorRGB(k.getBgColor()).join(",")+")":k.isBgPalette()&&(U=C._colors.ansi[k.getBgColor()].css);var q=!1;try{for(var F=b(C._decorationService.getDecorationsAtCell(E,C._bufferService.buffer.ydisp+x)),z=F.next();!z.done;z=F.next()){var N=z.value;N.options.layer!=="top"&&q||(N.backgroundColorRGB&&(U=N.backgroundColorRGB.css),q=N.options.layer==="top")}}catch(A){M={error:A}}finally{try{z&&!z.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}L===null&&(w=E,R=x),x!==R?(g.fillStyle=L||"",C._fillCells(w,R,S-w,1),w=E,R=x):L!==U&&(g.fillStyle=L||"",C._fillCells(w,R,E-w,1),w=E,R=x),L=U}),L!==null&&(g.fillStyle=L,this._fillCells(w,R,S-w,1)),g.restore()},l.prototype._drawForeground=function(c,y){var C=this;this._forEachCell(c,y,function(g,S,w){if(!g.isInvisible()&&(C._drawChars(g,S,w),g.isUnderline()||g.isStrikethrough())){if(C._ctx.save(),g.isInverse())if(g.isBgDefault())C._ctx.fillStyle=C._colors.background.css;else if(g.isBgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(g.getBgColor()).join(",")+")";else{var R=g.getBgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&R<8&&(R+=8),C._ctx.fillStyle=C._colors.ansi[R].css}else if(g.isFgDefault())C._ctx.fillStyle=C._colors.foreground.css;else if(g.isFgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(g.getFgColor()).join(",")+")";else{var L=g.getFgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&L<8&&(L+=8),C._ctx.fillStyle=C._colors.ansi[L].css}g.isStrikethrough()&&C._fillMiddleLineAtCells(S,w,g.getWidth()),g.isUnderline()&&C._fillBottomLineAtCells(S,w,g.getWidth()),C._ctx.restore()}})},l.prototype.onGridChanged=function(c,y){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,c,this._bufferService.cols,y-c+1),this._drawBackground(c,y),this._drawForeground(c,y))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},l.prototype._isOverlapping=function(c){if(c.getWidth()!==1||c.getCode()<256)return!1;var y=c.getChars();if(this._characterOverlapCache.hasOwnProperty(y))return this._characterOverlapCache[y];this._ctx.save(),this._ctx.font=this._characterFont;var C=Math.floor(this._ctx.measureText(y).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[y]=C,C},_([f(5,r.IBufferService),f(6,r.IOptionsService),f(7,e.ICharacterJoinerService),f(8,r.IDecorationService)],l)}(s.BaseRenderLayer);o.TextRenderLayer=i},9616:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var m=function(){function u(){this._didWarmUp=!1}return u.prototype.dispose=function(){},u.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},u.prototype._doWarmUp=function(){},u.prototype.clear=function(){},u.prototype.beginFrame=function(){},u}();o.BaseCharAtlas=m},1420:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var u=m(2040),d=m(1906),_=[];o.acquireCharAtlas=function(f,b,v,s,a){for(var p=(0,u.generateConfig)(s,a,f,v),h=0;h<_.length;h++){var r=(e=_[h]).ownedBy.indexOf(b);if(r>=0){if((0,u.configEquals)(e.config,p))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),_.splice(h,1)):e.ownedBy.splice(r,1);break}}for(h=0;h<_.length;h++){var e=_[h];if((0,u.configEquals)(e.config,p))return e.ownedBy.push(b),e.atlas}var t={atlas:new d.DynamicCharAtlas(document,p),config:p,ownedBy:[b]};return _.push(t),t.atlas},o.removeTerminalFromCache=function(f){for(var b=0;b<_.length;b++){var v=_[b].ownedBy.indexOf(f);if(v!==-1){_[b].ownedBy.length===1?(_[b].atlas.dispose(),_.splice(b,1)):_[b].ownedBy.splice(v,1);break}}}},2040:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var u=m(643);o.generateConfig=function(d,_,f,b){var v={foreground:b.foreground,background:b.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:b.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:d,scaledCharHeight:_,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,colors:v}},o.configEquals=function(d,_){for(var f=0;f<d.colors.ansi.length;f++)if(d.colors.ansi[f].rgba!==_.colors.ansi[f].rgba)return!1;return d.devicePixelRatio===_.devicePixelRatio&&d.fontFamily===_.fontFamily&&d.fontSize===_.fontSize&&d.fontWeight===_.fontWeight&&d.fontWeightBold===_.fontWeightBold&&d.allowTransparency===_.allowTransparency&&d.scaledCharWidth===_.scaledCharWidth&&d.scaledCharHeight===_.scaledCharHeight&&d.colors.foreground===_.colors.foreground&&d.colors.background===_.colors.background},o.is256Color=function(d){return d<u.DEFAULT_COLOR}},8803:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;var u=m(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic",o.CHAR_ATLAS_CELL_SPACING=1},1906:function(P,o,m){var u,d=this&&this.__extends||(u=function(c,y){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,g){C.__proto__=g}||function(C,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(C[S]=g[S])},u(c,y)},function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function C(){this.constructor=c}u(c,y),c.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var _=m(8803),f=m(9616),b=m(5680),v=m(7001),s=m(6114),a=m(1752),p=m(8055),h=1024,r=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function t(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}o.getGlyphCacheKey=t;var i=function(c){function y(C,g){var S=c.call(this)||this;S._config=g,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=C.createElement("canvas"),S._cacheCanvas.width=h,S._cacheCanvas.height=r,S._cacheCtx=(0,a.throwIfFalsy)(S._cacheCanvas.getContext("2d",{alpha:!0}));var w=C.createElement("canvas");w.width=S._config.scaledCharWidth,w.height=S._config.scaledCharHeight,S._tmpCtx=(0,a.throwIfFalsy)(w.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(h/S._config.scaledCharWidth),S._height=Math.floor(r/S._config.scaledCharHeight);var R=S._width*S._height;return S._cacheMap=new v.LRUMap(R),S._cacheMap.prealloc(R),S}return d(y,c),y.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},y.prototype.beginFrame=function(){this._drawToCacheCount=0},y.prototype.clear=function(){if(this._cacheMap.size>0){var C=this._width*this._height;this._cacheMap=new v.LRUMap(C),this._cacheMap.prealloc(C)}this._cacheCtx.clearRect(0,0,h,r),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},y.prototype.draw=function(C,g,S,w){if(g.code===32)return!0;if(!this._canCache(g))return!1;var R=t(g),L=this._cacheMap.get(R);if(L!=null)return this._drawFromCache(C,L,S,w),!0;if(this._drawToCacheCount<100){var k;k=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var E=this._drawToCache(g,k);return this._cacheMap.set(R,E),this._drawFromCache(C,E,S,w),!0}return!1},y.prototype._canCache=function(C){return C.code<256},y.prototype._toCoordinateX=function(C){return C%this._width*this._config.scaledCharWidth},y.prototype._toCoordinateY=function(C){return Math.floor(C/this._width)*this._config.scaledCharHeight},y.prototype._drawFromCache=function(C,g,S,w){if(!g.isEmpty){var R=this._toCoordinateX(g.index),L=this._toCoordinateY(g.index);C.drawImage(g.inBitmap?this._bitmap:this._cacheCanvas,R,L,this._config.scaledCharWidth,this._config.scaledCharHeight,S,w,this._config.scaledCharWidth,this._config.scaledCharHeight)}},y.prototype._getColorFromAnsiIndex=function(C){return C<this._config.colors.ansi.length?this._config.colors.ansi[C]:b.DEFAULT_ANSI_COLORS[C]},y.prototype._getBackgroundColor=function(C){return this._config.allowTransparency?e:C.bg===_.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:C.bg<256?this._getColorFromAnsiIndex(C.bg):this._config.colors.background},y.prototype._getForegroundColor=function(C){return C.fg===_.INVERTED_DEFAULT_COLOR?p.color.opaque(this._config.colors.background):C.fg<256?this._getColorFromAnsiIndex(C.fg):this._config.colors.foreground},y.prototype._drawToCache=function(C,g){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var w=C.bold?this._config.fontWeightBold:this._config.fontWeight,R=C.italic?"italic":"";this._tmpCtx.font=R+" "+w+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=_.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(C).css,C.dim&&(this._tmpCtx.globalAlpha=_.DIM_OPACITY),this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight);var L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),k=!1;if(this._config.allowTransparency||(k=l(L,S)),k&&C.chars==="_"&&!this._config.allowTransparency)for(var E=1;E<=5&&(this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight-E),k=l(L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),S));E++);this._tmpCtx.restore();var x=this._toCoordinateX(g),M=this._toCoordinateY(g);this._cacheCtx.putImageData(L,x,M);var T={index:g,isEmpty:k,inBitmap:!1};return this._addGlyphToBitmap(T),T},y.prototype._addGlyphToBitmap=function(C){var g=this;!("createImageBitmap"in window)||s.isFirefox||s.isSafari||(this._glyphsWaitingOnBitmap.push(C),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return g._generateBitmap()},100)))},y.prototype._generateBitmap=function(){var C=this,g=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){C._bitmap=S;for(var w=0;w<g.length;w++)g[w].inBitmap=!0}),this._bitmapCommitTimeout=null},y}(f.BaseCharAtlas);o.DynamicCharAtlas=i;var n=function(c){function y(C,g){return c.call(this)||this}return d(y,c),y.prototype.draw=function(C,g,S,w){return!1},y}(f.BaseCharAtlas);function l(c,y){for(var C=!0,g=y.rgba>>>24,S=y.rgba>>>16&255,w=y.rgba>>>8&255,R=0;R<c.data.length;R+=4)c.data[R]===g&&c.data[R+1]===S&&c.data[R+2]===w?c.data[R+3]=0:C=!1;return C}o.NoneCharAtlas=n},7001:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var m=function(){function u(d){this.capacity=d,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return u.prototype._unlinkNode=function(d){var _=d.prev,f=d.next;d===this._head&&(this._head=f),d===this._tail&&(this._tail=_),_!==null&&(_.next=f),f!==null&&(f.prev=_)},u.prototype._appendNode=function(d){var _=this._tail;_!==null&&(_.next=d),d.prev=_,d.next=null,this._tail=d,this._head===null&&(this._head=d)},u.prototype.prealloc=function(d){for(var _=this._nodePool,f=0;f<d;f++)_.push({prev:null,next:null,key:null,value:null})},u.prototype.get=function(d){var _=this._map[d];return _!==void 0?(this._unlinkNode(_),this._appendNode(_),_.value):null},u.prototype.peekValue=function(d){var _=this._map[d];return _!==void 0?_.value:null},u.prototype.peek=function(){var d=this._head;return d===null?null:d.value},u.prototype.set=function(d,_){var f=this._map[d];if(f!==void 0)f=this._map[d],this._unlinkNode(f),f.value=_;else if(this.size>=this.capacity)f=this._head,this._unlinkNode(f),delete this._map[f.key],f.key=d,f.value=_,this._map[d]=f;else{var b=this._nodePool;b.length>0?((f=b.pop()).key=d,f.value=_):f={prev:null,next:null,key:d,value:_},this._map[d]=f,this.size++}this._appendNode(f)},u}();o.LRUMap=m},1296:function(P,o,m){var u,d=this&&this.__extends||(u=function(g,S){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,R){w.__proto__=R}||function(w,R){for(var L in R)Object.prototype.hasOwnProperty.call(R,L)&&(w[L]=R[L])},u(g,S)},function(g,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function w(){this.constructor=g}u(g,S),g.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}),_=this&&this.__decorate||function(g,S,w,R){var L,k=arguments.length,E=k<3?S:R===null?R=Object.getOwnPropertyDescriptor(S,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,S,w,R);else for(var x=g.length-1;x>=0;x--)(L=g[x])&&(E=(k<3?L(E):k>3?L(S,w,E):L(S,w))||E);return k>3&&E&&Object.defineProperty(S,w,E),E},f=this&&this.__param||function(g,S){return function(w,R){S(w,R,g)}},b=this&&this.__values||function(g){var S=typeof Symbol=="function"&&Symbol.iterator,w=S&&g[S],R=0;if(w)return w.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&R>=g.length&&(g=void 0),{value:g&&g[R++],done:!g}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var v=m(3787),s=m(8803),a=m(844),p=m(4725),h=m(2585),r=m(8460),e=m(8055),t=m(9631),i="xterm-dom-renderer-owner-",n="xterm-fg-",l="xterm-bg-",c="xterm-focus",y=1,C=function(g){function S(w,R,L,k,E,x,M,T,U,q){var F=g.call(this)||this;return F._colors=w,F._element=R,F._screenElement=L,F._viewportElement=k,F._linkifier=E,F._linkifier2=x,F._charSizeService=T,F._optionsService=U,F._bufferService=q,F._terminalClass=y++,F._rowElements=[],F._rowContainer=document.createElement("div"),F._rowContainer.classList.add("xterm-rows"),F._rowContainer.style.lineHeight="normal",F._rowContainer.setAttribute("aria-hidden","true"),F._refreshRowElements(F._bufferService.cols,F._bufferService.rows),F._selectionContainer=document.createElement("div"),F._selectionContainer.classList.add("xterm-selection"),F._selectionContainer.setAttribute("aria-hidden","true"),F.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},F._updateDimensions(),F._injectCss(),F._rowFactory=M.createInstance(v.DomRendererRowFactory,document,F._colors),F._element.classList.add(i+F._terminalClass),F._screenElement.appendChild(F._rowContainer),F._screenElement.appendChild(F._selectionContainer),F.register(F._linkifier.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F.register(F._linkifier2.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier2.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F}return d(S,g),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._element.classList.remove(i+this._terminalClass),(0,t.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),g.prototype.dispose.call(this)},S.prototype._updateDimensions=function(){var w,R;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var L=b(this._rowElements),k=L.next();!k.done;k=L.next()){var E=k.value;E.style.width=this.dimensions.canvasWidth+"px",E.style.height=this.dimensions.actualCellHeight+"px",E.style.lineHeight=this.dimensions.actualCellHeight+"px",E.style.overflow="hidden"}}catch(M){w={error:M}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.setColors=function(w){this._colors=w,this._injectCss()},S.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var R=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";R+=this._terminalSelector+" span:not(."+v.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+v.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+v.ITALIC_CLASS+" { font-style: italic;}",R+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",R+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",R+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+":not(."+v.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",R+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionOpaque.css+";}",this._colors.ansi.forEach(function(L,k){R+=w._terminalSelector+" ."+n+k+" { color: "+L.css+"; }"+w._terminalSelector+" ."+l+k+" { background-color: "+L.css+"; }"}),R+=this._terminalSelector+" ."+n+s.INVERTED_DEFAULT_COLOR+" { color: "+e.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+s.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=R},S.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},S.prototype._refreshRowElements=function(w,R){for(var L=this._rowElements.length;L<=R;L++){var k=document.createElement("div");this._rowContainer.appendChild(k),this._rowElements.push(k)}for(;this._rowElements.length>R;)this._rowContainer.removeChild(this._rowElements.pop())},S.prototype.onResize=function(w,R){this._refreshRowElements(w,R),this._updateDimensions()},S.prototype.onCharSizeChanged=function(){this._updateDimensions()},S.prototype.onBlur=function(){this._rowContainer.classList.remove(c)},S.prototype.onFocus=function(){this._rowContainer.classList.add(c)},S.prototype.onSelectionChanged=function(w,R,L){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(w,R,L),this.renderRows(0,this._bufferService.rows-1),w&&R){var k=w[1]-this._bufferService.buffer.ydisp,E=R[1]-this._bufferService.buffer.ydisp,x=Math.max(k,0),M=Math.min(E,this._bufferService.rows-1);if(!(x>=this._bufferService.rows||M<0)){var T=document.createDocumentFragment();if(L){var U=w[0]>R[0];T.appendChild(this._createSelectionElement(x,U?R[0]:w[0],U?w[0]:R[0],M-x+1))}else{var q=k===x?w[0]:0,F=x===E?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(x,q,F));var z=M-x-1;if(T.appendChild(this._createSelectionElement(x+1,0,this._bufferService.cols,z)),x!==M){var N=E===M?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(M,0,N))}}this._selectionContainer.appendChild(T)}}},S.prototype._createSelectionElement=function(w,R,L,k){k===void 0&&(k=1);var E=document.createElement("div");return E.style.height=k*this.dimensions.actualCellHeight+"px",E.style.top=w*this.dimensions.actualCellHeight+"px",E.style.left=R*this.dimensions.actualCellWidth+"px",E.style.width=this.dimensions.actualCellWidth*(L-R)+"px",E},S.prototype.onCursorMove=function(){},S.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},S.prototype.clear=function(){var w,R;try{for(var L=b(this._rowElements),k=L.next();!k.done;k=L.next())k.value.innerText=""}catch(E){w={error:E}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}},S.prototype.renderRows=function(w,R){for(var L=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),E=this._optionsService.rawOptions.cursorBlink,x=w;x<=R;x++){var M=this._rowElements[x];M.innerText="";var T=x+this._bufferService.buffer.ydisp,U=this._bufferService.buffer.lines.get(T),q=this._optionsService.rawOptions.cursorStyle;M.appendChild(this._rowFactory.createRow(U,T,T===L,q,k,E,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(S.prototype,"_terminalSelector",{get:function(){return"."+i+this._terminalClass},enumerable:!1,configurable:!0}),S.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},S.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},S.prototype._setCellUnderline=function(w,R,L,k,E,x){for(;w!==R||L!==k;){var M=this._rowElements[L];if(!M)return;var T=M.children[w];T&&(T.style.textDecoration=x?"underline":"none"),++w>=E&&(w=0,L++)}},_([f(6,h.IInstantiationService),f(7,p.ICharSizeService),f(8,h.IOptionsService),f(9,h.IBufferService)],S)}(a.Disposable);o.DomRenderer=C},3787:function(P,o,m){var u=this&&this.__decorate||function(i,n,l,c){var y,C=arguments.length,g=C<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,n,l,c);else for(var S=i.length-1;S>=0;S--)(y=i[S])&&(g=(C<3?y(g):C>3?y(n,l,g):y(n,l))||g);return C>3&&g&&Object.defineProperty(n,l,g),g},d=this&&this.__param||function(i,n){return function(l,c){n(l,c,i)}},_=this&&this.__values||function(i){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&i[n],c=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&c>=i.length&&(i=void 0),{value:i&&i[c++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.STRIKETHROUGH_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var f=m(8803),b=m(643),v=m(511),s=m(2585),a=m(8055),p=m(4725),h=m(4269),r=m(1752);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.STRIKETHROUGH_CLASS="xterm-strikethrough",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var e=function(){function i(n,l,c,y,C,g){this._document=n,this._colors=l,this._characterJoinerService=c,this._optionsService=y,this._coreService=C,this._decorationService=g,this._workCell=new v.CellData,this._columnSelectMode=!1}return i.prototype.setColors=function(n){this._colors=n},i.prototype.onSelectionChanged=function(n,l,c){this._selectionStart=n,this._selectionEnd=l,this._columnSelectMode=c},i.prototype.createRow=function(n,l,c,y,C,g,S,w){for(var R,L,k=this._document.createDocumentFragment(),E=this._characterJoinerService.getJoinedCharacters(l),x=0,M=Math.min(n.length,w)-1;M>=0;M--)if(n.loadCell(M,this._workCell).getCode()!==b.NULL_CELL_CODE||c&&M===C){x=M+1;break}for(M=0;M<x;M++){n.loadCell(M,this._workCell);var T=this._workCell.getWidth();if(T!==0){var U=!1,q=M,F=this._workCell;if(E.length>0&&M===E[0][0]){U=!0;var z=E.shift();F=new h.JoinedCellData(this._workCell,n.translateToString(!0,z[0],z[1]),z[1]-z[0]),q=z[1]-1,T=F.getWidth()}var N=this._document.createElement("span");if(T>1&&(N.style.width=S*T+"px"),U&&(N.style.display="inline",C>=M&&C<=q&&(C=M)),!this._coreService.isCursorHidden&&c&&M===C)switch(N.classList.add(o.CURSOR_CLASS),g&&N.classList.add(o.CURSOR_BLINK_CLASS),y){case"bar":N.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":N.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:N.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}F.isBold()&&N.classList.add(o.BOLD_CLASS),F.isItalic()&&N.classList.add(o.ITALIC_CLASS),F.isDim()&&N.classList.add(o.DIM_CLASS),F.isUnderline()&&N.classList.add(o.UNDERLINE_CLASS),F.isInvisible()?N.textContent=b.WHITESPACE_CELL_CHAR:N.textContent=F.getChars()||b.WHITESPACE_CELL_CHAR,F.isStrikethrough()&&N.classList.add(o.STRIKETHROUGH_CLASS);var A=F.getFgColor(),ee=F.getFgColorMode(),$=F.getBgColor(),oe=F.getBgColorMode(),B=!!F.isInverse();if(B){var ne=A;A=$,$=ne;var J=ee;ee=oe,oe=J}var W=void 0,O=void 0,D=!1;try{for(var j=(R=void 0,_(this._decorationService.getDecorationsAtCell(M,l))),V=j.next();!V.done;V=j.next()){var Y=V.value;Y.options.layer!=="top"&&D||(Y.backgroundColorRGB&&(oe=50331648,$=Y.backgroundColorRGB.rgba>>8&16777215,W=Y.backgroundColorRGB),Y.foregroundColorRGB&&(ee=50331648,A=Y.foregroundColorRGB.rgba>>8&16777215,O=Y.foregroundColorRGB),D=Y.options.layer==="top")}}catch(he){R={error:he}}finally{try{V&&!V.done&&(L=j.return)&&L.call(j)}finally{if(R)throw R.error}}var te=this._isCellInSelection(M,l);D||this._colors.selectionForeground&&te&&(ee=50331648,A=this._colors.selectionForeground.rgba>>8&16777215,O=this._colors.selectionForeground),te&&(W=this._colors.selectionOpaque,D=!0),D&&N.classList.add("xterm-decoration-top");var ae=void 0;switch(oe){case 16777216:case 33554432:ae=this._colors.ansi[$],N.classList.add("xterm-bg-"+$);break;case 50331648:ae=a.rgba.toColor($>>16,$>>8&255,255&$),this._addStyle(N,"background-color:#"+t(($>>>0).toString(16),"0",6));break;default:B?(ae=this._colors.foreground,N.classList.add("xterm-bg-"+f.INVERTED_DEFAULT_COLOR)):ae=this._colors.background}switch(ee){case 16777216:case 33554432:F.isBold()&&A<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(A+=8),this._applyMinimumContrast(N,ae,this._colors.ansi[A],F,W,void 0)||N.classList.add("xterm-fg-"+A);break;case 50331648:var le=a.rgba.toColor(A>>16&255,A>>8&255,255&A);this._applyMinimumContrast(N,ae,le,F,W,O)||this._addStyle(N,"color:#"+t(A.toString(16),"0",6));break;default:this._applyMinimumContrast(N,ae,this._colors.foreground,F,W,void 0)||B&&N.classList.add("xterm-fg-"+f.INVERTED_DEFAULT_COLOR)}k.appendChild(N),M=q}}return k},i.prototype._applyMinimumContrast=function(n,l,c,y,C,g){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,r.excludeFromContrastRatioDemands)(y.getCode()))return!1;var S=void 0;return C||g||(S=this._colors.contrastCache.getColor(l.rgba,c.rgba)),S===void 0&&(S=a.color.ensureContrastRatio(C||l,g||c,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((C||l).rgba,(g||c).rgba,S??null)),!!S&&(this._addStyle(n,"color:"+S.css),!0)},i.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},i.prototype._isCellInSelection=function(n,l){var c=this._selectionStart,y=this._selectionEnd;return!(!c||!y)&&(this._columnSelectMode?c[0]<=y[0]?n>=c[0]&&l>=c[1]&&n<y[0]&&l<=y[1]:n<c[0]&&l>=c[1]&&n>=y[0]&&l<=y[1]:l>c[1]&&l<y[1]||c[1]===y[1]&&l===c[1]&&n>=c[0]&&n<y[0]||c[1]<y[1]&&l===y[1]&&n<y[0]||c[1]<y[1]&&l===c[1]&&n>=c[0])},u([d(2,p.ICharacterJoinerService),d(3,s.IOptionsService),d(4,s.ICoreService),d(5,s.IDecorationService)],i)}();function t(i,n,l){for(;i.length<l;)i=n+i;return i}o.DomRendererRowFactory=e},456:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var m=function(){function u(d){this._bufferService=d,this.isSelectAllActive=!1,this.selectionStartLength=0}return u.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(u.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(d=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(d=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:void 0;var d},enumerable:!1,configurable:!0}),u.prototype.areSelectionValuesReversed=function(){var d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])},u.prototype.onTrim=function(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},u}();o.SelectionModel=m},428:function(P,o,m){var u=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},d=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var _=m(2585),f=m(8460),b=function(){function s(a,p,h){this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=new f.EventEmitter,this._measureStrategy=new v(a,p,this._optionsService)}return Object.defineProperty(s.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),s.prototype.measure=function(){var a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())},u([d(2,_.IOptionsService)],s)}();o.CharSizeService=b;var v=function(){function s(a,p,h){this._document=a,this._parentElement=p,this._optionsService=h,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return s.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var a=this._measureElement.getBoundingClientRect();return a.width!==0&&a.height!==0&&(this._result.width=a.width,this._result.height=Math.ceil(a.height)),this._result},s}()},4269:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),_=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},f=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;var b=m(3734),v=m(643),s=m(511),a=m(2585),p=function(r){function e(t,i,n){var l=r.call(this)||this;return l.content=0,l.combinedData="",l.fg=t.fg,l.bg=t.bg,l.combinedData=i,l._width=n,l}return d(e,r),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(b.AttributeData);o.JoinedCellData=p;var h=function(){function r(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}return r.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},r.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},r.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];for(var i=[],n=t.translateToString(!0),l=0,c=0,y=0,C=t.getFg(0),g=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==g){if(S-l>1)for(var w=this._getJoinedRanges(n,y,c,t,l),R=0;R<w.length;R++)i.push(w[R]);l=S,y=c,C=this._workCell.fg,g=this._workCell.bg}c+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-l>1)for(w=this._getJoinedRanges(n,y,c,t,l),R=0;R<w.length;R++)i.push(w[R]);return i},r.prototype._getJoinedRanges=function(e,t,i,n,l){var c=e.substring(t,i),y=[];try{y=this._characterJoiners[0].handler(c)}catch(w){console.error(w)}for(var C=1;C<this._characterJoiners.length;C++)try{for(var g=this._characterJoiners[C].handler(c),S=0;S<g.length;S++)r._mergeRanges(y,g[S])}catch(w){console.error(w)}return this._stringRangesToCellRanges(y,n,l),y},r.prototype._stringRangesToCellRanges=function(e,t,i){var n=0,l=!1,c=0,y=e[n];if(y){for(var C=i;C<this._bufferService.cols;C++){var g=t.getWidth(C),S=t.getString(C).length||v.WHITESPACE_CELL_CHAR.length;if(g!==0){if(!l&&y[0]<=c&&(y[0]=C,l=!0),y[1]<=c){if(y[1]=C,!(y=e[++n]))break;y[0]<=c?(y[0]=C,l=!0):l=!1}c+=S}}y&&(y[1]=this._bufferService.cols)}},r._mergeRanges=function(e,t){for(var i=!1,n=0;n<e.length;n++){var l=e[n];if(i){if(t[1]<=l[0])return e[n-1][1]=t[1],e;if(t[1]<=l[1])return e[n-1][1]=Math.max(t[1],l[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=l[0])return e.splice(n,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e},r=_([f(0,a.IBufferService)],r)}();o.CharacterJoinerService=h},5114:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var m=function(){function u(d){this._textarea=d}return Object.defineProperty(u.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),u}();o.CoreBrowserService=m},8934:function(P,o,m){var u=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},d=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var _=m(4725),f=m(9806),b=function(){function v(s,a){this._renderService=s,this._charSizeService=a}return v.prototype.getCoords=function(s,a,p,h,r){return(0,f.getCoords)(window,s,a,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)},v.prototype.getRawByteCoords=function(s,a,p,h){var r=this.getCoords(s,a,p,h);return(0,f.getRawByteCoords)(r)},u([d(0,_.IRenderService),d(1,_.ICharSizeService)],v)}();o.MouseService=b},3230:function(P,o,m){var u,d=this&&this.__extends||(u=function(t,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(n[c]=l[c])},u(t,i)},function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}u(t,i),t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}),_=this&&this.__decorate||function(t,i,n,l){var c,y=arguments.length,C=y<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(t,i,n,l);else for(var g=t.length-1;g>=0;g--)(c=t[g])&&(C=(y<3?c(C):y>3?c(i,n,C):c(i,n))||C);return y>3&&C&&Object.defineProperty(i,n,C),C},f=this&&this.__param||function(t,i){return function(n,l){i(n,l,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var b=m(6193),v=m(8460),s=m(844),a=m(5596),p=m(3656),h=m(2585),r=m(4725),e=function(t){function i(n,l,c,y,C,g,S){var w=t.call(this)||this;if(w._renderer=n,w._rowCount=l,w._charSizeService=C,w._isPaused=!1,w._needsFullRefresh=!1,w._isNextRenderRedrawOnly=!0,w._needsSelectionRefresh=!1,w._canvasWidth=0,w._canvasHeight=0,w._selectionState={start:void 0,end:void 0,columnSelectMode:!1},w._onDimensionsChange=new v.EventEmitter,w._onRenderedViewportChange=new v.EventEmitter,w._onRender=new v.EventEmitter,w._onRefreshRequest=new v.EventEmitter,w.register({dispose:function(){return w._renderer.dispose()}}),w._renderDebouncer=new b.RenderDebouncer(function(L,k){return w._renderRows(L,k)}),w.register(w._renderDebouncer),w._screenDprMonitor=new a.ScreenDprMonitor,w._screenDprMonitor.setListener(function(){return w.onDevicePixelRatioChange()}),w.register(w._screenDprMonitor),w.register(S.onResize(function(){return w._fullRefresh()})),w.register(S.buffers.onBufferActivate(function(){var L;return(L=w._renderer)===null||L===void 0?void 0:L.clear()})),w.register(y.onOptionChange(function(){return w._handleOptionsChanged()})),w.register(w._charSizeService.onCharSizeChange(function(){return w.onCharSizeChanged()})),w.register(g.onDecorationRegistered(function(){return w._fullRefresh()})),w.register(g.onDecorationRemoved(function(){return w._fullRefresh()})),w._renderer.onRequestRedraw(function(L){return w.refreshRows(L.start,L.end,!0)}),w.register((0,p.addDisposableDomListener)(window,"resize",function(){return w.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var R=new IntersectionObserver(function(L){return w._onIntersectionChange(L[L.length-1])},{threshold:0});R.observe(c),w.register({dispose:function(){return R.disconnect()}})}return w}return d(i,t),Object.defineProperty(i.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),i.prototype._onIntersectionChange=function(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},i.prototype.refreshRows=function(n,l,c){c===void 0&&(c=!1),this._isPaused?this._needsFullRefresh=!0:(c||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))},i.prototype._renderRows=function(n,l){this._renderer.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0},i.prototype.resize=function(n,l){this._rowCount=l,this._fireOnCanvasResize()},i.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},i.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},i.prototype.dispose=function(){t.prototype.dispose.call(this)},i.prototype.setRenderer=function(n){var l=this;this._renderer.dispose(),this._renderer=n,this._renderer.onRequestRedraw(function(c){return l.refreshRows(c.start,c.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},i.prototype.addRefreshCallback=function(n){return this._renderDebouncer.addRefreshCallback(n)},i.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},i.prototype.clearTextureAtlas=function(){var n,l;(l=(n=this._renderer)===null||n===void 0?void 0:n.clearTextureAtlas)===null||l===void 0||l.call(n),this._fullRefresh()},i.prototype.setColors=function(n){this._renderer.setColors(n),this._fullRefresh()},i.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},i.prototype.onResize=function(n,l){this._renderer.onResize(n,l),this._fullRefresh()},i.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},i.prototype.onBlur=function(){this._renderer.onBlur()},i.prototype.onFocus=function(){this._renderer.onFocus()},i.prototype.onSelectionChanged=function(n,l,c){this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=c,this._renderer.onSelectionChanged(n,l,c)},i.prototype.onCursorMove=function(){this._renderer.onCursorMove()},i.prototype.clear=function(){this._renderer.clear()},_([f(3,h.IOptionsService),f(4,r.ICharSizeService),f(5,h.IDecorationService),f(6,h.IBufferService)],i)}(s.Disposable);o.RenderService=e},9312:function(P,o,m){var u,d=this&&this.__extends||(u=function(y,C){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,S){g.__proto__=S}||function(g,S){for(var w in S)Object.prototype.hasOwnProperty.call(S,w)&&(g[w]=S[w])},u(y,C)},function(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function g(){this.constructor=y}u(y,C),y.prototype=C===null?Object.create(C):(g.prototype=C.prototype,new g)}),_=this&&this.__decorate||function(y,C,g,S){var w,R=arguments.length,L=R<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,C,g,S);else for(var k=y.length-1;k>=0;k--)(w=y[k])&&(L=(R<3?w(L):R>3?w(C,g,L):w(C,g))||L);return R>3&&L&&Object.defineProperty(C,g,L),L},f=this&&this.__param||function(y,C){return function(g,S){C(g,S,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var b=m(6114),v=m(456),s=m(511),a=m(8460),p=m(4725),h=m(2585),r=m(9806),e=m(9504),t=m(844),i=m(4841),n=" ",l=new RegExp(n,"g"),c=function(y){function C(g,S,w,R,L,k,E,x){var M=y.call(this)||this;return M._element=g,M._screenElement=S,M._linkifier=w,M._bufferService=R,M._coreService=L,M._mouseService=k,M._optionsService=E,M._renderService=x,M._dragScrollAmount=0,M._enabled=!0,M._workCell=new s.CellData,M._mouseDownTimeStamp=0,M._oldHasSelection=!1,M._oldSelectionStart=void 0,M._oldSelectionEnd=void 0,M._onLinuxMouseSelection=M.register(new a.EventEmitter),M._onRedrawRequest=M.register(new a.EventEmitter),M._onSelectionChange=M.register(new a.EventEmitter),M._onRequestScrollLines=M.register(new a.EventEmitter),M._mouseMoveListener=function(T){return M._onMouseMove(T)},M._mouseUpListener=function(T){return M._onMouseUp(T)},M._coreService.onUserInput(function(){M.hasSelection&&M.clearSelection()}),M._trimListener=M._bufferService.buffer.lines.onTrim(function(T){return M._onTrim(T)}),M.register(M._bufferService.buffers.onBufferActivate(function(T){return M._onBufferActivate(T)})),M.enable(),M._model=new v.SelectionModel(M._bufferService),M._activeSelectionMode=0,M}return d(C,y),Object.defineProperty(C.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){this._removeMouseDownListeners()},C.prototype.reset=function(){this.clearSelection()},C.prototype.disable=function(){this.clearSelection(),this._enabled=!1},C.prototype.enable=function(){this._enabled=!0},Object.defineProperty(C.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasSelection",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!g||!S||g[0]===S[0]&&g[1]===S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionText",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!g||!S)return"";var w=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(g[0]===S[0])return"";for(var L=g[0]<S[0]?g[0]:S[0],k=g[0]<S[0]?S[0]:g[0],E=g[1];E<=S[1];E++){var x=w.translateBufferLineToString(E,!0,L,k);R.push(x)}}else{var M=g[1]===S[1]?S[0]:void 0;for(R.push(w.translateBufferLineToString(g[1],!0,g[0],M)),E=g[1]+1;E<=S[1]-1;E++){var T=w.lines.get(E);x=w.translateBufferLineToString(E,!0),T!=null&&T.isWrapped?R[R.length-1]+=x:R.push(x)}g[1]!==S[1]&&(T=w.lines.get(S[1]),x=w.translateBufferLineToString(S[1],!0,0,S[0]),T&&T.isWrapped?R[R.length-1]+=x:R.push(x))}return R.map(function(U){return U.replace(l," ")}).join(b.isWindows?`\r
5
5
  `:`
6
6
  `)},enumerable:!1,configurable:!0}),C.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},C.prototype.refresh=function(g){var S=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return S._refresh()})),b.isLinux&&g&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},C.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},C.prototype._isClickInSelection=function(g){var S=this._getMouseBufferCoords(g),w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!!(w&&R&&S)&&this._areCoordsInSelection(S,w,R)},C.prototype.isCellInSelection=function(g,S){var w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!w||!R)&&this._areCoordsInSelection([g,S],w,R)},C.prototype._areCoordsInSelection=function(g,S,w){return g[1]>S[1]&&g[1]<w[1]||S[1]===w[1]&&g[1]===S[1]&&g[0]>=S[0]&&g[0]<w[0]||S[1]<w[1]&&g[1]===w[1]&&g[0]<w[0]||S[1]<w[1]&&g[1]===S[1]&&g[0]>=S[0]},C.prototype._selectWordAtCursor=function(g,S){var w,R,L=(R=(w=this._linkifier.currentLink)===null||w===void 0?void 0:w.link)===null||R===void 0?void 0:R.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,i.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var k=this._getMouseBufferCoords(g);return!!k&&(this._selectWordAt(k,S),this._model.selectionEnd=void 0,!0)},C.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},C.prototype.selectLines=function(g,S){this._model.clearSelection(),g=Math.max(g,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()},C.prototype._onTrim=function(g){this._model.onTrim(g)&&this.refresh()},C.prototype._getMouseBufferCoords=function(g){var S=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S},C.prototype._getMouseEventScrollAmount=function(g){var S=(0,r.getCoordsRelativeToElement)(window,g,this._screenElement)[1],w=this._renderService.dimensions.canvasHeight;return S>=0&&S<=w?0:(S>w&&(S-=w),S=Math.min(Math.max(S,-50),50),(S/=50)/Math.abs(S)+Math.round(14*S))},C.prototype.shouldForceSelection=function(g){return b.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey},C.prototype.onMouseDown=function(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._onIncrementalClick(g):g.detail===1?this._onSingleClick(g):g.detail===2?this._onDoubleClick(g):g.detail===3&&this._onTripleClick(g),this._addMouseDownListeners(),this.refresh(!0)}},C.prototype._addMouseDownListeners=function(){var g=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return g._dragScroll()},50)},C.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},C.prototype._onIncrementalClick=function(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))},C.prototype._onSingleClick=function(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),this._model.selectionStart){this._model.selectionEnd=void 0;var S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},C.prototype._onDoubleClick=function(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)},C.prototype._onTripleClick=function(g){var S=this._getMouseBufferCoords(g);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))},C.prototype.shouldColumnSelect=function(g){return g.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},C.prototype._onMouseMove=function(g){if(g.stopImmediatePropagation(),this._model.selectionStart){var S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var w=this._bufferService.buffer;if(this._model.selectionEnd[1]<w.lines.length){var R=w.lines.get(this._model.selectionEnd[1]);R&&R.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},C.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}},C.prototype._onMouseUp=function(g){var S=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&g.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var w=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(w&&w[0]!==void 0&&w[1]!==void 0){var R=(0,e.moveToCellSequence)(w[0]-1,w[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(R,!0)}}}else this._fireEventIfSelectionChanged()},C.prototype._fireEventIfSelectionChanged=function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,w=!(!g||!S||g[0]===S[0]&&g[1]===S[1]);w?g&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,S,w)):this._oldHasSelection&&this._fireOnSelectionChange(g,S,w)},C.prototype._fireOnSelectionChange=function(g,S,w){this._oldSelectionStart=g,this._oldSelectionEnd=S,this._oldHasSelection=w,this._onSelectionChange.fire()},C.prototype._onBufferActivate=function(g){var S=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(function(w){return S._onTrim(w)})},C.prototype._convertViewportColToCharacterIndex=function(g,S){for(var w=S[0],R=0;S[0]>=R;R++){var L=g.loadCell(R,this._workCell).getChars().length;this._workCell.getWidth()===0?w--:L>1&&S[0]!==R&&(w+=L-1)}return w},C.prototype.setSelection=function(g,S,w){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,S],this._model.selectionStartLength=w,this.refresh(),this._fireEventIfSelectionChanged()},C.prototype.rightClickSelect=function(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},C.prototype._getWordAt=function(g,S,w,R){if(w===void 0&&(w=!0),R===void 0&&(R=!0),!(g[0]>=this._bufferService.cols)){var L=this._bufferService.buffer,k=L.lines.get(g[1]);if(k){var E=L.translateBufferLineToString(g[1],!1),x=this._convertViewportColToCharacterIndex(k,g),M=x,T=g[0]-x,U=0,q=0,F=0,z=0;if(E.charAt(x)===" "){for(;x>0&&E.charAt(x-1)===" ";)x--;for(;M<E.length&&E.charAt(M+1)===" ";)M++}else{var N=g[0],A=g[0];k.getWidth(N)===0&&(U++,N--),k.getWidth(A)===2&&(q++,A++);var ee=k.getString(A).length;for(ee>1&&(z+=ee-1,M+=ee-1);N>0&&x>0&&!this._isCharWordSeparator(k.loadCell(N-1,this._workCell));){k.loadCell(N-1,this._workCell);var $=this._workCell.getChars().length;this._workCell.getWidth()===0?(U++,N--):$>1&&(F+=$-1,x-=$-1),x--,N--}for(;A<k.length&&M+1<E.length&&!this._isCharWordSeparator(k.loadCell(A+1,this._workCell));){k.loadCell(A+1,this._workCell);var oe=this._workCell.getChars().length;this._workCell.getWidth()===2?(q++,A++):oe>1&&(z+=oe-1,M+=oe-1),M++,A++}}M++;var B=x+T-U+F,ne=Math.min(this._bufferService.cols,M-x+U+q-F-z);if(S||E.slice(x,M).trim()!==""){if(w&&B===0&&k.getCodePoint(0)!==32){var J=L.lines.get(g[1]-1);if(J&&k.isWrapped&&J.getCodePoint(this._bufferService.cols-1)!==32){var W=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(W){var O=this._bufferService.cols-W.start;B-=O,ne+=O}}}if(R&&B+ne===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var D=L.lines.get(g[1]+1);if(D!=null&&D.isWrapped&&D.getCodePoint(0)!==32){var j=this._getWordAt([0,g[1]+1],!1,!1,!0);j&&(ne+=j.length)}}return{start:B,length:ne}}}}},C.prototype._selectWordAt=function(g,S){var w=this._getWordAt(g,S);if(w){for(;w.start<0;)w.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[w.start,g[1]],this._model.selectionStartLength=w.length}},C.prototype._selectToWordAt=function(g){var S=this._getWordAt(g,!0);if(S){for(var w=g[1];S.start<0;)S.start+=this._bufferService.cols,w--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,w++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,w]}},C.prototype._isCharWordSeparator=function(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0},C.prototype._selectLineAt=function(g){var S=this._bufferService.buffer.getWrappedRangeForLine(g),w={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,i.getRangeLength)(w,this._bufferService.cols)},_([f(3,h.IBufferService),f(4,h.ICoreService),f(5,p.IMouseService),f(6,h.IOptionsService),f(7,p.IRenderService)],C)}(t.Disposable);o.SelectionService=c},4725:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ICharacterJoinerService=o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var u=m(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ISoundService=(0,u.createDecorator)("SoundService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService")},357:function(P,o,m){var u=this&&this.__decorate||function(b,v,s,a){var p,h=arguments.length,r=h<3?v:a===null?a=Object.getOwnPropertyDescriptor(v,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(b,v,s,a);else for(var e=b.length-1;e>=0;e--)(p=b[e])&&(r=(h<3?p(r):h>3?p(v,s,r):p(v,s))||r);return h>3&&r&&Object.defineProperty(v,s,r),r},d=this&&this.__param||function(b,v){return function(s,a){v(s,a,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var _=m(2585),f=function(){function b(v){this._optionsService=v}return Object.defineProperty(b,"audioContext",{get:function(){if(!b._audioContext){var v=window.AudioContext||window.webkitAudioContext;if(!v)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;b._audioContext=new v}return b._audioContext},enumerable:!1,configurable:!0}),b.prototype.playBellSound=function(){var v=b.audioContext;if(v){var s=v.createBufferSource();v.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(a){s.buffer=a,s.connect(v.destination),s.start(0)})}},b.prototype._base64ToArrayBuffer=function(v){for(var s=window.atob(v),a=s.length,p=new Uint8Array(a),h=0;h<a;h++)p[h]=s.charCodeAt(h);return p.buffer},b.prototype._removeMimeType=function(v){return v.split(",")[1]},b=u([d(0,_.IOptionsService)],b)}();o.SoundService=f},6349:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var u=m(8460),d=function(){function _(f){this._maxLength=f,this.onDeleteEmitter=new u.EventEmitter,this.onInsertEmitter=new u.EventEmitter,this.onTrimEmitter=new u.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(_.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"maxLength",{get:function(){return this._maxLength},set:function(f){if(this._maxLength!==f){for(var b=new Array(f),v=0;v<Math.min(f,this.length);v++)b[v]=this._array[this._getCyclicIndex(v)];this._array=b,this._maxLength=f,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._length},set:function(f){if(f>this._length)for(var b=this._length;b<f;b++)this._array[b]=void 0;this._length=f},enumerable:!1,configurable:!0}),_.prototype.get=function(f){return this._array[this._getCyclicIndex(f)]},_.prototype.set=function(f,b){this._array[this._getCyclicIndex(f)]=b},_.prototype.push=function(f){this._array[this._getCyclicIndex(this._length)]=f,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},_.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(_.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),_.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},_.prototype.splice=function(f,b){for(var v=[],s=2;s<arguments.length;s++)v[s-2]=arguments[s];if(b){for(var a=f;a<this._length-b;a++)this._array[this._getCyclicIndex(a)]=this._array[this._getCyclicIndex(a+b)];this._length-=b,this.onDeleteEmitter.fire({index:f,amount:b})}for(a=this._length-1;a>=f;a--)this._array[this._getCyclicIndex(a+v.length)]=this._array[this._getCyclicIndex(a)];for(a=0;a<v.length;a++)this._array[this._getCyclicIndex(f+a)]=v[a];if(v.length&&this.onInsertEmitter.fire({index:f,amount:v.length}),this._length+v.length>this._maxLength){var p=this._length+v.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=v.length},_.prototype.trimStart=function(f){f>this._length&&(f=this._length),this._startIndex+=f,this._length-=f,this.onTrimEmitter.fire(f)},_.prototype.shiftElements=function(f,b,v){if(!(b<=0)){if(f<0||f>=this._length)throw new Error("start argument out of range");if(f+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(var s=b-1;s>=0;s--)this.set(f+s+v,this.get(f+s));var a=f+b+v-this._length;if(a>0)for(this._length+=a;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(s=0;s<b;s++)this.set(f+s+v,this.get(f+s))}},_.prototype._getCyclicIndex=function(f){return(this._startIndex+f)%this._maxLength},_}();o.CircularList=d},1439:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function m(u,d){if(d===void 0&&(d=5),typeof u!="object")return u;var _=Array.isArray(u)?[]:{};for(var f in u)_[f]=d<=1?u[f]:u[f]&&m(u[f],d-1);return _}},8055:function(P,o){var m,u,d,_,f=this&&this.__read||function(s,a){var p=typeof Symbol=="function"&&s[Symbol.iterator];if(!p)return s;var h,r,e=p.call(s),t=[];try{for(;(a===void 0||a-- >0)&&!(h=e.next()).done;)t.push(h.value)}catch(i){r={error:i}}finally{try{h&&!h.done&&(p=e.return)&&p.call(e)}finally{if(r)throw r.error}}return t};function b(s){var a=s.toString(16);return a.length<2?"0"+a:a}function v(s,a){return s<a?(a+.05)/(s+.05):(s+.05)/(a+.05)}Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=void 0,function(s){s.toCss=function(a,p,h,r){return r!==void 0?"#"+b(a)+b(p)+b(h)+b(r):"#"+b(a)+b(p)+b(h)},s.toRgba=function(a,p,h,r){return r===void 0&&(r=255),(a<<24|p<<16|h<<8|r)>>>0}}(m=o.channels||(o.channels={})),(u=o.color||(o.color={})).blend=function(s,a){var p=(255&a.rgba)/255;if(p===1)return{css:a.css,rgba:a.rgba};var h=a.rgba>>24&255,r=a.rgba>>16&255,e=a.rgba>>8&255,t=s.rgba>>24&255,i=s.rgba>>16&255,n=s.rgba>>8&255,l=t+Math.round((h-t)*p),c=i+Math.round((r-i)*p),y=n+Math.round((e-n)*p);return{css:m.toCss(l,c,y),rgba:m.toRgba(l,c,y)}},u.isOpaque=function(s){return(255&s.rgba)==255},u.ensureContrastRatio=function(s,a,p){var h=_.ensureContrastRatio(s.rgba,a.rgba,p);if(h)return _.toColor(h>>24&255,h>>16&255,h>>8&255)},u.opaque=function(s){var a=(255|s.rgba)>>>0,p=f(_.toChannels(a),3),h=p[0],r=p[1],e=p[2];return{css:m.toCss(h,r,e),rgba:a}},u.opacity=function(s,a){var p=Math.round(255*a),h=f(_.toChannels(s.rgba),3),r=h[0],e=h[1],t=h[2];return{css:m.toCss(r,e,t,p),rgba:m.toRgba(r,e,t,p)}},u.toColorRGB=function(s){return[s.rgba>>24&255,s.rgba>>16&255,s.rgba>>8&255]},(o.css||(o.css={})).toColor=function(s){if(s.match(/#[0-9a-f]{3,8}/i))switch(s.length){case 4:var a=parseInt(s.slice(1,2).repeat(2),16),p=parseInt(s.slice(2,3).repeat(2),16),h=parseInt(s.slice(3,4).repeat(2),16);return _.toColor(a,p,h);case 5:a=parseInt(s.slice(1,2).repeat(2),16),p=parseInt(s.slice(2,3).repeat(2),16),h=parseInt(s.slice(3,4).repeat(2),16);var r=parseInt(s.slice(4,5).repeat(2),16);return _.toColor(a,p,h,r);case 7:return{css:s,rgba:(parseInt(s.slice(1),16)<<8|255)>>>0};case 9:return{css:s,rgba:parseInt(s.slice(1),16)>>>0}}var e=s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e)return a=parseInt(e[1]),p=parseInt(e[2]),h=parseInt(e[3]),r=Math.round(255*(e[5]===void 0?1:parseFloat(e[5]))),_.toColor(a,p,h,r);throw new Error("css.toColor: Unsupported css format")},function(s){function a(p,h,r){var e=p/255,t=h/255,i=r/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))}s.relativeLuminance=function(p){return a(p>>16&255,p>>8&255,255&p)},s.relativeLuminance2=a}(d=o.rgb||(o.rgb={})),function(s){function a(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,c=r>>16&255,y=r>>8&255,C=v(d.relativeLuminance2(l,c,y),d.relativeLuminance2(t,i,n));C<e&&(l>0||c>0||y>0);)l-=Math.max(0,Math.ceil(.1*l)),c-=Math.max(0,Math.ceil(.1*c)),y-=Math.max(0,Math.ceil(.1*y)),C=v(d.relativeLuminance2(l,c,y),d.relativeLuminance2(t,i,n));return(l<<24|c<<16|y<<8|255)>>>0}function p(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,c=r>>16&255,y=r>>8&255,C=v(d.relativeLuminance2(l,c,y),d.relativeLuminance2(t,i,n));C<e&&(l<255||c<255||y<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),c=Math.min(255,c+Math.ceil(.1*(255-c))),y=Math.min(255,y+Math.ceil(.1*(255-y))),C=v(d.relativeLuminance2(l,c,y),d.relativeLuminance2(t,i,n));return(l<<24|c<<16|y<<8|255)>>>0}s.ensureContrastRatio=function(h,r,e){var t=d.relativeLuminance(h>>8),i=d.relativeLuminance(r>>8);if(v(t,i)<e){if(i<t){var n=a(h,r,e),l=v(t,d.relativeLuminance(n>>8));if(l<e){var c=p(h,h,e);return l>v(t,d.relativeLuminance(c>>8))?n:c}return n}var y=p(h,r,e),C=v(t,d.relativeLuminance(y>>8));return C<e?(c=a(h,h,e),C>v(t,d.relativeLuminance(c>>8))?y:c):y}},s.reduceLuminance=a,s.increaseLuminance=p,s.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},s.toColor=function(h,r,e,t){return{css:m.toCss(h,r,e,t),rgba:m.toRgba(h,r,e,t)}}}(_=o.rgba||(o.rgba={})),o.toPaddedHex=b,o.contrastRatio=v},8969:function(P,o,m){var u,d=this&&this.__extends||(u=function(S,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,L){R.__proto__=L}||function(R,L){for(var k in L)Object.prototype.hasOwnProperty.call(L,k)&&(R[k]=L[k])},u(S,w)},function(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function R(){this.constructor=S}u(S,w),S.prototype=w===null?Object.create(w):(R.prototype=w.prototype,new R)}),_=this&&this.__values||function(S){var w=typeof Symbol=="function"&&Symbol.iterator,R=w&&S[w],L=0;if(R)return R.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&L>=S.length&&(S=void 0),{value:S&&S[L++],done:!S}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var f=m(844),b=m(2585),v=m(4348),s=m(7866),a=m(744),p=m(7302),h=m(6975),r=m(8460),e=m(1753),t=m(3730),i=m(1480),n=m(7994),l=m(9282),c=m(5435),y=m(5981),C=!1,g=function(S){function w(R){var L=S.call(this)||this;return L._onBinary=new r.EventEmitter,L._onData=new r.EventEmitter,L._onLineFeed=new r.EventEmitter,L._onResize=new r.EventEmitter,L._onScroll=new r.EventEmitter,L._onWriteParsed=new r.EventEmitter,L._instantiationService=new v.InstantiationService,L.optionsService=new p.OptionsService(R),L._instantiationService.setService(b.IOptionsService,L.optionsService),L._bufferService=L.register(L._instantiationService.createInstance(a.BufferService)),L._instantiationService.setService(b.IBufferService,L._bufferService),L._logService=L._instantiationService.createInstance(s.LogService),L._instantiationService.setService(b.ILogService,L._logService),L.coreService=L.register(L._instantiationService.createInstance(h.CoreService,function(){return L.scrollToBottom()})),L._instantiationService.setService(b.ICoreService,L.coreService),L.coreMouseService=L._instantiationService.createInstance(e.CoreMouseService),L._instantiationService.setService(b.ICoreMouseService,L.coreMouseService),L._dirtyRowService=L._instantiationService.createInstance(t.DirtyRowService),L._instantiationService.setService(b.IDirtyRowService,L._dirtyRowService),L.unicodeService=L._instantiationService.createInstance(i.UnicodeService),L._instantiationService.setService(b.IUnicodeService,L.unicodeService),L._charsetService=L._instantiationService.createInstance(n.CharsetService),L._instantiationService.setService(b.ICharsetService,L._charsetService),L._inputHandler=new c.InputHandler(L._bufferService,L._charsetService,L.coreService,L._dirtyRowService,L._logService,L.optionsService,L.coreMouseService,L.unicodeService),L.register((0,r.forwardEvent)(L._inputHandler.onLineFeed,L._onLineFeed)),L.register(L._inputHandler),L.register((0,r.forwardEvent)(L._bufferService.onResize,L._onResize)),L.register((0,r.forwardEvent)(L.coreService.onData,L._onData)),L.register((0,r.forwardEvent)(L.coreService.onBinary,L._onBinary)),L.register(L.optionsService.onOptionChange(function(k){return L._updateOptions(k)})),L.register(L._bufferService.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L.register(L._inputHandler.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L._writeBuffer=new y.WriteBuffer(function(k,E){return L._inputHandler.parse(k,E)}),L.register((0,r.forwardEvent)(L._writeBuffer.onWriteParsed,L._onWriteParsed)),L}return d(w,S),Object.defineProperty(w.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onScroll",{get:function(){var R=this;return this._onScrollApi||(this._onScrollApi=new r.EventEmitter,this.register(this._onScroll.event(function(L){var k;(k=R._onScrollApi)===null||k===void 0||k.fire(L.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"options",{get:function(){return this.optionsService.options},set:function(R){for(var L in R)this.optionsService.options[L]=R[L]},enumerable:!1,configurable:!0}),w.prototype.dispose=function(){var R;this._isDisposed||(S.prototype.dispose.call(this),(R=this._windowsMode)===null||R===void 0||R.dispose(),this._windowsMode=void 0)},w.prototype.write=function(R,L){this._writeBuffer.write(R,L)},w.prototype.writeSync=function(R,L){this._logService.logLevel<=b.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(R,L)},w.prototype.resize=function(R,L){isNaN(R)||isNaN(L)||(R=Math.max(R,a.MINIMUM_COLS),L=Math.max(L,a.MINIMUM_ROWS),this._bufferService.resize(R,L))},w.prototype.scroll=function(R,L){L===void 0&&(L=!1),this._bufferService.scroll(R,L)},w.prototype.scrollLines=function(R,L,k){this._bufferService.scrollLines(R,L,k)},w.prototype.scrollPages=function(R){this._bufferService.scrollPages(R)},w.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},w.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},w.prototype.scrollToLine=function(R){this._bufferService.scrollToLine(R)},w.prototype.registerEscHandler=function(R,L){return this._inputHandler.registerEscHandler(R,L)},w.prototype.registerDcsHandler=function(R,L){return this._inputHandler.registerDcsHandler(R,L)},w.prototype.registerCsiHandler=function(R,L){return this._inputHandler.registerCsiHandler(R,L)},w.prototype.registerOscHandler=function(R,L){return this._inputHandler.registerOscHandler(R,L)},w.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},w.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},w.prototype._updateOptions=function(R){var L;switch(R){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)}},w.prototype._enableWindowsMode=function(){var R=this;if(!this._windowsMode){var L=[];L.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},function(){return(0,l.updateWindowsModeWrappedState)(R._bufferService),!1})),this._windowsMode={dispose:function(){var k,E;try{for(var x=_(L),M=x.next();!M.done;M=x.next())M.value.dispose()}catch(T){k={error:T}}finally{try{M&&!M.done&&(E=x.return)&&E.call(x)}finally{if(k)throw k.error}}}}}},w}(f.Disposable);o.CoreTerminal=g},8460:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var m=function(){function u(){this._listeners=[],this._disposed=!1}return Object.defineProperty(u.prototype,"event",{get:function(){var d=this;return this._event||(this._event=function(_){return d._listeners.push(_),{dispose:function(){if(!d._disposed){for(var f=0;f<d._listeners.length;f++)if(d._listeners[f]===_)return void d._listeners.splice(f,1)}}}}),this._event},enumerable:!1,configurable:!0}),u.prototype.fire=function(d,_){for(var f=[],b=0;b<this._listeners.length;b++)f.push(this._listeners[b]);for(b=0;b<f.length;b++)f[b].call(void 0,d,_)},u.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},u}();o.EventEmitter=m,o.forwardEvent=function(u,d){return u(function(_){return d.fire(_)})}},5435:function(P,o,m){var u,d=this&&this.__extends||(u=function(L,k){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,x){E.__proto__=x}||function(E,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(E[M]=x[M])},u(L,k)},function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function E(){this.constructor=L}u(L,k),L.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var _,f=m(2584),b=m(7116),v=m(2015),s=m(844),a=m(8273),p=m(482),h=m(8437),r=m(8460),e=m(643),t=m(511),i=m(3734),n=m(2585),l=m(6242),c=m(6351),y=m(5941),C={"(":0,")":1,"*":2,"+":3,"-":1,".":2},g=131072;function S(L,k){if(L>24)return k.setWinLines||!1;switch(L){case 1:return!!k.restoreWin;case 2:return!!k.minimizeWin;case 3:return!!k.setWinPosition;case 4:return!!k.setWinSizePixels;case 5:return!!k.raiseWin;case 6:return!!k.lowerWin;case 7:return!!k.refreshWin;case 8:return!!k.setWinSizeChars;case 9:return!!k.maximizeWin;case 10:return!!k.fullscreenWin;case 11:return!!k.getWinState;case 13:return!!k.getWinPosition;case 14:return!!k.getWinSizePixels;case 15:return!!k.getScreenSizePixels;case 16:return!!k.getCellSizePixels;case 18:return!!k.getWinSizeChars;case 19:return!!k.getScreenSizeChars;case 20:return!!k.getIconTitle;case 21:return!!k.getWinTitle;case 22:return!!k.pushTitle;case 23:return!!k.popTitle;case 24:return!!k.setWinLines}return!1}(function(L){L[L.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",L[L.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(_=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var w=function(){function L(k,E,x,M){this._bufferService=k,this._coreService=E,this._logService=x,this._optionsService=M,this._data=new Uint32Array(0)}return L.prototype.hook=function(k){this._data=new Uint32Array(0)},L.prototype.put=function(k,E,x){this._data=(0,a.concat)(this._data,k.subarray(E,x))},L.prototype.unhook=function(k){if(!k)return this._data=new Uint32Array(0),!0;var E=(0,p.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),E){case'"q':this._coreService.triggerDataEvent(f.C0.ESC+'P1$r0"q'+f.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(f.C0.ESC+'P1$r61;1"p'+f.C0.ESC+"\\");break;case"r":var x=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+x+f.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(f.C0.ESC+"P1$r0m"+f.C0.ESC+"\\");break;case" q":var M={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];M-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+M+" q"+f.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",E),this._coreService.triggerDataEvent(f.C0.ESC+"P0$r"+f.C0.ESC+"\\")}return!0},L}(),R=function(L){function k(E,x,M,T,U,q,F,z,N){N===void 0&&(N=new v.EscapeSequenceParser);var A=L.call(this)||this;A._bufferService=E,A._charsetService=x,A._coreService=M,A._dirtyRowService=T,A._logService=U,A._optionsService=q,A._coreMouseService=F,A._unicodeService=z,A._parser=N,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new p.StringToUtf32,A._utf8Decoder=new p.Utf8ToUtf32,A._workCell=new t.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=h.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new r.EventEmitter,A._onRequestRefreshRows=new r.EventEmitter,A._onRequestReset=new r.EventEmitter,A._onRequestSendFocus=new r.EventEmitter,A._onRequestSyncScrollBar=new r.EventEmitter,A._onRequestWindowsOptionsReport=new r.EventEmitter,A._onA11yChar=new r.EventEmitter,A._onA11yTab=new r.EventEmitter,A._onCursorMove=new r.EventEmitter,A._onLineFeed=new r.EventEmitter,A._onScroll=new r.EventEmitter,A._onTitleChange=new r.EventEmitter,A._onColor=new r.EventEmitter,A._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},A._specialColors=[256,257,258],A.register(A._parser),A._activeBuffer=A._bufferService.buffer,A.register(A._bufferService.buffers.onBufferActivate(function(B){return A._activeBuffer=B.activeBuffer})),A._parser.setCsiHandlerFallback(function(B,ne){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(B),params:ne.toArray()})}),A._parser.setEscHandlerFallback(function(B){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(B)})}),A._parser.setExecuteHandlerFallback(function(B){A._logService.debug("Unknown EXECUTE code: ",{code:B})}),A._parser.setOscHandlerFallback(function(B,ne,J){A._logService.debug("Unknown OSC code: ",{identifier:B,action:ne,data:J})}),A._parser.setDcsHandlerFallback(function(B,ne,J){ne==="HOOK"&&(J=J.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(B),action:ne,payload:J})}),A._parser.setPrintHandler(function(B,ne,J){return A.print(B,ne,J)}),A._parser.registerCsiHandler({final:"@"},function(B){return A.insertChars(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"@"},function(B){return A.scrollLeft(B)}),A._parser.registerCsiHandler({final:"A"},function(B){return A.cursorUp(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"A"},function(B){return A.scrollRight(B)}),A._parser.registerCsiHandler({final:"B"},function(B){return A.cursorDown(B)}),A._parser.registerCsiHandler({final:"C"},function(B){return A.cursorForward(B)}),A._parser.registerCsiHandler({final:"D"},function(B){return A.cursorBackward(B)}),A._parser.registerCsiHandler({final:"E"},function(B){return A.cursorNextLine(B)}),A._parser.registerCsiHandler({final:"F"},function(B){return A.cursorPrecedingLine(B)}),A._parser.registerCsiHandler({final:"G"},function(B){return A.cursorCharAbsolute(B)}),A._parser.registerCsiHandler({final:"H"},function(B){return A.cursorPosition(B)}),A._parser.registerCsiHandler({final:"I"},function(B){return A.cursorForwardTab(B)}),A._parser.registerCsiHandler({final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.registerCsiHandler({prefix:"?",final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.registerCsiHandler({final:"K"},function(B){return A.eraseInLine(B)}),A._parser.registerCsiHandler({prefix:"?",final:"K"},function(B){return A.eraseInLine(B)}),A._parser.registerCsiHandler({final:"L"},function(B){return A.insertLines(B)}),A._parser.registerCsiHandler({final:"M"},function(B){return A.deleteLines(B)}),A._parser.registerCsiHandler({final:"P"},function(B){return A.deleteChars(B)}),A._parser.registerCsiHandler({final:"S"},function(B){return A.scrollUp(B)}),A._parser.registerCsiHandler({final:"T"},function(B){return A.scrollDown(B)}),A._parser.registerCsiHandler({final:"X"},function(B){return A.eraseChars(B)}),A._parser.registerCsiHandler({final:"Z"},function(B){return A.cursorBackwardTab(B)}),A._parser.registerCsiHandler({final:"`"},function(B){return A.charPosAbsolute(B)}),A._parser.registerCsiHandler({final:"a"},function(B){return A.hPositionRelative(B)}),A._parser.registerCsiHandler({final:"b"},function(B){return A.repeatPrecedingCharacter(B)}),A._parser.registerCsiHandler({final:"c"},function(B){return A.sendDeviceAttributesPrimary(B)}),A._parser.registerCsiHandler({prefix:">",final:"c"},function(B){return A.sendDeviceAttributesSecondary(B)}),A._parser.registerCsiHandler({final:"d"},function(B){return A.linePosAbsolute(B)}),A._parser.registerCsiHandler({final:"e"},function(B){return A.vPositionRelative(B)}),A._parser.registerCsiHandler({final:"f"},function(B){return A.hVPosition(B)}),A._parser.registerCsiHandler({final:"g"},function(B){return A.tabClear(B)}),A._parser.registerCsiHandler({final:"h"},function(B){return A.setMode(B)}),A._parser.registerCsiHandler({prefix:"?",final:"h"},function(B){return A.setModePrivate(B)}),A._parser.registerCsiHandler({final:"l"},function(B){return A.resetMode(B)}),A._parser.registerCsiHandler({prefix:"?",final:"l"},function(B){return A.resetModePrivate(B)}),A._parser.registerCsiHandler({final:"m"},function(B){return A.charAttributes(B)}),A._parser.registerCsiHandler({final:"n"},function(B){return A.deviceStatus(B)}),A._parser.registerCsiHandler({prefix:"?",final:"n"},function(B){return A.deviceStatusPrivate(B)}),A._parser.registerCsiHandler({intermediates:"!",final:"p"},function(B){return A.softReset(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"q"},function(B){return A.setCursorStyle(B)}),A._parser.registerCsiHandler({final:"r"},function(B){return A.setScrollRegion(B)}),A._parser.registerCsiHandler({final:"s"},function(B){return A.saveCursor(B)}),A._parser.registerCsiHandler({final:"t"},function(B){return A.windowOptions(B)}),A._parser.registerCsiHandler({final:"u"},function(B){return A.restoreCursor(B)}),A._parser.registerCsiHandler({intermediates:"'",final:"}"},function(B){return A.insertColumns(B)}),A._parser.registerCsiHandler({intermediates:"'",final:"~"},function(B){return A.deleteColumns(B)}),A._parser.setExecuteHandler(f.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(f.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(f.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(f.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(f.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(f.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(f.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(f.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(f.C1.HTS,function(){return A.tabSet()}),A._parser.registerOscHandler(0,new l.OscHandler(function(B){return A.setTitle(B),A.setIconName(B),!0})),A._parser.registerOscHandler(1,new l.OscHandler(function(B){return A.setIconName(B)})),A._parser.registerOscHandler(2,new l.OscHandler(function(B){return A.setTitle(B)})),A._parser.registerOscHandler(4,new l.OscHandler(function(B){return A.setOrReportIndexedColor(B)})),A._parser.registerOscHandler(10,new l.OscHandler(function(B){return A.setOrReportFgColor(B)})),A._parser.registerOscHandler(11,new l.OscHandler(function(B){return A.setOrReportBgColor(B)})),A._parser.registerOscHandler(12,new l.OscHandler(function(B){return A.setOrReportCursorColor(B)})),A._parser.registerOscHandler(104,new l.OscHandler(function(B){return A.restoreIndexedColor(B)})),A._parser.registerOscHandler(110,new l.OscHandler(function(B){return A.restoreFgColor(B)})),A._parser.registerOscHandler(111,new l.OscHandler(function(B){return A.restoreBgColor(B)})),A._parser.registerOscHandler(112,new l.OscHandler(function(B){return A.restoreCursorColor(B)})),A._parser.registerEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.registerEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.registerEscHandler({final:"D"},function(){return A.index()}),A._parser.registerEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.registerEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.registerEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.registerEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.registerEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.registerEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.registerEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.registerEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.registerEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.registerEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.registerEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var ee=function(B){$._parser.registerEscHandler({intermediates:"(",final:B},function(){return A.selectCharset("("+B)}),$._parser.registerEscHandler({intermediates:")",final:B},function(){return A.selectCharset(")"+B)}),$._parser.registerEscHandler({intermediates:"*",final:B},function(){return A.selectCharset("*"+B)}),$._parser.registerEscHandler({intermediates:"+",final:B},function(){return A.selectCharset("+"+B)}),$._parser.registerEscHandler({intermediates:"-",final:B},function(){return A.selectCharset("-"+B)}),$._parser.registerEscHandler({intermediates:".",final:B},function(){return A.selectCharset("."+B)}),$._parser.registerEscHandler({intermediates:"/",final:B},function(){return A.selectCharset("/"+B)})},$=this;for(var oe in b.CHARSETS)ee(oe);return A._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(B){return A._logService.error("Parsing error: ",B),B}),A._parser.registerDcsHandler({intermediates:"$",final:"q"},new w(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return d(k,L),Object.defineProperty(k.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){L.prototype.dispose.call(this)},k.prototype._preserveStack=function(E,x,M,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=x,this._parseStack.decodedLength=M,this._parseStack.position=T},k.prototype._logSlowResolvingAsync=function(E){this._logService.logLevel<=n.LogLevelEnum.WARN&&Promise.race([E,new Promise(function(x,M){return setTimeout(function(){return M("#SLOW_TIMEOUT")},5e3)})]).catch(function(x){if(x!=="#SLOW_TIMEOUT")throw x;console.warn("async parser handler taking longer than 5000 ms")})},k.prototype.parse=function(E,x){var M,T=this._activeBuffer.x,U=this._activeBuffer.y,q=0,F=this._parseStack.paused;if(F){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,x))return this._logSlowResolvingAsync(M),M;T=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>g&&(q=this._parseStack.position+g)}if(this._logService.logLevel<=n.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?' "'+E+'"':' "'+Array.prototype.map.call(E,function(ee){return String.fromCharCode(ee)}).join("")+'"'),typeof E=="string"?E.split("").map(function(ee){return ee.charCodeAt(0)}):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<g&&(this._parseBuffer=new Uint32Array(Math.min(E.length,g))),F||this._dirtyRowService.clearRange(),E.length>g)for(var z=q;z<E.length;z+=g){var N=z+g<E.length?z+g:E.length,A=typeof E=="string"?this._stringDecoder.decode(E.substring(z,N),this._parseBuffer):this._utf8Decoder.decode(E.subarray(z,N),this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,A))return this._preserveStack(T,U,A,z),this._logSlowResolvingAsync(M),M}else if(!F&&(A=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer),M=this._parser.parse(this._parseBuffer,A)))return this._preserveStack(T,U,A,0),this._logSlowResolvingAsync(M),M;this._activeBuffer.x===T&&this._activeBuffer.y===U||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},k.prototype.print=function(E,x,M){var T,U,q=this._charsetService.charset,F=this._optionsService.rawOptions.screenReaderMode,z=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,A=this._coreService.modes.insertMode,ee=this._curAttrData,$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&M-x>0&&$.getWidth(this._activeBuffer.x-1)===2&&$.setCellFromCodePoint(this._activeBuffer.x-1,0,1,ee.fg,ee.bg,ee.extended);for(var oe=x;oe<M;++oe){if(T=E[oe],U=this._unicodeService.wcwidth(T),T<127&&q){var B=q[String.fromCharCode(T)];B&&(T=B.charCodeAt(0))}if(F&&this._onA11yChar.fire((0,p.stringFromCodePoint)(T)),U||!this._activeBuffer.x){if(this._activeBuffer.x+U-1>=z){if(N){for(;this._activeBuffer.x<z;)$.setCellFromCodePoint(this._activeBuffer.x++,0,1,ee.fg,ee.bg,ee.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=z-1,U===2)continue}if(A&&($.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(ee),ee),$.getWidth(z-1)===2&&$.setCellFromCodePoint(z-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,ee.fg,ee.bg,ee.extended)),$.setCellFromCodePoint(this._activeBuffer.x++,T,U,ee.fg,ee.bg,ee.extended),U>0)for(;--U;)$.setCellFromCodePoint(this._activeBuffer.x++,0,0,ee.fg,ee.bg,ee.extended)}else $.getWidth(this._activeBuffer.x-1)?$.addCodepointToCell(this._activeBuffer.x-1,T):$.addCodepointToCell(this._activeBuffer.x-2,T)}M-x>0&&($.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<z&&M-x>0&&$.getWidth(this._activeBuffer.x)===0&&!$.hasContent(this._activeBuffer.x)&&$.setCellFromCodePoint(this._activeBuffer.x,0,1,ee.fg,ee.bg,ee.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype.registerCsiHandler=function(E,x){var M=this;return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,x):this._parser.registerCsiHandler(E,function(T){return!S(T.params[0],M._optionsService.rawOptions.windowOptions)||x(T)})},k.prototype.registerDcsHandler=function(E,x){return this._parser.registerDcsHandler(E,new c.DcsHandler(x))},k.prototype.registerEscHandler=function(E,x){return this._parser.registerEscHandler(E,x)},k.prototype.registerOscHandler=function(E,x){return this._parser.registerOscHandler(E,new l.OscHandler(x))},k.prototype.bell=function(){return this._onRequestBell.fire(),!0},k.prototype.lineFeed=function(){return this._dirtyRowService.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.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},k.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},k.prototype.backspace=function(){var E;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||E===void 0)&&E.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);x.hasWidth(this._activeBuffer.x)&&!x.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},k.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var E=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-E),!0},k.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},k.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},k.prototype._restrictCursor=function(E){E===void 0&&(E=this._bufferService.cols-1),this._activeBuffer.x=Math.min(E,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._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._setCursor=function(E,x){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+x):(this._activeBuffer.x=E,this._activeBuffer.y=x),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._moveCursor=function(E,x){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+x)},k.prototype.cursorUp=function(E){var x=this._activeBuffer.y-this._activeBuffer.scrollTop;return x>=0?this._moveCursor(0,-Math.min(x,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0},k.prototype.cursorDown=function(E){var x=this._activeBuffer.scrollBottom-this._activeBuffer.y;return x>=0?this._moveCursor(0,Math.min(x,E.params[0]||1)):this._moveCursor(0,E.params[0]||1),!0},k.prototype.cursorForward=function(E){return this._moveCursor(E.params[0]||1,0),!0},k.prototype.cursorBackward=function(E){return this._moveCursor(-(E.params[0]||1),0),!0},k.prototype.cursorNextLine=function(E){return this.cursorDown(E),this._activeBuffer.x=0,!0},k.prototype.cursorPrecedingLine=function(E){return this.cursorUp(E),this._activeBuffer.x=0,!0},k.prototype.cursorCharAbsolute=function(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.cursorPosition=function(E){return this._setCursor(E.length>=2?(E.params[1]||1)-1:0,(E.params[0]||1)-1),!0},k.prototype.charPosAbsolute=function(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.hPositionRelative=function(E){return this._moveCursor(E.params[0]||1,0),!0},k.prototype.linePosAbsolute=function(E){return this._setCursor(this._activeBuffer.x,(E.params[0]||1)-1),!0},k.prototype.vPositionRelative=function(E){return this._moveCursor(0,E.params[0]||1),!0},k.prototype.hVPosition=function(E){return this.cursorPosition(E),!0},k.prototype.tabClear=function(E){var x=E.params[0];return x===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:x===3&&(this._activeBuffer.tabs={}),!0},k.prototype.cursorForwardTab=function(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var x=E.params[0]||1;x--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},k.prototype.cursorBackwardTab=function(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var x=E.params[0]||1;x--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},k.prototype._eraseInBufferLine=function(E,x,M,T){T===void 0&&(T=!1);var U=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);U.replaceCells(x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T&&(U.isWrapped=!1)},k.prototype._resetBufferLine=function(E){var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);x.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),x.isWrapped=!1},k.prototype.eraseInDisplay=function(E){var x;switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowService.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);x<this._bufferService.rows;x++)this._resetBufferLine(x);this._dirtyRowService.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowService.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x);this._dirtyRowService.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowService.markDirty(x-1);x--;)this._resetBufferLine(x);this._dirtyRowService.markDirty(0);break;case 3:var M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0},k.prototype.eraseInLine=function(E){switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},k.prototype.insertLines=function(E){this._restrictCursor();var x=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var M=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;x--;)this._activeBuffer.lines.splice(U-1,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.deleteLines=function(E){this._restrictCursor();var x=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var M,T=this._activeBuffer.ybase+this._activeBuffer.y;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;x--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.insertChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.deleteChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.scrollUp=function(E){for(var x=E.params[0]||1;x--;)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()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollDown=function(E){for(var x=E.params[0]||1;x--;)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(h.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollLeft=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.deleteCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollRight=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.insertCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.insertColumns=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.insertCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.deleteColumns=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.deleteCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.eraseChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.repeatPrecedingCharacter=function(E){if(!this._parser.precedingCodepoint)return!0;for(var x=E.params[0]||1,M=new Uint32Array(x),T=0;T<x;++T)M[T]=this._parser.precedingCodepoint;return this.print(M,0,M.length),!0},k.prototype.sendDeviceAttributesPrimary=function(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0},k.prototype.sendDeviceAttributesSecondary=function(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0},k.prototype._is=function(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0},k.prototype.setMode=function(E){for(var x=0;x<E.length;x++)E.params[x]===4&&(this._coreService.modes.insertMode=!0);return!0},k.prototype.setModePrivate=function(E){for(var x=0;x<E.length;x++)switch(E.params[x]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},k.prototype.resetMode=function(E){for(var x=0;x<E.length;x++)E.params[x]===4&&(this._coreService.modes.insertMode=!1);return!0},k.prototype.resetModePrivate=function(E){for(var x=0;x<E.length;x++)switch(E.params[x]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),E.params[x]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},k.prototype._updateAttrColor=function(E,x,M,T,U){return x===2?(E|=50331648,E&=-16777216,E|=i.AttributeData.fromColorRGB([M,T,U])):x===5&&(E&=-50331904,E|=33554432|255&M),E},k.prototype._extractColor=function(E,x,M){var T=[0,0,-1,0,0,0],U=0,q=0;do{if(T[q+U]=E.params[x+q],E.hasSubParams(x+q)){var F=E.getSubParams(x+q),z=0;do T[1]===5&&(U=1),T[q+z+1+U]=F[z];while(++z<F.length&&z+q+1+U<T.length);break}if(T[1]===5&&q+U>=2||T[1]===2&&q+U>=5)break;T[1]&&(U=1)}while(++q+x<E.length&&q+U<T.length);for(z=2;z<T.length;++z)T[z]===-1&&(T[z]=0);switch(T[0]){case 38:M.fg=this._updateAttrColor(M.fg,T[1],T[3],T[4],T[5]);break;case 48:M.bg=this._updateAttrColor(M.bg,T[1],T[3],T[4],T[5]);break;case 58:M.extended=M.extended.clone(),M.extended.underlineColor=this._updateAttrColor(M.extended.underlineColor,T[1],T[3],T[4],T[5])}return q},k.prototype._processUnderline=function(E,x){x.extended=x.extended.clone(),(!~E||E>5)&&(E=1),x.extended.underlineStyle=E,x.fg|=268435456,E===0&&(x.fg&=-268435457),x.updateExtended()},k.prototype.charAttributes=function(E){if(E.length===1&&E.params[0]===0)return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg,!0;for(var x,M=E.length,T=this._curAttrData,U=0;U<M;U++)(x=E.params[U])>=30&&x<=37?(T.fg&=-50331904,T.fg|=16777216|x-30):x>=40&&x<=47?(T.bg&=-50331904,T.bg|=16777216|x-40):x>=90&&x<=97?(T.fg&=-50331904,T.fg|=16777224|x-90):x>=100&&x<=107?(T.bg&=-50331904,T.bg|=16777224|x-100):x===0?(T.fg=h.DEFAULT_ATTR_DATA.fg,T.bg=h.DEFAULT_ATTR_DATA.bg):x===1?T.fg|=134217728:x===3?T.bg|=67108864:x===4?(T.fg|=268435456,this._processUnderline(E.hasSubParams(U)?E.getSubParams(U)[0]:1,T)):x===5?T.fg|=536870912:x===7?T.fg|=67108864:x===8?T.fg|=1073741824:x===9?T.fg|=2147483648:x===2?T.bg|=134217728:x===21?this._processUnderline(2,T):x===22?(T.fg&=-134217729,T.bg&=-134217729):x===23?T.bg&=-67108865:x===24?T.fg&=-268435457:x===25?T.fg&=-536870913:x===27?T.fg&=-67108865:x===28?T.fg&=-1073741825:x===29?T.fg&=2147483647:x===39?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):x===49?(T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?U+=this._extractColor(E,U,T):x===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):x===100?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0},k.prototype.deviceStatus=function(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(f.C0.ESC+"[0n");break;case 6:var x=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"["+x+";"+M+"R")}return!0},k.prototype.deviceStatusPrivate=function(E){if(E.params[0]===6){var x=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"[?"+x+";"+M+"R")}return!0},k.prototype.softReset=function(E){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.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=!1,!0},k.prototype.setCursorStyle=function(E){var x=E.params[0]||1;switch(x){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var M=x%2==1;return this._optionsService.options.cursorBlink=M,!0},k.prototype.setScrollRegion=function(E){var x,M=E.params[0]||1;return(E.length<2||(x=E.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0},k.prototype.windowOptions=function(E){if(!S(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;var x=E.length>1?E.params[1]:0;switch(E.params[0]){case 14:x!==2&&this._onRequestWindowsOptionsReport.fire(_.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(_.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(f.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:x!==0&&x!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),x!==0&&x!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:x!==0&&x!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),x!==0&&x!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},k.prototype.saveCursor=function(E){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,!0},k.prototype.restoreCursor=function(E){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(),!0},k.prototype.setTitle=function(E){return this._windowTitle=E,this._onTitleChange.fire(E),!0},k.prototype.setIconName=function(E){return this._iconName=E,!0},k.prototype.setOrReportIndexedColor=function(E){for(var x=[],M=E.split(";");M.length>1;){var T=M.shift(),U=M.shift();if(/^\d+$/.exec(T)){var q=parseInt(T);if(0<=q&&q<256)if(U==="?")x.push({type:0,index:q});else{var F=(0,y.parseColor)(U);F&&x.push({type:1,index:q,color:F})}}}return x.length&&this._onColor.fire(x),!0},k.prototype._setOrReportSpecialColor=function(E,x){for(var M=E.split(";"),T=0;T<M.length&&!(x>=this._specialColors.length);++T,++x)if(M[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[x]}]);else{var U=(0,y.parseColor)(M[T]);U&&this._onColor.fire([{type:1,index:this._specialColors[x],color:U}])}return!0},k.prototype.setOrReportFgColor=function(E){return this._setOrReportSpecialColor(E,0)},k.prototype.setOrReportBgColor=function(E){return this._setOrReportSpecialColor(E,1)},k.prototype.setOrReportCursorColor=function(E){return this._setOrReportSpecialColor(E,2)},k.prototype.restoreIndexedColor=function(E){if(!E)return this._onColor.fire([{type:2}]),!0;for(var x=[],M=E.split(";"),T=0;T<M.length;++T)if(/^\d+$/.exec(M[T])){var U=parseInt(M[T]);0<=U&&U<256&&x.push({type:2,index:U})}return x.length&&this._onColor.fire(x),!0},k.prototype.restoreFgColor=function(E){return this._onColor.fire([{type:2,index:256}]),!0},k.prototype.restoreBgColor=function(E){return this._onColor.fire([{type:2,index:257}]),!0},k.prototype.restoreCursorColor=function(E){return this._onColor.fire([{type:2,index:258}]),!0},k.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},k.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},k.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},k.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),!0},k.prototype.selectCharset=function(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(C[E[0]],b.CHARSETS[E[1]]||b.DEFAULT_CHARSET),!0)},k.prototype.index=function(){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(),!0},k.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},k.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var E=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,E,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},k.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},k.prototype.reset=function(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()},k.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},k.prototype.setgLevel=function(E){return this._charsetService.setgLevel(E),!0},k.prototype.screenAlignmentPattern=function(){var E=new t.CellData;E.content=1<<22|69,E.fg=this._curAttrData.fg,E.bg=this._curAttrData.bg,this._setCursor(0,0);for(var x=0;x<this._bufferService.rows;++x){var M=this._activeBuffer.ybase+this._activeBuffer.y+x,T=this._activeBuffer.lines.get(M);T&&(T.fill(E),T.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},k}(s.Disposable);o.InputHandler=R},844:function(P,o){var m=this&&this.__values||function(_){var f=typeof Symbol=="function"&&Symbol.iterator,b=f&&_[f],v=0;if(b)return b.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var u=function(){function _(){this._disposables=[],this._isDisposed=!1}return _.prototype.dispose=function(){var f,b;this._isDisposed=!0;try{for(var v=m(this._disposables),s=v.next();!s.done;s=v.next())s.value.dispose()}catch(a){f={error:a}}finally{try{s&&!s.done&&(b=v.return)&&b.call(v)}finally{if(f)throw f.error}}this._disposables.length=0},_.prototype.register=function(f){return this._disposables.push(f),f},_.prototype.unregister=function(f){var b=this._disposables.indexOf(f);b!==-1&&this._disposables.splice(b,1)},_}();function d(_){var f,b;try{for(var v=m(_),s=v.next();!s.done;s=v.next())s.value.dispose()}catch(a){f={error:a}}finally{try{s&&!s.done&&(b=v.return)&&b.call(v)}finally{if(f)throw f.error}}_.length=0}o.Disposable=u,o.disposeArray=d,o.getDisposeArrayDisposable=function(_){return{dispose:function(){return d(_)}}}},6114:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isLegacyEdge=o.isFirefox=void 0;var m=typeof navigator>"u",u=m?"node":navigator.userAgent,d=m?"node":navigator.platform;o.isFirefox=u.includes("Firefox"),o.isLegacyEdge=u.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(u),o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),o.isIpad=d==="iPad",o.isIphone=d==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),o.isLinux=d.indexOf("Linux")>=0},6106:function(P,o){var m=this&&this.__generator||function(d,_){var f,b,v,s,a={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return s={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function p(h){return function(r){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;a;)try{if(f=1,b&&(v=2&e[0]?b.return:e[0]?b.throw||((v=b.return)&&v.call(b),0):b.next)&&!(v=v.call(b,e[1])).done)return v;switch(b=0,v&&(e=[2&e[0],v.value]),e[0]){case 0:case 1:v=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,b=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((v=(v=a.trys).length>0&&v[v.length-1])||e[0]!==6&&e[0]!==2)){a=0;continue}if(e[0]===3&&(!v||e[1]>v[0]&&e[1]<v[3])){a.label=e[1];break}if(e[0]===6&&a.label<v[1]){a.label=v[1],v=e;break}if(v&&a.label<v[2]){a.label=v[2],a.ops.push(e);break}v[2]&&a.ops.pop(),a.trys.pop();continue}e=_.call(d,a)}catch(t){e=[6,t],b=0}finally{f=v=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([h,r])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;var u=function(){function d(_){this._getKey=_,this._array=[]}return d.prototype.clear=function(){this._array.length=0},d.prototype.insert=function(_){if(this._array.length!==0){var f=this._search(this._getKey(_),0,this._array.length-1);this._array.splice(f,0,_)}else this._array.push(_)},d.prototype.delete=function(_){if(this._array.length===0)return!1;var f=this._getKey(_),b=this._search(f,0,this._array.length-1);if(this._getKey(this._array[b])!==f)return!1;do if(this._array[b]===_)return this._array.splice(b,1),!0;while(++b<this._array.length&&this._getKey(this._array[b])===f);return!1},d.prototype.getKeyIterator=function(_){var f;return m(this,function(b){switch(b.label){case 0:if(this._array.length===0)return[2];if((f=this._search(_,0,this._array.length-1))<0||f>=this._array.length)return[2];if(this._getKey(this._array[f])!==_)return[2];b.label=1;case 1:return[4,this._array[f]];case 2:b.sent(),b.label=3;case 3:if(++f<this._array.length&&this._getKey(this._array[f])===_)return[3,1];b.label=4;case 4:return[2]}})},d.prototype.values=function(){return this._array.values()},d.prototype._search=function(_,f,b){if(b<f)return f;var v=Math.floor((f+b)/2);if(this._getKey(this._array[v])>_)return this._search(_,f,v-1);if(this._getKey(this._array[v])<_)return this._search(_,v+1,b);for(;v>0&&this._getKey(this._array[v-1])===_;)v--;return v},d}();o.SortedList=u},8273:(P,o)=>{function m(u,d,_,f){if(_===void 0&&(_=0),f===void 0&&(f=u.length),_>=u.length)return u;_=(u.length+_)%u.length,f=f>=u.length?u.length:(u.length+f)%u.length;for(var b=_;b<f;++b)u[b]=d;return u}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(u,d,_,f){return u.fill?u.fill(d,_,f):m(u,d,_,f)},o.fillFallback=m,o.concat=function(u,d){var _=new u.constructor(u.length+d.length);return _.set(u),_.set(d,u.length),_}},9282:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var u=m(643);o.updateWindowsModeWrappedState=function(d){var _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),f=_==null?void 0:_.get(d.cols-1),b=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);b&&f&&(b.isWrapped=f[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&f[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var m=function(){function d(){this.fg=0,this.bg=0,this.extended=new u}return d.toColorRGB=function(_){return[_>>>16&255,_>>>8&255,255&_]},d.fromColorRGB=function(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]},d.prototype.clone=function(){var _=new d;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_},d.prototype.isInverse=function(){return 67108864&this.fg},d.prototype.isBold=function(){return 134217728&this.fg},d.prototype.isUnderline=function(){return 268435456&this.fg},d.prototype.isBlink=function(){return 536870912&this.fg},d.prototype.isInvisible=function(){return 1073741824&this.fg},d.prototype.isItalic=function(){return 67108864&this.bg},d.prototype.isDim=function(){return 134217728&this.bg},d.prototype.isStrikethrough=function(){return 2147483648&this.fg},d.prototype.getFgColorMode=function(){return 50331648&this.fg},d.prototype.getBgColorMode=function(){return 50331648&this.bg},d.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},d.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},d.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},d.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},d.prototype.isFgDefault=function(){return(50331648&this.fg)==0},d.prototype.isBgDefault=function(){return(50331648&this.bg)==0},d.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},d.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},d.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},d.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},d.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},d.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},d.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},d.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},d.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},d.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},d.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},d}();o.AttributeData=m;var u=function(){function d(_,f){_===void 0&&(_=0),f===void 0&&(f=-1),this.underlineStyle=_,this.underlineColor=f}return d.prototype.clone=function(){return new d(this.underlineStyle,this.underlineColor)},d.prototype.isEmpty=function(){return this.underlineStyle===0},d}();o.ExtendedAttrs=u},9092:function(P,o,m){var u=this&&this.__read||function(t,i){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var l,c,y=n.call(t),C=[];try{for(;(i===void 0||i-- >0)&&!(l=y.next()).done;)C.push(l.value)}catch(g){c={error:g}}finally{try{l&&!l.done&&(n=y.return)&&n.call(y)}finally{if(c)throw c.error}}return C},d=this&&this.__spreadArray||function(t,i,n){if(n||arguments.length===2)for(var l,c=0,y=i.length;c<y;c++)!l&&c in i||(l||(l=Array.prototype.slice.call(i,0,c)),l[c]=i[c]);return t.concat(l||Array.prototype.slice.call(i))};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var _=m(6349),f=m(8437),b=m(511),v=m(643),s=m(4634),a=m(4863),p=m(7116),h=m(3734);o.MAX_BUFFER_SIZE=4294967295;var r=function(){function t(i,n,l){this._hasScrollback=i,this._optionsService=n,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=f.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(i){return i?(this._nullCell.fg=i.fg,this._nullCell.bg=i.bg,this._nullCell.extended=i.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(i){return i?(this._whitespaceCell.fg=i.fg,this._whitespaceCell.bg=i.bg,this._whitespaceCell.extended=i.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(i,n){return new f.BufferLine(this._bufferService.cols,this.getNullCell(i),n)},Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var i=this.ybase+this.y-this.ydisp;return i>=0&&i<this._rows},enumerable:!1,configurable:!0}),t.prototype._getCorrectBufferLength=function(i){if(!this._hasScrollback)return i;var n=i+this._optionsService.rawOptions.scrollback;return n>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(i){if(this.lines.length===0){i===void 0&&(i=f.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(i))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(i,n){var l=this.getNullCell(f.DEFAULT_ATTR_DATA),c=this._getCorrectBufferLength(n);if(c>this.lines.maxLength&&(this.lines.maxLength=c),this.lines.length>0){if(this._cols<i)for(var y=0;y<this.lines.length;y++)this.lines.get(y).resize(i,l);var C=0;if(this._rows<n)for(var g=this._rows;g<n;g++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new f.BufferLine(i,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new f.BufferLine(i,l)));else for(g=this._rows;g>n;g--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(c<this.lines.maxLength){var S=this.lines.length-c;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=c}this.x=Math.min(this.x,i-1),this.y=Math.min(this.y,n-1),C&&(this.y+=C),this.savedX=Math.min(this.savedX,i-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(i,n),this._cols>i))for(y=0;y<this.lines.length;y++)this.lines.get(y).resize(i,l);this._cols=i,this._rows=n},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(i,n){this._cols!==i&&(i>this._cols?this._reflowLarger(i,n):this._reflowSmaller(i,n))},t.prototype._reflowLarger=function(i,n){var l=(0,s.reflowLargerGetLinesToRemove)(this.lines,this._cols,i,this.ybase+this.y,this.getNullCell(f.DEFAULT_ATTR_DATA));if(l.length>0){var c=(0,s.reflowLargerCreateNewLayout)(this.lines,l);(0,s.reflowLargerApplyNewLayout)(this.lines,c.layout),this._reflowLargerAdjustViewport(i,n,c.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(i,n,l){for(var c=this.getNullCell(f.DEFAULT_ATTR_DATA),y=l;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new f.BufferLine(i,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},t.prototype._reflowSmaller=function(i,n){for(var l=this.getNullCell(f.DEFAULT_ATTR_DATA),c=[],y=0,C=this.lines.length-1;C>=0;C--){var g=this.lines.get(C);if(!(!g||!g.isWrapped&&g.getTrimmedLength()<=i)){for(var S=[g];g.isWrapped&&C>0;)g=this.lines.get(--C),S.unshift(g);var w=this.ybase+this.y;if(!(w>=C&&w<C+S.length)){var R,L=S[S.length-1].getTrimmedLength(),k=(0,s.reflowSmallerGetNewLineLengths)(S,this._cols,i),E=k.length-S.length;R=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+E):Math.max(0,this.lines.length-this.lines.maxLength+E);for(var x=[],M=0;M<E;M++){var T=this.getBlankLine(f.DEFAULT_ATTR_DATA,!0);x.push(T)}x.length>0&&(c.push({start:C+S.length+y,newLines:x}),y+=x.length),S.push.apply(S,d([],u(x),!1));var U=k.length-1,q=k[U];q===0&&(q=k[--U]);for(var F=S.length-E-1,z=L;F>=0;){var N=Math.min(z,q);if(S[U]===void 0)break;if(S[U].copyCellsFrom(S[F],z-N,q-N,N,!0),(q-=N)==0&&(q=k[--U]),(z-=N)==0){F--;var A=Math.max(F,0);z=(0,s.getWrappedLineTrimmedLength)(S,A,this._cols)}}for(M=0;M<S.length;M++)k[M]<i&&S[M].setCell(k[M],l);for(var ee=E-R;ee-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+E,this.ybase+n-1)}}}if(c.length>0){var $=[],oe=[];for(M=0;M<this.lines.length;M++)oe.push(this.lines.get(M));var B=this.lines.length,ne=B-1,J=0,W=c[J];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);var O=0;for(M=Math.min(this.lines.maxLength-1,B+y-1);M>=0;M--)if(W&&W.start>ne+O){for(var D=W.newLines.length-1;D>=0;D--)this.lines.set(M--,W.newLines[D]);M++,$.push({index:ne+1,amount:W.newLines.length}),O+=W.newLines.length,W=c[++J]}else this.lines.set(M,oe[ne--]);var j=0;for(M=$.length-1;M>=0;M--)$[M].index+=j,this.lines.onInsertEmitter.fire($[M]),j+=$[M].amount;var V=Math.max(0,B+y-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}},t.prototype.stringIndexToBufferIndex=function(i,n,l){for(l===void 0&&(l=!1);n;){var c=this.lines.get(i);if(!c)return[-1,-1];for(var y=l?c.getTrimmedLength():c.length,C=0;C<y;++C)if(c.get(C)[v.CHAR_DATA_WIDTH_INDEX]&&(n-=c.get(C)[v.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[i,C];i++}return[i,0]},t.prototype.translateBufferLineToString=function(i,n,l,c){l===void 0&&(l=0);var y=this.lines.get(i);return y?y.translateToString(n,l,c):""},t.prototype.getWrappedRangeForLine=function(i){for(var n=i,l=i;n>0&&this.lines.get(n).isWrapped;)n--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:n,last:l}},t.prototype.setupTabStops=function(i){for(i!=null?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);i<this._cols;i+=this._optionsService.rawOptions.tabStopWidth)this.tabs[i]=!0},t.prototype.prevStop=function(i){for(i==null&&(i=this.x);!this.tabs[--i]&&i>0;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.nextStop=function(i){for(i==null&&(i=this.x);!this.tabs[++i]&&i<this._cols;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.clearMarkers=function(i){this._isClearing=!0;for(var n=0;n<this.markers.length;n++)this.markers[n].line===i&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1},t.prototype.clearAllMarkers=function(){this._isClearing=!0;for(var i=0;i<this.markers.length;i++)this.markers[i].dispose(),this.markers.splice(i--,1);this._isClearing=!1},t.prototype.addMarker=function(i){var n=this,l=new a.Marker(i);return this.markers.push(l),l.register(this.lines.onTrim(function(c){l.line-=c,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(c){l.line>=c.index&&(l.line+=c.amount)})),l.register(this.lines.onDelete(function(c){l.line>=c.index&&l.line<c.index+c.amount&&l.dispose(),l.line>c.index&&(l.line-=c.amount)})),l.register(l.onDispose(function(){return n._removeMarker(l)})),l},t.prototype._removeMarker=function(i){this._isClearing||this.markers.splice(this.markers.indexOf(i),1)},t.prototype.iterator=function(i,n,l,c,y){return new e(this,i,n,l,c,y)},t}();o.Buffer=r;var e=function(){function t(i,n,l,c,y,C){l===void 0&&(l=0),c===void 0&&(c=i.lines.length),y===void 0&&(y=0),C===void 0&&(C=0),this._buffer=i,this._trimRight=n,this._startIndex=l,this._endIndex=c,this._startOverscan=y,this._endOverscan=C,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._current<this._endIndex},t.prototype.next=function(){var i=this._buffer.getWrappedRangeForLine(this._current);i.first<this._startIndex-this._startOverscan&&(i.first=this._startIndex-this._startOverscan),i.last>this._endIndex+this._endOverscan&&(i.last=this._endIndex+this._endOverscan),i.first=Math.max(i.first,0),i.last=Math.min(i.last,this._buffer.lines.length);for(var n="",l=i.first;l<=i.last;++l)n+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=i.last+1,{range:i,content:n}},t}();o.BufferStringIterator=e},8437:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var u=m(482),d=m(643),_=m(511),f=m(3734);o.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);var b=function(){function v(s,a,p){p===void 0&&(p=!1),this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*s);for(var h=a||_.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]),r=0;r<s;++r)this.setCell(r,h);this.length=s}return v.prototype.get=function(s){var a=this._data[3*s+0],p=2097151&a;return[this._data[3*s+1],2097152&a?this._combined[s]:p?(0,u.stringFromCodePoint)(p):"",a>>22,2097152&a?this._combined[s].charCodeAt(this._combined[s].length-1):p]},v.prototype.set=function(s,a){this._data[3*s+1]=a[d.CHAR_DATA_ATTR_INDEX],a[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[s]=a[1],this._data[3*s+0]=2097152|s|a[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*s+0]=a[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[d.CHAR_DATA_WIDTH_INDEX]<<22},v.prototype.getWidth=function(s){return this._data[3*s+0]>>22},v.prototype.hasWidth=function(s){return 12582912&this._data[3*s+0]},v.prototype.getFg=function(s){return this._data[3*s+1]},v.prototype.getBg=function(s){return this._data[3*s+2]},v.prototype.hasContent=function(s){return 4194303&this._data[3*s+0]},v.prototype.getCodePoint=function(s){var a=this._data[3*s+0];return 2097152&a?this._combined[s].charCodeAt(this._combined[s].length-1):2097151&a},v.prototype.isCombined=function(s){return 2097152&this._data[3*s+0]},v.prototype.getString=function(s){var a=this._data[3*s+0];return 2097152&a?this._combined[s]:2097151&a?(0,u.stringFromCodePoint)(2097151&a):""},v.prototype.loadCell=function(s,a){var p=3*s;return a.content=this._data[p+0],a.fg=this._data[p+1],a.bg=this._data[p+2],2097152&a.content&&(a.combinedData=this._combined[s]),268435456&a.bg&&(a.extended=this._extendedAttrs[s]),a},v.prototype.setCell=function(s,a){2097152&a.content&&(this._combined[s]=a.combinedData),268435456&a.bg&&(this._extendedAttrs[s]=a.extended),this._data[3*s+0]=a.content,this._data[3*s+1]=a.fg,this._data[3*s+2]=a.bg},v.prototype.setCellFromCodePoint=function(s,a,p,h,r,e){268435456&r&&(this._extendedAttrs[s]=e),this._data[3*s+0]=a|p<<22,this._data[3*s+1]=h,this._data[3*s+2]=r},v.prototype.addCodepointToCell=function(s,a){var p=this._data[3*s+0];2097152&p?this._combined[s]+=(0,u.stringFromCodePoint)(a):(2097151&p?(this._combined[s]=(0,u.stringFromCodePoint)(2097151&p)+(0,u.stringFromCodePoint)(a),p&=-2097152,p|=2097152):p=a|1<<22,this._data[3*s+0]=p)},v.prototype.insertCells=function(s,a,p,h){if((s%=this.length)&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs),a<this.length-s){for(var r=new _.CellData,e=this.length-s-a-1;e>=0;--e)this.setCell(s+a+e,this.loadCell(s+e,r));for(e=0;e<a;++e)this.setCell(s+e,p)}else for(e=s;e<this.length;++e)this.setCell(e,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs)},v.prototype.deleteCells=function(s,a,p,h){if(s%=this.length,a<this.length-s){for(var r=new _.CellData,e=0;e<this.length-s-a;++e)this.setCell(s+e,this.loadCell(s+a+e,r));for(e=this.length-a;e<this.length;++e)this.setCell(e,p)}else for(e=s;e<this.length;++e)this.setCell(e,p);s&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs),this.getWidth(s)!==0||this.hasContent(s)||this.setCellFromCodePoint(s,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs)},v.prototype.replaceCells=function(s,a,p,h){for(s&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs),a<this.length&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a,0,1,(h==null?void 0:h.fg)||0,(h==null?void 0:h.bg)||0,(h==null?void 0:h.extended)||new f.ExtendedAttrs);s<a&&s<this.length;)this.setCell(s++,p)},v.prototype.resize=function(s,a){if(s!==this.length){if(s>this.length){var p=new Uint32Array(3*s);this.length&&(3*s<this._data.length?p.set(this._data.subarray(0,3*s)):p.set(this._data)),this._data=p;for(var h=this.length;h<s;++h)this.setCell(h,a)}else if(s){(p=new Uint32Array(3*s)).set(this._data.subarray(0,3*s)),this._data=p;var r=Object.keys(this._combined);for(h=0;h<r.length;h++){var e=parseInt(r[h],10);e>=s&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=s}},v.prototype.fill=function(s){this._combined={},this._extendedAttrs={};for(var a=0;a<this.length;++a)this.setCell(a,s)},v.prototype.copyFrom=function(s){for(var a in this.length!==s.length?this._data=new Uint32Array(s._data):this._data.set(s._data),this.length=s.length,this._combined={},s._combined)this._combined[a]=s._combined[a];for(var a in this._extendedAttrs={},s._extendedAttrs)this._extendedAttrs[a]=s._extendedAttrs[a];this.isWrapped=s.isWrapped},v.prototype.clone=function(){var s=new v(0);for(var a in s._data=new Uint32Array(this._data),s.length=this.length,this._combined)s._combined[a]=this._combined[a];for(var a in this._extendedAttrs)s._extendedAttrs[a]=this._extendedAttrs[a];return s.isWrapped=this.isWrapped,s},v.prototype.getTrimmedLength=function(){for(var s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0])return s+(this._data[3*s+0]>>22);return 0},v.prototype.copyCellsFrom=function(s,a,p,h,r){var e=s._data;if(r)for(var t=h-1;t>=0;t--)for(var i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(a+t)+i];else for(t=0;t<h;t++)for(i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(a+t)+i];var n=Object.keys(s._combined);for(i=0;i<n.length;i++){var l=parseInt(n[i],10);l>=a&&(this._combined[l-a+p]=s._combined[l])}},v.prototype.translateToString=function(s,a,p){s===void 0&&(s=!1),a===void 0&&(a=0),p===void 0&&(p=this.length),s&&(p=Math.min(p,this.getTrimmedLength()));for(var h="";a<p;){var r=this._data[3*a+0],e=2097151&r;h+=2097152&r?this._combined[a]:e?(0,u.stringFromCodePoint)(e):d.WHITESPACE_CELL_CHAR,a+=r>>22||1}return h},v}();o.BufferLine=b},4841:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(m,u){if(m.start.y>m.end.y)throw new Error("Buffer range end ("+m.end.x+", "+m.end.y+") cannot be before start ("+m.start.x+", "+m.start.y+")");return u*(m.end.y-m.start.y)+(m.end.x-m.start.x+1)}},4634:(P,o)=>{function m(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();var f=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,b=u[d+1].getWidth(0)===2;return f&&b?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,d,_,f,b){for(var v=[],s=0;s<u.length-1;s++){var a=s,p=u.get(++a);if(p.isWrapped){for(var h=[u.get(s)];a<u.length&&p.isWrapped;)h.push(p),p=u.get(++a);if(f>=s&&f<a)s+=h.length-1;else{for(var r=0,e=m(h,r,d),t=1,i=0;t<h.length;){var n=m(h,t,d),l=n-i,c=_-e,y=Math.min(l,c);h[r].copyCellsFrom(h[t],i,e,y,!1),(e+=y)===_&&(r++,e=0),(i+=y)===n&&(t++,i=0),e===0&&r!==0&&h[r-1].getWidth(_-1)===2&&(h[r].copyCellsFrom(h[r-1],_-1,e++,1,!1),h[r-1].setCell(_-1,b))}h[r].replaceCells(e,_,b);for(var C=0,g=h.length-1;g>0&&(g>r||h[g].getTrimmedLength()===0);g--)C++;C>0&&(v.push(s+h.length-C),v.push(C)),s+=h.length-1}}}return v},o.reflowLargerCreateNewLayout=function(u,d){for(var _=[],f=0,b=d[f],v=0,s=0;s<u.length;s++)if(b===s){var a=d[++f];u.onDeleteEmitter.fire({index:s-v,amount:a}),s+=a-1,v+=a,b=d[++f]}else _.push(s);return{layout:_,countRemoved:v}},o.reflowLargerApplyNewLayout=function(u,d){for(var _=[],f=0;f<d.length;f++)_.push(u.get(d[f]));for(f=0;f<_.length;f++)u.set(f,_[f]);u.length=d.length},o.reflowSmallerGetNewLineLengths=function(u,d,_){for(var f=[],b=u.map(function(e,t){return m(u,t,d)}).reduce(function(e,t){return e+t}),v=0,s=0,a=0;a<b;){if(b-a<_){f.push(b-a);break}v+=_;var p=m(u,s,d);v>p&&(v-=p,s++);var h=u[s].getWidth(v-1)===2;h&&v--;var r=h?_-1:_;f.push(r),a+=r}return f},o.getWrappedLineTrimmedLength=m},5295:function(P,o,m){var u,d=this&&this.__extends||(u=function(v,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(a[h]=p[h])},u(v,s)},function(v,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=v}u(v,s),v.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var _=m(9092),f=m(8460),b=function(v){function s(a,p){var h=v.call(this)||this;return h._optionsService=a,h._bufferService=p,h._onBufferActivate=h.register(new f.EventEmitter),h.reset(),h}return d(s,v),Object.defineProperty(s.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),s.prototype.reset=function(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(s.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),s.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},s.prototype.activateAltBuffer=function(a){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(a),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}))},s.prototype.resize=function(a,p){this._normal.resize(a,p),this._alt.resize(a,p)},s.prototype.setupTabStops=function(a){this._normal.setupTabStops(a),this._alt.setupTabStops(a)},s}(m(844).Disposable);o.BufferSet=b},511:function(P,o,m){var u,d=this&&this.__extends||(u=function(s,a){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(p[r]=h[r])},u(s,a)},function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function p(){this.constructor=s}u(s,a),s.prototype=a===null?Object.create(a):(p.prototype=a.prototype,new p)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var _=m(482),f=m(643),b=m(3734),v=function(s){function a(){var p=s!==null&&s.apply(this,arguments)||this;return p.content=0,p.fg=0,p.bg=0,p.extended=new b.ExtendedAttrs,p.combinedData="",p}return d(a,s),a.fromCharData=function(p){var h=new a;return h.setFromCharData(p),h},a.prototype.isCombined=function(){return 2097152&this.content},a.prototype.getWidth=function(){return this.content>>22},a.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""},a.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},a.prototype.setFromCharData=function(p){this.fg=p[f.CHAR_DATA_ATTR_INDEX],this.bg=0;var h=!1;if(p[f.CHAR_DATA_CHAR_INDEX].length>2)h=!0;else if(p[f.CHAR_DATA_CHAR_INDEX].length===2){var r=p[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var e=p[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(r-55296)+e-56320+65536|p[f.CHAR_DATA_WIDTH_INDEX]<<22:h=!0}else h=!0}else this.content=p[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[f.CHAR_DATA_WIDTH_INDEX]<<22;h&&(this.combinedData=p[f.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[f.CHAR_DATA_WIDTH_INDEX]<<22)},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(b.AttributeData);o.CellData=v},643:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:function(P,o,m){var u,d=this&&this.__extends||(u=function(b,v){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(s[p]=a[p])},u(b,v)},function(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function s(){this.constructor=b}u(b,v),b.prototype=v===null?Object.create(v):(s.prototype=v.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var _=m(8460),f=function(b){function v(s){var a=b.call(this)||this;return a.line=s,a._id=v._nextId++,a.isDisposed=!1,a._onDispose=new _.EventEmitter,a}return d(v,b),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),b.prototype.dispose.call(this))},v._nextId=1,v}(m(844).Disposable);o.Marker=f},7116:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(P,o)=>{var m,u;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
7
- `,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(m=o.C0||(o.C0={})),(u=o.C1||(o.C1={})).PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ",(o.C1_ESCAPED||(o.C1_ESCAPED={})).ST=m.ESC+"\\"},7399:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var u=m(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(_,f,b,v){var s={type:0,cancel:!1,key:void 0},a=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?s.key=f?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?s.key=f?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?s.key=f?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(s.key=f?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:if(_.shiftKey){s.key=u.C0.BS;break}if(_.altKey){s.key=u.C0.ESC+u.C0.DEL;break}s.key=u.C0.DEL;break;case 9:if(_.shiftKey){s.key=u.C0.ESC+"[Z";break}s.key=u.C0.HT,s.cancel=!0;break;case 13:s.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,s.cancel=!0;break;case 27:s.key=u.C0.ESC,_.altKey&&(s.key=u.C0.ESC+u.C0.ESC),s.cancel=!0;break;case 37:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"D",s.key===u.C0.ESC+"[1;3D"&&(s.key=u.C0.ESC+(b?"b":"[1;5D"))):s.key=f?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"C",s.key===u.C0.ESC+"[1;3C"&&(s.key=u.C0.ESC+(b?"f":"[1;5C"))):s.key=f?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"A",b||s.key!==u.C0.ESC+"[1;3A"||(s.key=u.C0.ESC+"[1;5A")):s.key=f?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"B",b||s.key!==u.C0.ESC+"[1;3B"||(s.key=u.C0.ESC+"[1;5B")):s.key=f?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(s.key=u.C0.ESC+"[2~");break;case 46:s.key=a?u.C0.ESC+"[3;"+(a+1)+"~":u.C0.ESC+"[3~";break;case 36:s.key=a?u.C0.ESC+"[1;"+(a+1)+"H":f?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:s.key=a?u.C0.ESC+"[1;"+(a+1)+"F":f?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?s.type=2:_.ctrlKey?s.key=u.C0.ESC+"[5;"+(a+1)+"~":s.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?s.type=3:_.ctrlKey?s.key=u.C0.ESC+"[6;"+(a+1)+"~":s.key=u.C0.ESC+"[6~";break;case 112:s.key=a?u.C0.ESC+"[1;"+(a+1)+"P":u.C0.ESC+"OP";break;case 113:s.key=a?u.C0.ESC+"[1;"+(a+1)+"Q":u.C0.ESC+"OQ";break;case 114:s.key=a?u.C0.ESC+"[1;"+(a+1)+"R":u.C0.ESC+"OR";break;case 115:s.key=a?u.C0.ESC+"[1;"+(a+1)+"S":u.C0.ESC+"OS";break;case 116:s.key=a?u.C0.ESC+"[15;"+(a+1)+"~":u.C0.ESC+"[15~";break;case 117:s.key=a?u.C0.ESC+"[17;"+(a+1)+"~":u.C0.ESC+"[17~";break;case 118:s.key=a?u.C0.ESC+"[18;"+(a+1)+"~":u.C0.ESC+"[18~";break;case 119:s.key=a?u.C0.ESC+"[19;"+(a+1)+"~":u.C0.ESC+"[19~";break;case 120:s.key=a?u.C0.ESC+"[20;"+(a+1)+"~":u.C0.ESC+"[20~";break;case 121:s.key=a?u.C0.ESC+"[21;"+(a+1)+"~":u.C0.ESC+"[21~";break;case 122:s.key=a?u.C0.ESC+"[23;"+(a+1)+"~":u.C0.ESC+"[23~";break;case 123:s.key=a?u.C0.ESC+"[24;"+(a+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(b&&!v||!_.altKey||_.metaKey)!b||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?s.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(s.key=u.C0.US),_.key==="@"&&(s.key=u.C0.NUL)):_.keyCode===65&&(s.type=1);else{var p=d[_.keyCode],h=p==null?void 0:p[_.shiftKey?1:0];if(h)s.key=u.C0.ESC+h;else if(_.keyCode>=65&&_.keyCode<=90){var r=_.ctrlKey?_.keyCode-64:_.keyCode+32,e=String.fromCharCode(r);_.shiftKey&&(e=e.toUpperCase()),s.key=u.C0.ESC+e}else _.key==="Dead"&&_.code.startsWith("Key")&&(e=_.code.slice(3,4),_.shiftKey||(e=e.toLowerCase()),s.key=u.C0.ESC+e,s.cancel=!0)}else _.keyCode>=65&&_.keyCode<=90?s.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?s.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?s.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?s.key=u.C0.DEL:_.keyCode===219?s.key=u.C0.ESC:_.keyCode===220?s.key=u.C0.FS:_.keyCode===221&&(s.key=u.C0.GS)}return s}},482:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},o.utf32ToString=function(d,_,f){_===void 0&&(_=0),f===void 0&&(f=d.length);for(var b="",v=_;v<f;++v){var s=d[v];s>65535?(s-=65536,b+=String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):b+=String.fromCharCode(s)}return b};var m=function(){function d(){this._interim=0}return d.prototype.clear=function(){this._interim=0},d.prototype.decode=function(_,f){var b=_.length;if(!b)return 0;var v=0,s=0;this._interim&&(56320<=(h=_.charCodeAt(s++))&&h<=57343?f[v++]=1024*(this._interim-55296)+h-56320+65536:(f[v++]=this._interim,f[v++]=h),this._interim=0);for(var a=s;a<b;++a){var p=_.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=b)return this._interim=p,v;var h;56320<=(h=_.charCodeAt(a))&&h<=57343?f[v++]=1024*(p-55296)+h-56320+65536:(f[v++]=p,f[v++]=h)}else p!==65279&&(f[v++]=p)}return v},d}();o.StringToUtf32=m;var u=function(){function d(){this.interim=new Uint8Array(3)}return d.prototype.clear=function(){this.interim.fill(0)},d.prototype.decode=function(_,f){var b=_.length;if(!b)return 0;var v,s,a,p,h=0,r=0,e=0;if(this.interim[0]){var t=!1,i=this.interim[0];i&=(224&i)==192?31:(240&i)==224?15:7;for(var n=0,l=void 0;(l=63&this.interim[++n])&&n<4;)i<<=6,i|=l;for(var c=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=c-n;e<y;){if(e>=b)return 0;if((192&(l=_[e++]))!=128){e--,t=!0;break}this.interim[n++]=l,i<<=6,i|=63&l}t||(c===2?i<128?e--:f[h++]=i:c===3?i<2048||i>=55296&&i<=57343||i===65279||(f[h++]=i):i<65536||i>1114111||(f[h++]=i)),this.interim.fill(0)}for(var C=b-4,g=e;g<b;){for(;!(!(g<C)||128&(v=_[g])||128&(s=_[g+1])||128&(a=_[g+2])||128&(p=_[g+3]));)f[h++]=v,f[h++]=s,f[h++]=a,f[h++]=p,g+=4;if((v=_[g++])<128)f[h++]=v;else if((224&v)==192){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if((r=(31&v)<<6|63&s)<128){g--;continue}f[h++]=r}else if((240&v)==224){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=_[g++]))!=128){g--;continue}if((r=(15&v)<<12|(63&s)<<6|63&a)<2048||r>=55296&&r<=57343||r===65279)continue;f[h++]=r}else if((248&v)==240){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,this.interim[2]=a,h;if((192&(p=_[g++]))!=128){g--;continue}if((r=(7&v)<<18|(63&s)<<12|(63&a)<<6|63&p)<65536||r>1114111)continue;f[h++]=r}}return h},d}();o.Utf8ToUtf32=u},225:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var u,d=m(8273),_=[[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]],f=[[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]],b=function(){function v(){if(this.version="6",!u){u=new Uint8Array(65536),(0,d.fill)(u,1),u[0]=0,(0,d.fill)(u,0,1,32),(0,d.fill)(u,0,127,160),(0,d.fill)(u,2,4352,4448),u[9001]=2,u[9002]=2,(0,d.fill)(u,2,11904,42192),u[12351]=1,(0,d.fill)(u,2,44032,55204),(0,d.fill)(u,2,63744,64256),(0,d.fill)(u,2,65040,65050),(0,d.fill)(u,2,65072,65136),(0,d.fill)(u,2,65280,65377),(0,d.fill)(u,2,65504,65511);for(var s=0;s<_.length;++s)(0,d.fill)(u,0,_[s][0],_[s][1]+1)}}return v.prototype.wcwidth=function(s){return s<32?0:s<127?1:s<65536?u[s]:function(a,p){var h,r=0,e=p.length-1;if(a<p[0][0]||a>p[e][1])return!1;for(;e>=r;)if(a>p[h=r+e>>1][1])r=h+1;else{if(!(a<p[h][0]))return!0;e=h-1}return!1}(s,f)?0:s>=131072&&s<=196605||s>=196608&&s<=262141?2:1},v}();o.UnicodeV6=b},5981:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var u=m(8460),d=typeof queueMicrotask>"u"?function(f){Promise.resolve().then(f)}:queueMicrotask,_=function(){function f(b){this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new u.EventEmitter}return Object.defineProperty(f.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),f.prototype.writeSync=function(b,v){if(v!==void 0&&this._syncCalls>v)this._syncCalls=0;else if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var s;for(this._isSyncWriting=!0;s=this._writeBuffer.shift();){this._action(s);var a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},f.prototype.write=function(b,v){var s=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return s._innerWrite()})),this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(v)},f.prototype._innerWrite=function(b,v){var s=this;b===void 0&&(b=0),v===void 0&&(v=!0);for(var a=b||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],h=this._action(p,v);if(h)return void h.catch(function(e){return d(function(){throw e}),Promise.resolve(!1)}).then(function(e){return Date.now()-a>=12?setTimeout(function(){return s._innerWrite(0,e)}):s._innerWrite(a,e)});var r=this._callbacks[this._bufferOffset];if(r&&r(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-a>=12)break}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(function(){return s._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},f}();o.WriteBuffer=_},5941:function(P,o){var m=this&&this.__read||function(f,b){var v=typeof Symbol=="function"&&f[Symbol.iterator];if(!v)return f;var s,a,p=v.call(f),h=[];try{for(;(b===void 0||b-- >0)&&!(s=p.next()).done;)h.push(s.value)}catch(r){a={error:r}}finally{try{s&&!s.done&&(v=p.return)&&v.call(p)}finally{if(a)throw a.error}}return h};Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;var u=/^([\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})$/,d=/^[\da-f]+$/;function _(f,b){var v=f.toString(16),s=v.length<2?"0"+v:v;switch(b){case 4:return v[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}o.parseColor=function(f){if(f){var b=f.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);var v=u.exec(b);if(v){var s=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/s*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/s*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/s*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),d.exec(b)&&[3,6,9,12].includes(b.length))){for(var a=b.length/3,p=[0,0,0],h=0;h<3;++h){var r=parseInt(b.slice(a*h,a*h+a),16);p[h]=a===1?r<<4:a===2?r:a===3?r>>4:r>>8}return p}}},o.toRgbString=function(f,b){b===void 0&&(b=16);var v=m(f,3),s=v[0],a=v[1],p=v[2];return"rgb:"+_(s,b)+"/"+_(a,b)+"/"+_(p,b)}},5770:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var u=m(482),d=m(8742),_=m(5770),f=[],b=function(){function a(){this._handlers=Object.create(null),this._active=f,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=f},a.prototype.registerHandler=function(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);var r=this._handlers[p];return r.push(h),{dispose:function(){var e=r.indexOf(h);e!==-1&&r.splice(e,1)}}},a.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},a.prototype.setHandlerFallback=function(p){this._handlerFb=p},a.prototype.reset=function(){if(this._active.length)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=f,this._ident=0},a.prototype.hook=function(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||f,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(h);else this._handlerFb(this._ident,"HOOK",h)},a.prototype.put=function(p,h,r){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(p,h,r);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(p,h,r))},a.prototype.unhook=function(p,h){if(h===void 0&&(h=!0),this._active.length){var r=!1,e=this._active.length-1,t=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,r=h,t=this._stack.fallThrough,this._stack.paused=!1),!t&&r===!1){for(;e>=0&&(r=this._active[e].unhook(p))!==!0;e--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,r;e--}for(;e>=0;e--)if((r=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",p);this._active=f,this._ident=0},a}();o.DcsParser=b;var v=new d.Params;v.addParam(0);var s=function(){function a(p){this._handler=p,this._data="",this._params=v,this._hitLimit=!1}return a.prototype.hook=function(p){this._params=p.length>1||p.params[0]?p.clone():v,this._data="",this._hitLimit=!1},a.prototype.put=function(p,h,r){this._hitLimit||(this._data+=(0,u.utf32ToString)(p,h,r),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},a.prototype.unhook=function(p){var h=this,r=!1;if(this._hitLimit)r=!1;else if(p&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then(function(e){return h._params=v,h._data="",h._hitLimit=!1,e});return this._params=v,this._data="",this._hitLimit=!1,r},a}();o.DcsHandler=s},2015:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var _=m(844),f=m(8273),b=m(8742),v=m(6242),s=m(6351),a=function(){function r(e){this.table=new Uint8Array(e)}return r.prototype.setDefault=function(e,t){(0,f.fill)(this.table,e<<4|t)},r.prototype.add=function(e,t,i,n){this.table[t<<8|e]=i<<4|n},r.prototype.addMany=function(e,t,i,n){for(var l=0;l<e.length;l++)this.table[t<<8|e[l]]=i<<4|n},r}();o.TransitionTable=a;var p=160;o.VT500_TRANSITION_TABLE=function(){var r=new a(4095),e=Array.apply(null,Array(256)).map(function(y,C){return C}),t=function(y,C){return e.slice(y,C)},i=t(32,127),n=t(0,24);n.push(25),n.push.apply(n,t(28,32));var l,c=t(0,14);for(l in r.setDefault(1,0),r.addMany(i,0,2,0),c)r.addMany([24,26,153,154],l,3,0),r.addMany(t(128,144),l,3,0),r.addMany(t(144,152),l,3,0),r.add(156,l,0,0),r.add(27,l,11,1),r.add(157,l,4,8),r.addMany([152,158,159],l,0,7),r.add(155,l,11,3),r.add(144,l,11,9);return r.addMany(n,0,3,0),r.addMany(n,1,3,1),r.add(127,1,0,1),r.addMany(n,8,0,8),r.addMany(n,3,3,3),r.add(127,3,0,3),r.addMany(n,4,3,4),r.add(127,4,0,4),r.addMany(n,6,3,6),r.addMany(n,5,3,5),r.add(127,5,0,5),r.addMany(n,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(i,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(t(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(i,7,0,7),r.addMany(n,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(t(64,127),3,7,0),r.addMany(t(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(t(48,60),4,8,4),r.addMany(t(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(t(32,64),6,0,6),r.add(127,6,0,6),r.addMany(t(64,127),6,0,0),r.addMany(t(32,48),3,9,5),r.addMany(t(32,48),5,9,5),r.addMany(t(48,64),5,0,6),r.addMany(t(64,127),5,7,0),r.addMany(t(32,48),4,9,5),r.addMany(t(32,48),1,9,2),r.addMany(t(32,48),2,9,2),r.addMany(t(48,127),2,10,0),r.addMany(t(48,80),1,10,0),r.addMany(t(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(t(96,127),1,10,0),r.add(80,1,11,9),r.addMany(n,9,0,9),r.add(127,9,0,9),r.addMany(t(28,32),9,0,9),r.addMany(t(32,48),9,9,12),r.addMany(t(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(n,11,0,11),r.addMany(t(32,128),11,0,11),r.addMany(t(28,32),11,0,11),r.addMany(n,10,0,10),r.add(127,10,0,10),r.addMany(t(28,32),10,0,10),r.addMany(t(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(t(32,48),10,9,12),r.addMany(n,12,0,12),r.add(127,12,0,12),r.addMany(t(28,32),12,0,12),r.addMany(t(32,48),12,9,12),r.addMany(t(48,64),12,0,11),r.addMany(t(64,127),12,12,13),r.addMany(t(64,127),10,12,13),r.addMany(t(64,127),9,12,13),r.addMany(n,13,13,13),r.addMany(i,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(p,0,2,0),r.add(p,8,5,8),r.add(p,6,0,6),r.add(p,11,0,11),r.add(p,13,13,13),r}();var h=function(r){function e(t){t===void 0&&(t=o.VT500_TRANSITION_TABLE);var i=r.call(this)||this;return i._transitions=t,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new b.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(n,l,c){},i._executeHandlerFb=function(n){},i._csiHandlerFb=function(n,l){},i._escHandlerFb=function(n){},i._errorHandlerFb=function(n){return n},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new v.OscParser,i._dcsParser=new s.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},function(){return!0}),i}return d(e,r),e.prototype._identifier=function(t,i){i===void 0&&(i=[64,126]);var n=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var c=t.intermediates.charCodeAt(l);if(32>c||c>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=c}}if(t.final.length!==1)throw new Error("final must be a single byte");var y=t.final.charCodeAt(0);if(i[0]>y||y>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return(n<<=8)|y},e.prototype.identToString=function(t){for(var i=[];t;)i.push(String.fromCharCode(255&t)),t>>=8;return i.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(t){this._printHandler=t},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(t,i){var n=this._identifier(t,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);var l=this._escHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},e.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},e.prototype.setExecuteHandler=function(t,i){this._executeHandlers[t.charCodeAt(0)]=i},e.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},e.prototype.registerCsiHandler=function(t,i){var n=this._identifier(t);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);var l=this._csiHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},e.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},e.prototype.registerDcsHandler=function(t,i){return this._dcsParser.registerHandler(this._identifier(t),i)},e.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},e.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},e.prototype.registerOscHandler=function(t,i){return this._oscParser.registerHandler(t,i)},e.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},e.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},e.prototype.setErrorHandler=function(t){this._errorHandler=t},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(t,i,n,l,c){this._parseStack.state=t,this._parseStack.handlers=i,this._parseStack.handlerPos=n,this._parseStack.transition=l,this._parseStack.chunkPos=c},e.prototype.parse=function(t,i,n){var l,c=0,y=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var g=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&S>-1){for(;S>=0&&(l=g[S](this._params))!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 4:if(n===!1&&S>-1){for(;S>=0&&(l=g[S]())!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 6:if(c=t[this._parseStack.chunkPos],l=this._dcsParser.unhook(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(c=t[this._parseStack.chunkPos],l=this._oscParser.end(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var w=C;w<i;++w){switch(c=t[w],(y=this._transitions.table[this.currentState<<8|(c<160?c:p)])>>4){case 2:for(var R=w+1;;++R){if(R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:c,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var L=(g=this._csiHandlers[this._collect<<8|c])?g.length-1:-1;L>=0&&(l=g[L](this._params))!==!0;L--)if(l instanceof Promise)return this._preserveStack(3,g,L,y,w),l;L<0&&this._csiHandlerFb(this._collect<<8|c,this._params),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(c-48)}while(++w<i&&(c=t[w])>47&&c<60);w--;break;case 9:this._collect<<=8,this._collect|=c;break;case 10:for(var k=this._escHandlers[this._collect<<8|c],E=k?k.length-1:-1;E>=0&&(l=k[E]())!==!0;E--)if(l instanceof Promise)return this._preserveStack(4,k,E,y,w),l;E<0&&this._escHandlerFb(this._collect<<8|c),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|c,this._params);break;case 13:for(var x=w+1;;++x)if(x>=i||(c=t[x])===24||c===26||c===27||c>127&&c<p){this._dcsParser.put(t,w,x),w=x-1;break}break;case 14:if(l=this._dcsParser.unhook(c!==24&&c!==26))return this._preserveStack(6,[],0,y,w),l;c===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var M=w+1;;M++)if(M>=i||(c=t[M])<32||c>127&&c<p){this._oscParser.put(t,w,M),w=M-1;break}break;case 6:if(l=this._oscParser.end(c!==24&&c!==26))return this._preserveStack(5,[],0,y,w),l;c===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&y}},e}(_.Disposable);o.EscapeSequenceParser=h},6242:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var u=m(5770),d=m(482),_=[],f=function(){function v(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(s,a){this._handlers[s]===void 0&&(this._handlers[s]=[]);var p=this._handlers[s];return p.push(a),{dispose:function(){var h=p.indexOf(a);h!==-1&&p.splice(h,1)}}},v.prototype.clearHandler=function(s){this._handlers[s]&&delete this._handlers[s]},v.prototype.setHandlerFallback=function(s){this._handlerFb=s},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=_},v.prototype.reset=function(){if(this._state===2)for(var s=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;s>=0;--s)this._active[s].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||_,this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(s,a,p){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(s,a,p);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(s,a,p))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(s,a,p){if(this._state!==3){if(this._state===1)for(;a<p;){var h=s[a++];if(h===59){this._state=2,this._start();break}if(h<48||57<h)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+h-48}this._state===2&&p-a>0&&this._put(s,a,p)}},v.prototype.end=function(s,a){if(a===void 0&&(a=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var p=!1,h=this._active.length-1,r=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=a,r=this._stack.fallThrough,this._stack.paused=!1),!r&&p===!1){for(;h>=0&&(p=this._active[h].end(s))!==!0;h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if((p=this._active[h].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",s);this._active=_,this._id=-1,this._state=0}},v}();o.OscParser=f;var b=function(){function v(s){this._handler=s,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(s,a,p){this._hitLimit||(this._data+=(0,d.utf32ToString)(s,a,p),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(s){var a=this,p=!1;if(this._hitLimit)p=!1;else if(s&&(p=this._handler(this._data))instanceof Promise)return p.then(function(h){return a._data="",a._hitLimit=!1,h});return this._data="",this._hitLimit=!1,p},v}();o.OscHandler=b},8742:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var m=2147483647,u=function(){function d(_,f){if(_===void 0&&(_=32),f===void 0&&(f=32),this.maxLength=_,this.maxSubParamsLength=f,f>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(f),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return d.fromArray=function(_){var f=new d;if(!_.length)return f;for(var b=Array.isArray(_[0])?1:0;b<_.length;++b){var v=_[b];if(Array.isArray(v))for(var s=0;s<v.length;++s)f.addSubParam(v[s]);else f.addParam(v)}return f},d.prototype.clone=function(){var _=new d(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_},d.prototype.toArray=function(){for(var _=[],f=0;f<this.length;++f){_.push(this.params[f]);var b=this._subParamsIdx[f]>>8,v=255&this._subParamsIdx[f];v-b>0&&_.push(Array.prototype.slice.call(this._subParams,b,v))}return _},d.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},d.prototype.addParam=function(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>m?m:_}},d.prototype.addSubParam=function(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>m?m:_,this._subParamsIdx[this.length-1]++}},d.prototype.hasSubParams=function(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0},d.prototype.getSubParams=function(_){var f=this._subParamsIdx[_]>>8,b=255&this._subParamsIdx[_];return b-f>0?this._subParams.subarray(f,b):null},d.prototype.getSubParamsAll=function(){for(var _={},f=0;f<this.length;++f){var b=this._subParamsIdx[f]>>8,v=255&this._subParamsIdx[f];v-b>0&&(_[f]=this._subParams.slice(b,v))}return _},d.prototype.addDigit=function(_){var f;if(!(this._rejectDigits||!(f=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var b=this._digitIsSub?this._subParams:this.params,v=b[f-1];b[f-1]=~v?Math.min(10*v+_,m):_}},d}();o.Params=u},5741:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var m=function(){function u(){this._addons=[]}return u.prototype.dispose=function(){for(var d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()},u.prototype.loadAddon=function(d,_){var f=this,b={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(b),_.dispose=function(){return f._wrappedAddonDispose(b)},_.activate(d)},u.prototype._wrappedAddonDispose=function(d){if(!d.isDisposed){for(var _=-1,f=0;f<this._addons.length;f++)if(this._addons[f]===d){_=f;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}},u}();o.AddonManager=m},8771:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;var u=m(3785),d=m(511),_=function(){function f(b,v){this._buffer=b,this.type=v}return f.prototype.init=function(b){return this._buffer=b,this},Object.defineProperty(f.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),f.prototype.getLine=function(b){var v=this._buffer.lines.get(b);if(v)return new u.BufferLineApiView(v)},f.prototype.getNullCell=function(){return new d.CellData},f}();o.BufferApiView=_},3785:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;var u=m(511),d=function(){function _(f){this._line=f}return Object.defineProperty(_.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),_.prototype.getCell=function(f,b){if(!(f<0||f>=this._line.length))return b?(this._line.loadCell(f,b),b):this._line.loadCell(f,new u.CellData)},_.prototype.translateToString=function(f,b,v){return this._line.translateToString(f,b,v)},_}();o.BufferLineApiView=d},8285:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;var u=m(8771),d=m(8460),_=function(){function f(b){var v=this;this._core=b,this._onBufferChange=new d.EventEmitter,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(f.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),f}();o.BufferNamespaceApi=_},7975:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0;var m=function(){function u(d){this._core=d}return u.prototype.registerCsiHandler=function(d,_){return this._core.registerCsiHandler(d,function(f){return _(f.toArray())})},u.prototype.addCsiHandler=function(d,_){return this.registerCsiHandler(d,_)},u.prototype.registerDcsHandler=function(d,_){return this._core.registerDcsHandler(d,function(f,b){return _(f,b.toArray())})},u.prototype.addDcsHandler=function(d,_){return this.registerDcsHandler(d,_)},u.prototype.registerEscHandler=function(d,_){return this._core.registerEscHandler(d,_)},u.prototype.addEscHandler=function(d,_){return this.registerEscHandler(d,_)},u.prototype.registerOscHandler=function(d,_){return this._core.registerOscHandler(d,_)},u.prototype.addOscHandler=function(d,_){return this.registerOscHandler(d,_)},u}();o.ParserApi=m},7090:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0;var m=function(){function u(d){this._core=d}return u.prototype.register=function(d){this._core.unicodeService.register(d)},Object.defineProperty(u.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(d){this._core.unicodeService.activeVersion=d},enumerable:!1,configurable:!0}),u}();o.UnicodeApi=m},744:function(P,o,m){var u,d=this&&this.__extends||(u=function(h,r){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},u(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}u(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),_=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},f=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var b=m(2585),v=m(5295),s=m(8460),a=m(844);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var p=function(h){function r(e){var t=h.call(this)||this;return t._optionsService=e,t.isUserScrolling=!1,t._onResize=new s.EventEmitter,t._onScroll=new s.EventEmitter,t.cols=Math.max(e.rawOptions.cols||0,o.MINIMUM_COLS),t.rows=Math.max(e.rawOptions.rows||0,o.MINIMUM_ROWS),t.buffers=new v.BufferSet(e,t),t}return d(r,h),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){h.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){t===void 0&&(t=!1);var i,n=this.buffer;(i=this._cachedBlankLine)&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=n.getBlankLine(e,t),this._cachedBlankLine=i),i.isWrapped=t;var l=n.ybase+n.scrollTop,c=n.ybase+n.scrollBottom;if(n.scrollTop===0){var y=n.lines.isFull;c===n.lines.length-1?y?n.lines.recycle().copyFrom(i):n.lines.push(i.clone()):n.lines.splice(c+1,0,i.clone()),y?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{var C=c-l+1;n.lines.shiftElements(l+1,C-1,-1),n.lines.set(c,i.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)},r.prototype.scrollLines=function(e,t,i){var n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);var l=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),l!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;t!==0&&this.scrollLines(t)},_([f(0,b.IOptionsService)],r)}(a.Disposable);o.BufferService=p},7994:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var m=function(){function u(){this.glevel=0,this._charsets=[]}return u.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},u.prototype.setgLevel=function(d){this.glevel=d,this.charset=this._charsets[d]},u.prototype.setgCharset=function(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)},u}();o.CharsetService=m},1753:function(P,o,m){var u=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},d=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},_=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var f=m(2585),b=m(8460),v={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function s(r,e){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||e||(t|=3)),t}var a=String.fromCharCode,p={DEFAULT:function(r){var e=[s(r,!1)+32,r.col+32,r.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1B[M"+a(e[0])+a(e[1])+a(e[2])},SGR:function(r){var e=r.action===0&&r.button!==4?"m":"M";return"\x1B[<"+s(r,!0)+";"+r.col+";"+r.row+e}},h=function(){function r(e,t){var i,n,l,c;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new b.EventEmitter,this._lastEvent=null;try{for(var y=_(Object.keys(v)),C=y.next();!C.done;C=y.next()){var g=C.value;this.addProtocol(g,v[g])}}catch(L){i={error:L}}finally{try{C&&!C.done&&(n=y.return)&&n.call(y)}finally{if(i)throw i.error}}try{for(var S=_(Object.keys(p)),w=S.next();!w.done;w=S.next()){var R=w.value;this.addEncoding(R,p[R])}}catch(L){l={error:L}}finally{try{w&&!w.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}this.reset()}return r.prototype.addProtocol=function(e,t){this._protocols[e]=t},r.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(r.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(r.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),r.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,e))||!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},r.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},r.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},u([d(0,f.IBufferService),d(1,f.ICoreService)],r)}();o.CoreMouseService=h},6975:function(P,o,m){var u,d=this&&this.__extends||(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},u(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}u(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),_=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},f=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var b=m(2585),v=m(8460),s=m(1439),a=m(844),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),r=function(e){function t(i,n,l,c){var y=e.call(this)||this;return y._bufferService=n,y._logService=l,y._optionsService=c,y.isCursorInitialized=!1,y.isCursorHidden=!1,y._onData=y.register(new v.EventEmitter),y._onUserInput=y.register(new v.EventEmitter),y._onBinary=y.register(new v.EventEmitter),y._scrollToBottom=i,y.register({dispose:function(){return y._scrollToBottom=void 0}}),y.modes=(0,s.clone)(p),y.decPrivateModes=(0,s.clone)(h),y}return d(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,s.clone)(p),this.decPrivateModes=(0,s.clone)(h)},t.prototype.triggerDataEvent=function(i,n){if(n===void 0&&(n=!1),!this._optionsService.rawOptions.disableStdin){var l=this._bufferService.buffer;l.ybase!==l.ydisp&&this._scrollToBottom(),n&&this._onUserInput.fire(),this._logService.debug('sending data "'+i+'"',function(){return i.split("").map(function(c){return c.charCodeAt(0)})}),this._onData.fire(i)}},t.prototype.triggerBinaryEvent=function(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+i+'"',function(){return i.split("").map(function(n){return n.charCodeAt(0)})}),this._onBinary.fire(i))},_([f(1,b.IBufferService),f(2,b.ILogService),f(3,b.IOptionsService)],t)}(a.Disposable);o.CoreService=r},9074:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),_=this&&this.__generator||function(r,e){var t,i,n,l,c={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function y(C){return function(g){return function(S){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,i&&(n=2&S[0]?i.return:S[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,S[1])).done)return n;switch(i=0,n&&(S=[2&S[0],n.value]),S[0]){case 0:case 1:n=S;break;case 4:return c.label++,{value:S[1],done:!1};case 5:c.label++,i=S[1],S=[0];continue;case 7:S=c.ops.pop(),c.trys.pop();continue;default:if(!((n=(n=c.trys).length>0&&n[n.length-1])||S[0]!==6&&S[0]!==2)){c=0;continue}if(S[0]===3&&(!n||S[1]>n[0]&&S[1]<n[3])){c.label=S[1];break}if(S[0]===6&&c.label<n[1]){c.label=n[1],n=S;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(S);break}n[2]&&c.ops.pop(),c.trys.pop();continue}S=e.call(r,c)}catch(w){S=[6,w],i=0}finally{t=n=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([C,g])}}},f=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;var b=m(8055),v=m(8460),s=m(844),a=m(6106),p=function(r){function e(){var t=r.call(this)||this;return t._decorations=new a.SortedList(function(i){return i.marker.line}),t._onDecorationRegistered=t.register(new v.EventEmitter),t._onDecorationRemoved=t.register(new v.EventEmitter),t}return d(e,r),Object.defineProperty(e.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),e.prototype.registerDecoration=function(t){var i=this;if(!t.marker.isDisposed){var n=new h(t);if(n){var l=n.marker.onDispose(function(){return n.dispose()});n.onDispose(function(){n&&(i._decorations.delete(n)&&i._onDecorationRemoved.fire(n),l.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}},e.prototype.reset=function(){var t,i;try{for(var n=f(this._decorations.values()),l=n.next();!l.done;l=n.next())l.value.dispose()}catch(c){t={error:c}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._decorations.clear()},e.prototype.getDecorationsAtLine=function(t){return _(this,function(i){return[2,this._decorations.getKeyIterator(t)]})},e.prototype.getDecorationsAtCell=function(t,i,n){var l,c,y,C,g,S,w,R,L,k,E;return _(this,function(x){switch(x.label){case 0:l=0,c=0,x.label=1;case 1:x.trys.push([1,6,7,8]),y=f(this._decorations.getKeyIterator(i)),C=y.next(),x.label=2;case 2:return C.done?[3,5]:(g=C.value,l=(L=g.options.x)!==null&&L!==void 0?L:0,c=l+((k=g.options.width)!==null&&k!==void 0?k:1),!(t>=l&&t<c)||n&&((E=g.options.layer)!==null&&E!==void 0?E:"bottom")!==n?[3,4]:[4,g]);case 3:x.sent(),x.label=4;case 4:return C=y.next(),[3,2];case 5:return[3,8];case 6:return S=x.sent(),w={error:S},[3,8];case 7:try{C&&!C.done&&(R=y.return)&&R.call(y)}finally{if(w)throw w.error}return[7];case 8:return[2]}})},e.prototype.dispose=function(){var t,i;try{for(var n=f(this._decorations.values()),l=n.next();!l.done;l=n.next()){var c=l.value;this._onDecorationRemoved.fire(c)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.reset()},e}(s.Disposable);o.DecorationService=p;var h=function(r){function e(t){var i=r.call(this)||this;return i.options=t,i.isDisposed=!1,i.onRenderEmitter=i.register(new v.EventEmitter),i.onRender=i.onRenderEmitter.event,i._onDispose=i.register(new v.EventEmitter),i.onDispose=i._onDispose.event,i._cachedBg=null,i._cachedFg=null,i.marker=t.marker,i.options.overviewRulerOptions&&!i.options.overviewRulerOptions.position&&(i.options.overviewRulerOptions.position="full"),i}return d(e,r),Object.defineProperty(e.prototype,"backgroundColorRGB",{get:function(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=b.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"foregroundColorRGB",{get:function(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=b.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),r.prototype.dispose.call(this))},e}(s.Disposable)},3730:function(P,o,m){var u=this&&this.__decorate||function(b,v,s,a){var p,h=arguments.length,r=h<3?v:a===null?a=Object.getOwnPropertyDescriptor(v,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(b,v,s,a);else for(var e=b.length-1;e>=0;e--)(p=b[e])&&(r=(h<3?p(r):h>3?p(v,s,r):p(v,s))||r);return h>3&&r&&Object.defineProperty(v,s,r),r},d=this&&this.__param||function(b,v){return function(s,a){v(s,a,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var _=m(2585),f=function(){function b(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(b.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),b.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},b.prototype.markDirty=function(v){v<this._start?this._start=v:v>this._end&&(this._end=v)},b.prototype.markRangeDirty=function(v,s){if(v>s){var a=v;v=s,s=a}v<this._start&&(this._start=v),s>this._end&&(this._end=s)},b.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u([d(0,_.IBufferService)],b)}();o.DirtyRowService=f},4348:function(P,o,m){var u=this&&this.__values||function(a){var p=typeof Symbol=="function"&&Symbol.iterator,h=p&&a[p],r=0;if(h)return h.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&r>=a.length&&(a=void 0),{value:a&&a[r++],done:!a}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},_=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var f=m(2585),b=m(8343),v=function(){function a(){for(var p,h,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this._entries=new Map;try{for(var t=u(r),i=t.next();!i.done;i=t.next()){var n=d(i.value,2),l=n[0],c=n[1];this.set(l,c)}}catch(y){p={error:y}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(p)throw p.error}}}return a.prototype.set=function(p,h){var r=this._entries.get(p);return this._entries.set(p,h),r},a.prototype.forEach=function(p){this._entries.forEach(function(h,r){return p(r,h)})},a.prototype.has=function(p){return this._entries.has(p)},a.prototype.get=function(p){return this._entries.get(p)},a}();o.ServiceCollection=v;var s=function(){function a(){this._services=new v,this._services.set(f.IInstantiationService,this)}return a.prototype.setService=function(p,h){this._services.set(p,h)},a.prototype.getService=function(p){return this._services.get(p)},a.prototype.createInstance=function(p){for(var h,r,e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var i=(0,b.getServiceDependencies)(p).sort(function(S,w){return S.index-w.index}),n=[];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var y=c.value,C=this._services.get(y.id);if(!C)throw new Error("[createInstance] "+p.name+" depends on UNKNOWN service "+y.id+".");n.push(C)}}catch(S){h={error:S}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(h)throw h.error}}var g=i.length>0?i[0].index:e.length;if(e.length!==g)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(g+1)+" conflicts with "+e.length+" static arguments");return new(p.bind.apply(p,_([void 0],d(_(_([],d(e),!1),d(n),!1)),!1)))},a}();o.InstantiationService=s},7866:function(P,o,m){var u=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},d=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}},_=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},f=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=void 0;var b=m(2585),v={debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF},s=function(){function a(p){var h=this;this._optionsService=p,this.logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(r){r==="logLevel"&&h._updateLogLevel()})}return a.prototype._updateLogLevel=function(){this.logLevel=v[this._optionsService.rawOptions.logLevel]},a.prototype._evalLazyOptionalParams=function(p){for(var h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())},a.prototype._log=function(p,h,r){this._evalLazyOptionalParams(r),p.call.apply(p,f([console,"xterm.js: "+h],_(r),!1))},a.prototype.debug=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.DEBUG&&this._log(console.log,p,h)},a.prototype.info=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.INFO&&this._log(console.info,p,h)},a.prototype.warn=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.WARN&&this._log(console.warn,p,h)},a.prototype.error=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.ERROR&&this._log(console.error,p,h)},u([d(0,b.IOptionsService)],a)}();o.LogService=s},7302:function(P,o,m){var u=this&&this.__assign||function(){return u=Object.assign||function(v){for(var s,a=1,p=arguments.length;a<p;a++)for(var h in s=arguments[a])Object.prototype.hasOwnProperty.call(s,h)&&(v[h]=s[h]);return v},u.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var d=m(8460),_=m(6114);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:_.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var f=["normal","bold","100","200","300","400","500","600","700","800","900"],b=function(){function v(s){this._onOptionChange=new d.EventEmitter;var a=u({},o.DEFAULT_OPTIONS);for(var p in s)if(p in a)try{var h=s[p];a[p]=this._sanitizeAndValidateOption(p,h)}catch(r){console.error(r)}this.rawOptions=a,this.options=u({},a),this._setupOptions()}return Object.defineProperty(v.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),v.prototype._setupOptions=function(){var s=this,a=function(e){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return s.rawOptions[e]},p=function(e,t){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');t=s._sanitizeAndValidateOption(e,t),s.rawOptions[e]!==t&&(s.rawOptions[e]=t,s._onOptionChange.fire(e))};for(var h in this.rawOptions){var r={get:a.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,r)}},v.prototype.setOption=function(s,a){this.options[s]=a},v.prototype._sanitizeAndValidateOption=function(s,a){switch(s){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":a||(a=o.DEFAULT_OPTIONS[s]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=f.includes(a)?a:o.DEFAULT_OPTIONS[s];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(s+" cannot be less than 1, value: "+a);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(s+" cannot be less than 0, value: "+a);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(s+" cannot be less than or equal to 0, value: "+a);case"rows":case"cols":if(!a&&a!==0)throw new Error(s+" must be numeric, value: "+a)}return a},v.prototype.getOption=function(s){return this.options[s]},v}();o.OptionsService=b},8343:(P,o)=>{function m(u,d,_){d.di$target===d?d.di$dependencies.push({id:u,index:_}):(d.di$dependencies=[{id:u,index:_}],d.di$target=d)}Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0,o.serviceRegistry=new Map,o.getServiceDependencies=function(u){return u.di$dependencies||[]},o.createDecorator=function(u){if(o.serviceRegistry.has(u))return o.serviceRegistry.get(u);var d=function(_,f,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");m(d,_,b)};return d.toString=function(){return u},o.serviceRegistry.set(u,d),d}},2585:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var u,d=m(8343);o.IBufferService=(0,d.createDecorator)("BufferService"),o.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),o.ICoreService=(0,d.createDecorator)("CoreService"),o.ICharsetService=(0,d.createDecorator)("CharsetService"),o.IDirtyRowService=(0,d.createDecorator)("DirtyRowService"),o.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(u=o.LogLevelEnum||(o.LogLevelEnum={}))[u.DEBUG=0]="DEBUG",u[u.INFO=1]="INFO",u[u.WARN=2]="WARN",u[u.ERROR=3]="ERROR",u[u.OFF=4]="OFF",o.ILogService=(0,d.createDecorator)("LogService"),o.IOptionsService=(0,d.createDecorator)("OptionsService"),o.IUnicodeService=(0,d.createDecorator)("UnicodeService"),o.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var u=m(8460),d=m(225),_=function(){function f(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter;var b=new d.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}return Object.defineProperty(f.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._active},set:function(b){if(!this._providers[b])throw new Error('unknown Unicode version "'+b+'"');this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)},enumerable:!1,configurable:!0}),f.prototype.register=function(b){this._providers[b.version]=b},f.prototype.wcwidth=function(b){return this._activeProvider.wcwidth(b)},f.prototype.getStringCellWidth=function(b){for(var v=0,s=b.length,a=0;a<s;++a){var p=b.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=s)return v+this.wcwidth(p);var h=b.charCodeAt(a);56320<=h&&h<=57343?p=1024*(p-55296)+h-56320+65536:v+=this.wcwidth(h)}v+=this.wcwidth(p)}return v},f}();o.UnicodeService=_}},Q={};return function P(o){var m=Q[o];if(m!==void 0)return m.exports;var u=Q[o]={exports:{}};return X[o].call(u.exports,u,u.exports,P),u.exports}(4389)})()})})(Pr);var ii=Pr.exports,Ir={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(window,function(){return function(X){var Q={};function P(o){if(Q[o])return Q[o].exports;var m=Q[o]={i:o,l:!1,exports:{}};return X[o].call(m.exports,m,m.exports,P),m.l=!0,m.exports}return P.m=X,P.c=Q,P.d=function(o,m,u){P.o(o,m)||Object.defineProperty(o,m,{enumerable:!0,get:u})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,m){if(1&m&&(o=P(o)),8&m||4&m&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(P.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&m&&typeof o!="string")for(var d in o)P.d(u,d,(function(_){return o[_]}).bind(null,d));return u},P.n=function(o){var m=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(m,"a",m),m},P.o=function(o,m){return Object.prototype.hasOwnProperty.call(o,m)},P.p="",P(P.s=0)}([function(X,Q,P){Object.defineProperty(Q,"__esModule",{value:!0});var o=new RegExp(`(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+]*)*([^:"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)`);function m(d,_){window.open(_,"_blank")}var u=function(){function d(_,f){_===void 0&&(_=m),f===void 0&&(f={}),this._handler=_,this._options=f,this._options.matchIndex=1}return d.prototype.activate=function(_){this._terminal=_,this._linkMatcherId=this._terminal.registerLinkMatcher(o,this._handler,this._options)},d.prototype.dispose=function(){this._linkMatcherId!==void 0&&this._terminal!==void 0&&this._terminal.deregisterLinkMatcher(this._linkMatcherId)},d}();Q.WebLinksAddon=u}])})})(Ir);var ni=Ir.exports,Hr={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(window,function(){return function(X){var Q={};function P(o){if(Q[o])return Q[o].exports;var m=Q[o]={i:o,l:!1,exports:{}};return X[o].call(m.exports,m,m.exports,P),m.l=!0,m.exports}return P.m=X,P.c=Q,P.d=function(o,m,u){P.o(o,m)||Object.defineProperty(o,m,{enumerable:!0,get:u})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,m){if(1&m&&(o=P(o)),8&m||4&m&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(P.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&m&&typeof o!="string")for(var d in o)P.d(u,d,(function(_){return o[_]}).bind(null,d));return u},P.n=function(o){var m=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(m,"a",m),m},P.o=function(o,m){return Object.prototype.hasOwnProperty.call(o,m)},P.p="",P(P.s=0)}([function(X,Q,P){Object.defineProperty(Q,"__esModule",{value:!0});var o=function(){function m(){}return m.prototype.activate=function(u){this._terminal=u},m.prototype.dispose=function(){},m.prototype.fit=function(){var u=this.proposeDimensions();if(u&&this._terminal){var d=this._terminal._core;this._terminal.rows===u.rows&&this._terminal.cols===u.cols||(d._renderService.clear(),this._terminal.resize(u.cols,u.rows))}},m.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element.parentElement){var u=this._terminal._core,d=window.getComputedStyle(this._terminal.element.parentElement),_=parseInt(d.getPropertyValue("height")),f=Math.max(0,parseInt(d.getPropertyValue("width"))),b=window.getComputedStyle(this._terminal.element),v=_-(parseInt(b.getPropertyValue("padding-top"))+parseInt(b.getPropertyValue("padding-bottom"))),s=f-(parseInt(b.getPropertyValue("padding-right"))+parseInt(b.getPropertyValue("padding-left")))-u.viewport.scrollBarWidth;return{cols:Math.floor(s/u._renderService.dimensions.actualCellWidth),rows:Math.floor(v/u._renderService.dimensions.actualCellHeight)}}},m}();Q.FitAddon=o}])})})(Hr);var oi=Hr.exports;Object.defineProperty(pr,"__esModule",{value:!0});var jr=pr.default=void 0,si=Nt(xe),qe=Nt(qr),ai=ii,ci=ni,li=oi,hi=Nt(Nr),Rr=Nt(zr),ui=re;function Nt(G){return G&&G.__esModule?G:{default:G}}function qt(G,Z,X){return(Z=fi(Z))in G?Object.defineProperty(G,Z,{value:X,enumerable:!0,configurable:!0,writable:!0}):G[Z]=X,G}function fi(G){var Z=di(G,"string");return typeof Z=="symbol"?Z:Z+""}function di(G,Z){if(typeof G!="object"||!G)return G;var X=G[Symbol.toPrimitive];if(X!==void 0){var Q=X.call(G,Z||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)(G)}class vr extends si.default.Component{constructor(){super(...arguments),qt(this,"xterm",null),qt(this,"container",null),qt(this,"onData",Z=>{this.props.onData&&this.props.onData(Z)}),qt(this,"onRender",Z=>{this.props.onRender&&this.props.onRender(Z)})}componentDidMount(){const{value:Z,options:X}=this.props;this.fitAddon=new li.FitAddon,this.xterm=new ai.Terminal(X),this.xterm.loadAddon(new ci.WebLinksAddon),this.xterm.loadAddon(this.fitAddon),this.xterm.open(this.container),this.xterm.onData(this.onData.bind(this)),this.xterm.onRender(this.onRender.bind(this)),Z&&this.xterm.write(Z),setTimeout(()=>{this.xterm&&this.fitAddon.fit()},0),this.debounceFit=(0,hi.default)(()=>{this.fitAddon.fit()},600),window.addEventListener("resize",this.debounceFit)}componentWillUnmount(){this.xterm&&(this.xterm.dispose(),this.xterm=null),window.removeEventListener("resize",this.debounceFit)}shouldComponentUpdate(Z){return Z.hasOwnProperty("value")&&Z.value!==this.props.value&&this.xterm&&(this.xterm.clear(),setTimeout(()=>{this.xterm.write(Z.value)},0)),!1}getXTerm(){return this.xterm}write(Z,X){this.xterm&&this.xterm.write(Z,X)}focus(){this.xterm&&this.xterm.focus()}reset(){this.xterm&&this.xterm.reset()}resize(Z,X){this.xterm&&this.xterm.resize(Math.round(Z),Math.round(X))}setOption(Z,X){this.xterm&&this.xterm.setOption(Z,X)}getOption(Z){this.xterm&&this.xterm.setOption(Z)}refresh(){this.xterm&&this.xterm.refresh(0,this.xterm.rows-1)}render(){const Z=["react-xterm",this.props.className].filter(Boolean).join(" ");return(0,ui.jsx)("div",{ref:X=>this.container=X,className:Z,style:this.props.style})}}jr=pr.default=vr;vr.propTypes={onData:qe.default.func,onRender:qe.default.func,options:qe.default.object,value:qe.default.string,className:qe.default.string,style:qe.default.object};vr.defaultProps={onData:Rr.default,onRender:Rr.default,options:{},value:"",className:"",style:{}};var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});var _r=xe,_i=function(G,Z){var X=_r.useRef(function(){});_r.useEffect(function(){X.current=G}),_r.useEffect(function(){if(Z!==null){var Q=setInterval(function(){return X.current()},Z||0);return function(){return clearInterval(Q)}}},[Z])},pi=Fr.default=_i;function vi(){const[G,Z]=xe.useState(+new Date);return pi(()=>{Z(+new Date)},1e3),Kr(G,"MMMM Do YYYY, h:mm:ss a")}const Ar={info:"\x1B[34m",error:"\x1B[31m",stderr:"\x1B[31m",access:"\x1B[32m",stdout:"\x1B[37m",pm2:"\x1B[36m"},yi=/\[\d{2}\/[A-Za-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} \+\d{4}\]/g,gi=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}:/g,mi=/\(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\):/g,bi=(G,Z)=>{const X=Ar[Z.toLowerCase()]||Ar.stdout,Q=G.split(`\r
8
- `);return Q.forEach((P,o)=>{const m=P.match(yi)||P.match(gi)||P.match(mi);if(m){const u=m[0],d=`\x1B[33m${u}\x1B[0m${X}`;Q[o]=P.replace(u,d)}}),`${X}${Q.join(`\r
9
- `)}\x1B[0m
10
- `};function yr({name:G,logId:Z,types:X,defaultTypeIndex:Q,initialData:P,prepend:o,postpend:m,onTypeChange:u,...d}){const{ws:{useSubscription:_}}=Mr(),f={info:"Info",error:"Error",access:"Access",stdout:"stdout",stderr:"stderr",pm2:"PM2"},b=Gr(r=>r.breakpoints.down("md")),[v,s]=xe.useState(X[Q||0]),[a,p]=xe.useState(),h=xe.useRef({});return xe.useEffect(()=>{X.forEach(r=>{const e=h.current[r];e&&(e.write(`Collecting ${r} logs for ${G}...`),e.write(`\r
7
+ `,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(m=o.C0||(o.C0={})),(u=o.C1||(o.C1={})).PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ",(o.C1_ESCAPED||(o.C1_ESCAPED={})).ST=m.ESC+"\\"},7399:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var u=m(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(_,f,b,v){var s={type:0,cancel:!1,key:void 0},a=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?s.key=f?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?s.key=f?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?s.key=f?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(s.key=f?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:if(_.shiftKey){s.key=u.C0.BS;break}if(_.altKey){s.key=u.C0.ESC+u.C0.DEL;break}s.key=u.C0.DEL;break;case 9:if(_.shiftKey){s.key=u.C0.ESC+"[Z";break}s.key=u.C0.HT,s.cancel=!0;break;case 13:s.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,s.cancel=!0;break;case 27:s.key=u.C0.ESC,_.altKey&&(s.key=u.C0.ESC+u.C0.ESC),s.cancel=!0;break;case 37:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"D",s.key===u.C0.ESC+"[1;3D"&&(s.key=u.C0.ESC+(b?"b":"[1;5D"))):s.key=f?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"C",s.key===u.C0.ESC+"[1;3C"&&(s.key=u.C0.ESC+(b?"f":"[1;5C"))):s.key=f?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"A",b||s.key!==u.C0.ESC+"[1;3A"||(s.key=u.C0.ESC+"[1;5A")):s.key=f?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;a?(s.key=u.C0.ESC+"[1;"+(a+1)+"B",b||s.key!==u.C0.ESC+"[1;3B"||(s.key=u.C0.ESC+"[1;5B")):s.key=f?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(s.key=u.C0.ESC+"[2~");break;case 46:s.key=a?u.C0.ESC+"[3;"+(a+1)+"~":u.C0.ESC+"[3~";break;case 36:s.key=a?u.C0.ESC+"[1;"+(a+1)+"H":f?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:s.key=a?u.C0.ESC+"[1;"+(a+1)+"F":f?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?s.type=2:_.ctrlKey?s.key=u.C0.ESC+"[5;"+(a+1)+"~":s.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?s.type=3:_.ctrlKey?s.key=u.C0.ESC+"[6;"+(a+1)+"~":s.key=u.C0.ESC+"[6~";break;case 112:s.key=a?u.C0.ESC+"[1;"+(a+1)+"P":u.C0.ESC+"OP";break;case 113:s.key=a?u.C0.ESC+"[1;"+(a+1)+"Q":u.C0.ESC+"OQ";break;case 114:s.key=a?u.C0.ESC+"[1;"+(a+1)+"R":u.C0.ESC+"OR";break;case 115:s.key=a?u.C0.ESC+"[1;"+(a+1)+"S":u.C0.ESC+"OS";break;case 116:s.key=a?u.C0.ESC+"[15;"+(a+1)+"~":u.C0.ESC+"[15~";break;case 117:s.key=a?u.C0.ESC+"[17;"+(a+1)+"~":u.C0.ESC+"[17~";break;case 118:s.key=a?u.C0.ESC+"[18;"+(a+1)+"~":u.C0.ESC+"[18~";break;case 119:s.key=a?u.C0.ESC+"[19;"+(a+1)+"~":u.C0.ESC+"[19~";break;case 120:s.key=a?u.C0.ESC+"[20;"+(a+1)+"~":u.C0.ESC+"[20~";break;case 121:s.key=a?u.C0.ESC+"[21;"+(a+1)+"~":u.C0.ESC+"[21~";break;case 122:s.key=a?u.C0.ESC+"[23;"+(a+1)+"~":u.C0.ESC+"[23~";break;case 123:s.key=a?u.C0.ESC+"[24;"+(a+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(b&&!v||!_.altKey||_.metaKey)!b||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?s.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(s.key=u.C0.US),_.key==="@"&&(s.key=u.C0.NUL)):_.keyCode===65&&(s.type=1);else{var p=d[_.keyCode],h=p==null?void 0:p[_.shiftKey?1:0];if(h)s.key=u.C0.ESC+h;else if(_.keyCode>=65&&_.keyCode<=90){var r=_.ctrlKey?_.keyCode-64:_.keyCode+32,e=String.fromCharCode(r);_.shiftKey&&(e=e.toUpperCase()),s.key=u.C0.ESC+e}else _.key==="Dead"&&_.code.startsWith("Key")&&(e=_.code.slice(3,4),_.shiftKey||(e=e.toLowerCase()),s.key=u.C0.ESC+e,s.cancel=!0)}else _.keyCode>=65&&_.keyCode<=90?s.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?s.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?s.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?s.key=u.C0.DEL:_.keyCode===219?s.key=u.C0.ESC:_.keyCode===220?s.key=u.C0.FS:_.keyCode===221&&(s.key=u.C0.GS)}return s}},482:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},o.utf32ToString=function(d,_,f){_===void 0&&(_=0),f===void 0&&(f=d.length);for(var b="",v=_;v<f;++v){var s=d[v];s>65535?(s-=65536,b+=String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):b+=String.fromCharCode(s)}return b};var m=function(){function d(){this._interim=0}return d.prototype.clear=function(){this._interim=0},d.prototype.decode=function(_,f){var b=_.length;if(!b)return 0;var v=0,s=0;this._interim&&(56320<=(h=_.charCodeAt(s++))&&h<=57343?f[v++]=1024*(this._interim-55296)+h-56320+65536:(f[v++]=this._interim,f[v++]=h),this._interim=0);for(var a=s;a<b;++a){var p=_.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=b)return this._interim=p,v;var h;56320<=(h=_.charCodeAt(a))&&h<=57343?f[v++]=1024*(p-55296)+h-56320+65536:(f[v++]=p,f[v++]=h)}else p!==65279&&(f[v++]=p)}return v},d}();o.StringToUtf32=m;var u=function(){function d(){this.interim=new Uint8Array(3)}return d.prototype.clear=function(){this.interim.fill(0)},d.prototype.decode=function(_,f){var b=_.length;if(!b)return 0;var v,s,a,p,h=0,r=0,e=0;if(this.interim[0]){var t=!1,i=this.interim[0];i&=(224&i)==192?31:(240&i)==224?15:7;for(var n=0,l=void 0;(l=63&this.interim[++n])&&n<4;)i<<=6,i|=l;for(var c=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=c-n;e<y;){if(e>=b)return 0;if((192&(l=_[e++]))!=128){e--,t=!0;break}this.interim[n++]=l,i<<=6,i|=63&l}t||(c===2?i<128?e--:f[h++]=i:c===3?i<2048||i>=55296&&i<=57343||i===65279||(f[h++]=i):i<65536||i>1114111||(f[h++]=i)),this.interim.fill(0)}for(var C=b-4,g=e;g<b;){for(;!(!(g<C)||128&(v=_[g])||128&(s=_[g+1])||128&(a=_[g+2])||128&(p=_[g+3]));)f[h++]=v,f[h++]=s,f[h++]=a,f[h++]=p,g+=4;if((v=_[g++])<128)f[h++]=v;else if((224&v)==192){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if((r=(31&v)<<6|63&s)<128){g--;continue}f[h++]=r}else if((240&v)==224){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=_[g++]))!=128){g--;continue}if((r=(15&v)<<12|(63&s)<<6|63&a)<2048||r>=55296&&r<=57343||r===65279)continue;f[h++]=r}else if((248&v)==240){if(g>=b)return this.interim[0]=v,h;if((192&(s=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=_[g++]))!=128){g--;continue}if(g>=b)return this.interim[0]=v,this.interim[1]=s,this.interim[2]=a,h;if((192&(p=_[g++]))!=128){g--;continue}if((r=(7&v)<<18|(63&s)<<12|(63&a)<<6|63&p)<65536||r>1114111)continue;f[h++]=r}}return h},d}();o.Utf8ToUtf32=u},225:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var u,d=m(8273),_=[[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]],f=[[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]],b=function(){function v(){if(this.version="6",!u){u=new Uint8Array(65536),(0,d.fill)(u,1),u[0]=0,(0,d.fill)(u,0,1,32),(0,d.fill)(u,0,127,160),(0,d.fill)(u,2,4352,4448),u[9001]=2,u[9002]=2,(0,d.fill)(u,2,11904,42192),u[12351]=1,(0,d.fill)(u,2,44032,55204),(0,d.fill)(u,2,63744,64256),(0,d.fill)(u,2,65040,65050),(0,d.fill)(u,2,65072,65136),(0,d.fill)(u,2,65280,65377),(0,d.fill)(u,2,65504,65511);for(var s=0;s<_.length;++s)(0,d.fill)(u,0,_[s][0],_[s][1]+1)}}return v.prototype.wcwidth=function(s){return s<32?0:s<127?1:s<65536?u[s]:function(a,p){var h,r=0,e=p.length-1;if(a<p[0][0]||a>p[e][1])return!1;for(;e>=r;)if(a>p[h=r+e>>1][1])r=h+1;else{if(!(a<p[h][0]))return!0;e=h-1}return!1}(s,f)?0:s>=131072&&s<=196605||s>=196608&&s<=262141?2:1},v}();o.UnicodeV6=b},5981:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var u=m(8460),d=typeof queueMicrotask>"u"?function(f){Promise.resolve().then(f)}:queueMicrotask,_=function(){function f(b){this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new u.EventEmitter}return Object.defineProperty(f.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),f.prototype.writeSync=function(b,v){if(v!==void 0&&this._syncCalls>v)this._syncCalls=0;else if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var s;for(this._isSyncWriting=!0;s=this._writeBuffer.shift();){this._action(s);var a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},f.prototype.write=function(b,v){var s=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return s._innerWrite()})),this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(v)},f.prototype._innerWrite=function(b,v){var s=this;b===void 0&&(b=0),v===void 0&&(v=!0);for(var a=b||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],h=this._action(p,v);if(h)return void h.catch(function(e){return d(function(){throw e}),Promise.resolve(!1)}).then(function(e){return Date.now()-a>=12?setTimeout(function(){return s._innerWrite(0,e)}):s._innerWrite(a,e)});var r=this._callbacks[this._bufferOffset];if(r&&r(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-a>=12)break}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(function(){return s._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},f}();o.WriteBuffer=_},5941:function(P,o){var m=this&&this.__read||function(f,b){var v=typeof Symbol=="function"&&f[Symbol.iterator];if(!v)return f;var s,a,p=v.call(f),h=[];try{for(;(b===void 0||b-- >0)&&!(s=p.next()).done;)h.push(s.value)}catch(r){a={error:r}}finally{try{s&&!s.done&&(v=p.return)&&v.call(p)}finally{if(a)throw a.error}}return h};Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;var u=/^([\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})$/,d=/^[\da-f]+$/;function _(f,b){var v=f.toString(16),s=v.length<2?"0"+v:v;switch(b){case 4:return v[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}o.parseColor=function(f){if(f){var b=f.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);var v=u.exec(b);if(v){var s=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/s*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/s*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/s*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),d.exec(b)&&[3,6,9,12].includes(b.length))){for(var a=b.length/3,p=[0,0,0],h=0;h<3;++h){var r=parseInt(b.slice(a*h,a*h+a),16);p[h]=a===1?r<<4:a===2?r:a===3?r>>4:r>>8}return p}}},o.toRgbString=function(f,b){b===void 0&&(b=16);var v=m(f,3),s=v[0],a=v[1],p=v[2];return"rgb:"+_(s,b)+"/"+_(a,b)+"/"+_(p,b)}},5770:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var u=m(482),d=m(8742),_=m(5770),f=[],b=function(){function a(){this._handlers=Object.create(null),this._active=f,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=f},a.prototype.registerHandler=function(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);var r=this._handlers[p];return r.push(h),{dispose:function(){var e=r.indexOf(h);e!==-1&&r.splice(e,1)}}},a.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},a.prototype.setHandlerFallback=function(p){this._handlerFb=p},a.prototype.reset=function(){if(this._active.length)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=f,this._ident=0},a.prototype.hook=function(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||f,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(h);else this._handlerFb(this._ident,"HOOK",h)},a.prototype.put=function(p,h,r){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(p,h,r);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(p,h,r))},a.prototype.unhook=function(p,h){if(h===void 0&&(h=!0),this._active.length){var r=!1,e=this._active.length-1,t=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,r=h,t=this._stack.fallThrough,this._stack.paused=!1),!t&&r===!1){for(;e>=0&&(r=this._active[e].unhook(p))!==!0;e--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,r;e--}for(;e>=0;e--)if((r=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",p);this._active=f,this._ident=0},a}();o.DcsParser=b;var v=new d.Params;v.addParam(0);var s=function(){function a(p){this._handler=p,this._data="",this._params=v,this._hitLimit=!1}return a.prototype.hook=function(p){this._params=p.length>1||p.params[0]?p.clone():v,this._data="",this._hitLimit=!1},a.prototype.put=function(p,h,r){this._hitLimit||(this._data+=(0,u.utf32ToString)(p,h,r),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},a.prototype.unhook=function(p){var h=this,r=!1;if(this._hitLimit)r=!1;else if(p&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then(function(e){return h._params=v,h._data="",h._hitLimit=!1,e});return this._params=v,this._data="",this._hitLimit=!1,r},a}();o.DcsHandler=s},2015:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var _=m(844),f=m(8273),b=m(8742),v=m(6242),s=m(6351),a=function(){function r(e){this.table=new Uint8Array(e)}return r.prototype.setDefault=function(e,t){(0,f.fill)(this.table,e<<4|t)},r.prototype.add=function(e,t,i,n){this.table[t<<8|e]=i<<4|n},r.prototype.addMany=function(e,t,i,n){for(var l=0;l<e.length;l++)this.table[t<<8|e[l]]=i<<4|n},r}();o.TransitionTable=a;var p=160;o.VT500_TRANSITION_TABLE=function(){var r=new a(4095),e=Array.apply(null,Array(256)).map(function(y,C){return C}),t=function(y,C){return e.slice(y,C)},i=t(32,127),n=t(0,24);n.push(25),n.push.apply(n,t(28,32));var l,c=t(0,14);for(l in r.setDefault(1,0),r.addMany(i,0,2,0),c)r.addMany([24,26,153,154],l,3,0),r.addMany(t(128,144),l,3,0),r.addMany(t(144,152),l,3,0),r.add(156,l,0,0),r.add(27,l,11,1),r.add(157,l,4,8),r.addMany([152,158,159],l,0,7),r.add(155,l,11,3),r.add(144,l,11,9);return r.addMany(n,0,3,0),r.addMany(n,1,3,1),r.add(127,1,0,1),r.addMany(n,8,0,8),r.addMany(n,3,3,3),r.add(127,3,0,3),r.addMany(n,4,3,4),r.add(127,4,0,4),r.addMany(n,6,3,6),r.addMany(n,5,3,5),r.add(127,5,0,5),r.addMany(n,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(i,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(t(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(i,7,0,7),r.addMany(n,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(t(64,127),3,7,0),r.addMany(t(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(t(48,60),4,8,4),r.addMany(t(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(t(32,64),6,0,6),r.add(127,6,0,6),r.addMany(t(64,127),6,0,0),r.addMany(t(32,48),3,9,5),r.addMany(t(32,48),5,9,5),r.addMany(t(48,64),5,0,6),r.addMany(t(64,127),5,7,0),r.addMany(t(32,48),4,9,5),r.addMany(t(32,48),1,9,2),r.addMany(t(32,48),2,9,2),r.addMany(t(48,127),2,10,0),r.addMany(t(48,80),1,10,0),r.addMany(t(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(t(96,127),1,10,0),r.add(80,1,11,9),r.addMany(n,9,0,9),r.add(127,9,0,9),r.addMany(t(28,32),9,0,9),r.addMany(t(32,48),9,9,12),r.addMany(t(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(n,11,0,11),r.addMany(t(32,128),11,0,11),r.addMany(t(28,32),11,0,11),r.addMany(n,10,0,10),r.add(127,10,0,10),r.addMany(t(28,32),10,0,10),r.addMany(t(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(t(32,48),10,9,12),r.addMany(n,12,0,12),r.add(127,12,0,12),r.addMany(t(28,32),12,0,12),r.addMany(t(32,48),12,9,12),r.addMany(t(48,64),12,0,11),r.addMany(t(64,127),12,12,13),r.addMany(t(64,127),10,12,13),r.addMany(t(64,127),9,12,13),r.addMany(n,13,13,13),r.addMany(i,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(p,0,2,0),r.add(p,8,5,8),r.add(p,6,0,6),r.add(p,11,0,11),r.add(p,13,13,13),r}();var h=function(r){function e(t){t===void 0&&(t=o.VT500_TRANSITION_TABLE);var i=r.call(this)||this;return i._transitions=t,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new b.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(n,l,c){},i._executeHandlerFb=function(n){},i._csiHandlerFb=function(n,l){},i._escHandlerFb=function(n){},i._errorHandlerFb=function(n){return n},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new v.OscParser,i._dcsParser=new s.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},function(){return!0}),i}return d(e,r),e.prototype._identifier=function(t,i){i===void 0&&(i=[64,126]);var n=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var c=t.intermediates.charCodeAt(l);if(32>c||c>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=c}}if(t.final.length!==1)throw new Error("final must be a single byte");var y=t.final.charCodeAt(0);if(i[0]>y||y>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return(n<<=8)|y},e.prototype.identToString=function(t){for(var i=[];t;)i.push(String.fromCharCode(255&t)),t>>=8;return i.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(t){this._printHandler=t},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(t,i){var n=this._identifier(t,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);var l=this._escHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},e.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},e.prototype.setExecuteHandler=function(t,i){this._executeHandlers[t.charCodeAt(0)]=i},e.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},e.prototype.registerCsiHandler=function(t,i){var n=this._identifier(t);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);var l=this._csiHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},e.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},e.prototype.registerDcsHandler=function(t,i){return this._dcsParser.registerHandler(this._identifier(t),i)},e.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},e.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},e.prototype.registerOscHandler=function(t,i){return this._oscParser.registerHandler(t,i)},e.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},e.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},e.prototype.setErrorHandler=function(t){this._errorHandler=t},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(t,i,n,l,c){this._parseStack.state=t,this._parseStack.handlers=i,this._parseStack.handlerPos=n,this._parseStack.transition=l,this._parseStack.chunkPos=c},e.prototype.parse=function(t,i,n){var l,c=0,y=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var g=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&S>-1){for(;S>=0&&(l=g[S](this._params))!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 4:if(n===!1&&S>-1){for(;S>=0&&(l=g[S]())!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 6:if(c=t[this._parseStack.chunkPos],l=this._dcsParser.unhook(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(c=t[this._parseStack.chunkPos],l=this._oscParser.end(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var w=C;w<i;++w){switch(c=t[w],(y=this._transitions.table[this.currentState<<8|(c<160?c:p)])>>4){case 2:for(var R=w+1;;++R){if(R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:c,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var L=(g=this._csiHandlers[this._collect<<8|c])?g.length-1:-1;L>=0&&(l=g[L](this._params))!==!0;L--)if(l instanceof Promise)return this._preserveStack(3,g,L,y,w),l;L<0&&this._csiHandlerFb(this._collect<<8|c,this._params),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(c-48)}while(++w<i&&(c=t[w])>47&&c<60);w--;break;case 9:this._collect<<=8,this._collect|=c;break;case 10:for(var k=this._escHandlers[this._collect<<8|c],E=k?k.length-1:-1;E>=0&&(l=k[E]())!==!0;E--)if(l instanceof Promise)return this._preserveStack(4,k,E,y,w),l;E<0&&this._escHandlerFb(this._collect<<8|c),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|c,this._params);break;case 13:for(var x=w+1;;++x)if(x>=i||(c=t[x])===24||c===26||c===27||c>127&&c<p){this._dcsParser.put(t,w,x),w=x-1;break}break;case 14:if(l=this._dcsParser.unhook(c!==24&&c!==26))return this._preserveStack(6,[],0,y,w),l;c===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var M=w+1;;M++)if(M>=i||(c=t[M])<32||c>127&&c<p){this._oscParser.put(t,w,M),w=M-1;break}break;case 6:if(l=this._oscParser.end(c!==24&&c!==26))return this._preserveStack(5,[],0,y,w),l;c===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&y}},e}(_.Disposable);o.EscapeSequenceParser=h},6242:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var u=m(5770),d=m(482),_=[],f=function(){function v(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(s,a){this._handlers[s]===void 0&&(this._handlers[s]=[]);var p=this._handlers[s];return p.push(a),{dispose:function(){var h=p.indexOf(a);h!==-1&&p.splice(h,1)}}},v.prototype.clearHandler=function(s){this._handlers[s]&&delete this._handlers[s]},v.prototype.setHandlerFallback=function(s){this._handlerFb=s},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=_},v.prototype.reset=function(){if(this._state===2)for(var s=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;s>=0;--s)this._active[s].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||_,this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(s,a,p){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(s,a,p);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(s,a,p))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(s,a,p){if(this._state!==3){if(this._state===1)for(;a<p;){var h=s[a++];if(h===59){this._state=2,this._start();break}if(h<48||57<h)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+h-48}this._state===2&&p-a>0&&this._put(s,a,p)}},v.prototype.end=function(s,a){if(a===void 0&&(a=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var p=!1,h=this._active.length-1,r=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=a,r=this._stack.fallThrough,this._stack.paused=!1),!r&&p===!1){for(;h>=0&&(p=this._active[h].end(s))!==!0;h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if((p=this._active[h].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",s);this._active=_,this._id=-1,this._state=0}},v}();o.OscParser=f;var b=function(){function v(s){this._handler=s,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(s,a,p){this._hitLimit||(this._data+=(0,d.utf32ToString)(s,a,p),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(s){var a=this,p=!1;if(this._hitLimit)p=!1;else if(s&&(p=this._handler(this._data))instanceof Promise)return p.then(function(h){return a._data="",a._hitLimit=!1,h});return this._data="",this._hitLimit=!1,p},v}();o.OscHandler=b},8742:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var m=2147483647,u=function(){function d(_,f){if(_===void 0&&(_=32),f===void 0&&(f=32),this.maxLength=_,this.maxSubParamsLength=f,f>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(f),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return d.fromArray=function(_){var f=new d;if(!_.length)return f;for(var b=Array.isArray(_[0])?1:0;b<_.length;++b){var v=_[b];if(Array.isArray(v))for(var s=0;s<v.length;++s)f.addSubParam(v[s]);else f.addParam(v)}return f},d.prototype.clone=function(){var _=new d(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_},d.prototype.toArray=function(){for(var _=[],f=0;f<this.length;++f){_.push(this.params[f]);var b=this._subParamsIdx[f]>>8,v=255&this._subParamsIdx[f];v-b>0&&_.push(Array.prototype.slice.call(this._subParams,b,v))}return _},d.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},d.prototype.addParam=function(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>m?m:_}},d.prototype.addSubParam=function(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>m?m:_,this._subParamsIdx[this.length-1]++}},d.prototype.hasSubParams=function(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0},d.prototype.getSubParams=function(_){var f=this._subParamsIdx[_]>>8,b=255&this._subParamsIdx[_];return b-f>0?this._subParams.subarray(f,b):null},d.prototype.getSubParamsAll=function(){for(var _={},f=0;f<this.length;++f){var b=this._subParamsIdx[f]>>8,v=255&this._subParamsIdx[f];v-b>0&&(_[f]=this._subParams.slice(b,v))}return _},d.prototype.addDigit=function(_){var f;if(!(this._rejectDigits||!(f=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var b=this._digitIsSub?this._subParams:this.params,v=b[f-1];b[f-1]=~v?Math.min(10*v+_,m):_}},d}();o.Params=u},5741:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var m=function(){function u(){this._addons=[]}return u.prototype.dispose=function(){for(var d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()},u.prototype.loadAddon=function(d,_){var f=this,b={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(b),_.dispose=function(){return f._wrappedAddonDispose(b)},_.activate(d)},u.prototype._wrappedAddonDispose=function(d){if(!d.isDisposed){for(var _=-1,f=0;f<this._addons.length;f++)if(this._addons[f]===d){_=f;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}},u}();o.AddonManager=m},8771:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;var u=m(3785),d=m(511),_=function(){function f(b,v){this._buffer=b,this.type=v}return f.prototype.init=function(b){return this._buffer=b,this},Object.defineProperty(f.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),f.prototype.getLine=function(b){var v=this._buffer.lines.get(b);if(v)return new u.BufferLineApiView(v)},f.prototype.getNullCell=function(){return new d.CellData},f}();o.BufferApiView=_},3785:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;var u=m(511),d=function(){function _(f){this._line=f}return Object.defineProperty(_.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),_.prototype.getCell=function(f,b){if(!(f<0||f>=this._line.length))return b?(this._line.loadCell(f,b),b):this._line.loadCell(f,new u.CellData)},_.prototype.translateToString=function(f,b,v){return this._line.translateToString(f,b,v)},_}();o.BufferLineApiView=d},8285:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;var u=m(8771),d=m(8460),_=function(){function f(b){var v=this;this._core=b,this._onBufferChange=new d.EventEmitter,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(f.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),f}();o.BufferNamespaceApi=_},7975:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0;var m=function(){function u(d){this._core=d}return u.prototype.registerCsiHandler=function(d,_){return this._core.registerCsiHandler(d,function(f){return _(f.toArray())})},u.prototype.addCsiHandler=function(d,_){return this.registerCsiHandler(d,_)},u.prototype.registerDcsHandler=function(d,_){return this._core.registerDcsHandler(d,function(f,b){return _(f,b.toArray())})},u.prototype.addDcsHandler=function(d,_){return this.registerDcsHandler(d,_)},u.prototype.registerEscHandler=function(d,_){return this._core.registerEscHandler(d,_)},u.prototype.addEscHandler=function(d,_){return this.registerEscHandler(d,_)},u.prototype.registerOscHandler=function(d,_){return this._core.registerOscHandler(d,_)},u.prototype.addOscHandler=function(d,_){return this.registerOscHandler(d,_)},u}();o.ParserApi=m},7090:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0;var m=function(){function u(d){this._core=d}return u.prototype.register=function(d){this._core.unicodeService.register(d)},Object.defineProperty(u.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(d){this._core.unicodeService.activeVersion=d},enumerable:!1,configurable:!0}),u}();o.UnicodeApi=m},744:function(P,o,m){var u,d=this&&this.__extends||(u=function(h,r){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},u(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}u(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),_=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},f=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var b=m(2585),v=m(5295),s=m(8460),a=m(844);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var p=function(h){function r(e){var t=h.call(this)||this;return t._optionsService=e,t.isUserScrolling=!1,t._onResize=new s.EventEmitter,t._onScroll=new s.EventEmitter,t.cols=Math.max(e.rawOptions.cols||0,o.MINIMUM_COLS),t.rows=Math.max(e.rawOptions.rows||0,o.MINIMUM_ROWS),t.buffers=new v.BufferSet(e,t),t}return d(r,h),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){h.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){t===void 0&&(t=!1);var i,n=this.buffer;(i=this._cachedBlankLine)&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=n.getBlankLine(e,t),this._cachedBlankLine=i),i.isWrapped=t;var l=n.ybase+n.scrollTop,c=n.ybase+n.scrollBottom;if(n.scrollTop===0){var y=n.lines.isFull;c===n.lines.length-1?y?n.lines.recycle().copyFrom(i):n.lines.push(i.clone()):n.lines.splice(c+1,0,i.clone()),y?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{var C=c-l+1;n.lines.shiftElements(l+1,C-1,-1),n.lines.set(c,i.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)},r.prototype.scrollLines=function(e,t,i){var n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);var l=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),l!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;t!==0&&this.scrollLines(t)},_([f(0,b.IOptionsService)],r)}(a.Disposable);o.BufferService=p},7994:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var m=function(){function u(){this.glevel=0,this._charsets=[]}return u.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},u.prototype.setgLevel=function(d){this.glevel=d,this.charset=this._charsets[d]},u.prototype.setgCharset=function(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)},u}();o.CharsetService=m},1753:function(P,o,m){var u=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},d=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},_=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var f=m(2585),b=m(8460),v={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function s(r,e){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||e||(t|=3)),t}var a=String.fromCharCode,p={DEFAULT:function(r){var e=[s(r,!1)+32,r.col+32,r.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1B[M"+a(e[0])+a(e[1])+a(e[2])},SGR:function(r){var e=r.action===0&&r.button!==4?"m":"M";return"\x1B[<"+s(r,!0)+";"+r.col+";"+r.row+e}},h=function(){function r(e,t){var i,n,l,c;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new b.EventEmitter,this._lastEvent=null;try{for(var y=_(Object.keys(v)),C=y.next();!C.done;C=y.next()){var g=C.value;this.addProtocol(g,v[g])}}catch(L){i={error:L}}finally{try{C&&!C.done&&(n=y.return)&&n.call(y)}finally{if(i)throw i.error}}try{for(var S=_(Object.keys(p)),w=S.next();!w.done;w=S.next()){var R=w.value;this.addEncoding(R,p[R])}}catch(L){l={error:L}}finally{try{w&&!w.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}this.reset()}return r.prototype.addProtocol=function(e,t){this._protocols[e]=t},r.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(r.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(r.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),r.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,e))||!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},r.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},r.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},u([d(0,f.IBufferService),d(1,f.ICoreService)],r)}();o.CoreMouseService=h},6975:function(P,o,m){var u,d=this&&this.__extends||(u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},u(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}u(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),_=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},f=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var b=m(2585),v=m(8460),s=m(1439),a=m(844),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),r=function(e){function t(i,n,l,c){var y=e.call(this)||this;return y._bufferService=n,y._logService=l,y._optionsService=c,y.isCursorInitialized=!1,y.isCursorHidden=!1,y._onData=y.register(new v.EventEmitter),y._onUserInput=y.register(new v.EventEmitter),y._onBinary=y.register(new v.EventEmitter),y._scrollToBottom=i,y.register({dispose:function(){return y._scrollToBottom=void 0}}),y.modes=(0,s.clone)(p),y.decPrivateModes=(0,s.clone)(h),y}return d(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,s.clone)(p),this.decPrivateModes=(0,s.clone)(h)},t.prototype.triggerDataEvent=function(i,n){if(n===void 0&&(n=!1),!this._optionsService.rawOptions.disableStdin){var l=this._bufferService.buffer;l.ybase!==l.ydisp&&this._scrollToBottom(),n&&this._onUserInput.fire(),this._logService.debug('sending data "'+i+'"',function(){return i.split("").map(function(c){return c.charCodeAt(0)})}),this._onData.fire(i)}},t.prototype.triggerBinaryEvent=function(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+i+'"',function(){return i.split("").map(function(n){return n.charCodeAt(0)})}),this._onBinary.fire(i))},_([f(1,b.IBufferService),f(2,b.ILogService),f(3,b.IOptionsService)],t)}(a.Disposable);o.CoreService=r},9074:function(P,o,m){var u,d=this&&this.__extends||(u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},u(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}u(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),_=this&&this.__generator||function(r,e){var t,i,n,l,c={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function y(C){return function(g){return function(S){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,i&&(n=2&S[0]?i.return:S[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,S[1])).done)return n;switch(i=0,n&&(S=[2&S[0],n.value]),S[0]){case 0:case 1:n=S;break;case 4:return c.label++,{value:S[1],done:!1};case 5:c.label++,i=S[1],S=[0];continue;case 7:S=c.ops.pop(),c.trys.pop();continue;default:if(!((n=(n=c.trys).length>0&&n[n.length-1])||S[0]!==6&&S[0]!==2)){c=0;continue}if(S[0]===3&&(!n||S[1]>n[0]&&S[1]<n[3])){c.label=S[1];break}if(S[0]===6&&c.label<n[1]){c.label=n[1],n=S;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(S);break}n[2]&&c.ops.pop(),c.trys.pop();continue}S=e.call(r,c)}catch(w){S=[6,w],i=0}finally{t=n=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([C,g])}}},f=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;var b=m(8055),v=m(8460),s=m(844),a=m(6106),p=function(r){function e(){var t=r.call(this)||this;return t._decorations=new a.SortedList(function(i){return i.marker.line}),t._onDecorationRegistered=t.register(new v.EventEmitter),t._onDecorationRemoved=t.register(new v.EventEmitter),t}return d(e,r),Object.defineProperty(e.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),e.prototype.registerDecoration=function(t){var i=this;if(!t.marker.isDisposed){var n=new h(t);if(n){var l=n.marker.onDispose(function(){return n.dispose()});n.onDispose(function(){n&&(i._decorations.delete(n)&&i._onDecorationRemoved.fire(n),l.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}},e.prototype.reset=function(){var t,i;try{for(var n=f(this._decorations.values()),l=n.next();!l.done;l=n.next())l.value.dispose()}catch(c){t={error:c}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._decorations.clear()},e.prototype.getDecorationsAtLine=function(t){return _(this,function(i){return[2,this._decorations.getKeyIterator(t)]})},e.prototype.getDecorationsAtCell=function(t,i,n){var l,c,y,C,g,S,w,R,L,k,E;return _(this,function(x){switch(x.label){case 0:l=0,c=0,x.label=1;case 1:x.trys.push([1,6,7,8]),y=f(this._decorations.getKeyIterator(i)),C=y.next(),x.label=2;case 2:return C.done?[3,5]:(g=C.value,l=(L=g.options.x)!==null&&L!==void 0?L:0,c=l+((k=g.options.width)!==null&&k!==void 0?k:1),!(t>=l&&t<c)||n&&((E=g.options.layer)!==null&&E!==void 0?E:"bottom")!==n?[3,4]:[4,g]);case 3:x.sent(),x.label=4;case 4:return C=y.next(),[3,2];case 5:return[3,8];case 6:return S=x.sent(),w={error:S},[3,8];case 7:try{C&&!C.done&&(R=y.return)&&R.call(y)}finally{if(w)throw w.error}return[7];case 8:return[2]}})},e.prototype.dispose=function(){var t,i;try{for(var n=f(this._decorations.values()),l=n.next();!l.done;l=n.next()){var c=l.value;this._onDecorationRemoved.fire(c)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.reset()},e}(s.Disposable);o.DecorationService=p;var h=function(r){function e(t){var i=r.call(this)||this;return i.options=t,i.isDisposed=!1,i.onRenderEmitter=i.register(new v.EventEmitter),i.onRender=i.onRenderEmitter.event,i._onDispose=i.register(new v.EventEmitter),i.onDispose=i._onDispose.event,i._cachedBg=null,i._cachedFg=null,i.marker=t.marker,i.options.overviewRulerOptions&&!i.options.overviewRulerOptions.position&&(i.options.overviewRulerOptions.position="full"),i}return d(e,r),Object.defineProperty(e.prototype,"backgroundColorRGB",{get:function(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=b.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"foregroundColorRGB",{get:function(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=b.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),r.prototype.dispose.call(this))},e}(s.Disposable)},3730:function(P,o,m){var u=this&&this.__decorate||function(b,v,s,a){var p,h=arguments.length,r=h<3?v:a===null?a=Object.getOwnPropertyDescriptor(v,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(b,v,s,a);else for(var e=b.length-1;e>=0;e--)(p=b[e])&&(r=(h<3?p(r):h>3?p(v,s,r):p(v,s))||r);return h>3&&r&&Object.defineProperty(v,s,r),r},d=this&&this.__param||function(b,v){return function(s,a){v(s,a,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var _=m(2585),f=function(){function b(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(b.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),b.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},b.prototype.markDirty=function(v){v<this._start?this._start=v:v>this._end&&(this._end=v)},b.prototype.markRangeDirty=function(v,s){if(v>s){var a=v;v=s,s=a}v<this._start&&(this._start=v),s>this._end&&(this._end=s)},b.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u([d(0,_.IBufferService)],b)}();o.DirtyRowService=f},4348:function(P,o,m){var u=this&&this.__values||function(a){var p=typeof Symbol=="function"&&Symbol.iterator,h=p&&a[p],r=0;if(h)return h.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&r>=a.length&&(a=void 0),{value:a&&a[r++],done:!a}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},_=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var f=m(2585),b=m(8343),v=function(){function a(){for(var p,h,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this._entries=new Map;try{for(var t=u(r),i=t.next();!i.done;i=t.next()){var n=d(i.value,2),l=n[0],c=n[1];this.set(l,c)}}catch(y){p={error:y}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(p)throw p.error}}}return a.prototype.set=function(p,h){var r=this._entries.get(p);return this._entries.set(p,h),r},a.prototype.forEach=function(p){this._entries.forEach(function(h,r){return p(r,h)})},a.prototype.has=function(p){return this._entries.has(p)},a.prototype.get=function(p){return this._entries.get(p)},a}();o.ServiceCollection=v;var s=function(){function a(){this._services=new v,this._services.set(f.IInstantiationService,this)}return a.prototype.setService=function(p,h){this._services.set(p,h)},a.prototype.getService=function(p){return this._services.get(p)},a.prototype.createInstance=function(p){for(var h,r,e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var i=(0,b.getServiceDependencies)(p).sort(function(S,w){return S.index-w.index}),n=[];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var y=c.value,C=this._services.get(y.id);if(!C)throw new Error("[createInstance] "+p.name+" depends on UNKNOWN service "+y.id+".");n.push(C)}}catch(S){h={error:S}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(h)throw h.error}}var g=i.length>0?i[0].index:e.length;if(e.length!==g)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(g+1)+" conflicts with "+e.length+" static arguments");return new(p.bind.apply(p,_([void 0],d(_(_([],d(e),!1),d(n),!1)),!1)))},a}();o.InstantiationService=s},7866:function(P,o,m){var u=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},d=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}},_=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},f=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=void 0;var b=m(2585),v={debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF},s=function(){function a(p){var h=this;this._optionsService=p,this.logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(r){r==="logLevel"&&h._updateLogLevel()})}return a.prototype._updateLogLevel=function(){this.logLevel=v[this._optionsService.rawOptions.logLevel]},a.prototype._evalLazyOptionalParams=function(p){for(var h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())},a.prototype._log=function(p,h,r){this._evalLazyOptionalParams(r),p.call.apply(p,f([console,"xterm.js: "+h],_(r),!1))},a.prototype.debug=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.DEBUG&&this._log(console.log,p,h)},a.prototype.info=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.INFO&&this._log(console.info,p,h)},a.prototype.warn=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.WARN&&this._log(console.warn,p,h)},a.prototype.error=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=b.LogLevelEnum.ERROR&&this._log(console.error,p,h)},u([d(0,b.IOptionsService)],a)}();o.LogService=s},7302:function(P,o,m){var u=this&&this.__assign||function(){return u=Object.assign||function(v){for(var s,a=1,p=arguments.length;a<p;a++)for(var h in s=arguments[a])Object.prototype.hasOwnProperty.call(s,h)&&(v[h]=s[h]);return v},u.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var d=m(8460),_=m(6114);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:_.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var f=["normal","bold","100","200","300","400","500","600","700","800","900"],b=function(){function v(s){this._onOptionChange=new d.EventEmitter;var a=u({},o.DEFAULT_OPTIONS);for(var p in s)if(p in a)try{var h=s[p];a[p]=this._sanitizeAndValidateOption(p,h)}catch(r){console.error(r)}this.rawOptions=a,this.options=u({},a),this._setupOptions()}return Object.defineProperty(v.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),v.prototype._setupOptions=function(){var s=this,a=function(e){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return s.rawOptions[e]},p=function(e,t){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');t=s._sanitizeAndValidateOption(e,t),s.rawOptions[e]!==t&&(s.rawOptions[e]=t,s._onOptionChange.fire(e))};for(var h in this.rawOptions){var r={get:a.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,r)}},v.prototype.setOption=function(s,a){this.options[s]=a},v.prototype._sanitizeAndValidateOption=function(s,a){switch(s){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":a||(a=o.DEFAULT_OPTIONS[s]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=f.includes(a)?a:o.DEFAULT_OPTIONS[s];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(s+" cannot be less than 1, value: "+a);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(s+" cannot be less than 0, value: "+a);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(s+" cannot be less than or equal to 0, value: "+a);case"rows":case"cols":if(!a&&a!==0)throw new Error(s+" must be numeric, value: "+a)}return a},v.prototype.getOption=function(s){return this.options[s]},v}();o.OptionsService=b},8343:(P,o)=>{function m(u,d,_){d.di$target===d?d.di$dependencies.push({id:u,index:_}):(d.di$dependencies=[{id:u,index:_}],d.di$target=d)}Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0,o.serviceRegistry=new Map,o.getServiceDependencies=function(u){return u.di$dependencies||[]},o.createDecorator=function(u){if(o.serviceRegistry.has(u))return o.serviceRegistry.get(u);var d=function(_,f,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");m(d,_,b)};return d.toString=function(){return u},o.serviceRegistry.set(u,d),d}},2585:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var u,d=m(8343);o.IBufferService=(0,d.createDecorator)("BufferService"),o.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),o.ICoreService=(0,d.createDecorator)("CoreService"),o.ICharsetService=(0,d.createDecorator)("CharsetService"),o.IDirtyRowService=(0,d.createDecorator)("DirtyRowService"),o.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(u=o.LogLevelEnum||(o.LogLevelEnum={}))[u.DEBUG=0]="DEBUG",u[u.INFO=1]="INFO",u[u.WARN=2]="WARN",u[u.ERROR=3]="ERROR",u[u.OFF=4]="OFF",o.ILogService=(0,d.createDecorator)("LogService"),o.IOptionsService=(0,d.createDecorator)("OptionsService"),o.IUnicodeService=(0,d.createDecorator)("UnicodeService"),o.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(P,o,m)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var u=m(8460),d=m(225),_=function(){function f(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter;var b=new d.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}return Object.defineProperty(f.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._active},set:function(b){if(!this._providers[b])throw new Error('unknown Unicode version "'+b+'"');this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)},enumerable:!1,configurable:!0}),f.prototype.register=function(b){this._providers[b.version]=b},f.prototype.wcwidth=function(b){return this._activeProvider.wcwidth(b)},f.prototype.getStringCellWidth=function(b){for(var v=0,s=b.length,a=0;a<s;++a){var p=b.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=s)return v+this.wcwidth(p);var h=b.charCodeAt(a);56320<=h&&h<=57343?p=1024*(p-55296)+h-56320+65536:v+=this.wcwidth(h)}v+=this.wcwidth(p)}return v},f}();o.UnicodeService=_}},Q={};return function P(o){var m=Q[o];if(m!==void 0)return m.exports;var u=Q[o]={exports:{}};return X[o].call(u.exports,u,u.exports,P),u.exports}(4389)})()})})(Pr);var ii=Pr.exports,Ir={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(window,function(){return function(X){var Q={};function P(o){if(Q[o])return Q[o].exports;var m=Q[o]={i:o,l:!1,exports:{}};return X[o].call(m.exports,m,m.exports,P),m.l=!0,m.exports}return P.m=X,P.c=Q,P.d=function(o,m,u){P.o(o,m)||Object.defineProperty(o,m,{enumerable:!0,get:u})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,m){if(1&m&&(o=P(o)),8&m||4&m&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(P.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&m&&typeof o!="string")for(var d in o)P.d(u,d,(function(_){return o[_]}).bind(null,d));return u},P.n=function(o){var m=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(m,"a",m),m},P.o=function(o,m){return Object.prototype.hasOwnProperty.call(o,m)},P.p="",P(P.s=0)}([function(X,Q,P){Object.defineProperty(Q,"__esModule",{value:!0});var o=new RegExp(`(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+]*)*([^:"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)`);function m(d,_){window.open(_,"_blank")}var u=function(){function d(_,f){_===void 0&&(_=m),f===void 0&&(f={}),this._handler=_,this._options=f,this._options.matchIndex=1}return d.prototype.activate=function(_){this._terminal=_,this._linkMatcherId=this._terminal.registerLinkMatcher(o,this._handler,this._options)},d.prototype.dispose=function(){this._linkMatcherId!==void 0&&this._terminal!==void 0&&this._terminal.deregisterLinkMatcher(this._linkMatcherId)},d}();Q.WebLinksAddon=u}])})})(Ir);var ni=Ir.exports,Hr={exports:{}};(function(G,Z){(function(X,Q){G.exports=Q()})(window,function(){return function(X){var Q={};function P(o){if(Q[o])return Q[o].exports;var m=Q[o]={i:o,l:!1,exports:{}};return X[o].call(m.exports,m,m.exports,P),m.l=!0,m.exports}return P.m=X,P.c=Q,P.d=function(o,m,u){P.o(o,m)||Object.defineProperty(o,m,{enumerable:!0,get:u})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,m){if(1&m&&(o=P(o)),8&m||4&m&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(P.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&m&&typeof o!="string")for(var d in o)P.d(u,d,(function(_){return o[_]}).bind(null,d));return u},P.n=function(o){var m=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(m,"a",m),m},P.o=function(o,m){return Object.prototype.hasOwnProperty.call(o,m)},P.p="",P(P.s=0)}([function(X,Q,P){Object.defineProperty(Q,"__esModule",{value:!0});var o=function(){function m(){}return m.prototype.activate=function(u){this._terminal=u},m.prototype.dispose=function(){},m.prototype.fit=function(){var u=this.proposeDimensions();if(u&&this._terminal){var d=this._terminal._core;this._terminal.rows===u.rows&&this._terminal.cols===u.cols||(d._renderService.clear(),this._terminal.resize(u.cols,u.rows))}},m.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element.parentElement){var u=this._terminal._core,d=window.getComputedStyle(this._terminal.element.parentElement),_=parseInt(d.getPropertyValue("height")),f=Math.max(0,parseInt(d.getPropertyValue("width"))),b=window.getComputedStyle(this._terminal.element),v=_-(parseInt(b.getPropertyValue("padding-top"))+parseInt(b.getPropertyValue("padding-bottom"))),s=f-(parseInt(b.getPropertyValue("padding-right"))+parseInt(b.getPropertyValue("padding-left")))-u.viewport.scrollBarWidth;return{cols:Math.floor(s/u._renderService.dimensions.actualCellWidth),rows:Math.floor(v/u._renderService.dimensions.actualCellHeight)}}},m}();Q.FitAddon=o}])})})(Hr);var oi=Hr.exports;Object.defineProperty(pr,"__esModule",{value:!0});var jr=pr.default=void 0,si=Nt(xe),qe=Nt(qr),ai=ii,ci=ni,li=oi,hi=Nt(Nr),Rr=Nt(zr),ui=re;function Nt(G){return G&&G.__esModule?G:{default:G}}function qt(G,Z,X){return(Z=fi(Z))in G?Object.defineProperty(G,Z,{value:X,enumerable:!0,configurable:!0,writable:!0}):G[Z]=X,G}function fi(G){var Z=di(G,"string");return typeof Z=="symbol"?Z:Z+""}function di(G,Z){if(typeof G!="object"||!G)return G;var X=G[Symbol.toPrimitive];if(X!==void 0){var Q=X.call(G,Z||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)(G)}class vr extends si.default.Component{constructor(){super(...arguments),qt(this,"xterm",null),qt(this,"container",null),qt(this,"onData",Z=>{this.props.onData&&this.props.onData(Z)}),qt(this,"onRender",Z=>{this.props.onRender&&this.props.onRender(Z)})}componentDidMount(){const{value:Z,options:X}=this.props;this.fitAddon=new li.FitAddon,this.xterm=new ai.Terminal(X),this.xterm.loadAddon(new ci.WebLinksAddon),this.xterm.loadAddon(this.fitAddon),this.xterm.open(this.container),this.xterm.onData(this.onData.bind(this)),this.xterm.onRender(this.onRender.bind(this)),Z&&this.xterm.write(Z),setTimeout(()=>{this.xterm&&this.fitAddon.fit()},0),this.debounceFit=(0,hi.default)(()=>{this.fitAddon.fit()},600),window.addEventListener("resize",this.debounceFit)}componentWillUnmount(){this.xterm&&(this.xterm.dispose(),this.xterm=null),window.removeEventListener("resize",this.debounceFit)}shouldComponentUpdate(Z){return Z.hasOwnProperty("value")&&Z.value!==this.props.value&&this.xterm&&(this.xterm.clear(),setTimeout(()=>{this.xterm.write(Z.value)},0)),!1}getXTerm(){return this.xterm}write(Z,X){this.xterm&&this.xterm.write(Z,X)}focus(){this.xterm&&this.xterm.focus()}reset(){this.xterm&&this.xterm.reset()}resize(Z,X){this.xterm&&this.xterm.resize(Math.round(Z),Math.round(X))}setOption(Z,X){this.xterm&&this.xterm.setOption(Z,X)}getOption(Z){this.xterm&&this.xterm.setOption(Z)}refresh(){this.xterm&&this.xterm.refresh(0,this.xterm.rows-1)}render(){const Z=["react-xterm",this.props.className].filter(Boolean).join(" ");return(0,ui.jsx)("div",{ref:X=>this.container=X,className:Z,style:this.props.style})}}jr=pr.default=vr;vr.propTypes={onData:qe.default.func,onRender:qe.default.func,options:qe.default.object,value:qe.default.string,className:qe.default.string,style:qe.default.object};vr.defaultProps={onData:Rr.default,onRender:Rr.default,options:{},value:"",className:"",style:{}};var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});var _r=xe,_i=function(G,Z){var X=_r.useRef(function(){});_r.useEffect(function(){X.current=G}),_r.useEffect(function(){if(Z!==null){var Q=setInterval(function(){return X.current()},Z||0);return function(){return clearInterval(Q)}}},[Z])},pi=Fr.default=_i;function vi(){const[G,Z]=xe.useState(+new Date);return pi(()=>{Z(+new Date)},1e3),Kr(G,"MMMM Do YYYY, h:mm:ss a")}const Ar={info:"\x1B[34m",error:"\x1B[31m",stderr:"\x1B[31m",access:"\x1B[32m",stdout:"\x1B[37m",pm2:"\x1B[36m"},yi=/\[\d{2}\/[A-Za-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} \+\d{4}\]/g,gi=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}:/g,mi=/\(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\):/g,bi=/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\]/g,Si=/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/g,Ci=(G,Z)=>{const X=Ar[Z.toLowerCase()]||Ar.stdout,Q=G.split(`\r
8
+ `);return Q.forEach((P,o)=>{const m=P.match(yi)||P.match(gi)||P.match(mi)||P.match(bi)||P.match(Si);if(m){const u=m[0],d=`\x1B[33m${u}\x1B[0m${X}`;Q[o]=P.replace(u,d)}}),`${X}${Q.join(`\r
9
+ `)}\x1B[0m`};function yr({name:G,logId:Z,types:X,defaultTypeIndex:Q,initialData:P,prepend:o,postpend:m,onTypeChange:u,...d}){const{ws:{useSubscription:_}}=Mr(),f={info:"Info",error:"Error",access:"Access",stdout:"stdout",stderr:"stderr",pm2:"PM2"},b=Gr(r=>r.breakpoints.down("md")),[v,s]=xe.useState(X[Q||0]),[a,p]=xe.useState(),h=xe.useRef({});return xe.useEffect(()=>{X.forEach(r=>{const e=h.current[r];e&&(e.write(`Collecting ${r} logs for ${G}...`),e.write(`\r
11
10
  \r
12
11
  `),P.forEach(t=>e.write(t)))})},[]),_(`log.${Z}`,r=>{a||p(r.logFiles||{});const e=h.current[r.level];if(e){const t=r.data.replace(/.\n/g,i=>i===`\r
13
12
  `?i:`${i[0]}\r
14
- `);e.write(bi(t,r.level)),e.write(`\r
15
- `)}},[]),re.jsxs(Si,{...d,children:[re.jsxs("div",{className:"log-terminal-group-head",children:[re.jsxs("div",{className:"log-terminal-group-head-start",children:[o,re.jsx(ti,{variant:"outlined",size:b?"small":"medium",children:X.map(r=>{const e=r===v?{variant:"contained"}:{};return re.jsx(Vr,{...e,onClick:()=>{s(r),u(r)},children:f[r]},r)})})]}),re.jsx("div",{className:"log-terminal-group-head-end",children:m})]}),re.jsx("div",{className:"log-terminal-group-terminals",children:X.map(r=>re.jsx(gr,{ref:e=>{h.current[r]=e},logFile:a==null?void 0:a[r],style:{visibility:r===v?"visible":"hidden"}},r))})]})}yr.propTypes={name:be.string.isRequired,logId:be.string.isRequired,types:be.arrayOf(be.string),defaultTypeIndex:be.number,initialData:be.arrayOf(be.string),prepend:be.node,postpend:be.node,onTypeChange:be.func};yr.defaultProps={types:["error","info","access","stdout","stderr"],defaultTypeIndex:0,initialData:[],prepend:null,postpend:null,onTypeChange:()=>{}};const Si=Or.div`
13
+ `);e.write(Ci(t,r.level)),e.write(`\r
14
+ `)}},[]),re.jsxs(wi,{...d,children:[re.jsxs("div",{className:"log-terminal-group-head",children:[re.jsxs("div",{className:"log-terminal-group-head-start",children:[o,re.jsx(ti,{variant:"outlined",size:b?"small":"medium",children:X.map(r=>{const e=r===v?{variant:"contained"}:{};return re.jsx(Vr,{...e,onClick:()=>{s(r),u(r)},children:f[r]},r)})})]}),re.jsx("div",{className:"log-terminal-group-head-end",children:m})]}),re.jsx("div",{className:"log-terminal-group-terminals",children:X.map(r=>re.jsx(gr,{ref:e=>{h.current[r]=e},logFile:a==null?void 0:a[r],style:{visibility:r===v?"visible":"hidden"}},r))})]})}yr.propTypes={name:be.string.isRequired,logId:be.string.isRequired,types:be.arrayOf(be.string),defaultTypeIndex:be.number,initialData:be.arrayOf(be.string),prepend:be.node,postpend:be.node,onTypeChange:be.func};yr.defaultProps={types:["error","info","access","stdout","stderr"],defaultTypeIndex:0,initialData:[],prepend:null,postpend:null,onTypeChange:()=>{}};const wi=Or.div`
16
15
  display: flex;
17
16
  flex-direction: column;
18
17
  height: 100%;
@@ -56,7 +55,7 @@ import{r as xe,cn as qr,gw as Nr,gx as zr,j as re,gy as Kr,aP as Mr,$ as Gr,b as
56
55
  right: 0;
57
56
  }
58
57
  }
59
- `,gr=xe.forwardRef(({logFile:G,...Z},X)=>{const Q={width:"100%",boxSizing:"border-box",height:"100%"},P={theme:{background:"#2C313C",foreground:"#EEEEEE"}};return re.jsxs(Ci,{...Z,children:[re.jsxs("div",{className:"log-terminal-top",children:[re.jsx(vi,{}),G&&re.jsx("span",{children:G})]}),re.jsx("div",{className:"log-terminal-container",style:{position:"relative"},children:re.jsx(jr,{ref:X,style:Q,options:P})})]})});gr.propTypes={logFile:be.string};gr.defaultProps={logFile:""};const Ci=Or.div`
58
+ `,gr=xe.forwardRef(({logFile:G,...Z},X)=>{const Q={width:"100%",boxSizing:"border-box",height:"100%"},P={theme:{background:"#2C313C",foreground:"#EEEEEE",red:"#ff3333",black:"#1f2430",green:"#bae67e",yellow:"#ffa759",blue:"#73d0ff",purple:"#d4bfff",cyan:"#95e6cb",white:"#cbccc6"},screenReaderMode:!0};return re.jsxs(Li,{...Z,children:[re.jsxs("div",{className:"log-terminal-top",children:[re.jsx(vi,{}),G&&re.jsx("span",{children:G})]}),re.jsx("div",{className:"log-terminal-container",style:{position:"relative"},children:re.jsx(jr,{ref:X,style:Q,options:P})})]})});gr.propTypes={logFile:be.string};gr.defaultProps={logFile:""};const Li=Or.div`
60
59
  height: 100%;
61
60
  display: flex;
62
61
  flex-direction: column;
@@ -90,6 +89,6 @@ import{r as xe,cn as qr,gw as Nr,gx as zr,j as re,gy as Kr,aP as Mr,$ as Gr,b as
90
89
  min-height: 20px;
91
90
  background-color: #ffffff20;
92
91
  }
93
- `;var Wr={exports:{}};(function(G,Z){(function(X,Q,P){G.exports=P(),G.exports.default=P()})("slugify",Yr,function(){var X=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),Q=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function P(o,m){if(typeof o!="string")throw new Error("slugify: string argument expected");m=typeof m=="string"?{replacement:m}:m||{};var u=Q[m.locale]||{},d=m.replacement===void 0?"-":m.replacement,_=m.trim===void 0?!0:m.trim,f=o.normalize().split("").reduce(function(b,v){var s=u[v];return s===void 0&&(s=X[v]),s===void 0&&(s=v),s===d&&(s=" "),b+s.replace(m.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return m.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),_&&(f=f.trim()),f=f.replace(/\s+/g,d),m.lower&&(f=f.toLowerCase()),f}return P.extend=function(o){Object.assign(X,o)},P})})(Wr);var wi=Wr.exports;const Li=wi,xi=G=>Li((G||"").replace(/^[@./-]/,"").replace(/[@./_]/g,"-"));var Ei=xi;const ki=Zr(Ei),Ri=[1,7];function mr({id:G,name:Z}){const{t:X}=Xr(),{restApi:Q,inService:P}=Mr(),[o,m]=xe.useState(!1),[u,d]=xe.useState(!1),[_,f]=xe.useState(1),b=async()=>{if(!u)try{d(!0);const s=P?"":`/${G}`,a=await Q.get(`/download/log${s}?days=${_}`,{responseType:"blob"}),p=URL.createObjectURL(a.data),h=document.createElement("a");h.href=p,h.setAttribute("download",`${ki(Z||G)}.${$r().format("YYYYMMDDHHmmss")}.log.zip`),document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(p),d(!1),m(!1)}catch(s){d(!1),Qr.error(s.message)}},v=s=>{f(s.target.value)};return[re.jsx(Ke,{display:"flex",alignItems:"center",style:{gap:16},children:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>m(!0),disabled:u,children:[u?re.jsx(kr,{size:16}):re.jsx(ri,{fontSize:"small",style:{transform:"translateY(2px)"}}),re.jsx(Ke,{ml:.5,children:X("common.download")})]})}),o&&re.jsx(Jr,{open:!0,onClose:()=>{m(!1)},disableEscapeKeyDown:!0,title:X("common.download"),PaperProps:{style:{minHeight:"auto"}},actions:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>b(),disabled:u,children:[u&&re.jsx(kr,{size:16}),re.jsx(Ke,{ml:.5,children:X("common.confirm")})]}),children:re.jsx(Ke,{mb:2,display:"flex",justifyContent:"center",children:re.jsx(Tr,{size:"small",fullWidth:!0,children:re.jsx(Br,{value:_,onChange:v,children:Ri.map(s=>re.jsx(Dr,{value:s,children:X(`log.lastDays.${s}`)},s))})})})})]}mr.propTypes={id:be.string.isRequired,name:be.string};mr.defaultProps={name:""};function Ai({blocklet:G,...Z}){var v;const X=['Tip: this tab will only show runtime logs. Please go to "Blocklet Server" to view other lifecycle logs of the blocklet (install/start/stop...)',`\r
92
+ `;var Wr={exports:{}};(function(G,Z){(function(X,Q,P){G.exports=P(),G.exports.default=P()})("slugify",Yr,function(){var X=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),Q=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function P(o,m){if(typeof o!="string")throw new Error("slugify: string argument expected");m=typeof m=="string"?{replacement:m}:m||{};var u=Q[m.locale]||{},d=m.replacement===void 0?"-":m.replacement,_=m.trim===void 0?!0:m.trim,f=o.normalize().split("").reduce(function(b,v){var s=u[v];return s===void 0&&(s=X[v]),s===void 0&&(s=v),s===d&&(s=" "),b+s.replace(m.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return m.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),_&&(f=f.trim()),f=f.replace(/\s+/g,d),m.lower&&(f=f.toLowerCase()),f}return P.extend=function(o){Object.assign(X,o)},P})})(Wr);var xi=Wr.exports;const Ei=xi,ki=G=>Ei((G||"").replace(/^[@./-]/,"").replace(/[@./_]/g,"-"));var Ri=ki;const Ai=Zr(Ri),Mi=[1,7];function mr({id:G,name:Z}){const{t:X}=Xr(),{restApi:Q,inService:P}=Mr(),[o,m]=xe.useState(!1),[u,d]=xe.useState(!1),[_,f]=xe.useState(1),b=async()=>{if(!u)try{d(!0);const s=P?"":`/${G}`,a=await Q.get(`/download/log${s}?days=${_}`,{responseType:"blob"}),p=URL.createObjectURL(a.data),h=document.createElement("a");h.href=p,h.setAttribute("download",`${Ai(Z||G)}.${$r().format("YYYYMMDDHHmmss")}.log.zip`),document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(p),d(!1),m(!1)}catch(s){d(!1),Qr.error(s.message)}},v=s=>{f(s.target.value)};return[re.jsx(Ke,{display:"flex",alignItems:"center",style:{gap:16},children:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>m(!0),disabled:u,children:[u?re.jsx(kr,{size:16}):re.jsx(ri,{fontSize:"small",style:{transform:"translateY(2px)"}}),re.jsx(Ke,{ml:.5,children:X("common.download")})]})}),o&&re.jsx(Jr,{open:!0,onClose:()=>{m(!1)},disableEscapeKeyDown:!0,title:X("common.download"),PaperProps:{style:{minHeight:"auto"}},actions:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>b(),disabled:u,children:[u&&re.jsx(kr,{size:16}),re.jsx(Ke,{ml:.5,children:X("common.confirm")})]}),children:re.jsx(Ke,{mb:2,display:"flex",justifyContent:"center",children:re.jsx(Tr,{size:"small",fullWidth:!0,children:re.jsx(Br,{value:_,onChange:v,children:Mi.map(s=>re.jsx(Dr,{value:s,children:X(`log.lastDays.${s}`)},s))})})})})]}mr.propTypes={id:be.string.isRequired,name:be.string};mr.defaultProps={name:""};function Oi({blocklet:G,...Z}){var v;const X=['Tip: this tab will only show runtime logs. Please go to "Blocklet Server" to view other lifecycle logs of the blocklet (install/start/stop...)',`\r
94
93
  \r
95
- `],Q=((G==null?void 0:G.children)||[]).map(s=>({did:s.meta.did,name:s.meta.title,types:["error","info","access","stdout","stderr"]})),[P,o]=ei(`blocklet-log-${G.meta.did}`,"");let[m,u]=P.split(",");Q.find(s=>s.did===m)||(m=(v=Q[0])==null?void 0:v.did);const d=s=>{o([s.target.value,u].join(","))},_=re.jsx(Tr,{sx:{minWidth:240},children:re.jsx(Br,{value:m,onChange:d,size:"small",children:Q.map(s=>re.jsx(Dr,{value:s.did,children:s.name},s.did))})}),f=Q.find(s=>s.did===m)||Q[0]||G.meta,b=s=>{const a=f.types.indexOf(s);o([m,a||0].join(","))};return re.jsx(Ke,{height:{xs:"calc(100vh - 444px)",sm:"calc(100vh - 508px)",md:"calc(100vh - 445px)"},...Z,children:re.jsx(yr,{logId:f===G.meta?`blocklet-${G.meta.did}`:`blocklet-${G.meta.did}/${f.did}`,initialData:X,prepend:_,postpend:re.jsx(mr,{id:G.meta.did,name:G.meta.name}),name:f.name,types:f.types,defaultTypeIndex:u,onTypeChange:b},f.did)})}Ai.propTypes={blocklet:be.object.isRequired};export{Ai as default};
94
+ `],Q=((G==null?void 0:G.children)||[]).map(s=>({did:s.meta.did,name:s.meta.title,types:["error","info","access","stdout","stderr"]})),[P,o]=ei(`blocklet-log-${G.meta.did}`,"");let[m,u]=P.split(",");Q.find(s=>s.did===m)||(m=(v=Q[0])==null?void 0:v.did);const d=s=>{o([s.target.value,u].join(","))},_=re.jsx(Tr,{sx:{minWidth:240},children:re.jsx(Br,{value:m,onChange:d,size:"small",children:Q.map(s=>re.jsx(Dr,{value:s.did,children:s.name},s.did))})}),f=Q.find(s=>s.did===m)||Q[0]||G.meta,b=s=>{const a=f.types.indexOf(s);o([m,a||0].join(","))};return re.jsx(Ke,{height:{xs:"calc(100vh - 444px)",sm:"calc(100vh - 508px)",md:"calc(100vh - 445px)"},...Z,children:re.jsx(yr,{logId:f===G.meta?`blocklet-${G.meta.did}`:`blocklet-${G.meta.did}/${f.did}`,initialData:X,prepend:_,postpend:re.jsx(mr,{id:G.meta.did,name:G.meta.name}),name:f.name,types:f.types,defaultTypeIndex:u,onTypeChange:b},f.did)})}Oi.propTypes={blocklet:be.object.isRequired};export{Oi as default};