@abtnode/blocklet-services 1.16.47-beta-20250805-095401-14eb156b → 1.16.47-beta-20250807-110715-19ad6b43

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 (235) hide show
  1. package/api/index.js +2 -1
  2. package/api/libs/connect/v1.js +1 -1
  3. package/api/libs/env.js +1 -1
  4. package/api/routes/access-key.js +7 -1
  5. package/api/routes/csp-proxy.js +2 -2
  6. package/api/routes/user.js +31 -6
  7. package/dist/assets/{AdapterDayjs-D8zlc0TS.js → AdapterDayjs-OwV8ZfRo.js} +1 -1
  8. package/dist/assets/{Google-DxcTyhFe.js → Google-B5khWV-G.js} +1 -1
  9. package/dist/assets/{access-control-jFR93SsS.js → access-control-C9JoF-VW.js} +1 -1
  10. package/dist/assets/{actions-B0rWiAuM.js → actions-DiUxQ792.js} +1 -1
  11. package/dist/assets/{add-component-core-DfrJCl4a.js → add-component-core-DbPZIJoa.js} +39 -39
  12. package/dist/assets/add-resource-D0yHahVH.js +1 -0
  13. package/dist/assets/{addon-B-vtdIPn.js → addon-S-x2oOBW.js} +1 -1
  14. package/dist/assets/{advanced-B92lyz70.js → advanced-Brdzd_hV.js} +1 -1
  15. package/dist/assets/aigne-CEwSzcja.js +10 -0
  16. package/dist/assets/aistro-NLUOUWwT.png +0 -0
  17. package/dist/assets/{appearance-C1k2L_bA.js → appearance-Dptvfp0O.js} +1 -1
  18. package/dist/assets/ar-BCTLRONQ.js +1 -0
  19. package/dist/assets/{ar-DDlrXmSt.js → ar-qovKpPcU.js} +1 -1
  20. package/dist/assets/{arrow-down.svg-BnKvb8st.js → arrow-down.svg-mrRaEeKB.js} +1 -1
  21. package/dist/assets/{audit-logs-OO0l4GnY.js → audit-logs-FBpDejHE.js} +1 -1
  22. package/dist/assets/{authorize-BU6KP5W6.js → authorize-BeJTPWjw.js} +1 -1
  23. package/dist/assets/{base-chart-B1XQ7Ytj.js → base-chart-BR64ujqk.js} +1 -1
  24. package/dist/assets/{base32-BeRPpTcK.js → base32-Dq34Xpru.js} +1 -1
  25. package/dist/assets/{branding-D1JmhF3p.js → branding-BX3gHZjy.js} +2 -2
  26. package/dist/assets/{branding-CEu-c8uQ.js → branding-D1DQzFQg.js} +1 -1
  27. package/dist/assets/{bundle-avatar-BZQ_lZxy.js → bundle-avatar-B6WDP8U8.js} +1 -1
  28. package/dist/assets/button-BGOqx4KL.js +1 -0
  29. package/dist/assets/{click-to-copy-EOhAhdSS.js → click-to-copy-Lt7iNH-g.js} +1 -1
  30. package/dist/assets/{collapse-wumRocfe.js → collapse-tY1N2fk5.js} +1 -1
  31. package/dist/assets/{complete-DwaBuF4K.js → complete-QPs88Xvq.js} +1 -1
  32. package/dist/assets/{component-D31UJpJQ.js → component-IvlOow7w.js} +3 -3
  33. package/dist/assets/{config-Df0dxvZZ.js → config-BV13SrRs.js} +1 -1
  34. package/dist/assets/config-ZidMeHMX.js +53 -0
  35. package/dist/assets/{config-AgncsJiw.js → config-gRz3hnHQ.js} +1 -1
  36. package/dist/assets/{config-navigation-JJehoQAV.js → config-navigation--k3uzAVY.js} +3 -3
  37. package/dist/assets/{config-space-CrH2JnlQ.js → config-space-DmPAo0Uc.js} +1 -1
  38. package/dist/assets/{confirm-Cx2owMMo.js → confirm-DwicyBRo.js} +1 -1
  39. package/dist/assets/{connect-C7C7ILA6.js → connect-CCyhtcsX.js} +1 -1
  40. package/dist/assets/{connect-BD9OoHaD.js → connect-CXYynAHv.js} +1 -1
  41. package/dist/assets/{connect-to-nCPxtJH1.js → connect-to-duHzVFsc.js} +1 -1
  42. package/dist/assets/{content-layout-BZKNdb6s.js → content-layout-D5EfCmvE.js} +1 -1
  43. package/dist/assets/{createClass-BTaIsrxM.js → createClass-Cy-fAHUw.js} +1 -1
  44. package/dist/assets/{dashboard-CDjptZox.js → dashboard-DTH5SkDE.js} +3 -3
  45. package/dist/assets/{de-DSALrqI8.js → de-BrVlvg8I.js} +1 -1
  46. package/dist/assets/de-Bxv5hOpH.js +1 -0
  47. package/dist/assets/{delete-confirm-Wa3xVOUM.js → delete-confirm-Bn607XWd.js} +1 -1
  48. package/dist/assets/{did-address-C7IHZs6x.js → did-address-BYpODbk4.js} +1 -1
  49. package/dist/assets/{domain-DV7cdOEy.js → domain-D0AJ_QKJ.js} +1 -1
  50. package/dist/assets/{domain-action-card-CnvZTstr.js → domain-action-card-DIdC2BX8.js} +1 -1
  51. package/dist/assets/domains-BnUGWOh5.js +1 -0
  52. package/dist/assets/{dot-CE8yAFCN.js → dot-3RzyGk21.js} +1 -1
  53. package/dist/assets/{email-DQnz-4Bc.js → email-DSvOsQV4.js} +1 -1
  54. package/dist/assets/{empty-spinner-DCdg-gxP.js → empty-spinner-DXNgsKH2.js} +1 -1
  55. package/dist/assets/engine-DwJQ8ndb.js +1 -0
  56. package/dist/assets/es-CJASnE29.js +1 -0
  57. package/dist/assets/{es-DQvY5fGr.js → es-CWdREjkO.js} +1 -1
  58. package/dist/assets/{exchange-passport-D9HZFZwF.js → exchange-passport-Duueo_OR.js} +1 -1
  59. package/dist/assets/{form-D52FUB8q.js → form-DJLzfDke.js} +1 -1
  60. package/dist/assets/{form-text-input-DanXI___.js → form-text-input-BWWenIQu.js} +1 -1
  61. package/dist/assets/{form-wrapper-DgFURo9t.js → form-wrapper-RaRgkgkH.js} +1 -1
  62. package/dist/assets/{fr-BgvhEJ06.js → fr-CfM2gAY_.js} +1 -1
  63. package/dist/assets/fr-GN7UO4qD.js +1 -0
  64. package/dist/assets/{fuel-DEa3ECY8.js → fuel-BxPebmaf.js} +1 -1
  65. package/dist/assets/gen-access-key-C8QyyPtS.js +1 -0
  66. package/dist/assets/gen-simple-access-key-CGRxC9aD.js +1 -0
  67. package/dist/assets/get-safe-url-Byu99Iq6.js +1 -0
  68. package/dist/assets/hi-B6hnXdBn.js +5 -0
  69. package/dist/assets/hi-DWiwUAYV.js +1 -0
  70. package/dist/assets/{home-B7OWEVsn.js → home-D1KsByvB.js} +1 -1
  71. package/dist/assets/{id-DfDk8Cxy.js → id-BfAVuWhm.js} +1 -1
  72. package/dist/assets/id-SWQ4mJGx.js +1 -0
  73. package/dist/assets/{iframe-CqwYISrF.js → iframe-2AxKOYBR.js} +1 -1
  74. package/dist/assets/{index-296hnpGF.js → index-0DKBOdj7.js} +1 -1
  75. package/dist/assets/index-4wrVz6i1.js +124 -0
  76. package/dist/assets/{index-ChbREcnK.js → index-7UPsmpeB.js} +1 -1
  77. package/dist/assets/{index-BFOTYlfC.js → index-7Wt3WOLU.js} +1 -1
  78. package/dist/assets/{index-B0GLaTiX.js → index-8djlz-MG.js} +1 -1
  79. package/dist/assets/{index-DlaHLSvf.js → index-B2HJDbWz.js} +19 -19
  80. package/dist/assets/{index-C4hly8RC.js → index-BAYFdR7m.js} +1 -1
  81. package/dist/assets/{index-uY6moYTs.js → index-BDSe7HLW.js} +1 -1
  82. package/dist/assets/{index-BEmLxB7B.js → index-Br7EG_jz.js} +1 -1
  83. package/dist/assets/{index-diQW5vdJ.js → index-BsHHb1rN.js} +1 -1
  84. package/dist/assets/{index-Nd6gD7eY.js → index-CMhFwlvk.js} +1 -1
  85. package/dist/assets/{index-CKesQXQW.js → index-CTM6wiOX.js} +1 -1
  86. package/dist/assets/{index-Dj0TETp9.js → index-CgCVx1sf.js} +12 -12
  87. package/dist/assets/{index-Cylfu8Kg.js → index-CniiyWPl.js} +14 -14
  88. package/dist/assets/{index-AK4Fi3I2.js → index-Cp_r7DvZ.js} +1 -1
  89. package/dist/assets/{index-Yow2d7gN.js → index-Cw89V6wx.js} +1 -1
  90. package/dist/assets/{index-BetmKk0p.js → index-Cy8O6s0C.js} +1 -1
  91. package/dist/assets/index-D05HWeh6.js +1 -0
  92. package/dist/assets/{index-CiL_9BYm.js → index-DFmxGkG9.js} +12 -12
  93. package/dist/assets/{index-CiW-jlCS.js → index-DKLDL0NU.js} +1 -1
  94. package/dist/assets/{index-B-k9otcQ.js → index-DLvW-hX6.js} +1 -1
  95. package/dist/assets/{index-BDu1k7Fv.js → index-DSSx9Ohc.js} +1 -1
  96. package/dist/assets/{index-BBIMESWU.js → index-DU79Hpz9.js} +1 -1
  97. package/dist/assets/{index-Bbcgo0GF.js → index-DgGkR58E.js} +1 -1
  98. package/dist/assets/{index-LdkiJabL.js → index-Dmil4V_-.js} +1 -1
  99. package/dist/assets/{index-DtuUsb1T.js → index-DtYei0B0.js} +2 -1
  100. package/dist/assets/{index-78a5Cdpe.js → index-GRZ8tMAV.js} +1 -1
  101. package/dist/assets/{index-C0mn0MnL.js → index-Mu2Sji0B.js} +1 -1
  102. package/dist/assets/{index-DSNvDaKK.js → index-dytlEEOb.js} +1 -1
  103. package/dist/assets/{index-B4OZ6pVW.js → index-khjK2Z9N.js} +1 -1
  104. package/dist/assets/{index-Cbf4geph.js → index-l5234Nwn.js} +123 -122
  105. package/dist/assets/{invitation-D8IFGbTf.js → invitation-BiM8UWsv.js} +1 -1
  106. package/dist/assets/{invite-bBNbkUJu.js → invite-CAmhHCq3.js} +1 -1
  107. package/dist/assets/{isURL-By2TdRfN.js → isURL-DA2-tMLY.js} +1 -1
  108. package/dist/assets/{issue-passport-DaQDVQ7Y.js → issue-passport-BlDK-yh8.js} +1 -1
  109. package/dist/assets/item-Deax8Tcs.js +1 -0
  110. package/dist/assets/{ja-GXo4l4Hp.js → ja-616mK6Bu.js} +1 -1
  111. package/dist/assets/ja-CUi7rI9p.js +1 -0
  112. package/dist/assets/ko-Bx9B8tBH.js +1 -0
  113. package/dist/assets/{ko-1dMP3P8A.js → ko-CoUjs_Gj.js} +1 -1
  114. package/dist/assets/{landing-page-k9p91AEv.js → landing-page-BJTNr6j1.js} +1 -1
  115. package/dist/assets/{launch-result-message-BTMFIbUm.js → launch-result-message-BklGSk6L.js} +1 -1
  116. package/dist/assets/{layout-zg5WZEdp.js → layout-B_66AMXX.js} +1 -1
  117. package/dist/assets/{list-C6CNPBAR.js → list-XQkJnArQ.js} +1 -1
  118. package/dist/assets/{list-header-B8ZTLjYf.js → list-header-BnA6XPP6.js} +1 -1
  119. package/dist/assets/{list-CYJEZSon.js → list-uh5difGn.js} +2 -2
  120. package/dist/assets/localization-DrnuLXG0.js +1 -0
  121. package/dist/assets/{log-ssfC90VX.js → log-22OBDAZV.js} +1 -1
  122. package/dist/assets/logger-Dth79fFL.js +1 -0
  123. package/dist/assets/{login-aFsf6-QM.js → login-6f9xq_uw.js} +1 -1
  124. package/dist/assets/{login-oauth-callback-dKBg8IoH.js → login-oauth-callback-mHVhjuxd.js} +1 -1
  125. package/dist/assets/{logo-uploader-D0Gz6YoY.js → logo-uploader-3Gf22QS4.js} +2 -2
  126. package/dist/assets/{lost-passport-Bo6am6th.js → lost-passport-BIYbG7oY.js} +1 -1
  127. package/dist/assets/{observability-Cfy3MVZa.js → observability-CFK-gQFz.js} +1 -1
  128. package/dist/assets/{open-window-DBhAlL9B.js → open-window-nJnt1xUe.js} +1 -1
  129. package/dist/assets/{over-due-invoice-payment-D89GCKNm.js → over-due-invoice-payment-D1hhqrpZ.js} +1 -1
  130. package/dist/assets/{overview-Xs3x6yXg.js → overview-DGSAxk-A.js} +1 -1
  131. package/dist/assets/{page-header-18voA300.js → page-header-Fuppayrb.js} +1 -1
  132. package/dist/assets/{passport-item-D-B7gJms.js → passport-item-4tKOyK2N.js} +1 -1
  133. package/dist/assets/{permission-DqaOkW_Z.js → permission-CzDQ8THQ.js} +1 -1
  134. package/dist/assets/{playground-CC7NZ-_A.js → playground-BNACWW4o.js} +1 -1
  135. package/dist/assets/preferences-CaRaLLOf.js +1 -0
  136. package/dist/assets/profile-embed-B295K6Uq.js +1 -0
  137. package/dist/assets/pt-BPWMiPVo.js +1 -0
  138. package/dist/assets/pt-BjllWaWg.js +5 -0
  139. package/dist/assets/publish-resource-Bhl_UV8t.js +1 -0
  140. package/dist/assets/{react-beautiful-dnd.esm-DkLcR42r.js → react-beautiful-dnd.esm-DOptRWpa.js} +1 -1
  141. package/dist/assets/{react-stripe.esm-BqogJv7y.js → react-stripe.esm-XKR9U0Pi.js} +1 -1
  142. package/dist/assets/{required-Df9AZf0R.js → required-DyRlNY7J.js} +1 -1
  143. package/dist/assets/ru-XKA9Zu_7.js +5 -0
  144. package/dist/assets/ru-aN6KKhQS.js +1 -0
  145. package/dist/assets/{runtime-DjILMoeT.js → runtime-bUnoJYpr.js} +1 -1
  146. package/dist/assets/{sanitize-BSjwjSMl.js → sanitize-Bu5pIC-A.js} +2 -2
  147. package/dist/assets/sdk-CiMbVjwj.js +1 -0
  148. package/dist/assets/{section-X04H4Q-a.js → section-D6477Ce1.js} +2 -1
  149. package/dist/assets/{security-BXhgiheS.js → security-DO4dtLin.js} +1 -1
  150. package/dist/assets/{session-89Q1nGxB.js → session-YnDvY5CJ.js} +1 -1
  151. package/dist/assets/setup-DigmKGGp.js +30 -0
  152. package/dist/assets/{shorten-label-CdBn9U0H.js → shorten-label-Bj776ixm.js} +1 -1
  153. package/dist/assets/{simple-select-BkbgqOQi.js → simple-select-BDbQa-9S.js} +1 -1
  154. package/dist/assets/{spaces-BJeg7L1z.js → spaces-KdeOps1v.js} +1 -1
  155. package/dist/assets/{start-CLueiUKJ.js → start-h8SswMC5.js} +1 -1
  156. package/dist/assets/{starting-progress-DWesZE5w.js → starting-progress-BjFMTtUQ.js} +1 -1
  157. package/dist/assets/{status-DheLJdlM.js → status-E4FMnQqN.js} +1 -1
  158. package/dist/assets/{step-actions-DmraEWCH.js → step-actions-GaXwswph.js} +1 -1
  159. package/dist/assets/studio-CgXu1gEM.js +6 -0
  160. package/dist/assets/{switch-control-BbRt1rRM.js → switch-control-CkW4eeJ4.js} +1 -1
  161. package/dist/assets/{table-tips-73VcKMz1.js → table-tips-LM2ip4Rj.js} +1 -1
  162. package/dist/assets/{team-ZJuYy81P.js → team-DjZ9qE6U.js} +1 -1
  163. package/dist/assets/th-CFlSwxxc.js +1 -0
  164. package/dist/assets/th-C_39WNhc.js +5 -0
  165. package/dist/assets/{traffic-CMI1Sbrr.js → traffic-CW6sZXQr.js} +1 -1
  166. package/dist/assets/{transfer-CW4yMg3K.js → transfer-BUR6hEv2.js} +1 -1
  167. package/dist/assets/{unsubscribe-D3ZXIJIb.js → unsubscribe-Dfzg-bws.js} +1 -1
  168. package/dist/assets/{use-mobile-BDciCFXT.js → use-mobile-CO13Oymt.js} +1 -1
  169. package/dist/assets/{use-mobile-BlpLWscF.js → use-mobile-CzqOrBZu.js} +1 -1
  170. package/dist/assets/{use-server-logo-lZp3Hq92.js → use-server-logo-Bs73VID2.js} +1 -1
  171. package/dist/assets/{use-window-close-wo9PxrTe.js → use-window-close-Cvx_le30.js} +1 -1
  172. package/dist/assets/{useLocalStorage-B_thopuV.js → useLocalStorage-phc-OA98.js} +1 -1
  173. package/dist/assets/{user-center-D6gs6-WZ.js → user-center-DjDTKFEf.js} +3 -3
  174. package/dist/assets/{user-sessions-B56a-4tA.js → user-sessions-D3Rr-i1p.js} +1 -1
  175. package/dist/assets/{util-Dcj6HCP7.js → util-Bn2B0xma.js} +1 -1
  176. package/dist/assets/{util-DQF9oPrf.js → util-majSFCTY.js} +1 -1
  177. package/dist/assets/{vendor-arcblock--zSibe1w.js → vendor-arcblock-DU4xNzGM.js} +1 -1
  178. package/dist/assets/{vendor-mui-core-BOHKtf8y.js → vendor-mui-core-CAIaAq-_.js} +2 -2
  179. package/dist/assets/{vendor-mui-x-16EG-AFj.js → vendor-mui-x-DXh6Gdva.js} +1 -1
  180. package/dist/assets/{vendor-ux-Cra9XTth.js → vendor-ux-C1NY8cuW.js} +3 -3
  181. package/dist/assets/vi-B8pz6rul.js +5 -0
  182. package/dist/assets/vi-DnVHbPxD.js +1 -0
  183. package/dist/assets/wait-connect-DpAcPy2e.js +1 -0
  184. package/dist/assets/wrap-locale-DwZj0kLA.js +1 -0
  185. package/dist/assets/zh-CFHHHyA4.js +1 -0
  186. package/dist/assets/{zh-DxCg9Pae.js → zh-DEpjANkc.js} +1 -1
  187. package/dist/assets/{zh-BoO0jdid.js → zh-Dr_3RhGJ.js} +1 -1
  188. package/dist/assets/zh-tw-DEjVZpn9.js +1 -0
  189. package/dist/assets/{zh-tw-D4_7lUjD.js → zh-tw-DK_EuRfN.js} +1 -1
  190. package/dist/index.html +4 -4
  191. package/dist/service-worker.js +1 -1
  192. package/package.json +46 -46
  193. package/dist/assets/add-resource-Ch4SZAWK.js +0 -1
  194. package/dist/assets/aigne-BDdYezR9.js +0 -10
  195. package/dist/assets/ar-cWkdH-wM.js +0 -1
  196. package/dist/assets/button-VEuIVOxr.js +0 -1
  197. package/dist/assets/config-C6pSSzan.js +0 -46
  198. package/dist/assets/de-CKHR0Dxi.js +0 -1
  199. package/dist/assets/domains-BpVmxPqY.js +0 -1
  200. package/dist/assets/empty-DhZfJeme.js +0 -1
  201. package/dist/assets/engine-BD3-KjxK.js +0 -1
  202. package/dist/assets/es-2tKCVVW6.js +0 -1
  203. package/dist/assets/fr-C2hgGsGq.js +0 -1
  204. package/dist/assets/gen-access-key-DrTcGDFb.js +0 -1
  205. package/dist/assets/gen-simple-access-key-DiDRmpFf.js +0 -1
  206. package/dist/assets/get-safe-url-DOmcOTEp.js +0 -1
  207. package/dist/assets/hi-DLl5_Grb.js +0 -1
  208. package/dist/assets/hi-DtMqBGN3.js +0 -5
  209. package/dist/assets/id-BEDDZnYa.js +0 -1
  210. package/dist/assets/index-AbdeuSeu.js +0 -124
  211. package/dist/assets/index-B-WiXXyt.js +0 -1
  212. package/dist/assets/item-BhrhnieT.js +0 -1
  213. package/dist/assets/ja-BXpHGJqS.js +0 -1
  214. package/dist/assets/ko-CwVxJk3S.js +0 -1
  215. package/dist/assets/localization-DFWXvHpl.js +0 -1
  216. package/dist/assets/logger-D5kKPkv7.js +0 -1
  217. package/dist/assets/preferences-5iBfUn8N.js +0 -1
  218. package/dist/assets/profile-embed-MOxF7ggV.js +0 -1
  219. package/dist/assets/pt-5iS1WU13.js +0 -5
  220. package/dist/assets/pt-DM9_sWXT.js +0 -1
  221. package/dist/assets/publish-resource-BBnSOgDd.js +0 -1
  222. package/dist/assets/ru-DpIRvFxj.js +0 -5
  223. package/dist/assets/ru-DvP9XKXg.js +0 -1
  224. package/dist/assets/sdk-B-MwbsI_.js +0 -1
  225. package/dist/assets/setup-Da3ReRWd.js +0 -30
  226. package/dist/assets/studio-C4flChud.js +0 -6
  227. package/dist/assets/th-BjX3AJzF.js +0 -5
  228. package/dist/assets/th-DyGOy3ap.js +0 -1
  229. package/dist/assets/use-promise-window-open-u0untujg.js +0 -1
  230. package/dist/assets/vi-0Dtw7069.js +0 -5
  231. package/dist/assets/vi-BWy1Jg4e.js +0 -1
  232. package/dist/assets/wait-connect-CqwL_aoj.js +0 -1
  233. package/dist/assets/wrap-locale-DAzAra4f.js +0 -1
  234. package/dist/assets/zh-D_lJZbI3.js +0 -1
  235. package/dist/assets/zh-tw-CfWhHTHL.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as re,W as ce,J as zr,bg as Kr,Q as Gr,at as yr,ak as ze,a6 as Lr,cN as Vr,y as Br,bb as Pr,M as Ir,cn as Yr,z as Zr}from"./vendor-mui-core-BOHKtf8y.js";import{u as Xr}from"./useLocalStorage-B_thopuV.js";import{a as Jr,d as $r,g as Hr,r as De}from"./vendor-react-Dvs43sk9.js";import{d as Qr,n as xr}from"./vendor-utils-BOkrEpKO.js";import{aw as ei,U as jr,ad as ti}from"./index-Cbf4geph.js";import{T as ri,n as Er,a as ii,H as ni}from"./vendor-ux-Cra9XTth.js";import{B as oi}from"./bundle-avatar-BZQ_lZxy.js";import"./vendor-arcblock--zSibe1w.js";import"./vendor-hooks-DTeIFVkk.js";import"./lottie-web-4koyQiv_.js";var dr={exports:{}},kr;function si(){return kr||(kr=1,function(ee,Q){(function(G,Z){ee.exports=Z()})(self,function(){return(()=>{var G={4567:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var d=b(9042),_=b(6114),m=b(9924),v=b(3656),s=b(844),a=b(5596),p=b(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,0)},n._bottomBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(c){return n._onResize(c.rows)})),n.register(n._terminal.onRender(function(c){return n._refreshRows(c.start,c.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(c){return n._onChar(c)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
1
+ import{j as re,W as ce,J as zr,bg as Kr,Q as Gr,at as yr,ak as ze,a6 as Lr,cN as Vr,y as Br,bb as Pr,M as Ir,cn as Yr,z as Zr}from"./vendor-mui-core-CAIaAq-_.js";import{u as Xr}from"./useLocalStorage-phc-OA98.js";import{a as Jr,d as $r,g as Hr,r as De}from"./vendor-react-Dvs43sk9.js";import{d as Qr,n as xr}from"./vendor-utils-BOkrEpKO.js";import{aw as ei,U as jr,ad as ti}from"./index-l5234Nwn.js";import{T as ri,n as Er,a as ii,H as ni}from"./vendor-ux-C1NY8cuW.js";import{B as oi}from"./bundle-avatar-B6WDP8U8.js";import"./vendor-arcblock-DU4xNzGM.js";import"./vendor-hooks-DTeIFVkk.js";import"./lottie-web-4koyQiv_.js";var dr={exports:{}},kr;function si(){return kr||(kr=1,function(ee,Q){(function(G,Z){ee.exports=Z()})(self,function(){return(()=>{var G={4567:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var d=b(9042),_=b(6114),m=b(9924),v=b(3656),s=b(844),a=b(5596),p=b(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,0)},n._bottomBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(c){return n._onResize(c.rows)})),n.register(n._terminal.onRender(function(c){return n._refreshRows(c.start,c.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(c){return n._onChar(c)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
2
2
  `)})),n.register(n._terminal.onA11yTab(function(c){return n._onTab(c)})),n.register(n._terminal.onKey(function(c){return n._onKey(c.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new a.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return u(e,r),e.prototype.dispose=function(){r.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,i){var n=t.target,l=this._rowElements[i===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(i===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var c,y;if(i===0?(c=n,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(c=this._rowElements.shift(),y=n,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){var C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else C=this._createAccessibilityTreeNode(),this._rowElements.push(C),this._rowContainer.appendChild(C);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var i=0;i<t;i++)this._onChar(" ")},e.prototype._onChar=function(t){var i=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){i._accessibilityTreeRoot.appendChild(i._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,i){this._renderRowsDebouncer.refresh(t,i,this._terminal.rows)},e.prototype._renderRows=function(t,i){for(var n=this._terminal.buffer,l=n.lines.length.toString(),c=t;c<=i;c++){var y=n.translateBufferLineToString(n.ydisp+c,!0),C=(n.ydisp+c+1).toString(),g=this._rowElements[c];g&&(y.length===0?g.innerText=" ":g.textContent=y,g.setAttribute("aria-posinset",C),g.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(s.Disposable);o.AccessibilityManager=h},3614:(P,o)=>{function b(_){return _.replace(/\r?\n/g,"\r")}function f(_,m){return m?"\x1B[200~"+_+"\x1B[201~":_}function u(_,m,v){_=f(_=b(_),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(_,!0),m.value=""}function d(_,m,v){var s=v.getBoundingClientRect(),a=_.clientX-s.left-10,p=_.clientY-s.top-10;m.style.width="20px",m.style.height="20px",m.style.left=a+"px",m.style.top=p+"px",m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=b,o.bracketTextForPaste=f,o.copyHandler=function(_,m){_.clipboardData&&_.clipboardData.setData("text/plain",m.selectionText),_.preventDefault()},o.handlePasteEvent=function(_,m,v){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),m,v)},o.paste=u,o.moveTextAreaUnderMouseCursor=d,o.rightClickHandler=function(_,m,v,s,a){d(_,m,v),a&&s.rightClickSelect(_),m.value=s.selectionText,m.select()}},7239:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var b=function(){function f(){this._color={},this._rgba={}}return f.prototype.clear=function(){this._color={},this._rgba={}},f.prototype.setCss=function(u,d,_){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][d]=_},f.prototype.getCss=function(u,d){return this._rgba[u]?this._rgba[u][d]:void 0},f.prototype.setColor=function(u,d,_){this._color[u]||(this._color[u]={}),this._color[u][d]=_},f.prototype.getColor=function(u,d){return this._color[u]?this._color[u][d]:void 0},f}();o.ColorContrastCache=b},5680:function(P,o,b){var f=this&&this.__read||function(h,r){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,i,n=e.call(h),l=[];try{for(;(r===void 0||r-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(c){i={error:c}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return l};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var u=b(8055),d=b(7239),_=u.css.toColor("#ffffff"),m=u.css.toColor("#000000"),v=u.css.toColor("#ffffff"),s=u.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[u.css.toColor("#2e3436"),u.css.toColor("#cc0000"),u.css.toColor("#4e9a06"),u.css.toColor("#c4a000"),u.css.toColor("#3465a4"),u.css.toColor("#75507b"),u.css.toColor("#06989a"),u.css.toColor("#d3d7cf"),u.css.toColor("#555753"),u.css.toColor("#ef2929"),u.css.toColor("#8ae234"),u.css.toColor("#fce94f"),u.css.toColor("#729fcf"),u.css.toColor("#ad7fa8"),u.css.toColor("#34e2e2"),u.css.toColor("#eeeeec")],r=[0,95,135,175,215,255],e=0;e<216;e++){var t=r[e/36%6|0],i=r[e/6%6|0],n=r[e%6];h.push({css:u.channels.toCss(t,i,n),rgba:u.channels.toRgba(t,i,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:u.channels.toCss(l,l,l),rgba:u.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(r,e){this.allowTransparency=e;var t=r.createElement("canvas");t.width=1,t.height=1;var i=t.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new d.ColorContrastCache,this.colors={foreground:_,background:m,cursor:v,cursorAccent:s,selectionTransparent:a,selectionOpaque:u.color.blend(m,a),selectionForeground:void 0,ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(r){r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,_),this.colors.background=this._parseColor(r.background,m),this.colors.cursor=this._parseColor(r.cursor,v,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,s,!0),this.colors.selectionTransparent=this._parseColor(r.selection,a,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=r.selectionForeground?this._parseColor(r.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(r.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(r){if(r!==void 0)switch(r){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[r]=this._restoreColors.ansi[r]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(r,e,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+r+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=f(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),4),l=n[0],c=n[1],y=n[2],C=n[3],g=Math.round(255*C);return{rgba:u.channels.toRgba(l,c,y,g),css:r}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(i[0],i[1],i[2],i[3])}},h}();o.ColorManager=p},9631:function(P,o){var b=this&&this.__values||function(f){var u=typeof Symbol=="function"&&Symbol.iterator,d=u&&f[u],_=0;if(d)return d.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&_>=f.length&&(f=void 0),{value:f&&f[_++],done:!f}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var f,u,d,_=[],m=0;m<arguments.length;m++)_[m]=arguments[m];try{for(var v=b(_),s=v.next();!s.done;s=v.next()){var a=s.value;(d=a?.parentElement)===null||d===void 0||d.removeChild(a)}}catch(p){f={error:p}}finally{try{s&&!s.done&&(u=v.return)&&u.call(v)}finally{if(f)throw f.error}}}},3656:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(b,f,u,d){b.addEventListener(f,u,d);var _=!1;return{dispose:function(){_||(_=!0,b.removeEventListener(f,u,d))}}}},3551:function(P,o,b){var f=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},u=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var d=b(8460),_=b(2585),m=function(){function s(a,p,h){this._bufferService=a,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new d.EventEmitter,this._onHideLinkUnderline=new d.EventEmitter,this._onLinkTooltip=new d.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(s.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),s.prototype.attachToDom=function(a,p){this._element=a,this._mouseZoneManager=p},s.prototype.linkifyRows=function(a,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=a,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,a),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(a,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},s._timeBeforeLatency))},s.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var a=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=a.ydisp+this._rowsToLinkify.start;if(!(p>=a.lines.length)){for(var h=a.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,r,r);e.hasNext();)for(var t=e.next(),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[i]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},s.prototype.registerLinkMatcher=function(a,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:a,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(r),r.id},s.prototype._addLinkMatcherToList=function(a){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(a.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,a);this._linkMatchers.splice(0,0,a)}else this._linkMatchers.push(a)},s.prototype.deregisterLinkMatcher=function(a){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===a)return this._linkMatchers.splice(p,1),!0;return!1},s.prototype._doLinkifyRow=function(a,p,h){for(var r,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),i=-1,n=function(){var c=r[typeof h.matchIndex!="number"?0:h.matchIndex];if(!c)return l._logService.debug("match found without corresponding matchIndex",r,h),"break";if(i=p.indexOf(c,i+1),t.lastIndex=i+c.length,i<0)return"break";var y=l._bufferService.buffer.stringIndexToBufferIndex(a,i);if(y[0]<0)return"break";var C=l._bufferService.buffer.lines.get(y[0]);if(!C)return"break";var g=C.getFg(y[1]),S=g?g>>9&511:void 0;h.validationCallback?h.validationCallback(c,function(w){e._rowsTimeoutId||w&&e._addLink(y[1],y[0]-e._bufferService.buffer.ydisp,c,h,S)}):l._addLink(y[1],y[0]-l._bufferService.buffer.ydisp,c,h,S)},l=this;(r=t.exec(p))!==null&&n()!=="break";);},s.prototype._addLink=function(a,p,h,r,e){var t=this;if(this._mouseZoneManager&&this._element){var i=this._unicodeService.getStringCellWidth(h),n=a%this._bufferService.cols,l=p+Math.floor(a/this._bufferService.cols),c=(n+i)%this._bufferService.cols,y=l+Math.floor((n+i)/this._bufferService.cols);c===0&&(c=this._bufferService.cols,y--),this._mouseZoneManager.add(new v(n+1,l+1,c+1,y+1,function(C){if(r.handler)return r.handler(C,h);var g=window.open();g?(g.opener=null,g.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,y,e)),t._element.classList.add("xterm-cursor-pointer")},function(C){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,c,y,e)),r.hoverTooltipCallback&&r.hoverTooltipCallback(C,h,{start:{x:n,y:l},end:{x:c,y}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,y,e)),t._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(C){return!r.willLinkActivate||r.willLinkActivate(C,h)}))}},s.prototype._createLinkHoverEvent=function(a,p,h,r,e){return{x1:a,y1:p,x2:h,y2:r,cols:this._bufferService.cols,fg:e}},s._timeBeforeLatency=200,s=f([u(0,_.IBufferService),u(1,_.ILogService),u(2,_.IUnicodeService)],s)}();o.Linkifier=m;var v=function(s,a,p,h,r,e,t,i,n){this.x1=s,this.y1=a,this.x2=p,this.y2=h,this.clickCallback=r,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=i,this.willLinkActivate=n};o.MouseZone=v},6465:function(P,o,b){var f,u=this&&this.__extends||(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},f(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}f(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),d=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},_=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}},m=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var i=typeof Symbol=="function"&&e[Symbol.iterator];if(!i)return e;var n,l,c=i.call(e),y=[];try{for(;(t===void 0||t-- >0)&&!(n=c.next()).done;)y.push(n.value)}catch(C){l={error:C}}finally{try{n&&!n.done&&(i=c.return)&&i.call(c)}finally{if(l)throw l.error}}return y};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var s=b(2585),a=b(8460),p=b(844),h=b(3656),r=function(e){function t(i){var n=e.call(this)||this;return n._bufferService=i,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new a.EventEmitter),n._onHideLinkUnderline=n.register(new a.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return u(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(i){var n=this;return this._linkProviders.push(i),{dispose:function(){var l=n._linkProviders.indexOf(i);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(i,n,l){var c=this;this._element=i,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(i){if(this._lastMouseEvent=i,this._element&&this._mouseService){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=i.composedPath(),c=0;c<l.length;c++){var y=l[c];if(y.classList.contains("xterm"))break;if(y.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(i){if(this._activeLine!==i.y)return this._clearCurrentLink(),void this._askForLink(i,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))},t.prototype._askForLink=function(i,n){var l,c,y,C,g=this;this._activeProviderReplies&&n||((y=this._activeProviderReplies)===null||y===void 0||y.forEach(function(x){x?.forEach(function(M){M.link.dispose&&M.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);var S=!1,w=function(x,M){n?!((C=R._activeProviderReplies)===null||C===void 0)&&C.get(x)&&(S=R._checkLinkProviderResult(x,i,S)):M.provideLinks(i.y,function(T){var U,q;if(!g._isMouseOut){var F=T?.map(function(z){return{link:z}});(U=g._activeProviderReplies)===null||U===void 0||U.set(x,F),S=g._checkLinkProviderResult(x,i,S),((q=g._activeProviderReplies)===null||q===void 0?void 0:q.size)===g._linkProviders.length&&g._removeIntersectingLinks(i.y,g._activeProviderReplies)}})},R=this;try{for(var L=m(this._linkProviders.entries()),k=L.next();!k.done;k=L.next()){var E=v(k.value,2);w(E[0],E[1])}}catch(x){l={error:x}}finally{try{k&&!k.done&&(c=L.return)&&c.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(i,n){for(var l=new Set,c=0;c<n.size;c++){var y=n.get(c);if(y)for(var C=0;C<y.length;C++)for(var g=y[C],S=g.link.range.start.y<i?0:g.link.range.start.x,w=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x,R=S;R<=w;R++){if(l.has(R)){y.splice(C--,1);break}l.add(R)}}},t.prototype._checkLinkProviderResult=function(i,n,l){var c,y=this;if(!this._activeProviderReplies)return l;for(var C=this._activeProviderReplies.get(i),g=!1,S=0;S<i;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(g=!0);if(!g&&C){var w=C.find(function(L){return y._linkAtPosition(L.link,n)});w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(S=0;S<this._activeProviderReplies.size;S++){var R=(c=this._activeProviderReplies.get(S))===null||c===void 0?void 0:c.find(function(L){return y._linkAtPosition(L.link,n)});if(R){l=!0,this._handleNewLink(R);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(i){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(i,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(i,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!i||!n||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(i){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(i.link,l)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:function(){var c,y;return(y=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:function(c){var y,C;!((y=n._currentLink)===null||y===void 0)&&y.state&&n._currentLink.state.decorations.pointerCursor!==c&&(n._currentLink.state.decorations.pointerCursor=c,n._currentLink.state.isHovered&&((C=n._element)===null||C===void 0||C.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,y;return(y=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||y===void 0?void 0:y.decorations.underline},set:function(c){var y,C,g;!((y=n._currentLink)===null||y===void 0)&&y.state&&((g=(C=n._currentLink)===null||C===void 0?void 0:C.state)===null||g===void 0?void 0:g.decorations.underline)!==c&&(n._currentLink.state.decorations.underline=c,n._currentLink.state.isHovered&&n._fireUnderlineEvent(i.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(c){var y=c.start===0?0:c.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(y,c.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(i,n){var l=i.range,c=this._bufferService.buffer.ydisp,y=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-c-1,l.end.x,l.end.y-c-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(y)},t.prototype._linkLeave=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(i,n){var l=i.range.start.y===i.range.end.y,c=i.range.start.y<n.y,y=i.range.end.y>n.y;return(l&&i.range.start.x<=n.x&&i.range.end.x>=n.x||c&&i.range.end.x>=n.x||y&&i.range.start.x<=n.x||c&&y)&&i.range.start.y<=n.y&&i.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(i,n,l){var c=l.getCoords(i,n,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(i,n,l,c,y){return{x1:i,y1:n,x2:l,y2:c,cols:this._bufferService.cols,fg:y}},d([_(0,s.IBufferService)],t)}(p.Disposable);o.Linkifier2=r},9042:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var m=b(844),v=b(3656),s=b(4725),a=b(2585),p=function(h){function r(e,t,i,n,l,c){var y=h.call(this)||this;return y._element=e,y._screenElement=t,y._bufferService=i,y._mouseService=n,y._selectionService=l,y._optionsService=c,y._zones=[],y._areZonesActive=!1,y._lastHoverCoords=[void 0,void 0],y._initialSelectionLength=0,y.register((0,v.addDisposableDomListener)(y._element,"mousedown",function(C){return y._onMouseDown(C)})),y._mouseMoveListener=function(C){return y._onMouseMove(C)},y._mouseLeaveListener=function(C){return y._onMouseLeave(C)},y._clickListener=function(C){return y._onClick(C)},y}return u(r,h),r.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},r.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},r.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var i=0;i<this._zones.length;i++){var n=this._zones[i];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}this._zones.length===0&&this._deactivate()}},r.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},r.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},r.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},r.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},r.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t?.tooltipCallback(e)},r.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t?.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},r.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},r.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},r.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},r.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],n=t[1],l=0;l<this._zones.length;l++){var c=this._zones[l];if(c.y1===c.y2){if(n===c.y1&&i>=c.x1&&i<c.x2)return c}else if(n===c.y1&&i>=c.x1||n===c.y2&&i<c.x2||n>c.y1&&n<c.y2)return c}},d([_(2,a.IBufferService),_(3,s.IMouseService),_(4,s.ISelectionService),_(5,a.IOptionsService)],r)}(m.Disposable);o.MouseZoneManager=p},6193:function(P,o){var b=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,_=d&&u[d],m=0;if(_)return _.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var f=function(){function u(d){this._renderCallback=d,this._refreshCallbacks=[]}return u.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},u.prototype.addRefreshCallback=function(d){var _=this;return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return _._innerRefresh()})),this._animationFrame},u.prototype.refresh=function(d,_,m){var v=this;this._rowCount=m,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},u.prototype._runRefreshCallbacks=function(){var d,_;try{for(var m=b(this._refreshCallbacks),v=m.next();!v.done;v=m.next())(0,v.value)(0)}catch(s){d={error:s}}finally{try{v&&!v.done&&(_=m.return)&&_.call(m)}finally{if(d)throw d.error}}this._refreshCallbacks=[]},u}();o.RenderDebouncer=f},5596:function(P,o,b){var f,u=this&&this.__extends||(f=function(_,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,s){v.__proto__=s}||function(v,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(v[a]=s[a])},f(_,m)},function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function v(){this.constructor=_}f(_,m),_.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var d=function(_){function m(){var v=_!==null&&_.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return u(m,_),m.prototype.setListener=function(v){var s=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){s._listener&&(s._listener(window.devicePixelRatio,s._currentDevicePixelRatio),s._updateDpr())},this._updateDpr()},m.prototype.dispose=function(){_.prototype.dispose.call(this),this.clearListener()},m.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},m.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},m}(b(844).Disposable);o.ScreenDprMonitor=d},3236:function(P,o,b){var f,u=this&&this.__extends||(f=function(X,W){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var j in D)Object.prototype.hasOwnProperty.call(D,j)&&(O[j]=D[j])},f(X,W)},function(X,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function O(){this.constructor=X}f(X,W),X.prototype=W===null?Object.create(W):(O.prototype=W.prototype,new O)}),d=this&&this.__values||function(X){var W=typeof Symbol=="function"&&Symbol.iterator,O=W&&X[W],D=0;if(O)return O.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&D>=X.length&&(X=void 0),{value:X&&X[D++],done:!X}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},_=this&&this.__read||function(X,W){var O=typeof Symbol=="function"&&X[Symbol.iterator];if(!O)return X;var D,j,V=O.call(X),Y=[];try{for(;(W===void 0||W-- >0)&&!(D=V.next()).done;)Y.push(D.value)}catch(te){j={error:te}}finally{try{D&&!D.done&&(O=V.return)&&O.call(V)}finally{if(j)throw j.error}}return Y},m=this&&this.__spreadArray||function(X,W,O){if(O||arguments.length===2)for(var D,j=0,V=W.length;j<V;j++)!D&&j in W||(D||(D=Array.prototype.slice.call(W,0,j)),D[j]=W[j]);return X.concat(D||Array.prototype.slice.call(W))};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var v=b(2950),s=b(1680),a=b(3614),p=b(2584),h=b(5435),r=b(3525),e=b(3551),t=b(9312),i=b(6114),n=b(3656),l=b(9042),c=b(357),y=b(6954),C=b(4567),g=b(1296),S=b(7399),w=b(8460),R=b(8437),L=b(5680),k=b(3230),E=b(4725),x=b(428),M=b(8934),T=b(6465),U=b(5114),q=b(8969),F=b(8055),z=b(4269),N=b(5941),A=b(3107),$=b(5744),J=b(9074),oe=b(2585),B=typeof window<"u"?window.document:null,ne=function(X){function W(O){O===void 0&&(O={});var D=X.call(this,O)||this;return D.browser=i,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new w.EventEmitter,D._onKey=new w.EventEmitter,D._onRender=new w.EventEmitter,D._onSelectionChange=new w.EventEmitter,D._onTitleChange=new w.EventEmitter,D._onBell=new w.EventEmitter,D._onFocus=new w.EventEmitter,D._onBlur=new w.EventEmitter,D._onA11yCharEmitter=new w.EventEmitter,D._onA11yTabEmitter=new w.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance(J.DecorationService),D._instantiationService.setService(oe.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(j,V){return D.refresh(j,V)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(j){return D._reportWindowsOptions(j)})),D.register(D._inputHandler.onColor(function(j){return D._handleColorEvent(j)})),D.register((0,w.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,w.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(j){return D._afterResize(j.cols,j.rows)})),D}return u(W,X),Object.defineProperty(W.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),W.prototype._handleColorEvent=function(O){var D,j,V,Y;if(this._colorManager){try{for(var te=d(O),ae=te.next();!ae.done;ae=te.next()){var he=ae.value,ue=void 0,K="";switch(he.index){case 256:ue="foreground",K="10";break;case 257:ue="background",K="11";break;case 258:ue="cursor",K="12";break;default:ue="ansi",K="4;"+he.index}if(ue)switch(he.type){case 0:var fe=F.color.toColorRGB(ue==="ansi"?this._colorManager.colors.ansi[he.index]:this._colorManager.colors[ue]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(fe)+p.C1_ESCAPED.ST);break;case 1:ue==="ansi"?this._colorManager.colors.ansi[he.index]=F.rgba.toColor.apply(F.rgba,m([],_(he.color),!1)):this._colorManager.colors[ue]=F.rgba.toColor.apply(F.rgba,m([],_(he.color),!1));break;case 2:this._colorManager.restoreColor(he.index)}}}catch(ge){D={error:ge}}finally{try{ae&&!ae.done&&(j=te.return)&&j.call(te)}finally{if(D)throw D.error}}(V=this._renderService)===null||V===void 0||V.setColors(this._colorManager.colors),(Y=this.viewport)===null||Y===void 0||Y.onThemeChange(this._colorManager.colors)}},W.prototype.dispose=function(){var O,D,j;this._isDisposed||(X.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(j=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||j===void 0||j.removeChild(this.element))},W.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(W.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),W.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},W.prototype._updateOptions=function(O){var D,j,V,Y;switch(X.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(j=this._charSizeService)===null||j===void 0||j.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(V=this.viewport)===null||V===void 0||V.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)):((Y=this._accessibilityManager)===null||Y===void 0||Y.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},W.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},W.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},W.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},W.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var j=Math.min(this.buffer.x,this.cols-1),V=this._renderService.dimensions.actualCellHeight,Y=D.getWidth(j),te=this._renderService.dimensions.actualCellWidth*Y,ae=this.buffer.y*this._renderService.dimensions.actualCellHeight,he=j*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=he+"px",this.textarea.style.top=ae+"px",this.textarea.style.width=te+"px",this.textarea.style.height=V+"px",this.textarea.style.lineHeight=V+"px",this.textarea.style.zIndex="-5"}}},W.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(j){O.hasSelection()&&(0,a.copyHandler)(j,O._selectionService)}));var D=function(j){return(0,a.handlePasteEvent)(j,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),i.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(j){j.button===2&&(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(j){(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),i.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(j){j.button===1&&(0,a.moveTextAreaUnderMouseCursor)(j,O.textarea,O.screenElement)}))},W.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._compositionHelper.compositionupdate(D)})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register((0,n.addDisposableDomListener)(this.textarea,"input",function(D){return O._inputEvent(D)},!0)),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(D){return O._queueLinkification(D.start,D.end)}))},W.prototype.open=function(O){var D=this;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),O.appendChild(this.element);var j=B.createDocumentFragment();this._viewportElement=B.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),j.appendChild(this._viewportElement),this._viewportScrollArea=B.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=B.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=B.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),j.appendChild(this.screenElement),this.textarea=B.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,n.addDisposableDomListener)(this.textarea,"focus",function(te){return D._onTextAreaFocus(te)})),this.register((0,n.addDisposableDomListener)(this.textarea,"blur",function(){return D._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var V=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(E.ICoreBrowserService,V),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new L.ColorManager(B,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(te){return D._colorManager.onOptionsChange(te)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(z.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService);var Y=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,Y,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(function(te){return D._onRender.fire(te)})),this.onResize(function(te){return D._renderService.resize(te.cols,te.rows)}),this._compositionView=B.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(j),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(E.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,function(te){return D.scrollLines(te,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return D.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){D._renderService.onCursorMove(),D._syncTextArea()})),this.register(this.onResize(function(){return D._renderService.onResize(D.cols,D.rows)})),this.register(this.onBlur(function(){return D._renderService.onBlur()})),this.register(this.onFocus(function(){return D._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return D.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(te){return D.scrollLines(te.amount,te.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return D._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(te){return D._renderService.onSelectionChanged(te.start,te.end,te.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(te){D.textarea.value=te,D.textarea.focus(),D.textarea.select()})),this.register(this._onScroll.event(function(te){D.viewport.syncScrollArea(),D._selectionService.refresh()})),this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",function(){return D._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return D._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(A.BufferDecorationRenderer,this.screenElement)),this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(te){return D._selectionService.onMouseDown(te)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance($.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange(function(){!D._overviewRulerRenderer&&D.options.overviewRulerWidth&&D._viewportElement&&D.screenElement&&(D._overviewRulerRenderer=D._instantiationService.createInstance($.OverviewRulerRenderer,D._viewportElement,D.screenElement))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},W.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(r.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(g.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},W.prototype._setTheme=function(O){var D,j,V;this._theme=O,(D=this._colorManager)===null||D===void 0||D.setTheme(O),(j=this._renderService)===null||j===void 0||j.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)},W.prototype.bindMouse=function(){var O=this,D=this,j=this.element;function V(K){var fe,ge,xe=D._mouseService.getRawByteCoords(K,D.screenElement,D.cols,D.rows);if(!xe)return!1;switch(K.overrideType||K.type){case"mousemove":ge=32,K.buttons===void 0?(fe=3,K.button!==void 0&&(fe=K.button<3?K.button:3)):fe=1&K.buttons?0:4&K.buttons?1:2&K.buttons?2:3;break;case"mouseup":ge=0,fe=K.button<3?K.button:3;break;case"mousedown":ge=1,fe=K.button<3?K.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(K)===0)return!1;ge=K.deltaY<0?0:1,fe=4;break;default:return!1}return!(ge===void 0||fe===void 0||fe>4)&&D.coreMouseService.triggerMouseEvent({col:xe.x-33,row:xe.y-33,button:fe,action:ge,ctrl:K.ctrlKey,alt:K.altKey,shift:K.shiftKey})}var Y={mouseup:null,wheel:null,mousedrag:null,mousemove:null},te=function(K){return V(K),K.buttons||(O._document.removeEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.removeEventListener("mousemove",Y.mousedrag)),O.cancel(K)},ae=function(K){return V(K),O.cancel(K,!0)},he=function(K){K.buttons&&V(K)},ue=function(K){K.buttons||V(K)};this.register(this.coreMouseService.onProtocolChange(function(K){K?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(K)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&K?Y.mousemove||(j.addEventListener("mousemove",ue),Y.mousemove=ue):(j.removeEventListener("mousemove",Y.mousemove),Y.mousemove=null),16&K?Y.wheel||(j.addEventListener("wheel",ae,{passive:!1}),Y.wheel=ae):(j.removeEventListener("wheel",Y.wheel),Y.wheel=null),2&K?Y.mouseup||(Y.mouseup=te):(O._document.removeEventListener("mouseup",Y.mouseup),Y.mouseup=null),4&K?Y.mousedrag||(Y.mousedrag=he):(O._document.removeEventListener("mousemove",Y.mousedrag),Y.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,n.addDisposableDomListener)(j,"mousedown",function(K){if(K.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(K))return V(K),Y.mouseup&&O._document.addEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.addEventListener("mousemove",Y.mousedrag),O.cancel(K)})),this.register((0,n.addDisposableDomListener)(j,"wheel",function(K){if(!Y.wheel){if(!O.buffer.hasScrollback){var fe=O.viewport.getLinesScrolled(K);if(fe===0)return;for(var ge=p.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(K.deltaY<0?"A":"B"),xe="",Fe=0;Fe<Math.abs(fe);Fe++)xe+=ge;return O.coreService.triggerDataEvent(xe,!0),O.cancel(K,!0)}return O.viewport.onWheel(K)?O.cancel(K):void 0}},{passive:!1})),this.register((0,n.addDisposableDomListener)(j,"touchstart",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(K),O.cancel(K)},{passive:!0})),this.register((0,n.addDisposableDomListener)(j,"touchmove",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(K)?void 0:O.cancel(K)},{passive:!1}))},W.prototype.refresh=function(O,D){var j;(j=this._renderService)===null||j===void 0||j.refreshRows(O,D)},W.prototype._queueLinkification=function(O,D){var j;(j=this.linkifier)===null||j===void 0||j.linkifyRows(O,D)},W.prototype.updateCursorStyle=function(O){var D;!((D=this._selectionService)===null||D===void 0)&&D.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},W.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},W.prototype.scrollLines=function(O,D,j){j===void 0&&(j=0),X.prototype.scrollLines.call(this,O,D,j),this.refresh(0,this.rows-1)},W.prototype.paste=function(O){(0,a.paste)(O,this.textarea,this.coreService)},W.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},W.prototype.registerLinkMatcher=function(O,D,j){var V=this.linkifier.registerLinkMatcher(O,D,j);return this.refresh(0,this.rows-1),V},W.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},W.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},W.prototype.registerCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var D=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),D},W.prototype.deregisterCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(W.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),W.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},W.prototype.registerDecoration=function(O){return this._decorationService.registerDecoration(O)},W.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},W.prototype.select=function(O,D,j){this._selectionService.setSelection(O,D,j)},W.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},W.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},W.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},W.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},W.prototype.selectLines=function(O,D){var j;(j=this._selectionService)===null||j===void 0||j.selectLines(O,D)},W.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;var D=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!D&&!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;D||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var j=(0,S.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),j.type===3||j.type===2){var V=this.rows-1;return this.scrollLines(j.type===2?-V:V),this.cancel(O,!0)}return j.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(j.cancel&&this.cancel(O,!0),!j.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(j.key!==p.C0.ETX&&j.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:j.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(j.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0))))},W.prototype._isThirdLevelShift=function(O,D){var j=O.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||O.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||O.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?j:j&&(!D.keyCode||D.keyCode>47)},W.prototype._keyUp=function(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},W.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},W.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},W.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},W.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?X.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},W.prototype._afterResize=function(O,D){var j,V;(j=this._charSizeService)===null||j===void 0||j.measure(),(V=this.viewport)===null||V===void 0||V.syncScrollArea(!0)},W.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(R.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},W.prototype.reset=function(){var O,D;this.options.rows=this.rows,this.options.cols=this.cols;var j=this._customKeyEventHandler;this._setup(),X.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1),(D=this.viewport)===null||D===void 0||D.syncScrollArea()},W.prototype.clearTextureAtlas=function(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()},W.prototype._reportFocus=function(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},W.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case h.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),j=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+j+";"+D+"t");break;case h.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var V=this._renderService.dimensions.scaledCellWidth.toFixed(0),Y=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+Y+";"+V+"t")}},W.prototype.cancel=function(O,D){if(this.options.cancelEvents||D)return O.preventDefault(),O.stopPropagation(),!1},W.prototype._visualBell=function(){return!1},W.prototype._soundBell=function(){return this.options.bellStyle==="sound"},W}(q.CoreTerminal);o.Terminal=ne},9924:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0;var b=function(){function f(u,d){d===void 0&&(d=1e3),this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return f.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},f.prototype.refresh=function(u,d,_){var m=this;this._rowCount=_,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var s=v-this._lastRefreshMs,a=this._debounceThresholdMS-s;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){m._lastRefreshMs=Date.now(),m._innerRefresh(),m._additionalRefreshRequested=!1,m._refreshTimeoutID=void 0},a)}},f.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}},f}();o.TimeBasedDebouncer=b},1680:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var m=b(844),v=b(3656),s=b(4725),a=b(2585),p=function(h){function r(e,t,i,n,l,c,y,C){var g=h.call(this)||this;return g._scrollLines=e,g._viewportElement=t,g._scrollArea=i,g._element=n,g._bufferService=l,g._optionsService=c,g._charSizeService=y,g._renderService=C,g.scrollBarWidth=0,g._currentRowHeight=0,g._currentScaledCellHeight=0,g._lastRecordedBufferLength=0,g._lastRecordedViewportHeight=0,g._lastRecordedBufferHeight=0,g._lastTouchY=0,g._lastScrollTop=0,g._wheelPartialScroll=0,g._refreshAnimationFrame=null,g._ignoreNextScrollEvent=!1,g.scrollBarWidth=g._viewportElement.offsetWidth-g._scrollArea.offsetWidth||15,g.register((0,v.addDisposableDomListener)(g._viewportElement,"scroll",g._onScroll.bind(g))),g._activeBuffer=g._bufferService.buffer,g.register(g._bufferService.buffers.onBufferActivate(function(S){return g._activeBuffer=S.activeBuffer})),g._renderDimensions=g._renderService.dimensions,g.register(g._renderService.onDimensionsChange(function(S){return g._renderDimensions=S})),setTimeout(function(){return g.syncScrollArea()},0),g}return u(r,h),r.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},r.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return t._innerRefresh()}))},r.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},r.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},r.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},r.prototype._bubbleScroll=function(e,t){var i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&i<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},r.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},r.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},r.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},r.prototype._applyScrollModifier=function(e,t){var i=this._optionsService.rawOptions.fastScrollModifier;return i==="alt"&&t.altKey||i==="ctrl"&&t.ctrlKey||i==="shift"&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},r.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},r.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},d([_(4,a.IBufferService),_(5,a.IOptionsService),_(6,s.ICharSizeService),_(7,s.IRenderService)],r)}(m.Disposable);o.Viewport=p},3107:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),d=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},_=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},m=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;var v=b(3656),s=b(4725),a=b(844),p=b(2585),h=function(r){function e(t,i,n,l){var c=r.call(this)||this;return c._screenElement=t,c._bufferService=i,c._decorationService=n,c._renderService=l,c._decorationElements=new Map,c._altBufferIsActive=!1,c._dimensionsChanged=!1,c._container=document.createElement("div"),c._container.classList.add("xterm-decoration-container"),c._screenElement.appendChild(c._container),c.register(c._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),c.register(c._renderService.onDimensionsChange(function(){c._dimensionsChanged=!0,c._queueRefresh()})),c.register((0,v.addDisposableDomListener)(window,"resize",function(){return c._queueRefresh()})),c.register(c._bufferService.buffers.onBufferActivate(function(){c._altBufferIsActive=c._bufferService.buffer===c._bufferService.buffers.alt})),c.register(c._decorationService.onDecorationRegistered(function(){return c._queueRefresh()})),c.register(c._decorationService.onDecorationRemoved(function(y){return c._removeDecoration(y)})),c}return u(e,r),e.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),r.prototype.dispose.call(this)},e.prototype._queueRefresh=function(){var t=this;this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(function(){t.refreshDecorations(),t._animationFrame=void 0}))},e.prototype.refreshDecorations=function(){var t,i;try{for(var n=m(this._decorationService.decorations),l=n.next();!l.done;l=n.next()){var c=l.value;this._renderDecoration(c)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._dimensionsChanged=!1},e.prototype._renderDecoration=function(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)},e.prototype._createElement=function(t){var i,n=document.createElement("div");n.classList.add("xterm-decoration"),n.style.width=Math.round((t.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",n.style.height=(t.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",n.style.top=(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",n.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var l=(i=t.options.x)!==null&&i!==void 0?i:0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(t,n),n},e.prototype._refreshStyle=function(t){var i=this,n=t.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{var l=this._decorationElements.get(t);l||(t.onDispose(function(){return i._removeDecoration(t)}),l=this._createElement(t),t.element=l,this._decorationElements.set(t,l),this._container.appendChild(l)),l.style.top=n*this._renderService.dimensions.actualCellHeight+"px",l.style.display=this._altBufferIsActive?"none":"block",t.onRenderEmitter.fire(l)}},e.prototype._refreshXPosition=function(t,i){var n;if(i===void 0&&(i=t.element),i){var l=(n=t.options.x)!==null&&n!==void 0?n:0;(t.options.anchor||"left")==="right"?i.style.right=l?l*this._renderService.dimensions.actualCellWidth+"px":"":i.style.left=l?l*this._renderService.dimensions.actualCellWidth+"px":""}},e.prototype._removeDecoration=function(t){var i;(i=this._decorationElements.get(t))===null||i===void 0||i.remove(),this._decorationElements.delete(t)},d([_(1,p.IBufferService),_(2,p.IDecorationService),_(3,s.IRenderService)],e)}(a.Disposable);o.BufferDecorationRenderer=h},5871:function(P,o){var b=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,_=d&&u[d],m=0;if(_)return _.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0;var f=function(){function u(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(u.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),u.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},u.prototype.addDecoration=function(d){var _,m;if(d.options.overviewRulerOptions){try{for(var v=b(this._zones),s=v.next();!s.done;s=v.next()){var a=s.value;if(a.color===d.options.overviewRulerOptions.color&&a.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(a,d.marker.line))return;if(this._lineAdjacentToZone(a,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(a,d.marker.line)}}}catch(p){_={error:p}}finally{try{s&&!s.done&&(m=v.return)&&m.call(v)}finally{if(_)throw _.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},u.prototype.setPadding=function(d){this._linePadding=d},u.prototype._lineIntersectsZone=function(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine},u.prototype._lineAdjacentToZone=function(d,_,m){return _>=d.startBufferLine-this._linePadding[m||"full"]&&_<=d.endBufferLine+this._linePadding[m||"full"]},u.prototype._addLineToZone=function(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)},u}();o.ColorZoneStore=f},5744:function(P,o,b){var f,u=this&&this.__extends||(f=function(n,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(c[C]=y[C])},f(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}f(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),d=this&&this.__decorate||function(n,l,c,y){var C,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,c):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,y);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(g<3?C(S):g>3?C(l,c,S):C(l,c))||S);return g>3&&S&&Object.defineProperty(l,c,S),S},_=this&&this.__param||function(n,l){return function(c,y){l(c,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],y=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;var v=b(5871),s=b(3656),a=b(4725),p=b(844),h=b(2585),r={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},t={full:0,left:0,center:0,right:0},i=function(n){function l(c,y,C,g,S,w){var R,L=n.call(this)||this;L._viewportElement=c,L._screenElement=y,L._bufferService=C,L._decorationService=g,L._renderService=S,L._optionsService=w,L._colorZoneStore=new v.ColorZoneStore,L._shouldUpdateDimensions=!0,L._shouldUpdateAnchor=!0,L._lastKnownBufferLength=0,L._canvas=document.createElement("canvas"),L._canvas.classList.add("xterm-decoration-overview-ruler"),L._refreshCanvasDimensions(),(R=L._viewportElement.parentElement)===null||R===void 0||R.insertBefore(L._canvas,L._viewportElement);var k=L._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");return L._ctx=k,L._registerDecorationListeners(),L._registerBufferChangeListeners(),L._registerDimensionChangeListeners(),L}return u(l,n),Object.defineProperty(l.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),l.prototype._registerDecorationListeners=function(){var c=this;this.register(this._decorationService.onDecorationRegistered(function(){return c._queueRefresh(void 0,!0)})),this.register(this._decorationService.onDecorationRemoved(function(){return c._queueRefresh(void 0,!0)}))},l.prototype._registerBufferChangeListeners=function(){var c=this;this.register(this._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),this.register(this._bufferService.buffers.onBufferActivate(function(){c._canvas.style.display=c._bufferService.buffer===c._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(function(){c._lastKnownBufferLength!==c._bufferService.buffers.normal.lines.length&&(c._refreshDrawHeightConstants(),c._refreshColorZonePadding())}))},l.prototype._registerDimensionChangeListeners=function(){var c=this;this.register(this._renderService.onRender(function(){c._containerHeight&&c._containerHeight===c._screenElement.clientHeight||(c._queueRefresh(!0),c._containerHeight=c._screenElement.clientHeight)})),this.register(this._optionsService.onOptionChange(function(y){y==="overviewRulerWidth"&&c._queueRefresh(!0)})),this.register((0,s.addDisposableDomListener)(window,"resize",function(){c._queueRefresh(!0)})),this._queueRefresh(!0)},l.prototype.dispose=function(){var c;(c=this._canvas)===null||c===void 0||c.remove(),n.prototype.dispose.call(this)},l.prototype._refreshDrawConstants=function(){var c=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=c,e.center=y,e.right=c,this._refreshDrawHeightConstants(),t.full=0,t.left=0,t.center=e.left,t.right=e.left+e.center},l.prototype._refreshDrawHeightConstants=function(){r.full=Math.round(2*window.devicePixelRatio);var c=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(c,12),6)*window.devicePixelRatio);r.left=y,r.center=y,r.right=y},l.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},l.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},l.prototype._refreshDecorations=function(){var c,y,C,g,S,w;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var R=m(this._decorationService.decorations),L=R.next();!L.done;L=R.next()){var k=L.value;this._colorZoneStore.addDecoration(k)}}catch(F){c={error:F}}finally{try{L&&!L.done&&(y=R.return)&&y.call(R)}finally{if(c)throw c.error}}this._ctx.lineWidth=1;var E=this._colorZoneStore.zones;try{for(var x=m(E),M=x.next();!M.done;M=x.next())(q=M.value).position!=="full"&&this._renderColorZone(q)}catch(F){C={error:F}}finally{try{M&&!M.done&&(g=x.return)&&g.call(x)}finally{if(C)throw C.error}}try{for(var T=m(E),U=T.next();!U.done;U=T.next()){var q;(q=U.value).position==="full"&&this._renderColorZone(q)}}catch(F){S={error:F}}finally{try{U&&!U.done&&(w=T.return)&&w.call(T)}finally{if(S)throw S.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},l.prototype._renderColorZone=function(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(t[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-r[c.position||"full"]/2),e[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+r[c.position||"full"]))},l.prototype._queueRefresh=function(c,y){var C=this;this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){C._refreshDecorations(),C._animationFrame=void 0}))},d([_(2,h.IBufferService),_(3,h.IDecorationService),_(4,a.IRenderService),_(5,h.IOptionsService)],l)}(p.Disposable);o.OverviewRulerRenderer=i},2950:function(P,o,b){var f=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},u=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var d=b(4725),_=b(2585),m=function(){function v(s,a,p,h,r,e){this._textarea=s,this._compositionView=a,this._bufferService=p,this._optionsService=h,this._coreService=r,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(s){var a=this;this._compositionView.textContent=s.data,this.updateCompositionElements(),setTimeout(function(){a._compositionPosition.end=a._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(s){if(this._isComposing||this._isSendingComposition){if(s.keyCode===229||s.keyCode===16||s.keyCode===17||s.keyCode===18)return!1;this._finalizeComposition(!1)}return s.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(s){var a=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,s){var p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(a._isSendingComposition){a._isSendingComposition=!1;var r;p.start+=a._dataAlreadySent.length,(r=a._isComposing?a._textarea.value.substring(p.start,p.end):a._textarea.value.substring(p.start)).length>0&&a._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;var h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}},v.prototype._handleAnyTextareaChanges=function(){var s=this,a=this._textarea.value;setTimeout(function(){if(!s._isComposing){var p=s._textarea.value.replace(a,"");p.length>0&&(s._dataAlreadySent=p,s._coreService.triggerDataEvent(p,!0))}},0)},v.prototype.updateCompositionElements=function(s){var a=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.actualCellHeight,r=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=p*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(t.width,1)+"px",this._textarea.style.height=Math.max(t.height,1)+"px",this._textarea.style.lineHeight=t.height+"px"}s||setTimeout(function(){return a.updateCompositionElements(!0)},0)}},f([u(2,_.IBufferService),u(3,_.IOptionsService),u(4,_.ICoreService),u(5,d.IRenderService)],v)}();o.CompositionHelper=m},9806:(P,o)=>{function b(f,u,d){var _=d.getBoundingClientRect(),m=f.getComputedStyle(d),v=parseInt(m.getPropertyValue("padding-left")),s=parseInt(m.getPropertyValue("padding-top"));return[u.clientX-_.left-v,u.clientY-_.top-s]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=b,o.getCoords=function(f,u,d,_,m,v,s,a,p){if(v){var h=b(f,u,d);if(h)return h[0]=Math.ceil((h[0]+(p?s/2:0))/s),h[1]=Math.ceil(h[1]/a),h[0]=Math.min(Math.max(h[0],1),_+(p?1:0)),h[1]=Math.min(Math.max(h[1],1),m),h}},o.getRawByteCoords=function(f){if(f)return{x:f[0]+32,y:f[1]+32}}},9504:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var f=b(2584);function u(a,p,h,r){var e=a-d(h,a),t=p-d(h,p),i=Math.abs(e-t)-function(n,l,c){for(var y=0,C=n-d(c,n),g=l-d(c,l),S=0;S<Math.abs(C-g);S++){var w=_(n,l)==="A"?-1:1,R=c.buffer.lines.get(C+w*S);R?.isWrapped&&y++}return y}(a,p,h);return s(i,v(_(a,p),r))}function d(a,p){for(var h=0,r=a.buffer.lines.get(p),e=r?.isWrapped;e&&p>=0&&p<a.rows;)h++,e=(r=a.buffer.lines.get(--p))==null?void 0:r.isWrapped;return h}function _(a,p){return a>p?"A":"B"}function m(a,p,h,r,e,t){for(var i=a,n=p,l="";i!==h||n!==r;)i+=e?1:-1,e&&i>t.cols-1?(l+=t.buffer.translateBufferLineToString(n,!1,a,i),i=0,a=0,n++):!e&&i<0&&(l+=t.buffer.translateBufferLineToString(n,!1,0,a+1),a=i=t.cols-1,n--);return l+t.buffer.translateBufferLineToString(n,!1,a,i)}function v(a,p){var h=p?"O":"[";return f.C0.ESC+h+a}function s(a,p){a=Math.floor(a);for(var h="",r=0;r<a;r++)h+=p;return h}o.moveToCellSequence=function(a,p,h,r){var e,t=h.buffer.x,i=h.buffer.y;if(!h.buffer.hasScrollback)return function(l,c,y,C,g,S){return u(c,C,g,S).length===0?"":s(m(l,c,l,c-d(g,c),!1,g).length,v("D",S))}(t,i,0,p,h,r)+u(i,p,h,r)+function(l,c,y,C,g,S){var w;w=u(c,C,g,S).length>0?C-d(g,C):c;var R=C,L=function(k,E,x,M,T,U){var q;return q=u(x,M,T,U).length>0?M-d(T,M):E,k<x&&q<=M||k>=x&&q<M?"C":"D"}(l,c,y,C,g,S);return s(m(l,w,y,R,L==="C",g).length,v(L,S))}(t,i,a,p,h,r);if(i===p)return e=t>a?"D":"C",s(Math.abs(t-a),v(e,r));e=i>p?"D":"C";var n=Math.abs(i-p);return s(function(l,c){return c.cols-l}(i>p?a:t,h)+(n-1)*h.cols+1+((i>p?t:a)-1),v(e,r))}},4389:function(P,o,b){var f=this&&this.__assign||function(){return f=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},f.apply(this,arguments)},u=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var d=b(3236),_=b(9042),m=b(7975),v=b(7090),s=b(5741),a=b(8285),p=["cols","rows"],h=function(){function r(e){var t=this;this._core=new d.Terminal(e),this._addonManager=new s.AddonManager,this._publicOptions=f({},this._core.options);var i=function(y){return t._core.options[y]},n=function(y,C){t._checkReadonlyOptions(y),t._core.options[y]=C};for(var l in this._core.options){var c={get:i.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this._publicOptions,l,c)}}return r.prototype._checkReadonlyOptions=function(e){if(p.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},r.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(r.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new m.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"unicode",{get:function(){return this._checkProposedApi(),new v.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new a.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),r.prototype.blur=function(){this._core.blur()},r.prototype.focus=function(){this._core.focus()},r.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},r.prototype.open=function(e){this._core.open(e)},r.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},r.prototype.registerLinkMatcher=function(e,t,i){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,i)},r.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},r.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},r.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},r.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},r.prototype.registerMarker=function(e){return e===void 0&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},r.prototype.registerDecoration=function(e){var t,i,n;return this._checkProposedApi(),this._verifyPositiveIntegers((t=e.x)!==null&&t!==void 0?t:0,(i=e.width)!==null&&i!==void 0?i:0,(n=e.height)!==null&&n!==void 0?n:0),this._core.registerDecoration(e)},r.prototype.addMarker=function(e){return this.registerMarker(e)},r.prototype.hasSelection=function(){return this._core.hasSelection()},r.prototype.select=function(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)},r.prototype.getSelection=function(){return this._core.getSelection()},r.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},r.prototype.clearSelection=function(){this._core.clearSelection()},r.prototype.selectAll=function(){this._core.selectAll()},r.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},r.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},r.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},r.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},r.prototype.scrollToTop=function(){this._core.scrollToTop()},r.prototype.scrollToBottom=function(){this._core.scrollToBottom()},r.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},r.prototype.clear=function(){this._core.clear()},r.prototype.write=function(e,t){this._core.write(e,t)},r.prototype.writeUtf8=function(e,t){this._core.write(e,t)},r.prototype.writeln=function(e,t){this._core.write(e),this._core.write(`\r
4
4
  `,t)},r.prototype.paste=function(e){this._core.paste(e)},r.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},r.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},r.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},r.prototype.reset=function(){this._core.reset()},r.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},r.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(r,"strings",{get:function(){return _},enumerable:!1,configurable:!0}),r.prototype._verifyIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var y=c.value;if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r.prototype._verifyPositiveIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var y=c.value;if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r}();o.Terminal=h},1546:function(P,o,b){var f=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var u=b(643),d=b(8803),_=b(1420),m=b(3734),v=b(1752),s=b(8055),a=b(9631),p=b(8978),h=function(){function r(e,t,i,n,l,c,y,C,g){this._container=e,this._alpha=n,this._colors=l,this._rendererId=c,this._bufferService=y,this._optionsService=C,this._decorationService=g,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return r.prototype.dispose=function(){var e;(0,a.removeElementFromParent)(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},r.prototype._initCanvas=function(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},r.prototype.onOptionsChanged=function(){},r.prototype.onBlur=function(){},r.prototype.onFocus=function(){},r.prototype.onCursorMove=function(){},r.prototype.onGridChanged=function(e,t){},r.prototype.onSelectionChanged=function(e,t,i){i===void 0&&(i=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i},r.prototype.setColors=function(e){this._refreshCharAtlas(e)},r.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},r.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,_.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},r.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},r.prototype.clearTextureAtlas=function(){var e;(e=this._charAtlas)===null||e===void 0||e.clear()},r.prototype._fillCells=function(e,t,i,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight)},r.prototype._fillMiddleLineAtCells=function(e,t,i){i===void 0&&(i=1);var n=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-n-window.devicePixelRatio,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillBottomLineAtCells=function(e,t,i){i===void 0&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},r.prototype._strokeRectAtCell=function(e,t,i,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},r.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},r.prototype._clearCells=function(e,t,i,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight))},r.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=d.TEXT_BASELINE,this._clipRow(i);var n=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(n=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),n||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},r.prototype._drawChars=function(e,t,i){var n,l,c,y=this._getContrastColor(e,t,i);if(y||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,i,y);else{var C,g;e.isInverse()?(C=e.isBgDefault()?d.INVERTED_DEFAULT_COLOR:e.getBgColor(),g=e.isFgDefault()?d.INVERTED_DEFAULT_COLOR:e.getFgColor()):(g=e.isBgDefault()?u.DEFAULT_COLOR:e.getBgColor(),C=e.isFgDefault()?u.DEFAULT_COLOR:e.getFgColor()),C+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&C<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||u.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||u.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=g,this._currentGlyphIdentifier.fg=C,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var S=!1;try{for(var w=f(this._decorationService.getDecorationsAtCell(t,i)),R=w.next();!R.done;R=w.next()){var L=R.value;if(L.backgroundColorRGB||L.foregroundColorRGB){S=!0;break}}}catch(k){n={error:k}}finally{try{R&&!R.done&&(l=w.return)&&l.call(w)}finally{if(n)throw n.error}}!S&&(!((c=this._charAtlas)===null||c===void 0)&&c.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,i)}},r.prototype._drawUncachedChars=function(e,t,i,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=d.TEXT_BASELINE,e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=s.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var c=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=d.DIM_OPACITY);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},r.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},r.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},r.prototype._getContrastColor=function(e,t,i){var n,l,c,y,C=!1;try{for(var g=f(this._decorationService.getDecorationsAtCell(t,i)),S=g.next();!S.done;S=g.next()){var w=S.value;w.options.layer!=="top"&&C||(w.backgroundColorRGB&&(c=w.backgroundColorRGB.rgba),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba),C=w.options.layer==="top")}}catch($){n={error:$}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(n)throw n.error}}if(C||this._colors.selectionForeground&&this._isCellInSelection(t,i)&&(y=this._colors.selectionForeground.rgba),c||y||this._optionsService.rawOptions.minimumContrastRatio!==1&&!(0,v.excludeFromContrastRatioDemands)(e.getCode())){if(!c&&!y){var R=this._colors.contrastCache.getColor(e.bg,e.fg);if(R!==void 0)return R||void 0}var L=e.getFgColor(),k=e.getFgColorMode(),E=e.getBgColor(),x=e.getBgColorMode(),M=!!e.isInverse(),T=!!e.isInverse();if(M){var U=L;L=E,E=U;var q=k;k=x,x=q}var F=this._resolveBackgroundRgba(c!==void 0?50331648:x,c??E,M),z=this._resolveForegroundRgba(k,L,M,T),N=s.rgba.ensureContrastRatio(c??F,y??z,this._optionsService.rawOptions.minimumContrastRatio);if(!N){if(!y)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);N=y}var A={css:s.channels.toCss(N>>24&255,N>>16&255,N>>8&255),rgba:N};return c||y||this._colors.contrastCache.setColor(e.bg,e.fg,A),A}},r.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},r.prototype._resolveForegroundRgba=function(e,t,i,n){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&n&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},r.prototype._isCellInSelection=function(e,t){var i=this._selectionStart,n=this._selectionEnd;return!(!i||!n)&&(this._columnSelectMode?e>=i[0]&&t>=i[1]&&e<n[0]&&t<n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0])},r}();o.BaseRenderLayer=h},2512:function(P,o,b){var f,u=this&&this.__extends||(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},f(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}f(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),d=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,y=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(y=(c<3?l(y):c>3?l(t,i,y):l(t,i))||y);return c>3&&y&&Object.defineProperty(t,i,y),y},_=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var m=b(1546),v=b(511),s=b(2585),a=b(4725),p=600,h=function(e){function t(i,n,l,c,y,C,g,S,w,R){var L=e.call(this,i,"cursor",n,!0,l,c,C,g,R)||this;return L._onRequestRedraw=y,L._coreService=S,L._coreBrowserService=w,L._cell=new v.CellData,L._state={x:0,y:0,isFocused:!1,style:"",width:0},L._cursorRenderers={bar:L._renderBarCursor.bind(L),block:L._renderBlockCursor.bind(L),underline:L._renderUnderlineCursor.bind(L)},L}return u(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(i){e.prototype.resize.call(this,i),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var i;this._clearCursor(),(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var i,n=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new r(this._coreBrowserService.isFocused,function(){n._render(!0)})):((i=this._cursorBlinkStateManager)===null||i===void 0||i.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation()},t.prototype.onGridChanged=function(i,n){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(i){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=n-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)this._clearCursor();else{var c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(n).loadCell(c,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var y=this._optionsService.rawOptions.cursorStyle;return y&&y!=="block"?this._cursorRenderers[y](c,l,this._cell):this._renderBlurCursor(c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=y,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===c&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},t.prototype._renderBarCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(i,n,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(i,n,l.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(l,i,n),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(i,n),this._ctx.restore()},t.prototype._renderBlurCursor=function(i,n,l){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(i,n,l.getWidth(),1),this._ctx.restore()},d([_(5,s.IBufferService),_(6,s.IOptionsService),_(7,s.ICoreService),_(8,a.ICoreBrowserService),_(9,s.IDecorationService)],t)}(m.BaseRenderLayer);o.CursorRenderLayer=h;var r=function(){function e(t,i){this._renderCallback=i,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=void 0})))},e.prototype._restartInterval=function(t){var i=this;t===void 0&&(t=p),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(i._animationTimeRestarted){var n=p-(Date.now()-i._animationTimeRestarted);if(i._animationTimeRestarted=void 0,n>0)return void i._restartInterval(n)}i.isCursorVisible=!1,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0}),i._blinkInterval=window.setInterval(function(){if(i._animationTimeRestarted){var l=p-(Date.now()-i._animationTimeRestarted);return i._animationTimeRestarted=void 0,void i._restartInterval(l)}i.isCursorVisible=!i.isCursorVisible,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})},p)},t)},e.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(P,o,b){var f,u,d,_,m,v,s,a,p,h,r,e,t,i,n,l,c,y,C,g,S,w,R,L,k,E,x,M,T,U,q,F,z,N,A,$,J,oe,B,ne,X,W,O,D,j,V,Y,te,ae,he,ue,K,fe,ge,xe,Fe,Nt,zt,Kt,Gt,Vt,Yt,Ke,Ge,Ve,Ye,Ze,Xe,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,dt,_t,pt,vt,yt,gt,mt,bt,St,Ct,wt,Lt,xt,Et,kt,Rt,At,Mt,Ot,Dt,Tt,Bt,Pt,It,Ht,jt,Ft,Wt,Zt,Xt,Jt,$t,Qt,er,tr,rr,ir,nr,or,sr,ar,cr,lr,hr,gr=this&&this.__read||function(I,H){var de=typeof Symbol=="function"&&I[Symbol.iterator];if(!de)return I;var me,Ee,Se=de.call(I),le=[];try{for(;(H===void 0||H-- >0)&&!(me=Se.next()).done;)le.push(me.value)}catch(Ce){Ee={error:Ce}}finally{try{me&&!me.done&&(de=Se.return)&&de.call(Se)}finally{if(Ee)throw Ee.error}}return le},ur=this&&this.__values||function(I){var H=typeof Symbol=="function"&&Symbol.iterator,de=H&&I[H],me=0;if(de)return de.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&me>=I.length&&(I=void 0),{value:I&&I[me++],done:!I}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.powerlineDefinitions=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;var mr=b(1752);o.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var Nr={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"─":(f={},f[1]="M0,.5 L1,.5",f),"━":(u={},u[3]="M0,.5 L1,.5",u),"│":(d={},d[1]="M.5,0 L.5,1",d),"┃":(_={},_[3]="M.5,0 L.5,1",_),"┌":(m={},m[1]="M0.5,1 L.5,.5 L1,.5",m),"┏":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"┐":(s={},s[1]="M0,.5 L.5,.5 L.5,1",s),"┓":(a={},a[3]="M0,.5 L.5,.5 L.5,1",a),"└":(p={},p[1]="M.5,0 L.5,.5 L1,.5",p),"┗":(h={},h[3]="M.5,0 L.5,.5 L1,.5",h),"┘":(r={},r[1]="M.5,0 L.5,.5 L0,.5",r),"┛":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"├":(t={},t[1]="M.5,0 L.5,1 M.5,.5 L1,.5",t),"┣":(i={},i[3]="M.5,0 L.5,1 M.5,.5 L1,.5",i),"┤":(n={},n[1]="M.5,0 L.5,1 M.5,.5 L0,.5",n),"┫":(l={},l[3]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"┬":(c={},c[1]="M0,.5 L1,.5 M.5,.5 L.5,1",c),"┳":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,1",y),"┴":(C={},C[1]="M0,.5 L1,.5 M.5,.5 L.5,0",C),"┻":(g={},g[3]="M0,.5 L1,.5 M.5,.5 L.5,0",g),"┼":(S={},S[1]="M0,.5 L1,.5 M.5,0 L.5,1",S),"╋":(w={},w[3]="M0,.5 L1,.5 M.5,0 L.5,1",w),"╴":(R={},R[1]="M.5,.5 L0,.5",R),"╸":(L={},L[3]="M.5,.5 L0,.5",L),"╵":(k={},k[1]="M.5,.5 L.5,0",k),"╹":(E={},E[3]="M.5,.5 L.5,0",E),"╶":(x={},x[1]="M.5,.5 L1,.5",x),"╺":(M={},M[3]="M.5,.5 L1,.5",M),"╷":(T={},T[1]="M.5,.5 L.5,1",T),"╻":(U={},U[3]="M.5,.5 L.5,1",U),"═":(q={},q[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},q),"║":(F={},F[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},F),"╒":(z={},z[1]=function(I,H){return"M.5,1 L.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},z),"╓":(N={},N[1]=function(I,H){return"M"+(.5-I)+",1 L"+(.5-I)+",.5 L1,.5 M"+(.5+I)+",.5 L"+(.5+I)+",1"},N),"╔":(A={},A[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},A),"╕":($={},$[1]=function(I,H){return"M0,"+(.5-H)+" L.5,"+(.5-H)+" L.5,1 M0,"+(.5+H)+" L.5,"+(.5+H)},$),"╖":(J={},J[1]=function(I,H){return"M"+(.5+I)+",1 L"+(.5+I)+",.5 L0,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1"},J),"╗":(oe={},oe[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",1"},oe),"╘":(B={},B[1]=function(I,H){return"M.5,0 L.5,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5-H)+" L1,"+(.5-H)},B),"╙":(ne={},ne[1]=function(I,H){return"M1,.5 L"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},ne),"╚":(X={},X[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0 M1,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",0"},X),"╛":(W={},W[1]=function(I,H){return"M0,"+(.5+H)+" L.5,"+(.5+H)+" L.5,0 M0,"+(.5-H)+" L.5,"+(.5-H)},W),"╜":(O={},O[1]=function(I,H){return"M0,.5 L"+(.5+I)+",.5 L"+(.5+I)+",0 M"+(.5-I)+",.5 L"+(.5-I)+",0"},O),"╝":(D={},D[1]=function(I,H){return"M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M0,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",0"},D),"╞":(j={},j[1]=function(I,H){return"M.5,0 L.5,1 M.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},j),"╟":(V={},V[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1 M"+(.5+I)+",.5 L1,.5"},V),"╠":(Y={},Y[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Y),"╡":(te={},te[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L.5,"+(.5-H)+" M0,"+(.5+H)+" L.5,"+(.5+H)},te),"╢":(ae={},ae[1]=function(I,H){return"M0,.5 L"+(.5-I)+",.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},ae),"╣":(he={},he[1]=function(I,H){return"M"+(.5+I)+",0 L"+(.5+I)+",1 M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0"},he),"╤":(ue={},ue[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5+H)+" L.5,1"},ue),"╥":(K={},K[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1 M"+(.5+I)+",.5 L"+(.5+I)+",1"},K),"╦":(fe={},fe[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},fe),"╧":(ge={},ge[1]=function(I,H){return"M.5,0 L.5,"+(.5-H)+" M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},ge),"╨":(xe={},xe[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},xe),"╩":(Fe={},Fe[1]=function(I,H){return"M0,"+(.5+H)+" L1,"+(.5+H)+" M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Fe),"╪":(Nt={},Nt[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},Nt),"╫":(zt={},zt[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},zt),"╬":(Kt={},Kt[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Kt),"╱":(Gt={},Gt[1]="M1,0 L0,1",Gt),"╲":(Vt={},Vt[1]="M0,0 L1,1",Vt),"╳":(Yt={},Yt[1]="M1,0 L0,1 M0,0 L1,1",Yt),"╼":(Ke={},Ke[1]="M.5,.5 L0,.5",Ke[3]="M.5,.5 L1,.5",Ke),"╽":(Ge={},Ge[1]="M.5,.5 L.5,0",Ge[3]="M.5,.5 L.5,1",Ge),"╾":(Ve={},Ve[1]="M.5,.5 L1,.5",Ve[3]="M.5,.5 L0,.5",Ve),"╿":(Ye={},Ye[1]="M.5,.5 L.5,1",Ye[3]="M.5,.5 L.5,0",Ye),"┍":(Ze={},Ze[1]="M.5,.5 L.5,1",Ze[3]="M.5,.5 L1,.5",Ze),"┎":(Xe={},Xe[1]="M.5,.5 L1,.5",Xe[3]="M.5,.5 L.5,1",Xe),"┑":(Je={},Je[1]="M.5,.5 L.5,1",Je[3]="M.5,.5 L0,.5",Je),"┒":($e={},$e[1]="M.5,.5 L0,.5",$e[3]="M.5,.5 L.5,1",$e),"┕":(Qe={},Qe[1]="M.5,.5 L.5,0",Qe[3]="M.5,.5 L1,.5",Qe),"┖":(et={},et[1]="M.5,.5 L1,.5",et[3]="M.5,.5 L.5,0",et),"┙":(tt={},tt[1]="M.5,.5 L.5,0",tt[3]="M.5,.5 L0,.5",tt),"┚":(rt={},rt[1]="M.5,.5 L0,.5",rt[3]="M.5,.5 L.5,0",rt),"┝":(it={},it[1]="M.5,0 L.5,1",it[3]="M.5,.5 L1,.5",it),"┞":(nt={},nt[1]="M0.5,1 L.5,.5 L1,.5",nt[3]="M.5,.5 L.5,0",nt),"┟":(ot={},ot[1]="M.5,0 L.5,.5 L1,.5",ot[3]="M.5,.5 L.5,1",ot),"┠":(st={},st[1]="M.5,.5 L1,.5",st[3]="M.5,0 L.5,1",st),"┡":(at={},at[1]="M.5,.5 L.5,1",at[3]="M.5,0 L.5,.5 L1,.5",at),"┢":(ct={},ct[1]="M.5,.5 L.5,0",ct[3]="M0.5,1 L.5,.5 L1,.5",ct),"┥":(lt={},lt[1]="M.5,0 L.5,1",lt[3]="M.5,.5 L0,.5",lt),"┦":(ht={},ht[1]="M0,.5 L.5,.5 L.5,1",ht[3]="M.5,.5 L.5,0",ht),"┧":(ut={},ut[1]="M.5,0 L.5,.5 L0,.5",ut[3]="M.5,.5 L.5,1",ut),"┨":(ft={},ft[1]="M.5,.5 L0,.5",ft[3]="M.5,0 L.5,1",ft),"┩":(dt={},dt[1]="M.5,.5 L.5,1",dt[3]="M.5,0 L.5,.5 L0,.5",dt),"┪":(_t={},_t[1]="M.5,.5 L.5,0",_t[3]="M0,.5 L.5,.5 L.5,1",_t),"┭":(pt={},pt[1]="M0.5,1 L.5,.5 L1,.5",pt[3]="M.5,.5 L0,.5",pt),"┮":(vt={},vt[1]="M0,.5 L.5,.5 L.5,1",vt[3]="M.5,.5 L1,.5",vt),"┯":(yt={},yt[1]="M.5,.5 L.5,1",yt[3]="M0,.5 L1,.5",yt),"┰":(gt={},gt[1]="M0,.5 L1,.5",gt[3]="M.5,.5 L.5,1",gt),"┱":(mt={},mt[1]="M.5,.5 L1,.5",mt[3]="M0,.5 L.5,.5 L.5,1",mt),"┲":(bt={},bt[1]="M.5,.5 L0,.5",bt[3]="M0.5,1 L.5,.5 L1,.5",bt),"┵":(St={},St[1]="M.5,0 L.5,.5 L1,.5",St[3]="M.5,.5 L0,.5",St),"┶":(Ct={},Ct[1]="M.5,0 L.5,.5 L0,.5",Ct[3]="M.5,.5 L1,.5",Ct),"┷":(wt={},wt[1]="M.5,.5 L.5,0",wt[3]="M0,.5 L1,.5",wt),"┸":(Lt={},Lt[1]="M0,.5 L1,.5",Lt[3]="M.5,.5 L.5,0",Lt),"┹":(xt={},xt[1]="M.5,.5 L1,.5",xt[3]="M.5,0 L.5,.5 L0,.5",xt),"┺":(Et={},Et[1]="M.5,.5 L0,.5",Et[3]="M.5,0 L.5,.5 L1,.5",Et),"┽":(kt={},kt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",kt[3]="M.5,.5 L0,.5",kt),"┾":(Rt={},Rt[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Rt[3]="M.5,.5 L1,.5",Rt),"┿":(At={},At[1]="M.5,0 L.5,1",At[3]="M0,.5 L1,.5",At),"╀":(Mt={},Mt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Mt[3]="M.5,.5 L.5,0",Mt),"╁":(Ot={},Ot[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Ot[3]="M.5,.5 L.5,1",Ot),"╂":(Dt={},Dt[1]="M0,.5 L1,.5",Dt[3]="M.5,0 L.5,1",Dt),"╃":(Tt={},Tt[1]="M0.5,1 L.5,.5 L1,.5",Tt[3]="M.5,0 L.5,.5 L0,.5",Tt),"╄":(Bt={},Bt[1]="M0,.5 L.5,.5 L.5,1",Bt[3]="M.5,0 L.5,.5 L1,.5",Bt),"╅":(Pt={},Pt[1]="M.5,0 L.5,.5 L1,.5",Pt[3]="M0,.5 L.5,.5 L.5,1",Pt),"╆":(It={},It[1]="M.5,0 L.5,.5 L0,.5",It[3]="M0.5,1 L.5,.5 L1,.5",It),"╇":(Ht={},Ht[1]="M.5,.5 L.5,1",Ht[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ht),"╈":(jt={},jt[1]="M.5,.5 L.5,0",jt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",jt),"╉":(Ft={},Ft[1]="M.5,.5 L1,.5",Ft[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Ft),"╊":(Wt={},Wt[1]="M.5,.5 L0,.5",Wt[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Wt),"╌":(Zt={},Zt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Zt),"╍":(Xt={},Xt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Xt),"┄":(Jt={},Jt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Jt),"┅":($t={},$t[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",$t),"┈":(Qt={},Qt[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",Qt),"┉":(er={},er[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",er),"╎":(tr={},tr[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",tr),"╏":(rr={},rr[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",rr),"┆":(ir={},ir[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",ir),"┇":(nr={},nr[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",nr),"┊":(or={},or[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",or),"┋":(sr={},sr[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",sr),"╭":(ar={},ar[1]="C.5,1,.5,.5,1,.5",ar),"╮":(cr={},cr[1]="C.5,1,.5,.5,0,.5",cr),"╯":(lr={},lr[1]="C.5,0,.5,.5,0,.5",lr),"╰":(hr={},hr[1]="C.5,0,.5,.5,1,.5",hr)},o.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0},"":{d:"M0,0 L1,.5 L0,1",type:1,horizontalPadding:.5},"":{d:"M1,0 L0,.5 L1,1",type:0},"":{d:"M1,0 L0,.5 L1,1",type:1,horizontalPadding:.5}},o.tryDrawCustomChar=function(I,H,de,me,Ee,Se){var le=o.blockElementDefinitions[H];if(le)return function(se,be,Ie,He,Te,Be){for(var _e=0;_e<be.length;_e++){var pe=be[_e],ie=Te/8,ve=Be/8;se.fillRect(Ie+pe.x*ie,He+pe.y*ve,pe.w*ie,pe.h*ve)}}(I,le,de,me,Ee,Se),!0;var Ce=Nr[H];if(Ce)return function(se,be,Ie,He,Te,Be){var _e,pe=br.get(be);pe||(pe=new Map,br.set(be,pe));var ie=se.fillStyle;if(typeof ie!="string")throw new Error('Unexpected fillStyle type "'+ie+'"');var ve=pe.get(ie);if(!ve){var ye=be[0].length,we=be.length,Re=document.createElement("canvas");Re.width=ye,Re.height=we;var je=(0,mr.throwIfFalsy)(Re.getContext("2d")),Le=new ImageData(ye,we),We=void 0,Pe=void 0,Oe=void 0,Ue=void 0;if(ie.startsWith("#"))We=parseInt(ie.slice(1,3),16),Pe=parseInt(ie.slice(3,5),16),Oe=parseInt(ie.slice(5,7),16),Ue=ie.length>7&&parseInt(ie.slice(7,9),16)||1;else{if(!ie.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+ie+'" when drawing pattern glyph');We=(_e=gr(ie.substring(5,ie.length-1).split(",").map(function(Ne){return parseFloat(Ne)}),4))[0],Pe=_e[1],Oe=_e[2],Ue=_e[3]}for(var Ae=0;Ae<we;Ae++)for(var Me=0;Me<ye;Me++)Le.data[4*(Ae*ye+Me)]=We,Le.data[4*(Ae*ye+Me)+1]=Pe,Le.data[4*(Ae*ye+Me)+2]=Oe,Le.data[4*(Ae*ye+Me)+3]=be[Ae][Me]*(255*Ue);je.putImageData(Le,0,0),ve=(0,mr.throwIfFalsy)(se.createPattern(Re,null)),pe.set(ie,ve)}se.fillStyle=ve,se.fillRect(Ie,He,Te,Be)}(I,Ce,de,me,Ee,Se),!0;var ke=o.boxDrawingDefinitions[H];if(ke)return function(se,be,Ie,He,Te,Be){var _e,pe,ie,ve;se.strokeStyle=se.fillStyle;try{for(var ye=ur(Object.entries(be)),we=ye.next();!we.done;we=ye.next()){var Re=gr(we.value,2),je=Re[0],Le=Re[1];se.beginPath(),se.lineWidth=window.devicePixelRatio*Number.parseInt(je);var We=void 0;We=typeof Le=="function"?Le(.15,.15/Be*Te):Le;try{for(var Pe=(ie=void 0,ur(We.split(" "))),Oe=Pe.next();!Oe.done;Oe=Pe.next()){var Ue=Oe.value,Ae=Ue[0],Me=Cr[Ae];if(Me){var Ne=Ue.substring(1).split(",");Ne[0]&&Ne[1]&&Me(se,wr(Ne,Te,Be,Ie,He))}else console.error('Could not find drawing instructions for "'+Ae+'"')}}catch(fr){ie={error:fr}}finally{try{Oe&&!Oe.done&&(ve=Pe.return)&&ve.call(Pe)}finally{if(ie)throw ie.error}}se.stroke(),se.closePath()}}catch(fr){_e={error:fr}}finally{try{we&&!we.done&&(pe=ye.return)&&pe.call(ye)}finally{if(_e)throw _e.error}}}(I,ke,de,me,Ee,Se),!0;var qe=o.powerlineDefinitions[H];return!!qe&&(function(se,be,Ie,He,Te,Be){var _e,pe;se.beginPath(),se.lineWidth=window.devicePixelRatio;try{for(var ie=ur(be.d.split(" ")),ve=ie.next();!ve.done;ve=ie.next()){var ye=ve.value,we=ye[0],Re=Cr[we];if(Re){var je=ye.substring(1).split(",");je[0]&&je[1]&&Re(se,wr(je,Te,Be,Ie,He,be.horizontalPadding))}else console.error('Could not find drawing instructions for "'+we+'"')}}catch(Le){_e={error:Le}}finally{try{ve&&!ve.done&&(pe=ie.return)&&pe.call(ie)}finally{if(_e)throw _e.error}}be.type===1?(se.strokeStyle=se.fillStyle,se.stroke()):se.fill(),se.closePath()}(I,qe,de,me,Ee,Se),!0)};var br=new Map;function Sr(I,H,de){return Math.max(Math.min(I,H),de)}var Cr={C:function(I,H){return I.bezierCurveTo(H[0],H[1],H[2],H[3],H[4],H[5])},L:function(I,H){return I.lineTo(H[0],H[1])},M:function(I,H){return I.moveTo(H[0],H[1])}};function wr(I,H,de,me,Ee,Se){Se===void 0&&(Se=0);var le=I.map(function(qe){return parseFloat(qe)||parseInt(qe)});if(le.length<2)throw new Error("Too few arguments for instruction");for(var Ce=0;Ce<le.length;Ce+=2)le[Ce]*=H-2*Se*window.devicePixelRatio,le[Ce]!==0&&(le[Ce]=Sr(Math.round(le[Ce]+.5)-.5,H,0)),le[Ce]+=me+Se*window.devicePixelRatio;for(var ke=1;ke<le.length;ke+=2)le[ke]*=de,le[ke]!==0&&(le[ke]=Sr(Math.round(le[ke]+.5)-.5,de,0)),le[ke]+=Ee;return le}},3700:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var b=function(){function f(){this.cache=[]}return f.prototype.resize=function(u,d){for(var _=0;_<u;_++){this.cache.length<=_&&this.cache.push([]);for(var m=this.cache[_].length;m<d;m++)this.cache[_].push(void 0);this.cache[_].length=d}this.cache.length=u},f.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0},f}();o.GridCache=b},5098:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var m=b(1546),v=b(8803),s=b(2040),a=b(2585),p=function(h){function r(e,t,i,n,l,c,y,C,g){var S=h.call(this,e,"link",t,!0,i,n,y,C,g)||this;return l.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),l.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),c.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),c.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),S}return u(r,h),r.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state=void 0},r.prototype.reset=function(){this._clearCurrentLink()},r.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},r.prototype._onShowLinkUnderline=function(e){if(e.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,s.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},r.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},d([_(6,a.IBufferService),_(7,a.IOptionsService),_(8,a.IDecorationService)],r)}(m.BaseRenderLayer);o.LinkRenderLayer=p},3525:function(P,o,b){var f,u=this&&this.__extends||(f=function(c,y){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,g){C.__proto__=g}||function(C,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(C[S]=g[S])},f(c,y)},function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function C(){this.constructor=c}f(c,y),c.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)}),d=this&&this.__decorate||function(c,y,C,g){var S,w=arguments.length,R=w<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,C):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(c,y,C,g);else for(var L=c.length-1;L>=0;L--)(S=c[L])&&(R=(w<3?S(R):w>3?S(y,C,R):S(y,C))||R);return w>3&&R&&Object.defineProperty(y,C,R),R},_=this&&this.__param||function(c,y){return function(C,g){y(C,g,c)}},m=this&&this.__values||function(c){var y=typeof Symbol=="function"&&Symbol.iterator,C=y&&c[y],g=0;if(C)return C.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&g>=c.length&&(c=void 0),{value:c&&c[g++],done:!c}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var v=b(9596),s=b(4149),a=b(2512),p=b(5098),h=b(844),r=b(4725),e=b(2585),t=b(1420),i=b(8460),n=1,l=function(c){function y(C,g,S,w,R,L,k,E){var x=c.call(this)||this;x._colors=C,x._screenElement=g,x._bufferService=L,x._charSizeService=k,x._optionsService=E,x._id=n++,x._onRequestRedraw=new i.EventEmitter;var M=x._optionsService.rawOptions.allowTransparency;return x._renderLayers=[R.createInstance(v.TextRenderLayer,x._screenElement,0,x._colors,M,x._id),R.createInstance(s.SelectionRenderLayer,x._screenElement,1,x._colors,x._id),R.createInstance(p.LinkRenderLayer,x._screenElement,2,x._colors,x._id,S,w),R.createInstance(a.CursorRenderLayer,x._screenElement,3,x._colors,x._id,x._onRequestRedraw)],x.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},x._devicePixelRatio=window.devicePixelRatio,x._updateDimensions(),x.onOptionsChanged(),x}return u(y,c),Object.defineProperty(y.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){var C,g;try{for(var S=m(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.dispose()}catch(R){C={error:R}}finally{try{w&&!w.done&&(g=S.return)&&g.call(S)}finally{if(C)throw C.error}}c.prototype.dispose.call(this),(0,t.removeTerminalFromCache)(this._id)},y.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},y.prototype.setColors=function(C){var g,S;this._colors=C;try{for(var w=m(this._renderLayers),R=w.next();!R.done;R=w.next()){var L=R.value;L.setColors(this._colors),L.reset()}}catch(k){g={error:k}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(g)throw g.error}}},y.prototype.onResize=function(C,g){var S,w;this._updateDimensions();try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.resize(this.dimensions)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},y.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},y.prototype.onBlur=function(){this._runOperation(function(C){return C.onBlur()})},y.prototype.onFocus=function(){this._runOperation(function(C){return C.onFocus()})},y.prototype.onSelectionChanged=function(C,g,S){S===void 0&&(S=!1),this._runOperation(function(w){return w.onSelectionChanged(C,g,S)}),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},y.prototype.onCursorMove=function(){this._runOperation(function(C){return C.onCursorMove()})},y.prototype.onOptionsChanged=function(){this._runOperation(function(C){return C.onOptionsChanged()})},y.prototype.clear=function(){this._runOperation(function(C){return C.reset()})},y.prototype._runOperation=function(C){var g,S;try{for(var w=m(this._renderLayers),R=w.next();!R.done;R=w.next())C(R.value)}catch(L){g={error:L}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(g)throw g.error}}},y.prototype.renderRows=function(C,g){var S,w;try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.onGridChanged(C,g)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}},y.prototype.clearTextureAtlas=function(){var C,g;try{for(var S=m(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.clearTextureAtlas()}catch(R){C={error:R}}finally{try{w&&!w.done&&(g=S.return)&&g.call(S)}finally{if(C)throw C.error}}},y.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},d([_(4,e.IInstantiationService),_(5,e.IBufferService),_(6,r.ICharSizeService),_(7,e.IOptionsService)],y)}(h.Disposable);o.Renderer=l},1752:(P,o)=>{function b(f){return 57508<=f&&f<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.excludeFromContrastRatioDemands=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},o.isPowerlineGlyph=b,o.excludeFromContrastRatioDemands=function(f){return b(f)||function(u){return 9472<=u&&u<=9631}(f)}},4149:function(P,o,b){var f,u=this&&this.__extends||(f=function(a,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(h[e]=r[e])},f(a,p)},function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function h(){this.constructor=a}f(a,p),a.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}),d=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},_=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var m=b(1546),v=b(2585),s=function(a){function p(h,r,e,t,i,n,l){var c=a.call(this,h,"selection",r,!0,e,t,i,n,l)||this;return c._clearState(),c}return u(p,a),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(h){a.prototype.resize.call(this,h),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(h,r,e){if(a.prototype.onSelectionChanged.call(this,h,r,e),this._didStateChange(h,r,e,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var t=h[1]-this._bufferService.buffer.ydisp,i=r[1]-this._bufferService.buffer.ydisp,n=Math.max(t,0),l=Math.min(i,this._bufferService.rows-1);if(n>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var c=h[0],y=r[0]-c,C=l-n+1;this._fillCells(c,n,y,C)}else{c=t===n?h[0]:0;var g=n===i?r[0]:this._bufferService.cols;this._fillCells(c,n,g-c,1);var S=Math.max(l-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,S),n!==l){var w=i===l?r[0]:this._bufferService.cols;this._fillCells(0,l,w,1)}}this._state.start=[h[0],h[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(h,r,e,t){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||e!==this._state.columnSelectMode||t!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},d([_(4,v.IBufferService),_(5,v.IOptionsService),_(6,v.IDecorationService)],p)}(m.BaseRenderLayer);o.SelectionRenderLayer=s},9596:function(P,o,b){var f,u=this&&this.__extends||(f=function(n,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(c[C]=y[C])},f(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}f(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),d=this&&this.__decorate||function(n,l,c,y){var C,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,c):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,y);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(g<3?C(S):g>3?C(l,c,S):C(l,c))||S);return g>3&&S&&Object.defineProperty(l,c,S),S},_=this&&this.__param||function(n,l){return function(c,y){l(c,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],y=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var v=b(3700),s=b(1546),a=b(3734),p=b(643),h=b(511),r=b(2585),e=b(4725),t=b(4269),i=function(n){function l(c,y,C,g,S,w,R,L,k){var E=n.call(this,c,"text",y,g,C,S,w,R,k)||this;return E._characterJoinerService=L,E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new h.CellData,E._state=new v.GridCache,E}return u(l,n),l.prototype.resize=function(c){n.prototype.resize.call(this,c);var y=this._getFont(!1,!1);this._characterWidth===c.scaledCharWidth&&this._characterFont===y||(this._characterWidth=c.scaledCharWidth,this._characterFont=y,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(c,y,C){for(var g=c;g<=y;g++)for(var S=g+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.lines.get(S),R=this._characterJoinerService.getJoinedCharacters(S),L=0;L<this._bufferService.cols;L++){w.loadCell(L,this._workCell);var k=this._workCell,E=!1,x=L;if(k.getWidth()!==0){if(R.length>0&&L===R[0][0]){E=!0;var M=R.shift();k=new t.JoinedCellData(this._workCell,w.translateToString(!0,M[0],M[1]),M[1]-M[0]),x=M[1]-1}!E&&this._isOverlapping(k)&&x<w.length-1&&w.getCodePoint(x+1)===p.NULL_CELL_CODE&&(k.content&=-12582913,k.content|=2<<22),C(k,L,g),L=x}}},l.prototype._drawBackground=function(c,y){var C=this,g=this._ctx,S=this._bufferService.cols,w=0,R=0,L=null;g.save(),this._forEachCell(c,y,function(k,E,x){var M,T,U=null;k.isInverse()?U=k.isFgDefault()?C._colors.foreground.css:k.isFgRGB()?"rgb("+a.AttributeData.toColorRGB(k.getFgColor()).join(",")+")":C._colors.ansi[k.getFgColor()].css:k.isBgRGB()?U="rgb("+a.AttributeData.toColorRGB(k.getBgColor()).join(",")+")":k.isBgPalette()&&(U=C._colors.ansi[k.getBgColor()].css);var q=!1;try{for(var F=m(C._decorationService.getDecorationsAtCell(E,C._bufferService.buffer.ydisp+x)),z=F.next();!z.done;z=F.next()){var N=z.value;N.options.layer!=="top"&&q||(N.backgroundColorRGB&&(U=N.backgroundColorRGB.css),q=N.options.layer==="top")}}catch(A){M={error:A}}finally{try{z&&!z.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}L===null&&(w=E,R=x),x!==R?(g.fillStyle=L||"",C._fillCells(w,R,S-w,1),w=E,R=x):L!==U&&(g.fillStyle=L||"",C._fillCells(w,R,E-w,1),w=E,R=x),L=U}),L!==null&&(g.fillStyle=L,this._fillCells(w,R,S-w,1)),g.restore()},l.prototype._drawForeground=function(c,y){var C=this;this._forEachCell(c,y,function(g,S,w){if(!g.isInvisible()&&(C._drawChars(g,S,w),g.isUnderline()||g.isStrikethrough())){if(C._ctx.save(),g.isInverse())if(g.isBgDefault())C._ctx.fillStyle=C._colors.background.css;else if(g.isBgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(g.getBgColor()).join(",")+")";else{var R=g.getBgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&R<8&&(R+=8),C._ctx.fillStyle=C._colors.ansi[R].css}else if(g.isFgDefault())C._ctx.fillStyle=C._colors.foreground.css;else if(g.isFgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(g.getFgColor()).join(",")+")";else{var L=g.getFgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&L<8&&(L+=8),C._ctx.fillStyle=C._colors.ansi[L].css}g.isStrikethrough()&&C._fillMiddleLineAtCells(S,w,g.getWidth()),g.isUnderline()&&C._fillBottomLineAtCells(S,w,g.getWidth()),C._ctx.restore()}})},l.prototype.onGridChanged=function(c,y){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,c,this._bufferService.cols,y-c+1),this._drawBackground(c,y),this._drawForeground(c,y))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},l.prototype._isOverlapping=function(c){if(c.getWidth()!==1||c.getCode()<256)return!1;var y=c.getChars();if(this._characterOverlapCache.hasOwnProperty(y))return this._characterOverlapCache[y];this._ctx.save(),this._ctx.font=this._characterFont;var C=Math.floor(this._ctx.measureText(y).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[y]=C,C},d([_(5,r.IBufferService),_(6,r.IOptionsService),_(7,e.ICharacterJoinerService),_(8,r.IDecorationService)],l)}(s.BaseRenderLayer);o.TextRenderLayer=i},9616:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var b=function(){function f(){this._didWarmUp=!1}return f.prototype.dispose=function(){},f.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},f.prototype._doWarmUp=function(){},f.prototype.clear=function(){},f.prototype.beginFrame=function(){},f}();o.BaseCharAtlas=b},1420:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var f=b(2040),u=b(1906),d=[];o.acquireCharAtlas=function(_,m,v,s,a){for(var p=(0,f.generateConfig)(s,a,_,v),h=0;h<d.length;h++){var r=(e=d[h]).ownedBy.indexOf(m);if(r>=0){if((0,f.configEquals)(e.config,p))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),d.splice(h,1)):e.ownedBy.splice(r,1);break}}for(h=0;h<d.length;h++){var e=d[h];if((0,f.configEquals)(e.config,p))return e.ownedBy.push(m),e.atlas}var t={atlas:new u.DynamicCharAtlas(document,p),config:p,ownedBy:[m]};return d.push(t),t.atlas},o.removeTerminalFromCache=function(_){for(var m=0;m<d.length;m++){var v=d[m].ownedBy.indexOf(_);if(v!==-1){d[m].ownedBy.length===1?(d[m].atlas.dispose(),d.splice(m,1)):d[m].ownedBy.splice(v,1);break}}}},2040:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var f=b(643);o.generateConfig=function(u,d,_,m){var v={foreground:m.foreground,background:m.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:m.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:u,scaledCharHeight:d,fontFamily:_.fontFamily,fontSize:_.fontSize,fontWeight:_.fontWeight,fontWeightBold:_.fontWeightBold,allowTransparency:_.allowTransparency,colors:v}},o.configEquals=function(u,d){for(var _=0;_<u.colors.ansi.length;_++)if(u.colors.ansi[_].rgba!==d.colors.ansi[_].rgba)return!1;return u.devicePixelRatio===d.devicePixelRatio&&u.fontFamily===d.fontFamily&&u.fontSize===d.fontSize&&u.fontWeight===d.fontWeight&&u.fontWeightBold===d.fontWeightBold&&u.allowTransparency===d.allowTransparency&&u.scaledCharWidth===d.scaledCharWidth&&u.scaledCharHeight===d.scaledCharHeight&&u.colors.foreground===d.colors.foreground&&u.colors.background===d.colors.background},o.is256Color=function(u){return u<f.DEFAULT_COLOR}},8803:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;var f=b(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic",o.CHAR_ATLAS_CELL_SPACING=1},1906:function(P,o,b){var f,u=this&&this.__extends||(f=function(c,y){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,g){C.__proto__=g}||function(C,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(C[S]=g[S])},f(c,y)},function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function C(){this.constructor=c}f(c,y),c.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var d=b(8803),_=b(9616),m=b(5680),v=b(7001),s=b(6114),a=b(1752),p=b(8055),h=1024,r=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function t(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}o.getGlyphCacheKey=t;var i=function(c){function y(C,g){var S=c.call(this)||this;S._config=g,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=C.createElement("canvas"),S._cacheCanvas.width=h,S._cacheCanvas.height=r,S._cacheCtx=(0,a.throwIfFalsy)(S._cacheCanvas.getContext("2d",{alpha:!0}));var w=C.createElement("canvas");w.width=S._config.scaledCharWidth,w.height=S._config.scaledCharHeight,S._tmpCtx=(0,a.throwIfFalsy)(w.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(h/S._config.scaledCharWidth),S._height=Math.floor(r/S._config.scaledCharHeight);var R=S._width*S._height;return S._cacheMap=new v.LRUMap(R),S._cacheMap.prealloc(R),S}return u(y,c),y.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},y.prototype.beginFrame=function(){this._drawToCacheCount=0},y.prototype.clear=function(){if(this._cacheMap.size>0){var C=this._width*this._height;this._cacheMap=new v.LRUMap(C),this._cacheMap.prealloc(C)}this._cacheCtx.clearRect(0,0,h,r),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},y.prototype.draw=function(C,g,S,w){if(g.code===32)return!0;if(!this._canCache(g))return!1;var R=t(g),L=this._cacheMap.get(R);if(L!=null)return this._drawFromCache(C,L,S,w),!0;if(this._drawToCacheCount<100){var k;k=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var E=this._drawToCache(g,k);return this._cacheMap.set(R,E),this._drawFromCache(C,E,S,w),!0}return!1},y.prototype._canCache=function(C){return C.code<256},y.prototype._toCoordinateX=function(C){return C%this._width*this._config.scaledCharWidth},y.prototype._toCoordinateY=function(C){return Math.floor(C/this._width)*this._config.scaledCharHeight},y.prototype._drawFromCache=function(C,g,S,w){if(!g.isEmpty){var R=this._toCoordinateX(g.index),L=this._toCoordinateY(g.index);C.drawImage(g.inBitmap?this._bitmap:this._cacheCanvas,R,L,this._config.scaledCharWidth,this._config.scaledCharHeight,S,w,this._config.scaledCharWidth,this._config.scaledCharHeight)}},y.prototype._getColorFromAnsiIndex=function(C){return C<this._config.colors.ansi.length?this._config.colors.ansi[C]:m.DEFAULT_ANSI_COLORS[C]},y.prototype._getBackgroundColor=function(C){return this._config.allowTransparency?e:C.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:C.bg<256?this._getColorFromAnsiIndex(C.bg):this._config.colors.background},y.prototype._getForegroundColor=function(C){return C.fg===d.INVERTED_DEFAULT_COLOR?p.color.opaque(this._config.colors.background):C.fg<256?this._getColorFromAnsiIndex(C.fg):this._config.colors.foreground},y.prototype._drawToCache=function(C,g){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var w=C.bold?this._config.fontWeightBold:this._config.fontWeight,R=C.italic?"italic":"";this._tmpCtx.font=R+" "+w+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=d.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(C).css,C.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight);var L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),k=!1;if(this._config.allowTransparency||(k=l(L,S)),k&&C.chars==="_"&&!this._config.allowTransparency)for(var E=1;E<=5&&(this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight-E),k=l(L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),S));E++);this._tmpCtx.restore();var x=this._toCoordinateX(g),M=this._toCoordinateY(g);this._cacheCtx.putImageData(L,x,M);var T={index:g,isEmpty:k,inBitmap:!1};return this._addGlyphToBitmap(T),T},y.prototype._addGlyphToBitmap=function(C){var g=this;!("createImageBitmap"in window)||s.isFirefox||s.isSafari||(this._glyphsWaitingOnBitmap.push(C),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return g._generateBitmap()},100)))},y.prototype._generateBitmap=function(){var C=this,g=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){C._bitmap=S;for(var w=0;w<g.length;w++)g[w].inBitmap=!0}),this._bitmapCommitTimeout=null},y}(_.BaseCharAtlas);o.DynamicCharAtlas=i;var n=function(c){function y(C,g){return c.call(this)||this}return u(y,c),y.prototype.draw=function(C,g,S,w){return!1},y}(_.BaseCharAtlas);function l(c,y){for(var C=!0,g=y.rgba>>>24,S=y.rgba>>>16&255,w=y.rgba>>>8&255,R=0;R<c.data.length;R+=4)c.data[R]===g&&c.data[R+1]===S&&c.data[R+2]===w?c.data[R+3]=0:C=!1;return C}o.NoneCharAtlas=n},7001:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var b=function(){function f(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return f.prototype._unlinkNode=function(u){var d=u.prev,_=u.next;u===this._head&&(this._head=_),u===this._tail&&(this._tail=d),d!==null&&(d.next=_),_!==null&&(_.prev=d)},f.prototype._appendNode=function(u){var d=this._tail;d!==null&&(d.next=u),u.prev=d,u.next=null,this._tail=u,this._head===null&&(this._head=u)},f.prototype.prealloc=function(u){for(var d=this._nodePool,_=0;_<u;_++)d.push({prev:null,next:null,key:null,value:null})},f.prototype.get=function(u){var d=this._map[u];return d!==void 0?(this._unlinkNode(d),this._appendNode(d),d.value):null},f.prototype.peekValue=function(u){var d=this._map[u];return d!==void 0?d.value:null},f.prototype.peek=function(){var u=this._head;return u===null?null:u.value},f.prototype.set=function(u,d){var _=this._map[u];if(_!==void 0)_=this._map[u],this._unlinkNode(_),_.value=d;else if(this.size>=this.capacity)_=this._head,this._unlinkNode(_),delete this._map[_.key],_.key=u,_.value=d,this._map[u]=_;else{var m=this._nodePool;m.length>0?((_=m.pop()).key=u,_.value=d):_={prev:null,next:null,key:u,value:d},this._map[u]=_,this.size++}this._appendNode(_)},f}();o.LRUMap=b},1296:function(P,o,b){var f,u=this&&this.__extends||(f=function(g,S){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,R){w.__proto__=R}||function(w,R){for(var L in R)Object.prototype.hasOwnProperty.call(R,L)&&(w[L]=R[L])},f(g,S)},function(g,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function w(){this.constructor=g}f(g,S),g.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}),d=this&&this.__decorate||function(g,S,w,R){var L,k=arguments.length,E=k<3?S:R===null?R=Object.getOwnPropertyDescriptor(S,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,S,w,R);else for(var x=g.length-1;x>=0;x--)(L=g[x])&&(E=(k<3?L(E):k>3?L(S,w,E):L(S,w))||E);return k>3&&E&&Object.defineProperty(S,w,E),E},_=this&&this.__param||function(g,S){return function(w,R){S(w,R,g)}},m=this&&this.__values||function(g){var S=typeof Symbol=="function"&&Symbol.iterator,w=S&&g[S],R=0;if(w)return w.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&R>=g.length&&(g=void 0),{value:g&&g[R++],done:!g}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var v=b(3787),s=b(8803),a=b(844),p=b(4725),h=b(2585),r=b(8460),e=b(8055),t=b(9631),i="xterm-dom-renderer-owner-",n="xterm-fg-",l="xterm-bg-",c="xterm-focus",y=1,C=function(g){function S(w,R,L,k,E,x,M,T,U,q){var F=g.call(this)||this;return F._colors=w,F._element=R,F._screenElement=L,F._viewportElement=k,F._linkifier=E,F._linkifier2=x,F._charSizeService=T,F._optionsService=U,F._bufferService=q,F._terminalClass=y++,F._rowElements=[],F._rowContainer=document.createElement("div"),F._rowContainer.classList.add("xterm-rows"),F._rowContainer.style.lineHeight="normal",F._rowContainer.setAttribute("aria-hidden","true"),F._refreshRowElements(F._bufferService.cols,F._bufferService.rows),F._selectionContainer=document.createElement("div"),F._selectionContainer.classList.add("xterm-selection"),F._selectionContainer.setAttribute("aria-hidden","true"),F.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},F._updateDimensions(),F._injectCss(),F._rowFactory=M.createInstance(v.DomRendererRowFactory,document,F._colors),F._element.classList.add(i+F._terminalClass),F._screenElement.appendChild(F._rowContainer),F._screenElement.appendChild(F._selectionContainer),F.register(F._linkifier.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F.register(F._linkifier2.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier2.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F}return u(S,g),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._element.classList.remove(i+this._terminalClass),(0,t.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),g.prototype.dispose.call(this)},S.prototype._updateDimensions=function(){var w,R;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next()){var E=k.value;E.style.width=this.dimensions.canvasWidth+"px",E.style.height=this.dimensions.actualCellHeight+"px",E.style.lineHeight=this.dimensions.actualCellHeight+"px",E.style.overflow="hidden"}}catch(M){w={error:M}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.setColors=function(w){this._colors=w,this._injectCss()},S.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var R=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";R+=this._terminalSelector+" span:not(."+v.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+v.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+v.ITALIC_CLASS+" { font-style: italic;}",R+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",R+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",R+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+":not(."+v.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",R+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionOpaque.css+";}",this._colors.ansi.forEach(function(L,k){R+=w._terminalSelector+" ."+n+k+" { color: "+L.css+"; }"+w._terminalSelector+" ."+l+k+" { background-color: "+L.css+"; }"}),R+=this._terminalSelector+" ."+n+s.INVERTED_DEFAULT_COLOR+" { color: "+e.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+s.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=R},S.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},S.prototype._refreshRowElements=function(w,R){for(var L=this._rowElements.length;L<=R;L++){var k=document.createElement("div");this._rowContainer.appendChild(k),this._rowElements.push(k)}for(;this._rowElements.length>R;)this._rowContainer.removeChild(this._rowElements.pop())},S.prototype.onResize=function(w,R){this._refreshRowElements(w,R),this._updateDimensions()},S.prototype.onCharSizeChanged=function(){this._updateDimensions()},S.prototype.onBlur=function(){this._rowContainer.classList.remove(c)},S.prototype.onFocus=function(){this._rowContainer.classList.add(c)},S.prototype.onSelectionChanged=function(w,R,L){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(w,R,L),this.renderRows(0,this._bufferService.rows-1),w&&R){var k=w[1]-this._bufferService.buffer.ydisp,E=R[1]-this._bufferService.buffer.ydisp,x=Math.max(k,0),M=Math.min(E,this._bufferService.rows-1);if(!(x>=this._bufferService.rows||M<0)){var T=document.createDocumentFragment();if(L){var U=w[0]>R[0];T.appendChild(this._createSelectionElement(x,U?R[0]:w[0],U?w[0]:R[0],M-x+1))}else{var q=k===x?w[0]:0,F=x===E?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(x,q,F));var z=M-x-1;if(T.appendChild(this._createSelectionElement(x+1,0,this._bufferService.cols,z)),x!==M){var N=E===M?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(M,0,N))}}this._selectionContainer.appendChild(T)}}},S.prototype._createSelectionElement=function(w,R,L,k){k===void 0&&(k=1);var E=document.createElement("div");return E.style.height=k*this.dimensions.actualCellHeight+"px",E.style.top=w*this.dimensions.actualCellHeight+"px",E.style.left=R*this.dimensions.actualCellWidth+"px",E.style.width=this.dimensions.actualCellWidth*(L-R)+"px",E},S.prototype.onCursorMove=function(){},S.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},S.prototype.clear=function(){var w,R;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next())k.value.innerText=""}catch(E){w={error:E}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}},S.prototype.renderRows=function(w,R){for(var L=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),E=this._optionsService.rawOptions.cursorBlink,x=w;x<=R;x++){var M=this._rowElements[x];M.innerText="";var T=x+this._bufferService.buffer.ydisp,U=this._bufferService.buffer.lines.get(T),q=this._optionsService.rawOptions.cursorStyle;M.appendChild(this._rowFactory.createRow(U,T,T===L,q,k,E,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(S.prototype,"_terminalSelector",{get:function(){return"."+i+this._terminalClass},enumerable:!1,configurable:!0}),S.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},S.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},S.prototype._setCellUnderline=function(w,R,L,k,E,x){for(;w!==R||L!==k;){var M=this._rowElements[L];if(!M)return;var T=M.children[w];T&&(T.style.textDecoration=x?"underline":"none"),++w>=E&&(w=0,L++)}},d([_(6,h.IInstantiationService),_(7,p.ICharSizeService),_(8,h.IOptionsService),_(9,h.IBufferService)],S)}(a.Disposable);o.DomRenderer=C},3787:function(P,o,b){var f=this&&this.__decorate||function(i,n,l,c){var y,C=arguments.length,g=C<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,n,l,c);else for(var S=i.length-1;S>=0;S--)(y=i[S])&&(g=(C<3?y(g):C>3?y(n,l,g):y(n,l))||g);return C>3&&g&&Object.defineProperty(n,l,g),g},u=this&&this.__param||function(i,n){return function(l,c){n(l,c,i)}},d=this&&this.__values||function(i){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&i[n],c=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&c>=i.length&&(i=void 0),{value:i&&i[c++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.STRIKETHROUGH_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var _=b(8803),m=b(643),v=b(511),s=b(2585),a=b(8055),p=b(4725),h=b(4269),r=b(1752);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.STRIKETHROUGH_CLASS="xterm-strikethrough",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var e=function(){function i(n,l,c,y,C,g){this._document=n,this._colors=l,this._characterJoinerService=c,this._optionsService=y,this._coreService=C,this._decorationService=g,this._workCell=new v.CellData,this._columnSelectMode=!1}return i.prototype.setColors=function(n){this._colors=n},i.prototype.onSelectionChanged=function(n,l,c){this._selectionStart=n,this._selectionEnd=l,this._columnSelectMode=c},i.prototype.createRow=function(n,l,c,y,C,g,S,w){for(var R,L,k=this._document.createDocumentFragment(),E=this._characterJoinerService.getJoinedCharacters(l),x=0,M=Math.min(n.length,w)-1;M>=0;M--)if(n.loadCell(M,this._workCell).getCode()!==m.NULL_CELL_CODE||c&&M===C){x=M+1;break}for(M=0;M<x;M++){n.loadCell(M,this._workCell);var T=this._workCell.getWidth();if(T!==0){var U=!1,q=M,F=this._workCell;if(E.length>0&&M===E[0][0]){U=!0;var z=E.shift();F=new h.JoinedCellData(this._workCell,n.translateToString(!0,z[0],z[1]),z[1]-z[0]),q=z[1]-1,T=F.getWidth()}var N=this._document.createElement("span");if(T>1&&(N.style.width=S*T+"px"),U&&(N.style.display="inline",C>=M&&C<=q&&(C=M)),!this._coreService.isCursorHidden&&c&&M===C)switch(N.classList.add(o.CURSOR_CLASS),g&&N.classList.add(o.CURSOR_BLINK_CLASS),y){case"bar":N.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":N.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:N.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}F.isBold()&&N.classList.add(o.BOLD_CLASS),F.isItalic()&&N.classList.add(o.ITALIC_CLASS),F.isDim()&&N.classList.add(o.DIM_CLASS),F.isUnderline()&&N.classList.add(o.UNDERLINE_CLASS),F.isInvisible()?N.textContent=m.WHITESPACE_CELL_CHAR:N.textContent=F.getChars()||m.WHITESPACE_CELL_CHAR,F.isStrikethrough()&&N.classList.add(o.STRIKETHROUGH_CLASS);var A=F.getFgColor(),$=F.getFgColorMode(),J=F.getBgColor(),oe=F.getBgColorMode(),B=!!F.isInverse();if(B){var ne=A;A=J,J=ne;var X=$;$=oe,oe=X}var W=void 0,O=void 0,D=!1;try{for(var j=(R=void 0,d(this._decorationService.getDecorationsAtCell(M,l))),V=j.next();!V.done;V=j.next()){var Y=V.value;Y.options.layer!=="top"&&D||(Y.backgroundColorRGB&&(oe=50331648,J=Y.backgroundColorRGB.rgba>>8&16777215,W=Y.backgroundColorRGB),Y.foregroundColorRGB&&($=50331648,A=Y.foregroundColorRGB.rgba>>8&16777215,O=Y.foregroundColorRGB),D=Y.options.layer==="top")}}catch(ue){R={error:ue}}finally{try{V&&!V.done&&(L=j.return)&&L.call(j)}finally{if(R)throw R.error}}var te=this._isCellInSelection(M,l);D||this._colors.selectionForeground&&te&&($=50331648,A=this._colors.selectionForeground.rgba>>8&16777215,O=this._colors.selectionForeground),te&&(W=this._colors.selectionOpaque,D=!0),D&&N.classList.add("xterm-decoration-top");var ae=void 0;switch(oe){case 16777216:case 33554432:ae=this._colors.ansi[J],N.classList.add("xterm-bg-"+J);break;case 50331648:ae=a.rgba.toColor(J>>16,J>>8&255,255&J),this._addStyle(N,"background-color:#"+t((J>>>0).toString(16),"0",6));break;default:B?(ae=this._colors.foreground,N.classList.add("xterm-bg-"+_.INVERTED_DEFAULT_COLOR)):ae=this._colors.background}switch($){case 16777216:case 33554432:F.isBold()&&A<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(A+=8),this._applyMinimumContrast(N,ae,this._colors.ansi[A],F,W,void 0)||N.classList.add("xterm-fg-"+A);break;case 50331648:var he=a.rgba.toColor(A>>16&255,A>>8&255,255&A);this._applyMinimumContrast(N,ae,he,F,W,O)||this._addStyle(N,"color:#"+t(A.toString(16),"0",6));break;default:this._applyMinimumContrast(N,ae,this._colors.foreground,F,W,void 0)||B&&N.classList.add("xterm-fg-"+_.INVERTED_DEFAULT_COLOR)}k.appendChild(N),M=q}}return k},i.prototype._applyMinimumContrast=function(n,l,c,y,C,g){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,r.excludeFromContrastRatioDemands)(y.getCode()))return!1;var S=void 0;return C||g||(S=this._colors.contrastCache.getColor(l.rgba,c.rgba)),S===void 0&&(S=a.color.ensureContrastRatio(C||l,g||c,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((C||l).rgba,(g||c).rgba,S??null)),!!S&&(this._addStyle(n,"color:"+S.css),!0)},i.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},i.prototype._isCellInSelection=function(n,l){var c=this._selectionStart,y=this._selectionEnd;return!(!c||!y)&&(this._columnSelectMode?c[0]<=y[0]?n>=c[0]&&l>=c[1]&&n<y[0]&&l<=y[1]:n<c[0]&&l>=c[1]&&n>=y[0]&&l<=y[1]:l>c[1]&&l<y[1]||c[1]===y[1]&&l===c[1]&&n>=c[0]&&n<y[0]||c[1]<y[1]&&l===y[1]&&n<y[0]||c[1]<y[1]&&l===c[1]&&n>=c[0])},f([u(2,p.ICharacterJoinerService),u(3,s.IOptionsService),u(4,s.ICoreService),u(5,s.IDecorationService)],i)}();function t(i,n,l){for(;i.length<l;)i=n+i;return i}o.DomRendererRowFactory=e},456:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var b=function(){function f(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return f.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(f.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(u=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(u=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:void 0;var u},enumerable:!1,configurable:!0}),f.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])},f.prototype.onTrim=function(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},f}();o.SelectionModel=b},428:function(P,o,b){var f=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},u=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var d=b(2585),_=b(8460),m=function(){function s(a,p,h){this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=new _.EventEmitter,this._measureStrategy=new v(a,p,this._optionsService)}return Object.defineProperty(s.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),s.prototype.measure=function(){var a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())},f([u(2,d.IOptionsService)],s)}();o.CharSizeService=m;var v=function(){function s(a,p,h){this._document=a,this._parentElement=p,this._optionsService=h,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return s.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var a=this._measureElement.getBoundingClientRect();return a.width!==0&&a.height!==0&&(this._result.width=a.width,this._result.height=Math.ceil(a.height)),this._result},s}()},4269:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),d=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},_=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;var m=b(3734),v=b(643),s=b(511),a=b(2585),p=function(r){function e(t,i,n){var l=r.call(this)||this;return l.content=0,l.combinedData="",l.fg=t.fg,l.bg=t.bg,l.combinedData=i,l._width=n,l}return u(e,r),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(m.AttributeData);o.JoinedCellData=p;var h=function(){function r(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}return r.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},r.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},r.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];for(var i=[],n=t.translateToString(!0),l=0,c=0,y=0,C=t.getFg(0),g=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==g){if(S-l>1)for(var w=this._getJoinedRanges(n,y,c,t,l),R=0;R<w.length;R++)i.push(w[R]);l=S,y=c,C=this._workCell.fg,g=this._workCell.bg}c+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-l>1)for(w=this._getJoinedRanges(n,y,c,t,l),R=0;R<w.length;R++)i.push(w[R]);return i},r.prototype._getJoinedRanges=function(e,t,i,n,l){var c=e.substring(t,i),y=[];try{y=this._characterJoiners[0].handler(c)}catch(w){console.error(w)}for(var C=1;C<this._characterJoiners.length;C++)try{for(var g=this._characterJoiners[C].handler(c),S=0;S<g.length;S++)r._mergeRanges(y,g[S])}catch(w){console.error(w)}return this._stringRangesToCellRanges(y,n,l),y},r.prototype._stringRangesToCellRanges=function(e,t,i){var n=0,l=!1,c=0,y=e[n];if(y){for(var C=i;C<this._bufferService.cols;C++){var g=t.getWidth(C),S=t.getString(C).length||v.WHITESPACE_CELL_CHAR.length;if(g!==0){if(!l&&y[0]<=c&&(y[0]=C,l=!0),y[1]<=c){if(y[1]=C,!(y=e[++n]))break;y[0]<=c?(y[0]=C,l=!0):l=!1}c+=S}}y&&(y[1]=this._bufferService.cols)}},r._mergeRanges=function(e,t){for(var i=!1,n=0;n<e.length;n++){var l=e[n];if(i){if(t[1]<=l[0])return e[n-1][1]=t[1],e;if(t[1]<=l[1])return e[n-1][1]=Math.max(t[1],l[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=l[0])return e.splice(n,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e},r=d([_(0,a.IBufferService)],r)}();o.CharacterJoinerService=h},5114:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var b=function(){function f(u){this._textarea=u}return Object.defineProperty(f.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),f}();o.CoreBrowserService=b},8934:function(P,o,b){var f=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},u=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var d=b(4725),_=b(9806),m=function(){function v(s,a){this._renderService=s,this._charSizeService=a}return v.prototype.getCoords=function(s,a,p,h,r){return(0,_.getCoords)(window,s,a,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)},v.prototype.getRawByteCoords=function(s,a,p,h){var r=this.getCoords(s,a,p,h);return(0,_.getRawByteCoords)(r)},f([u(0,d.IRenderService),u(1,d.ICharSizeService)],v)}();o.MouseService=m},3230:function(P,o,b){var f,u=this&&this.__extends||(f=function(t,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(n[c]=l[c])},f(t,i)},function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}f(t,i),t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}),d=this&&this.__decorate||function(t,i,n,l){var c,y=arguments.length,C=y<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(t,i,n,l);else for(var g=t.length-1;g>=0;g--)(c=t[g])&&(C=(y<3?c(C):y>3?c(i,n,C):c(i,n))||C);return y>3&&C&&Object.defineProperty(i,n,C),C},_=this&&this.__param||function(t,i){return function(n,l){i(n,l,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var m=b(6193),v=b(8460),s=b(844),a=b(5596),p=b(3656),h=b(2585),r=b(4725),e=function(t){function i(n,l,c,y,C,g,S){var w=t.call(this)||this;if(w._renderer=n,w._rowCount=l,w._charSizeService=C,w._isPaused=!1,w._needsFullRefresh=!1,w._isNextRenderRedrawOnly=!0,w._needsSelectionRefresh=!1,w._canvasWidth=0,w._canvasHeight=0,w._selectionState={start:void 0,end:void 0,columnSelectMode:!1},w._onDimensionsChange=new v.EventEmitter,w._onRenderedViewportChange=new v.EventEmitter,w._onRender=new v.EventEmitter,w._onRefreshRequest=new v.EventEmitter,w.register({dispose:function(){return w._renderer.dispose()}}),w._renderDebouncer=new m.RenderDebouncer(function(L,k){return w._renderRows(L,k)}),w.register(w._renderDebouncer),w._screenDprMonitor=new a.ScreenDprMonitor,w._screenDprMonitor.setListener(function(){return w.onDevicePixelRatioChange()}),w.register(w._screenDprMonitor),w.register(S.onResize(function(){return w._fullRefresh()})),w.register(S.buffers.onBufferActivate(function(){var L;return(L=w._renderer)===null||L===void 0?void 0:L.clear()})),w.register(y.onOptionChange(function(){return w._handleOptionsChanged()})),w.register(w._charSizeService.onCharSizeChange(function(){return w.onCharSizeChanged()})),w.register(g.onDecorationRegistered(function(){return w._fullRefresh()})),w.register(g.onDecorationRemoved(function(){return w._fullRefresh()})),w._renderer.onRequestRedraw(function(L){return w.refreshRows(L.start,L.end,!0)}),w.register((0,p.addDisposableDomListener)(window,"resize",function(){return w.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var R=new IntersectionObserver(function(L){return w._onIntersectionChange(L[L.length-1])},{threshold:0});R.observe(c),w.register({dispose:function(){return R.disconnect()}})}return w}return u(i,t),Object.defineProperty(i.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),i.prototype._onIntersectionChange=function(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},i.prototype.refreshRows=function(n,l,c){c===void 0&&(c=!1),this._isPaused?this._needsFullRefresh=!0:(c||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))},i.prototype._renderRows=function(n,l){this._renderer.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0},i.prototype.resize=function(n,l){this._rowCount=l,this._fireOnCanvasResize()},i.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},i.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},i.prototype.dispose=function(){t.prototype.dispose.call(this)},i.prototype.setRenderer=function(n){var l=this;this._renderer.dispose(),this._renderer=n,this._renderer.onRequestRedraw(function(c){return l.refreshRows(c.start,c.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},i.prototype.addRefreshCallback=function(n){return this._renderDebouncer.addRefreshCallback(n)},i.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},i.prototype.clearTextureAtlas=function(){var n,l;(l=(n=this._renderer)===null||n===void 0?void 0:n.clearTextureAtlas)===null||l===void 0||l.call(n),this._fullRefresh()},i.prototype.setColors=function(n){this._renderer.setColors(n),this._fullRefresh()},i.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},i.prototype.onResize=function(n,l){this._renderer.onResize(n,l),this._fullRefresh()},i.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},i.prototype.onBlur=function(){this._renderer.onBlur()},i.prototype.onFocus=function(){this._renderer.onFocus()},i.prototype.onSelectionChanged=function(n,l,c){this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=c,this._renderer.onSelectionChanged(n,l,c)},i.prototype.onCursorMove=function(){this._renderer.onCursorMove()},i.prototype.clear=function(){this._renderer.clear()},d([_(3,h.IOptionsService),_(4,r.ICharSizeService),_(5,h.IDecorationService),_(6,h.IBufferService)],i)}(s.Disposable);o.RenderService=e},9312:function(P,o,b){var f,u=this&&this.__extends||(f=function(y,C){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,S){g.__proto__=S}||function(g,S){for(var w in S)Object.prototype.hasOwnProperty.call(S,w)&&(g[w]=S[w])},f(y,C)},function(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function g(){this.constructor=y}f(y,C),y.prototype=C===null?Object.create(C):(g.prototype=C.prototype,new g)}),d=this&&this.__decorate||function(y,C,g,S){var w,R=arguments.length,L=R<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,C,g,S);else for(var k=y.length-1;k>=0;k--)(w=y[k])&&(L=(R<3?w(L):R>3?w(C,g,L):w(C,g))||L);return R>3&&L&&Object.defineProperty(C,g,L),L},_=this&&this.__param||function(y,C){return function(g,S){C(g,S,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var m=b(6114),v=b(456),s=b(511),a=b(8460),p=b(4725),h=b(2585),r=b(9806),e=b(9504),t=b(844),i=b(4841),n=" ",l=new RegExp(n,"g"),c=function(y){function C(g,S,w,R,L,k,E,x){var M=y.call(this)||this;return M._element=g,M._screenElement=S,M._linkifier=w,M._bufferService=R,M._coreService=L,M._mouseService=k,M._optionsService=E,M._renderService=x,M._dragScrollAmount=0,M._enabled=!0,M._workCell=new s.CellData,M._mouseDownTimeStamp=0,M._oldHasSelection=!1,M._oldSelectionStart=void 0,M._oldSelectionEnd=void 0,M._onLinuxMouseSelection=M.register(new a.EventEmitter),M._onRedrawRequest=M.register(new a.EventEmitter),M._onSelectionChange=M.register(new a.EventEmitter),M._onRequestScrollLines=M.register(new a.EventEmitter),M._mouseMoveListener=function(T){return M._onMouseMove(T)},M._mouseUpListener=function(T){return M._onMouseUp(T)},M._coreService.onUserInput(function(){M.hasSelection&&M.clearSelection()}),M._trimListener=M._bufferService.buffer.lines.onTrim(function(T){return M._onTrim(T)}),M.register(M._bufferService.buffers.onBufferActivate(function(T){return M._onBufferActivate(T)})),M.enable(),M._model=new v.SelectionModel(M._bufferService),M._activeSelectionMode=0,M}return u(C,y),Object.defineProperty(C.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){this._removeMouseDownListeners()},C.prototype.reset=function(){this.clearSelection()},C.prototype.disable=function(){this.clearSelection(),this._enabled=!1},C.prototype.enable=function(){this._enabled=!0},Object.defineProperty(C.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasSelection",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!g||!S||g[0]===S[0]&&g[1]===S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionText",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!g||!S)return"";var w=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(g[0]===S[0])return"";for(var L=g[0]<S[0]?g[0]:S[0],k=g[0]<S[0]?S[0]:g[0],E=g[1];E<=S[1];E++){var x=w.translateBufferLineToString(E,!0,L,k);R.push(x)}}else{var M=g[1]===S[1]?S[0]:void 0;for(R.push(w.translateBufferLineToString(g[1],!0,g[0],M)),E=g[1]+1;E<=S[1]-1;E++){var T=w.lines.get(E);x=w.translateBufferLineToString(E,!0),T?.isWrapped?R[R.length-1]+=x:R.push(x)}g[1]!==S[1]&&(T=w.lines.get(S[1]),x=w.translateBufferLineToString(S[1],!0,0,S[0]),T&&T.isWrapped?R[R.length-1]+=x:R.push(x))}return R.map(function(U){return U.replace(l," ")}).join(m.isWindows?`\r
@@ -0,0 +1 @@
1
+ import{i as e,d as o}from"./vendor-ux-C1NY8cuW.js";const c=e("blocklet-services");o("blocklet-services");export{c as d};
@@ -1 +1 @@
1
- import{j as e,ak as p,T as I,W as c,am as K,Q as F,bG as de,a6 as pe}from"./vendor-mui-core-BOHKtf8y.js";import{f as fe,a as ue,b as ge,h as me}from"./vendor-hooks-DTeIFVkk.js";import{r as J,i as he}from"./vendor-react-Dvs43sk9.js";import{a as we,Z as xe,M as ye,c as L,ae as Pe,H as M,s as ke,b as ve,af as O,ag as je,ah as be}from"./index-Cbf4geph.js";import{C as W,b as _,J as Ie,c as Te}from"./vendor-utils-BOkrEpKO.js";import{o as Ce}from"./vendor-arcblock--zSibe1w.js";import{$ as Le,e as _e,T as X,u as $,c as Re,v as We,x as Ae,H as z,w as Ee,y as B}from"./vendor-ux-Cra9XTth.js";import{u as Ne}from"./use-passport-id-B-b-_oYF.js";import{g as V}from"./get-safe-url-DOmcOTEp.js";import{d as R}from"./logger-D5kKPkv7.js";import"./lottie-web-4koyQiv_.js";function G({blocklet:a=window.blocklet}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(Le,{variant:"rounded",shape:"square",did:a.appPid,src:a.appLogo,size:80}),e.jsx(I,{component:"h2",variant:"h6",children:a.appName}),e.jsx(_e,{did:a.appPid})]})}const Se=J.memo(G);G.propTypes={blocklet:c.shape({appName:c.string,appLogo:c.string,appPid:c.string})};const Ue=()=>window.blocklet?.componentMountPoints?.find(s=>s.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint;function Z({children:a=null,cta:s=null,...i}){return e.jsxs(p,{...i,children:[a?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:a}):null,s?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:s}):null]})}Z.propTypes={children:c.node,cta:c.node};function Y({passports:a=[],onConnect:s=()=>{},redirect:i,...y}){const{t:f}=X(),P=Ue(),k=l=>{const g=l?.payable;return P&&g?W(P,`/api/redirect/checkout/${g}?redirect=${i}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(Se,{}),e.jsx(Z,{...y,cta:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:f("login.accessLimit.title")}),e.jsx(I,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:f("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:a?.map(l=>{const g=k(l);return g?e.jsx(K,{title:f("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(F,{color:"primary",variant:"contained",endIcon:e.jsx(de,{}),href:g,target:"_blank",children:l.title||l.name})},l.name):e.jsx(K,{title:f("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(F,{color:"inherit",variant:"contained",onClick:s,children:l.title||l.name})},l.name)})}),e.jsxs(I,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:f("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:s,children:f("common.connect")})]})]})})]})}Y.propTypes={passports:c.arrayOf(c.shape({name:c.string.isRequired,title:c.string,payable:c.string})),onConnect:c.func,onClose:c.func,redirect:c.string.isRequired};function Ve(){const a=J.useRef(null),{session:s}=we(),{t:i,locale:y}=X(),{getPassportId:f}=Ne(),P=he(),k=$(),l=Re(),{encryptKey:g,decrypt:ee}=xe(),v=fe(s),{searchParams:o}=new URL(window.location.href),m={passportId:f()},A=o.get("componentId"),E=o.get("authenticated"),ne=o.get("sessionToken"),te=o.get("refreshToken"),oe=o.get("requiredRoles"),u=o.get("redirect"),d=o.get("forceConnected"),j=o.get("sourceAppPid"),T=o.get("origin"),N=o.get("autoConnectWebview"),S=o.get("popup"),U=o.get("showQuickConnect");let h=o.get("inviter");if(!h&&u)try{h=(u.startsWith("http")?new URL(u):new URL(u,window.location.origin)).searchParams.get("inviter")}catch{}h=h||localStorage.getItem("inviter"),A&&(m.componentId=A),k&&(m.visitorId=k),h&&(m.inviter=h),Te(j)||(j==="null"?m.sourceAppPid=null:j!==null&&(m.sourceAppPid=j));let D=[];try{D=JSON.parse(oe)}catch{}const ie=async n=>{const t=o.get("fromWallet");R("login page notifyWallet",{data:n,fromWallet:t,"browser.wallet":l.wallet}),n&&String(t)==="1"&&l.wallet&&await Promise.any([B.asyncCall("arcSetToken",n),O(3e3)])},C=n=>o.get("encrypted")?ee(n):n,q=async n=>{n&&await ie(n),setTimeout(()=>{if(u){const t=decodeURIComponent(u);t.startsWith(L.WELLKNOWN_SERVICE_PATH_PREFIX)?P(t,{replace:!0}):window.location.replace(V(t))}else window.location.replace(window.env.pathPrefix||"/")},50)},se=n=>{const t={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:$(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};R("bridge callArc: onLogin",t),B.callArc("onLogin",t)},H=async(n,t)=>{const w=t(n.sessionToken),b=t(n.refreshToken),x=t(n.visitorId);R("login page onLogin",{result:n,decodeSessionToken:w,decodeRefreshToken:b,decodeVisitorId:x}),ke(w),ve(b),n.visitorId&&Ee(x),await s.refresh(),await O(100),se(v.current);const r={};o.get("saveConnect")?(r.connected_did=v.current.user.did,r.connected_pk=v.current.user.pk,r.connected_wallet_os=v.current.walletOS,r.connected_app=je()):(r.connected_did=o.get("connected_did"),r.connected_pk=o.get("connected_pk"),r.connected_app=o.get("connected_app"),r.connected_wallet_os=o.get("connected_wallet_os")),be(r,!0),q({sessionToken:w,refreshToken:b,visitorId:x})},re=ue(()=>T==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,T,i]),Q=ge(()=>{const n=window?.blocklet,t={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:H,onError:ce,locale:y,messages:re,extraParams:m,baseUrl:window.location.origin,prefix:W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,ye)};d&&(t.forceConnected=d,t.extraParams.enableSwitchApp=!1,t.extraParams.forceConnected=d),t.options||(t.options={}),T==="switch-did"?t.options.showQuickConnect=!0:_(U)||([!1,"false"].includes(U)?t.options.showQuickConnect=!1:t.options.showQuickConnect=!0);const w=We();Ae()&&(t.extraParams.sourceAppPid=w.appPid);const x=W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),r={params:Pe(encodeURIComponent(JSON.stringify(t))),appPid:n?.appPid,appName:n?.appName,locale:y,redirect:window.location.href,_ek_:g};_(N)||(r.autoConnectWebview=N),_(S)||(r.popup=S),r.disableClose=!0;const le=V(Ie(x,r),{allowDomains:null});window.location.href=le});me(()=>{if(o.get("sessionToken")){const n=o.get("visitorId");if(!n){z.error("Unexpected login response from server: visitorId is required");return}H({sessionToken:C(ne),refreshToken:C(te),visitorId:C(n)},t=>t)}else!s.user||d&&s.user.did!==d?Q():!E&&!o.get("sessionToken")&&q()});const ce=n=>{z.error(n.message)},ae=o.has("popup");if(s.loading||s.user){if(!E||o.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx(M,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(Ce,{children:ae?null:e.jsx(pe,{})})]});const n=u?new URL(u,window.location.origin).href:window.location.href;return e.jsx(Y,{onConnect:Q,passports:D,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx(M,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:a})]})}export{Ve as default};
1
+ import{j as e,ak as p,T as I,W as c,am as K,Q as F,bG as de,a6 as pe}from"./vendor-mui-core-CAIaAq-_.js";import{f as fe,a as ue,b as ge,h as me}from"./vendor-hooks-DTeIFVkk.js";import{r as J,i as he}from"./vendor-react-Dvs43sk9.js";import{a as we,Z as xe,M as ye,c as L,ae as Pe,H as M,s as ke,b as ve,af as O,ag as je,ah as be}from"./index-l5234Nwn.js";import{C as W,b as _,J as Ie,c as Te}from"./vendor-utils-BOkrEpKO.js";import{o as Ce}from"./vendor-arcblock-DU4xNzGM.js";import{$ as Le,e as _e,T as X,u as $,c as Re,v as We,x as Ae,H as z,w as Ee,y as B}from"./vendor-ux-C1NY8cuW.js";import{u as Ne}from"./use-passport-id-B-b-_oYF.js";import{g as V}from"./get-safe-url-Byu99Iq6.js";import{d as R}from"./logger-Dth79fFL.js";import"./lottie-web-4koyQiv_.js";function G({blocklet:a=window.blocklet}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(Le,{variant:"rounded",shape:"square",did:a.appPid,src:a.appLogo,size:80}),e.jsx(I,{component:"h2",variant:"h6",children:a.appName}),e.jsx(_e,{did:a.appPid})]})}const Se=J.memo(G);G.propTypes={blocklet:c.shape({appName:c.string,appLogo:c.string,appPid:c.string})};const Ue=()=>window.blocklet?.componentMountPoints?.find(s=>s.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint;function Z({children:a=null,cta:s=null,...i}){return e.jsxs(p,{...i,children:[a?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:a}):null,s?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:s}):null]})}Z.propTypes={children:c.node,cta:c.node};function Y({passports:a=[],onConnect:s=()=>{},redirect:i,...y}){const{t:f}=X(),P=Ue(),k=l=>{const g=l?.payable;return P&&g?W(P,`/api/redirect/checkout/${g}?redirect=${i}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(Se,{}),e.jsx(Z,{...y,cta:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:f("login.accessLimit.title")}),e.jsx(I,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:f("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:a?.map(l=>{const g=k(l);return g?e.jsx(K,{title:f("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(F,{color:"primary",variant:"contained",endIcon:e.jsx(de,{}),href:g,target:"_blank",children:l.title||l.name})},l.name):e.jsx(K,{title:f("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(F,{color:"inherit",variant:"contained",onClick:s,children:l.title||l.name})},l.name)})}),e.jsxs(I,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:f("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:s,children:f("common.connect")})]})]})})]})}Y.propTypes={passports:c.arrayOf(c.shape({name:c.string.isRequired,title:c.string,payable:c.string})),onConnect:c.func,onClose:c.func,redirect:c.string.isRequired};function Ve(){const a=J.useRef(null),{session:s}=we(),{t:i,locale:y}=X(),{getPassportId:f}=Ne(),P=he(),k=$(),l=Re(),{encryptKey:g,decrypt:ee}=xe(),v=fe(s),{searchParams:o}=new URL(window.location.href),m={passportId:f()},A=o.get("componentId"),E=o.get("authenticated"),ne=o.get("sessionToken"),te=o.get("refreshToken"),oe=o.get("requiredRoles"),u=o.get("redirect"),d=o.get("forceConnected"),j=o.get("sourceAppPid"),T=o.get("origin"),N=o.get("autoConnectWebview"),S=o.get("popup"),U=o.get("showQuickConnect");let h=o.get("inviter");if(!h&&u)try{h=(u.startsWith("http")?new URL(u):new URL(u,window.location.origin)).searchParams.get("inviter")}catch{}h=h||localStorage.getItem("inviter"),A&&(m.componentId=A),k&&(m.visitorId=k),h&&(m.inviter=h),Te(j)||(j==="null"?m.sourceAppPid=null:j!==null&&(m.sourceAppPid=j));let D=[];try{D=JSON.parse(oe)}catch{}const ie=async n=>{const t=o.get("fromWallet");R("login page notifyWallet",{data:n,fromWallet:t,"browser.wallet":l.wallet}),n&&String(t)==="1"&&l.wallet&&await Promise.any([B.asyncCall("arcSetToken",n),O(3e3)])},C=n=>o.get("encrypted")?ee(n):n,q=async n=>{n&&await ie(n),setTimeout(()=>{if(u){const t=decodeURIComponent(u);t.startsWith(L.WELLKNOWN_SERVICE_PATH_PREFIX)?P(t,{replace:!0}):window.location.replace(V(t))}else window.location.replace(window.env.pathPrefix||"/")},50)},se=n=>{const t={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:$(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};R("bridge callArc: onLogin",t),B.callArc("onLogin",t)},H=async(n,t)=>{const w=t(n.sessionToken),b=t(n.refreshToken),x=t(n.visitorId);R("login page onLogin",{result:n,decodeSessionToken:w,decodeRefreshToken:b,decodeVisitorId:x}),ke(w),ve(b),n.visitorId&&Ee(x),await s.refresh(),await O(100),se(v.current);const r={};o.get("saveConnect")?(r.connected_did=v.current.user.did,r.connected_pk=v.current.user.pk,r.connected_wallet_os=v.current.walletOS,r.connected_app=je()):(r.connected_did=o.get("connected_did"),r.connected_pk=o.get("connected_pk"),r.connected_app=o.get("connected_app"),r.connected_wallet_os=o.get("connected_wallet_os")),be(r,!0),q({sessionToken:w,refreshToken:b,visitorId:x})},re=ue(()=>T==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,T,i]),Q=ge(()=>{const n=window?.blocklet,t={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:H,onError:ce,locale:y,messages:re,extraParams:m,baseUrl:window.location.origin,prefix:W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,ye)};d&&(t.forceConnected=d,t.extraParams.enableSwitchApp=!1,t.extraParams.forceConnected=d),t.options||(t.options={}),T==="switch-did"?t.options.showQuickConnect=!0:_(U)||([!1,"false"].includes(U)?t.options.showQuickConnect=!1:t.options.showQuickConnect=!0);const w=We();Ae()&&(t.extraParams.sourceAppPid=w.appPid);const x=W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),r={params:Pe(encodeURIComponent(JSON.stringify(t))),appPid:n?.appPid,appName:n?.appName,locale:y,redirect:window.location.href,_ek_:g};_(N)||(r.autoConnectWebview=N),_(S)||(r.popup=S),r.disableClose=!0;const le=V(Ie(x,r),{allowDomains:null});window.location.href=le});me(()=>{if(o.get("sessionToken")){const n=o.get("visitorId");if(!n){z.error("Unexpected login response from server: visitorId is required");return}H({sessionToken:C(ne),refreshToken:C(te),visitorId:C(n)},t=>t)}else!s.user||d&&s.user.did!==d?Q():!E&&!o.get("sessionToken")&&q()});const ce=n=>{z.error(n.message)},ae=o.has("popup");if(s.loading||s.user){if(!E||o.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx(M,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(Ce,{children:ae?null:e.jsx(pe,{})})]});const n=u?new URL(u,window.location.origin).href:window.location.href;return e.jsx(Y,{onConnect:Q,passports:D,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx(M,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:a})]})}export{Ve as default};