@camera.ui/server 0.0.70 → 0.0.71

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 (1328) hide show
  1. package/CLAUDE.md +91 -0
  2. package/README.md +2 -24
  3. package/cupdate.config.txt +0 -1
  4. package/dist/interface/assets/404-Dyk_o9BI.js +1 -0
  5. package/dist/interface/assets/About-CjvVzvch.js +1 -0
  6. package/dist/interface/assets/Adminpanel-A5VZlDRc.js +1 -0
  7. package/dist/interface/assets/Automation-CB6etdKe.js +2 -0
  8. package/dist/interface/assets/Automation-Csu8t0D7.css +1 -0
  9. package/dist/interface/assets/Automations-DAVNWMJ3.js +1 -0
  10. package/dist/interface/assets/Camera-BhCDJE7I.css +1 -0
  11. package/dist/interface/assets/Camera-CwZSmjqJ.js +2 -0
  12. package/dist/interface/assets/CameraConsole-vB_OcM5o.js +7 -0
  13. package/dist/interface/assets/Cameras-807mspcl.css +1 -0
  14. package/dist/interface/assets/Cameras-DhSUa8r_.js +656 -0
  15. package/dist/interface/assets/Camview-Dd7DwMHG.css +1 -0
  16. package/dist/interface/assets/Camview-Wb5_NhEb.js +1 -0
  17. package/dist/interface/assets/Config-JgftUZFe.css +1 -0
  18. package/dist/interface/assets/Config-fXY8u7CZ.js +2 -0
  19. package/dist/interface/assets/ConfigActionCameraControl-BnQ52X7M.js +1 -0
  20. package/dist/interface/assets/ConfigActionDelay-DKhE0Xr8.js +1 -0
  21. package/dist/interface/assets/ConfigActionHttp-BbfN1UGF.js +1 -0
  22. package/dist/interface/assets/ConfigActionImageInput-P39gRfld.js +1 -0
  23. package/dist/interface/assets/ConfigActionNotification-DZLVZu8B.js +1 -0
  24. package/dist/interface/assets/ConfigActionOutput-BIHvC1Z5.js +1 -0
  25. package/dist/interface/assets/ConfigActionPlugin-DV1IfA3C.js +1 -0
  26. package/dist/interface/assets/ConfigActionSensor-Akj2oG6e.js +1 -0
  27. package/dist/interface/assets/ConfigActionSnapshot-CuAc8HqG.js +1 -0
  28. package/dist/interface/assets/ConfigActionVariable-CVaOMoOi.js +1 -0
  29. package/dist/interface/assets/ConfigConditionIfElse-DiIOUqA5.js +1 -0
  30. package/dist/interface/assets/ConfigConditionSensorState-Bpb4wlLx.js +1 -0
  31. package/dist/interface/assets/ConfigConditionSwitch-DWqcQ3Ip.js +1 -0
  32. package/dist/interface/assets/ConfigConditionTime-BEaHclqa.js +1 -0
  33. package/dist/interface/assets/ConfigTriggerDetection-rtWIdR6S.js +1 -0
  34. package/dist/interface/assets/ConfigTriggerGeofence-CbAYtQhV.js +1 -0
  35. package/dist/interface/assets/ConfigTriggerManual-V8-5hrdl.js +1 -0
  36. package/dist/interface/assets/ConfigTriggerSchedule-CqID85d1.js +1 -0
  37. package/dist/interface/assets/ConfigTriggerSensor-Bnm6tzd-.js +1 -0
  38. package/dist/interface/assets/ConfigTriggerSystem-7TqixmgM.js +1 -0
  39. package/dist/interface/assets/ConfigTriggerWebhook-Cmwu5IU4.js +1 -0
  40. package/dist/interface/assets/Console-BpgTB4Rs.js +6 -0
  41. package/dist/interface/assets/CuiActionButton-Ba5wT-4n.js +1 -0
  42. package/dist/interface/assets/CuiAvatar-BtMXnhxd.css +1 -0
  43. package/dist/interface/assets/CuiAvatar-eiHWwHES.js +1 -0
  44. package/dist/interface/assets/CuiBBoxPlayground-Cmbd4_qG.js +1 -0
  45. package/dist/interface/assets/CuiBBoxPlayground-EFkdOBvq.css +1 -0
  46. package/dist/interface/assets/CuiBottomSheet-BgSYsQxV.js +1 -0
  47. package/dist/interface/assets/CuiBottomSheet-DxQ6D_RM.css +1 -0
  48. package/dist/interface/assets/CuiBottomSheet-Ik7_hnJM.js +1 -0
  49. package/dist/interface/assets/CuiCameraCard-BCBA2PPq.js +1 -0
  50. package/dist/interface/assets/CuiCameraCard-dNsAwlKS.css +1 -0
  51. package/dist/interface/assets/CuiCameraPipCard-D3o29_wc.css +1 -0
  52. package/dist/interface/assets/CuiCameraPipCard-RJN3fq3t.js +1 -0
  53. package/dist/interface/assets/CuiCameraRecordings-DM_o0Lya.css +1 -0
  54. package/dist/interface/assets/CuiCameraRecordings-ZmKK4PFg.js +1 -0
  55. package/dist/interface/assets/CuiCameraShares-4gq8WUQ5.js +1 -0
  56. package/dist/interface/assets/CuiCameraSnapshot-CaZK8Ld4.js +1 -0
  57. package/dist/interface/assets/CuiCameraTable-CGKEqPgf.js +2 -0
  58. package/dist/interface/assets/CuiFloatingButton-RaxwbGht.js +1 -0
  59. package/dist/interface/assets/CuiImage-Bxf7z2N4.css +1 -0
  60. package/dist/interface/assets/CuiImage-_YMON8Mc.js +1 -0
  61. package/dist/interface/assets/CuiMarkdownContent-M5v8bBmS.js +1 -0
  62. package/dist/interface/assets/CuiMenu-BWUfWLQP.css +1 -0
  63. package/dist/interface/assets/CuiMenu-NIkO1y-b.js +1 -0
  64. package/dist/interface/assets/CuiPluginCard-CTTsEM9M.css +1 -0
  65. package/dist/interface/assets/CuiPluginCard-D2F7Q_lO.js +2 -0
  66. package/dist/interface/assets/CuiPluginOAuthButton-FMZxpoU6.js +2 -0
  67. package/dist/interface/assets/CuiQRCode-D6EPrltU.js +1 -0
  68. package/dist/interface/assets/CuiQRCode-DfUba6JB.css +1 -0
  69. package/dist/interface/assets/CuiRecordingsGrid-CZIZiEuT.css +1 -0
  70. package/dist/interface/assets/CuiRecordingsGrid-XmXF0E1Z.js +1 -0
  71. package/dist/interface/assets/CuiSchema--yMBD996.css +1 -0
  72. package/dist/interface/assets/CuiSchema-DR8DFf3I.js +1 -0
  73. package/dist/interface/assets/CuiTopNavbarItem-CgaR_X1z.js +1 -0
  74. package/dist/interface/assets/CuiTopNavbarItem-w54CrODK.css +1 -0
  75. package/dist/interface/assets/CuiTopbarSlot-BDZoZ_yn.js +1 -0
  76. package/dist/interface/assets/Faces-Docb3mW5.js +1 -0
  77. package/dist/interface/assets/FirstSteps-BjeO-9yw.js +1 -0
  78. package/dist/interface/assets/Instances-C6vihEpM.js +1 -0
  79. package/dist/interface/assets/Menu-DhP5S2t6.js +1 -0
  80. package/dist/interface/assets/OAuthDeviceFlow-BoK4UBg3.js +1 -0
  81. package/dist/interface/assets/Plugin-DGNZui97.js +1 -0
  82. package/dist/interface/assets/Plugin-DoxdkvWR.css +1 -0
  83. package/dist/interface/assets/PluginConsole-B5DVZcyK.js +7 -0
  84. package/dist/interface/assets/PluginSchema-Ct0WEQqA.js +1 -0
  85. package/dist/interface/assets/Plugins-BPt1RSKT.css +1 -0
  86. package/dist/interface/assets/Plugins-BgHfsgXH.js +2 -0
  87. package/dist/interface/assets/Recordings-Bt_GlPOK.css +1 -0
  88. package/dist/interface/assets/Recordings-BvPpZqxG.js +1 -0
  89. package/dist/interface/assets/Settings-bwLTNAxX.css +1 -0
  90. package/dist/interface/assets/Settings-udOJu0Qj.js +1 -0
  91. package/dist/interface/assets/SettingsAccount-DXKQY4Iz.css +1 -0
  92. package/dist/interface/assets/SettingsAccount-JbMyttJF.js +1 -0
  93. package/dist/interface/assets/SettingsAccount-e6jLHftM.js +1 -0
  94. package/dist/interface/assets/SettingsAppearance-BVTLAAwk.js +1 -0
  95. package/dist/interface/assets/SettingsAppearance-Cc2XEP_e.js +1 -0
  96. package/dist/interface/assets/SettingsBackup-2OhJsI9b.js +1 -0
  97. package/dist/interface/assets/SettingsNotifications-BPGMVw5s.js +2 -0
  98. package/dist/interface/assets/SettingsRecordings-CpHj5L9e.js +1 -0
  99. package/dist/interface/assets/SettingsRemote-CAJUpIBx.js +1 -0
  100. package/dist/interface/assets/SettingsRemote-CjVK9pGg.css +1 -0
  101. package/dist/interface/assets/SettingsSystem-BB8H7V1X.js +2 -0
  102. package/dist/interface/assets/SettingsUsers-BPpBfCoA.js +1 -0
  103. package/dist/interface/assets/Terminal-CrOfQJ-O.css +1 -0
  104. package/dist/interface/assets/Terminal-_9BynMv1.js +4 -0
  105. package/dist/interface/assets/VariableInput-D_-qKfZK.js +1 -0
  106. package/dist/interface/assets/VariableSuggestions-Br4yDsLZ.js +1 -0
  107. package/dist/interface/assets/VersionsHandler-DnWuQWp4.js +7 -0
  108. package/dist/interface/assets/Workers-DEn4ns-7.js +1 -0
  109. package/dist/interface/assets/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
  110. package/dist/interface/assets/ace-BRyQJK-L.js +1 -0
  111. package/dist/interface/assets/ace.config-fXRdG20S.js +1 -0
  112. package/dist/interface/assets/alert-outline-D3FCIX7_.js +1 -0
  113. package/dist/interface/assets/api-CBH2GzC1.js +2 -0
  114. package/dist/interface/assets/api-Cna9Poda.css +2 -0
  115. package/dist/interface/assets/api-DhlUJ2hM.js +1 -0
  116. package/dist/interface/assets/auth-Dp9lJC_t.js +1 -0
  117. package/dist/interface/assets/automation-CbEPnAW4.js +1 -0
  118. package/dist/interface/assets/automations-Bj3wF0wR.js +1 -0
  119. package/dist/interface/assets/automations-DRnDGQWV.js +1 -0
  120. package/dist/interface/assets/back-filled-CvLD0CND.js +1 -0
  121. package/dist/interface/assets/backup-DVkW2kk_.js +1 -0
  122. package/dist/interface/assets/bell-outline-JZZKpcfS.js +1 -0
  123. package/dist/interface/assets/camera-preview-C7GT5VHo.png +0 -0
  124. package/dist/interface/assets/cameras-BWOeWzJ8.js +1 -0
  125. package/dist/interface/assets/cameras.schema-CDeB5JeE.js +1 -0
  126. package/dist/interface/assets/cctv-SQFfbBnL.js +1 -0
  127. package/dist/interface/assets/check-BQQidcYi.js +1 -0
  128. package/dist/interface/assets/chevron-down-Dd1qHXVA.js +1 -0
  129. package/dist/interface/assets/chevron-right-DOmJR2OL.js +1 -0
  130. package/dist/interface/assets/circular-connection-nKCVm4QI.js +1 -0
  131. package/dist/interface/assets/close-Dhjo4o57.js +1 -0
  132. package/dist/interface/assets/close-WdhW_91X.js +1 -0
  133. package/dist/interface/assets/close-circle-i5PrRG0X.js +1 -0
  134. package/dist/interface/assets/close-rounded-6nzLVPw0.js +1 -0
  135. package/dist/interface/assets/cloud-check-DeN6leiB.js +1 -0
  136. package/dist/interface/assets/cloud-outline-BHjUiP9q.js +1 -0
  137. package/dist/interface/assets/cloud-outline-BQddJElX.js +1 -0
  138. package/dist/interface/assets/cloudHandoff-5u_Am2lE.js +1 -0
  139. package/dist/interface/assets/cog-Batjj1se.js +1 -0
  140. package/dist/interface/assets/copy-16-filled-DuAEBVEX.js +1 -0
  141. package/dist/interface/assets/copy-BeuZDsJN.js +1 -0
  142. package/dist/interface/assets/delete-DvMWXBFV.js +1 -0
  143. package/dist/interface/assets/dist-CcCNy5h7.js +1 -0
  144. package/dist/interface/assets/download-Cna5QEEj.js +1 -0
  145. package/dist/interface/assets/esm-B4Pd2w1t.js +1 -0
  146. package/dist/interface/assets/esm-B4l8-ACY.js +1 -0
  147. package/dist/interface/assets/esm-BE98HKPg.js +1 -0
  148. package/dist/interface/assets/esm-BNSLSv2m.js +1 -0
  149. package/dist/interface/assets/esm-BnT9fzsT.js +1 -0
  150. package/dist/interface/assets/esm-C-uLCRX1.js +1 -0
  151. package/dist/interface/assets/esm-C6JCcz6o.js +1 -0
  152. package/dist/interface/assets/esm-D5_rxfjE.js +1 -0
  153. package/dist/interface/assets/esm-D6ymjVa1.js +1 -0
  154. package/dist/interface/assets/esm-D8teZoG1.js +1 -0
  155. package/dist/interface/assets/esm-DnSGrmvg.js +1 -0
  156. package/dist/interface/assets/esm-DqkQVzkL.js +1 -0
  157. package/dist/interface/assets/esm-tnu6qUMk.js +1 -0
  158. package/dist/interface/assets/eventIcons-2hVCNchU.css +1 -0
  159. package/dist/interface/assets/eventIcons-DVykqtE5.js +1 -0
  160. package/dist/interface/assets/face-recognition-5Yp1IcUb.js +1 -0
  161. package/dist/interface/assets/github-37yEERpu.js +1 -0
  162. package/dist/interface/assets/grid-fill-BGU3gqir.js +1 -0
  163. package/dist/interface/assets/hasPermission-CgD6A9UD.js +1 -0
  164. package/dist/interface/assets/home-sSF_NnOu.js +1 -0
  165. package/dist/interface/assets/information-outline-fu18_QSH.js +1 -0
  166. package/dist/interface/assets/instances-Bd34a12B.js +1 -0
  167. package/dist/interface/assets/lightbulb-outline-DWc53kV7.js +1 -0
  168. package/dist/interface/assets/locale-CIzyIwgu.js +1 -0
  169. package/dist/interface/assets/main-BiP4LKEq.js +3 -0
  170. package/dist/interface/assets/main-BqVSZVz1.css +1 -0
  171. package/dist/interface/assets/microphone-ChDR4mkG.js +1 -0
  172. package/dist/interface/assets/native-Cq3ra8E-.js +1 -0
  173. package/dist/interface/assets/native-DfLBhmBo.js +1 -0
  174. package/dist/interface/assets/nodeDefinitions-BLSMZueH.js +1 -0
  175. package/dist/interface/assets/notifications-IA3WVJUj.js +1 -0
  176. package/dist/interface/assets/play-solid-B_749j1A.js +1 -0
  177. package/dist/interface/assets/plugin-C1NakF2p.js +1 -0
  178. package/dist/interface/assets/plugins-CYwjf0ao.js +1 -0
  179. package/dist/interface/assets/plus-B5eEboLZ.js +1 -0
  180. package/dist/interface/assets/plus-Dis0MPt8.js +1 -0
  181. package/dist/interface/assets/power-CxGfHa98.js +1 -0
  182. package/dist/interface/assets/ring-resize-fOkdAS5R.js +1 -0
  183. package/dist/interface/assets/rolldown-runtime-CMxvf4Kt.js +1 -0
  184. package/dist/interface/assets/round-alt-arrow-left-bold-ekP_ATNV.js +1 -0
  185. package/dist/interface/assets/round-restart-alt-CJgRaJjF.css +1 -0
  186. package/dist/interface/assets/round-restart-alt-Cs1jYs6S.js +1 -0
  187. package/dist/interface/assets/router-CuAn6JZ_.css +1 -0
  188. package/dist/interface/assets/router-DNsC6QcQ.js +2 -0
  189. package/dist/interface/assets/routerState-DMVeYr60.js +1 -0
  190. package/dist/interface/assets/search-YdrT6au7.js +1 -0
  191. package/dist/interface/assets/server-DIqABppY.js +1 -0
  192. package/dist/interface/assets/settings-D2-mWioF.js +1 -0
  193. package/dist/interface/assets/shares-BY9SbIwh.js +1 -0
  194. package/dist/interface/assets/shield-check-DFR-xg-g.js +1 -0
  195. package/dist/interface/assets/terminal-BYi6cqd4.js +1 -0
  196. package/dist/interface/assets/theme-DtmzzutI.js +1 -0
  197. package/dist/interface/assets/trash-2-Du7oioNA.js +1 -0
  198. package/dist/interface/assets/trash-can-YTXLzAmt.js +1 -0
  199. package/dist/interface/assets/trash-fill-ZI3YYgNp.js +1 -0
  200. package/dist/interface/assets/types-B_isDU64.js +1 -0
  201. package/dist/interface/assets/types-BxFyoO54.js +1 -0
  202. package/dist/interface/assets/types-kxdn9XBW.js +1 -0
  203. package/dist/interface/assets/ui-aYGNqaHi.js +1 -0
  204. package/dist/interface/assets/upload-Chr4Uunq.js +1 -0
  205. package/dist/interface/assets/useBiometricCredentials-BwyTKV9v.js +1 -0
  206. package/dist/interface/assets/useCameraOptions-Bqf4OnZO.js +1 -0
  207. package/dist/interface/assets/useCuiCameraDrawer-Dn97MLFe.js +1 -0
  208. package/dist/interface/assets/useCuiDialog-Do_clY1W.js +2 -0
  209. package/dist/interface/assets/useElectron-mh8HQUAI.js +1 -0
  210. package/dist/interface/assets/useFileDownload-Yl8F_Wju.js +1 -0
  211. package/dist/interface/assets/useLogsSocket-BpQcAJOb.js +4 -0
  212. package/dist/interface/assets/useLogsSocket-pqdh7jNG.css +1 -0
  213. package/dist/interface/assets/useSharedComposables-riqEUgwX.js +1 -0
  214. package/dist/interface/assets/useStreamStatus-CLRD-42Q.js +1 -0
  215. package/dist/interface/assets/users.schema-CUZOYClB.js +1 -0
  216. package/dist/interface/assets/vendor-DmhYd_sB.js +22 -0
  217. package/dist/interface/assets/vendor-ace-B9YSA4ub.js +1085 -0
  218. package/dist/interface/assets/vendor-cameraui-DggYb17u.js +1976 -0
  219. package/dist/interface/assets/vendor-capacitor-IA6kwsx8.js +2 -0
  220. package/dist/interface/assets/vendor-chart-Dnlz1Jgy.js +3 -0
  221. package/dist/interface/assets/vendor-core-B6F-imJj.js +1 -0
  222. package/dist/interface/assets/vendor-dnd-Dp0ottZI.js +2 -0
  223. package/dist/interface/assets/vendor-draggabilly-C2ae3o70.js +1 -0
  224. package/dist/interface/assets/vendor-gridstack-Dxjc1EeA.js +3 -0
  225. package/dist/interface/assets/vendor-gridstack-Rg2RhwAc.css +1 -0
  226. package/dist/interface/assets/vendor-leaflet-B5L2Aw8Y.js +1 -0
  227. package/dist/interface/assets/vendor-leaflet-vh-t_kPv.css +1 -0
  228. package/dist/interface/assets/vendor-markdown-D3nVi7gw.js +15 -0
  229. package/dist/interface/assets/vendor-markdown-DtOhvyRx.css +1 -0
  230. package/dist/interface/assets/vendor-primevue--pcuf6kA.js +4289 -0
  231. package/dist/interface/assets/vendor-vueflow-CBuKPASC.js +26 -0
  232. package/dist/interface/assets/vendor-xterm-BrP-ENHg.css +1 -0
  233. package/dist/interface/assets/vendor-xterm-D8Z_h2U0.js +145 -0
  234. package/dist/interface/assets/vendor-zod-CmGeQCqy.js +127 -0
  235. package/dist/interface/assets/view-grid-Ax3uYm-P.js +1 -0
  236. package/dist/interface/assets/view-grid-SdzaC3O_.css +1 -0
  237. package/dist/interface/assets/web-3Sh2qjiP.js +1 -0
  238. package/dist/interface/assets/web-B0BK4Q2M.js +1 -0
  239. package/dist/interface/assets/web-BjKL51lK-DzG2kK8Q.js +1 -0
  240. package/dist/interface/assets/web-COttRPza.js +1 -0
  241. package/dist/interface/assets/web-Ck1J3gUt.js +1 -0
  242. package/dist/interface/assets/web-DPxPmEOR.js +1 -0
  243. package/dist/interface/assets/web-DRprnZwc.js +1 -0
  244. package/dist/interface/assets/web-DusfFKJE.js +1 -0
  245. package/dist/interface/assets/web-U3ajDFzM.js +1 -0
  246. package/dist/interface/assets/web-jcLz0P7f.js +1 -0
  247. package/dist/interface/assets/web-tQAiC0W2.js +1 -0
  248. package/dist/interface/assets/web-x9pvmNMf.js +1 -0
  249. package/dist/interface/assets/workbox-window.prod.es5-DkzC-kEO.js +1 -0
  250. package/dist/interface/assets/worker-base-ybazWkNy.js +1337 -0
  251. package/dist/interface/assets/worker-yaml-crtWQpDN.js +5824 -0
  252. package/dist/interface/assets/zoom-in-zoFmMkYM.js +1 -0
  253. package/dist/interface/index.html +96 -45
  254. package/dist/interface/manifest.webmanifest +1 -1
  255. package/dist/interface/og-share.png +0 -0
  256. package/dist/interface/sw.js +1 -1
  257. package/dist/interface/workbox-5f44db27.js +1 -0
  258. package/dist/server/package.json +85 -84
  259. package/dist/server/requirements.txt +9 -14
  260. package/dist/server/src/_camera_ui_tools/camera_ui_common/__init__.py +19 -11
  261. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/__init__.py +23 -0
  262. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/object_path.py +35 -22
  263. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/promise.py +41 -0
  264. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/reactive.py +17 -14
  265. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/signal_handler.py +12 -4
  266. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/subscribed.py +15 -2
  267. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/task.py +9 -3
  268. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/thread.py +10 -2
  269. package/dist/server/src/_camera_ui_tools/camera_ui_common/common_utils/utils.py +21 -13
  270. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/__init__.py +8 -0
  271. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/logger.py +237 -99
  272. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/__init__.py +77 -0
  273. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/channel.py +321 -0
  274. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/chunking.py +290 -0
  275. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/client.py +1694 -0
  276. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/codec.py +73 -0
  277. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/decorators.py +307 -0
  278. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/errors.py +76 -0
  279. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/executor.py +29 -0
  280. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/handler.py +523 -0
  281. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/service.py +524 -0
  282. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/svcm.py +15 -0
  283. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/types.py +427 -0
  284. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/utils.py +332 -0
  285. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +515 -0
  286. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +173 -0
  287. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +256 -0
  288. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/detection.py +135 -0
  289. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/device.py +432 -0
  290. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/enums.py +111 -0
  291. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/events.py +146 -0
  292. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +21 -0
  293. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/streaming.py +188 -0
  294. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/__init__.py +92 -0
  295. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/camera_config_internal.py +46 -0
  296. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/camera_enums.py +9 -0
  297. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/camera_wire.py +15 -0
  298. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/event_emitter.py +102 -0
  299. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/manager_rpc.py +27 -0
  300. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/sensor_rpc.py +89 -0
  301. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/sensor_triggers.py +4 -0
  302. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/shared_utils.py +73 -0
  303. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/streaming_internal.py +16 -0
  304. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/manager/__init__.py +348 -0
  305. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/observable/__init__.py +557 -0
  306. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/__init__.py +104 -0
  307. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/api.py +137 -0
  308. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/contract.py +164 -0
  309. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/helper.py +242 -0
  310. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/interfaces.py +427 -0
  311. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/notifier.py +142 -0
  312. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/oauth.py +150 -0
  313. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +203 -0
  314. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/audio.py +241 -0
  315. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +551 -0
  316. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/battery.py +167 -0
  317. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/classifier.py +196 -0
  318. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/clip.py +67 -0
  319. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/contact.py +88 -0
  320. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/detection.py +60 -0
  321. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/doorbell.py +122 -0
  322. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/face.py +184 -0
  323. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/garage.py +174 -0
  324. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/humidity.py +79 -0
  325. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/leak.py +88 -0
  326. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/license_plate.py +186 -0
  327. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/light.py +157 -0
  328. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/lock.py +149 -0
  329. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/motion.py +203 -0
  330. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/object.py +210 -0
  331. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/occupancy.py +88 -0
  332. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/ptz.py +256 -0
  333. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/security_system.py +157 -0
  334. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/siren.py +150 -0
  335. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/smoke.py +88 -0
  336. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/spec.py +56 -0
  337. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/switch.py +107 -0
  338. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/temperature.py +80 -0
  339. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/storage/__init__.py +695 -0
  340. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/types.py +54 -0
  341. package/dist/server/src/api/controllers/api.controller.d.ts +2 -2
  342. package/dist/server/src/api/controllers/api.controller.js +3 -3
  343. package/dist/server/src/api/controllers/api.controller.js.map +1 -1
  344. package/dist/server/src/api/controllers/auth.controller.d.ts +20 -5
  345. package/dist/server/src/api/controllers/auth.controller.js +418 -134
  346. package/dist/server/src/api/controllers/auth.controller.js.map +1 -1
  347. package/dist/server/src/api/controllers/automations.controller.d.ts +17 -0
  348. package/dist/server/src/api/controllers/automations.controller.js +146 -0
  349. package/dist/server/src/api/controllers/automations.controller.js.map +1 -0
  350. package/dist/server/src/api/controllers/backup.controller.js +0 -1
  351. package/dist/server/src/api/controllers/backup.controller.js.map +1 -1
  352. package/dist/server/src/api/controllers/cameras.controller.d.ts +14 -5
  353. package/dist/server/src/api/controllers/cameras.controller.js +490 -69
  354. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
  355. package/dist/server/src/api/controllers/config.controller.d.ts +2 -2
  356. package/dist/server/src/api/controllers/config.controller.js +2 -2
  357. package/dist/server/src/api/controllers/config.controller.js.map +1 -1
  358. package/dist/server/src/api/controllers/download.controller.d.ts +7 -0
  359. package/dist/server/src/api/controllers/download.controller.js +12 -0
  360. package/dist/server/src/api/controllers/download.controller.js.map +1 -0
  361. package/dist/server/src/api/controllers/files.controller.js.map +1 -1
  362. package/dist/server/src/api/controllers/frameWorkers.controller.d.ts +1 -1
  363. package/dist/server/src/api/controllers/frameWorkers.controller.js +1 -1
  364. package/dist/server/src/api/controllers/frameWorkers.controller.js.map +1 -1
  365. package/dist/server/src/api/controllers/instances.controller.d.ts +15 -0
  366. package/dist/server/src/api/controllers/instances.controller.js +100 -0
  367. package/dist/server/src/api/controllers/instances.controller.js.map +1 -0
  368. package/dist/server/src/api/controllers/notifications.controller.d.ts +15 -0
  369. package/dist/server/src/api/controllers/notifications.controller.js +121 -0
  370. package/dist/server/src/api/controllers/notifications.controller.js.map +1 -0
  371. package/dist/server/src/api/controllers/oauthCallback.controller.d.ts +15 -0
  372. package/dist/server/src/api/controllers/oauthCallback.controller.js +53 -0
  373. package/dist/server/src/api/controllers/oauthCallback.controller.js.map +1 -0
  374. package/dist/server/src/api/controllers/plugins.controller.d.ts +5 -9
  375. package/dist/server/src/api/controllers/plugins.controller.js +129 -246
  376. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  377. package/dist/server/src/api/controllers/remote.controller.d.ts +27 -0
  378. package/dist/server/src/api/controllers/remote.controller.js +247 -0
  379. package/dist/server/src/api/controllers/remote.controller.js.map +1 -0
  380. package/dist/server/src/api/controllers/server.controller.d.ts +24 -0
  381. package/dist/server/src/api/controllers/server.controller.js +236 -0
  382. package/dist/server/src/api/controllers/server.controller.js.map +1 -0
  383. package/dist/server/src/api/controllers/shares.controller.d.ts +12 -0
  384. package/dist/server/src/api/controllers/shares.controller.js +121 -0
  385. package/dist/server/src/api/controllers/shares.controller.js.map +1 -0
  386. package/dist/server/src/api/controllers/tunnel.controller.d.ts +9 -0
  387. package/dist/server/src/api/controllers/tunnel.controller.js +39 -0
  388. package/dist/server/src/api/controllers/tunnel.controller.js.map +1 -0
  389. package/dist/server/src/api/controllers/users.controller.d.ts +2 -2
  390. package/dist/server/src/api/controllers/users.controller.js +11 -2
  391. package/dist/server/src/api/controllers/users.controller.js.map +1 -1
  392. package/dist/server/src/api/controllers/workers.controller.d.ts +14 -0
  393. package/dist/server/src/api/controllers/workers.controller.js +69 -0
  394. package/dist/server/src/api/controllers/workers.controller.js.map +1 -0
  395. package/dist/server/src/api/database/checks.js +2 -2
  396. package/dist/server/src/api/database/checks.js.map +1 -1
  397. package/dist/server/src/api/database/constants.d.ts +10 -1
  398. package/dist/server/src/api/database/constants.js +10 -1
  399. package/dist/server/src/api/database/constants.js.map +1 -1
  400. package/dist/server/src/api/database/index.d.ts +24 -12
  401. package/dist/server/src/api/database/index.js +182 -126
  402. package/dist/server/src/api/database/index.js.map +1 -1
  403. package/dist/server/src/api/database/migration.d.ts +4 -13
  404. package/dist/server/src/api/database/migration.js +20 -80
  405. package/dist/server/src/api/database/migration.js.map +1 -1
  406. package/dist/server/src/api/database/migrations/index.d.ts +2 -0
  407. package/dist/server/src/api/database/migrations/index.js +24 -0
  408. package/dist/server/src/api/database/migrations/index.js.map +1 -0
  409. package/dist/server/src/api/database/migrations/types.d.ts +13 -0
  410. package/dist/server/src/api/database/migrations/types.js.map +1 -0
  411. package/dist/server/src/api/database/selfcheck.js +3 -0
  412. package/dist/server/src/api/database/selfcheck.js.map +1 -1
  413. package/dist/server/src/api/database/types.d.ts +173 -28
  414. package/dist/server/src/api/index.d.ts +8 -2
  415. package/dist/server/src/api/index.js +122 -43
  416. package/dist/server/src/api/index.js.map +1 -1
  417. package/dist/server/src/api/middlewares/authPermission.middleware.d.ts +4 -4
  418. package/dist/server/src/api/middlewares/authPermission.middleware.js +8 -8
  419. package/dist/server/src/api/middlewares/authPermission.middleware.js.map +1 -1
  420. package/dist/server/src/api/middlewares/authValidation.middleware.d.ts +5 -2
  421. package/dist/server/src/api/middlewares/authValidation.middleware.js +75 -114
  422. package/dist/server/src/api/middlewares/authValidation.middleware.js.map +1 -1
  423. package/dist/server/src/api/middlewares/pagination.middleware.d.ts +1 -1
  424. package/dist/server/src/api/middlewares/pagination.middleware.js +2 -2
  425. package/dist/server/src/api/middlewares/pagination.middleware.js.map +1 -1
  426. package/dist/server/src/api/middlewares/socketAuth.middleware.d.ts +2 -2
  427. package/dist/server/src/api/middlewares/socketAuth.middleware.js +5 -4
  428. package/dist/server/src/api/middlewares/socketAuth.middleware.js.map +1 -1
  429. package/dist/server/src/api/plugins/header.plugin.js +1 -1
  430. package/dist/server/src/api/plugins/header.plugin.js.map +1 -1
  431. package/dist/server/src/api/plugins/logger.plugin.js +13 -10
  432. package/dist/server/src/api/plugins/logger.plugin.js.map +1 -1
  433. package/dist/server/src/api/plugins/proxy.plugin.js +76 -105
  434. package/dist/server/src/api/plugins/proxy.plugin.js.map +1 -1
  435. package/dist/server/src/api/plugins/system.plugin.js.map +1 -1
  436. package/dist/server/src/api/plugins/useragent.plugin.d.ts +2 -2
  437. package/dist/server/src/api/plugins/useragent.plugin.js +2 -2
  438. package/dist/server/src/api/plugins/useragent.plugin.js.map +1 -1
  439. package/dist/server/src/api/routes/api.routes.js +18 -2
  440. package/dist/server/src/api/routes/api.routes.js.map +1 -1
  441. package/dist/server/src/api/routes/auth.routes.js +131 -9
  442. package/dist/server/src/api/routes/auth.routes.js.map +1 -1
  443. package/dist/server/src/api/routes/automations.routes.d.ts +2 -0
  444. package/dist/server/src/api/routes/automations.routes.js +128 -0
  445. package/dist/server/src/api/routes/automations.routes.js.map +1 -0
  446. package/dist/server/src/api/routes/backup.routes.js +6 -0
  447. package/dist/server/src/api/routes/backup.routes.js.map +1 -1
  448. package/dist/server/src/api/routes/cameras.routes.js +346 -33
  449. package/dist/server/src/api/routes/cameras.routes.js.map +1 -1
  450. package/dist/server/src/api/routes/config.routes.js +26 -4
  451. package/dist/server/src/api/routes/config.routes.js.map +1 -1
  452. package/dist/server/src/api/routes/download.routes.d.ts +2 -0
  453. package/dist/server/src/api/routes/download.routes.js +16 -0
  454. package/dist/server/src/api/routes/download.routes.js.map +1 -0
  455. package/dist/server/src/api/routes/files.routes.js +7 -1
  456. package/dist/server/src/api/routes/files.routes.js.map +1 -1
  457. package/dist/server/src/api/routes/frameWorkers.routes.js +26 -4
  458. package/dist/server/src/api/routes/frameWorkers.routes.js.map +1 -1
  459. package/dist/server/src/api/routes/index.d.ts +1 -0
  460. package/dist/server/src/api/routes/index.js +23 -3
  461. package/dist/server/src/api/routes/index.js.map +1 -1
  462. package/dist/server/src/api/routes/instances.routes.d.ts +2 -0
  463. package/dist/server/src/api/routes/instances.routes.js +105 -0
  464. package/dist/server/src/api/routes/instances.routes.js.map +1 -0
  465. package/dist/server/src/api/routes/notifications.routes.d.ts +2 -0
  466. package/dist/server/src/api/routes/notifications.routes.js +102 -0
  467. package/dist/server/src/api/routes/notifications.routes.js.map +1 -0
  468. package/dist/server/src/api/routes/oauthCallback.routes.d.ts +2 -0
  469. package/dist/server/src/api/routes/oauthCallback.routes.js +17 -0
  470. package/dist/server/src/api/routes/oauthCallback.routes.js.map +1 -0
  471. package/dist/server/src/api/routes/plugins.routes.js +259 -95
  472. package/dist/server/src/api/routes/plugins.routes.js.map +1 -1
  473. package/dist/server/src/api/routes/remote.routes.d.ts +2 -0
  474. package/dist/server/src/api/routes/remote.routes.js +164 -0
  475. package/dist/server/src/api/routes/remote.routes.js.map +1 -0
  476. package/dist/server/src/api/routes/server.routes.d.ts +2 -0
  477. package/dist/server/src/api/routes/server.routes.js +130 -0
  478. package/dist/server/src/api/routes/server.routes.js.map +1 -0
  479. package/dist/server/src/api/routes/shares.routes.d.ts +2 -0
  480. package/dist/server/src/api/routes/shares.routes.js +71 -0
  481. package/dist/server/src/api/routes/shares.routes.js.map +1 -0
  482. package/dist/server/src/api/routes/tunnel.routes.d.ts +2 -0
  483. package/dist/server/src/api/routes/tunnel.routes.js +14 -0
  484. package/dist/server/src/api/routes/tunnel.routes.js.map +1 -0
  485. package/dist/server/src/api/routes/users.routes.js +92 -12
  486. package/dist/server/src/api/routes/users.routes.js.map +1 -1
  487. package/dist/server/src/api/routes/workers.routes.d.ts +2 -0
  488. package/dist/server/src/api/routes/workers.routes.js +71 -0
  489. package/dist/server/src/api/routes/workers.routes.js.map +1 -0
  490. package/dist/server/src/api/schemas/auth.schema.d.ts +35 -0
  491. package/dist/server/src/api/schemas/auth.schema.js +37 -0
  492. package/dist/server/src/api/schemas/auth.schema.js.map +1 -0
  493. package/dist/server/src/api/schemas/automations.schema.d.ts +151 -0
  494. package/dist/server/src/api/schemas/automations.schema.js +84 -0
  495. package/dist/server/src/api/schemas/automations.schema.js.map +1 -0
  496. package/dist/server/src/api/schemas/backup.schema.d.ts +15 -190
  497. package/dist/server/src/api/schemas/backup.schema.js +5 -23
  498. package/dist/server/src/api/schemas/backup.schema.js.map +1 -1
  499. package/dist/server/src/api/schemas/cameras.schema.d.ts +1062 -1647
  500. package/dist/server/src/api/schemas/cameras.schema.js +218 -49
  501. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  502. package/dist/server/src/api/schemas/common.schema.d.ts +7 -0
  503. package/dist/server/src/api/schemas/common.schema.js +7 -0
  504. package/dist/server/src/api/schemas/common.schema.js.map +1 -0
  505. package/dist/server/src/api/schemas/config.schema.d.ts +41 -79
  506. package/dist/server/src/api/schemas/config.schema.js +19 -1
  507. package/dist/server/src/api/schemas/config.schema.js.map +1 -1
  508. package/dist/server/src/api/schemas/download.schema.d.ts +5 -0
  509. package/dist/server/src/api/schemas/download.schema.js +5 -0
  510. package/dist/server/src/api/schemas/download.schema.js.map +1 -0
  511. package/dist/server/src/api/schemas/files.schema.d.ts +5 -0
  512. package/dist/server/src/api/schemas/files.schema.js +5 -0
  513. package/dist/server/src/api/schemas/files.schema.js.map +1 -0
  514. package/dist/server/src/api/schemas/frameWorkers.schema.d.ts +5 -0
  515. package/dist/server/src/api/schemas/frameWorkers.schema.js +5 -0
  516. package/dist/server/src/api/schemas/frameWorkers.schema.js.map +1 -0
  517. package/dist/server/src/api/schemas/go2rtc.schema.d.ts +90 -640
  518. package/dist/server/src/api/schemas/go2rtc.schema.js +1 -16
  519. package/dist/server/src/api/schemas/go2rtc.schema.js.map +1 -1
  520. package/dist/server/src/api/schemas/instances.schema.d.ts +23 -0
  521. package/dist/server/src/api/schemas/instances.schema.js +24 -0
  522. package/dist/server/src/api/schemas/instances.schema.js.map +1 -0
  523. package/dist/server/src/api/schemas/notifications.schema.d.ts +26 -0
  524. package/dist/server/src/api/schemas/notifications.schema.js +25 -0
  525. package/dist/server/src/api/schemas/notifications.schema.js.map +1 -0
  526. package/dist/server/src/api/schemas/oauthCallback.schema.d.ts +11 -0
  527. package/dist/server/src/api/schemas/oauthCallback.schema.js +10 -0
  528. package/dist/server/src/api/schemas/oauthCallback.schema.js.map +1 -0
  529. package/dist/server/src/api/schemas/plugins.schema.d.ts +62 -59
  530. package/dist/server/src/api/schemas/plugins.schema.js +54 -81
  531. package/dist/server/src/api/schemas/plugins.schema.js.map +1 -1
  532. package/dist/server/src/api/schemas/remote.schema.d.ts +44 -0
  533. package/dist/server/src/api/schemas/remote.schema.js +80 -0
  534. package/dist/server/src/api/schemas/remote.schema.js.map +1 -0
  535. package/dist/server/src/api/schemas/server.schema.d.ts +9 -0
  536. package/dist/server/src/api/schemas/server.schema.js +12 -0
  537. package/dist/server/src/api/schemas/server.schema.js.map +1 -0
  538. package/dist/server/src/api/schemas/shares.schema.d.ts +21 -0
  539. package/dist/server/src/api/schemas/shares.schema.js +22 -0
  540. package/dist/server/src/api/schemas/shares.schema.js.map +1 -0
  541. package/dist/server/src/api/schemas/storage.schema.d.ts +5 -15
  542. package/dist/server/src/api/schemas/users.schema.d.ts +294 -786
  543. package/dist/server/src/api/schemas/users.schema.js +76 -39
  544. package/dist/server/src/api/schemas/users.schema.js.map +1 -1
  545. package/dist/server/src/api/schemas/workers.schema.d.ts +14 -0
  546. package/dist/server/src/api/schemas/workers.schema.js +12 -0
  547. package/dist/server/src/api/schemas/workers.schema.js.map +1 -0
  548. package/dist/server/src/api/services/auth.service.d.ts +27 -17
  549. package/dist/server/src/api/services/auth.service.js +106 -134
  550. package/dist/server/src/api/services/auth.service.js.map +1 -1
  551. package/dist/server/src/api/services/automations.service.d.ts +24 -0
  552. package/dist/server/src/api/services/automations.service.js +157 -0
  553. package/dist/server/src/api/services/automations.service.js.map +1 -0
  554. package/dist/server/src/api/services/backup.service.js +0 -5
  555. package/dist/server/src/api/services/backup.service.js.map +1 -1
  556. package/dist/server/src/api/services/cameras.service.d.ts +28 -15
  557. package/dist/server/src/api/services/cameras.service.js +532 -305
  558. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  559. package/dist/server/src/api/services/downloads.service.d.ts +9 -0
  560. package/dist/server/src/api/services/downloads.service.js +20 -0
  561. package/dist/server/src/api/services/downloads.service.js.map +1 -0
  562. package/dist/server/src/api/services/instances.service.d.ts +52 -0
  563. package/dist/server/src/api/services/instances.service.js +344 -0
  564. package/dist/server/src/api/services/instances.service.js.map +1 -0
  565. package/dist/server/src/api/services/notifications.service.d.ts +21 -0
  566. package/dist/server/src/api/services/notifications.service.js +48 -0
  567. package/dist/server/src/api/services/notifications.service.js.map +1 -0
  568. package/dist/server/src/api/services/plugins.service.js +31 -35
  569. package/dist/server/src/api/services/plugins.service.js.map +1 -1
  570. package/dist/server/src/api/services/remote.service.d.ts +35 -0
  571. package/dist/server/src/api/services/remote.service.js +207 -0
  572. package/dist/server/src/api/services/remote.service.js.map +1 -0
  573. package/dist/server/src/api/services/server.service.d.ts +15 -0
  574. package/dist/server/src/api/services/server.service.js +75 -0
  575. package/dist/server/src/api/services/server.service.js.map +1 -0
  576. package/dist/server/src/api/services/shares.service.d.ts +46 -0
  577. package/dist/server/src/api/services/shares.service.js +233 -0
  578. package/dist/server/src/api/services/shares.service.js.map +1 -0
  579. package/dist/server/src/api/services/twoFactor.service.d.ts +22 -0
  580. package/dist/server/src/api/services/twoFactor.service.js +81 -0
  581. package/dist/server/src/api/services/twoFactor.service.js.map +1 -0
  582. package/dist/server/src/api/services/users.service.d.ts +9 -5
  583. package/dist/server/src/api/services/users.service.js +157 -121
  584. package/dist/server/src/api/services/users.service.js.map +1 -1
  585. package/dist/server/src/api/services/workers.service.d.ts +5 -0
  586. package/dist/server/src/api/services/workers.service.js +19 -0
  587. package/dist/server/src/api/services/workers.service.js.map +1 -0
  588. package/dist/server/src/api/types/index.d.ts +350 -133
  589. package/dist/server/src/api/types/index.js +5 -4
  590. package/dist/server/src/api/types/index.js.map +1 -1
  591. package/dist/server/src/api/utils/cert.js +1 -1
  592. package/dist/server/src/api/utils/cert.js.map +1 -1
  593. package/dist/server/src/api/utils/encryption.d.ts +5 -0
  594. package/dist/server/src/api/utils/encryption.js +25 -0
  595. package/dist/server/src/api/utils/encryption.js.map +1 -0
  596. package/dist/server/src/api/utils/plugin.d.ts +4 -0
  597. package/dist/server/src/api/utils/plugin.js +8 -0
  598. package/dist/server/src/api/utils/plugin.js.map +1 -0
  599. package/dist/server/src/api/utils/regex.d.ts +3 -0
  600. package/dist/server/src/api/utils/regex.js +4 -0
  601. package/dist/server/src/api/utils/regex.js.map +1 -0
  602. package/dist/server/src/api/utils/upload.d.ts +3 -0
  603. package/dist/server/src/api/utils/upload.js +23 -0
  604. package/dist/server/src/api/utils/upload.js.map +1 -0
  605. package/dist/server/src/api/websocket/index.js +18 -16
  606. package/dist/server/src/api/websocket/index.js.map +1 -1
  607. package/dist/server/src/api/websocket/nsp/cameras.d.ts +21 -0
  608. package/dist/server/src/api/websocket/nsp/cameras.js +152 -0
  609. package/dist/server/src/api/websocket/nsp/cameras.js.map +1 -0
  610. package/dist/server/src/api/websocket/nsp/logs.d.ts +1 -1
  611. package/dist/server/src/api/websocket/nsp/logs.js +65 -52
  612. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  613. package/dist/server/src/api/websocket/nsp/main.d.ts +4 -1
  614. package/dist/server/src/api/websocket/nsp/main.js +29 -1
  615. package/dist/server/src/api/websocket/nsp/main.js.map +1 -1
  616. package/dist/server/src/api/websocket/nsp/metrics.js +4 -4
  617. package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -1
  618. package/dist/server/src/api/websocket/nsp/notifications.d.ts +3 -3
  619. package/dist/server/src/api/websocket/nsp/notifications.js +10 -11
  620. package/dist/server/src/api/websocket/nsp/notifications.js.map +1 -1
  621. package/dist/server/src/api/websocket/nsp/server.d.ts +4 -4
  622. package/dist/server/src/api/websocket/nsp/server.js +48 -27
  623. package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
  624. package/dist/server/src/api/websocket/nsp/status.d.ts +3 -3
  625. package/dist/server/src/api/websocket/nsp/status.js +3 -3
  626. package/dist/server/src/api/websocket/nsp/status.js.map +1 -1
  627. package/dist/server/src/api/websocket/nsp/workers.d.ts +17 -0
  628. package/dist/server/src/api/websocket/nsp/workers.js +46 -0
  629. package/dist/server/src/api/websocket/nsp/workers.js.map +1 -0
  630. package/dist/server/src/api/websocket/types.d.ts +2 -1
  631. package/dist/server/src/api.d.ts +11 -16
  632. package/dist/server/src/api.js +62 -48
  633. package/dist/server/src/api.js.map +1 -1
  634. package/dist/server/src/automations/actions/cameraControl.d.ts +2 -0
  635. package/dist/server/src/automations/actions/cameraControl.js +35 -0
  636. package/dist/server/src/automations/actions/cameraControl.js.map +1 -0
  637. package/dist/server/src/automations/actions/delay.d.ts +2 -0
  638. package/dist/server/src/automations/actions/delay.js +8 -0
  639. package/dist/server/src/automations/actions/delay.js.map +1 -0
  640. package/dist/server/src/automations/actions/http.d.ts +2 -0
  641. package/dist/server/src/automations/actions/http.js +44 -0
  642. package/dist/server/src/automations/actions/http.js.map +1 -0
  643. package/dist/server/src/automations/actions/index.d.ts +4 -0
  644. package/dist/server/src/automations/actions/index.js +20 -0
  645. package/dist/server/src/automations/actions/index.js.map +1 -0
  646. package/dist/server/src/automations/actions/notification.d.ts +2 -0
  647. package/dist/server/src/automations/actions/notification.js +76 -0
  648. package/dist/server/src/automations/actions/notification.js.map +1 -0
  649. package/dist/server/src/automations/actions/plugin.d.ts +3 -0
  650. package/dist/server/src/automations/actions/plugin.js +73 -0
  651. package/dist/server/src/automations/actions/plugin.js.map +1 -0
  652. package/dist/server/src/automations/actions/sensor.d.ts +2 -0
  653. package/dist/server/src/automations/actions/sensor.js +17 -0
  654. package/dist/server/src/automations/actions/sensor.js.map +1 -0
  655. package/dist/server/src/automations/actions/snapshot.d.ts +2 -0
  656. package/dist/server/src/automations/actions/snapshot.js +20 -0
  657. package/dist/server/src/automations/actions/snapshot.js.map +1 -0
  658. package/dist/server/src/automations/actions/types.d.ts +14 -0
  659. package/dist/server/src/automations/actions/types.js.map +1 -0
  660. package/dist/server/src/automations/actions/variable.d.ts +2 -0
  661. package/dist/server/src/automations/actions/variable.js +17 -0
  662. package/dist/server/src/automations/actions/variable.js.map +1 -0
  663. package/dist/server/src/automations/conditions/ifelse.d.ts +3 -0
  664. package/dist/server/src/automations/conditions/ifelse.js +39 -0
  665. package/dist/server/src/automations/conditions/ifelse.js.map +1 -0
  666. package/dist/server/src/automations/conditions/index.d.ts +4 -0
  667. package/dist/server/src/automations/conditions/index.js +20 -0
  668. package/dist/server/src/automations/conditions/index.js.map +1 -0
  669. package/dist/server/src/automations/conditions/sensorState.d.ts +3 -0
  670. package/dist/server/src/automations/conditions/sensorState.js +21 -0
  671. package/dist/server/src/automations/conditions/sensorState.js.map +1 -0
  672. package/dist/server/src/automations/conditions/switch.d.ts +3 -0
  673. package/dist/server/src/automations/conditions/switch.js +9 -0
  674. package/dist/server/src/automations/conditions/switch.js.map +1 -0
  675. package/dist/server/src/automations/conditions/time.d.ts +3 -0
  676. package/dist/server/src/automations/conditions/time.js +24 -0
  677. package/dist/server/src/automations/conditions/time.js.map +1 -0
  678. package/dist/server/src/automations/conditions/types.d.ts +7 -0
  679. package/dist/server/src/automations/conditions/types.js.map +1 -0
  680. package/dist/server/src/automations/context.d.ts +48 -0
  681. package/dist/server/src/automations/context.js +146 -0
  682. package/dist/server/src/automations/context.js.map +1 -0
  683. package/dist/server/src/automations/engine.d.ts +35 -0
  684. package/dist/server/src/automations/engine.js +321 -0
  685. package/dist/server/src/automations/engine.js.map +1 -0
  686. package/dist/server/src/automations/haversine.d.ts +1 -0
  687. package/dist/server/src/automations/haversine.js +9 -0
  688. package/dist/server/src/automations/haversine.js.map +1 -0
  689. package/dist/server/src/automations/parseValue.d.ts +1 -0
  690. package/dist/server/src/automations/parseValue.js +11 -0
  691. package/dist/server/src/automations/parseValue.js.map +1 -0
  692. package/dist/server/src/automations/pluginMethodRegistry.d.ts +37 -0
  693. package/dist/server/src/automations/pluginMethodRegistry.js +162 -0
  694. package/dist/server/src/automations/pluginMethodRegistry.js.map +1 -0
  695. package/dist/server/src/automations/runner.d.ts +23 -0
  696. package/dist/server/src/automations/runner.js +166 -0
  697. package/dist/server/src/automations/runner.js.map +1 -0
  698. package/dist/server/src/automations/triggers/detection.d.ts +3 -0
  699. package/dist/server/src/automations/triggers/detection.js +102 -0
  700. package/dist/server/src/automations/triggers/detection.js.map +1 -0
  701. package/dist/server/src/automations/triggers/geofence.d.ts +13 -0
  702. package/dist/server/src/automations/triggers/geofence.js +8 -0
  703. package/dist/server/src/automations/triggers/geofence.js.map +1 -0
  704. package/dist/server/src/automations/triggers/index.d.ts +9 -0
  705. package/dist/server/src/automations/triggers/index.js +7 -0
  706. package/dist/server/src/automations/triggers/index.js.map +1 -0
  707. package/dist/server/src/automations/triggers/schedule.d.ts +3 -0
  708. package/dist/server/src/automations/triggers/schedule.js +54 -0
  709. package/dist/server/src/automations/triggers/schedule.js.map +1 -0
  710. package/dist/server/src/automations/triggers/sensor.d.ts +3 -0
  711. package/dist/server/src/automations/triggers/sensor.js +44 -0
  712. package/dist/server/src/automations/triggers/sensor.js.map +1 -0
  713. package/dist/server/src/automations/triggers/system.d.ts +3 -0
  714. package/dist/server/src/automations/triggers/system.js +31 -0
  715. package/dist/server/src/automations/triggers/system.js.map +1 -0
  716. package/dist/server/src/automations/triggers/types.d.ts +12 -0
  717. package/dist/server/src/automations/triggers/types.js.map +1 -0
  718. package/dist/server/src/automations/triggers/webhook.d.ts +7 -0
  719. package/dist/server/src/automations/triggers/webhook.js +8 -0
  720. package/dist/server/src/automations/triggers/webhook.js.map +1 -0
  721. package/dist/server/src/automations/utilities/imageInput.d.ts +2 -0
  722. package/dist/server/src/automations/utilities/imageInput.js +139 -0
  723. package/dist/server/src/automations/utilities/imageInput.js.map +1 -0
  724. package/dist/server/src/automations/utilities/index.d.ts +2 -0
  725. package/dist/server/src/automations/utilities/index.js +7 -0
  726. package/dist/server/src/automations/utilities/index.js.map +1 -0
  727. package/dist/server/src/automations/utilities/output.d.ts +2 -0
  728. package/dist/server/src/automations/utilities/output.js +10 -0
  729. package/dist/server/src/automations/utilities/output.js.map +1 -0
  730. package/dist/server/src/camera/controller.d.ts +56 -45
  731. package/dist/server/src/camera/controller.js +468 -326
  732. package/dist/server/src/camera/controller.js.map +1 -1
  733. package/dist/server/src/camera/decoder/audio-source.d.ts +34 -0
  734. package/dist/server/src/camera/decoder/audio-source.js +170 -0
  735. package/dist/server/src/camera/decoder/audio-source.js.map +1 -0
  736. package/dist/server/src/camera/decoder/cascade-manager.d.ts +22 -0
  737. package/dist/server/src/camera/decoder/cascade-manager.js +82 -0
  738. package/dist/server/src/camera/decoder/cascade-manager.js.map +1 -0
  739. package/dist/server/src/camera/decoder/child.d.ts +28 -0
  740. package/dist/server/src/camera/decoder/child.js +187 -0
  741. package/dist/server/src/camera/decoder/child.js.map +1 -0
  742. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +142 -0
  743. package/dist/server/src/camera/decoder/detection-coordinator.js +1844 -0
  744. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -0
  745. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +41 -0
  746. package/dist/server/src/camera/decoder/detection-pipeline.js +216 -0
  747. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -0
  748. package/dist/server/src/camera/decoder/dwell-manager.d.ts +23 -0
  749. package/dist/server/src/camera/decoder/dwell-manager.js +82 -0
  750. package/dist/server/src/camera/decoder/dwell-manager.js.map +1 -0
  751. package/dist/server/src/camera/decoder/event-manager.d.ts +97 -0
  752. package/dist/server/src/camera/decoder/event-manager.js +674 -0
  753. package/dist/server/src/camera/decoder/event-manager.js.map +1 -0
  754. package/dist/server/src/camera/decoder/frame-scaler.d.ts +53 -0
  755. package/dist/server/src/camera/decoder/frame-scaler.js +136 -0
  756. package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -0
  757. package/dist/server/src/camera/decoder/frame-source.d.ts +54 -0
  758. package/dist/server/src/camera/decoder/frame-source.js +341 -0
  759. package/dist/server/src/camera/decoder/frame-source.js.map +1 -0
  760. package/dist/server/src/camera/decoder/ptz-autotracker.d.ts +57 -0
  761. package/dist/server/src/camera/decoder/ptz-autotracker.js +369 -0
  762. package/dist/server/src/camera/decoder/ptz-autotracker.js.map +1 -0
  763. package/dist/server/src/camera/decoder/types.d.ts +7 -0
  764. package/dist/server/src/camera/decoder/types.js +6 -0
  765. package/dist/server/src/camera/decoder/types.js.map +1 -0
  766. package/dist/server/src/camera/decoder/worker.d.ts +48 -0
  767. package/dist/server/src/camera/decoder/worker.js +465 -0
  768. package/dist/server/src/camera/decoder/worker.js.map +1 -0
  769. package/dist/server/src/camera/index.d.ts +43 -59
  770. package/dist/server/src/camera/index.js +72 -438
  771. package/dist/server/src/camera/index.js.map +1 -1
  772. package/dist/server/src/camera/sensors/controller.d.ts +96 -0
  773. package/dist/server/src/camera/sensors/controller.js +517 -0
  774. package/dist/server/src/camera/sensors/controller.js.map +1 -0
  775. package/dist/server/src/camera/sensors/sensor.d.ts +34 -0
  776. package/dist/server/src/camera/sensors/sensor.js +176 -0
  777. package/dist/server/src/camera/sensors/sensor.js.map +1 -0
  778. package/dist/server/src/camera/sensors/types.d.ts +27 -0
  779. package/dist/server/src/camera/sensors/types.js +225 -0
  780. package/dist/server/src/camera/sensors/types.js.map +1 -0
  781. package/dist/server/src/camera/streaming/fmp4-session.d.ts +10 -12
  782. package/dist/server/src/camera/streaming/fmp4-session.js +162 -268
  783. package/dist/server/src/camera/streaming/fmp4-session.js.map +1 -1
  784. package/dist/server/src/camera/streaming/rtp-session.d.ts +19 -0
  785. package/dist/server/src/camera/streaming/rtp-session.js +363 -0
  786. package/dist/server/src/camera/streaming/rtp-session.js.map +1 -0
  787. package/dist/server/src/camera/utils/filter.d.ts +6 -0
  788. package/dist/server/src/camera/utils/filter.js +83 -0
  789. package/dist/server/src/camera/utils/filter.js.map +1 -0
  790. package/dist/server/src/camera/utils.d.ts +2 -7
  791. package/dist/server/src/camera/utils.js +53 -194
  792. package/dist/server/src/camera/utils.js.map +1 -1
  793. package/dist/server/src/go2rtc/api/index.d.ts +16 -0
  794. package/dist/server/src/go2rtc/api/index.js +33 -0
  795. package/dist/server/src/go2rtc/api/index.js.map +1 -0
  796. package/dist/server/src/go2rtc/api/instance.d.ts +7 -0
  797. package/dist/server/src/go2rtc/api/instance.js +49 -0
  798. package/dist/server/src/go2rtc/api/instance.js.map +1 -0
  799. package/dist/server/src/go2rtc/api/manager.d.ts +11 -0
  800. package/dist/server/src/go2rtc/api/manager.js +38 -0
  801. package/dist/server/src/go2rtc/api/manager.js.map +1 -0
  802. package/dist/server/src/go2rtc/api/routes/application.d.ts +9 -0
  803. package/dist/server/src/go2rtc/api/routes/application.js +40 -0
  804. package/dist/server/src/go2rtc/api/routes/application.js.map +1 -0
  805. package/dist/server/src/go2rtc/api/routes/config.d.ts +8 -0
  806. package/dist/server/src/go2rtc/api/routes/config.js +42 -0
  807. package/dist/server/src/go2rtc/api/routes/config.js.map +1 -0
  808. package/dist/server/src/go2rtc/api/routes/discover.d.ts +30 -0
  809. package/dist/server/src/go2rtc/api/routes/discover.js +158 -0
  810. package/dist/server/src/go2rtc/api/routes/discover.js.map +1 -0
  811. package/dist/server/src/go2rtc/api/routes/snapshot.d.ts +8 -0
  812. package/dist/server/src/go2rtc/api/routes/snapshot.js +34 -0
  813. package/dist/server/src/go2rtc/api/routes/snapshot.js.map +1 -0
  814. package/dist/server/src/go2rtc/api/routes/streams.d.ts +18 -0
  815. package/dist/server/src/go2rtc/api/routes/streams.js +161 -0
  816. package/dist/server/src/go2rtc/api/routes/streams.js.map +1 -0
  817. package/dist/server/src/go2rtc/index.d.ts +7 -2
  818. package/dist/server/src/go2rtc/index.js +52 -30
  819. package/dist/server/src/go2rtc/index.js.map +1 -1
  820. package/dist/server/src/go2rtc/types.d.ts +167 -1
  821. package/dist/server/src/go2rtc/types.js +3 -0
  822. package/dist/server/src/go2rtc/types.js.map +1 -1
  823. package/dist/server/src/internal-bus.d.ts +41 -0
  824. package/dist/server/src/internal-bus.js +19 -0
  825. package/dist/server/src/internal-bus.js.map +1 -0
  826. package/dist/server/src/main.d.ts +8 -2
  827. package/dist/server/src/main.js +110 -21
  828. package/dist/server/src/main.js.map +1 -1
  829. package/dist/server/src/manager/coreManager.d.ts +12 -9
  830. package/dist/server/src/manager/coreManager.js +45 -48
  831. package/dist/server/src/manager/coreManager.js.map +1 -1
  832. package/dist/server/src/manager/deviceManager.d.ts +10 -8
  833. package/dist/server/src/manager/deviceManager.js +31 -96
  834. package/dist/server/src/manager/deviceManager.js.map +1 -1
  835. package/dist/server/src/manager/discoveryManager.d.ts +73 -0
  836. package/dist/server/src/manager/discoveryManager.js +800 -0
  837. package/dist/server/src/manager/discoveryManager.js.map +1 -0
  838. package/dist/server/src/manager/downloadManager.d.ts +27 -0
  839. package/dist/server/src/manager/downloadManager.js +353 -0
  840. package/dist/server/src/manager/downloadManager.js.map +1 -0
  841. package/dist/server/src/manager/notificationManager.d.ts +37 -0
  842. package/dist/server/src/manager/notificationManager.js +334 -0
  843. package/dist/server/src/manager/notificationManager.js.map +1 -0
  844. package/dist/server/src/manager/terminalManager.d.ts +27 -0
  845. package/dist/server/src/manager/terminalManager.js +239 -0
  846. package/dist/server/src/manager/terminalManager.js.map +1 -0
  847. package/dist/server/src/manager/types.d.ts +39 -14
  848. package/dist/server/src/manager/types.js +12 -1
  849. package/dist/server/src/manager/types.js.map +1 -1
  850. package/dist/server/src/plugins/index.d.ts +9 -6
  851. package/dist/server/src/plugins/index.js +69 -52
  852. package/dist/server/src/plugins/index.js.map +1 -1
  853. package/dist/server/src/plugins/plugin.d.ts +16 -16
  854. package/dist/server/src/plugins/plugin.js +42 -36
  855. package/dist/server/src/plugins/plugin.js.map +1 -1
  856. package/dist/server/src/plugins/runtime/base.d.ts +5 -14
  857. package/dist/server/src/plugins/runtime/base.js +46 -111
  858. package/dist/server/src/plugins/runtime/base.js.map +1 -1
  859. package/dist/server/src/plugins/runtime/go/index.d.ts +7 -0
  860. package/dist/server/src/plugins/runtime/go/index.js +110 -0
  861. package/dist/server/src/plugins/runtime/go/index.js.map +1 -0
  862. package/dist/server/src/plugins/runtime/index.js +5 -1
  863. package/dist/server/src/plugins/runtime/index.js.map +1 -1
  864. package/dist/server/src/plugins/runtime/node/child.d.ts +7 -6
  865. package/dist/server/src/plugins/runtime/node/child.js +70 -38
  866. package/dist/server/src/plugins/runtime/node/child.js.map +1 -1
  867. package/dist/server/src/plugins/runtime/node/index.d.ts +1 -0
  868. package/dist/server/src/plugins/runtime/node/index.js +31 -5
  869. package/dist/server/src/plugins/runtime/node/index.js.map +1 -1
  870. package/dist/server/src/plugins/runtime/node/pluginApi.d.ts +9 -6
  871. package/dist/server/src/plugins/runtime/node/pluginApi.js +10 -4
  872. package/dist/server/src/plugins/runtime/node/pluginApi.js.map +1 -1
  873. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.d.ts +27 -15
  874. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js +312 -173
  875. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js.map +1 -1
  876. package/dist/server/src/plugins/runtime/node/proxy/coreManager.d.ts +7 -10
  877. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js +28 -43
  878. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js.map +1 -1
  879. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.d.ts +7 -11
  880. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.js +40 -57
  881. package/dist/server/src/plugins/runtime/node/proxy/deviceManager.js.map +1 -1
  882. package/dist/server/src/plugins/runtime/node/proxy/downloadManager.d.ts +9 -0
  883. package/dist/server/src/plugins/runtime/node/proxy/downloadManager.js +22 -0
  884. package/dist/server/src/plugins/runtime/node/proxy/downloadManager.js.map +1 -0
  885. package/dist/server/src/plugins/runtime/node/proxy/notificationManager.d.ts +7 -0
  886. package/dist/server/src/plugins/runtime/node/proxy/notificationManager.js +20 -0
  887. package/dist/server/src/plugins/runtime/node/proxy/notificationManager.js.map +1 -0
  888. package/dist/server/src/plugins/runtime/node/proxy/sensor.d.ts +45 -0
  889. package/dist/server/src/plugins/runtime/node/proxy/sensor.js +149 -0
  890. package/dist/server/src/plugins/runtime/node/proxy/sensor.js.map +1 -0
  891. package/dist/server/src/plugins/runtime/node/storage.d.ts +6 -11
  892. package/dist/server/src/plugins/runtime/node/storage.js +69 -46
  893. package/dist/server/src/plugins/runtime/node/storage.js.map +1 -1
  894. package/dist/server/src/plugins/runtime/node/storageController.d.ts +10 -7
  895. package/dist/server/src/plugins/runtime/node/storageController.js +57 -17
  896. package/dist/server/src/plugins/runtime/node/storageController.js.map +1 -1
  897. package/dist/server/src/plugins/runtime/python/camera/utils.py +105 -0
  898. package/dist/server/src/plugins/runtime/python/child.py +108 -68
  899. package/dist/server/src/plugins/runtime/python/index.js.map +1 -1
  900. package/dist/server/src/plugins/runtime/python/namespaces.py +155 -60
  901. package/dist/server/src/plugins/runtime/python/plugin_api.py +72 -6
  902. package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +592 -1522
  903. package/dist/server/src/plugins/runtime/python/proxy/core_manager.py +75 -76
  904. package/dist/server/src/plugins/runtime/python/proxy/device_manager.py +81 -93
  905. package/dist/server/src/plugins/runtime/python/proxy/download_manager.py +33 -0
  906. package/dist/server/src/plugins/runtime/python/proxy/notification_manager.py +31 -0
  907. package/dist/server/src/plugins/runtime/python/proxy/sensor.py +169 -0
  908. package/dist/server/src/plugins/runtime/python/rpc/typings.py +56 -0
  909. package/dist/server/src/plugins/runtime/python/schema.py +54 -19
  910. package/dist/server/src/plugins/runtime/python/storage.py +84 -66
  911. package/dist/server/src/plugins/runtime/python/storage_controller.py +132 -38
  912. package/dist/server/src/plugins/runtime/python/typings.py +78 -152
  913. package/dist/server/src/plugins/schema.d.ts +27 -26
  914. package/dist/server/src/plugins/schema.js +183 -103
  915. package/dist/server/src/plugins/schema.js.map +1 -1
  916. package/dist/server/src/plugins/types.d.ts +2 -14
  917. package/dist/server/src/plugins/types.js +0 -1
  918. package/dist/server/src/plugins/types.js.map +1 -1
  919. package/dist/server/src/plugins/worker.d.ts +7 -7
  920. package/dist/server/src/plugins/worker.js +37 -26
  921. package/dist/server/src/plugins/worker.js.map +1 -1
  922. package/dist/server/src/remote/api/credentialStore.d.ts +18 -0
  923. package/dist/server/src/remote/api/credentialStore.js +101 -0
  924. package/dist/server/src/remote/api/credentialStore.js.map +1 -0
  925. package/dist/server/src/remote/api/index.d.ts +9 -0
  926. package/dist/server/src/remote/api/index.js +16 -0
  927. package/dist/server/src/remote/api/index.js.map +1 -0
  928. package/dist/server/src/remote/api/instance.d.ts +9 -0
  929. package/dist/server/src/remote/api/instance.js +44 -0
  930. package/dist/server/src/remote/api/instance.js.map +1 -0
  931. package/dist/server/src/remote/api/routes/oauth.d.ts +23 -0
  932. package/dist/server/src/remote/api/routes/oauth.js +79 -0
  933. package/dist/server/src/remote/api/routes/oauth.js.map +1 -0
  934. package/dist/server/src/remote/api/routes/server.d.ts +20 -0
  935. package/dist/server/src/remote/api/routes/server.js +58 -0
  936. package/dist/server/src/remote/api/routes/server.js.map +1 -0
  937. package/dist/server/src/remote/index.d.ts +25 -0
  938. package/dist/server/src/remote/index.js +70 -0
  939. package/dist/server/src/remote/index.js.map +1 -0
  940. package/dist/server/src/remote/push.d.ts +15 -0
  941. package/dist/server/src/remote/push.js +85 -0
  942. package/dist/server/src/remote/push.js.map +1 -0
  943. package/dist/server/src/remote/services/cloudflare-managed.d.ts +42 -0
  944. package/dist/server/src/remote/services/cloudflare-managed.js +284 -0
  945. package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -0
  946. package/dist/server/src/remote/services/cloudflare.d.ts +38 -0
  947. package/dist/server/src/remote/services/cloudflare.js +232 -0
  948. package/dist/server/src/remote/services/cloudflare.js.map +1 -0
  949. package/dist/server/src/remote/services/customDomain.d.ts +9 -0
  950. package/dist/server/src/remote/services/customDomain.js +40 -0
  951. package/dist/server/src/remote/services/customDomain.js.map +1 -0
  952. package/dist/server/src/remote/services/index.d.ts +43 -0
  953. package/dist/server/src/remote/services/index.js +285 -0
  954. package/dist/server/src/remote/services/index.js.map +1 -0
  955. package/dist/server/src/remote/services/upnp.js +2 -0
  956. package/dist/server/src/remote/services/upnp.js.map +1 -0
  957. package/dist/server/src/remote/tunnel/client.d.ts +38 -0
  958. package/dist/server/src/remote/tunnel/client.js +241 -0
  959. package/dist/server/src/remote/tunnel/client.js.map +1 -0
  960. package/dist/server/src/remote/tunnel/index.d.ts +15 -0
  961. package/dist/server/src/remote/tunnel/index.js +68 -0
  962. package/dist/server/src/remote/tunnel/index.js.map +1 -0
  963. package/dist/server/src/remote/types.d.ts +31 -0
  964. package/dist/server/src/remote/types.js +2 -0
  965. package/dist/server/src/remote/types.js.map +1 -0
  966. package/dist/server/src/rpc/index.d.ts +24 -25
  967. package/dist/server/src/rpc/index.js +93 -77
  968. package/dist/server/src/rpc/index.js.map +1 -1
  969. package/dist/server/src/rpc/interfaces/config.d.ts +74 -0
  970. package/dist/server/src/rpc/interfaces/config.js +2 -0
  971. package/dist/server/src/rpc/interfaces/config.js.map +1 -0
  972. package/dist/server/src/rpc/interfaces/core.d.ts +25 -0
  973. package/dist/server/src/rpc/interfaces/core.js +2 -0
  974. package/dist/server/src/rpc/interfaces/core.js.map +1 -0
  975. package/dist/server/src/rpc/interfaces/detection.d.ts +70 -0
  976. package/dist/server/src/rpc/interfaces/detection.js +2 -0
  977. package/dist/server/src/rpc/interfaces/detection.js.map +1 -0
  978. package/dist/server/src/rpc/interfaces/device.d.ts +62 -0
  979. package/dist/server/src/rpc/interfaces/device.js +2 -0
  980. package/dist/server/src/rpc/interfaces/device.js.map +1 -0
  981. package/dist/server/src/rpc/interfaces/discovery.d.ts +46 -0
  982. package/dist/server/src/rpc/interfaces/discovery.js +2 -0
  983. package/dist/server/src/rpc/interfaces/discovery.js.map +1 -0
  984. package/dist/server/src/rpc/interfaces/download.d.ts +22 -0
  985. package/dist/server/src/rpc/interfaces/download.js +2 -0
  986. package/dist/server/src/rpc/interfaces/download.js.map +1 -0
  987. package/dist/server/src/rpc/interfaces/frameworker.d.ts +12 -0
  988. package/dist/server/src/rpc/interfaces/frameworker.js +2 -0
  989. package/dist/server/src/rpc/interfaces/frameworker.js.map +1 -0
  990. package/dist/server/src/rpc/interfaces/notification.d.ts +6 -0
  991. package/dist/server/src/rpc/interfaces/notification.js +2 -0
  992. package/dist/server/src/rpc/interfaces/notification.js.map +1 -0
  993. package/dist/server/src/rpc/interfaces/sensor.d.ts +75 -0
  994. package/dist/server/src/rpc/interfaces/sensor.js +2 -0
  995. package/dist/server/src/rpc/interfaces/sensor.js.map +1 -0
  996. package/dist/server/src/rpc/interfaces/terminal.d.ts +34 -0
  997. package/dist/server/src/rpc/interfaces/terminal.js +2 -0
  998. package/dist/server/src/rpc/interfaces/terminal.js.map +1 -0
  999. package/dist/server/src/rpc/namespaces.d.ts +50 -2
  1000. package/dist/server/src/rpc/namespaces.js +70 -4
  1001. package/dist/server/src/rpc/namespaces.js.map +1 -1
  1002. package/dist/server/src/rpc/server.d.ts +22 -3
  1003. package/dist/server/src/rpc/server.js +110 -37
  1004. package/dist/server/src/rpc/server.js.map +1 -1
  1005. package/dist/server/src/rpc/utils.d.ts +2 -1
  1006. package/dist/server/src/rpc/utils.js +8 -0
  1007. package/dist/server/src/rpc/utils.js.map +1 -1
  1008. package/dist/server/src/services/config/constants.d.ts +7 -1
  1009. package/dist/server/src/services/config/constants.js +17 -2
  1010. package/dist/server/src/services/config/constants.js.map +1 -1
  1011. package/dist/server/src/services/config/defaults.js +3 -3
  1012. package/dist/server/src/services/config/defaults.js.map +1 -1
  1013. package/dist/server/src/services/config/index.d.ts +6 -43
  1014. package/dist/server/src/services/config/index.js +56 -108
  1015. package/dist/server/src/services/config/index.js.map +1 -1
  1016. package/dist/server/src/services/config/types.d.ts +14 -2
  1017. package/dist/server/src/services/config/types.js.map +1 -1
  1018. package/dist/server/src/services/logger/index.d.ts +13 -11
  1019. package/dist/server/src/services/logger/index.js +47 -50
  1020. package/dist/server/src/services/logger/index.js.map +1 -1
  1021. package/dist/server/src/services/logger/logManager.d.ts +35 -0
  1022. package/dist/server/src/services/logger/logManager.js +196 -0
  1023. package/dist/server/src/services/logger/logManager.js.map +1 -0
  1024. package/dist/server/src/services/logger/transports/fileTransport.d.ts +34 -0
  1025. package/dist/server/src/services/logger/transports/fileTransport.js +152 -0
  1026. package/dist/server/src/services/logger/transports/fileTransport.js.map +1 -0
  1027. package/dist/server/src/services/logger/transports/index.d.ts +1 -0
  1028. package/dist/server/src/services/logger/transports/index.js +2 -0
  1029. package/dist/server/src/services/logger/transports/index.js.map +1 -0
  1030. package/dist/server/src/types.d.ts +3 -0
  1031. package/dist/server/src/utils/camera.d.ts +4 -0
  1032. package/dist/server/src/utils/camera.js +79 -0
  1033. package/dist/server/src/utils/camera.js.map +1 -0
  1034. package/dist/server/src/utils/env.js +8 -0
  1035. package/dist/server/src/utils/env.js.map +1 -0
  1036. package/dist/server/src/utils/ipc.d.ts +1 -1
  1037. package/dist/server/src/utils/ipc.js +2 -2
  1038. package/dist/server/src/utils/ipc.js.map +1 -1
  1039. package/dist/server/src/utils/path.js +3 -3
  1040. package/dist/server/src/utils/path.js.map +1 -1
  1041. package/dist/server/src/utils/pythonInstaller.d.ts +2 -1
  1042. package/dist/server/src/utils/pythonInstaller.js +6 -6
  1043. package/dist/server/src/utils/pythonInstaller.js.map +1 -1
  1044. package/dist/server/src/workers/agent.d.ts +27 -0
  1045. package/dist/server/src/workers/agent.js +161 -0
  1046. package/dist/server/src/workers/agent.js.map +1 -0
  1047. package/dist/server/src/workers/capabilities/frame-decoding.d.ts +24 -0
  1048. package/dist/server/src/workers/capabilities/frame-decoding.js +180 -0
  1049. package/dist/server/src/workers/capabilities/frame-decoding.js.map +1 -0
  1050. package/dist/server/src/workers/capabilities/handler.d.ts +8 -0
  1051. package/dist/server/src/workers/capabilities/handler.js +2 -0
  1052. package/dist/server/src/workers/capabilities/handler.js.map +1 -0
  1053. package/dist/server/src/workers/manager.d.ts +31 -0
  1054. package/dist/server/src/workers/manager.js +260 -0
  1055. package/dist/server/src/workers/manager.js.map +1 -0
  1056. package/dist/server/src/workers/types.d.ts +59 -0
  1057. package/dist/server/src/workers/types.js +5 -0
  1058. package/dist/server/src/workers/types.js.map +1 -0
  1059. package/package.json +85 -84
  1060. package/dist/interface/assets/@xterm.DYP7pi_n.0.0.70.css +0 -32
  1061. package/dist/interface/assets/Adminpanel.BKek2EMH.0.0.70.css +0 -1
  1062. package/dist/interface/assets/Cameras.BDWZJqPN.0.0.70.css +0 -1
  1063. package/dist/interface/assets/Camview.Cvhuou6V.0.0.70.css +0 -1
  1064. package/dist/interface/assets/CuiConsole.DCYyxdVg.0.0.70.css +0 -1
  1065. package/dist/interface/assets/CuiPluginCard.yF8V0SZY.0.0.70.css +0 -1
  1066. package/dist/interface/assets/CuiTimeline.BkIwlYtw.0.0.70.css +0 -1
  1067. package/dist/interface/assets/Plugin.DJElsAn5.0.0.70.css +0 -1
  1068. package/dist/interface/assets/Plugins.BwPlcRrV.0.0.70.css +0 -1
  1069. package/dist/interface/assets/Settings.CkgfRkQr.0.0.70.css +0 -1
  1070. package/dist/interface/assets/SettingsAccount.CDZT7gN-.0.0.70.css +0 -1
  1071. package/dist/interface/assets/highlight.Ch2EwETz.0.0.70.css +0 -1
  1072. package/dist/interface/assets/main.BmO7mnW4.0.0.70.css +0 -1
  1073. package/dist/interface/assets/worker-base.jEXLGV2h.0.0.70.js +0 -1332
  1074. package/dist/interface/assets/worker-yaml.B3uUYINB.0.0.70.js +0 -5819
  1075. package/dist/interface/js/@babel.l0sNRNKZ.0.0.70.js +0 -1
  1076. package/dist/interface/js/@intlify.6ljJeWIl.0.0.70.js +0 -15
  1077. package/dist/interface/js/@kurkle.D8fDXNIl.0.0.70.js +0 -6
  1078. package/dist/interface/js/@primeuix.bRNqZjQz.0.0.70.js +0 -5889
  1079. package/dist/interface/js/@primevue.DH9ak_9x.0.0.70.js +0 -57
  1080. package/dist/interface/js/@react-dnd.CcwRs9xb.0.0.70.js +0 -1
  1081. package/dist/interface/js/@socket.io.Dkula2eQ.0.0.70.js +0 -1
  1082. package/dist/interface/js/@tanstack.Dk2rc1Gz.0.0.70.js +0 -1
  1083. package/dist/interface/js/@vee-validate.i4o6WINE.0.0.70.js +0 -5
  1084. package/dist/interface/js/@vue.BsSvBeCe.0.0.70.js +0 -17
  1085. package/dist/interface/js/@vueuse.T3qy5Jq4.0.0.70.js +0 -1
  1086. package/dist/interface/js/@xterm.CJZZM5vf.0.0.70.js +0 -66
  1087. package/dist/interface/js/Adminpanel.CBQfnvy1.0.0.70.js +0 -1
  1088. package/dist/interface/js/Camera.D39v2Qae.0.0.70.js +0 -1
  1089. package/dist/interface/js/Cameras.BOXzVzD9.0.0.70.js +0 -482
  1090. package/dist/interface/js/Cammesh.bs93Or8F.0.0.70.js +0 -1
  1091. package/dist/interface/js/Camview.R2Zpw-wS.0.0.70.js +0 -1
  1092. package/dist/interface/js/Config.D89tTvo2.0.0.70.js +0 -2
  1093. package/dist/interface/js/Console.DX4_ZVPM.0.0.70.js +0 -4
  1094. package/dist/interface/js/CuiConsole.B-YJZ4uY.0.0.70.js +0 -1
  1095. package/dist/interface/js/CuiPluginCard.CFaLdBEf.0.0.70.js +0 -4
  1096. package/dist/interface/js/CuiTimeline.DbPA3XCf.0.0.70.js +0 -1
  1097. package/dist/interface/js/FirstSteps.BjUQYXwF.0.0.70.js +0 -1
  1098. package/dist/interface/js/Plugin.Dl21oK_u.0.0.70.js +0 -1
  1099. package/dist/interface/js/Plugins.DphA9uPk.0.0.70.js +0 -1
  1100. package/dist/interface/js/Recordings.B2b7JutC.0.0.70.js +0 -1
  1101. package/dist/interface/js/Settings.D_hL6kBb.0.0.70.js +0 -1
  1102. package/dist/interface/js/SettingsAccount.2ETTD3p8.0.0.70.js +0 -1
  1103. package/dist/interface/js/SettingsAppearance.DkI9GlMu.0.0.70.js +0 -1
  1104. package/dist/interface/js/SettingsAppearance.vue_vue_type_script_setup_true_lang.D6sykhe2.0.0.70.js +0 -1
  1105. package/dist/interface/js/SettingsBackup.Ce3e31yn.0.0.70.js +0 -1
  1106. package/dist/interface/js/SettingsRecordings.C_hEpi6y.0.0.70.js +0 -1
  1107. package/dist/interface/js/SettingsRemote.BDp_l894.0.0.70.js +0 -1
  1108. package/dist/interface/js/SettingsSystem.CFjS9i7G.0.0.70.js +0 -1
  1109. package/dist/interface/js/SettingsUsers.BpTad4f8.0.0.70.js +0 -1
  1110. package/dist/interface/js/VersionsHandler.vue_vue_type_script_setup_true_lang.MC8r914h.0.0.70.js +0 -4
  1111. package/dist/interface/js/ace-builds.DPRnfcwI.0.0.70.js +0 -1091
  1112. package/dist/interface/js/ace.config.DReCZ4VN.0.0.70.js +0 -1
  1113. package/dist/interface/js/axios.lj9VQs0f.0.0.70.js +0 -6
  1114. package/dist/interface/js/backup.CqN-DI7C.0.0.70.js +0 -1
  1115. package/dist/interface/js/birpc.l0sNRNKZ.0.0.70.js +0 -1
  1116. package/dist/interface/js/chart.js.B5ohq2tj.0.0.70.js +0 -13
  1117. package/dist/interface/js/close-circle.CMnO5OKl.0.0.70.js +0 -1
  1118. package/dist/interface/js/compare-versions.DqEOhma6.0.0.70.js +0 -1
  1119. package/dist/interface/js/dijkstrajs.C00ieaqj.0.0.70.js +0 -1
  1120. package/dist/interface/js/dnd-core.DuFbUDJC.0.0.70.js +0 -1
  1121. package/dist/interface/js/draggabilly.Cuzjcd7v.0.0.70.js +0 -6
  1122. package/dist/interface/js/engine.io-client.CnosWdRP.0.0.70.js +0 -1
  1123. package/dist/interface/js/engine.io-parser.BiEtp6m2.0.0.70.js +0 -1
  1124. package/dist/interface/js/entities.C20TfXL6.0.0.70.js +0 -1
  1125. package/dist/interface/js/ev-emitter.X5f1qa-c.0.0.70.js +0 -1
  1126. package/dist/interface/js/fast-deep-equal.D0g7BF3f.0.0.70.js +0 -1
  1127. package/dist/interface/js/get-size.D1dS-IaP.0.0.70.js +0 -5
  1128. package/dist/interface/js/highlight.js.DTPofZhc.0.0.70.js +0 -3
  1129. package/dist/interface/js/hookable.l0sNRNKZ.0.0.70.js +0 -1
  1130. package/dist/interface/js/linkify-it.imhCvGRq.0.0.70.js +0 -1
  1131. package/dist/interface/js/main.D2NZuTnM.0.0.70.js +0 -31
  1132. package/dist/interface/js/markdown-it.VQvmcJVu.0.0.70.js +0 -15
  1133. package/dist/interface/js/mdurl.k9Sl0PQj.0.0.70.js +0 -2
  1134. package/dist/interface/js/nprogress.DuNJBXnf.0.0.70.js +0 -2
  1135. package/dist/interface/js/perfect-debounce.l0sNRNKZ.0.0.70.js +0 -1
  1136. package/dist/interface/js/pinia.BeBGFuqK.0.0.70.js +0 -5
  1137. package/dist/interface/js/primelocale.Bga3dOQu.0.0.70.js +0 -1
  1138. package/dist/interface/js/primevue.BVVo-ukB.0.0.70.js +0 -142
  1139. package/dist/interface/js/punycode.js.Dj65hjkv.0.0.70.js +0 -1
  1140. package/dist/interface/js/qrcode.D7KqKQTM.0.0.70.js +0 -8
  1141. package/dist/interface/js/react-dnd-html5-backend.1HQjlkwI.0.0.70.js +0 -2
  1142. package/dist/interface/js/react-dnd-touch-backend.4hAOsMRp.0.0.70.js +0 -1
  1143. package/dist/interface/js/redux.BFxtlG_c.0.0.70.js +0 -1
  1144. package/dist/interface/js/refresh-rounded.BzWz29y2.0.0.70.js +0 -1
  1145. package/dist/interface/js/rxjs.UbFxmZ7q.0.0.70.js +0 -3
  1146. package/dist/interface/js/socket.io-client.DC_wUGxw.0.0.70.js +0 -1
  1147. package/dist/interface/js/socket.io-parser.ChgZ8FD_.0.0.70.js +0 -1
  1148. package/dist/interface/js/system.Ccn9lMgI.0.0.70.js +0 -1
  1149. package/dist/interface/js/trash-fill.C8ZgD-Jz.0.0.70.js +0 -1
  1150. package/dist/interface/js/tslib.9k7AwCpt.0.0.70.js +0 -1
  1151. package/dist/interface/js/uc.micro.kMc2yuuw.0.0.70.js +0 -1
  1152. package/dist/interface/js/unidragger.DahEY3cm.0.0.70.js +0 -5
  1153. package/dist/interface/js/uuid.C6aID195.0.0.70.js +0 -1
  1154. package/dist/interface/js/vee-validate.DwwGVNzx.0.0.70.js +0 -5
  1155. package/dist/interface/js/vue-chartjs.KCIQuea5.0.0.70.js +0 -1
  1156. package/dist/interface/js/vue-i18n.BLwVbi61.0.0.70.js +0 -5
  1157. package/dist/interface/js/vue-inline-svg.B52C1cW8.0.0.70.js +0 -1
  1158. package/dist/interface/js/vue-router.BQuUBAAr.0.0.70.js +0 -5
  1159. package/dist/interface/js/vue-zoomable.Cq7IVJt5.0.0.70.js +0 -1
  1160. package/dist/interface/js/vue.l0sNRNKZ.0.0.70.js +0 -1
  1161. package/dist/interface/js/vue3-dnd.2Dj_EakH.0.0.70.js +0 -1
  1162. package/dist/interface/js/zod.2bfLsWMZ.0.0.70.js +0 -1
  1163. package/dist/interface/js/zoom-out.D4ga9c-w.0.0.70.js +0 -1
  1164. package/dist/interface/registerSW.js +0 -1
  1165. package/dist/interface/workbox-5ffe50d4.js +0 -1
  1166. package/dist/server/src/_camera_ui_tools/camera_ui_common/camera_utils/utils.py +0 -52
  1167. package/dist/server/src/_camera_ui_tools/camera_ui_common/logger_service/test.py +0 -116
  1168. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/__init__.py +0 -350
  1169. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/__init__.py +0 -0
  1170. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/base.py +0 -237
  1171. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/client.py +0 -256
  1172. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/connection.py +0 -784
  1173. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/errors.py +0 -745
  1174. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/messaging.py +0 -57
  1175. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/rpc.py +0 -227
  1176. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/base/rpc_generator.py +0 -584
  1177. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/constants.py +0 -96
  1178. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/typings.py +0 -218
  1179. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/__init__.py +0 -0
  1180. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/connection_state.py +0 -86
  1181. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/logger.py +0 -30
  1182. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/metrics.py +0 -152
  1183. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/packer.py +0 -20
  1184. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/routing.py +0 -75
  1185. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/rpc.py +0 -177
  1186. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/subscriptions.py +0 -24
  1187. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/tasks.py +0 -39
  1188. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/uid.py +0 -37
  1189. package/dist/server/src/_camera_ui_tools/camera_ui_rpc_client/utils/validate.py +0 -119
  1190. package/dist/server/src/_camera_ui_tools/camera_ui_types/__init__.py +0 -1369
  1191. package/dist/server/src/_camera_ui_tools/camera_ui_types/hybrid_observer.py +0 -338
  1192. package/dist/server/src/_camera_ui_tools/camera_ui_types/test.py +0 -196
  1193. package/dist/server/src/api/controllers/system.controller.d.ts +0 -24
  1194. package/dist/server/src/api/controllers/system.controller.js +0 -235
  1195. package/dist/server/src/api/controllers/system.controller.js.map +0 -1
  1196. package/dist/server/src/api/go2rtc/api/application.d.ts +0 -9
  1197. package/dist/server/src/api/go2rtc/api/application.js +0 -39
  1198. package/dist/server/src/api/go2rtc/api/application.js.map +0 -1
  1199. package/dist/server/src/api/go2rtc/api/config.d.ts +0 -8
  1200. package/dist/server/src/api/go2rtc/api/config.js +0 -44
  1201. package/dist/server/src/api/go2rtc/api/config.js.map +0 -1
  1202. package/dist/server/src/api/go2rtc/api/discover.d.ts +0 -30
  1203. package/dist/server/src/api/go2rtc/api/discover.js +0 -162
  1204. package/dist/server/src/api/go2rtc/api/discover.js.map +0 -1
  1205. package/dist/server/src/api/go2rtc/api/index.d.ts +0 -1
  1206. package/dist/server/src/api/go2rtc/api/index.js +0 -42
  1207. package/dist/server/src/api/go2rtc/api/index.js.map +0 -1
  1208. package/dist/server/src/api/go2rtc/api/snapshot.d.ts +0 -8
  1209. package/dist/server/src/api/go2rtc/api/snapshot.js +0 -34
  1210. package/dist/server/src/api/go2rtc/api/snapshot.js.map +0 -1
  1211. package/dist/server/src/api/go2rtc/api/streams.d.ts +0 -20
  1212. package/dist/server/src/api/go2rtc/api/streams.js +0 -190
  1213. package/dist/server/src/api/go2rtc/api/streams.js.map +0 -1
  1214. package/dist/server/src/api/go2rtc/index.d.ts +0 -16
  1215. package/dist/server/src/api/go2rtc/index.js +0 -33
  1216. package/dist/server/src/api/go2rtc/index.js.map +0 -1
  1217. package/dist/server/src/api/go2rtc/queue.d.ts +0 -10
  1218. package/dist/server/src/api/go2rtc/queue.js +0 -38
  1219. package/dist/server/src/api/go2rtc/queue.js.map +0 -1
  1220. package/dist/server/src/api/go2rtc/types.d.ts +0 -151
  1221. package/dist/server/src/api/go2rtc/types.js.map +0 -1
  1222. package/dist/server/src/api/routes/system.routes.d.ts +0 -2
  1223. package/dist/server/src/api/routes/system.routes.js +0 -86
  1224. package/dist/server/src/api/routes/system.routes.js.map +0 -1
  1225. package/dist/server/src/api/schemas/system.schema.d.ts +0 -185
  1226. package/dist/server/src/api/schemas/system.schema.js +0 -40
  1227. package/dist/server/src/api/schemas/system.schema.js.map +0 -1
  1228. package/dist/server/src/api/services/system.service.d.ts +0 -13
  1229. package/dist/server/src/api/services/system.service.js +0 -63
  1230. package/dist/server/src/api/services/system.service.js.map +0 -1
  1231. package/dist/server/src/camera/classes.d.ts +0 -2
  1232. package/dist/server/src/camera/classes.js +0 -24
  1233. package/dist/server/src/camera/classes.js.map +0 -1
  1234. package/dist/server/src/camera/device.d.ts +0 -34
  1235. package/dist/server/src/camera/device.js +0 -327
  1236. package/dist/server/src/camera/device.js.map +0 -1
  1237. package/dist/server/src/camera/frameWorker.d.ts +0 -46
  1238. package/dist/server/src/camera/frameWorker.js +0 -347
  1239. package/dist/server/src/camera/frameWorker.js.map +0 -1
  1240. package/dist/server/src/camera/interfaces.d.ts +0 -17
  1241. package/dist/server/src/camera/interfaces.js +0 -99
  1242. package/dist/server/src/camera/interfaces.js.map +0 -1
  1243. package/dist/server/src/camera/iou.d.ts +0 -2
  1244. package/dist/server/src/camera/iou.js +0 -122
  1245. package/dist/server/src/camera/iou.js.map +0 -1
  1246. package/dist/server/src/camera/polygon.d.ts +0 -4
  1247. package/dist/server/src/camera/polygon.js +0 -192
  1248. package/dist/server/src/camera/polygon.js.map +0 -1
  1249. package/dist/server/src/camera/python/__init__.py +0 -0
  1250. package/dist/server/src/camera/python/classes.py +0 -41
  1251. package/dist/server/src/camera/python/interfaces.py +0 -131
  1252. package/dist/server/src/camera/python/iou.py +0 -158
  1253. package/dist/server/src/camera/python/polygon.py +0 -230
  1254. package/dist/server/src/camera/python/typings.py +0 -50
  1255. package/dist/server/src/camera/python/video_frame.py +0 -143
  1256. package/dist/server/src/camera/streaming/peer-connection.d.ts +0 -26
  1257. package/dist/server/src/camera/streaming/peer-connection.js +0 -213
  1258. package/dist/server/src/camera/streaming/peer-connection.js.map +0 -1
  1259. package/dist/server/src/camera/streaming/rtsp-session.d.ts +0 -19
  1260. package/dist/server/src/camera/streaming/rtsp-session.js +0 -196
  1261. package/dist/server/src/camera/streaming/rtsp-session.js.map +0 -1
  1262. package/dist/server/src/camera/streaming/webrtc-connection.d.ts +0 -44
  1263. package/dist/server/src/camera/streaming/webrtc-connection.js +0 -177
  1264. package/dist/server/src/camera/streaming/webrtc-connection.js.map +0 -1
  1265. package/dist/server/src/camera/streaming/werift-session.d.ts +0 -19
  1266. package/dist/server/src/camera/streaming/werift-session.js +0 -246
  1267. package/dist/server/src/camera/streaming/werift-session.js.map +0 -1
  1268. package/dist/server/src/camera/types.d.ts +0 -17
  1269. package/dist/server/src/camera/types.js.map +0 -1
  1270. package/dist/server/src/camera/videoFrame.d.ts +0 -18
  1271. package/dist/server/src/camera/videoFrame.js +0 -88
  1272. package/dist/server/src/camera/videoFrame.js.map +0 -1
  1273. package/dist/server/src/cloud/index.d.ts +0 -12
  1274. package/dist/server/src/cloud/index.js +0 -49
  1275. package/dist/server/src/cloud/index.js.map +0 -1
  1276. package/dist/server/src/cloud/remote/cloudflare.d.ts +0 -7
  1277. package/dist/server/src/cloud/remote/cloudflare.js +0 -12
  1278. package/dist/server/src/cloud/remote/cloudflare.js.map +0 -1
  1279. package/dist/server/src/cloud/remote/upnp.d.ts +0 -7
  1280. package/dist/server/src/cloud/remote/upnp.js +0 -12
  1281. package/dist/server/src/cloud/remote/upnp.js.map +0 -1
  1282. package/dist/server/src/cloud/remote/utils.d.ts +0 -3
  1283. package/dist/server/src/cloud/remote/utils.js +0 -21
  1284. package/dist/server/src/cloud/remote/utils.js.map +0 -1
  1285. package/dist/server/src/cloud/types.d.ts +0 -15
  1286. package/dist/server/src/cloud/types.js +0 -11
  1287. package/dist/server/src/cloud/types.js.map +0 -1
  1288. package/dist/server/src/decoder/child.js +0 -748
  1289. package/dist/server/src/decoder/child.js.map +0 -1
  1290. package/dist/server/src/decoder/imageUtils.d.ts +0 -21
  1291. package/dist/server/src/decoder/imageUtils.js +0 -204
  1292. package/dist/server/src/decoder/imageUtils.js.map +0 -1
  1293. package/dist/server/src/decoder/manager.d.ts +0 -19
  1294. package/dist/server/src/decoder/manager.js +0 -208
  1295. package/dist/server/src/decoder/manager.js.map +0 -1
  1296. package/dist/server/src/decoder/python/__init__.py +0 -0
  1297. package/dist/server/src/decoder/python/child.py +0 -902
  1298. package/dist/server/src/decoder/python/image_utils.py +0 -196
  1299. package/dist/server/src/decoder/python/pool.py +0 -45
  1300. package/dist/server/src/decoder/python/typings.py +0 -57
  1301. package/dist/server/src/decoder/python/utils.py +0 -70
  1302. package/dist/server/src/decoder/types.d.ts +0 -23
  1303. package/dist/server/src/decoder/types.js.map +0 -1
  1304. package/dist/server/src/decoder/utils.d.ts +0 -13
  1305. package/dist/server/src/decoder/utils.js +0 -45
  1306. package/dist/server/src/decoder/utils.js.map +0 -1
  1307. package/dist/server/src/decoder/wasm/build/decoder.d.ts +0 -43
  1308. package/dist/server/src/decoder/wasm/build/decoder.js +0 -108
  1309. package/dist/server/src/decoder/wasm/build/decoder.wasm +0 -0
  1310. package/dist/server/src/decoder/worker.js +0 -79
  1311. package/dist/server/src/decoder/worker.js.map +0 -1
  1312. package/dist/server/src/plugins/runtime/node/plugin.d.ts +0 -24
  1313. package/dist/server/src/plugins/runtime/node/plugin.js +0 -128
  1314. package/dist/server/src/plugins/runtime/node/plugin.js.map +0 -1
  1315. package/dist/server/src/plugins/runtime/python/plugin.py +0 -155
  1316. package/dist/server/src/rpc/types.d.ts +0 -112
  1317. package/dist/server/src/rpc/types.js.map +0 -1
  1318. /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.70.css → SettingsBackup-CX0rT0QJ.css} +0 -0
  1319. /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.70.png → logo-256-BCQk9H1-.png} +0 -0
  1320. /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.70.png → logo-512-DLKVOU2S.png} +0 -0
  1321. /package/dist/interface/assets/{logo.DmEiRk0z.0.0.70.png → logo-DmEiRk0z.png} +0 -0
  1322. /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.70.js → mode-yaml-CIYL8U3d.js} +0 -0
  1323. /package/dist/server/src/api/{go2rtc → database/migrations}/types.js +0 -0
  1324. /package/dist/server/src/{camera → automations/actions}/types.js +0 -0
  1325. /package/dist/server/src/{decoder → automations/conditions}/types.js +0 -0
  1326. /package/dist/server/src/{rpc → automations/triggers}/types.js +0 -0
  1327. /package/dist/server/src/{decoder/child.d.ts → remote/services/upnp.d.ts} +0 -0
  1328. /package/dist/server/src/{decoder/worker.d.ts → utils/env.d.ts} +0 -0
@@ -1,66 +0,0 @@
1
- function ze(ae){return ae&&ae.__esModule&&Object.prototype.hasOwnProperty.call(ae,"default")?ae.default:ae}var be={exports:{}},De;function Fe(){return De||(De=1,function(ae,ve){(function(he,te){ae.exports=te()})(self,()=>(()=>{var he={};return(()=>{var te=he;Object.defineProperty(te,"__esModule",{value:!0}),te.FitAddon=void 0,te.FitAddon=class{activate(Y){this._terminal=Y}dispose(){}fit(){const Y=this.proposeDimensions();if(!Y||!this._terminal||isNaN(Y.cols)||isNaN(Y.rows))return;const oe=this._terminal._core;this._terminal.rows===Y.rows&&this._terminal.cols===Y.cols||(oe._renderService.clear(),this._terminal.resize(Y.cols,Y.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const Y=this._terminal._core,oe=Y._renderService.dimensions;if(oe.css.cell.width===0||oe.css.cell.height===0)return;const O=this._terminal.options.scrollback===0?0:Y.viewport.scrollBarWidth,t=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(t.getPropertyValue("height")),h=Math.max(0,parseInt(t.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),n=a-(parseInt(c.getPropertyValue("padding-top"))+parseInt(c.getPropertyValue("padding-bottom"))),l=h-(parseInt(c.getPropertyValue("padding-right"))+parseInt(c.getPropertyValue("padding-left")))-O;return{cols:Math.max(2,Math.floor(l/oe.css.cell.width)),rows:Math.max(1,Math.floor(n/oe.css.cell.height))}}}})(),he})())}(be)),be.exports}var je=Fe(),Se={exports:{}},He=Se.exports,Ae;function We(){return Ae||(Ae=1,function(ae,ve){(function(he,te){ae.exports=te()})(He,()=>(()=>{var he={433:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV11=void 0;const h=a(938),c=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],n=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],l=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],f=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let v;function o(e,r){let i,s=0,d=r.length-1;if(e<r[0][0]||e>r[d][1])return!1;for(;d>=s;)if(i=s+d>>1,e>r[i][1])s=i+1;else{if(!(e<r[i][0]))return!0;d=i-1}return!1}t.UnicodeV11=class{constructor(){if(this.version="11",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160);for(let e=0;e<c.length;++e)v.fill(0,c[e][0],c[e][1]+1);for(let e=0;e<l.length;++e)v.fill(2,l[e][0],l[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?v[e]:o(e,n)?0:o(e,f)?2:1}charProperties(e,r){let i=this.wcwidth(e),s=i===0&&r!==0;if(s){const d=h.UnicodeService.extractWidth(r);d===0?s=!1:d>i&&(i=d)}return h.UnicodeService.createPropertyValue(0,i,s)}}},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===a)return void this._listeners.splice(h,1)}}})),this._event}fire(a,h){const c=[];for(let n=0;n<this._listeners.length;n++)c.push(this._listeners[n]);for(let n=0;n<c.length;n++)c[n].call(void 0,a,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},t.forwardEvent=function(a,h){return a(c=>h.fire(c))},t.runAndSubscribe=function(a,h){return h(void 0),a(c=>h(c))}},490:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;const h=a(938),c=[[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]],n=[[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]];let l;t.UnicodeV6=class{constructor(){if(this.version="6",!l){l=new Uint8Array(65536),l.fill(1),l[0]=0,l.fill(0,1,32),l.fill(0,127,160),l.fill(2,4352,4448),l[9001]=2,l[9002]=2,l.fill(2,11904,42192),l[12351]=1,l.fill(2,44032,55204),l.fill(2,63744,64256),l.fill(2,65040,65050),l.fill(2,65072,65136),l.fill(2,65280,65377),l.fill(2,65504,65511);for(let f=0;f<c.length;++f)l.fill(0,c[f][0],c[f][1]+1)}}wcwidth(f){return f<32?0:f<127?1:f<65536?l[f]:function(v,o){let e,r=0,i=o.length-1;if(v<o[0][0]||v>o[i][1])return!1;for(;i>=r;)if(e=r+i>>1,v>o[e][1])r=e+1;else{if(!(v<o[e][0]))return!0;i=e-1}return!1}(f,n)?0:f>=131072&&f<=196605||f>=196608&&f<=262141?2:1}charProperties(f,v){let o=this.wcwidth(f),e=o===0&&v!==0;if(e){const r=h.UnicodeService.extractWidth(v);r===0?e=!1:r>o&&(o=r)}return h.UnicodeService.createPropertyValue(0,o,e)}}},938:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;const h=a(345),c=a(490);class n{static extractShouldJoin(f){return(1&f)!=0}static extractWidth(f){return f>>1&3}static extractCharKind(f){return f>>3}static createPropertyValue(f,v,o=!1){return(16777215&f)<<3|(3&v)<<1|(o?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const f=new c.UnicodeV6;this.register(f),this._active=f.version,this._activeProvider=f}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(f){if(!this._providers[f])throw new Error(`unknown Unicode version "${f}"`);this._active=f,this._activeProvider=this._providers[f],this._onChange.fire(f)}register(f){this._providers[f.version]=f}wcwidth(f){return this._activeProvider.wcwidth(f)}getStringCellWidth(f){let v=0,o=0;const e=f.length;for(let r=0;r<e;++r){let i=f.charCodeAt(r);if(55296<=i&&i<=56319){if(++r>=e)return v+this.wcwidth(i);const g=f.charCodeAt(r);56320<=g&&g<=57343?i=1024*(i-55296)+g-56320+65536:v+=this.wcwidth(g)}const s=this.charProperties(i,o);let d=n.extractWidth(s);n.extractShouldJoin(s)&&(d-=n.extractWidth(o)),v+=d,o=s}return v}charProperties(f,v){return this._activeProvider.charProperties(f,v)}}t.UnicodeService=n}},te={};function Y(O){var t=te[O];if(t!==void 0)return t.exports;var a=te[O]={exports:{}};return he[O](a,a.exports,Y),a.exports}var oe={};return(()=>{var O=oe;Object.defineProperty(O,"__esModule",{value:!0}),O.Unicode11Addon=void 0;const t=Y(433);O.Unicode11Addon=class{activate(a){a.unicode.register(new t.UnicodeV11)}dispose(){}}})(),oe})())}(Se)),Se.exports}var qe=We(),we={exports:{}},Me;function $e(){return Me||(Me=1,function(ae,ve){(function(he,te){ae.exports=te()})(self,()=>(()=>{var he={6:(O,t)=>{function a(c){try{const n=new URL(c),l=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return c.toLocaleLowerCase().startsWith(l.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.LinkComputer=t.WebLinkProvider=void 0,t.WebLinkProvider=class{constructor(c,n,l,f={}){this._terminal=c,this._regex=n,this._handler=l,this._options=f}provideLinks(c,n){const l=h.computeLink(c,this._regex,this._terminal,this._handler);n(this._addCallbacks(l))}_addCallbacks(c){return c.map(n=>(n.leave=this._options.leave,n.hover=(l,f)=>{if(this._options.hover){const{range:v}=n;this._options.hover(l,f,v)}},n))}};class h{static computeLink(n,l,f,v){const o=new RegExp(l.source,(l.flags||"")+"g"),[e,r]=h._getWindowedLineStrings(n-1,f),i=e.join("");let s;const d=[];for(;s=o.exec(i);){const g=s[0];if(!a(g))continue;const[u,m]=h._mapStrIdx(f,r,0,s.index),[_,p]=h._mapStrIdx(f,u,m,g.length);if(u===-1||m===-1||_===-1||p===-1)continue;const S={start:{x:m+1,y:u+1},end:{x:p,y:_+1}};d.push({range:S,text:g,activate:v})}return d}static _getWindowedLineStrings(n,l){let f,v=n,o=n,e=0,r="";const i=[];if(f=l.buffer.active.getLine(n)){const s=f.translateToString(!0);if(f.isWrapped&&s[0]!==" "){for(e=0;(f=l.buffer.active.getLine(--v))&&e<2048&&(r=f.translateToString(!0),e+=r.length,i.push(r),f.isWrapped&&r.indexOf(" ")===-1););i.reverse()}for(i.push(s),e=0;(f=l.buffer.active.getLine(++o))&&f.isWrapped&&e<2048&&(r=f.translateToString(!0),e+=r.length,i.push(r),r.indexOf(" ")===-1););}return[i,v]}static _mapStrIdx(n,l,f,v){const o=n.buffer.active,e=o.getNullCell();let r=f;for(;v;){const i=o.getLine(l);if(!i)return[-1,-1];for(let s=r;s<i.length;++s){i.getCell(s,e);const d=e.getChars();if(e.getWidth()&&(v-=d.length||1,s===i.length-1&&d==="")){const g=o.getLine(l+1);g&&g.isWrapped&&(g.getCell(0,e),e.getWidth()===2&&(v+=1))}if(v<0)return[l,s]}l++,r=0}return[l,r]}}t.LinkComputer=h}},te={};function Y(O){var t=te[O];if(t!==void 0)return t.exports;var a=te[O]={exports:{}};return he[O](a,a.exports,Y),a.exports}var oe={};return(()=>{var O=oe;Object.defineProperty(O,"__esModule",{value:!0}),O.WebLinksAddon=void 0;const t=Y(6),a=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(c,n){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}O.WebLinksAddon=class{constructor(c=h,n={}){this._handler=c,this._options=n}activate(c){this._terminal=c;const n=this._options,l=n.urlRegex||a;this._linkProvider=this._terminal.registerLinkProvider(new t.WebLinkProvider(this._terminal,l,this._handler,n))}dispose(){var c;(c=this._linkProvider)==null||c.dispose()}}})(),oe})())}(we)),we.exports}var Ve=$e(),ye={exports:{}},ke;function Ue(){return ke||(ke=1,function(ae,ve){(function(he,te){ae.exports=te()})(self,()=>(()=>{var he={965:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlyphRenderer=void 0;const h=a(374),c=a(509),n=a(855),l=a(859),f=a(381),v=11,o=v*Float32Array.BYTES_PER_ELEMENT;let e,r=0,i=0,s=0;class d extends l.Disposable{constructor(u,m,_,p){super(),this._terminal=u,this._gl=m,this._dimensions=_,this._optionsService=p,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const S=this._gl;c.TextureAtlas.maxAtlasPages===void 0&&(c.TextureAtlas.maxAtlasPages=Math.min(32,(0,h.throwIfFalsy)(S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS))),c.TextureAtlas.maxTextureSize=(0,h.throwIfFalsy)(S.getParameter(S.MAX_TEXTURE_SIZE))),this._program=(0,h.throwIfFalsy)((0,f.createProgram)(S,`#version 300 es
2
- layout (location = 0) in vec2 a_unitquad;
3
- layout (location = 1) in vec2 a_cellpos;
4
- layout (location = 2) in vec2 a_offset;
5
- layout (location = 3) in vec2 a_size;
6
- layout (location = 4) in float a_texpage;
7
- layout (location = 5) in vec2 a_texcoord;
8
- layout (location = 6) in vec2 a_texsize;
9
-
10
- uniform mat4 u_projection;
11
- uniform vec2 u_resolution;
12
-
13
- out vec2 v_texcoord;
14
- flat out int v_texpage;
15
-
16
- void main() {
17
- vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
18
- gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
19
- v_texpage = int(a_texpage);
20
- v_texcoord = a_texcoord + a_unitquad * a_texsize;
21
- }`,function(B){let T="";for(let k=1;k<B;k++)T+=` else if (v_texpage == ${k}) { outColor = texture(u_texture[${k}], v_texcoord); }`;return`#version 300 es
22
- precision lowp float;
23
-
24
- in vec2 v_texcoord;
25
- flat in int v_texpage;
26
-
27
- uniform sampler2D u_texture[${B}];
28
-
29
- out vec4 outColor;
30
-
31
- void main() {
32
- if (v_texpage == 0) {
33
- outColor = texture(u_texture[0], v_texcoord);
34
- } ${T}
35
- }`}(c.TextureAtlas.maxAtlasPages))),this.register((0,l.toDisposable)(()=>S.deleteProgram(this._program))),this._projectionLocation=(0,h.throwIfFalsy)(S.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,h.throwIfFalsy)(S.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,h.throwIfFalsy)(S.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=S.createVertexArray(),S.bindVertexArray(this._vertexArrayObject);const y=new Float32Array([0,0,1,0,0,1,1,1]),b=S.createBuffer();this.register((0,l.toDisposable)(()=>S.deleteBuffer(b))),S.bindBuffer(S.ARRAY_BUFFER,b),S.bufferData(S.ARRAY_BUFFER,y,S.STATIC_DRAW),S.enableVertexAttribArray(0),S.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const w=new Uint8Array([0,1,2,3]),x=S.createBuffer();this.register((0,l.toDisposable)(()=>S.deleteBuffer(x))),S.bindBuffer(S.ELEMENT_ARRAY_BUFFER,x),S.bufferData(S.ELEMENT_ARRAY_BUFFER,w,S.STATIC_DRAW),this._attributesBuffer=(0,h.throwIfFalsy)(S.createBuffer()),this.register((0,l.toDisposable)(()=>S.deleteBuffer(this._attributesBuffer))),S.bindBuffer(S.ARRAY_BUFFER,this._attributesBuffer),S.enableVertexAttribArray(2),S.vertexAttribPointer(2,2,S.FLOAT,!1,o,0),S.vertexAttribDivisor(2,1),S.enableVertexAttribArray(3),S.vertexAttribPointer(3,2,S.FLOAT,!1,o,2*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(3,1),S.enableVertexAttribArray(4),S.vertexAttribPointer(4,1,S.FLOAT,!1,o,4*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(4,1),S.enableVertexAttribArray(5),S.vertexAttribPointer(5,2,S.FLOAT,!1,o,5*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(5,1),S.enableVertexAttribArray(6),S.vertexAttribPointer(6,2,S.FLOAT,!1,o,7*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(6,1),S.enableVertexAttribArray(1),S.vertexAttribPointer(1,2,S.FLOAT,!1,o,9*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(1,1),S.useProgram(this._program);const M=new Int32Array(c.TextureAtlas.maxAtlasPages);for(let B=0;B<c.TextureAtlas.maxAtlasPages;B++)M[B]=B;S.uniform1iv(this._textureLocation,M),S.uniformMatrix4fv(this._projectionLocation,!1,f.PROJECTION_MATRIX),this._atlasTextures=[];for(let B=0;B<c.TextureAtlas.maxAtlasPages;B++){const T=new f.GLTexture((0,h.throwIfFalsy)(S.createTexture()));this.register((0,l.toDisposable)(()=>S.deleteTexture(T.texture))),S.activeTexture(S.TEXTURE0+B),S.bindTexture(S.TEXTURE_2D,T.texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,1,1,0,S.RGBA,S.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[B]=T}S.enable(S.BLEND),S.blendFunc(S.SRC_ALPHA,S.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(u,m,_,p,S,y,b,w,x){this._updateCell(this._vertices.attributes,u,m,_,p,S,y,b,w,x)}_updateCell(u,m,_,p,S,y,b,w,x,M){r=(_*this._terminal.cols+m)*v,p!==n.NULL_CELL_CODE&&p!==void 0?this._atlas&&(e=w&&w.length>1?this._atlas.getRasterizedGlyphCombinedChar(w,S,y,b,!1):this._atlas.getRasterizedGlyph(p,S,y,b,!1),i=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),S!==M&&e.offset.x>i?(s=e.offset.x-i,u[r]=-(e.offset.x-s)+this._dimensions.device.char.left,u[r+1]=-e.offset.y+this._dimensions.device.char.top,u[r+2]=(e.size.x-s)/this._dimensions.device.canvas.width,u[r+3]=e.size.y/this._dimensions.device.canvas.height,u[r+4]=e.texturePage,u[r+5]=e.texturePositionClipSpace.x+s/this._atlas.pages[e.texturePage].canvas.width,u[r+6]=e.texturePositionClipSpace.y,u[r+7]=e.sizeClipSpace.x-s/this._atlas.pages[e.texturePage].canvas.width,u[r+8]=e.sizeClipSpace.y):(u[r]=-e.offset.x+this._dimensions.device.char.left,u[r+1]=-e.offset.y+this._dimensions.device.char.top,u[r+2]=e.size.x/this._dimensions.device.canvas.width,u[r+3]=e.size.y/this._dimensions.device.canvas.height,u[r+4]=e.texturePage,u[r+5]=e.texturePositionClipSpace.x,u[r+6]=e.texturePositionClipSpace.y,u[r+7]=e.sizeClipSpace.x,u[r+8]=e.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,h.allowRescaling)(p,x,e.size.x,this._dimensions.device.cell.width)&&(u[r+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):u.fill(0,r,r+v-1-2)}clear(){const u=this._terminal,m=u.cols*u.rows*v;this._vertices.count!==m?this._vertices.attributes=new Float32Array(m):this._vertices.attributes.fill(0);let _=0;for(;_<this._vertices.attributesBuffers.length;_++)this._vertices.count!==m?this._vertices.attributesBuffers[_]=new Float32Array(m):this._vertices.attributesBuffers[_].fill(0);this._vertices.count=m,_=0;for(let p=0;p<u.rows;p++)for(let S=0;S<u.cols;S++)this._vertices.attributes[_+9]=S/u.cols,this._vertices.attributes[_+10]=p/u.rows,_+=v}handleResize(){const u=this._gl;u.useProgram(this._program),u.viewport(0,0,u.canvas.width,u.canvas.height),u.uniform2f(this._resolutionLocation,u.canvas.width,u.canvas.height),this.clear()}render(u){if(!this._atlas)return;const m=this._gl;m.useProgram(this._program),m.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const _=this._vertices.attributesBuffers[this._activeBuffer];let p=0;for(let S=0;S<u.lineLengths.length;S++){const y=S*this._terminal.cols*v,b=this._vertices.attributes.subarray(y,y+u.lineLengths[S]*v);_.set(b,p),p+=b.length}m.bindBuffer(m.ARRAY_BUFFER,this._attributesBuffer),m.bufferData(m.ARRAY_BUFFER,_.subarray(0,p),m.STREAM_DRAW);for(let S=0;S<this._atlas.pages.length;S++)this._atlas.pages[S].version!==this._atlasTextures[S].version&&this._bindAtlasPageTexture(m,this._atlas,S);m.drawElementsInstanced(m.TRIANGLE_STRIP,4,m.UNSIGNED_BYTE,0,p/v)}setAtlas(u){this._atlas=u;for(const m of this._atlasTextures)m.version=-1}_bindAtlasPageTexture(u,m,_){u.activeTexture(u.TEXTURE0+_),u.bindTexture(u.TEXTURE_2D,this._atlasTextures[_].texture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,m.pages[_].canvas),u.generateMipmap(u.TEXTURE_2D),this._atlasTextures[_].version=m.pages[_].version}setDimensions(u){this._dimensions=u}}t.GlyphRenderer=d},742:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RectangleRenderer=void 0;const h=a(374),c=a(859),n=a(310),l=a(381),f=8*Float32Array.BYTES_PER_ELEMENT;class v{constructor(){this.attributes=new Float32Array(160),this.count=0}}let o=0,e=0,r=0,i=0,s=0,d=0,g=0;class u extends c.Disposable{constructor(_,p,S,y){super(),this._terminal=_,this._gl=p,this._dimensions=S,this._themeService=y,this._vertices=new v,this._verticesCursor=new v;const b=this._gl;this._program=(0,h.throwIfFalsy)((0,l.createProgram)(b,`#version 300 es
36
- layout (location = 0) in vec2 a_position;
37
- layout (location = 1) in vec2 a_size;
38
- layout (location = 2) in vec4 a_color;
39
- layout (location = 3) in vec2 a_unitquad;
40
-
41
- uniform mat4 u_projection;
42
-
43
- out vec4 v_color;
44
-
45
- void main() {
46
- vec2 zeroToOne = a_position + (a_unitquad * a_size);
47
- gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
48
- v_color = a_color;
49
- }`,`#version 300 es
50
- precision lowp float;
51
-
52
- in vec4 v_color;
53
-
54
- out vec4 outColor;
55
-
56
- void main() {
57
- outColor = v_color;
58
- }`)),this.register((0,c.toDisposable)(()=>b.deleteProgram(this._program))),this._projectionLocation=(0,h.throwIfFalsy)(b.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=b.createVertexArray(),b.bindVertexArray(this._vertexArrayObject);const w=new Float32Array([0,0,1,0,0,1,1,1]),x=b.createBuffer();this.register((0,c.toDisposable)(()=>b.deleteBuffer(x))),b.bindBuffer(b.ARRAY_BUFFER,x),b.bufferData(b.ARRAY_BUFFER,w,b.STATIC_DRAW),b.enableVertexAttribArray(3),b.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const M=new Uint8Array([0,1,2,3]),B=b.createBuffer();this.register((0,c.toDisposable)(()=>b.deleteBuffer(B))),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,B),b.bufferData(b.ELEMENT_ARRAY_BUFFER,M,b.STATIC_DRAW),this._attributesBuffer=(0,h.throwIfFalsy)(b.createBuffer()),this.register((0,c.toDisposable)(()=>b.deleteBuffer(this._attributesBuffer))),b.bindBuffer(b.ARRAY_BUFFER,this._attributesBuffer),b.enableVertexAttribArray(0),b.vertexAttribPointer(0,2,b.FLOAT,!1,f,0),b.vertexAttribDivisor(0,1),b.enableVertexAttribArray(1),b.vertexAttribPointer(1,2,b.FLOAT,!1,f,2*Float32Array.BYTES_PER_ELEMENT),b.vertexAttribDivisor(1,1),b.enableVertexAttribArray(2),b.vertexAttribPointer(2,4,b.FLOAT,!1,f,4*Float32Array.BYTES_PER_ELEMENT),b.vertexAttribDivisor(2,1),this._updateCachedColors(y.colors),this.register(this._themeService.onChangeColors(T=>{this._updateCachedColors(T),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(_){const p=this._gl;p.useProgram(this._program),p.bindVertexArray(this._vertexArrayObject),p.uniformMatrix4fv(this._projectionLocation,!1,l.PROJECTION_MATRIX),p.bindBuffer(p.ARRAY_BUFFER,this._attributesBuffer),p.bufferData(p.ARRAY_BUFFER,_.attributes,p.DYNAMIC_DRAW),p.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,p.UNSIGNED_BYTE,0,_.count)}handleResize(){this._updateViewportRectangle()}setDimensions(_){this._dimensions=_}_updateCachedColors(_){this._bgFloat=this._colorToFloat32Array(_.background),this._cursorFloat=this._colorToFloat32Array(_.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(_){const p=this._terminal,S=this._vertices;let y,b,w,x,M,B,T,k,C,L,R,D=1;for(y=0;y<p.rows;y++){for(w=-1,x=0,M=0,B=!1,b=0;b<p.cols;b++)T=(y*p.cols+b)*n.RENDER_MODEL_INDICIES_PER_CELL,k=_.cells[T+n.RENDER_MODEL_BG_OFFSET],C=_.cells[T+n.RENDER_MODEL_FG_OFFSET],L=!!(67108864&C),(k!==x||C!==M&&(B||L))&&((x!==0||B&&M!==0)&&(R=8*D++,this._updateRectangle(S,R,M,x,w,b,y)),w=b,x=k,M=C,B=L);(x!==0||B&&M!==0)&&(R=8*D++,this._updateRectangle(S,R,M,x,w,p.cols,y))}S.count=D}updateCursor(_){const p=this._verticesCursor,S=_.cursor;if(!S||S.style==="block")return void(p.count=0);let y,b=0;S.style!=="bar"&&S.style!=="outline"||(y=8*b++,this._addRectangleFloat(p.attributes,y,S.x*this._dimensions.device.cell.width,S.y*this._dimensions.device.cell.height,S.style==="bar"?S.dpr*S.cursorWidth:S.dpr,this._dimensions.device.cell.height,this._cursorFloat)),S.style!=="underline"&&S.style!=="outline"||(y=8*b++,this._addRectangleFloat(p.attributes,y,S.x*this._dimensions.device.cell.width,(S.y+1)*this._dimensions.device.cell.height-S.dpr,S.width*this._dimensions.device.cell.width,S.dpr,this._cursorFloat)),S.style==="outline"&&(y=8*b++,this._addRectangleFloat(p.attributes,y,S.x*this._dimensions.device.cell.width,S.y*this._dimensions.device.cell.height,S.width*this._dimensions.device.cell.width,S.dpr,this._cursorFloat),y=8*b++,this._addRectangleFloat(p.attributes,y,(S.x+S.width)*this._dimensions.device.cell.width-S.dpr,S.y*this._dimensions.device.cell.height,S.dpr,this._dimensions.device.cell.height,this._cursorFloat)),p.count=b}_updateRectangle(_,p,S,y,b,w,x){if(67108864&S)switch(50331648&S){case 16777216:case 33554432:o=this._themeService.colors.ansi[255&S].rgba;break;case 50331648:o=(16777215&S)<<8;break;default:o=this._themeService.colors.foreground.rgba}else switch(50331648&y){case 16777216:case 33554432:o=this._themeService.colors.ansi[255&y].rgba;break;case 50331648:o=(16777215&y)<<8;break;default:o=this._themeService.colors.background.rgba}_.attributes.length<p+4&&(_.attributes=(0,l.expandFloat32Array)(_.attributes,this._terminal.rows*this._terminal.cols*8)),e=b*this._dimensions.device.cell.width,r=x*this._dimensions.device.cell.height,i=(o>>24&255)/255,s=(o>>16&255)/255,d=(o>>8&255)/255,g=1,this._addRectangle(_.attributes,p,e,r,(w-b)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,i,s,d,g)}_addRectangle(_,p,S,y,b,w,x,M,B,T){_[p]=S/this._dimensions.device.canvas.width,_[p+1]=y/this._dimensions.device.canvas.height,_[p+2]=b/this._dimensions.device.canvas.width,_[p+3]=w/this._dimensions.device.canvas.height,_[p+4]=x,_[p+5]=M,_[p+6]=B,_[p+7]=T}_addRectangleFloat(_,p,S,y,b,w,x){_[p]=S/this._dimensions.device.canvas.width,_[p+1]=y/this._dimensions.device.canvas.height,_[p+2]=b/this._dimensions.device.canvas.width,_[p+3]=w/this._dimensions.device.canvas.height,_[p+4]=x[0],_[p+5]=x[1],_[p+6]=x[2],_[p+7]=x[3]}_colorToFloat32Array(_){return new Float32Array([(_.rgba>>24&255)/255,(_.rgba>>16&255)/255,(_.rgba>>8&255)/255,(255&_.rgba)/255])}}t.RectangleRenderer=u},310:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderModel=t.COMBINED_CHAR_BIT_MASK=t.RENDER_MODEL_EXT_OFFSET=t.RENDER_MODEL_FG_OFFSET=t.RENDER_MODEL_BG_OFFSET=t.RENDER_MODEL_INDICIES_PER_CELL=void 0;const h=a(296);t.RENDER_MODEL_INDICIES_PER_CELL=4,t.RENDER_MODEL_BG_OFFSET=1,t.RENDER_MODEL_FG_OFFSET=2,t.RENDER_MODEL_EXT_OFFSET=3,t.COMBINED_CHAR_BIT_MASK=2147483648,t.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,h.createSelectionRenderModel)()}resize(c,n){const l=c*n*t.RENDER_MODEL_INDICIES_PER_CELL;l!==this.cells.length&&(this.cells=new Uint32Array(l),this.lineLengths=new Uint32Array(n))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JoinedCellData=t.WebglRenderer=void 0;const h=a(820),c=a(274),n=a(627),l=a(457),f=a(56),v=a(374),o=a(345),e=a(859),r=a(147),i=a(782),s=a(855),d=a(965),g=a(742),u=a(310),m=a(733);class _ extends e.Disposable{constructor(b,w,x,M,B,T,k,C,L){super(),this._terminal=b,this._characterJoinerService=w,this._charSizeService=x,this._coreBrowserService=M,this._coreService=B,this._decorationService=T,this._optionsService=k,this._themeService=C,this._cursorBlinkStateManager=new e.MutableDisposable,this._charAtlasDisposable=this.register(new e.MutableDisposable),this._observerDisposable=this.register(new e.MutableDisposable),this._model=new u.RenderModel,this._workCell=new i.CellData,this._workCell2=new i.CellData,this._rectangleRenderer=this.register(new e.MutableDisposable),this._glyphRenderer=this.register(new e.MutableDisposable),this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new o.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new o.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new c.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new m.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,k,this._themeService)],this.dimensions=(0,v.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(k.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:L};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,h.addDisposableDomListener)(this._canvas,"webglcontextlost",D=>{console.log("webglcontextlost event received"),D.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(D)},3e3)})),this.register((0,h.addDisposableDomListener)(this._canvas,"webglcontextrestored",D=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,n.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,f.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(D,I)=>this._setCanvasDevicePixelDimensions(D,I)),this.register(this._coreBrowserService.onWindowChange(D=>{this._observerDisposable.value=(0,f.observeDevicePixelDimensions)(this._canvas,D,(I,H)=>this._setCanvasDevicePixelDimensions(I,H))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,e.toDisposable)(()=>{var D;for(const I of this._renderLayers)I.dispose();(D=this._canvas.parentElement)==null||D.removeChild(this._canvas),(0,n.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var b;return(b=this._charAtlas)==null?void 0:b.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(b,w){var x,M,B,T;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const k of this._renderLayers)k.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(x=this._rectangleRenderer.value)==null||x.setDimensions(this.dimensions),(M=this._rectangleRenderer.value)==null||M.handleResize(),(B=this._glyphRenderer.value)==null||B.setDimensions(this.dimensions),(T=this._glyphRenderer.value)==null||T.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var b;for(const w of this._renderLayers)w.handleBlur(this._terminal);(b=this._cursorBlinkStateManager.value)==null||b.pause(),this._requestRedrawViewport()}handleFocus(){var b;for(const w of this._renderLayers)w.handleFocus(this._terminal);(b=this._cursorBlinkStateManager.value)==null||b.resume(),this._requestRedrawViewport()}handleSelectionChanged(b,w,x){for(const M of this._renderLayers)M.handleSelectionChanged(this._terminal,b,w,x);this._model.selection.update(this._core,b,w,x),this._requestRedrawViewport()}handleCursorMove(){var b;for(const w of this._renderLayers)w.handleCursorMove(this._terminal);(b=this._cursorBlinkStateManager.value)==null||b.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new g.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new d.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var w;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const b=(0,n.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==b&&(this._onChangeTextureAtlas.fire(b.pages[0].canvas),this._charAtlasDisposable.value=(0,e.getDisposeArrayDisposable)([(0,o.forwardEvent)(b.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,o.forwardEvent)(b.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=b,this._charAtlas.warmUp(),(w=this._glyphRenderer.value)==null||w.setAtlas(this._charAtlas)}_clearModel(b){var w;this._model.clear(),b&&((w=this._glyphRenderer.value)==null||w.clear())}clearTextureAtlas(){var b;(b=this._charAtlas)==null||b.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var b;this._clearModel(!0);for(const w of this._renderLayers)w.reset(this._terminal);(b=this._cursorBlinkStateManager.value)==null||b.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(b){return-1}deregisterCharacterJoiner(b){return!1}renderRows(b,w){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const x of this._renderLayers)x.handleGridChanged(this._terminal,b,w);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(b,w),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new l.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(b,w){const x=this._core;let M,B,T,k,C,L,R,D,I,H,z,U,A,E,F=this._workCell;b=S(b,x.rows-1,0),w=S(w,x.rows-1,0);const P=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,$=P-x.buffer.ydisp,W=Math.min(this._terminal.buffer.active.cursorX,x.cols-1);let V=-1;const j=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Q=!1;for(B=b;B<=w;B++)for(T=B+x.buffer.ydisp,k=x.buffer.lines.get(T),this._model.lineLengths[B]=0,C=this._characterJoinerService.getJoinedCharacters(T),A=0;A<x.cols;A++)if(M=this._cellColorResolver.result.bg,k.loadCell(A,F),A===0&&(M=this._cellColorResolver.result.bg),L=!1,R=A,C.length>0&&A===C[0][0]&&(L=!0,D=C.shift(),F=new p(F,k.translateToString(!0,D[0],D[1]),D[1]-D[0]),R=D[1]-1),I=F.getChars(),H=F.getCode(),U=(B*x.cols+A)*u.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(F,A,T,this.dimensions.device.cell.width),j&&T===P&&(A===W&&(this._model.cursor={x:W,y:$,width:F.getWidth(),style:this._coreBrowserService.isFocused?x.options.cursorStyle||"block":x.options.cursorInactiveStyle,cursorWidth:x.options.cursorWidth,dpr:this._devicePixelRatio},V=W+F.getWidth()-1),A>=W&&A<=V&&(this._coreBrowserService.isFocused&&(x.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&x.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),H!==s.NULL_CELL_CODE&&(this._model.lineLengths[B]=A+1),(this._model.cells[U]!==H||this._model.cells[U+u.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[U+u.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[U+u.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Q=!0,I.length>1&&(H|=u.COMBINED_CHAR_BIT_MASK),this._model.cells[U]=H,this._model.cells[U+u.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[U+u.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[U+u.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,z=F.getWidth(),this._glyphRenderer.value.updateCell(A,B,H,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,I,z,M),L))for(F=this._workCell,A++;A<R;A++)E=(B*x.cols+A)*u.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(A,B,s.NULL_CELL_CODE,0,0,0,s.NULL_CELL_CHAR,0,0),this._model.cells[E]=s.NULL_CELL_CODE,this._model.cells[E+u.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[E+u.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[E+u.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Q&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(b,w){this._canvas.width===b&&this._canvas.height===w||(this._canvas.width=b,this._canvas.height=w,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const b=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:b,end:b})}}t.WebglRenderer=_;class p extends r.AttributeData{constructor(b,w,x){super(),this.content=0,this.combinedData="",this.fg=b.fg,this.bg=b.bg,this.combinedData=w,this._width=x}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(b){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function S(y,b,w=0){return Math.max(Math.min(y,b),w)}t.JoinedCellData=p},381:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GLTexture=t.expandFloat32Array=t.createShader=t.createProgram=t.PROJECTION_MATRIX=void 0;const h=a(374);function c(n,l,f){const v=(0,h.throwIfFalsy)(n.createShader(l));if(n.shaderSource(v,f),n.compileShader(v),n.getShaderParameter(v,n.COMPILE_STATUS))return v;console.error(n.getShaderInfoLog(v)),n.deleteShader(v)}t.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),t.createProgram=function(n,l,f){const v=(0,h.throwIfFalsy)(n.createProgram());if(n.attachShader(v,(0,h.throwIfFalsy)(c(n,n.VERTEX_SHADER,l))),n.attachShader(v,(0,h.throwIfFalsy)(c(n,n.FRAGMENT_SHADER,f))),n.linkProgram(v),n.getProgramParameter(v,n.LINK_STATUS))return v;console.error(n.getProgramInfoLog(v)),n.deleteProgram(v)},t.createShader=c,t.expandFloat32Array=function(n,l){const f=Math.min(2*n.length,l),v=new Float32Array(f);for(let o=0;o<n.length;o++)v[o]=n[o];return v},t.GLTexture=class{constructor(n){this.texture=n,this.version=-1}}},592:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const h=a(627),c=a(237),n=a(374),l=a(859);class f extends l.Disposable{constructor(o,e,r,i,s,d,g,u){super(),this._container=e,this._alpha=s,this._coreBrowserService=d,this._optionsService=g,this._themeService=u,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${r}-layer`),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(m=>{this._refreshCharAtlas(o,m),this.reset(o)})),this.register((0,l.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,n.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(o){}handleFocus(o){}handleCursorMove(o){}handleGridChanged(o,e,r){}handleSelectionChanged(o,e,r,i=!1){}_setTransparency(o,e){if(e===this._alpha)return;const r=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,r),this._refreshCharAtlas(o,this._themeService.colors),this.handleGridChanged(o,0,o.rows-1)}_refreshCharAtlas(o,e){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,h.acquireTextureAtlas)(o,this._optionsService.rawOptions,e,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(o,e){this._deviceCellWidth=e.device.cell.width,this._deviceCellHeight=e.device.cell.height,this._deviceCharWidth=e.device.char.width,this._deviceCharHeight=e.device.char.height,this._deviceCharLeft=e.device.char.left,this._deviceCharTop=e.device.char.top,this._canvas.width=e.device.canvas.width,this._canvas.height=e.device.canvas.height,this._canvas.style.width=`${e.css.canvas.width}px`,this._canvas.style.height=`${e.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(o,this._themeService.colors)}_fillBottomLineAtCells(o,e,r=1){this._ctx.fillRect(o*this._deviceCellWidth,(e+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,r*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(o,e,r,i){this._alpha?this._ctx.clearRect(o*this._deviceCellWidth,e*this._deviceCellHeight,r*this._deviceCellWidth,i*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(o*this._deviceCellWidth,e*this._deviceCellHeight,r*this._deviceCellWidth,i*this._deviceCellHeight))}_fillCharTrueColor(o,e,r,i){this._ctx.font=this._getFont(o,!1,!1),this._ctx.textBaseline=c.TEXT_BASELINE,this._clipCell(r,i,e.getWidth()),this._ctx.fillText(e.getChars(),r*this._deviceCellWidth+this._deviceCharLeft,i*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(o,e,r){this._ctx.beginPath(),this._ctx.rect(o*this._deviceCellWidth,e*this._deviceCellHeight,r*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(o,e,r){return`${r?"italic":""} ${e?o.options.fontWeightBold:o.options.fontWeight} ${o.options.fontSize*this._coreBrowserService.dpr}px ${o.options.fontFamily}`}}t.BaseRenderLayer=f},733:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const h=a(197),c=a(237),n=a(592);class l extends n.BaseRenderLayer{constructor(v,o,e,r,i,s,d){super(e,v,"link",o,!0,i,s,d),this.register(r.onShowLinkUnderline(g=>this._handleShowLinkUnderline(g))),this.register(r.onHideLinkUnderline(g=>this._handleHideLinkUnderline(g)))}resize(v,o){super.resize(v,o),this._state=void 0}reset(v){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const v=this._state.y2-this._state.y1-1;v>0&&this._clearCells(0,this._state.y1+1,this._state.cols,v),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(v){if(v.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:v.fg!==void 0&&(0,h.is256Color)(v.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[v.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,v.y1===v.y2)this._fillBottomLineAtCells(v.x1,v.y1,v.x2-v.x1);else{this._fillBottomLineAtCells(v.x1,v.y1,v.cols-v.x1);for(let o=v.y1+1;o<v.y2;o++)this._fillBottomLineAtCells(0,o,v.cols);this._fillBottomLineAtCells(0,v.y2,v.x2)}this._state=v}_handleHideLinkUnderline(v){this._clearCurrentLink()}}t.LinkRenderLayer=l},820:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(a,h,c,n){a.addEventListener(h,c,n);let l=!1;return{dispose:()=>{l||(l=!0,a.removeEventListener(h,c,n))}}}},274:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellColorResolver=void 0;const h=a(855),c=a(160),n=a(374);let l,f=0,v=0,o=!1,e=!1,r=!1,i=0;t.CellColorResolver=class{constructor(s,d,g,u,m,_){this._terminal=s,this._optionService=d,this._selectionRenderModel=g,this._decorationService=u,this._coreBrowserService=m,this._themeService=_,this.result={fg:0,bg:0,ext:0}}resolve(s,d,g,u){if(this.result.bg=s.bg,this.result.fg=s.fg,this.result.ext=268435456&s.bg?s.extended.ext:0,v=0,f=0,e=!1,o=!1,r=!1,l=this._themeService.colors,i=0,s.getCode()!==h.NULL_CELL_CODE&&s.extended.underlineStyle===4){const m=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));i=d*u%(2*Math.round(m))}if(this._decorationService.forEachDecorationAtCell(d,g,"bottom",m=>{m.backgroundColorRGB&&(v=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(f=m.foregroundColorRGB.rgba>>8&16777215,o=!0)}),r=this._selectionRenderModel.isCellSelected(this._terminal,d,g),r){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:v=(16777215&this.result.fg)<<8|255;break;default:v=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:v=(16777215&this.result.bg)<<8|255}v=c.rgba.blend(v,4294967040&(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else v=(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(e=!0,l.selectionForeground&&(f=l.selectionForeground.rgba>>8&16777215,o=!0),(0,n.treatGlyphAsBackgroundColor)(s.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)f=(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:f=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:f=(16777215&this.result.fg)<<8|255;break;default:f=this._themeService.colors.foreground.rgba}f=c.rgba.blend(f,4294967040&(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}o=!0}}this._decorationService.forEachDecorationAtCell(d,g,"top",m=>{m.backgroundColorRGB&&(v=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(f=m.foregroundColorRGB.rgba>>8&16777215,o=!0)}),e&&(v=r?-16777216&s.bg&-134217729|v|50331648:-16777216&s.bg|v|50331648),o&&(f=-16777216&s.fg&-67108865|f|50331648),67108864&this.result.fg&&(e&&!o&&(f=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&l.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,o=!0),!e&&o&&(v=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&l.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,e=!0)),l=void 0,this.result.bg=e?v:this.result.bg,this.result.fg=o?f:this.result.fg,this.result.ext&=536870911,this.result.ext|=i<<29&3758096384}}},627:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireTextureAtlas=void 0;const h=a(509),c=a(197),n=[];t.acquireTextureAtlas=function(l,f,v,o,e,r,i,s){const d=(0,c.generateConfig)(o,e,r,i,f,v,s);for(let m=0;m<n.length;m++){const _=n[m],p=_.ownedBy.indexOf(l);if(p>=0){if((0,c.configEquals)(_.config,d))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),n.splice(m,1)):_.ownedBy.splice(p,1);break}}for(let m=0;m<n.length;m++){const _=n[m];if((0,c.configEquals)(_.config,d))return _.ownedBy.push(l),_.atlas}const g=l._core,u={atlas:new h.TextureAtlas(document,d,g.unicodeService),config:d,ownedBy:[l]};return n.push(u),u.atlas},t.removeTerminalFromCache=function(l){for(let f=0;f<n.length;f++){const v=n[f].ownedBy.indexOf(l);if(v!==-1){n[f].ownedBy.length===1?(n[f].atlas.dispose(),n.splice(f,1)):n[f].ownedBy.splice(v,1);break}}}},197:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const h=a(160);t.generateConfig=function(c,n,l,f,v,o,e){const r={foreground:o.foreground,background:o.background,cursor:h.NULL_COLOR,cursorAccent:h.NULL_COLOR,selectionForeground:h.NULL_COLOR,selectionBackgroundTransparent:h.NULL_COLOR,selectionBackgroundOpaque:h.NULL_COLOR,selectionInactiveBackgroundTransparent:h.NULL_COLOR,selectionInactiveBackgroundOpaque:h.NULL_COLOR,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:v.customGlyphs,devicePixelRatio:e,letterSpacing:v.letterSpacing,lineHeight:v.lineHeight,deviceCellWidth:c,deviceCellHeight:n,deviceCharWidth:l,deviceCharHeight:f,fontFamily:v.fontFamily,fontSize:v.fontSize,fontWeight:v.fontWeight,fontWeightBold:v.fontWeightBold,allowTransparency:v.allowTransparency,drawBoldTextInBrightColors:v.drawBoldTextInBrightColors,minimumContrastRatio:v.minimumContrastRatio,colors:r}},t.configEquals=function(c,n){for(let l=0;l<c.colors.ansi.length;l++)if(c.colors.ansi[l].rgba!==n.colors.ansi[l].rgba)return!1;return c.devicePixelRatio===n.devicePixelRatio&&c.customGlyphs===n.customGlyphs&&c.lineHeight===n.lineHeight&&c.letterSpacing===n.letterSpacing&&c.fontFamily===n.fontFamily&&c.fontSize===n.fontSize&&c.fontWeight===n.fontWeight&&c.fontWeightBold===n.fontWeightBold&&c.allowTransparency===n.allowTransparency&&c.deviceCharWidth===n.deviceCharWidth&&c.deviceCharHeight===n.deviceCharHeight&&c.drawBoldTextInBrightColors===n.drawBoldTextInBrightColors&&c.minimumContrastRatio===n.minimumContrastRatio&&c.colors.foreground.rgba===n.colors.foreground.rgba&&c.colors.background.rgba===n.colors.background.rgba},t.is256Color=function(c){return(50331648&c)==16777216||(50331648&c)==33554432}},237:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const h=a(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},457:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorBlinkStateManager=void 0,t.CursorBlinkStateManager=class{constructor(a,h){this._renderCallback=a,this._coreBrowserService=h,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(a=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const h=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,h>0)return void this._restartInterval(h)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const h=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(h)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},a)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const h=a(374);t.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:8,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:4,y:0,w:4,h:4}],"▜":[{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}]};const c={"░":[[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]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(o,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(o,e)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╒":{1:(o,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(o,e)=>`M${.5-o},1 L${.5-o},.5 L1,.5 M${.5+o},.5 L${.5+o},1`},"╔":{1:(o,e)=>`M1,${.5-e} L${.5-o},${.5-e} L${.5-o},1 M1,${.5+e} L${.5+o},${.5+e} L${.5+o},1`},"╕":{1:(o,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(o,e)=>`M${.5+o},1 L${.5+o},.5 L0,.5 M${.5-o},.5 L${.5-o},1`},"╗":{1:(o,e)=>`M0,${.5+e} L${.5-o},${.5+e} L${.5-o},1 M0,${.5-e} L${.5+o},${.5-e} L${.5+o},1`},"╘":{1:(o,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(o,e)=>`M1,.5 L${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╚":{1:(o,e)=>`M1,${.5-e} L${.5+o},${.5-e} L${.5+o},0 M1,${.5+e} L${.5-o},${.5+e} L${.5-o},0`},"╛":{1:(o,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(o,e)=>`M0,.5 L${.5+o},.5 L${.5+o},0 M${.5-o},.5 L${.5-o},0`},"╝":{1:(o,e)=>`M0,${.5-e} L${.5-o},${.5-e} L${.5-o},0 M0,${.5+e} L${.5+o},${.5+e} L${.5+o},0`},"╞":{1:(o,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(o,e)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1 M${.5+o},.5 L1,.5`},"╠":{1:(o,e)=>`M${.5-o},0 L${.5-o},1 M1,${.5+e} L${.5+o},${.5+e} L${.5+o},1 M1,${.5-e} L${.5+o},${.5-e} L${.5+o},0`},"╡":{1:(o,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(o,e)=>`M0,.5 L${.5-o},.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╣":{1:(o,e)=>`M${.5+o},0 L${.5+o},1 M0,${.5+e} L${.5-o},${.5+e} L${.5-o},1 M0,${.5-e} L${.5-o},${.5-e} L${.5-o},0`},"╤":{1:(o,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(o,e)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},1 M${.5+o},.5 L${.5+o},1`},"╦":{1:(o,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-o},${.5+e} L${.5-o},1 M1,${.5+e} L${.5+o},${.5+e} L${.5+o},1`},"╧":{1:(o,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(o,e)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╩":{1:(o,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-o},${.5-e} L${.5-o},0 M1,${.5-e} L${.5+o},${.5-e} L${.5+o},0`},"╪":{1:(o,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(o,e)=>`M0,.5 L1,.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╬":{1:(o,e)=>`M0,${.5+e} L${.5-o},${.5+e} L${.5-o},1 M1,${.5+e} L${.5+o},${.5+e} L${.5+o},1 M0,${.5-e} L${.5-o},${.5-e} L${.5-o},0 M1,${.5-e} L${.5+o},${.5-e} L${.5+o},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{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"},"┉":{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"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(o,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(o,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(o,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(o,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.tryDrawCustomChar=function(o,e,r,i,s,d,g,u){const m=t.blockElementDefinitions[e];if(m)return function(y,b,w,x,M,B){for(let T=0;T<b.length;T++){const k=b[T],C=M/8,L=B/8;y.fillRect(w+k.x*C,x+k.y*L,k.w*C,k.h*L)}}(o,m,r,i,s,d),!0;const _=c[e];if(_)return function(y,b,w,x,M,B){let T=n.get(b);T||(T=new Map,n.set(b,T));const k=y.fillStyle;if(typeof k!="string")throw new Error(`Unexpected fillStyle type "${k}"`);let C=T.get(k);if(!C){const L=b[0].length,R=b.length,D=y.canvas.ownerDocument.createElement("canvas");D.width=L,D.height=R;const I=(0,h.throwIfFalsy)(D.getContext("2d")),H=new ImageData(L,R);let z,U,A,E;if(k.startsWith("#"))z=parseInt(k.slice(1,3),16),U=parseInt(k.slice(3,5),16),A=parseInt(k.slice(5,7),16),E=k.length>7&&parseInt(k.slice(7,9),16)||1;else{if(!k.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${k}" when drawing pattern glyph`);[z,U,A,E]=k.substring(5,k.length-1).split(",").map(F=>parseFloat(F))}for(let F=0;F<R;F++)for(let P=0;P<L;P++)H.data[4*(F*L+P)]=z,H.data[4*(F*L+P)+1]=U,H.data[4*(F*L+P)+2]=A,H.data[4*(F*L+P)+3]=b[F][P]*(255*E);I.putImageData(H,0,0),C=(0,h.throwIfFalsy)(y.createPattern(D,null)),T.set(k,C)}y.fillStyle=C,y.fillRect(w,x,M,B)}(o,_,r,i,s,d),!0;const p=t.boxDrawingDefinitions[e];if(p)return function(y,b,w,x,M,B,T){y.strokeStyle=y.fillStyle;for(const[k,C]of Object.entries(b)){let L;y.beginPath(),y.lineWidth=T*Number.parseInt(k),L=typeof C=="function"?C(.15,.15/B*M):C;for(const R of L.split(" ")){const D=R[0],I=f[D];if(!I){console.error(`Could not find drawing instructions for "${D}"`);continue}const H=R.substring(1).split(",");H[0]&&H[1]&&I(y,v(H,M,B,w,x,!0,T))}y.stroke(),y.closePath()}}(o,p,r,i,s,d,u),!0;const S=t.powerlineDefinitions[e];return!!S&&(function(y,b,w,x,M,B,T,k){const C=new Path2D;C.rect(w,x,M,B),y.clip(C),y.beginPath();const L=T/12;y.lineWidth=k*L;for(const R of b.d.split(" ")){const D=R[0],I=f[D];if(!I){console.error(`Could not find drawing instructions for "${D}"`);continue}const H=R.substring(1).split(",");H[0]&&H[1]&&I(y,v(H,M,B,w,x,!1,k,(b.leftPadding??0)*(L/2),(b.rightPadding??0)*(L/2)))}b.type===1?(y.strokeStyle=y.fillStyle,y.stroke()):y.fill(),y.closePath()}(o,S,r,i,s,d,g,u),!0)};const n=new Map;function l(o,e,r=0){return Math.max(Math.min(o,e),r)}const f={C:(o,e)=>o.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(o,e)=>o.lineTo(e[0],e[1]),M:(o,e)=>o.moveTo(e[0],e[1])};function v(o,e,r,i,s,d,g,u=0,m=0){const _=o.map(p=>parseFloat(p)||parseInt(p));if(_.length<2)throw new Error("Too few arguments for instruction");for(let p=0;p<_.length;p+=2)_[p]*=e-u*g-m*g,d&&_[p]!==0&&(_[p]=l(Math.round(_[p]+.5)-.5,e,0)),_[p]+=i+u*g;for(let p=1;p<_.length;p+=2)_[p]*=r,d&&_[p]!==0&&(_[p]=l(Math.round(_[p]+.5)-.5,r,0)),_[p]+=s;return _}},56:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const h=a(859);t.observeDevicePixelDimensions=function(c,n,l){let f=new n.ResizeObserver(v=>{const o=v.find(i=>i.target===c);if(!o)return;if(!("devicePixelContentBoxSize"in o))return f==null||f.disconnect(),void(f=void 0);const e=o.devicePixelContentBoxSize[0].inlineSize,r=o.devicePixelContentBoxSize[0].blockSize;e>0&&r>0&&l(e,r)});try{f.observe(c,{box:["device-pixel-content-box"]})}catch{f.disconnect(),f=void 0}return(0,h.toDisposable)(()=>f==null?void 0:f.disconnect())}},374:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function h(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=h,t.allowRescaling=function(c,n,l,f){return n===1&&l>Math.ceil(1.5*f)&&c!==void 0&&c>255&&!h(c)&&!a(c)&&!function(v){return 57344<=v&&v<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,l=0){return(c-(2*Math.round(n)-l))%(2*Math.round(n))}},296:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,l,f=!1){if(this.selectionStart=n,this.selectionEnd=l,!n||!l||n[0]===l[0]&&n[1]===l[1])return void this.clear();const v=c.buffers.active.ydisp,o=n[1]-v,e=l[1]-v,r=Math.max(o,0),i=Math.min(e,c.rows-1);r>=c.rows||i<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=f,this.viewportStartRow=o,this.viewportEndRow=e,this.viewportCappedStartRow=r,this.viewportCappedEndRow=i,this.startCol=n[0],this.endCol=l[0])}isCellSelected(c,n,l){return!!this.hasSelection&&(l-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&l>=this.viewportCappedStartRow&&n<this.endCol&&l<=this.viewportCappedEndRow:n<this.startCol&&l>=this.viewportCappedStartRow&&n>=this.endCol&&l<=this.viewportCappedEndRow:l>this.viewportStartRow&&l<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&l===this.viewportStartRow&&n>=this.startCol&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportEndRow&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportStartRow&&n>=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},509:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextureAtlas=void 0;const h=a(237),c=a(860),n=a(374),l=a(160),f=a(345),v=a(485),o=a(385),e=a(147),r=a(855),i={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let s;class d{get pages(){return this._pages}constructor(p,S,y){this._document=p,this._config=S,this._unicodeService=y,this._didWarmUp=!1,this._cacheMap=new v.FourKeyMap,this._cacheMapCombined=new v.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new e.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new f.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new f.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(p,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const p of this.pages)p.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const p=new o.IdleTaskQueue;for(let S=33;S<126;S++)p.enqueue(()=>{if(!this._cacheMap.get(S,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT)){const y=this._drawToCache(S,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT);this._cacheMap.set(S,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT,y)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const p of this._pages)p.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(d.maxAtlasPages&&this._pages.length>=Math.max(4,d.maxAtlasPages)){const S=this._pages.filter(T=>2*T.canvas.width<=(d.maxTextureSize||4096)).sort((T,k)=>k.canvas.width!==T.canvas.width?k.canvas.width-T.canvas.width:k.percentageUsed-T.percentageUsed);let y=-1,b=0;for(let T=0;T<S.length;T++)if(S[T].canvas.width!==b)y=T,b=S[T].canvas.width;else if(T-y==3)break;const w=S.slice(y,y+4),x=w.map(T=>T.glyphs[0].texturePage).sort((T,k)=>T>k?1:-1),M=this.pages.length-w.length,B=this._mergePages(w,M);B.version++;for(let T=x.length-1;T>=0;T--)this._deletePage(x[T]);this.pages.push(B),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(B.canvas)}const p=new g(this._document,this._textureSize);return this._pages.push(p),this._activePages.push(p),this._onAddTextureAtlasCanvas.fire(p.canvas),p}_mergePages(p,S){const y=2*p[0].canvas.width,b=new g(this._document,y,p);for(const[w,x]of p.entries()){const M=w*x.canvas.width%y,B=Math.floor(w/2)*x.canvas.height;b.ctx.drawImage(x.canvas,M,B);for(const k of x.glyphs)k.texturePage=S,k.sizeClipSpace.x=k.size.x/y,k.sizeClipSpace.y=k.size.y/y,k.texturePosition.x+=M,k.texturePosition.y+=B,k.texturePositionClipSpace.x=k.texturePosition.x/y,k.texturePositionClipSpace.y=k.texturePosition.y/y;this._onRemoveTextureAtlasCanvas.fire(x.canvas);const T=this._activePages.indexOf(x);T!==-1&&this._activePages.splice(T,1)}return b}_deletePage(p){this._pages.splice(p,1);for(let S=p;S<this._pages.length;S++){const y=this._pages[S];for(const b of y.glyphs)b.texturePage--;y.version++}}getRasterizedGlyphCombinedChar(p,S,y,b,w){return this._getFromCacheMap(this._cacheMapCombined,p,S,y,b,w)}getRasterizedGlyph(p,S,y,b,w){return this._getFromCacheMap(this._cacheMap,p,S,y,b,w)}_getFromCacheMap(p,S,y,b,w,x=!1){return s=p.get(S,y,b,w),s||(s=this._drawToCache(S,y,b,w,x),p.set(S,y,b,w,s)),s}_getColorFromAnsiIndex(p){if(p>=this._config.colors.ansi.length)throw new Error("No color found for idx "+p);return this._config.colors.ansi[p]}_getBackgroundColor(p,S,y,b){if(this._config.allowTransparency)return l.NULL_COLOR;let w;switch(p){case 16777216:case 33554432:w=this._getColorFromAnsiIndex(S);break;case 50331648:const x=e.AttributeData.toColorRGB(S);w=l.channels.toColor(x[0],x[1],x[2]);break;default:w=y?l.color.opaque(this._config.colors.foreground):this._config.colors.background}return w}_getForegroundColor(p,S,y,b,w,x,M,B,T,k){const C=this._getMinimumContrastColor(p,S,y,b,w,x,M,T,B,k);if(C)return C;let L;switch(w){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&T&&x<8&&(x+=8),L=this._getColorFromAnsiIndex(x);break;case 50331648:const R=e.AttributeData.toColorRGB(x);L=l.channels.toColor(R[0],R[1],R[2]);break;default:L=M?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(L=l.color.opaque(L)),B&&(L=l.color.multiplyOpacity(L,h.DIM_OPACITY)),L}_resolveBackgroundRgba(p,S,y){switch(p){case 16777216:case 33554432:return this._getColorFromAnsiIndex(S).rgba;case 50331648:return S<<8;default:return y?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(p,S,y,b){switch(p){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&b&&S<8&&(S+=8),this._getColorFromAnsiIndex(S).rgba;case 50331648:return S<<8;default:return y?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(p,S,y,b,w,x,M,B,T,k){if(this._config.minimumContrastRatio===1||k)return;const C=this._getContrastCache(T),L=C.getColor(p,b);if(L!==void 0)return L||void 0;const R=this._resolveBackgroundRgba(S,y,M),D=this._resolveForegroundRgba(w,x,M,B),I=l.rgba.ensureContrastRatio(R,D,this._config.minimumContrastRatio/(T?2:1));if(!I)return void C.setColor(p,b,null);const H=l.channels.toColor(I>>24&255,I>>16&255,I>>8&255);return C.setColor(p,b,H),H}_getContrastCache(p){return p?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(p,S,y,b,w=!1){const x=typeof p=="number"?String.fromCharCode(p):p,M=Math.min(this._config.deviceCellWidth*Math.max(x.length,2)+4,this._textureSize);this._tmpCanvas.width<M&&(this._tmpCanvas.width=M);const B=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<B&&(this._tmpCanvas.height=B),this._tmpCtx.save(),this._workAttributeData.fg=y,this._workAttributeData.bg=S,this._workAttributeData.extended.ext=b,this._workAttributeData.isInvisible())return i;const T=!!this._workAttributeData.isBold(),k=!!this._workAttributeData.isInverse(),C=!!this._workAttributeData.isDim(),L=!!this._workAttributeData.isItalic(),R=!!this._workAttributeData.isUnderline(),D=!!this._workAttributeData.isStrikethrough(),I=!!this._workAttributeData.isOverline();let H=this._workAttributeData.getFgColor(),z=this._workAttributeData.getFgColorMode(),U=this._workAttributeData.getBgColor(),A=this._workAttributeData.getBgColorMode();if(k){const N=H;H=U,U=N;const J=z;z=A,A=J}const E=this._getBackgroundColor(A,U,k,C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const F=T?this._config.fontWeightBold:this._config.fontWeight,P=L?"italic":"";this._tmpCtx.font=`${P} ${F} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=h.TEXT_BASELINE;const $=x.length===1&&(0,n.isPowerlineGlyph)(x.charCodeAt(0)),W=x.length===1&&(0,n.isRestrictedPowerlineGlyph)(x.charCodeAt(0)),V=this._getForegroundColor(S,A,U,y,z,H,k,C,T,(0,n.treatGlyphAsBackgroundColor)(x.charCodeAt(0)));this._tmpCtx.fillStyle=V.css;const j=W?0:4;let Q=!1;this._config.customGlyphs!==!1&&(Q=(0,c.tryDrawCustomChar)(this._tmpCtx,x,j,j,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let re,q=!$;if(re=typeof p=="number"?this._unicodeService.wcwidth(p):this._unicodeService.getStringCellWidth(p),R){this._tmpCtx.save();const N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=N%2==1?.5:0;if(this._tmpCtx.lineWidth=N,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())q=!1,this._tmpCtx.strokeStyle=`rgb(${e.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{q=!1;let ne=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&ne<8&&(ne+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(ne).css}this._tmpCtx.beginPath();const se=j,ie=Math.ceil(j+this._config.deviceCharHeight)-J-(w?2*N:0),_e=ie+N,le=ie+2*N;let ce=this._workAttributeData.getUnderlineVariantOffset();for(let ne=0;ne<re;ne++){this._tmpCtx.save();const ee=se+ne*this._config.deviceCellWidth,K=se+(ne+1)*this._config.deviceCellWidth,fe=ee+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(ee,ie),this._tmpCtx.lineTo(K,ie),this._tmpCtx.moveTo(ee,le),this._tmpCtx.lineTo(K,le);break;case 3:const ge=N<=1?le:Math.ceil(j+this._config.deviceCharHeight-N/2)-J,pe=N<=1?ie:Math.ceil(j+this._config.deviceCharHeight+N/2)-J,Le=new Path2D;Le.rect(ee,ie,this._config.deviceCellWidth,le-ie),this._tmpCtx.clip(Le),this._tmpCtx.moveTo(ee-this._config.deviceCellWidth/2,_e),this._tmpCtx.bezierCurveTo(ee-this._config.deviceCellWidth/2,pe,ee,pe,ee,_e),this._tmpCtx.bezierCurveTo(ee,ge,fe,ge,fe,_e),this._tmpCtx.bezierCurveTo(fe,pe,K,pe,K,_e),this._tmpCtx.bezierCurveTo(K,ge,K+this._config.deviceCellWidth/2,ge,K+this._config.deviceCellWidth/2,_e);break;case 4:const me=ce===0?0:ce>=N?2*N-ce:N-ce;ce>=N||me===0?(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(ee+me,ie),this._tmpCtx.lineTo(K,ie)):(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(ee,ie),this._tmpCtx.lineTo(ee+me,ie),this._tmpCtx.moveTo(ee+me+N,ie),this._tmpCtx.lineTo(K,ie)),ce=(0,n.computeNextVariantOffset)(K-ee,N,ce);break;case 5:const Oe=.6,Pe=.3,Ce=K-ee,xe=Math.floor(Oe*Ce),Re=Math.floor(Pe*Ce),Ie=Ce-xe-Re;this._tmpCtx.setLineDash([xe,Re,Ie]),this._tmpCtx.moveTo(ee,ie),this._tmpCtx.lineTo(K,ie);break;default:this._tmpCtx.moveTo(ee,ie),this._tmpCtx.lineTo(K,ie)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Q&&this._config.fontSize>=12&&!this._config.allowTransparency&&x!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const ne=this._tmpCtx.measureText(x);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in ne&&ne.actualBoundingBoxDescent>0){this._tmpCtx.save();const ee=new Path2D;ee.rect(se,ie-Math.ceil(N/2),this._config.deviceCellWidth*re,le-ie+Math.ceil(N/2)),this._tmpCtx.clip(ee),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(x,j,j+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(I){const N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=N%2==1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*re,j+J),this._tmpCtx.stroke()}if(Q||this._tmpCtx.fillText(x,j,j+this._config.deviceCharHeight),x==="_"&&!this._config.allowTransparency){let N=u(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),E,V,q);if(N)for(let J=1;J<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(x,j,j+this._config.deviceCharHeight-J),N=u(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),E,V,q),N);J++);}if(D){const N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),J=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*re,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function(N){for(let J=0;J<N.data.length;J+=4)if(N.data[J+3]>0)return!1;return!0}(de):u(de,E,V,q),ue)return i;const Z=this._findGlyphBoundingBox(de,this._workBoundingBox,M,W,Q,j);let G,X;for(;;){if(this._activePages.length===0){const N=this._createNewPage();G=N,X=N.currentRow,X.height=Z.size.y;break}G=this._activePages[this._activePages.length-1],X=G.currentRow;for(const N of this._activePages)Z.size.y<=N.currentRow.height&&(G=N,X=N.currentRow);for(let N=this._activePages.length-1;N>=0;N--)for(const J of this._activePages[N].fixedRows)J.height<=X.height&&Z.size.y<=J.height&&(G=this._activePages[N],X=J);if(X.y+Z.size.y>=G.canvas.height||X.height>Z.size.y+2){let N=!1;if(G.currentRow.y+G.currentRow.height+Z.size.y>=G.canvas.height){let J;for(const se of this._activePages)if(se.currentRow.y+se.currentRow.height+Z.size.y<se.canvas.height){J=se;break}if(J)G=J;else if(d.maxAtlasPages&&this._pages.length>=d.maxAtlasPages&&X.y+Z.size.y<=G.canvas.height&&X.height>=Z.size.y&&X.x+Z.size.x<=G.canvas.width)N=!0;else{const se=this._createNewPage();G=se,X=se.currentRow,X.height=Z.size.y,N=!0}}N||(G.currentRow.height>0&&G.fixedRows.push(G.currentRow),X={x:0,y:G.currentRow.y+G.currentRow.height,height:Z.size.y},G.fixedRows.push(X),G.currentRow={x:0,y:X.y+X.height,height:0})}if(X.x+Z.size.x<=G.canvas.width)break;X===G.currentRow?(X.x=0,X.y+=X.height,X.height=0):G.fixedRows.splice(G.fixedRows.indexOf(X),1)}return Z.texturePage=this._pages.indexOf(G),Z.texturePosition.x=X.x,Z.texturePosition.y=X.y,Z.texturePositionClipSpace.x=X.x/G.canvas.width,Z.texturePositionClipSpace.y=X.y/G.canvas.height,Z.sizeClipSpace.x/=G.canvas.width,Z.sizeClipSpace.y/=G.canvas.height,X.height=Math.max(X.height,Z.size.y),X.x+=Z.size.x,G.ctx.putImageData(de,Z.texturePosition.x-this._workBoundingBox.left,Z.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Z.size.x,Z.size.y),G.addGlyph(Z),G.version++,Z}_findGlyphBoundingBox(p,S,y,b,w,x){S.top=0;const M=b?this._config.deviceCellHeight:this._tmpCanvas.height,B=b?this._config.deviceCellWidth:y;let T=!1;for(let k=0;k<M;k++){for(let C=0;C<B;C++){const L=k*this._tmpCanvas.width*4+4*C+3;if(p.data[L]!==0){S.top=k,T=!0;break}}if(T)break}S.left=0,T=!1;for(let k=0;k<x+B;k++){for(let C=0;C<M;C++){const L=C*this._tmpCanvas.width*4+4*k+3;if(p.data[L]!==0){S.left=k,T=!0;break}}if(T)break}S.right=B,T=!1;for(let k=x+B-1;k>=x;k--){for(let C=0;C<M;C++){const L=C*this._tmpCanvas.width*4+4*k+3;if(p.data[L]!==0){S.right=k,T=!0;break}}if(T)break}S.bottom=M,T=!1;for(let k=M-1;k>=0;k--){for(let C=0;C<B;C++){const L=k*this._tmpCanvas.width*4+4*C+3;if(p.data[L]!==0){S.bottom=k,T=!0;break}}if(T)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:S.right-S.left+1,y:S.bottom-S.top+1},sizeClipSpace:{x:S.right-S.left+1,y:S.bottom-S.top+1},offset:{x:-S.left+x+(b||w?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-S.top+x+(b||w?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}t.TextureAtlas=d;class g{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(p){this._glyphs.push(p),this._usedPixels+=p.size.x*p.size.y}constructor(p,S,y){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],y)for(const b of y)this._glyphs.push(...b.glyphs),this._usedPixels+=b._usedPixels;this.canvas=m(p,S,S),this.ctx=(0,n.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function u(_,p,S,y){const b=p.rgba>>>24,w=p.rgba>>>16&255,x=p.rgba>>>8&255,M=S.rgba>>>24,B=S.rgba>>>16&255,T=S.rgba>>>8&255,k=Math.floor((Math.abs(b-M)+Math.abs(w-B)+Math.abs(x-T))/12);let C=!0;for(let L=0;L<_.data.length;L+=4)_.data[L]===b&&_.data[L+1]===w&&_.data[L+2]===x||y&&Math.abs(_.data[L]-b)+Math.abs(_.data[L+1]-w)+Math.abs(_.data[L+2]-x)<k?_.data[L+3]=0:C=!1;return C}function m(_,p,S){const y=_.createElement("canvas");return y.width=p,y.height=S,y}},160:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,h=0,c=0,n=0;var l,f,v,o,e;function r(s){const d=s.toString(16);return d.length<2?"0"+d:d}function i(s,d){return s<d?(d+.05)/(s+.05):(s+.05)/(d+.05)}t.NULL_COLOR={css:"#00000000",rgba:0},function(s){s.toCss=function(d,g,u,m){return m!==void 0?`#${r(d)}${r(g)}${r(u)}${r(m)}`:`#${r(d)}${r(g)}${r(u)}`},s.toRgba=function(d,g,u,m=255){return(d<<24|g<<16|u<<8|m)>>>0},s.toColor=function(d,g,u,m){return{css:s.toCss(d,g,u,m),rgba:s.toRgba(d,g,u,m)}}}(l||(t.channels=l={})),function(s){function d(g,u){return n=Math.round(255*u),[a,h,c]=e.toChannels(g.rgba),{css:l.toCss(a,h,c,n),rgba:l.toRgba(a,h,c,n)}}s.blend=function(g,u){if(n=(255&u.rgba)/255,n===1)return{css:u.css,rgba:u.rgba};const m=u.rgba>>24&255,_=u.rgba>>16&255,p=u.rgba>>8&255,S=g.rgba>>24&255,y=g.rgba>>16&255,b=g.rgba>>8&255;return a=S+Math.round((m-S)*n),h=y+Math.round((_-y)*n),c=b+Math.round((p-b)*n),{css:l.toCss(a,h,c),rgba:l.toRgba(a,h,c)}},s.isOpaque=function(g){return(255&g.rgba)==255},s.ensureContrastRatio=function(g,u,m){const _=e.ensureContrastRatio(g.rgba,u.rgba,m);if(_)return l.toColor(_>>24&255,_>>16&255,_>>8&255)},s.opaque=function(g){const u=(255|g.rgba)>>>0;return[a,h,c]=e.toChannels(u),{css:l.toCss(a,h,c),rgba:u}},s.opacity=d,s.multiplyOpacity=function(g,u){return n=255&g.rgba,d(g,n*u/255)},s.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]}}(f||(t.color=f={})),function(s){let d,g;try{const u=document.createElement("canvas");u.width=1,u.height=1;const m=u.getContext("2d",{willReadFrequently:!0});m&&(d=m,d.globalCompositeOperation="copy",g=d.createLinearGradient(0,0,1,1))}catch{}s.toColor=function(u){if(u.match(/#[\da-f]{3,8}/i))switch(u.length){case 4:return a=parseInt(u.slice(1,2).repeat(2),16),h=parseInt(u.slice(2,3).repeat(2),16),c=parseInt(u.slice(3,4).repeat(2),16),l.toColor(a,h,c);case 5:return a=parseInt(u.slice(1,2).repeat(2),16),h=parseInt(u.slice(2,3).repeat(2),16),c=parseInt(u.slice(3,4).repeat(2),16),n=parseInt(u.slice(4,5).repeat(2),16),l.toColor(a,h,c,n);case 7:return{css:u,rgba:(parseInt(u.slice(1),16)<<8|255)>>>0};case 9:return{css:u,rgba:parseInt(u.slice(1),16)>>>0}}const m=u.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),h=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),l.toColor(a,h,c,n);if(!d||!g)throw new Error("css.toColor: Unsupported css format");if(d.fillStyle=g,d.fillStyle=u,typeof d.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(d.fillRect(0,0,1,1),[a,h,c,n]=d.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:l.toRgba(a,h,c,n),css:u}}}(v||(t.css=v={})),function(s){function d(g,u,m){const _=g/255,p=u/255,S=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.0722*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))}s.relativeLuminance=function(g){return d(g>>16&255,g>>8&255,255&g)},s.relativeLuminance2=d}(o||(t.rgb=o={})),function(s){function d(u,m,_){const p=u>>24&255,S=u>>16&255,y=u>>8&255;let b=m>>24&255,w=m>>16&255,x=m>>8&255,M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));for(;M<_&&(b>0||w>0||x>0);)b-=Math.max(0,Math.ceil(.1*b)),w-=Math.max(0,Math.ceil(.1*w)),x-=Math.max(0,Math.ceil(.1*x)),M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));return(b<<24|w<<16|x<<8|255)>>>0}function g(u,m,_){const p=u>>24&255,S=u>>16&255,y=u>>8&255;let b=m>>24&255,w=m>>16&255,x=m>>8&255,M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));for(;M<_&&(b<255||w<255||x<255);)b=Math.min(255,b+Math.ceil(.1*(255-b))),w=Math.min(255,w+Math.ceil(.1*(255-w))),x=Math.min(255,x+Math.ceil(.1*(255-x))),M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));return(b<<24|w<<16|x<<8|255)>>>0}s.blend=function(u,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,p=m>>16&255,S=m>>8&255,y=u>>24&255,b=u>>16&255,w=u>>8&255;return a=y+Math.round((_-y)*n),h=b+Math.round((p-b)*n),c=w+Math.round((S-w)*n),l.toRgba(a,h,c)},s.ensureContrastRatio=function(u,m,_){const p=o.relativeLuminance(u>>8),S=o.relativeLuminance(m>>8);if(i(p,S)<_){if(S<p){const w=d(u,m,_),x=i(p,o.relativeLuminance(w>>8));if(x<_){const M=g(u,m,_);return x>i(p,o.relativeLuminance(M>>8))?w:M}return w}const y=g(u,m,_),b=i(p,o.relativeLuminance(y>>8));if(b<_){const w=d(u,m,_);return b>i(p,o.relativeLuminance(w>>8))?y:w}return y}},s.reduceLuminance=d,s.increaseLuminance=g,s.toChannels=function(u){return[u>>24&255,u>>16&255,u>>8&255,255&u]}}(e||(t.rgba=e={})),t.toPaddedHex=r,t.contrastRatio=i},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===a)return void this._listeners.splice(h,1)}}})),this._event}fire(a,h){const c=[];for(let n=0;n<this._listeners.length;n++)c.push(this._listeners[n]);for(let n=0;n<c.length;n++)c[n].call(void 0,a,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},t.forwardEvent=function(a,h){return a(c=>h.fire(c))},t.runAndSubscribe=function(a,h){return h(void 0),a(c=>h(c))}},859:(O,t)=>{function a(h){for(const c of h)c.dispose();h.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const c=this._disposables.indexOf(h);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var c;this._isDisposed||h===this._value||((c=this._value)==null||c.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},t.toDisposable=function(h){return{dispose:h}},t.disposeArray=a,t.getDisposeArrayDisposable=function(h){return{dispose:()=>a(h)}}},485:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,l){this._data[c]||(this._data[c]={}),this._data[c][n]=l}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(h,c,n,l,f){this._data.get(h,c)||this._data.set(h,c,new a),this._data.get(h,c).set(n,l,f)}get(h,c,n,l){var f;return(f=this._data.get(h,c))==null?void 0:f.get(n,l)}clear(){this._data.clear()}}},399:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,h=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),t.isIpad=h==="iPad",t.isIphone=h==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),t.isLinux=h.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},385:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const h=a(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(f){this._tasks.push(f),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(f){this._idleCallback=void 0;let v=0,o=0,e=f.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(v=Date.now(),this._tasks[this._i]()||this._i++,v=Math.max(1,Date.now()-v),o=Math.max(v,o),r=f.timeRemaining(),1.5*o>r)return e-v<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-v))}ms`),void this._start();e=r}this.clear()}}class n extends c{_requestCallback(f){return setTimeout(()=>f(this._createDeadline(16)))}_cancelCallback(f){clearTimeout(f)}_createDeadline(f){const v=Date.now()+f;return{timeRemaining:()=>Math.max(0,v-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(l){return requestIdleCallback(l)}_cancelCallback(l){cancelIdleCallback(l)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(l){this._queue.clear(),this._queue.enqueue(l)}flush(){this._queue.flush()}}},147:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){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()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,l=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=l}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=h},782:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const h=a(133),c=a(855),n=a(147);class l extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(v){const o=new l;return o.setFromCharData(v),o}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(v){this.fg=v[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let o=!1;if(v[c.CHAR_DATA_CHAR_INDEX].length>2)o=!0;else if(v[c.CHAR_DATA_CHAR_INDEX].length===2){const e=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const r=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(e-55296)+r-56320+65536|v[c.CHAR_DATA_WIDTH_INDEX]<<22:o=!0}else o=!0}else this.content=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[c.CHAR_DATA_WIDTH_INDEX]<<22;o&&(this.combinedData=v[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|v[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=l},855:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,h=0,c=a.length){let n="";for(let l=h;l<c;++l){let f=a[l];f>65535?(f-=65536,n+=String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):n+=String.fromCharCode(f)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,h){const c=a.length;if(!c)return 0;let n=0,l=0;if(this._interim){const f=a.charCodeAt(l++);56320<=f&&f<=57343?h[n++]=1024*(this._interim-55296)+f-56320+65536:(h[n++]=this._interim,h[n++]=f),this._interim=0}for(let f=l;f<c;++f){const v=a.charCodeAt(f);if(55296<=v&&v<=56319){if(++f>=c)return this._interim=v,n;const o=a.charCodeAt(f);56320<=o&&o<=57343?h[n++]=1024*(v-55296)+o-56320+65536:(h[n++]=v,h[n++]=o)}else v!==65279&&(h[n++]=v)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,h){const c=a.length;if(!c)return 0;let n,l,f,v,o=0,e=0,r=0;if(this.interim[0]){let d=!1,g=this.interim[0];g&=(224&g)==192?31:(240&g)==224?15:7;let u,m=0;for(;(u=63&this.interim[++m])&&m<4;)g<<=6,g|=u;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,p=_-m;for(;r<p;){if(r>=c)return 0;if(u=a[r++],(192&u)!=128){r--,d=!0;break}this.interim[m++]=u,g<<=6,g|=63&u}d||(_===2?g<128?r--:h[o++]=g:_===3?g<2048||g>=55296&&g<=57343||g===65279||(h[o++]=g):g<65536||g>1114111||(h[o++]=g)),this.interim.fill(0)}const i=c-4;let s=r;for(;s<c;){for(;!(!(s<i)||128&(n=a[s])||128&(l=a[s+1])||128&(f=a[s+2])||128&(v=a[s+3]));)h[o++]=n,h[o++]=l,h[o++]=f,h[o++]=v,s+=4;if(n=a[s++],n<128)h[o++]=n;else if((224&n)==192){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(e=(31&n)<<6|63&l,e<128){s--;continue}h[o++]=e}else if((240&n)==224){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,o;if(f=a[s++],(192&f)!=128){s--;continue}if(e=(15&n)<<12|(63&l)<<6|63&f,e<2048||e>=55296&&e<=57343||e===65279)continue;h[o++]=e}else if((248&n)==240){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,o;if(f=a[s++],(192&f)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,this.interim[2]=f,o;if(v=a[s++],(192&v)!=128){s--;continue}if(e=(7&n)<<18|(63&l)<<12|(63&f)<<6|63&v,e<65536||e>1114111)continue;h[o++]=e}}return o}}},776:function(O,t,a){var h=this&&this.__decorate||function(e,r,i,s){var d,g=arguments.length,u=g<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,r,i,s);else for(var m=e.length-1;m>=0;m--)(d=e[m])&&(u=(g<3?d(u):g>3?d(r,i,u):d(r,i))||u);return g>3&&u&&Object.defineProperty(r,i,u),u},c=this&&this.__param||function(e,r){return function(i,s){r(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(859),l=a(97),f={trace:l.LogLevelEnum.TRACE,debug:l.LogLevelEnum.DEBUG,info:l.LogLevelEnum.INFO,warn:l.LogLevelEnum.WARN,error:l.LogLevelEnum.ERROR,off:l.LogLevelEnum.OFF};let v,o=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=l.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),v=this}_updateLogLevel(){this._logLevel=f[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let r=0;r<e.length;r++)typeof e[r]=="function"&&(e[r]=e[r]())}_log(e,r,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+r,...i)}trace(e,...r){var i;this._logLevel<=l.LogLevelEnum.TRACE&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,r)}debug(e,...r){var i;this._logLevel<=l.LogLevelEnum.DEBUG&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,r)}info(e,...r){var i;this._logLevel<=l.LogLevelEnum.INFO&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,r)}warn(e,...r){var i;this._logLevel<=l.LogLevelEnum.WARN&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,r)}error(e,...r){var i;this._logLevel<=l.LogLevelEnum.ERROR&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,r)}};t.LogService=o=h([c(0,l.IOptionsService)],o),t.setTraceLogger=function(e){v=e},t.traceCall=function(e,r,i){if(typeof i.value!="function")throw new Error("not supported");const s=i.value;i.value=function(...d){if(v.logLevel!==l.LogLevelEnum.TRACE)return s.apply(this,d);v.trace(`GlyphRenderer#${s.name}(${d.map(u=>JSON.stringify(u)).join(", ")})`);const g=s.apply(this,d);return v.trace(`GlyphRenderer#${s.name} return`,g),g}}},726:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",h="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[h]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(l,f,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(o,e,r){e[a]===e?e[h].push({id:o,index:r}):(e[h]=[{id:o,index:r}],e[a]=e)})(n,l,v)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},97:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const h=a(726);var c;t.IBufferService=(0,h.createDecorator)("BufferService"),t.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),t.ICoreService=(0,h.createDecorator)("CoreService"),t.ICharsetService=(0,h.createDecorator)("CharsetService"),t.IInstantiationService=(0,h.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,h.createDecorator)("LogService"),t.IOptionsService=(0,h.createDecorator)("OptionsService"),t.IOscLinkService=(0,h.createDecorator)("OscLinkService"),t.IUnicodeService=(0,h.createDecorator)("UnicodeService"),t.IDecorationService=(0,h.createDecorator)("DecorationService")}},te={};function Y(O){var t=te[O];if(t!==void 0)return t.exports;var a=te[O]={exports:{}};return he[O].call(a.exports,a,a.exports,Y),a.exports}var oe={};return(()=>{var O=oe;Object.defineProperty(O,"__esModule",{value:!0}),O.WebglAddon=void 0;const t=Y(345),a=Y(859),h=Y(399),c=Y(666),n=Y(776);class l extends a.Disposable{constructor(v){if(h.isSafari&&(0,h.getSafariVersion)()<16){const o={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",o))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=v,this._onChangeTextureAtlas=this.register(new t.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new t.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new t.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new t.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(v){const o=v._core;if(!v.element)return void this.register(o.onWillOpen(()=>this.activate(v)));this._terminal=v;const e=o.coreService,r=o.optionsService,i=o,s=i._renderService,d=i._characterJoinerService,g=i._charSizeService,u=i._coreBrowserService,m=i._decorationService,_=i._logService,p=i._themeService;(0,n.setTraceLogger)(_),this._renderer=this.register(new c.WebglRenderer(v,d,g,u,e,m,r,p,this._preserveDrawingBuffer)),this.register((0,t.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,t.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,t.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),s.setRenderer(this._renderer),this.register((0,a.toDisposable)(()=>{const S=this._terminal._core._renderService;S.setRenderer(this._terminal._core._createRenderer()),S.handleResize(v.cols,v.rows)}))}get textureAtlas(){var v;return(v=this._renderer)==null?void 0:v.textureAtlas}clearTextureAtlas(){var v;(v=this._renderer)==null||v.clearTextureAtlas()}}O.WebglAddon=l})(),oe})())}(ye)),ye.exports}var Ke=Ue(),Ee={exports:{}},Te;function Ne(){return Te||(Te=1,function(ae,ve){(function(he,te){ae.exports=te()})(globalThis,()=>(()=>{var he={4567:function(O,t,a){var h=this&&this.__decorate||function(i,s,d,g){var u,m=arguments.length,_=m<3?s:g===null?g=Object.getOwnPropertyDescriptor(s,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(i,s,d,g);else for(var p=i.length-1;p>=0;p--)(u=i[p])&&(_=(m<3?u(_):m>3?u(s,d,_):u(s,d))||_);return m>3&&_&&Object.defineProperty(s,d,_),_},c=this&&this.__param||function(i,s){return function(d,g){s(d,g,i)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const n=a(9042),l=a(9924),f=a(844),v=a(4725),o=a(2585),e=a(3656);let r=t.AccessibilityManager=class extends f.Disposable{constructor(i,s,d,g){super(),this._terminal=i,this._coreBrowserService=d,this._renderService=g,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new l.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(u=>this._handleResize(u.rows))),this.register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(u=>this._handleChar(u))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
59
- `))),this.register(this._terminal.onA11yTab(u=>this._handleTab(u))),this.register(this._terminal.onKey(u=>this._handleKey(u.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,e.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,f.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let s=0;s<i;s++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
60
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,s){this._liveRegionDebouncer.refresh(i,s,this._terminal.rows)}_renderRows(i,s){const d=this._terminal.buffer,g=d.lines.length.toString();for(let u=i;u<=s;u++){const m=d.lines.get(d.ydisp+u),_=[],p=(m==null?void 0:m.translateToString(!0,void 0,void 0,_))||"",S=(d.ydisp+u+1).toString(),y=this._rowElements[u];y&&(p.length===0?(y.innerText=" ",this._rowColumns.set(y,[0,1])):(y.textContent=p,this._rowColumns.set(y,_)),y.setAttribute("aria-posinset",S),y.setAttribute("aria-setsize",g))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,s){const d=i.target,g=this._rowElements[s===0?1:this._rowElements.length-2];if(d.getAttribute("aria-posinset")===(s===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==g)return;let u,m;if(s===0?(u=d,m=this._rowElements.pop(),this._rowContainer.removeChild(m)):(u=this._rowElements.shift(),m=d,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),m.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){const _=this._createAccessibilityTreeNode();this._rowElements.unshift(_),this._rowContainer.insertAdjacentElement("afterbegin",_)}else{const _=this._createAccessibilityTreeNode();this._rowElements.push(_),this._rowContainer.appendChild(_)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleSelectionChange(){var p;if(this._rowElements.length===0)return;const i=document.getSelection();if(!i)return;if(i.isCollapsed)return void(this._rowContainer.contains(i.anchorNode)&&this._terminal.clearSelection());if(!i.anchorNode||!i.focusNode)return void console.error("anchorNode and/or focusNode are null");let s={node:i.anchorNode,offset:i.anchorOffset},d={node:i.focusNode,offset:i.focusOffset};if((s.node.compareDocumentPosition(d.node)&Node.DOCUMENT_POSITION_PRECEDING||s.node===d.node&&s.offset>d.offset)&&([s,d]=[d,s]),s.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(s={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(s.node))return;const g=this._rowElements.slice(-1)[0];if(d.node.compareDocumentPosition(g)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(d={node:g,offset:((p=g.textContent)==null?void 0:p.length)??0}),!this._rowContainer.contains(d.node))return;const u=({node:S,offset:y})=>{const b=S instanceof Text?S.parentNode:S;let w=parseInt(b==null?void 0:b.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const x=this._rowColumns.get(b);if(!x)return console.warn("columns is null. Race condition?"),null;let M=y<x.length?x[y]:x.slice(-1)[0]+1;return M>=this._terminal.cols&&(++w,M=0),{row:w,column:M}},m=u(s),_=u(d);if(m&&_){if(m.row>_.row||m.row===_.row&&m.column>=_.column)throw new Error("invalid range");this._terminal.select(m.column,m.row,(_.row-m.row)*this._terminal.cols-m.column+_.column)}}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=this._coreBrowserService.mainDocument.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};t.AccessibilityManager=r=h([c(1,o.IInstantiationService),c(2,v.ICoreBrowserService),c(3,v.IRenderService)],r)},3614:(O,t)=>{function a(l){return l.replace(/\r?\n/g,"\r")}function h(l,f){return f?"\x1B[200~"+l+"\x1B[201~":l}function c(l,f,v,o){l=h(l=a(l),v.decPrivateModes.bracketedPasteMode&&o.rawOptions.ignoreBracketedPasteMode!==!0),v.triggerDataEvent(l,!0),f.value=""}function n(l,f,v){const o=v.getBoundingClientRect(),e=l.clientX-o.left-10,r=l.clientY-o.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${r}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=a,t.bracketTextForPaste=h,t.copyHandler=function(l,f){l.clipboardData&&l.clipboardData.setData("text/plain",f.selectionText),l.preventDefault()},t.handlePasteEvent=function(l,f,v,o){l.stopPropagation(),l.clipboardData&&c(l.clipboardData.getData("text/plain"),f,v,o)},t.paste=c,t.moveTextAreaUnderMouseCursor=n,t.rightClickHandler=function(l,f,v,o,e){n(l,f,v),e&&o.rightClickSelect(l),f.value=o.selectionText,f.select()}},7239:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const h=a(1505);t.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(c,n,l){this._css.set(c,n,l)}getCss(c,n){return this._css.get(c,n)}setColor(c,n,l){this._color.set(c,n,l)}getColor(c,n){return this._color.get(c,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(a,h,c,n){a.addEventListener(h,c,n);let l=!1;return{dispose:()=>{l||(l=!0,a.removeEventListener(h,c,n))}}}},3551:function(O,t,a){var h=this&&this.__decorate||function(r,i,s,d){var g,u=arguments.length,m=u<3?i:d===null?d=Object.getOwnPropertyDescriptor(i,s):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,i,s,d);else for(var _=r.length-1;_>=0;_--)(g=r[_])&&(m=(u<3?g(m):u>3?g(i,s,m):g(i,s))||m);return u>3&&m&&Object.defineProperty(i,s,m),m},c=this&&this.__param||function(r,i){return function(s,d){i(s,d,r)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier=void 0;const n=a(3656),l=a(8460),f=a(844),v=a(2585),o=a(4725);let e=t.Linkifier=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(r,i,s,d,g){super(),this._element=r,this._mouseService=i,this._renderService=s,this._bufferService=d,this._linkProviderService=g,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new l.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new l.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{var u;this._lastMouseEvent=void 0,(u=this._activeProviderReplies)==null||u.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(r){this._lastMouseEvent=r;const i=this._positionFromMouseEvent(r,this._element,this._mouseService);if(!i)return;this._isMouseOut=!1;const s=r.composedPath();for(let d=0;d<s.length;d++){const g=s[d];if(g.classList.contains("xterm"))break;if(g.classList.contains("xterm-hover"))return}this._lastBufferCell&&i.x===this._lastBufferCell.x&&i.y===this._lastBufferCell.y||(this._handleHover(i),this._lastBufferCell=i)}_handleHover(r){if(this._activeLine!==r.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(r,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,r)||(this._clearCurrentLink(),this._askForLink(r,!0))}_askForLink(r,i){var d,g;this._activeProviderReplies&&i||((d=this._activeProviderReplies)==null||d.forEach(u=>{u==null||u.forEach(m=>{m.link.dispose&&m.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=r.y);let s=!1;for(const[u,m]of this._linkProviderService.linkProviders.entries())i?(g=this._activeProviderReplies)!=null&&g.get(u)&&(s=this._checkLinkProviderResult(u,r,s)):m.provideLinks(r.y,_=>{var S,y;if(this._isMouseOut)return;const p=_==null?void 0:_.map(b=>({link:b}));(S=this._activeProviderReplies)==null||S.set(u,p),s=this._checkLinkProviderResult(u,r,s),((y=this._activeProviderReplies)==null?void 0:y.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(r.y,this._activeProviderReplies)})}_removeIntersectingLinks(r,i){const s=new Set;for(let d=0;d<i.size;d++){const g=i.get(d);if(g)for(let u=0;u<g.length;u++){const m=g[u],_=m.link.range.start.y<r?0:m.link.range.start.x,p=m.link.range.end.y>r?this._bufferService.cols:m.link.range.end.x;for(let S=_;S<=p;S++){if(s.has(S)){g.splice(u--,1);break}s.add(S)}}}}_checkLinkProviderResult(r,i,s){var u;if(!this._activeProviderReplies)return s;const d=this._activeProviderReplies.get(r);let g=!1;for(let m=0;m<r;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(g=!0);if(!g&&d){const m=d.find(_=>this._linkAtPosition(_.link,i));m&&(s=!0,this._handleNewLink(m))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!s)for(let m=0;m<this._activeProviderReplies.size;m++){const _=(u=this._activeProviderReplies.get(m))==null?void 0:u.find(p=>this._linkAtPosition(p.link,i));if(_){s=!0,this._handleNewLink(_);break}}return s}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(r){if(!this._currentLink)return;const i=this._positionFromMouseEvent(r,this._element,this._mouseService);i&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,i)&&this._currentLink.link.activate(r,this._currentLink.link.text)}_clearCurrentLink(r,i){this._currentLink&&this._lastMouseEvent&&(!r||!i||this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=i)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(r){if(!this._lastMouseEvent)return;const i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._linkAtPosition(r.link,i)&&(this._currentLink=r,this._currentLink.state={decorations:{underline:r.link.decorations===void 0||r.link.decorations.underline,pointerCursor:r.link.decorations===void 0||r.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,r.link,this._lastMouseEvent),r.link.decorations={},Object.defineProperties(r.link.decorations,{pointerCursor:{get:()=>{var s,d;return(d=(s=this._currentLink)==null?void 0:s.state)==null?void 0:d.decorations.pointerCursor},set:s=>{var d;(d=this._currentLink)!=null&&d.state&&this._currentLink.state.decorations.pointerCursor!==s&&(this._currentLink.state.decorations.pointerCursor=s,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",s))}},underline:{get:()=>{var s,d;return(d=(s=this._currentLink)==null?void 0:s.state)==null?void 0:d.decorations.underline},set:s=>{var d,g,u;(d=this._currentLink)!=null&&d.state&&((u=(g=this._currentLink)==null?void 0:g.state)==null?void 0:u.decorations.underline)!==s&&(this._currentLink.state.decorations.underline=s,this._currentLink.state.isHovered&&this._fireUnderlineEvent(r.link,s))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(s=>{if(!this._currentLink)return;const d=s.start===0?0:s.start+1+this._bufferService.buffer.ydisp,g=this._bufferService.buffer.ydisp+1+s.end;if(this._currentLink.link.range.start.y>=d&&this._currentLink.link.range.end.y<=g&&(this._clearCurrentLink(d,g),this._lastMouseEvent)){const u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._askForLink(u,!1)}})))}_linkHover(r,i,s){var d;(d=this._currentLink)!=null&&d.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!0),this._currentLink.state.decorations.pointerCursor&&r.classList.add("xterm-cursor-pointer")),i.hover&&i.hover(s,i.text)}_fireUnderlineEvent(r,i){const s=r.range,d=this._bufferService.buffer.ydisp,g=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-d-1,s.end.x,s.end.y-d-1,void 0);(i?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(g)}_linkLeave(r,i,s){var d;(d=this._currentLink)!=null&&d.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!1),this._currentLink.state.decorations.pointerCursor&&r.classList.remove("xterm-cursor-pointer")),i.leave&&i.leave(s,i.text)}_linkAtPosition(r,i){const s=r.range.start.y*this._bufferService.cols+r.range.start.x,d=r.range.end.y*this._bufferService.cols+r.range.end.x,g=i.y*this._bufferService.cols+i.x;return s<=g&&g<=d}_positionFromMouseEvent(r,i,s){const d=s.getCoords(r,i,this._bufferService.cols,this._bufferService.rows);if(d)return{x:d[0],y:d[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(r,i,s,d,g){return{x1:r,y1:i,x2:s,y2:d,cols:this._bufferService.cols,fg:g}}};t.Linkifier=e=h([c(1,o.IMouseService),c(2,o.IRenderService),c(3,v.IBufferService),c(4,o.ILinkProviderService)],e)},9042:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(O,t,a){var h=this&&this.__decorate||function(o,e,r,i){var s,d=arguments.length,g=d<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(o,e,r,i);else for(var u=o.length-1;u>=0;u--)(s=o[u])&&(g=(d<3?s(g):d>3?s(e,r,g):s(e,r))||g);return d>3&&g&&Object.defineProperty(e,r,g),g},c=this&&this.__param||function(o,e){return function(r,i){e(r,i,o)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;const n=a(511),l=a(2585);let f=t.OscLinkProvider=class{constructor(o,e,r){this._bufferService=o,this._optionsService=e,this._oscLinkService=r}provideLinks(o,e){var p;const r=this._bufferService.buffer.lines.get(o-1);if(!r)return void e(void 0);const i=[],s=this._optionsService.rawOptions.linkHandler,d=new n.CellData,g=r.getTrimmedLength();let u=-1,m=-1,_=!1;for(let S=0;S<g;S++)if(m!==-1||r.hasContent(S)){if(r.loadCell(S,d),d.hasExtendedAttrs()&&d.extended.urlId){if(m===-1){m=S,u=d.extended.urlId;continue}_=d.extended.urlId!==u}else m!==-1&&(_=!0);if(_||m!==-1&&S===g-1){const y=(p=this._oscLinkService.getLinkData(u))==null?void 0:p.uri;if(y){const b={start:{x:m+1,y:o},end:{x:S+(_||S!==g-1?0:1),y:o}};let w=!1;if(!(s!=null&&s.allowNonHttpProtocols))try{const x=new URL(y);["http:","https:"].includes(x.protocol)||(w=!0)}catch{w=!0}w||i.push({text:y,range:b,activate:(x,M)=>s?s.activate(x,M,b):v(0,M),hover:(x,M)=>{var B;return(B=s==null?void 0:s.hover)==null?void 0:B.call(s,x,M,b)},leave:(x,M)=>{var B;return(B=s==null?void 0:s.leave)==null?void 0:B.call(s,x,M,b)}})}_=!1,d.hasExtendedAttrs()&&d.extended.urlId?(m=S,u=d.extended.urlId):(m=-1,u=-1)}}e(i)}};function v(o,e){if(confirm(`Do you want to navigate to ${e}?
61
-
62
- WARNING: This link could potentially be dangerous`)){const r=window.open();if(r){try{r.opener=null}catch{}r.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}t.OscLinkProvider=f=h([c(0,l.IBufferService),c(1,l.IOptionsService),c(2,l.IOscLinkService)],f)},6193:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(a,h){this._renderCallback=a,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,h,c){this._rowCount=c,a=a!==void 0?a:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const a=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;const h=a(3614),c=a(3656),n=a(3551),l=a(9042),f=a(3730),v=a(1680),o=a(3107),e=a(5744),r=a(2950),i=a(1296),s=a(428),d=a(4269),g=a(5114),u=a(8934),m=a(3230),_=a(9312),p=a(4725),S=a(6731),y=a(8055),b=a(8969),w=a(8460),x=a(844),M=a(6114),B=a(8437),T=a(2584),k=a(7399),C=a(5941),L=a(9074),R=a(2585),D=a(5435),I=a(4567),H=a(779);class z extends b.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(A={}){super(A),this.browser=M,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new x.MutableDisposable),this._onCursorMove=this.register(new w.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new w.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new w.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new w.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new w.EventEmitter),this._onBlur=this.register(new w.EventEmitter),this._onA11yCharEmitter=this.register(new w.EventEmitter),this._onA11yTabEmitter=this.register(new w.EventEmitter),this._onWillOpen=this.register(new w.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(R.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(H.LinkProviderService),this._instantiationService.setService(p.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(f.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((E,F)=>this.refresh(E,F))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(E=>this._reportWindowsOptions(E))),this.register(this._inputHandler.onColor(E=>this._handleColorEvent(E))),this.register((0,w.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,w.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,w.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,w.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(E=>this._afterResize(E.cols,E.rows))),this.register((0,x.toDisposable)(()=>{var E,F;this._customKeyEventHandler=void 0,(F=(E=this.element)==null?void 0:E.parentNode)==null||F.removeChild(this.element)}))}_handleColorEvent(A){if(this._themeService)for(const E of A){let F,P="";switch(E.index){case 256:F="foreground",P="10";break;case 257:F="background",P="11";break;case 258:F="cursor",P="12";break;default:F="ansi",P="4;"+E.index}switch(E.type){case 0:const $=y.color.toColorRGB(F==="ansi"?this._themeService.colors.ansi[E.index]:this._themeService.colors[F]);this.coreService.triggerDataEvent(`${T.C0.ESC}]${P};${(0,C.toRgbString)($)}${T.C1_ESCAPED.ST}`);break;case 1:if(F==="ansi")this._themeService.modifyColors(W=>W.ansi[E.index]=y.channels.toColor(...E.color));else{const W=F;this._themeService.modifyColors(V=>V[W]=y.channels.toColor(...E.color))}break;case 2:this._themeService.restoreColor(E.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(A){A?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(I.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(A){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(T.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var A;return(A=this.textarea)==null?void 0:A.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(T.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const A=this.buffer.ybase+this.buffer.y,E=this.buffer.lines.get(A);if(!E)return;const F=Math.min(this.buffer.x,this.cols-1),P=this._renderService.dimensions.css.cell.height,$=E.getWidth(F),W=this._renderService.dimensions.css.cell.width*$,V=this.buffer.y*this._renderService.dimensions.css.cell.height,j=F*this._renderService.dimensions.css.cell.width;this.textarea.style.left=j+"px",this.textarea.style.top=V+"px",this.textarea.style.width=W+"px",this.textarea.style.height=P+"px",this.textarea.style.lineHeight=P+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,c.addDisposableDomListener)(this.element,"copy",E=>{this.hasSelection()&&(0,h.copyHandler)(E,this._selectionService)}));const A=E=>(0,h.handlePasteEvent)(E,this.textarea,this.coreService,this.optionsService);this.register((0,c.addDisposableDomListener)(this.textarea,"paste",A)),this.register((0,c.addDisposableDomListener)(this.element,"paste",A)),M.isFirefox?this.register((0,c.addDisposableDomListener)(this.element,"mousedown",E=>{E.button===2&&(0,h.rightClickHandler)(E,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,c.addDisposableDomListener)(this.element,"contextmenu",E=>{(0,h.rightClickHandler)(E,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),M.isLinux&&this.register((0,c.addDisposableDomListener)(this.element,"auxclick",E=>{E.button===1&&(0,h.moveTextAreaUnderMouseCursor)(E,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,c.addDisposableDomListener)(this.textarea,"keyup",A=>this._keyUp(A),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"keydown",A=>this._keyDown(A),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"keypress",A=>this._keyPress(A),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionupdate",A=>this._compositionHelper.compositionupdate(A))),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,c.addDisposableDomListener)(this.textarea,"input",A=>this._inputEvent(A),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(A){var F;if(!A)throw new Error("Terminal requires a parent element.");if(A.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((F=this.element)==null?void 0:F.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=A.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),A.appendChild(this.element);const E=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),E.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,c.addDisposableDomListener)(this.screenElement,"mousemove",P=>this.updateCursorStyle(P))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),E.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.promptLabel),M.isChromeOS||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._coreBrowserService=this.register(this._instantiationService.createInstance(g.CoreBrowserService,this.textarea,A.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(p.ICoreBrowserService,this._coreBrowserService),this.register((0,c.addDisposableDomListener)(this.textarea,"focus",P=>this._handleTextAreaFocus(P))),this.register((0,c.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(s.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(p.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(S.ThemeService),this._instantiationService.setService(p.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(d.CharacterJoinerService),this._instantiationService.setService(p.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(m.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(p.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(P=>this._onRender.fire(P))),this.onResize(P=>this._renderService.resize(P.cols,P.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(r.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(u.MouseService),this._instantiationService.setService(p.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(n.Linkifier,this.screenElement)),this.element.appendChild(E);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(v.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(P=>this.scrollLines(P.amount,P.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(_.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(p.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(P=>this.scrollLines(P.amount,P.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(P=>this._renderService.handleSelectionChanged(P.start,P.end,P.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(P=>{this.textarea.value=P,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(P=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(o.BufferDecorationRenderer,this.screenElement)),this.register((0,c.addDisposableDomListener)(this.element,"mousedown",P=>this._selectionService.handleMouseDown(P))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(I.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",P=>this._handleScreenReaderModeOptionChange(P))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(e.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",P=>{!this._overviewRulerRenderer&&P&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(e.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(i.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const A=this,E=this.element;function F(W){const V=A._mouseService.getMouseReportCoords(W,A.screenElement);if(!V)return!1;let j,Q;switch(W.overrideType||W.type){case"mousemove":Q=32,W.buttons===void 0?(j=3,W.button!==void 0&&(j=W.button<3?W.button:3)):j=1&W.buttons?0:4&W.buttons?1:2&W.buttons?2:3;break;case"mouseup":Q=0,j=W.button<3?W.button:3;break;case"mousedown":Q=1,j=W.button<3?W.button:3;break;case"wheel":if(A._customWheelEventHandler&&A._customWheelEventHandler(W)===!1||A.viewport.getLinesScrolled(W)===0)return!1;Q=W.deltaY<0?0:1,j=4;break;default:return!1}return!(Q===void 0||j===void 0||j>4)&&A.coreMouseService.triggerMouseEvent({col:V.col,row:V.row,x:V.x,y:V.y,button:j,action:Q,ctrl:W.ctrlKey,alt:W.altKey,shift:W.shiftKey})}const P={mouseup:null,wheel:null,mousedrag:null,mousemove:null},$={mouseup:W=>(F(W),W.buttons||(this._document.removeEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.removeEventListener("mousemove",P.mousedrag)),this.cancel(W)),wheel:W=>(F(W),this.cancel(W,!0)),mousedrag:W=>{W.buttons&&F(W)},mousemove:W=>{W.buttons||F(W)}};this.register(this.coreMouseService.onProtocolChange(W=>{W?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(W)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&W?P.mousemove||(E.addEventListener("mousemove",$.mousemove),P.mousemove=$.mousemove):(E.removeEventListener("mousemove",P.mousemove),P.mousemove=null),16&W?P.wheel||(E.addEventListener("wheel",$.wheel,{passive:!1}),P.wheel=$.wheel):(E.removeEventListener("wheel",P.wheel),P.wheel=null),2&W?P.mouseup||(P.mouseup=$.mouseup):(this._document.removeEventListener("mouseup",P.mouseup),P.mouseup=null),4&W?P.mousedrag||(P.mousedrag=$.mousedrag):(this._document.removeEventListener("mousemove",P.mousedrag),P.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,c.addDisposableDomListener)(E,"mousedown",W=>{if(W.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(W))return F(W),P.mouseup&&this._document.addEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.addEventListener("mousemove",P.mousedrag),this.cancel(W)})),this.register((0,c.addDisposableDomListener)(E,"wheel",W=>{if(!P.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(W)===!1)return!1;if(!this.buffer.hasScrollback){const V=this.viewport.getLinesScrolled(W);if(V===0)return;const j=T.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(W.deltaY<0?"A":"B");let Q="";for(let re=0;re<Math.abs(V);re++)Q+=j;return this.coreService.triggerDataEvent(Q,!0),this.cancel(W,!0)}return this.viewport.handleWheel(W)?this.cancel(W):void 0}},{passive:!1})),this.register((0,c.addDisposableDomListener)(E,"touchstart",W=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(W),this.cancel(W)},{passive:!0})),this.register((0,c.addDisposableDomListener)(E,"touchmove",W=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(W)?void 0:this.cancel(W)},{passive:!1}))}refresh(A,E){var F;(F=this._renderService)==null||F.refreshRows(A,E)}updateCursorStyle(A){var E;(E=this._selectionService)!=null&&E.shouldColumnSelect(A)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(A,E,F=0){var P;F===1?(super.scrollLines(A,E,F),this.refresh(0,this.rows-1)):(P=this.viewport)==null||P.scrollLines(A)}paste(A){(0,h.paste)(A,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(A){this._customKeyEventHandler=A}attachCustomWheelEventHandler(A){this._customWheelEventHandler=A}registerLinkProvider(A){return this._linkProviderService.registerLinkProvider(A)}registerCharacterJoiner(A){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const E=this._characterJoinerService.register(A);return this.refresh(0,this.rows-1),E}deregisterCharacterJoiner(A){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(A)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(A){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+A)}registerDecoration(A){return this._decorationService.registerDecoration(A)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(A,E,F){this._selectionService.setSelection(A,E,F)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var A;(A=this._selectionService)==null||A.clearSelection()}selectAll(){var A;(A=this._selectionService)==null||A.selectAll()}selectLines(A,E){var F;(F=this._selectionService)==null||F.selectLines(A,E)}_keyDown(A){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(A)===!1)return!1;const E=this.browser.isMac&&this.options.macOptionIsMeta&&A.altKey;if(!E&&!this._compositionHelper.keydown(A))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;E||A.key!=="Dead"&&A.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const F=(0,k.evaluateKeyboardEvent)(A,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(A),F.type===3||F.type===2){const P=this.rows-1;return this.scrollLines(F.type===2?-P:P),this.cancel(A,!0)}return F.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,A)||(F.cancel&&this.cancel(A,!0),!F.key||!!(A.key&&!A.ctrlKey&&!A.altKey&&!A.metaKey&&A.key.length===1&&A.key.charCodeAt(0)>=65&&A.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(F.key!==T.C0.ETX&&F.key!==T.C0.CR||(this.textarea.value=""),this._onKey.fire({key:F.key,domEvent:A}),this._showCursor(),this.coreService.triggerDataEvent(F.key,!0),!this.optionsService.rawOptions.screenReaderMode||A.altKey||A.ctrlKey?this.cancel(A,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(A,E){const F=A.isMac&&!this.options.macOptionIsMeta&&E.altKey&&!E.ctrlKey&&!E.metaKey||A.isWindows&&E.altKey&&E.ctrlKey&&!E.metaKey||A.isWindows&&E.getModifierState("AltGraph");return E.type==="keypress"?F:F&&(!E.keyCode||E.keyCode>47)}_keyUp(A){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(A)===!1||(function(E){return E.keyCode===16||E.keyCode===17||E.keyCode===18}(A)||this.focus(),this.updateCursorStyle(A),this._keyPressHandled=!1)}_keyPress(A){let E;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(A)===!1)return!1;if(this.cancel(A),A.charCode)E=A.charCode;else if(A.which===null||A.which===void 0)E=A.keyCode;else{if(A.which===0||A.charCode===0)return!1;E=A.which}return!(!E||(A.altKey||A.ctrlKey||A.metaKey)&&!this._isThirdLevelShift(this.browser,A)||(E=String.fromCharCode(E),this._onKey.fire({key:E,domEvent:A}),this._showCursor(),this.coreService.triggerDataEvent(E,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(A){if(A.data&&A.inputType==="insertText"&&(!A.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const E=A.data;return this.coreService.triggerDataEvent(E,!0),this.cancel(A),!0}return!1}resize(A,E){A!==this.cols||E!==this.rows?super.resize(A,E):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(A,E){var F,P;(F=this._charSizeService)==null||F.measure(),(P=this.viewport)==null||P.syncScrollArea(!0)}clear(){var A;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(let E=1;E<this.rows;E++)this.buffer.lines.push(this.buffer.getBlankLine(B.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(A=this.viewport)==null||A.reset(),this.refresh(0,this.rows-1)}}reset(){var E,F;this.options.rows=this.rows,this.options.cols=this.cols;const A=this._customKeyEventHandler;this._setup(),super.reset(),(E=this._selectionService)==null||E.reset(),this._decorationService.reset(),(F=this.viewport)==null||F.reset(),this._customKeyEventHandler=A,this.refresh(0,this.rows-1)}clearTextureAtlas(){var A;(A=this._renderService)==null||A.clearTextureAtlas()}_reportFocus(){var A;(A=this.element)!=null&&A.classList.contains("focus")?this.coreService.triggerDataEvent(T.C0.ESC+"[I"):this.coreService.triggerDataEvent(T.C0.ESC+"[O")}_reportWindowsOptions(A){if(this._renderService)switch(A){case D.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const E=this._renderService.dimensions.css.canvas.width.toFixed(0),F=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${T.C0.ESC}[4;${F};${E}t`);break;case D.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const P=this._renderService.dimensions.css.cell.width.toFixed(0),$=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${T.C0.ESC}[6;${$};${P}t`)}}cancel(A,E){if(this.options.cancelEvents||E)return A.preventDefault(),A.stopPropagation(),!1}}t.Terminal=z},9924:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(a,h=1e3){this._renderCallback=a,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,h,c){this._rowCount=c,a=a!==void 0?a:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const n=Date.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){const l=n-this._lastRefreshMs,f=this._debounceThresholdMS-l;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},f)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const a=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,h)}}},1680:function(O,t,a){var h=this&&this.__decorate||function(r,i,s,d){var g,u=arguments.length,m=u<3?i:d===null?d=Object.getOwnPropertyDescriptor(i,s):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,i,s,d);else for(var _=r.length-1;_>=0;_--)(g=r[_])&&(m=(u<3?g(m):u>3?g(i,s,m):g(i,s))||m);return u>3&&m&&Object.defineProperty(i,s,m),m},c=this&&this.__param||function(r,i){return function(s,d){i(s,d,r)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;const n=a(3656),l=a(4725),f=a(8460),v=a(844),o=a(2585);let e=t.Viewport=class extends v.Disposable{constructor(r,i,s,d,g,u,m,_){super(),this._viewportElement=r,this._scrollArea=i,this._bufferService=s,this._optionsService=d,this._charSizeService=g,this._renderService=u,this._coreBrowserService=m,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(p=>this._activeBuffer=p.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(p=>this._renderDimensions=p)),this._handleThemeChange(_.colors),this.register(_.onChangeColors(p=>this._handleThemeChange(p))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(r){this._viewportElement.style.backgroundColor=r.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(r){if(r)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const i=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==i&&(this._lastRecordedBufferHeight=i,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null}syncScrollArea(r=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(r);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(r)}_handleScroll(r){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const i=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:i,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const r=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(r*(this._smoothScrollState.target-this._smoothScrollState.origin)),r<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(r,i){const s=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(i<0&&this._viewportElement.scrollTop!==0||i>0&&s<this._lastRecordedBufferHeight)||(r.cancelable&&r.preventDefault(),!1)}handleWheel(r){const i=this._getPixelsScrolled(r);return i!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+i:this._smoothScrollState.target+=i,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=i,this._bubbleScroll(r,i))}scrollLines(r){if(r!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const i=r*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+i,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:r,suppressScrollEvent:!1})}_getPixelsScrolled(r){if(r.deltaY===0||r.shiftKey)return 0;let i=this._applyScrollModifier(r.deltaY,r);return r.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._currentRowHeight:r.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._currentRowHeight*this._bufferService.rows),i}getBufferElements(r,i){var _;let s,d="";const g=[],u=i??this._bufferService.buffer.lines.length,m=this._bufferService.buffer.lines;for(let p=r;p<u;p++){const S=m.get(p);if(!S)continue;const y=(_=m.get(p+1))==null?void 0:_.isWrapped;if(d+=S.translateToString(!y),!y||p===m.length-1){const b=document.createElement("div");b.textContent=d,g.push(b),d.length>0&&(s=b),d=""}}return{bufferElements:g,cursorElement:s}}getLinesScrolled(r){if(r.deltaY===0||r.shiftKey)return 0;let i=this._applyScrollModifier(r.deltaY,r);return r.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=this._currentRowHeight+0,this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):r.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(r,i){const s=this._optionsService.rawOptions.fastScrollModifier;return s==="alt"&&i.altKey||s==="ctrl"&&i.ctrlKey||s==="shift"&&i.shiftKey?r*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:r*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(r){this._lastTouchY=r.touches[0].pageY}handleTouchMove(r){const i=this._lastTouchY-r.touches[0].pageY;return this._lastTouchY=r.touches[0].pageY,i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(r,i))}};t.Viewport=e=h([c(2,o.IBufferService),c(3,o.IOptionsService),c(4,l.ICharSizeService),c(5,l.IRenderService),c(6,l.ICoreBrowserService),c(7,l.IThemeService)],e)},3107:function(O,t,a){var h=this&&this.__decorate||function(o,e,r,i){var s,d=arguments.length,g=d<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(o,e,r,i);else for(var u=o.length-1;u>=0;u--)(s=o[u])&&(g=(d<3?s(g):d>3?s(e,r,g):s(e,r))||g);return d>3&&g&&Object.defineProperty(e,r,g),g},c=this&&this.__param||function(o,e){return function(r,i){e(r,i,o)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;const n=a(4725),l=a(844),f=a(2585);let v=t.BufferDecorationRenderer=class extends l.Disposable{constructor(o,e,r,i,s){super(),this._screenElement=o,this._bufferService=e,this._coreBrowserService=r,this._decorationService=i,this._renderService=s,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(d=>this._removeDecoration(d))),this.register((0,l.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const o of this._decorationService.decorations)this._renderDecoration(o);this._dimensionsChanged=!1}_renderDecoration(o){this._refreshStyle(o),this._dimensionsChanged&&this._refreshXPosition(o)}_createElement(o){var i;const e=this._coreBrowserService.mainDocument.createElement("div");e.classList.add("xterm-decoration"),e.classList.toggle("xterm-decoration-top-layer",((i=o==null?void 0:o.options)==null?void 0:i.layer)==="top"),e.style.width=`${Math.round((o.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,e.style.height=(o.options.height||1)*this._renderService.dimensions.css.cell.height+"px",e.style.top=(o.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",e.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const r=o.options.x??0;return r&&r>this._bufferService.cols&&(e.style.display="none"),this._refreshXPosition(o,e),e}_refreshStyle(o){const e=o.marker.line-this._bufferService.buffers.active.ydisp;if(e<0||e>=this._bufferService.rows)o.element&&(o.element.style.display="none",o.onRenderEmitter.fire(o.element));else{let r=this._decorationElements.get(o);r||(r=this._createElement(o),o.element=r,this._decorationElements.set(o,r),this._container.appendChild(r),o.onDispose(()=>{this._decorationElements.delete(o),r.remove()})),r.style.top=e*this._renderService.dimensions.css.cell.height+"px",r.style.display=this._altBufferIsActive?"none":"block",o.onRenderEmitter.fire(r)}}_refreshXPosition(o,e=o.element){if(!e)return;const r=o.options.x??0;(o.options.anchor||"left")==="right"?e.style.right=r?r*this._renderService.dimensions.css.cell.width+"px":"":e.style.left=r?r*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(o){var e;(e=this._decorationElements.get(o))==null||e.remove(),this._decorationElements.delete(o),o.dispose()}};t.BufferDecorationRenderer=v=h([c(1,f.IBufferService),c(2,n.ICoreBrowserService),c(3,f.IDecorationService),c(4,n.IRenderService)],v)},5871:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(const h of this._zones)if(h.color===a.options.overviewRulerOptions.color&&h.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,a.marker.line))return;if(this._lineAdjacentToZone(h,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(h,a.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=a.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=a.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=a.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=a.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:a.options.overviewRulerOptions.color,position:a.options.overviewRulerOptions.position,startBufferLine:a.marker.line,endBufferLine:a.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(a){this._linePadding=a}_lineIntersectsZone(a,h){return h>=a.startBufferLine&&h<=a.endBufferLine}_lineAdjacentToZone(a,h,c){return h>=a.startBufferLine-this._linePadding[c||"full"]&&h<=a.endBufferLine+this._linePadding[c||"full"]}_addLineToZone(a,h){a.startBufferLine=Math.min(a.startBufferLine,h),a.endBufferLine=Math.max(a.endBufferLine,h)}}},5744:function(O,t,a){var h=this&&this.__decorate||function(s,d,g,u){var m,_=arguments.length,p=_<3?d:u===null?u=Object.getOwnPropertyDescriptor(d,g):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,d,g,u);else for(var S=s.length-1;S>=0;S--)(m=s[S])&&(p=(_<3?m(p):_>3?m(d,g,p):m(d,g))||p);return _>3&&p&&Object.defineProperty(d,g,p),p},c=this&&this.__param||function(s,d){return function(g,u){d(g,u,s)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;const n=a(5871),l=a(4725),f=a(844),v=a(2585),o={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0};let i=t.OverviewRulerRenderer=class extends f.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(s,d,g,u,m,_,p){var y;super(),this._viewportElement=s,this._screenElement=d,this._bufferService=g,this._decorationService=u,this._renderService=m,this._optionsService=_,this._coreBrowserService=p,this._colorZoneStore=new n.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(y=this._viewportElement.parentElement)==null||y.insertBefore(this._canvas,this._viewportElement);const S=this._canvas.getContext("2d");if(!S)throw new Error("Ctx cannot be null");this._ctx=S,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,f.toDisposable)(()=>{var b;(b=this._canvas)==null||b.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const s=Math.floor(this._canvas.width/3),d=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=s,e.center=d,e.right=s,this._refreshDrawHeightConstants(),r.full=0,r.left=0,r.center=e.left,r.right=e.left+e.center}_refreshDrawHeightConstants(){o.full=Math.round(2*this._coreBrowserService.dpr);const s=this._canvas.height/this._bufferService.buffer.lines.length,d=Math.round(Math.max(Math.min(s,12),6)*this._coreBrowserService.dpr);o.left=d,o.center=d,o.right=d}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const d of this._decorationService.decorations)this._colorZoneStore.addDecoration(d);this._ctx.lineWidth=1;const s=this._colorZoneStore.zones;for(const d of s)d.position!=="full"&&this._renderColorZone(d);for(const d of s)d.position==="full"&&this._renderColorZone(d);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(s){this._ctx.fillStyle=s.color,this._ctx.fillRect(r[s.position||"full"],Math.round((this._canvas.height-1)*(s.startBufferLine/this._bufferService.buffers.active.lines.length)-o[s.position||"full"]/2),e[s.position||"full"],Math.round((this._canvas.height-1)*((s.endBufferLine-s.startBufferLine)/this._bufferService.buffers.active.lines.length)+o[s.position||"full"]))}_queueRefresh(s,d){this._shouldUpdateDimensions=s||this._shouldUpdateDimensions,this._shouldUpdateAnchor=d||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};t.OverviewRulerRenderer=i=h([c(2,v.IBufferService),c(3,v.IDecorationService),c(4,l.IRenderService),c(5,v.IOptionsService),c(6,l.ICoreBrowserService)],i)},2950:function(O,t,a){var h=this&&this.__decorate||function(o,e,r,i){var s,d=arguments.length,g=d<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(o,e,r,i);else for(var u=o.length-1;u>=0;u--)(s=o[u])&&(g=(d<3?s(g):d>3?s(e,r,g):s(e,r))||g);return d>3&&g&&Object.defineProperty(e,r,g),g},c=this&&this.__param||function(o,e){return function(r,i){e(r,i,o)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;const n=a(4725),l=a(2585),f=a(2584);let v=t.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(o,e,r,i,s,d){this._textarea=o,this._compositionView=e,this._bufferService=r,this._optionsService=i,this._coreService=s,this._renderService=d,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(o){this._compositionView.textContent=o.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(o){if(this._isComposing||this._isSendingComposition){if(o.keyCode===229||o.keyCode===16||o.keyCode===17||o.keyCode===18)return!1;this._finalizeComposition(!1)}return o.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(o){if(this._compositionView.classList.remove("active"),this._isComposing=!1,o){const e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let r;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,r=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;const e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){const o=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const e=this._textarea.value,r=e.replace(o,"");this._dataAlreadySent=r,e.length>o.length?this._coreService.triggerDataEvent(r,!0):e.length<o.length?this._coreService.triggerDataEvent(`${f.C0.DEL}`,!0):e.length===o.length&&e!==o&&this._coreService.triggerDataEvent(e,!0)}},0)}updateCompositionElements(o){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,i=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,s=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=s+"px",this._compositionView.style.top=i+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const d=this._compositionView.getBoundingClientRect();this._textarea.style.left=s+"px",this._textarea.style.top=i+"px",this._textarea.style.width=Math.max(d.width,1)+"px",this._textarea.style.height=Math.max(d.height,1)+"px",this._textarea.style.lineHeight=d.height+"px"}o||setTimeout(()=>this.updateCompositionElements(!0),0)}}};t.CompositionHelper=v=h([c(2,l.IBufferService),c(3,l.IOptionsService),c(4,l.ICoreService),c(5,n.IRenderService)],v)},9806:(O,t)=>{function a(h,c,n){const l=n.getBoundingClientRect(),f=h.getComputedStyle(n),v=parseInt(f.getPropertyValue("padding-left")),o=parseInt(f.getPropertyValue("padding-top"));return[c.clientX-l.left-v,c.clientY-l.top-o]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=a,t.getCoords=function(h,c,n,l,f,v,o,e,r){if(!v)return;const i=a(h,c,n);return i?(i[0]=Math.ceil((i[0]+(r?o/2:0))/o),i[1]=Math.ceil(i[1]/e),i[0]=Math.min(Math.max(i[0],1),l+(r?1:0)),i[1]=Math.min(Math.max(i[1],1),f),i):void 0}},9504:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;const h=a(2584);function c(e,r,i,s){const d=e-n(e,i),g=r-n(r,i),u=Math.abs(d-g)-function(m,_,p){let S=0;const y=m-n(m,p),b=_-n(_,p);for(let w=0;w<Math.abs(y-b);w++){const x=l(m,_)==="A"?-1:1,M=p.buffer.lines.get(y+x*w);M!=null&&M.isWrapped&&S++}return S}(e,r,i);return o(u,v(l(e,r),s))}function n(e,r){let i=0,s=r.buffer.lines.get(e),d=s==null?void 0:s.isWrapped;for(;d&&e>=0&&e<r.rows;)i++,s=r.buffer.lines.get(--e),d=s==null?void 0:s.isWrapped;return i}function l(e,r){return e>r?"A":"B"}function f(e,r,i,s,d,g){let u=e,m=r,_="";for(;u!==i||m!==s;)u+=d?1:-1,d&&u>g.cols-1?(_+=g.buffer.translateBufferLineToString(m,!1,e,u),u=0,e=0,m++):!d&&u<0&&(_+=g.buffer.translateBufferLineToString(m,!1,0,e+1),u=g.cols-1,e=u,m--);return _+g.buffer.translateBufferLineToString(m,!1,e,u)}function v(e,r){const i=r?"O":"[";return h.C0.ESC+i+e}function o(e,r){e=Math.floor(e);let i="";for(let s=0;s<e;s++)i+=r;return i}t.moveToCellSequence=function(e,r,i,s){const d=i.buffer.x,g=i.buffer.y;if(!i.buffer.hasScrollback)return function(_,p,S,y,b,w){return c(p,y,b,w).length===0?"":o(f(_,p,_,p-n(p,b),!1,b).length,v("D",w))}(d,g,0,r,i,s)+c(g,r,i,s)+function(_,p,S,y,b,w){let x;x=c(p,y,b,w).length>0?y-n(y,b):p;const M=y,B=function(T,k,C,L,R,D){let I;return I=c(C,L,R,D).length>0?L-n(L,R):k,T<C&&I<=L||T>=C&&I<L?"C":"D"}(_,p,S,y,b,w);return o(f(_,x,S,M,B==="C",b).length,v(B,w))}(d,g,e,r,i,s);let u;if(g===r)return u=d>e?"D":"C",o(Math.abs(d-e),v(u,s));u=g>r?"D":"C";const m=Math.abs(g-r);return o(function(_,p){return p.cols-_}(g>r?e:d,i)+(m-1)*i.cols+1+((g>r?d:e)-1),v(u,s))}},1296:function(O,t,a){var h=this&&this.__decorate||function(w,x,M,B){var T,k=arguments.length,C=k<3?x:B===null?B=Object.getOwnPropertyDescriptor(x,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,x,M,B);else for(var L=w.length-1;L>=0;L--)(T=w[L])&&(C=(k<3?T(C):k>3?T(x,M,C):T(x,M))||C);return k>3&&C&&Object.defineProperty(x,M,C),C},c=this&&this.__param||function(w,x){return function(M,B){x(M,B,w)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;const n=a(3787),l=a(2550),f=a(2223),v=a(6171),o=a(6052),e=a(4725),r=a(8055),i=a(8460),s=a(844),d=a(2585),g="xterm-dom-renderer-owner-",u="xterm-rows",m="xterm-fg-",_="xterm-bg-",p="xterm-focus",S="xterm-selection";let y=1,b=t.DomRenderer=class extends s.Disposable{constructor(w,x,M,B,T,k,C,L,R,D,I,H,z){super(),this._terminal=w,this._document=x,this._element=M,this._screenElement=B,this._viewportElement=T,this._helperContainer=k,this._linkifier2=C,this._charSizeService=R,this._optionsService=D,this._bufferService=I,this._coreBrowserService=H,this._themeService=z,this._terminalClass=y++,this._rowElements=[],this._selectionRenderModel=(0,o.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new i.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(u),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(S),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,v.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(U=>this._injectCss(U))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(n.DomRendererRowFactory,document),this._element.classList.add(g+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(U=>this._handleLinkHover(U))),this.register(this._linkifier2.onHideLinkUnderline(U=>this._handleLinkLeave(U))),this.register((0,s.toDisposable)(()=>{this._element.classList.remove(g+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new l.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const w=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*w,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*w),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/w),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/w),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const M of this._rowElements)M.style.width=`${this.dimensions.css.canvas.width}px`,M.style.height=`${this.dimensions.css.cell.height}px`,M.style.lineHeight=`${this.dimensions.css.cell.height}px`,M.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const x=`${this._terminalSelector} .${u} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(w){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let x=`${this._terminalSelector} .${u} { color: ${w.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;x+=`${this._terminalSelector} .${u} .xterm-dim { color: ${r.color.multiplyOpacity(w.foreground,.5).css};}`,x+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const M=`blink_underline_${this._terminalClass}`,B=`blink_bar_${this._terminalClass}`,T=`blink_block_${this._terminalClass}`;x+=`@keyframes ${M} { 50% { border-bottom-style: hidden; }}`,x+=`@keyframes ${B} { 50% { box-shadow: none; }}`,x+=`@keyframes ${T} { 0% { background-color: ${w.cursor.css}; color: ${w.cursorAccent.css}; } 50% { background-color: inherit; color: ${w.cursor.css}; }}`,x+=`${this._terminalSelector} .${u}.${p} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${M} 1s step-end infinite;}${this._terminalSelector} .${u}.${p} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${B} 1s step-end infinite;}${this._terminalSelector} .${u}.${p} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${T} 1s step-end infinite;}${this._terminalSelector} .${u} .xterm-cursor.xterm-cursor-block { background-color: ${w.cursor.css}; color: ${w.cursorAccent.css};}${this._terminalSelector} .${u} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${w.cursor.css} !important; color: ${w.cursorAccent.css} !important;}${this._terminalSelector} .${u} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${w.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${u} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${w.cursor.css} inset;}${this._terminalSelector} .${u} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${w.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,x+=`${this._terminalSelector} .${S} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${S} div { position: absolute; background-color: ${w.selectionBackgroundOpaque.css};}${this._terminalSelector} .${S} div { position: absolute; background-color: ${w.selectionInactiveBackgroundOpaque.css};}`;for(const[k,C]of w.ansi.entries())x+=`${this._terminalSelector} .${m}${k} { color: ${C.css}; }${this._terminalSelector} .${m}${k}.xterm-dim { color: ${r.color.multiplyOpacity(C,.5).css}; }${this._terminalSelector} .${_}${k} { background-color: ${C.css}; }`;x+=`${this._terminalSelector} .${m}${f.INVERTED_DEFAULT_COLOR} { color: ${r.color.opaque(w.background).css}; }${this._terminalSelector} .${m}${f.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${r.color.multiplyOpacity(r.color.opaque(w.background),.5).css}; }${this._terminalSelector} .${_}${f.INVERTED_DEFAULT_COLOR} { background-color: ${w.foreground.css}; }`,this._themeStyleElement.textContent=x}_setDefaultSpacing(){const w=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${w}px`,this._rowFactory.defaultSpacing=w}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(w,x){for(let M=this._rowElements.length;M<=x;M++){const B=this._document.createElement("div");this._rowContainer.appendChild(B),this._rowElements.push(B)}for(;this._rowElements.length>x;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(w,x){this._refreshRowElements(w,x),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(p),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(p),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(w,x,M){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(w,x,M),this.renderRows(0,this._bufferService.rows-1),!w||!x)return;this._selectionRenderModel.update(this._terminal,w,x,M);const B=this._selectionRenderModel.viewportStartRow,T=this._selectionRenderModel.viewportEndRow,k=this._selectionRenderModel.viewportCappedStartRow,C=this._selectionRenderModel.viewportCappedEndRow;if(k>=this._bufferService.rows||C<0)return;const L=this._document.createDocumentFragment();if(M){const R=w[0]>x[0];L.appendChild(this._createSelectionElement(k,R?x[0]:w[0],R?w[0]:x[0],C-k+1))}else{const R=B===k?w[0]:0,D=k===T?x[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(k,R,D));const I=C-k-1;if(L.appendChild(this._createSelectionElement(k+1,0,this._bufferService.cols,I)),k!==C){const H=T===C?x[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(C,0,H))}}this._selectionContainer.appendChild(L)}_createSelectionElement(w,x,M,B=1){const T=this._document.createElement("div"),k=x*this.dimensions.css.cell.width;let C=this.dimensions.css.cell.width*(M-x);return k+C>this.dimensions.css.canvas.width&&(C=this.dimensions.css.canvas.width-k),T.style.height=B*this.dimensions.css.cell.height+"px",T.style.top=w*this.dimensions.css.cell.height+"px",T.style.left=`${k}px`,T.style.width=`${C}px`,T}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const w of this._rowElements)w.replaceChildren()}renderRows(w,x){const M=this._bufferService.buffer,B=M.ybase+M.y,T=Math.min(M.x,this._bufferService.cols-1),k=this._optionsService.rawOptions.cursorBlink,C=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=w;R<=x;R++){const D=R+M.ydisp,I=this._rowElements[R],H=M.lines.get(D);if(!I||!H)break;I.replaceChildren(...this._rowFactory.createRow(H,D,D===B,C,L,T,k,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${g}${this._terminalClass}`}_handleLinkHover(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)}_handleLinkLeave(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)}_setCellUnderline(w,x,M,B,T,k){M<0&&(w=0),B<0&&(x=0);const C=this._bufferService.rows-1;M=Math.max(Math.min(M,C),0),B=Math.max(Math.min(B,C),0),T=Math.min(T,this._bufferService.cols);const L=this._bufferService.buffer,R=L.ybase+L.y,D=Math.min(L.x,T-1),I=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,z=this._optionsService.rawOptions.cursorInactiveStyle;for(let U=M;U<=B;++U){const A=U+L.ydisp,E=this._rowElements[U],F=L.lines.get(A);if(!E||!F)break;E.replaceChildren(...this._rowFactory.createRow(F,A,A===R,H,z,D,I,this.dimensions.css.cell.width,this._widthCache,k?U===M?w:0:-1,k?(U===B?x:T)-1:-1))}}};t.DomRenderer=b=h([c(7,d.IInstantiationService),c(8,e.ICharSizeService),c(9,d.IOptionsService),c(10,d.IBufferService),c(11,e.ICoreBrowserService),c(12,e.IThemeService)],b)},3787:function(O,t,a){var h=this&&this.__decorate||function(u,m,_,p){var S,y=arguments.length,b=y<3?m:p===null?p=Object.getOwnPropertyDescriptor(m,_):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(u,m,_,p);else for(var w=u.length-1;w>=0;w--)(S=u[w])&&(b=(y<3?S(b):y>3?S(m,_,b):S(m,_))||b);return y>3&&b&&Object.defineProperty(m,_,b),b},c=this&&this.__param||function(u,m){return function(_,p){m(_,p,u)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=void 0;const n=a(2223),l=a(643),f=a(511),v=a(2585),o=a(8055),e=a(4725),r=a(4269),i=a(6171),s=a(3734);let d=t.DomRendererRowFactory=class{constructor(u,m,_,p,S,y,b){this._document=u,this._characterJoinerService=m,this._optionsService=_,this._coreBrowserService=p,this._coreService=S,this._decorationService=y,this._themeService=b,this._workCell=new f.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(u,m,_){this._selectionStart=u,this._selectionEnd=m,this._columnSelectMode=_}createRow(u,m,_,p,S,y,b,w,x,M,B){const T=[],k=this._characterJoinerService.getJoinedCharacters(m),C=this._themeService.colors;let L,R=u.getNoBgTrimmedLength();_&&R<y+1&&(R=y+1);let D=0,I="",H=0,z=0,U=0,A=!1,E=0,F=!1,P=0;const $=[],W=M!==-1&&B!==-1;for(let V=0;V<R;V++){u.loadCell(V,this._workCell);let j=this._workCell.getWidth();if(j===0)continue;let Q=!1,re=V,q=this._workCell;if(k.length>0&&V===k[0][0]){Q=!0;const K=k.shift();q=new r.JoinedCellData(this._workCell,u.translateToString(!0,K[0],K[1]),K[1]-K[0]),re=K[1]-1,j=q.getWidth()}const de=this._isCellInSelection(V,m),ue=_&&V===y,Z=W&&V>=M&&V<=B;let G=!1;this._decorationService.forEachDecorationAtCell(V,m,void 0,K=>{G=!0});let X=q.getChars()||l.WHITESPACE_CELL_CHAR;if(X===" "&&(q.isUnderline()||q.isOverline())&&(X=" "),P=j*w-x.get(X,q.isBold(),q.isItalic()),L){if(D&&(de&&F||!de&&!F&&q.bg===H)&&(de&&F&&C.selectionForeground||q.fg===z)&&q.extended.ext===U&&Z===A&&P===E&&!ue&&!Q&&!G){q.isInvisible()?I+=l.WHITESPACE_CELL_CHAR:I+=X,D++;continue}D&&(L.textContent=I),L=this._document.createElement("span"),D=0,I=""}else L=this._document.createElement("span");if(H=q.bg,z=q.fg,U=q.extended.ext,A=Z,E=P,F=de,Q&&y>=V&&y<=re&&(y=V),!this._coreService.isCursorHidden&&ue&&this._coreService.isCursorInitialized){if($.push("xterm-cursor"),this._coreBrowserService.isFocused)b&&$.push("xterm-cursor-blink"),$.push(p==="bar"?"xterm-cursor-bar":p==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(S)switch(S){case"outline":$.push("xterm-cursor-outline");break;case"block":$.push("xterm-cursor-block");break;case"bar":$.push("xterm-cursor-bar");break;case"underline":$.push("xterm-cursor-underline")}}if(q.isBold()&&$.push("xterm-bold"),q.isItalic()&&$.push("xterm-italic"),q.isDim()&&$.push("xterm-dim"),I=q.isInvisible()?l.WHITESPACE_CELL_CHAR:q.getChars()||l.WHITESPACE_CELL_CHAR,q.isUnderline()&&($.push(`xterm-underline-${q.extended.underlineStyle}`),I===" "&&(I=" "),!q.isUnderlineColorDefault()))if(q.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${s.AttributeData.toColorRGB(q.getUnderlineColor()).join(",")})`;else{let K=q.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&q.isBold()&&K<8&&(K+=8),L.style.textDecorationColor=C.ansi[K].css}q.isOverline()&&($.push("xterm-overline"),I===" "&&(I=" ")),q.isStrikethrough()&&$.push("xterm-strikethrough"),Z&&(L.style.textDecoration="underline");let N=q.getFgColor(),J=q.getFgColorMode(),se=q.getBgColor(),ie=q.getBgColorMode();const _e=!!q.isInverse();if(_e){const K=N;N=se,se=K;const fe=J;J=ie,ie=fe}let le,ce,ne,ee=!1;switch(this._decorationService.forEachDecorationAtCell(V,m,void 0,K=>{K.options.layer!=="top"&&ee||(K.backgroundColorRGB&&(ie=50331648,se=K.backgroundColorRGB.rgba>>8&16777215,le=K.backgroundColorRGB),K.foregroundColorRGB&&(J=50331648,N=K.foregroundColorRGB.rgba>>8&16777215,ce=K.foregroundColorRGB),ee=K.options.layer==="top")}),!ee&&de&&(le=this._coreBrowserService.isFocused?C.selectionBackgroundOpaque:C.selectionInactiveBackgroundOpaque,se=le.rgba>>8&16777215,ie=50331648,ee=!0,C.selectionForeground&&(J=50331648,N=C.selectionForeground.rgba>>8&16777215,ce=C.selectionForeground)),ee&&$.push("xterm-decoration-top"),ie){case 16777216:case 33554432:ne=C.ansi[se],$.push(`xterm-bg-${se}`);break;case 50331648:ne=o.channels.toColor(se>>16,se>>8&255,255&se),this._addStyle(L,`background-color:#${g((se>>>0).toString(16),"0",6)}`);break;default:_e?(ne=C.foreground,$.push(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)):ne=C.background}switch(le||q.isDim()&&(le=o.color.multiplyOpacity(ne,.5)),J){case 16777216:case 33554432:q.isBold()&&N<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(N+=8),this._applyMinimumContrast(L,ne,C.ansi[N],q,le,void 0)||$.push(`xterm-fg-${N}`);break;case 50331648:const K=o.channels.toColor(N>>16&255,N>>8&255,255&N);this._applyMinimumContrast(L,ne,K,q,le,ce)||this._addStyle(L,`color:#${g(N.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,ne,C.foreground,q,le,ce)||_e&&$.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`)}$.length&&(L.className=$.join(" "),$.length=0),ue||Q||G?L.textContent=I:D++,P!==this.defaultSpacing&&(L.style.letterSpacing=`${P}px`),T.push(L),V=re}return L&&D&&(L.textContent=I),T}_applyMinimumContrast(u,m,_,p,S,y){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,i.treatGlyphAsBackgroundColor)(p.getCode()))return!1;const b=this._getContrastCache(p);let w;if(S||y||(w=b.getColor(m.rgba,_.rgba)),w===void 0){const x=this._optionsService.rawOptions.minimumContrastRatio/(p.isDim()?2:1);w=o.color.ensureContrastRatio(S||m,y||_,x),b.setColor((S||m).rgba,(y||_).rgba,w??null)}return!!w&&(this._addStyle(u,`color:${w.css}`),!0)}_getContrastCache(u){return u.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(u,m){u.setAttribute("style",`${u.getAttribute("style")||""}${m};`)}_isCellInSelection(u,m){const _=this._selectionStart,p=this._selectionEnd;return!(!_||!p)&&(this._columnSelectMode?_[0]<=p[0]?u>=_[0]&&m>=_[1]&&u<p[0]&&m<=p[1]:u<_[0]&&m>=_[1]&&u>=p[0]&&m<=p[1]:m>_[1]&&m<p[1]||_[1]===p[1]&&m===_[1]&&u>=_[0]&&u<p[0]||_[1]<p[1]&&m===p[1]&&u<p[0]||_[1]<p[1]&&m===_[1]&&u>=_[0])}};function g(u,m,_){for(;u.length<_;)u=m+u;return u}t.DomRendererRowFactory=d=h([c(1,e.ICharacterJoinerService),c(2,v.IOptionsService),c(3,e.ICoreBrowserService),c(4,v.ICoreService),c(5,v.IDecorationService),c(6,e.IThemeService)],d)},2550:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WidthCache=void 0,t.WidthCache=class{constructor(a,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const c=a.createElement("span");c.classList.add("xterm-char-measure-element");const n=a.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";const l=a.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontStyle="italic";const f=a.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold",f.style.fontStyle="italic",this._measureElements=[c,n,l,f],this._container.appendChild(c),this._container.appendChild(n),this._container.appendChild(l),this._container.appendChild(f),h.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,h,c,n){a===this._font&&h===this._fontSize&&c===this._weight&&n===this._weightBold||(this._font=a,this._fontSize=h,this._weight=c,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${c}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${c}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(a,h,c){let n=0;if(!h&&!c&&a.length===1&&(n=a.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];const v=this._measure(a,0);return v>0&&(this._flat[n]=v),v}let l=a;h&&(l+="B"),c&&(l+="I");let f=this._holey.get(l);if(f===void 0){let v=0;h&&(v|=1),c&&(v|=2),f=this._measure(a,v),f>0&&this._holey.set(l,f)}return f}_measure(a,h){const c=this._measureElements[h];return c.textContent=a.repeat(32),c.offsetWidth/32}}},2223:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const h=a(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function h(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=h,t.allowRescaling=function(c,n,l,f){return n===1&&l>Math.ceil(1.5*f)&&c!==void 0&&c>255&&!h(c)&&!a(c)&&!function(v){return 57344<=v&&v<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,l=0){return(c-(2*Math.round(n)-l))%(2*Math.round(n))}},6052:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,l,f=!1){if(this.selectionStart=n,this.selectionEnd=l,!n||!l||n[0]===l[0]&&n[1]===l[1])return void this.clear();const v=c.buffers.active.ydisp,o=n[1]-v,e=l[1]-v,r=Math.max(o,0),i=Math.min(e,c.rows-1);r>=c.rows||i<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=f,this.viewportStartRow=o,this.viewportEndRow=e,this.viewportCappedStartRow=r,this.viewportCappedEndRow=i,this.startCol=n[0],this.endCol=l[0])}isCellSelected(c,n,l){return!!this.hasSelection&&(l-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&l>=this.viewportCappedStartRow&&n<this.endCol&&l<=this.viewportCappedEndRow:n<this.startCol&&l>=this.viewportCappedStartRow&&n>=this.endCol&&l<=this.viewportCappedEndRow:l>this.viewportStartRow&&l<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&l===this.viewportStartRow&&n>=this.startCol&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportEndRow&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportStartRow&&n>=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},456:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const a=this.selectionStart,h=this.selectionEnd;return!(!a||!h)&&(a[1]>h[1]||a[1]===h[1]&&a[0]>h[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(O,t,a){var h=this&&this.__decorate||function(i,s,d,g){var u,m=arguments.length,_=m<3?s:g===null?g=Object.getOwnPropertyDescriptor(s,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(i,s,d,g);else for(var p=i.length-1;p>=0;p--)(u=i[p])&&(_=(m<3?u(_):m>3?u(s,d,_):u(s,d))||_);return m>3&&_&&Object.defineProperty(s,d,_),_},c=this&&this.__param||function(i,s){return function(d,g){s(d,g,i)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;const n=a(2585),l=a(8460),f=a(844);let v=t.CharSizeService=class extends f.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(i,s,d){super(),this._optionsService=d,this.width=0,this.height=0,this._onCharSizeChange=this.register(new l.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new r(this._optionsService))}catch{this._measureStrategy=this.register(new e(i,s,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const i=this._measureStrategy.measure();i.width===this.width&&i.height===this.height||(this.width=i.width,this.height=i.height,this._onCharSizeChange.fire())}};t.CharSizeService=v=h([c(2,n.IOptionsService)],v);class o extends f.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(s,d){s!==void 0&&s>0&&d!==void 0&&d>0&&(this._result.width=s,this._result.height=d)}}class e extends o{constructor(s,d,g){super(),this._document=s,this._parentElement=d,this._optionsService=g,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class r extends o{constructor(s){super(),this._optionsService=s,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const d=this._ctx.measureText("W");if(!("width"in d&&"fontBoundingBoxAscent"in d&&"fontBoundingBoxDescent"in d))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const s=this._ctx.measureText("W");return this._validateAndSet(s.width,s.fontBoundingBoxAscent+s.fontBoundingBoxDescent),this._result}}},4269:function(O,t,a){var h=this&&this.__decorate||function(r,i,s,d){var g,u=arguments.length,m=u<3?i:d===null?d=Object.getOwnPropertyDescriptor(i,s):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,i,s,d);else for(var _=r.length-1;_>=0;_--)(g=r[_])&&(m=(u<3?g(m):u>3?g(i,s,m):g(i,s))||m);return u>3&&m&&Object.defineProperty(i,s,m),m},c=this&&this.__param||function(r,i){return function(s,d){i(s,d,r)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const n=a(3734),l=a(643),f=a(511),v=a(2585);class o extends n.AttributeData{constructor(i,s,d){super(),this.content=0,this.combinedData="",this.fg=i.fg,this.bg=i.bg,this.combinedData=s,this._width=d}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(i){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=o;let e=t.CharacterJoinerService=class Be{constructor(i){this._bufferService=i,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new f.CellData}register(i){const s={id:this._nextCharacterJoinerId++,handler:i};return this._characterJoiners.push(s),s.id}deregister(i){for(let s=0;s<this._characterJoiners.length;s++)if(this._characterJoiners[s].id===i)return this._characterJoiners.splice(s,1),!0;return!1}getJoinedCharacters(i){if(this._characterJoiners.length===0)return[];const s=this._bufferService.buffer.lines.get(i);if(!s||s.length===0)return[];const d=[],g=s.translateToString(!0);let u=0,m=0,_=0,p=s.getFg(0),S=s.getBg(0);for(let y=0;y<s.getTrimmedLength();y++)if(s.loadCell(y,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==S){if(y-u>1){const b=this._getJoinedRanges(g,_,m,s,u);for(let w=0;w<b.length;w++)d.push(b[w])}u=y,_=m,p=this._workCell.fg,S=this._workCell.bg}m+=this._workCell.getChars().length||l.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-u>1){const y=this._getJoinedRanges(g,_,m,s,u);for(let b=0;b<y.length;b++)d.push(y[b])}return d}_getJoinedRanges(i,s,d,g,u){const m=i.substring(s,d);let _=[];try{_=this._characterJoiners[0].handler(m)}catch(p){console.error(p)}for(let p=1;p<this._characterJoiners.length;p++)try{const S=this._characterJoiners[p].handler(m);for(let y=0;y<S.length;y++)Be._mergeRanges(_,S[y])}catch(S){console.error(S)}return this._stringRangesToCellRanges(_,g,u),_}_stringRangesToCellRanges(i,s,d){let g=0,u=!1,m=0,_=i[g];if(_){for(let p=d;p<this._bufferService.cols;p++){const S=s.getWidth(p),y=s.getString(p).length||l.WHITESPACE_CELL_CHAR.length;if(S!==0){if(!u&&_[0]<=m&&(_[0]=p,u=!0),_[1]<=m){if(_[1]=p,_=i[++g],!_)break;_[0]<=m?(_[0]=p,u=!0):u=!1}m+=y}}_&&(_[1]=this._bufferService.cols)}}static _mergeRanges(i,s){let d=!1;for(let g=0;g<i.length;g++){const u=i[g];if(d){if(s[1]<=u[0])return i[g-1][1]=s[1],i;if(s[1]<=u[1])return i[g-1][1]=Math.max(s[1],u[1]),i.splice(g,1),i;i.splice(g,1),g--}else{if(s[1]<=u[0])return i.splice(g,0,s),i;if(s[1]<=u[1])return u[0]=Math.min(s[0],u[0]),i;s[0]<u[1]&&(u[0]=Math.min(s[0],u[0]),d=!0)}}return d?i[i.length-1][1]=s[1]:i.push(s),i}};t.CharacterJoinerService=e=h([c(0,v.IBufferService)],e)},5114:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;const h=a(844),c=a(8460),n=a(3656);class l extends h.Disposable{constructor(o,e,r){super(),this._textarea=o,this._window=e,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new f(this._window),this._onDprChange=this.register(new c.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new c.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(i=>this._screenDprMonitor.setWindow(i))),this.register((0,c.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(o){this._window!==o&&(this._window=o,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}t.CoreBrowserService=l;class f extends h.Disposable{constructor(o){super(),this._parentWindow=o,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new c.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)(()=>this.clearListener()))}setWindow(o){this._parentWindow=o,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,n.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var o;this._outerListener&&((o=this._resolutionMediaMatchList)==null||o.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkProviderService=void 0;const h=a(844);class c extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(l){return this.linkProviders.push(l),{dispose:()=>{const f=this.linkProviders.indexOf(l);f!==-1&&this.linkProviders.splice(f,1)}}}}t.LinkProviderService=c},8934:function(O,t,a){var h=this&&this.__decorate||function(v,o,e,r){var i,s=arguments.length,d=s<3?o:r===null?r=Object.getOwnPropertyDescriptor(o,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(v,o,e,r);else for(var g=v.length-1;g>=0;g--)(i=v[g])&&(d=(s<3?i(d):s>3?i(o,e,d):i(o,e))||d);return s>3&&d&&Object.defineProperty(o,e,d),d},c=this&&this.__param||function(v,o){return function(e,r){o(e,r,v)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;const n=a(4725),l=a(9806);let f=t.MouseService=class{constructor(v,o){this._renderService=v,this._charSizeService=o}getCoords(v,o,e,r,i){return(0,l.getCoords)(window,v,o,e,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(v,o){const e=(0,l.getCoordsRelativeToElement)(window,v,o);if(this._charSizeService.hasValidSize)return e[0]=Math.min(Math.max(e[0],0),this._renderService.dimensions.css.canvas.width-1),e[1]=Math.min(Math.max(e[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(e[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(e[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(e[0]),y:Math.floor(e[1])}}};t.MouseService=f=h([c(0,n.IRenderService),c(1,n.ICharSizeService)],f)},3230:function(O,t,a){var h=this&&this.__decorate||function(i,s,d,g){var u,m=arguments.length,_=m<3?s:g===null?g=Object.getOwnPropertyDescriptor(s,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(i,s,d,g);else for(var p=i.length-1;p>=0;p--)(u=i[p])&&(_=(m<3?u(_):m>3?u(s,d,_):u(s,d))||_);return m>3&&_&&Object.defineProperty(s,d,_),_},c=this&&this.__param||function(i,s){return function(d,g){s(d,g,i)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;const n=a(6193),l=a(4725),f=a(8460),v=a(844),o=a(7226),e=a(2585);let r=t.RenderService=class extends v.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(i,s,d,g,u,m,_,p){super(),this._rowCount=i,this._charSizeService=g,this._renderer=this.register(new v.MutableDisposable),this._pausedResizeTask=new o.DebouncedIdleTask,this._observerDisposable=this.register(new v.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new f.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new f.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new f.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new f.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new n.RenderDebouncer((S,y)=>this._renderRows(S,y),_),this.register(this._renderDebouncer),this.register(_.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(m.onResize(()=>this._fullRefresh())),this.register(m.buffers.onBufferActivate(()=>{var S;return(S=this._renderer.value)==null?void 0:S.clear()})),this.register(d.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(u.onDecorationRegistered(()=>this._fullRefresh())),this.register(u.onDecorationRemoved(()=>this._fullRefresh())),this.register(d.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(m.cols,m.rows),this._fullRefresh()})),this.register(d.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(m.buffer.y,m.buffer.y,!0))),this.register(p.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(_.window,s),this.register(_.onWindowChange(S=>this._registerIntersectionObserver(S,s)))}_registerIntersectionObserver(i,s){if("IntersectionObserver"in i){const d=new i.IntersectionObserver(g=>this._handleIntersectionChange(g[g.length-1]),{threshold:0});d.observe(s),this._observerDisposable.value=(0,v.toDisposable)(()=>d.disconnect())}}_handleIntersectionChange(i){this._isPaused=i.isIntersecting===void 0?i.intersectionRatio===0:!i.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(i,s,d=!1){this._isPaused?this._needsFullRefresh=!0:(d||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(i,s,this._rowCount))}_renderRows(i,s){this._renderer.value&&(i=Math.min(i,this._rowCount-1),s=Math.min(s,this._rowCount-1),this._renderer.value.renderRows(i,s),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:i,end:s}),this._onRender.fire({start:i,end:s}),this._isNextRenderRedrawOnly=!0)}resize(i,s){this._rowCount=s,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(i){this._renderer.value=i,this._renderer.value&&(this._renderer.value.onRequestRedraw(s=>this.refreshRows(s.start,s.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(i){return this._renderDebouncer.addRefreshCallback(i)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var i,s;this._renderer.value&&((s=(i=this._renderer.value).clearTextureAtlas)==null||s.call(i),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(i,s){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var d;return(d=this._renderer.value)==null?void 0:d.handleResize(i,s)}):this._renderer.value.handleResize(i,s),this._fullRefresh())}handleCharSizeChanged(){var i;(i=this._renderer.value)==null||i.handleCharSizeChanged()}handleBlur(){var i;(i=this._renderer.value)==null||i.handleBlur()}handleFocus(){var i;(i=this._renderer.value)==null||i.handleFocus()}handleSelectionChanged(i,s,d){var g;this._selectionState.start=i,this._selectionState.end=s,this._selectionState.columnSelectMode=d,(g=this._renderer.value)==null||g.handleSelectionChanged(i,s,d)}handleCursorMove(){var i;(i=this._renderer.value)==null||i.handleCursorMove()}clear(){var i;(i=this._renderer.value)==null||i.clear()}};t.RenderService=r=h([c(2,e.IOptionsService),c(3,l.ICharSizeService),c(4,e.IDecorationService),c(5,e.IBufferService),c(6,l.ICoreBrowserService),c(7,l.IThemeService)],r)},9312:function(O,t,a){var h=this&&this.__decorate||function(_,p,S,y){var b,w=arguments.length,x=w<3?p:y===null?y=Object.getOwnPropertyDescriptor(p,S):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(_,p,S,y);else for(var M=_.length-1;M>=0;M--)(b=_[M])&&(x=(w<3?b(x):w>3?b(p,S,x):b(p,S))||x);return w>3&&x&&Object.defineProperty(p,S,x),x},c=this&&this.__param||function(_,p){return function(S,y){p(S,y,_)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;const n=a(9806),l=a(9504),f=a(456),v=a(4725),o=a(8460),e=a(844),r=a(6114),i=a(4841),s=a(511),d=a(2585),g=" ",u=new RegExp(g,"g");let m=t.SelectionService=class extends e.Disposable{constructor(_,p,S,y,b,w,x,M,B){super(),this._element=_,this._screenElement=p,this._linkifier=S,this._bufferService=y,this._coreService=b,this._mouseService=w,this._optionsService=x,this._renderService=M,this._coreBrowserService=B,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new s.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new o.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new o.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new o.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=T=>this._handleMouseMove(T),this._mouseUpListener=T=>this._handleMouseUp(T),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(T=>this._handleTrim(T)),this.register(this._bufferService.buffers.onBufferActivate(T=>this._handleBufferActivate(T))),this.enable(),this._model=new f.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,e.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const _=this._model.finalSelectionStart,p=this._model.finalSelectionEnd;return!(!_||!p||_[0]===p[0]&&_[1]===p[1])}get selectionText(){const _=this._model.finalSelectionStart,p=this._model.finalSelectionEnd;if(!_||!p)return"";const S=this._bufferService.buffer,y=[];if(this._activeSelectionMode===3){if(_[0]===p[0])return"";const b=_[0]<p[0]?_[0]:p[0],w=_[0]<p[0]?p[0]:_[0];for(let x=_[1];x<=p[1];x++){const M=S.translateBufferLineToString(x,!0,b,w);y.push(M)}}else{const b=_[1]===p[1]?p[0]:void 0;y.push(S.translateBufferLineToString(_[1],!0,_[0],b));for(let w=_[1]+1;w<=p[1]-1;w++){const x=S.lines.get(w),M=S.translateBufferLineToString(w,!0);x!=null&&x.isWrapped?y[y.length-1]+=M:y.push(M)}if(_[1]!==p[1]){const w=S.lines.get(p[1]),x=S.translateBufferLineToString(p[1],!0,0,p[0]);w&&w.isWrapped?y[y.length-1]+=x:y.push(x)}}return y.map(b=>b.replace(u," ")).join(r.isWindows?`\r
63
- `:`
64
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(_){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),r.isLinux&&_&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(_){const p=this._getMouseBufferCoords(_),S=this._model.finalSelectionStart,y=this._model.finalSelectionEnd;return!!(S&&y&&p)&&this._areCoordsInSelection(p,S,y)}isCellInSelection(_,p){const S=this._model.finalSelectionStart,y=this._model.finalSelectionEnd;return!(!S||!y)&&this._areCoordsInSelection([_,p],S,y)}_areCoordsInSelection(_,p,S){return _[1]>p[1]&&_[1]<S[1]||p[1]===S[1]&&_[1]===p[1]&&_[0]>=p[0]&&_[0]<S[0]||p[1]<S[1]&&_[1]===S[1]&&_[0]<S[0]||p[1]<S[1]&&_[1]===p[1]&&_[0]>=p[0]}_selectWordAtCursor(_,p){var b,w;const S=(w=(b=this._linkifier.currentLink)==null?void 0:b.link)==null?void 0:w.range;if(S)return this._model.selectionStart=[S.start.x-1,S.start.y-1],this._model.selectionStartLength=(0,i.getRangeLength)(S,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const y=this._getMouseBufferCoords(_);return!!y&&(this._selectWordAt(y,p),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(_,p){this._model.clearSelection(),_=Math.max(_,0),p=Math.min(p,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,_],this._model.selectionEnd=[this._bufferService.cols,p],this.refresh(),this._onSelectionChange.fire()}_handleTrim(_){this._model.handleTrim(_)&&this.refresh()}_getMouseBufferCoords(_){const p=this._mouseService.getCoords(_,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(p)return p[0]--,p[1]--,p[1]+=this._bufferService.buffer.ydisp,p}_getMouseEventScrollAmount(_){let p=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,_,this._screenElement)[1];const S=this._renderService.dimensions.css.canvas.height;return p>=0&&p<=S?0:(p>S&&(p-=S),p=Math.min(Math.max(p,-50),50),p/=50,p/Math.abs(p)+Math.round(14*p))}shouldForceSelection(_){return r.isMac?_.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:_.shiftKey}handleMouseDown(_){if(this._mouseDownTimeStamp=_.timeStamp,(_.button!==2||!this.hasSelection)&&_.button===0){if(!this._enabled){if(!this.shouldForceSelection(_))return;_.stopPropagation()}_.preventDefault(),this._dragScrollAmount=0,this._enabled&&_.shiftKey?this._handleIncrementalClick(_):_.detail===1?this._handleSingleClick(_):_.detail===2?this._handleDoubleClick(_):_.detail===3&&this._handleTripleClick(_),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(_){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(_))}_handleSingleClick(_){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(_)?3:0,this._model.selectionStart=this._getMouseBufferCoords(_),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const p=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);p&&p.length!==this._model.selectionStart[0]&&p.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(_){this._selectWordAtCursor(_,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(_){const p=this._getMouseBufferCoords(_);p&&(this._activeSelectionMode=2,this._selectLineAt(p[1]))}shouldColumnSelect(_){return _.altKey&&!(r.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(_){if(_.stopImmediatePropagation(),!this._model.selectionStart)return;const p=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(_),!this._model.selectionEnd)return void this.refresh(!0);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(_),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const S=this._bufferService.buffer;if(this._model.selectionEnd[1]<S.lines.length){const y=S.lines.get(this._model.selectionEnd[1]);y&&y.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}p&&p[0]===this._model.selectionEnd[0]&&p[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const _=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(_.ydisp+this._bufferService.rows,_.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=_.ydisp),this.refresh()}}_handleMouseUp(_){const p=_.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&p<500&&_.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const S=this._mouseService.getCoords(_,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(S&&S[0]!==void 0&&S[1]!==void 0){const y=(0,l.moveToCellSequence)(S[0]-1,S[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(y,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const _=this._model.finalSelectionStart,p=this._model.finalSelectionEnd,S=!(!_||!p||_[0]===p[0]&&_[1]===p[1]);S?_&&p&&(this._oldSelectionStart&&this._oldSelectionEnd&&_[0]===this._oldSelectionStart[0]&&_[1]===this._oldSelectionStart[1]&&p[0]===this._oldSelectionEnd[0]&&p[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(_,p,S)):this._oldHasSelection&&this._fireOnSelectionChange(_,p,S)}_fireOnSelectionChange(_,p,S){this._oldSelectionStart=_,this._oldSelectionEnd=p,this._oldHasSelection=S,this._onSelectionChange.fire()}_handleBufferActivate(_){this.clearSelection(),this._trimListener.dispose(),this._trimListener=_.activeBuffer.lines.onTrim(p=>this._handleTrim(p))}_convertViewportColToCharacterIndex(_,p){let S=p;for(let y=0;p>=y;y++){const b=_.loadCell(y,this._workCell).getChars().length;this._workCell.getWidth()===0?S--:b>1&&p!==y&&(S+=b-1)}return S}setSelection(_,p,S){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[_,p],this._model.selectionStartLength=S,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(_){this._isClickInSelection(_)||(this._selectWordAtCursor(_,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(_,p,S=!0,y=!0){if(_[0]>=this._bufferService.cols)return;const b=this._bufferService.buffer,w=b.lines.get(_[1]);if(!w)return;const x=b.translateBufferLineToString(_[1],!1);let M=this._convertViewportColToCharacterIndex(w,_[0]),B=M;const T=_[0]-M;let k=0,C=0,L=0,R=0;if(x.charAt(M)===" "){for(;M>0&&x.charAt(M-1)===" ";)M--;for(;B<x.length&&x.charAt(B+1)===" ";)B++}else{let H=_[0],z=_[0];w.getWidth(H)===0&&(k++,H--),w.getWidth(z)===2&&(C++,z++);const U=w.getString(z).length;for(U>1&&(R+=U-1,B+=U-1);H>0&&M>0&&!this._isCharWordSeparator(w.loadCell(H-1,this._workCell));){w.loadCell(H-1,this._workCell);const A=this._workCell.getChars().length;this._workCell.getWidth()===0?(k++,H--):A>1&&(L+=A-1,M-=A-1),M--,H--}for(;z<w.length&&B+1<x.length&&!this._isCharWordSeparator(w.loadCell(z+1,this._workCell));){w.loadCell(z+1,this._workCell);const A=this._workCell.getChars().length;this._workCell.getWidth()===2?(C++,z++):A>1&&(R+=A-1,B+=A-1),B++,z++}}B++;let D=M+T-k+L,I=Math.min(this._bufferService.cols,B-M+k+C-L-R);if(p||x.slice(M,B).trim()!==""){if(S&&D===0&&w.getCodePoint(0)!==32){const H=b.lines.get(_[1]-1);if(H&&w.isWrapped&&H.getCodePoint(this._bufferService.cols-1)!==32){const z=this._getWordAt([this._bufferService.cols-1,_[1]-1],!1,!0,!1);if(z){const U=this._bufferService.cols-z.start;D-=U,I+=U}}}if(y&&D+I===this._bufferService.cols&&w.getCodePoint(this._bufferService.cols-1)!==32){const H=b.lines.get(_[1]+1);if(H!=null&&H.isWrapped&&H.getCodePoint(0)!==32){const z=this._getWordAt([0,_[1]+1],!1,!1,!0);z&&(I+=z.length)}}return{start:D,length:I}}}_selectWordAt(_,p){const S=this._getWordAt(_,p);if(S){for(;S.start<0;)S.start+=this._bufferService.cols,_[1]--;this._model.selectionStart=[S.start,_[1]],this._model.selectionStartLength=S.length}}_selectToWordAt(_){const p=this._getWordAt(_,!0);if(p){let S=_[1];for(;p.start<0;)p.start+=this._bufferService.cols,S--;if(!this._model.areSelectionValuesReversed())for(;p.start+p.length>this._bufferService.cols;)p.length-=this._bufferService.cols,S++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?p.start:p.start+p.length,S]}}_isCharWordSeparator(_){return _.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(_.getChars())>=0}_selectLineAt(_){const p=this._bufferService.buffer.getWrappedRangeForLine(_),S={start:{x:0,y:p.first},end:{x:this._bufferService.cols-1,y:p.last}};this._model.selectionStart=[0,p.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,i.getRangeLength)(S,this._bufferService.cols)}};t.SelectionService=m=h([c(3,d.IBufferService),c(4,d.ICoreService),c(5,v.IMouseService),c(6,d.IOptionsService),c(7,v.IRenderService),c(8,v.ICoreBrowserService)],m)},4725:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ILinkProviderService=t.IThemeService=t.ICharacterJoinerService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;const h=a(8343);t.ICharSizeService=(0,h.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),t.IMouseService=(0,h.createDecorator)("MouseService"),t.IRenderService=(0,h.createDecorator)("RenderService"),t.ISelectionService=(0,h.createDecorator)("SelectionService"),t.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),t.IThemeService=(0,h.createDecorator)("ThemeService"),t.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(O,t,a){var h=this&&this.__decorate||function(m,_,p,S){var y,b=arguments.length,w=b<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,_,p,S);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(w=(b<3?y(w):b>3?y(_,p,w):y(_,p))||w);return b>3&&w&&Object.defineProperty(_,p,w),w},c=this&&this.__param||function(m,_){return function(p,S){_(p,S,m)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeService=t.DEFAULT_ANSI_COLORS=void 0;const n=a(7239),l=a(8055),f=a(8460),v=a(844),o=a(2585),e=l.css.toColor("#ffffff"),r=l.css.toColor("#000000"),i=l.css.toColor("#ffffff"),s=l.css.toColor("#000000"),d={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const m=[l.css.toColor("#2e3436"),l.css.toColor("#cc0000"),l.css.toColor("#4e9a06"),l.css.toColor("#c4a000"),l.css.toColor("#3465a4"),l.css.toColor("#75507b"),l.css.toColor("#06989a"),l.css.toColor("#d3d7cf"),l.css.toColor("#555753"),l.css.toColor("#ef2929"),l.css.toColor("#8ae234"),l.css.toColor("#fce94f"),l.css.toColor("#729fcf"),l.css.toColor("#ad7fa8"),l.css.toColor("#34e2e2"),l.css.toColor("#eeeeec")],_=[0,95,135,175,215,255];for(let p=0;p<216;p++){const S=_[p/36%6|0],y=_[p/6%6|0],b=_[p%6];m.push({css:l.channels.toCss(S,y,b),rgba:l.channels.toRgba(S,y,b)})}for(let p=0;p<24;p++){const S=8+10*p;m.push({css:l.channels.toCss(S,S,S),rgba:l.channels.toRgba(S,S,S)})}return m})());let g=t.ThemeService=class extends v.Disposable{get colors(){return this._colors}constructor(m){super(),this._optionsService=m,this._contrastCache=new n.ColorContrastCache,this._halfContrastCache=new n.ColorContrastCache,this._onChangeColors=this.register(new f.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:e,background:r,cursor:i,cursorAccent:s,selectionForeground:void 0,selectionBackgroundTransparent:d,selectionBackgroundOpaque:l.color.blend(r,d),selectionInactiveBackgroundTransparent:d,selectionInactiveBackgroundOpaque:l.color.blend(r,d),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(m={}){const _=this._colors;if(_.foreground=u(m.foreground,e),_.background=u(m.background,r),_.cursor=u(m.cursor,i),_.cursorAccent=u(m.cursorAccent,s),_.selectionBackgroundTransparent=u(m.selectionBackground,d),_.selectionBackgroundOpaque=l.color.blend(_.background,_.selectionBackgroundTransparent),_.selectionInactiveBackgroundTransparent=u(m.selectionInactiveBackground,_.selectionBackgroundTransparent),_.selectionInactiveBackgroundOpaque=l.color.blend(_.background,_.selectionInactiveBackgroundTransparent),_.selectionForeground=m.selectionForeground?u(m.selectionForeground,l.NULL_COLOR):void 0,_.selectionForeground===l.NULL_COLOR&&(_.selectionForeground=void 0),l.color.isOpaque(_.selectionBackgroundTransparent)&&(_.selectionBackgroundTransparent=l.color.opacity(_.selectionBackgroundTransparent,.3)),l.color.isOpaque(_.selectionInactiveBackgroundTransparent)&&(_.selectionInactiveBackgroundTransparent=l.color.opacity(_.selectionInactiveBackgroundTransparent,.3)),_.ansi=t.DEFAULT_ANSI_COLORS.slice(),_.ansi[0]=u(m.black,t.DEFAULT_ANSI_COLORS[0]),_.ansi[1]=u(m.red,t.DEFAULT_ANSI_COLORS[1]),_.ansi[2]=u(m.green,t.DEFAULT_ANSI_COLORS[2]),_.ansi[3]=u(m.yellow,t.DEFAULT_ANSI_COLORS[3]),_.ansi[4]=u(m.blue,t.DEFAULT_ANSI_COLORS[4]),_.ansi[5]=u(m.magenta,t.DEFAULT_ANSI_COLORS[5]),_.ansi[6]=u(m.cyan,t.DEFAULT_ANSI_COLORS[6]),_.ansi[7]=u(m.white,t.DEFAULT_ANSI_COLORS[7]),_.ansi[8]=u(m.brightBlack,t.DEFAULT_ANSI_COLORS[8]),_.ansi[9]=u(m.brightRed,t.DEFAULT_ANSI_COLORS[9]),_.ansi[10]=u(m.brightGreen,t.DEFAULT_ANSI_COLORS[10]),_.ansi[11]=u(m.brightYellow,t.DEFAULT_ANSI_COLORS[11]),_.ansi[12]=u(m.brightBlue,t.DEFAULT_ANSI_COLORS[12]),_.ansi[13]=u(m.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),_.ansi[14]=u(m.brightCyan,t.DEFAULT_ANSI_COLORS[14]),_.ansi[15]=u(m.brightWhite,t.DEFAULT_ANSI_COLORS[15]),m.extendedAnsi){const p=Math.min(_.ansi.length-16,m.extendedAnsi.length);for(let S=0;S<p;S++)_.ansi[S+16]=u(m.extendedAnsi[S],t.DEFAULT_ANSI_COLORS[S+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(m){this._restoreColor(m),this._onChangeColors.fire(this.colors)}_restoreColor(m){if(m!==void 0)switch(m){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[m]=this._restoreColors.ansi[m]}else for(let _=0;_<this._restoreColors.ansi.length;++_)this._colors.ansi[_]=this._restoreColors.ansi[_]}modifyColors(m){m(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function u(m,_){if(m!==void 0)try{return l.css.toColor(m)}catch{}return _}t.ThemeService=g=h([c(0,o.IOptionsService)],g)},6349:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;const h=a(8460),c=a(844);class n extends c.Disposable{constructor(f){super(),this._maxLength=f,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(f){if(this._maxLength===f)return;const v=new Array(f);for(let o=0;o<Math.min(f,this.length);o++)v[o]=this._array[this._getCyclicIndex(o)];this._array=v,this._maxLength=f,this._startIndex=0}get length(){return this._length}set length(f){if(f>this._length)for(let v=this._length;v<f;v++)this._array[v]=void 0;this._length=f}get(f){return this._array[this._getCyclicIndex(f)]}set(f,v){this._array[this._getCyclicIndex(f)]=v}push(f){this._array[this._getCyclicIndex(this._length)]=f,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){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)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(f,v,...o){if(v){for(let e=f;e<this._length-v;e++)this._array[this._getCyclicIndex(e)]=this._array[this._getCyclicIndex(e+v)];this._length-=v,this.onDeleteEmitter.fire({index:f,amount:v})}for(let e=this._length-1;e>=f;e--)this._array[this._getCyclicIndex(e+o.length)]=this._array[this._getCyclicIndex(e)];for(let e=0;e<o.length;e++)this._array[this._getCyclicIndex(f+e)]=o[e];if(o.length&&this.onInsertEmitter.fire({index:f,amount:o.length}),this._length+o.length>this._maxLength){const e=this._length+o.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=o.length}trimStart(f){f>this._length&&(f=this._length),this._startIndex+=f,this._length-=f,this.onTrimEmitter.fire(f)}shiftElements(f,v,o){if(!(v<=0)){if(f<0||f>=this._length)throw new Error("start argument out of range");if(f+o<0)throw new Error("Cannot shift elements in list beyond index 0");if(o>0){for(let r=v-1;r>=0;r--)this.set(f+r+o,this.get(f+r));const e=f+v+o-this._length;if(e>0)for(this._length+=e;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let e=0;e<v;e++)this.set(f+e+o,this.get(f+e))}}_getCyclicIndex(f){return(this._startIndex+f)%this._maxLength}}t.CircularList=n},1439:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function a(h,c=5){if(typeof h!="object")return h;const n=Array.isArray(h)?[]:{};for(const l in h)n[l]=c<=1?h[l]:h[l]&&a(h[l],c-1);return n}},8055:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,h=0,c=0,n=0;var l,f,v,o,e;function r(s){const d=s.toString(16);return d.length<2?"0"+d:d}function i(s,d){return s<d?(d+.05)/(s+.05):(s+.05)/(d+.05)}t.NULL_COLOR={css:"#00000000",rgba:0},function(s){s.toCss=function(d,g,u,m){return m!==void 0?`#${r(d)}${r(g)}${r(u)}${r(m)}`:`#${r(d)}${r(g)}${r(u)}`},s.toRgba=function(d,g,u,m=255){return(d<<24|g<<16|u<<8|m)>>>0},s.toColor=function(d,g,u,m){return{css:s.toCss(d,g,u,m),rgba:s.toRgba(d,g,u,m)}}}(l||(t.channels=l={})),function(s){function d(g,u){return n=Math.round(255*u),[a,h,c]=e.toChannels(g.rgba),{css:l.toCss(a,h,c,n),rgba:l.toRgba(a,h,c,n)}}s.blend=function(g,u){if(n=(255&u.rgba)/255,n===1)return{css:u.css,rgba:u.rgba};const m=u.rgba>>24&255,_=u.rgba>>16&255,p=u.rgba>>8&255,S=g.rgba>>24&255,y=g.rgba>>16&255,b=g.rgba>>8&255;return a=S+Math.round((m-S)*n),h=y+Math.round((_-y)*n),c=b+Math.round((p-b)*n),{css:l.toCss(a,h,c),rgba:l.toRgba(a,h,c)}},s.isOpaque=function(g){return(255&g.rgba)==255},s.ensureContrastRatio=function(g,u,m){const _=e.ensureContrastRatio(g.rgba,u.rgba,m);if(_)return l.toColor(_>>24&255,_>>16&255,_>>8&255)},s.opaque=function(g){const u=(255|g.rgba)>>>0;return[a,h,c]=e.toChannels(u),{css:l.toCss(a,h,c),rgba:u}},s.opacity=d,s.multiplyOpacity=function(g,u){return n=255&g.rgba,d(g,n*u/255)},s.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]}}(f||(t.color=f={})),function(s){let d,g;try{const u=document.createElement("canvas");u.width=1,u.height=1;const m=u.getContext("2d",{willReadFrequently:!0});m&&(d=m,d.globalCompositeOperation="copy",g=d.createLinearGradient(0,0,1,1))}catch{}s.toColor=function(u){if(u.match(/#[\da-f]{3,8}/i))switch(u.length){case 4:return a=parseInt(u.slice(1,2).repeat(2),16),h=parseInt(u.slice(2,3).repeat(2),16),c=parseInt(u.slice(3,4).repeat(2),16),l.toColor(a,h,c);case 5:return a=parseInt(u.slice(1,2).repeat(2),16),h=parseInt(u.slice(2,3).repeat(2),16),c=parseInt(u.slice(3,4).repeat(2),16),n=parseInt(u.slice(4,5).repeat(2),16),l.toColor(a,h,c,n);case 7:return{css:u,rgba:(parseInt(u.slice(1),16)<<8|255)>>>0};case 9:return{css:u,rgba:parseInt(u.slice(1),16)>>>0}}const m=u.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),h=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),l.toColor(a,h,c,n);if(!d||!g)throw new Error("css.toColor: Unsupported css format");if(d.fillStyle=g,d.fillStyle=u,typeof d.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(d.fillRect(0,0,1,1),[a,h,c,n]=d.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:l.toRgba(a,h,c,n),css:u}}}(v||(t.css=v={})),function(s){function d(g,u,m){const _=g/255,p=u/255,S=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.0722*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))}s.relativeLuminance=function(g){return d(g>>16&255,g>>8&255,255&g)},s.relativeLuminance2=d}(o||(t.rgb=o={})),function(s){function d(u,m,_){const p=u>>24&255,S=u>>16&255,y=u>>8&255;let b=m>>24&255,w=m>>16&255,x=m>>8&255,M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));for(;M<_&&(b>0||w>0||x>0);)b-=Math.max(0,Math.ceil(.1*b)),w-=Math.max(0,Math.ceil(.1*w)),x-=Math.max(0,Math.ceil(.1*x)),M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));return(b<<24|w<<16|x<<8|255)>>>0}function g(u,m,_){const p=u>>24&255,S=u>>16&255,y=u>>8&255;let b=m>>24&255,w=m>>16&255,x=m>>8&255,M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));for(;M<_&&(b<255||w<255||x<255);)b=Math.min(255,b+Math.ceil(.1*(255-b))),w=Math.min(255,w+Math.ceil(.1*(255-w))),x=Math.min(255,x+Math.ceil(.1*(255-x))),M=i(o.relativeLuminance2(b,w,x),o.relativeLuminance2(p,S,y));return(b<<24|w<<16|x<<8|255)>>>0}s.blend=function(u,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,p=m>>16&255,S=m>>8&255,y=u>>24&255,b=u>>16&255,w=u>>8&255;return a=y+Math.round((_-y)*n),h=b+Math.round((p-b)*n),c=w+Math.round((S-w)*n),l.toRgba(a,h,c)},s.ensureContrastRatio=function(u,m,_){const p=o.relativeLuminance(u>>8),S=o.relativeLuminance(m>>8);if(i(p,S)<_){if(S<p){const w=d(u,m,_),x=i(p,o.relativeLuminance(w>>8));if(x<_){const M=g(u,m,_);return x>i(p,o.relativeLuminance(M>>8))?w:M}return w}const y=g(u,m,_),b=i(p,o.relativeLuminance(y>>8));if(b<_){const w=d(u,m,_);return b>i(p,o.relativeLuminance(w>>8))?y:w}return y}},s.reduceLuminance=d,s.increaseLuminance=g,s.toChannels=function(u){return[u>>24&255,u>>16&255,u>>8&255,255&u]}}(e||(t.rgba=e={})),t.toPaddedHex=r,t.contrastRatio=i},8969:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;const h=a(844),c=a(2585),n=a(4348),l=a(7866),f=a(744),v=a(7302),o=a(6975),e=a(8460),r=a(1753),i=a(1480),s=a(7994),d=a(9282),g=a(5435),u=a(5981),m=a(2660);let _=!1;class p extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new e.EventEmitter),this._onScroll.event(y=>{var b;(b=this._onScrollApi)==null||b.fire(y.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(y){for(const b in y)this.optionsService.options[b]=y[b]}constructor(y){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new e.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new e.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new e.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new e.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new e.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new e.EventEmitter),this._instantiationService=new n.InstantiationService,this.optionsService=this.register(new v.OptionsService(y)),this._instantiationService.setService(c.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(f.BufferService)),this._instantiationService.setService(c.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(l.LogService)),this._instantiationService.setService(c.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(o.CoreService)),this._instantiationService.setService(c.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(r.CoreMouseService)),this._instantiationService.setService(c.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(i.UnicodeService)),this._instantiationService.setService(c.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(s.CharsetService),this._instantiationService.setService(c.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(m.OscLinkService),this._instantiationService.setService(c.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new g.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,e.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,e.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,e.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,e.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(b=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(b=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new u.WriteBuffer((b,w)=>this._inputHandler.parse(b,w))),this.register((0,e.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(y,b){this._writeBuffer.write(y,b)}writeSync(y,b){this._logService.logLevel<=c.LogLevelEnum.WARN&&!_&&(this._logService.warn("writeSync is unreliable and will be removed soon."),_=!0),this._writeBuffer.writeSync(y,b)}input(y,b=!0){this.coreService.triggerDataEvent(y,b)}resize(y,b){isNaN(y)||isNaN(b)||(y=Math.max(y,f.MINIMUM_COLS),b=Math.max(b,f.MINIMUM_ROWS),this._bufferService.resize(y,b))}scroll(y,b=!1){this._bufferService.scroll(y,b)}scrollLines(y,b,w){this._bufferService.scrollLines(y,b,w)}scrollPages(y){this.scrollLines(y*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(y){const b=y-this._bufferService.buffer.ydisp;b!==0&&this.scrollLines(b)}registerEscHandler(y,b){return this._inputHandler.registerEscHandler(y,b)}registerDcsHandler(y,b){return this._inputHandler.registerDcsHandler(y,b)}registerCsiHandler(y,b){return this._inputHandler.registerCsiHandler(y,b)}registerOscHandler(y,b){return this._inputHandler.registerOscHandler(y,b)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let y=!1;const b=this.optionsService.rawOptions.windowsPty;b&&b.buildNumber!==void 0&&b.buildNumber!==void 0?y=b.backend==="conpty"&&b.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(y=!0),y?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const y=[];y.push(this.onLineFeed(d.updateWindowsModeWrappedState.bind(null,this._bufferService))),y.push(this.registerCsiHandler({final:"H"},()=>((0,d.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)(()=>{for(const b of y)b.dispose()})}}}t.CoreTerminal=p},8460:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===a)return void this._listeners.splice(h,1)}}})),this._event}fire(a,h){const c=[];for(let n=0;n<this._listeners.length;n++)c.push(this._listeners[n]);for(let n=0;n<c.length;n++)c[n].call(void 0,a,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},t.forwardEvent=function(a,h){return a(c=>h.fire(c))},t.runAndSubscribe=function(a,h){return h(void 0),a(c=>h(c))}},5435:function(O,t,a){var h=this&&this.__decorate||function(k,C,L,R){var D,I=arguments.length,H=I<3?C:R===null?R=Object.getOwnPropertyDescriptor(C,L):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(k,C,L,R);else for(var z=k.length-1;z>=0;z--)(D=k[z])&&(H=(I<3?D(H):I>3?D(C,L,H):D(C,L))||H);return I>3&&H&&Object.defineProperty(C,L,H),H},c=this&&this.__param||function(k,C){return function(L,R){C(L,R,k)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;const n=a(2584),l=a(7116),f=a(2015),v=a(844),o=a(482),e=a(8437),r=a(8460),i=a(643),s=a(511),d=a(3734),g=a(2585),u=a(1480),m=a(6242),_=a(6351),p=a(5941),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2},y=131072;function b(k,C){if(k>24)return C.setWinLines||!1;switch(k){case 1:return!!C.restoreWin;case 2:return!!C.minimizeWin;case 3:return!!C.setWinPosition;case 4:return!!C.setWinSizePixels;case 5:return!!C.raiseWin;case 6:return!!C.lowerWin;case 7:return!!C.refreshWin;case 8:return!!C.setWinSizeChars;case 9:return!!C.maximizeWin;case 10:return!!C.fullscreenWin;case 11:return!!C.getWinState;case 13:return!!C.getWinPosition;case 14:return!!C.getWinSizePixels;case 15:return!!C.getScreenSizePixels;case 16:return!!C.getCellSizePixels;case 18:return!!C.getWinSizeChars;case 19:return!!C.getScreenSizeChars;case 20:return!!C.getIconTitle;case 21:return!!C.getWinTitle;case 22:return!!C.pushTitle;case 23:return!!C.popTitle;case 24:return!!C.setWinLines}return!1}var w;(function(k){k[k.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",k[k.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(w||(t.WindowsOptionsReportType=w={}));let x=0;class M extends v.Disposable{getAttrData(){return this._curAttrData}constructor(C,L,R,D,I,H,z,U,A=new f.EscapeSequenceParser){super(),this._bufferService=C,this._charsetService=L,this._coreService=R,this._logService=D,this._optionsService=I,this._oscLinkService=H,this._coreMouseService=z,this._unicodeService=U,this._parser=A,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new o.StringToUtf32,this._utf8Decoder=new o.Utf8ToUtf32,this._workCell=new s.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new r.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new r.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new r.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new r.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new r.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new r.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new r.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new r.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new r.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new r.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new r.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new r.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new B(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(E=>this._activeBuffer=E.activeBuffer)),this._parser.setCsiHandlerFallback((E,F)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(E),params:F.toArray()})}),this._parser.setEscHandlerFallback(E=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(E)})}),this._parser.setExecuteHandlerFallback(E=>{this._logService.debug("Unknown EXECUTE code: ",{code:E})}),this._parser.setOscHandlerFallback((E,F,P)=>{this._logService.debug("Unknown OSC code: ",{identifier:E,action:F,data:P})}),this._parser.setDcsHandlerFallback((E,F,P)=>{F==="HOOK"&&(P=P.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(E),action:F,payload:P})}),this._parser.setPrintHandler((E,F,P)=>this.print(E,F,P)),this._parser.registerCsiHandler({final:"@"},E=>this.insertChars(E)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},E=>this.scrollLeft(E)),this._parser.registerCsiHandler({final:"A"},E=>this.cursorUp(E)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},E=>this.scrollRight(E)),this._parser.registerCsiHandler({final:"B"},E=>this.cursorDown(E)),this._parser.registerCsiHandler({final:"C"},E=>this.cursorForward(E)),this._parser.registerCsiHandler({final:"D"},E=>this.cursorBackward(E)),this._parser.registerCsiHandler({final:"E"},E=>this.cursorNextLine(E)),this._parser.registerCsiHandler({final:"F"},E=>this.cursorPrecedingLine(E)),this._parser.registerCsiHandler({final:"G"},E=>this.cursorCharAbsolute(E)),this._parser.registerCsiHandler({final:"H"},E=>this.cursorPosition(E)),this._parser.registerCsiHandler({final:"I"},E=>this.cursorForwardTab(E)),this._parser.registerCsiHandler({final:"J"},E=>this.eraseInDisplay(E,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},E=>this.eraseInDisplay(E,!0)),this._parser.registerCsiHandler({final:"K"},E=>this.eraseInLine(E,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},E=>this.eraseInLine(E,!0)),this._parser.registerCsiHandler({final:"L"},E=>this.insertLines(E)),this._parser.registerCsiHandler({final:"M"},E=>this.deleteLines(E)),this._parser.registerCsiHandler({final:"P"},E=>this.deleteChars(E)),this._parser.registerCsiHandler({final:"S"},E=>this.scrollUp(E)),this._parser.registerCsiHandler({final:"T"},E=>this.scrollDown(E)),this._parser.registerCsiHandler({final:"X"},E=>this.eraseChars(E)),this._parser.registerCsiHandler({final:"Z"},E=>this.cursorBackwardTab(E)),this._parser.registerCsiHandler({final:"`"},E=>this.charPosAbsolute(E)),this._parser.registerCsiHandler({final:"a"},E=>this.hPositionRelative(E)),this._parser.registerCsiHandler({final:"b"},E=>this.repeatPrecedingCharacter(E)),this._parser.registerCsiHandler({final:"c"},E=>this.sendDeviceAttributesPrimary(E)),this._parser.registerCsiHandler({prefix:">",final:"c"},E=>this.sendDeviceAttributesSecondary(E)),this._parser.registerCsiHandler({final:"d"},E=>this.linePosAbsolute(E)),this._parser.registerCsiHandler({final:"e"},E=>this.vPositionRelative(E)),this._parser.registerCsiHandler({final:"f"},E=>this.hVPosition(E)),this._parser.registerCsiHandler({final:"g"},E=>this.tabClear(E)),this._parser.registerCsiHandler({final:"h"},E=>this.setMode(E)),this._parser.registerCsiHandler({prefix:"?",final:"h"},E=>this.setModePrivate(E)),this._parser.registerCsiHandler({final:"l"},E=>this.resetMode(E)),this._parser.registerCsiHandler({prefix:"?",final:"l"},E=>this.resetModePrivate(E)),this._parser.registerCsiHandler({final:"m"},E=>this.charAttributes(E)),this._parser.registerCsiHandler({final:"n"},E=>this.deviceStatus(E)),this._parser.registerCsiHandler({prefix:"?",final:"n"},E=>this.deviceStatusPrivate(E)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},E=>this.softReset(E)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},E=>this.setCursorStyle(E)),this._parser.registerCsiHandler({final:"r"},E=>this.setScrollRegion(E)),this._parser.registerCsiHandler({final:"s"},E=>this.saveCursor(E)),this._parser.registerCsiHandler({final:"t"},E=>this.windowOptions(E)),this._parser.registerCsiHandler({final:"u"},E=>this.restoreCursor(E)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},E=>this.insertColumns(E)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},E=>this.deleteColumns(E)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},E=>this.selectProtected(E)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},E=>this.requestMode(E,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},E=>this.requestMode(E,!1)),this._parser.setExecuteHandler(n.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(n.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(n.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(n.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(n.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(n.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(n.C1.IND,()=>this.index()),this._parser.setExecuteHandler(n.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(n.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new m.OscHandler(E=>(this.setTitle(E),this.setIconName(E),!0))),this._parser.registerOscHandler(1,new m.OscHandler(E=>this.setIconName(E))),this._parser.registerOscHandler(2,new m.OscHandler(E=>this.setTitle(E))),this._parser.registerOscHandler(4,new m.OscHandler(E=>this.setOrReportIndexedColor(E))),this._parser.registerOscHandler(8,new m.OscHandler(E=>this.setHyperlink(E))),this._parser.registerOscHandler(10,new m.OscHandler(E=>this.setOrReportFgColor(E))),this._parser.registerOscHandler(11,new m.OscHandler(E=>this.setOrReportBgColor(E))),this._parser.registerOscHandler(12,new m.OscHandler(E=>this.setOrReportCursorColor(E))),this._parser.registerOscHandler(104,new m.OscHandler(E=>this.restoreIndexedColor(E))),this._parser.registerOscHandler(110,new m.OscHandler(E=>this.restoreFgColor(E))),this._parser.registerOscHandler(111,new m.OscHandler(E=>this.restoreBgColor(E))),this._parser.registerOscHandler(112,new m.OscHandler(E=>this.restoreCursorColor(E))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const E in l.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:E},()=>this.selectCharset("("+E)),this._parser.registerEscHandler({intermediates:")",final:E},()=>this.selectCharset(")"+E)),this._parser.registerEscHandler({intermediates:"*",final:E},()=>this.selectCharset("*"+E)),this._parser.registerEscHandler({intermediates:"+",final:E},()=>this.selectCharset("+"+E)),this._parser.registerEscHandler({intermediates:"-",final:E},()=>this.selectCharset("-"+E)),this._parser.registerEscHandler({intermediates:".",final:E},()=>this.selectCharset("."+E)),this._parser.registerEscHandler({intermediates:"/",final:E},()=>this.selectCharset("/"+E));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(E=>(this._logService.error("Parsing error: ",E),E)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new _.DcsHandler((E,F)=>this.requestStatusString(E,F)))}_preserveStack(C,L,R,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=C,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=R,this._parseStack.position=D}_logSlowResolvingAsync(C){this._logService.logLevel<=g.LogLevelEnum.WARN&&Promise.race([C,new Promise((L,R)=>setTimeout(()=>R("#SLOW_TIMEOUT"),5e3))]).catch(L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(C,L){let R,D=this._activeBuffer.x,I=this._activeBuffer.y,H=0;const z=this._parseStack.paused;if(z){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(R),R;D=this._parseStack.cursorStartX,I=this._parseStack.cursorStartY,this._parseStack.paused=!1,C.length>y&&(H=this._parseStack.position+y)}if(this._logService.logLevel<=g.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof C=="string"?` "${C}"`:` "${Array.prototype.map.call(C,E=>String.fromCharCode(E)).join("")}"`),typeof C=="string"?C.split("").map(E=>E.charCodeAt(0)):C),this._parseBuffer.length<C.length&&this._parseBuffer.length<y&&(this._parseBuffer=new Uint32Array(Math.min(C.length,y))),z||this._dirtyRowTracker.clearRange(),C.length>y)for(let E=H;E<C.length;E+=y){const F=E+y<C.length?E+y:C.length,P=typeof C=="string"?this._stringDecoder.decode(C.substring(E,F),this._parseBuffer):this._utf8Decoder.decode(C.subarray(E,F),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,P))return this._preserveStack(D,I,P,E),this._logSlowResolvingAsync(R),R}else if(!z){const E=typeof C=="string"?this._stringDecoder.decode(C,this._parseBuffer):this._utf8Decoder.decode(C,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,E))return this._preserveStack(D,I,E,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===D&&this._activeBuffer.y===I||this._onCursorMove.fire();const U=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),A=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);A<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(A,this._bufferService.rows-1),Math.min(U,this._bufferService.rows-1))}print(C,L,R){let D,I;const H=this._charsetService.charset,z=this._optionsService.rawOptions.screenReaderMode,U=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,E=this._coreService.modes.insertMode,F=this._curAttrData;let P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-L>0&&P.getWidth(this._activeBuffer.x-1)===2&&P.setCellFromCodepoint(this._activeBuffer.x-1,0,1,F);let $=this._parser.precedingJoinState;for(let W=L;W<R;++W){if(D=C[W],D<127&&H){const re=H[String.fromCharCode(D)];re&&(D=re.charCodeAt(0))}const V=this._unicodeService.charProperties(D,$);I=u.UnicodeService.extractWidth(V);const j=u.UnicodeService.extractShouldJoin(V),Q=j?u.UnicodeService.extractWidth($):0;if($=V,z&&this._onA11yChar.fire((0,o.stringFromCodePoint)(D)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+I-Q>U){if(A){const re=P;let q=this._activeBuffer.x-Q;for(this._activeBuffer.x=Q,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),P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Q>0&&P instanceof e.BufferLine&&P.copyCellsFrom(re,q,0,Q,!1);q<U;)re.setCellFromCodepoint(q++,0,1,F)}else if(this._activeBuffer.x=U-1,I===2)continue}if(j&&this._activeBuffer.x){const re=P.getWidth(this._activeBuffer.x-1)?1:2;P.addCodepointToCell(this._activeBuffer.x-re,D,I);for(let q=I-Q;--q>=0;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}else if(E&&(P.insertCells(this._activeBuffer.x,I-Q,this._activeBuffer.getNullCell(F)),P.getWidth(U-1)===2&&P.setCellFromCodepoint(U-1,i.NULL_CELL_CODE,i.NULL_CELL_WIDTH,F)),P.setCellFromCodepoint(this._activeBuffer.x++,D,I,F),I>0)for(;--I;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}this._parser.precedingJoinState=$,this._activeBuffer.x<U&&R-L>0&&P.getWidth(this._activeBuffer.x)===0&&!P.hasContent(this._activeBuffer.x)&&P.setCellFromCodepoint(this._activeBuffer.x,0,1,F),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(C,L){return C.final!=="t"||C.prefix||C.intermediates?this._parser.registerCsiHandler(C,L):this._parser.registerCsiHandler(C,R=>!b(R.params[0],this._optionsService.rawOptions.windowOptions)||L(R))}registerDcsHandler(C,L){return this._parser.registerDcsHandler(C,new _.DcsHandler(L))}registerEscHandler(C,L){return this._parser.registerEscHandler(C,L)}registerOscHandler(C,L){return this._parser.registerOscHandler(C,new m.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var C;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&&((C=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&C.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const C=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-C),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(C=this._bufferService.cols-1){this._activeBuffer.x=Math.min(C,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(C,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=C,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=C,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(C,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+C,this._activeBuffer.y+L)}cursorUp(C){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,C.params[0]||1)):this._moveCursor(0,-(C.params[0]||1)),!0}cursorDown(C){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,C.params[0]||1)):this._moveCursor(0,C.params[0]||1),!0}cursorForward(C){return this._moveCursor(C.params[0]||1,0),!0}cursorBackward(C){return this._moveCursor(-(C.params[0]||1),0),!0}cursorNextLine(C){return this.cursorDown(C),this._activeBuffer.x=0,!0}cursorPrecedingLine(C){return this.cursorUp(C),this._activeBuffer.x=0,!0}cursorCharAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(C){return this._setCursor(C.length>=2?(C.params[1]||1)-1:0,(C.params[0]||1)-1),!0}charPosAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(C){return this._moveCursor(C.params[0]||1,0),!0}linePosAbsolute(C){return this._setCursor(this._activeBuffer.x,(C.params[0]||1)-1),!0}vPositionRelative(C){return this._moveCursor(0,C.params[0]||1),!0}hVPosition(C){return this.cursorPosition(C),!0}tabClear(C){const L=C.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=C.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=C.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(C){const L=C.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(C,L,R,D=!1,I=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);H.replaceCells(L,R,this._activeBuffer.getNullCell(this._eraseAttrData()),I),D&&(H.isWrapped=!1)}_resetBufferLine(C,L=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+C),R.isWrapped=!1)}eraseInDisplay(C,L=!1){let R;switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);R<this._bufferService.rows;R++)this._resetBufferLine(R,L);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,L);this._dirtyRowTracker.markDirty(0);break;case 3:const D=this._activeBuffer.lines.length-this._bufferService.rows;D>0&&(this._activeBuffer.lines.trimStart(D),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-D,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-D,0),this._onScroll.fire(0))}return!0}eraseInLine(C,L=!1){switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(C){this._restrictCursor();let L=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-D+1;for(;L--;)this._activeBuffer.lines.splice(I-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(C){this._restrictCursor();let L=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let D;for(D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,D=this._bufferService.rows-1+this._activeBuffer.ybase-D;L--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(C){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(C){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(C){let L=C.params[0]||1;for(;L--;)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._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(C){let L=C.params[0]||1;for(;L--;)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(e.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=C.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);D.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=C.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);D.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=C.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);D.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=C.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);D.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(C){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(C.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(C){const L=this._parser.precedingJoinState;if(!L)return!0;const R=C.params[0]||1,D=u.UnicodeService.extractWidth(L),I=this._activeBuffer.x-D,H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(I),z=new Uint32Array(H.length*R);let U=0;for(let E=0;E<H.length;){const F=H.codePointAt(E)||0;z[U++]=F,E+=F>65535?2:1}let A=U;for(let E=1;E<R;++E)z.copyWithin(A,0,U),A+=U;return this.print(z,0,A),!0}sendDeviceAttributesPrimary(C){return C.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(n.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(n.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(C){return C.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(n.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(n.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(C.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(n.C0.ESC+"[>83;40003;0c")),!0}_is(C){return(this._optionsService.rawOptions.termName+"").indexOf(C)===0}setMode(C){for(let L=0;L<C.length;L++)switch(C.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(C){for(let L=0;L<C.length;L++)switch(C.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,l.DEFAULT_CHARSET),this._charsetService.setgCharset(1,l.DEFAULT_CHARSET),this._charsetService.setgCharset(2,l.DEFAULT_CHARSET),this._charsetService.setgCharset(3,l.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:this._optionsService.options.cursorBlink=!0;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 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";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}resetMode(C){for(let L=0;L<C.length;L++)switch(C.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(C){for(let L=0;L<C.length;L++)switch(C.params[L]){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:this._optionsService.options.cursorBlink=!1;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:case 1016: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(),C.params[L]===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}requestMode(C,L){const R=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:I}=this._coreMouseService,H=this._coreService,{buffers:z,cols:U}=this._bufferService,{active:A,alt:E}=z,F=this._optionsService.rawOptions,P=j=>j?1:2,$=C.params[0];return W=$,V=L?$===2?4:$===4?P(H.modes.insertMode):$===12?3:$===20?P(F.convertEol):0:$===1?P(R.applicationCursorKeys):$===3?F.windowOptions.setWinLines?U===80?2:U===132?1:0:0:$===6?P(R.origin):$===7?P(R.wraparound):$===8?3:$===9?P(D==="X10"):$===12?P(F.cursorBlink):$===25?P(!H.isCursorHidden):$===45?P(R.reverseWraparound):$===66?P(R.applicationKeypad):$===67?4:$===1e3?P(D==="VT200"):$===1002?P(D==="DRAG"):$===1003?P(D==="ANY"):$===1004?P(R.sendFocus):$===1005?4:$===1006?P(I==="SGR"):$===1015?4:$===1016?P(I==="SGR_PIXELS"):$===1048?1:$===47||$===1047||$===1049?P(A===E):$===2004?P(R.bracketedPasteMode):0,H.triggerDataEvent(`${n.C0.ESC}[${L?"":"?"}${W};${V}$y`),!0;var W,V}_updateAttrColor(C,L,R,D,I){return L===2?(C|=50331648,C&=-16777216,C|=d.AttributeData.fromColorRGB([R,D,I])):L===5&&(C&=-50331904,C|=33554432|255&R),C}_extractColor(C,L,R){const D=[0,0,-1,0,0,0];let I=0,H=0;do{if(D[H+I]=C.params[L+H],C.hasSubParams(L+H)){const z=C.getSubParams(L+H);let U=0;do D[1]===5&&(I=1),D[H+U+1+I]=z[U];while(++U<z.length&&U+H+1+I<D.length);break}if(D[1]===5&&H+I>=2||D[1]===2&&H+I>=5)break;D[1]&&(I=1)}while(++H+L<C.length&&H+I<D.length);for(let z=2;z<D.length;++z)D[z]===-1&&(D[z]=0);switch(D[0]){case 38:R.fg=this._updateAttrColor(R.fg,D[1],D[3],D[4],D[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,D[1],D[3],D[4],D[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,D[1],D[3],D[4],D[5])}return H}_processUnderline(C,L){L.extended=L.extended.clone(),(!~C||C>5)&&(C=1),L.extended.underlineStyle=C,L.fg|=268435456,C===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(C){C.fg=e.DEFAULT_ATTR_DATA.fg,C.bg=e.DEFAULT_ATTR_DATA.bg,C.extended=C.extended.clone(),C.extended.underlineStyle=0,C.extended.underlineColor&=-67108864,C.updateExtended()}charAttributes(C){if(C.length===1&&C.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=C.length;let R;const D=this._curAttrData;for(let I=0;I<L;I++)R=C.params[I],R>=30&&R<=37?(D.fg&=-50331904,D.fg|=16777216|R-30):R>=40&&R<=47?(D.bg&=-50331904,D.bg|=16777216|R-40):R>=90&&R<=97?(D.fg&=-50331904,D.fg|=16777224|R-90):R>=100&&R<=107?(D.bg&=-50331904,D.bg|=16777224|R-100):R===0?this._processSGR0(D):R===1?D.fg|=134217728:R===3?D.bg|=67108864:R===4?(D.fg|=268435456,this._processUnderline(C.hasSubParams(I)?C.getSubParams(I)[0]:1,D)):R===5?D.fg|=536870912:R===7?D.fg|=67108864:R===8?D.fg|=1073741824:R===9?D.fg|=2147483648:R===2?D.bg|=134217728:R===21?this._processUnderline(2,D):R===22?(D.fg&=-134217729,D.bg&=-134217729):R===23?D.bg&=-67108865:R===24?(D.fg&=-268435457,this._processUnderline(0,D)):R===25?D.fg&=-536870913:R===27?D.fg&=-67108865:R===28?D.fg&=-1073741825:R===29?D.fg&=2147483647:R===39?(D.fg&=-67108864,D.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):R===49?(D.bg&=-67108864,D.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?I+=this._extractColor(C,I,D):R===53?D.bg|=1073741824:R===55?D.bg&=-1073741825:R===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):R===100?(D.fg&=-67108864,D.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(C){switch(C.params[0]){case 5:this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[${L};${R}R`)}return!0}deviceStatusPrivate(C){if(C.params[0]===6){const L=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[?${L};${R}R`)}return!0}softReset(C){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.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}setCursorStyle(C){const L=C.params[0]||1;switch(L){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"}const R=L%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(C){const L=C.params[0]||1;let R;return(C.length<2||(R=C.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(C){if(!b(C.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=C.length>1?C.params[1]:0;switch(C.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(w.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(w.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(C){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}restoreCursor(C){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}setTitle(C){return this._windowTitle=C,this._onTitleChange.fire(C),!0}setIconName(C){return this._iconName=C,!0}setOrReportIndexedColor(C){const L=[],R=C.split(";");for(;R.length>1;){const D=R.shift(),I=R.shift();if(/^\d+$/.exec(D)){const H=parseInt(D);if(T(H))if(I==="?")L.push({type:0,index:H});else{const z=(0,p.parseColor)(I);z&&L.push({type:1,index:H,color:z})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(C){const L=C.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(C,L){this._getCurrentLinkId()&&this._finishHyperlink();const R=C.split(":");let D;const I=R.findIndex(H=>H.startsWith("id="));return I!==-1&&(D=R[I].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:D,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(C,L){const R=C.split(";");for(let D=0;D<R.length&&!(L>=this._specialColors.length);++D,++L)if(R[D]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const I=(0,p.parseColor)(R[D]);I&&this._onColor.fire([{type:1,index:this._specialColors[L],color:I}])}return!0}setOrReportFgColor(C){return this._setOrReportSpecialColor(C,0)}setOrReportBgColor(C){return this._setOrReportSpecialColor(C,1)}setOrReportCursorColor(C){return this._setOrReportSpecialColor(C,2)}restoreIndexedColor(C){if(!C)return this._onColor.fire([{type:2}]),!0;const L=[],R=C.split(";");for(let D=0;D<R.length;++D)if(/^\d+$/.exec(R[D])){const I=parseInt(R[D]);T(I)&&L.push({type:2,index:I})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(C){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(C){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(C){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,l.DEFAULT_CHARSET),!0}selectCharset(C){return C.length!==2?(this.selectDefaultCharset(),!0):(C[0]==="/"||this._charsetService.setgCharset(S[C[0]],l.CHARSETS[C[1]]||l.DEFAULT_CHARSET),!0)}index(){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}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const C=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,C,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(C){return this._charsetService.setgLevel(C),!0}screenAlignmentPattern(){const C=new s.CellData;C.content=4194373,C.fg=this._curAttrData.fg,C.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const R=this._activeBuffer.ybase+this._activeBuffer.y+L,D=this._activeBuffer.lines.get(R);D&&(D.fill(C),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(C,L){const R=this._bufferService.buffer,D=this._optionsService.rawOptions;return(I=>(this._coreService.triggerDataEvent(`${n.C0.ESC}${I}${n.C0.ESC}\\`),!0))(C==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:C==='"p'?'P1$r61;1"p':C==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:C==="m"?"P1$r0m":C===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(C,L){this._dirtyRowTracker.markRangeDirty(C,L)}}t.InputHandler=M;let B=class{constructor(k){this._bufferService=k,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(k){k<this.start?this.start=k:k>this.end&&(this.end=k)}markRangeDirty(k,C){k>C&&(x=k,k=C,C=x),k<this.start&&(this.start=k),C>this.end&&(this.end=C)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function T(k){return 0<=k&&k<256}B=h([c(0,g.IBufferService)],B)},844:(O,t)=>{function a(h){for(const c of h)c.dispose();h.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const c=this._disposables.indexOf(h);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var c;this._isDisposed||h===this._value||((c=this._value)==null||c.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},t.toDisposable=function(h){return{dispose:h}},t.disposeArray=a,t.getDisposeArrayDisposable=function(h){return{dispose:()=>a(h)}}},1505:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,l){this._data[c]||(this._data[c]={}),this._data[c][n]=l}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(h,c,n,l,f){this._data.get(h,c)||this._data.set(h,c,new a),this._data.get(h,c).set(n,l,f)}get(h,c,n,l){var f;return(f=this._data.get(h,c))==null?void 0:f.get(n,l)}clear(){this._data.clear()}}},6114:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,h=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),t.isIpad=h==="iPad",t.isIphone=h==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),t.isLinux=h.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},6106:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortedList=void 0;let a=0;t.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(a=this._search(this._getKey(h)),this._array.splice(a,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const c=this._getKey(h);if(c===void 0||(a=this._search(c),a===-1)||this._getKey(this._array[a])!==c)return!1;do if(this._array[a]===h)return this._array.splice(a,1),!0;while(++a<this._array.length&&this._getKey(this._array[a])===c);return!1}*getKeyIterator(h){if(this._array.length!==0&&(a=this._search(h),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===h))do yield this._array[a];while(++a<this._array.length&&this._getKey(this._array[a])===h)}forEachByKey(h,c){if(this._array.length!==0&&(a=this._search(h),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===h))do c(this._array[a]);while(++a<this._array.length&&this._getKey(this._array[a])===h)}values(){return[...this._array].values()}_search(h){let c=0,n=this._array.length-1;for(;n>=c;){let l=c+n>>1;const f=this._getKey(this._array[l]);if(f>h)n=l-1;else{if(!(f<h)){for(;l>0&&this._getKey(this._array[l-1])===h;)l--;return l}c=l+1}}return c}}},7226:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const h=a(6114);class c{constructor(){this._tasks=[],this._i=0}enqueue(f){this._tasks.push(f),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(f){this._idleCallback=void 0;let v=0,o=0,e=f.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(v=Date.now(),this._tasks[this._i]()||this._i++,v=Math.max(1,Date.now()-v),o=Math.max(v,o),r=f.timeRemaining(),1.5*o>r)return e-v<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-v))}ms`),void this._start();e=r}this.clear()}}class n extends c{_requestCallback(f){return setTimeout(()=>f(this._createDeadline(16)))}_cancelCallback(f){clearTimeout(f)}_createDeadline(f){const v=Date.now()+f;return{timeRemaining:()=>Math.max(0,v-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(l){return requestIdleCallback(l)}_cancelCallback(l){cancelIdleCallback(l)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(l){this._queue.clear(),this._queue.enqueue(l)}flush(){this._queue.flush()}}},9282:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;const h=a(643);t.updateWindowsModeWrappedState=function(c){const n=c.buffer.lines.get(c.buffer.ybase+c.buffer.y-1),l=n==null?void 0:n.get(c.cols-1),f=c.buffer.lines.get(c.buffer.ybase+c.buffer.y);f&&l&&(f.isWrapped=l[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&l[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){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()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,l=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=l}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=h},9092:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Buffer=t.MAX_BUFFER_SIZE=void 0;const h=a(6349),c=a(7226),n=a(3734),l=a(8437),f=a(4634),v=a(511),o=a(643),e=a(4863),r=a(7116);t.MAX_BUFFER_SIZE=4294967295,t.Buffer=class{constructor(i,s,d){this._hasScrollback=i,this._optionsService=s,this._bufferService=d,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=l.DEFAULT_ATTR_DATA.clone(),this.savedCharset=r.DEFAULT_CHARSET,this.markers=[],this._nullCell=v.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=v.CellData.fromCharData([0,o.WHITESPACE_CELL_CHAR,o.WHITESPACE_CELL_WIDTH,o.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new c.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(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 n.ExtendedAttrs),this._nullCell}getWhitespaceCell(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 n.ExtendedAttrs),this._whitespaceCell}getBlankLine(i,s){return new l.BufferLine(this._bufferService.cols,this.getNullCell(i),s)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const i=this.ybase+this.y-this.ydisp;return i>=0&&i<this._rows}_getCorrectBufferLength(i){if(!this._hasScrollback)return i;const s=i+this._optionsService.rawOptions.scrollback;return s>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:s}fillViewportRows(i){if(this.lines.length===0){i===void 0&&(i=l.DEFAULT_ATTR_DATA);let s=this._rows;for(;s--;)this.lines.push(this.getBlankLine(i))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(i,s){const d=this.getNullCell(l.DEFAULT_ATTR_DATA);let g=0;const u=this._getCorrectBufferLength(s);if(u>this.lines.maxLength&&(this.lines.maxLength=u),this.lines.length>0){if(this._cols<i)for(let _=0;_<this.lines.length;_++)g+=+this.lines.get(_).resize(i,d);let m=0;if(this._rows<s)for(let _=this._rows;_<s;_++)this.lines.length<s+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new l.BufferLine(i,d)):this.ybase>0&&this.lines.length<=this.ybase+this.y+m+1?(this.ybase--,m++,this.ydisp>0&&this.ydisp--):this.lines.push(new l.BufferLine(i,d)));else for(let _=this._rows;_>s;_--)this.lines.length>s+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(u<this.lines.maxLength){const _=this.lines.length-u;_>0&&(this.lines.trimStart(_),this.ybase=Math.max(this.ybase-_,0),this.ydisp=Math.max(this.ydisp-_,0),this.savedY=Math.max(this.savedY-_,0)),this.lines.maxLength=u}this.x=Math.min(this.x,i-1),this.y=Math.min(this.y,s-1),m&&(this.y+=m),this.savedX=Math.min(this.savedX,i-1),this.scrollTop=0}if(this.scrollBottom=s-1,this._isReflowEnabled&&(this._reflow(i,s),this._cols>i))for(let m=0;m<this.lines.length;m++)g+=+this.lines.get(m).resize(i,d);this._cols=i,this._rows=s,this._memoryCleanupQueue.clear(),g>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let i=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,i=!1);let s=0;for(;this._memoryCleanupPosition<this.lines.length;)if(s+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),s>100)return!0;return i}get _isReflowEnabled(){const i=this._optionsService.rawOptions.windowsPty;return i&&i.buildNumber?this._hasScrollback&&i.backend==="conpty"&&i.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(i,s){this._cols!==i&&(i>this._cols?this._reflowLarger(i,s):this._reflowSmaller(i,s))}_reflowLarger(i,s){const d=(0,f.reflowLargerGetLinesToRemove)(this.lines,this._cols,i,this.ybase+this.y,this.getNullCell(l.DEFAULT_ATTR_DATA));if(d.length>0){const g=(0,f.reflowLargerCreateNewLayout)(this.lines,d);(0,f.reflowLargerApplyNewLayout)(this.lines,g.layout),this._reflowLargerAdjustViewport(i,s,g.countRemoved)}}_reflowLargerAdjustViewport(i,s,d){const g=this.getNullCell(l.DEFAULT_ATTR_DATA);let u=d;for(;u-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<s&&this.lines.push(new l.BufferLine(i,g))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-d,0)}_reflowSmaller(i,s){const d=this.getNullCell(l.DEFAULT_ATTR_DATA),g=[];let u=0;for(let m=this.lines.length-1;m>=0;m--){let _=this.lines.get(m);if(!_||!_.isWrapped&&_.getTrimmedLength()<=i)continue;const p=[_];for(;_.isWrapped&&m>0;)_=this.lines.get(--m),p.unshift(_);const S=this.ybase+this.y;if(S>=m&&S<m+p.length)continue;const y=p[p.length-1].getTrimmedLength(),b=(0,f.reflowSmallerGetNewLineLengths)(p,this._cols,i),w=b.length-p.length;let x;x=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+w):Math.max(0,this.lines.length-this.lines.maxLength+w);const M=[];for(let R=0;R<w;R++){const D=this.getBlankLine(l.DEFAULT_ATTR_DATA,!0);M.push(D)}M.length>0&&(g.push({start:m+p.length+u,newLines:M}),u+=M.length),p.push(...M);let B=b.length-1,T=b[B];T===0&&(B--,T=b[B]);let k=p.length-w-1,C=y;for(;k>=0;){const R=Math.min(C,T);if(p[B]===void 0)break;if(p[B].copyCellsFrom(p[k],C-R,T-R,R,!0),T-=R,T===0&&(B--,T=b[B]),C-=R,C===0){k--;const D=Math.max(k,0);C=(0,f.getWrappedLineTrimmedLength)(p,D,this._cols)}}for(let R=0;R<p.length;R++)b[R]<i&&p[R].setCell(b[R],d);let L=w-x;for(;L-- >0;)this.ybase===0?this.y<s-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+u)-s&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+w,this.ybase+s-1)}if(g.length>0){const m=[],_=[];for(let B=0;B<this.lines.length;B++)_.push(this.lines.get(B));const p=this.lines.length;let S=p-1,y=0,b=g[y];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+u);let w=0;for(let B=Math.min(this.lines.maxLength-1,p+u-1);B>=0;B--)if(b&&b.start>S+w){for(let T=b.newLines.length-1;T>=0;T--)this.lines.set(B--,b.newLines[T]);B++,m.push({index:S+1,amount:b.newLines.length}),w+=b.newLines.length,b=g[++y]}else this.lines.set(B,_[S--]);let x=0;for(let B=m.length-1;B>=0;B--)m[B].index+=x,this.lines.onInsertEmitter.fire(m[B]),x+=m[B].amount;const M=Math.max(0,p+u-this.lines.maxLength);M>0&&this.lines.onTrimEmitter.fire(M)}}translateBufferLineToString(i,s,d=0,g){const u=this.lines.get(i);return u?u.translateToString(s,d,g):""}getWrappedRangeForLine(i){let s=i,d=i;for(;s>0&&this.lines.get(s).isWrapped;)s--;for(;d+1<this.lines.length&&this.lines.get(d+1).isWrapped;)d++;return{first:s,last:d}}setupTabStops(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}prevStop(i){for(i==null&&(i=this.x);!this.tabs[--i]&&i>0;);return i>=this._cols?this._cols-1:i<0?0:i}nextStop(i){for(i==null&&(i=this.x);!this.tabs[++i]&&i<this._cols;);return i>=this._cols?this._cols-1:i<0?0:i}clearMarkers(i){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].line===i&&(this.markers[s].dispose(),this.markers.splice(s--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let i=0;i<this.markers.length;i++)this.markers[i].dispose(),this.markers.splice(i--,1);this._isClearing=!1}addMarker(i){const s=new e.Marker(i);return this.markers.push(s),s.register(this.lines.onTrim(d=>{s.line-=d,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(d=>{s.line>=d.index&&(s.line+=d.amount)})),s.register(this.lines.onDelete(d=>{s.line>=d.index&&s.line<d.index+d.amount&&s.dispose(),s.line>d.index&&(s.line-=d.amount)})),s.register(s.onDispose(()=>this._removeMarker(s))),s}_removeMarker(i){this._isClearing||this.markers.splice(this.markers.indexOf(i),1)}}},8437:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;const h=a(3734),c=a(511),n=a(643),l=a(482);t.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let f=0;class v{constructor(e,r,i=!1){this.isWrapped=i,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const s=r||c.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]);for(let d=0;d<e;++d)this.setCell(d,s);this.length=e}get(e){const r=this._data[3*e+0],i=2097151&r;return[this._data[3*e+1],2097152&r?this._combined[e]:i?(0,l.stringFromCodePoint)(i):"",r>>22,2097152&r?this._combined[e].charCodeAt(this._combined[e].length-1):i]}set(e,r){this._data[3*e+1]=r[n.CHAR_DATA_ATTR_INDEX],r[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=r[1],this._data[3*e+0]=2097152|e|r[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=r[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|r[n.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const r=this._data[3*e+0];return 2097152&r?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&r}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const r=this._data[3*e+0];return 2097152&r?this._combined[e]:2097151&r?(0,l.stringFromCodePoint)(2097151&r):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,r){return f=3*e,r.content=this._data[f+0],r.fg=this._data[f+1],r.bg=this._data[f+2],2097152&r.content&&(r.combinedData=this._combined[e]),268435456&r.bg&&(r.extended=this._extendedAttrs[e]),r}setCell(e,r){2097152&r.content&&(this._combined[e]=r.combinedData),268435456&r.bg&&(this._extendedAttrs[e]=r.extended),this._data[3*e+0]=r.content,this._data[3*e+1]=r.fg,this._data[3*e+2]=r.bg}setCellFromCodepoint(e,r,i,s){268435456&s.bg&&(this._extendedAttrs[e]=s.extended),this._data[3*e+0]=r|i<<22,this._data[3*e+1]=s.fg,this._data[3*e+2]=s.bg}addCodepointToCell(e,r,i){let s=this._data[3*e+0];2097152&s?this._combined[e]+=(0,l.stringFromCodePoint)(r):2097151&s?(this._combined[e]=(0,l.stringFromCodePoint)(2097151&s)+(0,l.stringFromCodePoint)(r),s&=-2097152,s|=2097152):s=r|4194304,i&&(s&=-12582913,s|=i<<22),this._data[3*e+0]=s}insertCells(e,r,i){if((e%=this.length)&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,i),r<this.length-e){const s=new c.CellData;for(let d=this.length-e-r-1;d>=0;--d)this.setCell(e+r+d,this.loadCell(e+d,s));for(let d=0;d<r;++d)this.setCell(e+d,i)}else for(let s=e;s<this.length;++s)this.setCell(s,i);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,i)}deleteCells(e,r,i){if(e%=this.length,r<this.length-e){const s=new c.CellData;for(let d=0;d<this.length-e-r;++d)this.setCell(e+d,this.loadCell(e+r+d,s));for(let d=this.length-r;d<this.length;++d)this.setCell(d,i)}else for(let s=e;s<this.length;++s)this.setCell(s,i);e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,i),this.getWidth(e)!==0||this.hasContent(e)||this.setCellFromCodepoint(e,0,1,i)}replaceCells(e,r,i,s=!1){if(s)for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,i),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,i);e<r&&e<this.length;)this.isProtected(e)||this.setCell(e,i),e++;else for(e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,i),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,i);e<r&&e<this.length;)this.setCell(e++,i)}resize(e,r){if(e===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const i=3*e;if(e>this.length){if(this._data.buffer.byteLength>=4*i)this._data=new Uint32Array(this._data.buffer,0,i);else{const s=new Uint32Array(i);s.set(this._data),this._data=s}for(let s=this.length;s<e;++s)this.setCell(s,r)}else{this._data=this._data.subarray(0,i);const s=Object.keys(this._combined);for(let g=0;g<s.length;g++){const u=parseInt(s[g],10);u>=e&&delete this._combined[u]}const d=Object.keys(this._extendedAttrs);for(let g=0;g<d.length;g++){const u=parseInt(d[g],10);u>=e&&delete this._extendedAttrs[u]}}return this.length=e,4*i*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,r=!1){if(r)for(let i=0;i<this.length;++i)this.isProtected(i)||this.setCell(i,e);else{this._combined={},this._extendedAttrs={};for(let i=0;i<this.length;++i)this.setCell(i,e)}}copyFrom(e){this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={};for(const r in e._combined)this._combined[r]=e._combined[r];this._extendedAttrs={};for(const r in e._extendedAttrs)this._extendedAttrs[r]=e._extendedAttrs[r];this.isWrapped=e.isWrapped}clone(){const e=new v(0);e._data=new Uint32Array(this._data),e.length=this.length;for(const r in this._combined)e._combined[r]=this._combined[r];for(const r in this._extendedAttrs)e._extendedAttrs[r]=this._extendedAttrs[r];return e.isWrapped=this.isWrapped,e}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,r,i,s,d){const g=e._data;if(d)for(let m=s-1;m>=0;m--){for(let _=0;_<3;_++)this._data[3*(i+m)+_]=g[3*(r+m)+_];268435456&g[3*(r+m)+2]&&(this._extendedAttrs[i+m]=e._extendedAttrs[r+m])}else for(let m=0;m<s;m++){for(let _=0;_<3;_++)this._data[3*(i+m)+_]=g[3*(r+m)+_];268435456&g[3*(r+m)+2]&&(this._extendedAttrs[i+m]=e._extendedAttrs[r+m])}const u=Object.keys(e._combined);for(let m=0;m<u.length;m++){const _=parseInt(u[m],10);_>=r&&(this._combined[_-r+i]=e._combined[_])}}translateToString(e,r,i,s){r=r??0,i=i??this.length,e&&(i=Math.min(i,this.getTrimmedLength())),s&&(s.length=0);let d="";for(;r<i;){const g=this._data[3*r+0],u=2097151&g,m=2097152&g?this._combined[r]:u?(0,l.stringFromCodePoint)(u):n.WHITESPACE_CELL_CHAR;if(d+=m,s)for(let _=0;_<m.length;++_)s.push(r);r+=g>>22||1}return s&&s.push(r),d}}t.BufferLine=v},4841:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(a,h){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return h*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(O,t)=>{function a(h,c,n){if(c===h.length-1)return h[c].getTrimmedLength();const l=!h[c].hasContent(n-1)&&h[c].getWidth(n-1)===1,f=h[c+1].getWidth(0)===2;return l&&f?n-1:n}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(h,c,n,l,f){const v=[];for(let o=0;o<h.length-1;o++){let e=o,r=h.get(++e);if(!r.isWrapped)continue;const i=[h.get(o)];for(;e<h.length&&r.isWrapped;)i.push(r),r=h.get(++e);if(l>=o&&l<e){o+=i.length-1;continue}let s=0,d=a(i,s,c),g=1,u=0;for(;g<i.length;){const _=a(i,g,c),p=_-u,S=n-d,y=Math.min(p,S);i[s].copyCellsFrom(i[g],u,d,y,!1),d+=y,d===n&&(s++,d=0),u+=y,u===_&&(g++,u=0),d===0&&s!==0&&i[s-1].getWidth(n-1)===2&&(i[s].copyCellsFrom(i[s-1],n-1,d++,1,!1),i[s-1].setCell(n-1,f))}i[s].replaceCells(d,n,f);let m=0;for(let _=i.length-1;_>0&&(_>s||i[_].getTrimmedLength()===0);_--)m++;m>0&&(v.push(o+i.length-m),v.push(m)),o+=i.length-1}return v},t.reflowLargerCreateNewLayout=function(h,c){const n=[];let l=0,f=c[l],v=0;for(let o=0;o<h.length;o++)if(f===o){const e=c[++l];h.onDeleteEmitter.fire({index:o-v,amount:e}),o+=e-1,v+=e,f=c[++l]}else n.push(o);return{layout:n,countRemoved:v}},t.reflowLargerApplyNewLayout=function(h,c){const n=[];for(let l=0;l<c.length;l++)n.push(h.get(c[l]));for(let l=0;l<n.length;l++)h.set(l,n[l]);h.length=c.length},t.reflowSmallerGetNewLineLengths=function(h,c,n){const l=[],f=h.map((r,i)=>a(h,i,c)).reduce((r,i)=>r+i);let v=0,o=0,e=0;for(;e<f;){if(f-e<n){l.push(f-e);break}v+=n;const r=a(h,o,c);v>r&&(v-=r,o++);const i=h[o].getWidth(v-1)===2;i&&v--;const s=i?n-1:n;l.push(s),e+=s}return l},t.getWrappedLineTrimmedLength=a},5295:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;const h=a(8460),c=a(844),n=a(9092);class l extends c.Disposable{constructor(v,o){super(),this._optionsService=v,this._bufferService=o,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new n.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new n.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(v){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(v),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}))}resize(v,o){this._normal.resize(v,o),this._alt.resize(v,o),this.setupTabStops(v)}setupTabStops(v){this._normal.setupTabStops(v),this._alt.setupTabStops(v)}}t.BufferSet=l},511:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const h=a(482),c=a(643),n=a(3734);class l extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(v){const o=new l;return o.setFromCharData(v),o}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(v){this.fg=v[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let o=!1;if(v[c.CHAR_DATA_CHAR_INDEX].length>2)o=!0;else if(v[c.CHAR_DATA_CHAR_INDEX].length===2){const e=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const r=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(e-55296)+r-56320+65536|v[c.CHAR_DATA_WIDTH_INDEX]<<22:o=!0}else o=!0}else this.content=v[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[c.CHAR_DATA_WIDTH_INDEX]<<22;o&&(this.combinedData=v[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|v[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=l},643:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;const h=a(8460),c=a(844);class n{get id(){return this._id}constructor(f){this.line=f,this.isDisposed=!1,this._disposables=[],this._id=n._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,c.disposeArray)(this._disposables),this._disposables.length=0)}register(f){return this._disposables.push(f),f}}t.Marker=n,n._nextId=1},7116:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.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:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(O,t)=>{var a,h,c;Object.defineProperty(t,"__esModule",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(n){n.NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="\x07",n.BS="\b",n.HT=" ",n.LF=`
65
- `,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""}(a||(t.C0=a={})),function(n){n.PAD="€",n.HOP="",n.BPH="‚",n.NBH="ƒ",n.IND="„",n.NEL="…",n.SSA="†",n.ESA="‡",n.HTS="ˆ",n.HTJ="‰",n.VTS="Š",n.PLD="‹",n.PLU="Œ",n.RI="",n.SS2="Ž",n.SS3="",n.DCS="",n.PU1="‘",n.PU2="’",n.STS="“",n.CCH="”",n.MW="•",n.SPA="–",n.EPA="—",n.SOS="˜",n.SGCI="™",n.SCI="š",n.CSI="›",n.ST="œ",n.OSC="",n.PM="ž",n.APC="Ÿ"}(h||(t.C1=h={})),function(n){n.ST=`${a.ESC}\\`}(c||(t.C1_ESCAPED=c={}))},7399:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;const h=a(2584),c={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:["'",'"']};t.evaluateKeyboardEvent=function(n,l,f,v){const o={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?o.key=l?h.C0.ESC+"OA":h.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?o.key=l?h.C0.ESC+"OD":h.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?o.key=l?h.C0.ESC+"OC":h.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(o.key=l?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:o.key=n.ctrlKey?"\b":h.C0.DEL,n.altKey&&(o.key=h.C0.ESC+o.key);break;case 9:if(n.shiftKey){o.key=h.C0.ESC+"[Z";break}o.key=h.C0.HT,o.cancel=!0;break;case 13:o.key=n.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,o.cancel=!0;break;case 27:o.key=h.C0.ESC,n.altKey&&(o.key=h.C0.ESC+h.C0.ESC),o.cancel=!0;break;case 37:if(n.metaKey)break;e?(o.key=h.C0.ESC+"[1;"+(e+1)+"D",o.key===h.C0.ESC+"[1;3D"&&(o.key=h.C0.ESC+(f?"b":"[1;5D"))):o.key=l?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(o.key=h.C0.ESC+"[1;"+(e+1)+"C",o.key===h.C0.ESC+"[1;3C"&&(o.key=h.C0.ESC+(f?"f":"[1;5C"))):o.key=l?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(o.key=h.C0.ESC+"[1;"+(e+1)+"A",f||o.key!==h.C0.ESC+"[1;3A"||(o.key=h.C0.ESC+"[1;5A")):o.key=l?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(o.key=h.C0.ESC+"[1;"+(e+1)+"B",f||o.key!==h.C0.ESC+"[1;3B"||(o.key=h.C0.ESC+"[1;5B")):o.key=l?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(o.key=h.C0.ESC+"[2~");break;case 46:o.key=e?h.C0.ESC+"[3;"+(e+1)+"~":h.C0.ESC+"[3~";break;case 36:o.key=e?h.C0.ESC+"[1;"+(e+1)+"H":l?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:o.key=e?h.C0.ESC+"[1;"+(e+1)+"F":l?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:n.shiftKey?o.type=2:n.ctrlKey?o.key=h.C0.ESC+"[5;"+(e+1)+"~":o.key=h.C0.ESC+"[5~";break;case 34:n.shiftKey?o.type=3:n.ctrlKey?o.key=h.C0.ESC+"[6;"+(e+1)+"~":o.key=h.C0.ESC+"[6~";break;case 112:o.key=e?h.C0.ESC+"[1;"+(e+1)+"P":h.C0.ESC+"OP";break;case 113:o.key=e?h.C0.ESC+"[1;"+(e+1)+"Q":h.C0.ESC+"OQ";break;case 114:o.key=e?h.C0.ESC+"[1;"+(e+1)+"R":h.C0.ESC+"OR";break;case 115:o.key=e?h.C0.ESC+"[1;"+(e+1)+"S":h.C0.ESC+"OS";break;case 116:o.key=e?h.C0.ESC+"[15;"+(e+1)+"~":h.C0.ESC+"[15~";break;case 117:o.key=e?h.C0.ESC+"[17;"+(e+1)+"~":h.C0.ESC+"[17~";break;case 118:o.key=e?h.C0.ESC+"[18;"+(e+1)+"~":h.C0.ESC+"[18~";break;case 119:o.key=e?h.C0.ESC+"[19;"+(e+1)+"~":h.C0.ESC+"[19~";break;case 120:o.key=e?h.C0.ESC+"[20;"+(e+1)+"~":h.C0.ESC+"[20~";break;case 121:o.key=e?h.C0.ESC+"[21;"+(e+1)+"~":h.C0.ESC+"[21~";break;case 122:o.key=e?h.C0.ESC+"[23;"+(e+1)+"~":h.C0.ESC+"[23~";break;case 123:o.key=e?h.C0.ESC+"[24;"+(e+1)+"~":h.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(f&&!v||!n.altKey||n.metaKey)!f||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?o.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(o.key=h.C0.US),n.key==="@"&&(o.key=h.C0.NUL)):n.keyCode===65&&(o.type=1);else{const r=c[n.keyCode],i=r==null?void 0:r[n.shiftKey?1:0];if(i)o.key=h.C0.ESC+i;else if(n.keyCode>=65&&n.keyCode<=90){const s=n.ctrlKey?n.keyCode-64:n.keyCode+32;let d=String.fromCharCode(s);n.shiftKey&&(d=d.toUpperCase()),o.key=h.C0.ESC+d}else if(n.keyCode===32)o.key=h.C0.ESC+(n.ctrlKey?h.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let s=n.code.slice(3,4);n.shiftKey||(s=s.toLowerCase()),o.key=h.C0.ESC+s,o.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?o.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?o.key=h.C0.NUL:n.keyCode>=51&&n.keyCode<=55?o.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?o.key=h.C0.DEL:n.keyCode===219?o.key=h.C0.ESC:n.keyCode===220?o.key=h.C0.FS:n.keyCode===221&&(o.key=h.C0.GS)}return o}},482:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,h=0,c=a.length){let n="";for(let l=h;l<c;++l){let f=a[l];f>65535?(f-=65536,n+=String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):n+=String.fromCharCode(f)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,h){const c=a.length;if(!c)return 0;let n=0,l=0;if(this._interim){const f=a.charCodeAt(l++);56320<=f&&f<=57343?h[n++]=1024*(this._interim-55296)+f-56320+65536:(h[n++]=this._interim,h[n++]=f),this._interim=0}for(let f=l;f<c;++f){const v=a.charCodeAt(f);if(55296<=v&&v<=56319){if(++f>=c)return this._interim=v,n;const o=a.charCodeAt(f);56320<=o&&o<=57343?h[n++]=1024*(v-55296)+o-56320+65536:(h[n++]=v,h[n++]=o)}else v!==65279&&(h[n++]=v)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,h){const c=a.length;if(!c)return 0;let n,l,f,v,o=0,e=0,r=0;if(this.interim[0]){let d=!1,g=this.interim[0];g&=(224&g)==192?31:(240&g)==224?15:7;let u,m=0;for(;(u=63&this.interim[++m])&&m<4;)g<<=6,g|=u;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,p=_-m;for(;r<p;){if(r>=c)return 0;if(u=a[r++],(192&u)!=128){r--,d=!0;break}this.interim[m++]=u,g<<=6,g|=63&u}d||(_===2?g<128?r--:h[o++]=g:_===3?g<2048||g>=55296&&g<=57343||g===65279||(h[o++]=g):g<65536||g>1114111||(h[o++]=g)),this.interim.fill(0)}const i=c-4;let s=r;for(;s<c;){for(;!(!(s<i)||128&(n=a[s])||128&(l=a[s+1])||128&(f=a[s+2])||128&(v=a[s+3]));)h[o++]=n,h[o++]=l,h[o++]=f,h[o++]=v,s+=4;if(n=a[s++],n<128)h[o++]=n;else if((224&n)==192){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(e=(31&n)<<6|63&l,e<128){s--;continue}h[o++]=e}else if((240&n)==224){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,o;if(f=a[s++],(192&f)!=128){s--;continue}if(e=(15&n)<<12|(63&l)<<6|63&f,e<2048||e>=55296&&e<=57343||e===65279)continue;h[o++]=e}else if((248&n)==240){if(s>=c)return this.interim[0]=n,o;if(l=a[s++],(192&l)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,o;if(f=a[s++],(192&f)!=128){s--;continue}if(s>=c)return this.interim[0]=n,this.interim[1]=l,this.interim[2]=f,o;if(v=a[s++],(192&v)!=128){s--;continue}if(e=(7&n)<<18|(63&l)<<12|(63&f)<<6|63&v,e<65536||e>1114111)continue;h[o++]=e}}return o}}},225:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;const h=a(1480),c=[[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]],n=[[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]];let l;t.UnicodeV6=class{constructor(){if(this.version="6",!l){l=new Uint8Array(65536),l.fill(1),l[0]=0,l.fill(0,1,32),l.fill(0,127,160),l.fill(2,4352,4448),l[9001]=2,l[9002]=2,l.fill(2,11904,42192),l[12351]=1,l.fill(2,44032,55204),l.fill(2,63744,64256),l.fill(2,65040,65050),l.fill(2,65072,65136),l.fill(2,65280,65377),l.fill(2,65504,65511);for(let f=0;f<c.length;++f)l.fill(0,c[f][0],c[f][1]+1)}}wcwidth(f){return f<32?0:f<127?1:f<65536?l[f]:function(v,o){let e,r=0,i=o.length-1;if(v<o[0][0]||v>o[i][1])return!1;for(;i>=r;)if(e=r+i>>1,v>o[e][1])r=e+1;else{if(!(v<o[e][0]))return!0;i=e-1}return!1}(f,n)?0:f>=131072&&f<=196605||f>=196608&&f<=262141?2:1}charProperties(f,v){let o=this.wcwidth(f),e=o===0&&v!==0;if(e){const r=h.UnicodeService.extractWidth(v);r===0?e=!1:r>o&&(o=r)}return h.UnicodeService.createPropertyValue(0,o,e)}}},5981:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;const h=a(8460),c=a(844);class n extends c.Disposable{constructor(f){super(),this._action=f,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(f,v){if(v!==void 0&&this._syncCalls>v)return void(this._syncCalls=0);if(this._pendingData+=f.length,this._writeBuffer.push(f),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let o;for(this._isSyncWriting=!0;o=this._writeBuffer.shift();){this._action(o);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(f,v){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=f.length,this._writeBuffer.push(f),this._callbacks.push(v),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=f.length,this._writeBuffer.push(f),this._callbacks.push(v)}_innerWrite(f=0,v=!0){const o=f||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],r=this._action(e,v);if(r){const s=d=>Date.now()-o>=12?setTimeout(()=>this._innerWrite(0,d)):this._innerWrite(o,d);return void r.catch(d=>(queueMicrotask(()=>{throw d}),Promise.resolve(!1))).then(s)}const i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-o>=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(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}t.WriteBuffer=n},5941:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;const a=/^([\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})$/,h=/^[\da-f]+$/;function c(n,l){const f=n.toString(16),v=f.length<2?"0"+f:f;switch(l){case 4:return f[0];case 8:return v;case 12:return(v+v).slice(0,3);default:return v+v}}t.parseColor=function(n){if(!n)return;let l=n.toLowerCase();if(l.indexOf("rgb:")===0){l=l.slice(4);const f=a.exec(l);if(f){const v=f[1]?15:f[4]?255:f[7]?4095:65535;return[Math.round(parseInt(f[1]||f[4]||f[7]||f[10],16)/v*255),Math.round(parseInt(f[2]||f[5]||f[8]||f[11],16)/v*255),Math.round(parseInt(f[3]||f[6]||f[9]||f[12],16)/v*255)]}}else if(l.indexOf("#")===0&&(l=l.slice(1),h.exec(l)&&[3,6,9,12].includes(l.length))){const f=l.length/3,v=[0,0,0];for(let o=0;o<3;++o){const e=parseInt(l.slice(f*o,f*o+f),16);v[o]=f===1?e<<4:f===2?e:f===3?e>>4:e>>8}return v}},t.toRgbString=function(n,l=16){const[f,v,o]=n;return`rgb:${c(f,l)}/${c(v,l)}/${c(o,l)}`}},5770:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;const h=a(482),c=a(8742),n=a(5770),l=[];t.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=l,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}registerHandler(v,o){this._handlers[v]===void 0&&(this._handlers[v]=[]);const e=this._handlers[v];return e.push(o),{dispose:()=>{const r=e.indexOf(o);r!==-1&&e.splice(r,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}reset(){if(this._active.length)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].unhook(!1);this._stack.paused=!1,this._active=l,this._ident=0}hook(v,o){if(this.reset(),this._ident=v,this._active=this._handlers[v]||l,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(o);else this._handlerFb(this._ident,"HOOK",o)}put(v,o,e){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(v,o,e);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(v,o,e))}unhook(v,o=!0){if(this._active.length){let e=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,e=o,i=this._stack.fallThrough,this._stack.paused=!1),!i&&e===!1){for(;r>=0&&(e=this._active[r].unhook(v),e!==!0);r--)if(e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,e;r--}for(;r>=0;r--)if(e=this._active[r].unhook(!1),e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,e}else this._handlerFb(this._ident,"UNHOOK",v);this._active=l,this._ident=0}};const f=new c.Params;f.addParam(0),t.DcsHandler=class{constructor(v){this._handler=v,this._data="",this._params=f,this._hitLimit=!1}hook(v){this._params=v.length>1||v.params[0]?v.clone():f,this._data="",this._hitLimit=!1}put(v,o,e){this._hitLimit||(this._data+=(0,h.utf32ToString)(v,o,e),this._data.length>n.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(v){let o=!1;if(this._hitLimit)o=!1;else if(v&&(o=this._handler(this._data,this._params),o instanceof Promise))return o.then(e=>(this._params=f,this._data="",this._hitLimit=!1,e));return this._params=f,this._data="",this._hitLimit=!1,o}}},2015:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;const h=a(844),c=a(8742),n=a(6242),l=a(6351);class f{constructor(r){this.table=new Uint8Array(r)}setDefault(r,i){this.table.fill(r<<4|i)}add(r,i,s,d){this.table[i<<8|r]=s<<4|d}addMany(r,i,s,d){for(let g=0;g<r.length;g++)this.table[i<<8|r[g]]=s<<4|d}}t.TransitionTable=f;const v=160;t.VT500_TRANSITION_TABLE=function(){const e=new f(4095),r=Array.apply(null,Array(256)).map((m,_)=>_),i=(m,_)=>r.slice(m,_),s=i(32,127),d=i(0,24);d.push(25),d.push.apply(d,i(28,32));const g=i(0,14);let u;for(u in e.setDefault(1,0),e.addMany(s,0,2,0),g)e.addMany([24,26,153,154],u,3,0),e.addMany(i(128,144),u,3,0),e.addMany(i(144,152),u,3,0),e.add(156,u,0,0),e.add(27,u,11,1),e.add(157,u,4,8),e.addMany([152,158,159],u,0,7),e.add(155,u,11,3),e.add(144,u,11,9);return e.addMany(d,0,3,0),e.addMany(d,1,3,1),e.add(127,1,0,1),e.addMany(d,8,0,8),e.addMany(d,3,3,3),e.add(127,3,0,3),e.addMany(d,4,3,4),e.add(127,4,0,4),e.addMany(d,6,3,6),e.addMany(d,5,3,5),e.add(127,5,0,5),e.addMany(d,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(d,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(d,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(d,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(d,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(d,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(d,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(v,0,2,0),e.add(v,8,5,8),e.add(v,6,0,6),e.add(v,11,0,11),e.add(v,13,13,13),e}();class o extends h.Disposable{constructor(r=t.VT500_TRANSITION_TABLE){super(),this._transitions=r,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new c.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(i,s,d)=>{},this._executeHandlerFb=i=>{},this._csiHandlerFb=(i,s)=>{},this._escHandlerFb=i=>{},this._errorHandlerFb=i=>i,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new n.OscParser),this._dcsParser=this.register(new l.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(r,i=[64,126]){let s=0;if(r.prefix){if(r.prefix.length>1)throw new Error("only one byte as prefix supported");if(s=r.prefix.charCodeAt(0),s&&60>s||s>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(r.intermediates){if(r.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let g=0;g<r.intermediates.length;++g){const u=r.intermediates.charCodeAt(g);if(32>u||u>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");s<<=8,s|=u}}if(r.final.length!==1)throw new Error("final must be a single byte");const d=r.final.charCodeAt(0);if(i[0]>d||d>i[1])throw new Error(`final must be in range ${i[0]} .. ${i[1]}`);return s<<=8,s|=d,s}identToString(r){const i=[];for(;r;)i.push(String.fromCharCode(255&r)),r>>=8;return i.reverse().join("")}setPrintHandler(r){this._printHandler=r}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(r,i){const s=this._identifier(r,[48,126]);this._escHandlers[s]===void 0&&(this._escHandlers[s]=[]);const d=this._escHandlers[s];return d.push(i),{dispose:()=>{const g=d.indexOf(i);g!==-1&&d.splice(g,1)}}}clearEscHandler(r){this._escHandlers[this._identifier(r,[48,126])]&&delete this._escHandlers[this._identifier(r,[48,126])]}setEscHandlerFallback(r){this._escHandlerFb=r}setExecuteHandler(r,i){this._executeHandlers[r.charCodeAt(0)]=i}clearExecuteHandler(r){this._executeHandlers[r.charCodeAt(0)]&&delete this._executeHandlers[r.charCodeAt(0)]}setExecuteHandlerFallback(r){this._executeHandlerFb=r}registerCsiHandler(r,i){const s=this._identifier(r);this._csiHandlers[s]===void 0&&(this._csiHandlers[s]=[]);const d=this._csiHandlers[s];return d.push(i),{dispose:()=>{const g=d.indexOf(i);g!==-1&&d.splice(g,1)}}}clearCsiHandler(r){this._csiHandlers[this._identifier(r)]&&delete this._csiHandlers[this._identifier(r)]}setCsiHandlerFallback(r){this._csiHandlerFb=r}registerDcsHandler(r,i){return this._dcsParser.registerHandler(this._identifier(r),i)}clearDcsHandler(r){this._dcsParser.clearHandler(this._identifier(r))}setDcsHandlerFallback(r){this._dcsParser.setHandlerFallback(r)}registerOscHandler(r,i){return this._oscParser.registerHandler(r,i)}clearOscHandler(r){this._oscParser.clearHandler(r)}setOscHandlerFallback(r){this._oscParser.setHandlerFallback(r)}setErrorHandler(r){this._errorHandler=r}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(r,i,s,d,g){this._parseStack.state=r,this._parseStack.handlers=i,this._parseStack.handlerPos=s,this._parseStack.transition=d,this._parseStack.chunkPos=g}parse(r,i,s){let d,g=0,u=0,m=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,m=this._parseStack.chunkPos+1;else{if(s===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const _=this._parseStack.handlers;let p=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(s===!1&&p>-1){for(;p>=0&&(d=_[p](this._params),d!==!0);p--)if(d instanceof Promise)return this._parseStack.handlerPos=p,d}this._parseStack.handlers=[];break;case 4:if(s===!1&&p>-1){for(;p>=0&&(d=_[p](),d!==!0);p--)if(d instanceof Promise)return this._parseStack.handlerPos=p,d}this._parseStack.handlers=[];break;case 6:if(g=r[this._parseStack.chunkPos],d=this._dcsParser.unhook(g!==24&&g!==26,s),d)return d;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(g=r[this._parseStack.chunkPos],d=this._oscParser.end(g!==24&&g!==26,s),d)return d;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,m=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let _=m;_<i;++_){switch(g=r[_],u=this._transitions.table[this.currentState<<8|(g<160?g:v)],u>>4){case 2:for(let w=_+1;;++w){if(w>=i||(g=r[w])<32||g>126&&g<v){this._printHandler(r,_,w),_=w-1;break}if(++w>=i||(g=r[w])<32||g>126&&g<v){this._printHandler(r,_,w),_=w-1;break}if(++w>=i||(g=r[w])<32||g>126&&g<v){this._printHandler(r,_,w),_=w-1;break}if(++w>=i||(g=r[w])<32||g>126&&g<v){this._printHandler(r,_,w),_=w-1;break}}break;case 3:this._executeHandlers[g]?this._executeHandlers[g]():this._executeHandlerFb(g),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:_,code:g,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const p=this._csiHandlers[this._collect<<8|g];let S=p?p.length-1:-1;for(;S>=0&&(d=p[S](this._params),d!==!0);S--)if(d instanceof Promise)return this._preserveStack(3,p,S,u,_),d;S<0&&this._csiHandlerFb(this._collect<<8|g,this._params),this.precedingJoinState=0;break;case 8:do switch(g){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(g-48)}while(++_<i&&(g=r[_])>47&&g<60);_--;break;case 9:this._collect<<=8,this._collect|=g;break;case 10:const y=this._escHandlers[this._collect<<8|g];let b=y?y.length-1:-1;for(;b>=0&&(d=y[b](),d!==!0);b--)if(d instanceof Promise)return this._preserveStack(4,y,b,u,_),d;b<0&&this._escHandlerFb(this._collect<<8|g),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|g,this._params);break;case 13:for(let w=_+1;;++w)if(w>=i||(g=r[w])===24||g===26||g===27||g>127&&g<v){this._dcsParser.put(r,_,w),_=w-1;break}break;case 14:if(d=this._dcsParser.unhook(g!==24&&g!==26),d)return this._preserveStack(6,[],0,u,_),d;g===27&&(u|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let w=_+1;;w++)if(w>=i||(g=r[w])<32||g>127&&g<v){this._oscParser.put(r,_,w),_=w-1;break}break;case 6:if(d=this._oscParser.end(g!==24&&g!==26),d)return this._preserveStack(5,[],0,u,_),d;g===27&&(u|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&u}}}t.EscapeSequenceParser=o},6242:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;const h=a(5770),c=a(482),n=[];t.OscParser=class{constructor(){this._state=0,this._active=n,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(l,f){this._handlers[l]===void 0&&(this._handlers[l]=[]);const v=this._handlers[l];return v.push(f),{dispose:()=>{const o=v.indexOf(f);o!==-1&&v.splice(o,1)}}}clearHandler(l){this._handlers[l]&&delete this._handlers[l]}setHandlerFallback(l){this._handlerFb=l}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}reset(){if(this._state===2)for(let l=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;l>=0;--l)this._active[l].end(!1);this._stack.paused=!1,this._active=n,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||n,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].start();else this._handlerFb(this._id,"START")}_put(l,f,v){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(l,f,v);else this._handlerFb(this._id,"PUT",(0,c.utf32ToString)(l,f,v))}start(){this.reset(),this._state=1}put(l,f,v){if(this._state!==3){if(this._state===1)for(;f<v;){const o=l[f++];if(o===59){this._state=2,this._start();break}if(o<48||57<o)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+o-48}this._state===2&&v-f>0&&this._put(l,f,v)}}end(l,f=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let v=!1,o=this._active.length-1,e=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,v=f,e=this._stack.fallThrough,this._stack.paused=!1),!e&&v===!1){for(;o>=0&&(v=this._active[o].end(l),v!==!0);o--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,v;o--}for(;o>=0;o--)if(v=this._active[o].end(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,v}else this._handlerFb(this._id,"END",l);this._active=n,this._id=-1,this._state=0}}},t.OscHandler=class{constructor(l){this._handler=l,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(l,f,v){this._hitLimit||(this._data+=(0,c.utf32ToString)(l,f,v),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(l){let f=!1;if(this._hitLimit)f=!1;else if(l&&(f=this._handler(this._data),f instanceof Promise))return f.then(v=>(this._data="",this._hitLimit=!1,v));return this._data="",this._hitLimit=!1,f}}},8742:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;const a=2147483647;class h{static fromArray(n){const l=new h;if(!n.length)return l;for(let f=Array.isArray(n[0])?1:0;f<n.length;++f){const v=n[f];if(Array.isArray(v))for(let o=0;o<v.length;++o)l.addSubParam(v[o]);else l.addParam(v)}return l}constructor(n=32,l=32){if(this.maxLength=n,this.maxSubParamsLength=l,l>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(n),this.length=0,this._subParams=new Int32Array(l),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(n),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const n=new h(this.maxLength,this.maxSubParamsLength);return n.params.set(this.params),n.length=this.length,n._subParams.set(this._subParams),n._subParamsLength=this._subParamsLength,n._subParamsIdx.set(this._subParamsIdx),n._rejectDigits=this._rejectDigits,n._rejectSubDigits=this._rejectSubDigits,n._digitIsSub=this._digitIsSub,n}toArray(){const n=[];for(let l=0;l<this.length;++l){n.push(this.params[l]);const f=this._subParamsIdx[l]>>8,v=255&this._subParamsIdx[l];v-f>0&&n.push(Array.prototype.slice.call(this._subParams,f,v))}return n}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(n){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=n>a?a:n}}addSubParam(n){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=n>a?a:n,this._subParamsIdx[this.length-1]++}}hasSubParams(n){return(255&this._subParamsIdx[n])-(this._subParamsIdx[n]>>8)>0}getSubParams(n){const l=this._subParamsIdx[n]>>8,f=255&this._subParamsIdx[n];return f-l>0?this._subParams.subarray(l,f):null}getSubParamsAll(){const n={};for(let l=0;l<this.length;++l){const f=this._subParamsIdx[l]>>8,v=255&this._subParamsIdx[l];v-f>0&&(n[l]=this._subParams.slice(f,v))}return n}addDigit(n){let l;if(this._rejectDigits||!(l=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const f=this._digitIsSub?this._subParams:this.params,v=f[l-1];f[l-1]=~v?Math.min(10*v+n,a):n}}t.Params=h},5741:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0,t.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,h){const c={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(c),h.dispose=()=>this._wrappedAddonDispose(c),h.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let h=-1;for(let c=0;c<this._addons.length;c++)if(this._addons[c]===a){h=c;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");a.isDisposed=!0,a.dispose.apply(a.instance),this._addons.splice(h,1)}}},8771:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;const h=a(3785),c=a(511);t.BufferApiView=class{constructor(n,l){this._buffer=n,this.type=l}init(n){return this._buffer=n,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(n){const l=this._buffer.lines.get(n);if(l)return new h.BufferLineApiView(l)}getNullCell(){return new c.CellData}}},3785:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;const h=a(511);t.BufferLineApiView=class{constructor(c){this._line=c}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(c,n){if(!(c<0||c>=this._line.length))return n?(this._line.loadCell(c,n),n):this._line.loadCell(c,new h.CellData)}translateToString(c,n,l){return this._line.translateToString(c,n,l)}}},8285:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;const h=a(8771),c=a(8460),n=a(844);class l extends n.Disposable{constructor(v){super(),this._core=v,this._onBufferChange=this.register(new c.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){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")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}t.BufferNamespaceApi=l},7975:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0,t.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,h){return this._core.registerCsiHandler(a,c=>h(c.toArray()))}addCsiHandler(a,h){return this.registerCsiHandler(a,h)}registerDcsHandler(a,h){return this._core.registerDcsHandler(a,(c,n)=>h(c,n.toArray()))}addDcsHandler(a,h){return this.registerDcsHandler(a,h)}registerEscHandler(a,h){return this._core.registerEscHandler(a,h)}addEscHandler(a,h){return this.registerEscHandler(a,h)}registerOscHandler(a,h){return this._core.registerOscHandler(a,h)}addOscHandler(a,h){return this.registerOscHandler(a,h)}}},7090:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0,t.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(O,t,a){var h=this&&this.__decorate||function(e,r,i,s){var d,g=arguments.length,u=g<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,r,i,s);else for(var m=e.length-1;m>=0;m--)(d=e[m])&&(u=(g<3?d(u):g>3?d(r,i,u):d(r,i))||u);return g>3&&u&&Object.defineProperty(r,i,u),u},c=this&&this.__param||function(e,r){return function(i,s){r(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;const n=a(8460),l=a(844),f=a(5295),v=a(2585);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;let o=t.BufferService=class extends l.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,t.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,t.MINIMUM_ROWS),this.buffers=this.register(new f.BufferSet(e,this))}resize(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this._onResize.fire({cols:e,rows:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,r=!1){const i=this.buffer;let s;s=this._cachedBlankLine,s&&s.length===this.cols&&s.getFg(0)===e.fg&&s.getBg(0)===e.bg||(s=i.getBlankLine(e,r),this._cachedBlankLine=s),s.isWrapped=r;const d=i.ybase+i.scrollTop,g=i.ybase+i.scrollBottom;if(i.scrollTop===0){const u=i.lines.isFull;g===i.lines.length-1?u?i.lines.recycle().copyFrom(s):i.lines.push(s.clone()):i.lines.splice(g+1,0,s.clone()),u?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{const u=g-d+1;i.lines.shiftElements(d+1,u-1,-1),i.lines.set(g,s.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,r,i){const s=this.buffer;if(e<0){if(s.ydisp===0)return;this.isUserScrolling=!0}else e+s.ydisp>=s.ybase&&(this.isUserScrolling=!1);const d=s.ydisp;s.ydisp=Math.max(Math.min(s.ydisp+e,s.ybase),0),d!==s.ydisp&&(r||this._onScroll.fire(s.ydisp))}};t.BufferService=o=h([c(0,v.IOptionsService)],o)},7994:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0,t.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,h){this._charsets[a]=h,this.glevel===a&&(this.charset=h)}}},1753:function(O,t,a){var h=this&&this.__decorate||function(s,d,g,u){var m,_=arguments.length,p=_<3?d:u===null?u=Object.getOwnPropertyDescriptor(d,g):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,d,g,u);else for(var S=s.length-1;S>=0;S--)(m=s[S])&&(p=(_<3?m(p):_>3?m(d,g,p):m(d,g))||p);return _>3&&p&&Object.defineProperty(d,g,p),p},c=this&&this.__param||function(s,d){return function(g,u){d(g,u,s)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;const n=a(2585),l=a(8460),f=a(844),v={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:s=>s.button!==4&&s.action===1&&(s.ctrl=!1,s.alt=!1,s.shift=!1,!0)},VT200:{events:19,restrict:s=>s.action!==32},DRAG:{events:23,restrict:s=>s.action!==32||s.button!==3},ANY:{events:31,restrict:s=>!0}};function o(s,d){let g=(s.ctrl?16:0)|(s.shift?4:0)|(s.alt?8:0);return s.button===4?(g|=64,g|=s.action):(g|=3&s.button,4&s.button&&(g|=64),8&s.button&&(g|=128),s.action===32?g|=32:s.action!==0||d||(g|=3)),g}const e=String.fromCharCode,r={DEFAULT:s=>{const d=[o(s,!1)+32,s.col+32,s.row+32];return d[0]>255||d[1]>255||d[2]>255?"":`\x1B[M${e(d[0])}${e(d[1])}${e(d[2])}`},SGR:s=>{const d=s.action===0&&s.button!==4?"m":"M";return`\x1B[<${o(s,!0)};${s.col};${s.row}${d}`},SGR_PIXELS:s=>{const d=s.action===0&&s.button!==4?"m":"M";return`\x1B[<${o(s,!0)};${s.x};${s.y}${d}`}};let i=t.CoreMouseService=class extends f.Disposable{constructor(s,d){super(),this._bufferService=s,this._coreService=d,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new l.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const g of Object.keys(v))this.addProtocol(g,v[g]);for(const g of Object.keys(r))this.addEncoding(g,r[g]);this.reset()}addProtocol(s,d){this._protocols[s]=d}addEncoding(s,d){this._encodings[s]=d}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(s){if(!this._protocols[s])throw new Error(`unknown protocol "${s}"`);this._activeProtocol=s,this._onProtocolChange.fire(this._protocols[s].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(s){if(!this._encodings[s])throw new Error(`unknown encoding "${s}"`);this._activeEncoding=s}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(s){if(s.col<0||s.col>=this._bufferService.cols||s.row<0||s.row>=this._bufferService.rows||s.button===4&&s.action===32||s.button===3&&s.action!==32||s.button!==4&&(s.action===2||s.action===3)||(s.col++,s.row++,s.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,s,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(s))return!1;const d=this._encodings[this._activeEncoding](s);return d&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(d):this._coreService.triggerDataEvent(d,!0)),this._lastEvent=s,!0}explainEvents(s){return{down:!!(1&s),up:!!(2&s),drag:!!(4&s),move:!!(8&s),wheel:!!(16&s)}}_equalEvents(s,d,g){if(g){if(s.x!==d.x||s.y!==d.y)return!1}else if(s.col!==d.col||s.row!==d.row)return!1;return s.button===d.button&&s.action===d.action&&s.ctrl===d.ctrl&&s.alt===d.alt&&s.shift===d.shift}};t.CoreMouseService=i=h([c(0,n.IBufferService),c(1,n.ICoreService)],i)},6975:function(O,t,a){var h=this&&this.__decorate||function(i,s,d,g){var u,m=arguments.length,_=m<3?s:g===null?g=Object.getOwnPropertyDescriptor(s,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(i,s,d,g);else for(var p=i.length-1;p>=0;p--)(u=i[p])&&(_=(m<3?u(_):m>3?u(s,d,_):u(s,d))||_);return m>3&&_&&Object.defineProperty(s,d,_),_},c=this&&this.__param||function(i,s){return function(d,g){s(d,g,i)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;const n=a(1439),l=a(8460),f=a(844),v=a(2585),o=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let r=t.CoreService=class extends f.Disposable{constructor(i,s,d){super(),this._bufferService=i,this._logService=s,this._optionsService=d,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new l.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new l.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,n.clone)(o),this.decPrivateModes=(0,n.clone)(e)}reset(){this.modes=(0,n.clone)(o),this.decPrivateModes=(0,n.clone)(e)}triggerDataEvent(i,s=!1){if(this._optionsService.rawOptions.disableStdin)return;const d=this._bufferService.buffer;s&&this._optionsService.rawOptions.scrollOnUserInput&&d.ybase!==d.ydisp&&this._onRequestScrollToBottom.fire(),s&&this._onUserInput.fire(),this._logService.debug(`sending data "${i}"`,()=>i.split("").map(g=>g.charCodeAt(0))),this._onData.fire(i)}triggerBinaryEvent(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${i}"`,()=>i.split("").map(s=>s.charCodeAt(0))),this._onBinary.fire(i))}};t.CoreService=r=h([c(0,v.IBufferService),c(1,v.ILogService),c(2,v.IOptionsService)],r)},9074:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationService=void 0;const h=a(8055),c=a(8460),n=a(844),l=a(6106);let f=0,v=0;class o extends n.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new l.SortedList(i=>i==null?void 0:i.marker.line),this._onDecorationRegistered=this.register(new c.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new c.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,n.toDisposable)(()=>this.reset()))}registerDecoration(i){if(i.marker.isDisposed)return;const s=new e(i);if(s){const d=s.marker.onDispose(()=>s.dispose());s.onDispose(()=>{s&&(this._decorations.delete(s)&&this._onDecorationRemoved.fire(s),d.dispose())}),this._decorations.insert(s),this._onDecorationRegistered.fire(s)}return s}reset(){for(const i of this._decorations.values())i.dispose();this._decorations.clear()}*getDecorationsAtCell(i,s,d){let g=0,u=0;for(const m of this._decorations.getKeyIterator(s))g=m.options.x??0,u=g+(m.options.width??1),i>=g&&i<u&&(!d||(m.options.layer??"bottom")===d)&&(yield m)}forEachDecorationAtCell(i,s,d,g){this._decorations.forEachByKey(s,u=>{f=u.options.x??0,v=f+(u.options.width??1),i>=f&&i<v&&(!d||(u.options.layer??"bottom")===d)&&g(u)})}}t.DecorationService=o;class e extends n.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(i){super(),this.options=i,this.onRenderEmitter=this.register(new c.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=i.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;const h=a(2585),c=a(8343);class n{constructor(...f){this._entries=new Map;for(const[v,o]of f)this.set(v,o)}set(f,v){const o=this._entries.get(f);return this._entries.set(f,v),o}forEach(f){for(const[v,o]of this._entries.entries())f(v,o)}has(f){return this._entries.has(f)}get(f){return this._entries.get(f)}}t.ServiceCollection=n,t.InstantiationService=class{constructor(){this._services=new n,this._services.set(h.IInstantiationService,this)}setService(l,f){this._services.set(l,f)}getService(l){return this._services.get(l)}createInstance(l,...f){const v=(0,c.getServiceDependencies)(l).sort((r,i)=>r.index-i.index),o=[];for(const r of v){const i=this._services.get(r.id);if(!i)throw new Error(`[createInstance] ${l.name} depends on UNKNOWN service ${r.id}.`);o.push(i)}const e=v.length>0?v[0].index:f.length;if(f.length!==e)throw new Error(`[createInstance] First service dependency of ${l.name} at position ${e+1} conflicts with ${f.length} static arguments`);return new l(...f,...o)}}},7866:function(O,t,a){var h=this&&this.__decorate||function(e,r,i,s){var d,g=arguments.length,u=g<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,r,i,s);else for(var m=e.length-1;m>=0;m--)(d=e[m])&&(u=(g<3?d(u):g>3?d(r,i,u):d(r,i))||u);return g>3&&u&&Object.defineProperty(r,i,u),u},c=this&&this.__param||function(e,r){return function(i,s){r(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(844),l=a(2585),f={trace:l.LogLevelEnum.TRACE,debug:l.LogLevelEnum.DEBUG,info:l.LogLevelEnum.INFO,warn:l.LogLevelEnum.WARN,error:l.LogLevelEnum.ERROR,off:l.LogLevelEnum.OFF};let v,o=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=l.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),v=this}_updateLogLevel(){this._logLevel=f[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let r=0;r<e.length;r++)typeof e[r]=="function"&&(e[r]=e[r]())}_log(e,r,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+r,...i)}trace(e,...r){var i;this._logLevel<=l.LogLevelEnum.TRACE&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,r)}debug(e,...r){var i;this._logLevel<=l.LogLevelEnum.DEBUG&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,r)}info(e,...r){var i;this._logLevel<=l.LogLevelEnum.INFO&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,r)}warn(e,...r){var i;this._logLevel<=l.LogLevelEnum.WARN&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,r)}error(e,...r){var i;this._logLevel<=l.LogLevelEnum.ERROR&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,r)}};t.LogService=o=h([c(0,l.IOptionsService)],o),t.setTraceLogger=function(e){v=e},t.traceCall=function(e,r,i){if(typeof i.value!="function")throw new Error("not supported");const s=i.value;i.value=function(...d){if(v.logLevel!==l.LogLevelEnum.TRACE)return s.apply(this,d);v.trace(`GlyphRenderer#${s.name}(${d.map(u=>JSON.stringify(u)).join(", ")})`);const g=s.apply(this,d);return v.trace(`GlyphRenderer#${s.name} return`,g),g}}},7302:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=void 0;const h=a(8460),c=a(844),n=a(6114);t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:n.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const l=["normal","bold","100","200","300","400","500","600","700","800","900"];class f extends c.Disposable{constructor(o){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const e={...t.DEFAULT_OPTIONS};for(const r in o)if(r in e)try{const i=o[r];e[r]=this._sanitizeAndValidateOption(r,i)}catch(i){console.error(i)}this.rawOptions=e,this.options={...e},this._setupOptions(),this.register((0,c.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(o,e){return this.onOptionChange(r=>{r===o&&e(this.rawOptions[o])})}onMultipleOptionChange(o,e){return this.onOptionChange(r=>{o.indexOf(r)!==-1&&e()})}_setupOptions(){const o=r=>{if(!(r in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},e=(r,i)=>{if(!(r in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${r}"`);i=this._sanitizeAndValidateOption(r,i),this.rawOptions[r]!==i&&(this.rawOptions[r]=i,this._onOptionChange.fire(r))};for(const r in this.rawOptions){const i={get:o.bind(this,r),set:e.bind(this,r)};Object.defineProperty(this.options,r,i)}}_sanitizeAndValidateOption(o,e){switch(o){case"cursorStyle":if(e||(e=t.DEFAULT_OPTIONS[o]),!function(r){return r==="block"||r==="underline"||r==="bar"}(e))throw new Error(`"${e}" is not a valid value for ${o}`);break;case"wordSeparator":e||(e=t.DEFAULT_OPTIONS[o]);break;case"fontWeight":case"fontWeightBold":if(typeof e=="number"&&1<=e&&e<=1e3)break;e=l.includes(e)?e:t.DEFAULT_OPTIONS[o];break;case"cursorWidth":e=Math.floor(e);case"lineHeight":case"tabStopWidth":if(e<1)throw new Error(`${o} cannot be less than 1, value: ${e}`);break;case"minimumContrastRatio":e=Math.max(1,Math.min(21,Math.round(10*e)/10));break;case"scrollback":if((e=Math.min(e,4294967295))<0)throw new Error(`${o} cannot be less than 0, value: ${e}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(e<=0)throw new Error(`${o} cannot be less than or equal to 0, value: ${e}`);break;case"rows":case"cols":if(!e&&e!==0)throw new Error(`${o} must be numeric, value: ${e}`);break;case"windowsPty":e=e??{}}return e}}t.OptionsService=f},2660:function(O,t,a){var h=this&&this.__decorate||function(f,v,o,e){var r,i=arguments.length,s=i<3?v:e===null?e=Object.getOwnPropertyDescriptor(v,o):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(f,v,o,e);else for(var d=f.length-1;d>=0;d--)(r=f[d])&&(s=(i<3?r(s):i>3?r(v,o,s):r(v,o))||s);return i>3&&s&&Object.defineProperty(v,o,s),s},c=this&&this.__param||function(f,v){return function(o,e){v(o,e,f)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkService=void 0;const n=a(2585);let l=t.OscLinkService=class{constructor(f){this._bufferService=f,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(f){const v=this._bufferService.buffer;if(f.id===void 0){const d=v.addMarker(v.ybase+v.y),g={data:f,id:this._nextId++,lines:[d]};return d.onDispose(()=>this._removeMarkerFromLink(g,d)),this._dataByLinkId.set(g.id,g),g.id}const o=f,e=this._getEntryIdKey(o),r=this._entriesWithId.get(e);if(r)return this.addLineToLink(r.id,v.ybase+v.y),r.id;const i=v.addMarker(v.ybase+v.y),s={id:this._nextId++,key:this._getEntryIdKey(o),data:o,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(s,i)),this._entriesWithId.set(s.key,s),this._dataByLinkId.set(s.id,s),s.id}addLineToLink(f,v){const o=this._dataByLinkId.get(f);if(o&&o.lines.every(e=>e.line!==v)){const e=this._bufferService.buffer.addMarker(v);o.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(o,e))}}getLinkData(f){var v;return(v=this._dataByLinkId.get(f))==null?void 0:v.data}_getEntryIdKey(f){return`${f.id};;${f.uri}`}_removeMarkerFromLink(f,v){const o=f.lines.indexOf(v);o!==-1&&(f.lines.splice(o,1),f.lines.length===0&&(f.data.id!==void 0&&this._entriesWithId.delete(f.key),this._dataByLinkId.delete(f.id)))}};t.OscLinkService=l=h([c(0,n.IBufferService)],l)},8343:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",h="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[h]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(l,f,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(o,e,r){e[a]===e?e[h].push({id:o,index:r}):(e[h]=[{id:o,index:r}],e[a]=e)})(n,l,v)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},2585:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const h=a(8343);var c;t.IBufferService=(0,h.createDecorator)("BufferService"),t.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),t.ICoreService=(0,h.createDecorator)("CoreService"),t.ICharsetService=(0,h.createDecorator)("CharsetService"),t.IInstantiationService=(0,h.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,h.createDecorator)("LogService"),t.IOptionsService=(0,h.createDecorator)("OptionsService"),t.IOscLinkService=(0,h.createDecorator)("OscLinkService"),t.IUnicodeService=(0,h.createDecorator)("UnicodeService"),t.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;const h=a(8460),c=a(225);class n{static extractShouldJoin(f){return(1&f)!=0}static extractWidth(f){return f>>1&3}static extractCharKind(f){return f>>3}static createPropertyValue(f,v,o=!1){return(16777215&f)<<3|(3&v)<<1|(o?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const f=new c.UnicodeV6;this.register(f),this._active=f.version,this._activeProvider=f}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(f){if(!this._providers[f])throw new Error(`unknown Unicode version "${f}"`);this._active=f,this._activeProvider=this._providers[f],this._onChange.fire(f)}register(f){this._providers[f.version]=f}wcwidth(f){return this._activeProvider.wcwidth(f)}getStringCellWidth(f){let v=0,o=0;const e=f.length;for(let r=0;r<e;++r){let i=f.charCodeAt(r);if(55296<=i&&i<=56319){if(++r>=e)return v+this.wcwidth(i);const g=f.charCodeAt(r);56320<=g&&g<=57343?i=1024*(i-55296)+g-56320+65536:v+=this.wcwidth(g)}const s=this.charProperties(i,o);let d=n.extractWidth(s);n.extractShouldJoin(s)&&(d-=n.extractWidth(o)),v+=d,o=s}return v}charProperties(f,v){return this._activeProvider.charProperties(f,v)}}t.UnicodeService=n}},te={};function Y(O){var t=te[O];if(t!==void 0)return t.exports;var a=te[O]={exports:{}};return he[O].call(a.exports,a,a.exports,Y),a.exports}var oe={};return(()=>{var O=oe;Object.defineProperty(O,"__esModule",{value:!0}),O.Terminal=void 0;const t=Y(9042),a=Y(3236),h=Y(844),c=Y(5741),n=Y(8285),l=Y(7975),f=Y(7090),v=["cols","rows"];class o extends h.Disposable{constructor(r){super(),this._core=this.register(new a.Terminal(r)),this._addonManager=this.register(new c.AddonManager),this._publicOptions={...this._core.options};const i=d=>this._core.options[d],s=(d,g)=>{this._checkReadonlyOptions(d),this._core.options[d]=g};for(const d in this._core.options){const g={get:i.bind(this,d),set:s.bind(this,d)};Object.defineProperty(this._publicOptions,d,g)}}_checkReadonlyOptions(r){if(v.includes(r))throw new Error(`Option "${r}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new l.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new f.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new n.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const r=this._core.coreService.decPrivateModes;let i="none";switch(this._core.coreMouseService.activeProtocol){case"X10":i="x10";break;case"VT200":i="vt200";break;case"DRAG":i="drag";break;case"ANY":i="any"}return{applicationCursorKeysMode:r.applicationCursorKeys,applicationKeypadMode:r.applicationKeypad,bracketedPasteMode:r.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:i,originMode:r.origin,reverseWraparoundMode:r.reverseWraparound,sendFocusMode:r.sendFocus,wraparoundMode:r.wraparound}}get options(){return this._publicOptions}set options(r){for(const i in r)this._publicOptions[i]=r[i]}blur(){this._core.blur()}focus(){this._core.focus()}input(r,i=!0){this._core.input(r,i)}resize(r,i){this._verifyIntegers(r,i),this._core.resize(r,i)}open(r){this._core.open(r)}attachCustomKeyEventHandler(r){this._core.attachCustomKeyEventHandler(r)}attachCustomWheelEventHandler(r){this._core.attachCustomWheelEventHandler(r)}registerLinkProvider(r){return this._core.registerLinkProvider(r)}registerCharacterJoiner(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)}deregisterCharacterJoiner(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)}registerMarker(r=0){return this._verifyIntegers(r),this._core.registerMarker(r)}registerDecoration(r){return this._checkProposedApi(),this._verifyPositiveIntegers(r.x??0,r.width??0,r.height??0),this._core.registerDecoration(r)}hasSelection(){return this._core.hasSelection()}select(r,i,s){this._verifyIntegers(r,i,s),this._core.select(r,i,s)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(r,i){this._verifyIntegers(r,i),this._core.selectLines(r,i)}dispose(){super.dispose()}scrollLines(r){this._verifyIntegers(r),this._core.scrollLines(r)}scrollPages(r){this._verifyIntegers(r),this._core.scrollPages(r)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(r){this._verifyIntegers(r),this._core.scrollToLine(r)}clear(){this._core.clear()}write(r,i){this._core.write(r,i)}writeln(r,i){this._core.write(r),this._core.write(`\r
66
- `,i)}paste(r){this._core.paste(r)}refresh(r,i){this._verifyIntegers(r,i),this._core.refresh(r,i)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(r){this._addonManager.loadAddon(this,r)}static get strings(){return t}_verifyIntegers(...r){for(const i of r)if(i===1/0||isNaN(i)||i%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...r){for(const i of r)if(i&&(i===1/0||isNaN(i)||i%1!=0||i<0))throw new Error("This API only accepts positive integers")}}O.Terminal=o})(),oe})())}(Ee)),Ee.exports}var Ge=Ne();export{je as a,Ke as b,qe as c,Ve as d,ze as g,Ge as x};