copilotoffice 1.0.0 → 1.0.2

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.
@@ -46548,7 +46548,7 @@ var CopilotOffice = (() => {
46548
46548
  var TextRender = __webpack_require__2(61771);
46549
46549
  var TextStyle = __webpack_require__2(35762);
46550
46550
  var UUID = __webpack_require__2(45650);
46551
- var Text = new Class({
46551
+ var Text2 = new Class({
46552
46552
  Extends: GameObject,
46553
46553
  Mixins: [
46554
46554
  Components.Alpha,
@@ -46568,7 +46568,7 @@ var CopilotOffice = (() => {
46568
46568
  Components.Visible,
46569
46569
  TextRender
46570
46570
  ],
46571
- initialize: function Text2(scene, x, y, text, style) {
46571
+ initialize: function Text3(scene, x, y, text, style) {
46572
46572
  if (x === void 0) {
46573
46573
  x = 0;
46574
46574
  }
@@ -47564,7 +47564,7 @@ var CopilotOffice = (() => {
47564
47564
  * @since 3.0.0
47565
47565
  */
47566
47566
  });
47567
- module2.exports = Text;
47567
+ module2.exports = Text2;
47568
47568
  })
47569
47569
  ),
47570
47570
  /***/
@@ -47588,7 +47588,7 @@ var CopilotOffice = (() => {
47588
47588
  var BuildGameObject = __webpack_require__2(25305);
47589
47589
  var GameObjectCreator = __webpack_require__2(44603);
47590
47590
  var GetAdvancedValue = __webpack_require__2(23568);
47591
- var Text = __webpack_require__2(50171);
47591
+ var Text2 = __webpack_require__2(50171);
47592
47592
  GameObjectCreator.register("text", function(config, addToScene) {
47593
47593
  if (config === void 0) {
47594
47594
  config = {};
@@ -47599,7 +47599,7 @@ var CopilotOffice = (() => {
47599
47599
  if (padding !== null) {
47600
47600
  style.padding = padding;
47601
47601
  }
47602
- var text = new Text(this.scene, 0, 0, content, style);
47602
+ var text = new Text2(this.scene, 0, 0, content, style);
47603
47603
  if (addToScene !== void 0) {
47604
47604
  config.add = addToScene;
47605
47605
  }
@@ -47614,10 +47614,10 @@ var CopilotOffice = (() => {
47614
47614
  68005: (
47615
47615
  /***/
47616
47616
  ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__2) => {
47617
- var Text = __webpack_require__2(50171);
47617
+ var Text2 = __webpack_require__2(50171);
47618
47618
  var GameObjectFactory = __webpack_require__2(39429);
47619
47619
  GameObjectFactory.register("text", function(x, y, text, style) {
47620
- return this.displayList.add(new Text(this.scene, x, y, text, style));
47620
+ return this.displayList.add(new Text2(this.scene, x, y, text, style));
47621
47621
  });
47622
47622
  })
47623
47623
  ),
@@ -55380,7 +55380,7 @@ var CopilotOffice = (() => {
55380
55380
  return inside;
55381
55381
  }
55382
55382
  function splitPolygon(a, b) {
55383
- var a2 = new Node(a.i, a.x, a.y), b2 = new Node(b.i, b.x, b.y), an = a.next, bp = b.prev;
55383
+ var a2 = new Node2(a.i, a.x, a.y), b2 = new Node2(b.i, b.x, b.y), an = a.next, bp = b.prev;
55384
55384
  a.next = b;
55385
55385
  b.prev = a;
55386
55386
  a2.next = an;
@@ -55392,7 +55392,7 @@ var CopilotOffice = (() => {
55392
55392
  return b2;
55393
55393
  }
55394
55394
  function insertNode(i, x, y, last) {
55395
- var p = new Node(i, x, y);
55395
+ var p = new Node2(i, x, y);
55396
55396
  if (!last) {
55397
55397
  p.prev = p;
55398
55398
  p.next = p;
@@ -55410,7 +55410,7 @@ var CopilotOffice = (() => {
55410
55410
  if (p.prevZ) p.prevZ.nextZ = p.nextZ;
55411
55411
  if (p.nextZ) p.nextZ.prevZ = p.prevZ;
55412
55412
  }
55413
- function Node(i, x, y) {
55413
+ function Node2(i, x, y) {
55414
55414
  this.i = i;
55415
55415
  this.x = x;
55416
55416
  this.y = y;
@@ -140044,7 +140044,7 @@ var CopilotOffice = (() => {
140044
140044
  CORE_AGENT_IDS.clear();
140045
140045
  for (const a of AGENTS) CORE_AGENT_IDS.add(a.id);
140046
140046
  }
140047
- var FLEET_NAMES, FLEET_COLORS, FLEET_SEAT_POSITIONS, ARTHUR_FLEET_SEAT_INDEX, FLEET_AGENTS, RESERVE_AGENTS, CORE_AGENT_IDS, RESERVE_AGENT_DESK, AGENTS, DEFAULT_AGENTS, DEFAULT_RESERVE_MAP, RANDOM_POOL_CONFIGS, RANDOM_SPRITE_COUNT, CORE_POSITIONS, RESERVE_DESK_IDS, RESERVE_POSITIONS, ROLE_TITLES;
140047
+ var FLEET_NAMES, FLEET_COLORS, FLEET_SEAT_POSITIONS, ARTHUR_FLEET_SEAT_INDEX, FLEET_AGENTS, RESERVE_AGENTS, SHOW_ARCHITECT_IN_DEFAULT_OFFICE, CORE_AGENT_IDS, RESERVE_AGENT_DESK, AGENTS, DEFAULT_AGENTS, DEFAULT_RESERVE_MAP, RANDOM_POOL_CONFIGS, RANDOM_SPRITE_COUNT, CORE_POSITIONS, RESERVE_DESK_IDS, RESERVE_POSITIONS, ROLE_TITLES;
140048
140048
  var init_agents = __esm({
140049
140049
  "src/config/agents.ts"() {
140050
140050
  "use strict";
@@ -140289,7 +140289,13 @@ var CopilotOffice = (() => {
140289
140289
  description: "The Accountant"
140290
140290
  }
140291
140291
  };
140292
- CORE_AGENT_IDS = /* @__PURE__ */ new Set(["generalist", "architect", "debugger", "admin"]);
140292
+ SHOW_ARCHITECT_IN_DEFAULT_OFFICE = false;
140293
+ CORE_AGENT_IDS = /* @__PURE__ */ new Set([
140294
+ "generalist",
140295
+ ...SHOW_ARCHITECT_IN_DEFAULT_OFFICE ? ["architect"] : [],
140296
+ "debugger",
140297
+ "admin"
140298
+ ]);
140293
140299
  RESERVE_AGENT_DESK = Object.fromEntries(
140294
140300
  Object.entries(RESERVE_AGENTS).map(([deskId, config]) => [config.id, deskId])
140295
140301
  );
@@ -140306,7 +140312,7 @@ var CopilotOffice = (() => {
140306
140312
  greeting: "Hey! I'm Gene, the Generalist. I can help with just about anything - coding, debugging, research, you name it!",
140307
140313
  description: "the Generalist"
140308
140314
  },
140309
- {
140315
+ ...SHOW_ARCHITECT_IN_DEFAULT_OFFICE ? [{
140310
140316
  id: "architect",
140311
140317
  name: "Arthur",
140312
140318
  skill: "general",
@@ -140317,7 +140323,7 @@ var CopilotOffice = (() => {
140317
140323
  // bottom-left corner, own desk
140318
140324
  greeting: "\u26A1 I am Arthur, The Architect. I design systems, orchestrate plans, and spin up agents to execute complex tasks. Tell me your vision, and I'll build the team to make it happen.",
140319
140325
  description: "The Architect"
140320
- },
140326
+ }] : [],
140321
140327
  {
140322
140328
  id: "debugger",
140323
140329
  name: "Dan",
@@ -142057,9 +142063,9 @@ var CopilotOffice = (() => {
142057
142063
  }
142058
142064
  });
142059
142065
 
142060
- // node_modules/xterm/lib/xterm.js
142066
+ // node_modules/@xterm/xterm/lib/xterm.js
142061
142067
  var require_xterm = __commonJS({
142062
- "node_modules/xterm/lib/xterm.js"(exports, module) {
142068
+ "node_modules/@xterm/xterm/lib/xterm.js"(exports, module) {
142063
142069
  !(function(e, t) {
142064
142070
  if ("object" == typeof exports && "object" == typeof module) module.exports = t();
142065
142071
  else if ("function" == typeof define && define.amd) define([], t);
@@ -142067,7 +142073,7 @@ var CopilotOffice = (() => {
142067
142073
  var i = t();
142068
142074
  for (var s in i) ("object" == typeof exports ? exports : e)[s] = i[s];
142069
142075
  }
142070
- })(self, (() => (() => {
142076
+ })(globalThis, (() => (() => {
142071
142077
  "use strict";
142072
142078
  var e = { 4567: function(e2, t2, i2) {
142073
142079
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
@@ -142081,13 +142087,13 @@ var CopilotOffice = (() => {
142081
142087
  };
142082
142088
  };
142083
142089
  Object.defineProperty(t2, "__esModule", { value: true }), t2.AccessibilityManager = void 0;
142084
- const n = i2(9042), o = i2(6114), a = i2(9924), h = i2(844), c = i2(5596), l = i2(4725), d = i2(3656);
142085
- let _ = t2.AccessibilityManager = class extends h.Disposable {
142086
- constructor(e3, t3) {
142087
- super(), this._terminal = e3, this._renderService = t3, this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityContainer = document.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = document.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
142090
+ const n = i2(9042), o = i2(9924), a = i2(844), h = i2(4725), c = i2(2585), l = i2(3656);
142091
+ let d = t2.AccessibilityManager = class extends a.Disposable {
142092
+ constructor(e3, t3, i3, s3) {
142093
+ super(), this._terminal = e3, this._coreBrowserService = i3, this._renderService = s3, this._rowColumns = /* @__PURE__ */ new WeakMap(), this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityContainer = this._coreBrowserService.mainDocument.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = this._coreBrowserService.mainDocument.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
142088
142094
  for (let e4 = 0; e4 < this._terminal.rows; e4++) this._rowElements[e4] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e4]);
142089
- if (this._topBoundaryFocusListener = (e4) => this._handleBoundaryFocus(e4, 0), this._bottomBoundaryFocusListener = (e4) => this._handleBoundaryFocus(e4, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = document.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this.register(new a.TimeBasedDebouncer(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
142090
- this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this.register(this._terminal.onResize(((e4) => this._handleResize(e4.rows)))), this.register(this._terminal.onRender(((e4) => this._refreshRows(e4.start, e4.end)))), this.register(this._terminal.onScroll((() => this._refreshRows()))), this.register(this._terminal.onA11yChar(((e4) => this._handleChar(e4)))), this.register(this._terminal.onLineFeed((() => this._handleChar("\n")))), this.register(this._terminal.onA11yTab(((e4) => this._handleTab(e4)))), this.register(this._terminal.onKey(((e4) => this._handleKey(e4.key)))), this.register(this._terminal.onBlur((() => this._clearLiveRegion()))), this.register(this._renderService.onDimensionsChange((() => this._refreshRowsDimensions()))), this._screenDprMonitor = new c.ScreenDprMonitor(window), this.register(this._screenDprMonitor), this._screenDprMonitor.setListener((() => this._refreshRowsDimensions())), this.register((0, d.addDisposableDomListener)(window, "resize", (() => this._refreshRowsDimensions()))), this._refreshRows(), this.register((0, h.toDisposable)((() => {
142095
+ if (this._topBoundaryFocusListener = (e4) => this._handleBoundaryFocus(e4, 0), this._bottomBoundaryFocusListener = (e4) => this._handleBoundaryFocus(e4, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = this._coreBrowserService.mainDocument.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this.register(new o.TimeBasedDebouncer(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
142096
+ this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this.register(this._terminal.onResize(((e4) => this._handleResize(e4.rows)))), this.register(this._terminal.onRender(((e4) => this._refreshRows(e4.start, e4.end)))), this.register(this._terminal.onScroll((() => this._refreshRows()))), this.register(this._terminal.onA11yChar(((e4) => this._handleChar(e4)))), this.register(this._terminal.onLineFeed((() => this._handleChar("\n")))), this.register(this._terminal.onA11yTab(((e4) => this._handleTab(e4)))), this.register(this._terminal.onKey(((e4) => this._handleKey(e4.key)))), this.register(this._terminal.onBlur((() => this._clearLiveRegion()))), this.register(this._renderService.onDimensionsChange((() => this._refreshRowsDimensions()))), this.register((0, l.addDisposableDomListener)(document, "selectionchange", (() => this._handleSelectionChange()))), this.register(this._coreBrowserService.onDprChange((() => this._refreshRowsDimensions()))), this._refreshRows(), this.register((0, a.toDisposable)((() => {
142091
142097
  this._accessibilityContainer.remove(), this._rowElements.length = 0;
142092
142098
  })));
142093
142099
  }
@@ -142095,12 +142101,10 @@ var CopilotOffice = (() => {
142095
142101
  for (let t3 = 0; t3 < e3; t3++) this._handleChar(" ");
142096
142102
  }
142097
142103
  _handleChar(e3) {
142098
- this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== e3 && (this._charsToAnnounce += e3) : this._charsToAnnounce += e3, "\n" === e3 && (this._liveRegionLineCount++, 21 === this._liveRegionLineCount && (this._liveRegion.textContent += n.tooMuchOutput)), o.isMac && this._liveRegion.textContent && this._liveRegion.textContent.length > 0 && !this._liveRegion.parentNode && setTimeout((() => {
142099
- this._accessibilityContainer.appendChild(this._liveRegion);
142100
- }), 0));
142104
+ this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== e3 && (this._charsToAnnounce += e3) : this._charsToAnnounce += e3, "\n" === e3 && (this._liveRegionLineCount++, 21 === this._liveRegionLineCount && (this._liveRegion.textContent += n.tooMuchOutput)));
142101
142105
  }
142102
142106
  _clearLiveRegion() {
142103
- this._liveRegion.textContent = "", this._liveRegionLineCount = 0, o.isMac && this._liveRegion.remove();
142107
+ this._liveRegion.textContent = "", this._liveRegionLineCount = 0;
142104
142108
  }
142105
142109
  _handleKey(e3) {
142106
142110
  this._clearLiveRegion(), /\p{Control}/u.test(e3) || this._charsToConsume.push(e3);
@@ -142111,8 +142115,8 @@ var CopilotOffice = (() => {
142111
142115
  _renderRows(e3, t3) {
142112
142116
  const i3 = this._terminal.buffer, s3 = i3.lines.length.toString();
142113
142117
  for (let r2 = e3; r2 <= t3; r2++) {
142114
- const e4 = i3.translateBufferLineToString(i3.ydisp + r2, true), t4 = (i3.ydisp + r2 + 1).toString(), n2 = this._rowElements[r2];
142115
- n2 && (0 === e4.length ? n2.innerText = "\xA0" : n2.textContent = e4, n2.setAttribute("aria-posinset", t4), n2.setAttribute("aria-setsize", s3));
142118
+ const e4 = i3.lines.get(i3.ydisp + r2), t4 = [], n2 = e4?.translateToString(true, void 0, void 0, t4) || "", o2 = (i3.ydisp + r2 + 1).toString(), a2 = this._rowElements[r2];
142119
+ a2 && (0 === n2.length ? (a2.innerText = "\xA0", this._rowColumns.set(a2, [0, 1])) : (a2.textContent = n2, this._rowColumns.set(a2, t4)), a2.setAttribute("aria-posinset", o2), a2.setAttribute("aria-setsize", s3));
142116
142120
  }
142117
142121
  this._announceCharacters();
142118
142122
  }
@@ -142133,6 +142137,30 @@ var CopilotOffice = (() => {
142133
142137
  }
142134
142138
  this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(0 === t3 ? -1 : 1), this._rowElements[0 === t3 ? 1 : this._rowElements.length - 2].focus(), e3.preventDefault(), e3.stopImmediatePropagation();
142135
142139
  }
142140
+ _handleSelectionChange() {
142141
+ if (0 === this._rowElements.length) return;
142142
+ const e3 = document.getSelection();
142143
+ if (!e3) return;
142144
+ if (e3.isCollapsed) return void (this._rowContainer.contains(e3.anchorNode) && this._terminal.clearSelection());
142145
+ if (!e3.anchorNode || !e3.focusNode) return void console.error("anchorNode and/or focusNode are null");
142146
+ let t3 = { node: e3.anchorNode, offset: e3.anchorOffset }, i3 = { node: e3.focusNode, offset: e3.focusOffset };
142147
+ if ((t3.node.compareDocumentPosition(i3.node) & Node.DOCUMENT_POSITION_PRECEDING || t3.node === i3.node && t3.offset > i3.offset) && ([t3, i3] = [i3, t3]), t3.node.compareDocumentPosition(this._rowElements[0]) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_FOLLOWING) && (t3 = { node: this._rowElements[0].childNodes[0], offset: 0 }), !this._rowContainer.contains(t3.node)) return;
142148
+ const s3 = this._rowElements.slice(-1)[0];
142149
+ if (i3.node.compareDocumentPosition(s3) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_PRECEDING) && (i3 = { node: s3, offset: s3.textContent?.length ?? 0 }), !this._rowContainer.contains(i3.node)) return;
142150
+ const r2 = ({ node: e4, offset: t4 }) => {
142151
+ const i4 = e4 instanceof Text ? e4.parentNode : e4;
142152
+ let s4 = parseInt(i4?.getAttribute("aria-posinset"), 10) - 1;
142153
+ if (isNaN(s4)) return console.warn("row is invalid. Race condition?"), null;
142154
+ const r3 = this._rowColumns.get(i4);
142155
+ if (!r3) return console.warn("columns is null. Race condition?"), null;
142156
+ let n3 = t4 < r3.length ? r3[t4] : r3.slice(-1)[0] + 1;
142157
+ return n3 >= this._terminal.cols && (++s4, n3 = 0), { row: s4, column: n3 };
142158
+ }, n2 = r2(t3), o2 = r2(i3);
142159
+ if (n2 && o2) {
142160
+ if (n2.row > o2.row || n2.row === o2.row && n2.column >= o2.column) throw new Error("invalid range");
142161
+ this._terminal.select(n2.column, n2.row, (o2.row - n2.row) * this._terminal.cols - n2.column + o2.column);
142162
+ }
142163
+ }
142136
142164
  _handleResize(e3) {
142137
142165
  this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
142138
142166
  for (let e4 = this._rowContainer.children.length; e4 < this._terminal.rows; e4++) this._rowElements[e4] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e4]);
@@ -142140,7 +142168,7 @@ var CopilotOffice = (() => {
142140
142168
  this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
142141
142169
  }
142142
142170
  _createAccessibilityTreeNode() {
142143
- const e3 = document.createElement("div");
142171
+ const e3 = this._coreBrowserService.mainDocument.createElement("div");
142144
142172
  return e3.setAttribute("role", "listitem"), e3.tabIndex = -1, this._refreshRowDimensions(e3), e3;
142145
142173
  }
142146
142174
  _refreshRowsDimensions() {
@@ -142153,7 +142181,7 @@ var CopilotOffice = (() => {
142153
142181
  e3.style.height = `${this._renderService.dimensions.css.cell.height}px`;
142154
142182
  }
142155
142183
  };
142156
- t2.AccessibilityManager = _ = s2([r(1, l.IRenderService)], _);
142184
+ t2.AccessibilityManager = d = s2([r(1, c.IInstantiationService), r(2, h.ICoreBrowserService), r(3, h.IRenderService)], d);
142157
142185
  }, 3614: (e2, t2) => {
142158
142186
  function i2(e3) {
142159
142187
  return e3.replace(/\r?\n/g, "\r");
@@ -142206,7 +142234,7 @@ var CopilotOffice = (() => {
142206
142234
  r || (r = true, e3.removeEventListener(t3, i2, s2));
142207
142235
  } };
142208
142236
  };
142209
- }, 6465: function(e2, t2, i2) {
142237
+ }, 3551: function(e2, t2, i2) {
142210
142238
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
142211
142239
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
142212
142240
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o2 = Reflect.decorate(e3, t3, i3, s3);
@@ -142217,32 +142245,23 @@ var CopilotOffice = (() => {
142217
142245
  t3(i3, s3, e3);
142218
142246
  };
142219
142247
  };
142220
- Object.defineProperty(t2, "__esModule", { value: true }), t2.Linkifier2 = void 0;
142221
- const n = i2(3656), o = i2(8460), a = i2(844), h = i2(2585);
142222
- let c = t2.Linkifier2 = class extends a.Disposable {
142248
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Linkifier = void 0;
142249
+ const n = i2(3656), o = i2(8460), a = i2(844), h = i2(2585), c = i2(4725);
142250
+ let l = t2.Linkifier = class extends a.Disposable {
142223
142251
  get currentLink() {
142224
142252
  return this._currentLink;
142225
142253
  }
142226
- constructor(e3) {
142227
- super(), this._bufferService = e3, this._linkProviders = [], this._linkCacheDisposables = [], this._isMouseOut = true, this._wasResized = false, this._activeLine = -1, this._onShowLinkUnderline = this.register(new o.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new o.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, a.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, a.toDisposable)((() => {
142228
- this._lastMouseEvent = void 0;
142254
+ constructor(e3, t3, i3, s3, r2) {
142255
+ super(), this._element = e3, this._mouseService = t3, this._renderService = i3, this._bufferService = s3, this._linkProviderService = r2, this._linkCacheDisposables = [], this._isMouseOut = true, this._wasResized = false, this._activeLine = -1, this._onShowLinkUnderline = this.register(new o.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new o.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, a.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, a.toDisposable)((() => {
142256
+ this._lastMouseEvent = void 0, this._activeProviderReplies?.clear();
142229
142257
  }))), this.register(this._bufferService.onResize((() => {
142230
142258
  this._clearCurrentLink(), this._wasResized = true;
142231
- })));
142232
- }
142233
- registerLinkProvider(e3) {
142234
- return this._linkProviders.push(e3), { dispose: () => {
142235
- const t3 = this._linkProviders.indexOf(e3);
142236
- -1 !== t3 && this._linkProviders.splice(t3, 1);
142237
- } };
142238
- }
142239
- attachToDom(e3, t3, i3) {
142240
- this._element = e3, this._mouseService = t3, this._renderService = i3, this.register((0, n.addDisposableDomListener)(this._element, "mouseleave", (() => {
142259
+ }))), this.register((0, n.addDisposableDomListener)(this._element, "mouseleave", (() => {
142241
142260
  this._isMouseOut = true, this._clearCurrentLink();
142242
142261
  }))), this.register((0, n.addDisposableDomListener)(this._element, "mousemove", this._handleMouseMove.bind(this))), this.register((0, n.addDisposableDomListener)(this._element, "mousedown", this._handleMouseDown.bind(this))), this.register((0, n.addDisposableDomListener)(this._element, "mouseup", this._handleMouseUp.bind(this)));
142243
142262
  }
142244
142263
  _handleMouseMove(e3) {
142245
- if (this._lastMouseEvent = e3, !this._element || !this._mouseService) return;
142264
+ this._lastMouseEvent = e3;
142246
142265
  const t3 = this._positionFromMouseEvent(e3, this._element, this._mouseService);
142247
142266
  if (!t3) return;
142248
142267
  this._isMouseOut = false;
@@ -142259,18 +142278,19 @@ var CopilotOffice = (() => {
142259
142278
  this._currentLink && this._linkAtPosition(this._currentLink.link, e3) || (this._clearCurrentLink(), this._askForLink(e3, true));
142260
142279
  }
142261
142280
  _askForLink(e3, t3) {
142262
- var i3, s3;
142263
- this._activeProviderReplies && t3 || (null === (i3 = this._activeProviderReplies) || void 0 === i3 || i3.forEach(((e4) => {
142264
- null == e4 || e4.forEach(((e5) => {
142281
+ this._activeProviderReplies && t3 || (this._activeProviderReplies?.forEach(((e4) => {
142282
+ e4?.forEach(((e5) => {
142265
142283
  e5.link.dispose && e5.link.dispose();
142266
142284
  }));
142267
142285
  })), this._activeProviderReplies = /* @__PURE__ */ new Map(), this._activeLine = e3.y);
142268
- let r2 = false;
142269
- for (const [i4, n2] of this._linkProviders.entries()) t3 ? (null === (s3 = this._activeProviderReplies) || void 0 === s3 ? void 0 : s3.get(i4)) && (r2 = this._checkLinkProviderResult(i4, e3, r2)) : n2.provideLinks(e3.y, ((t4) => {
142270
- var s4, n3;
142286
+ let i3 = false;
142287
+ for (const [s3, r2] of this._linkProviderService.linkProviders.entries()) if (t3) {
142288
+ const t4 = this._activeProviderReplies?.get(s3);
142289
+ t4 && (i3 = this._checkLinkProviderResult(s3, e3, i3));
142290
+ } else r2.provideLinks(e3.y, ((t4) => {
142271
142291
  if (this._isMouseOut) return;
142272
- const o2 = null == t4 ? void 0 : t4.map(((e4) => ({ link: e4 })));
142273
- null === (s4 = this._activeProviderReplies) || void 0 === s4 || s4.set(i4, o2), r2 = this._checkLinkProviderResult(i4, e3, r2), (null === (n3 = this._activeProviderReplies) || void 0 === n3 ? void 0 : n3.size) === this._linkProviders.length && this._removeIntersectingLinks(e3.y, this._activeProviderReplies);
142292
+ const r3 = t4?.map(((e4) => ({ link: e4 })));
142293
+ this._activeProviderReplies?.set(s3, r3), i3 = this._checkLinkProviderResult(s3, e3, i3), this._activeProviderReplies?.size === this._linkProviderService.linkProviders.length && this._removeIntersectingLinks(e3.y, this._activeProviderReplies);
142274
142294
  }));
142275
142295
  }
142276
142296
  _removeIntersectingLinks(e3, t3) {
@@ -142290,19 +142310,18 @@ var CopilotOffice = (() => {
142290
142310
  }
142291
142311
  }
142292
142312
  _checkLinkProviderResult(e3, t3, i3) {
142293
- var s3;
142294
142313
  if (!this._activeProviderReplies) return i3;
142295
- const r2 = this._activeProviderReplies.get(e3);
142296
- let n2 = false;
142297
- for (let t4 = 0; t4 < e3; t4++) this._activeProviderReplies.has(t4) && !this._activeProviderReplies.get(t4) || (n2 = true);
142298
- if (!n2 && r2) {
142299
- const e4 = r2.find(((e5) => this._linkAtPosition(e5.link, t3)));
142314
+ const s3 = this._activeProviderReplies.get(e3);
142315
+ let r2 = false;
142316
+ for (let t4 = 0; t4 < e3; t4++) this._activeProviderReplies.has(t4) && !this._activeProviderReplies.get(t4) || (r2 = true);
142317
+ if (!r2 && s3) {
142318
+ const e4 = s3.find(((e5) => this._linkAtPosition(e5.link, t3)));
142300
142319
  e4 && (i3 = true, this._handleNewLink(e4));
142301
142320
  }
142302
- if (this._activeProviderReplies.size === this._linkProviders.length && !i3) for (let e4 = 0; e4 < this._activeProviderReplies.size; e4++) {
142303
- const r3 = null === (s3 = this._activeProviderReplies.get(e4)) || void 0 === s3 ? void 0 : s3.find(((e5) => this._linkAtPosition(e5.link, t3)));
142304
- if (r3) {
142305
- i3 = true, this._handleNewLink(r3);
142321
+ if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !i3) for (let e4 = 0; e4 < this._activeProviderReplies.size; e4++) {
142322
+ const s4 = this._activeProviderReplies.get(e4)?.find(((e5) => this._linkAtPosition(e5.link, t3)));
142323
+ if (s4) {
142324
+ i3 = true, this._handleNewLink(s4);
142306
142325
  break;
142307
142326
  }
142308
142327
  }
@@ -142312,48 +142331,38 @@ var CopilotOffice = (() => {
142312
142331
  this._mouseDownLink = this._currentLink;
142313
142332
  }
142314
142333
  _handleMouseUp(e3) {
142315
- if (!this._element || !this._mouseService || !this._currentLink) return;
142334
+ if (!this._currentLink) return;
142316
142335
  const t3 = this._positionFromMouseEvent(e3, this._element, this._mouseService);
142317
142336
  t3 && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, t3) && this._currentLink.link.activate(e3, this._currentLink.link.text);
142318
142337
  }
142319
142338
  _clearCurrentLink(e3, t3) {
142320
- this._element && this._currentLink && this._lastMouseEvent && (!e3 || !t3 || this._currentLink.link.range.start.y >= e3 && this._currentLink.link.range.end.y <= t3) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, a.disposeArray)(this._linkCacheDisposables));
142339
+ this._currentLink && this._lastMouseEvent && (!e3 || !t3 || this._currentLink.link.range.start.y >= e3 && this._currentLink.link.range.end.y <= t3) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, a.disposeArray)(this._linkCacheDisposables));
142321
142340
  }
142322
142341
  _handleNewLink(e3) {
142323
- if (!this._element || !this._lastMouseEvent || !this._mouseService) return;
142342
+ if (!this._lastMouseEvent) return;
142324
142343
  const t3 = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
142325
- t3 && this._linkAtPosition(e3.link, t3) && (this._currentLink = e3, this._currentLink.state = { decorations: { underline: void 0 === e3.link.decorations || e3.link.decorations.underline, pointerCursor: void 0 === e3.link.decorations || e3.link.decorations.pointerCursor }, isHovered: true }, this._linkHover(this._element, e3.link, this._lastMouseEvent), e3.link.decorations = {}, Object.defineProperties(e3.link.decorations, { pointerCursor: { get: () => {
142326
- var e4, t4;
142327
- return null === (t4 = null === (e4 = this._currentLink) || void 0 === e4 ? void 0 : e4.state) || void 0 === t4 ? void 0 : t4.decorations.pointerCursor;
142328
- }, set: (e4) => {
142329
- var t4, i3;
142330
- (null === (t4 = this._currentLink) || void 0 === t4 ? void 0 : t4.state) && this._currentLink.state.decorations.pointerCursor !== e4 && (this._currentLink.state.decorations.pointerCursor = e4, this._currentLink.state.isHovered && (null === (i3 = this._element) || void 0 === i3 || i3.classList.toggle("xterm-cursor-pointer", e4)));
142331
- } }, underline: { get: () => {
142332
- var e4, t4;
142333
- return null === (t4 = null === (e4 = this._currentLink) || void 0 === e4 ? void 0 : e4.state) || void 0 === t4 ? void 0 : t4.decorations.underline;
142334
- }, set: (t4) => {
142335
- var i3, s3, r2;
142336
- (null === (i3 = this._currentLink) || void 0 === i3 ? void 0 : i3.state) && (null === (r2 = null === (s3 = this._currentLink) || void 0 === s3 ? void 0 : s3.state) || void 0 === r2 ? void 0 : r2.decorations.underline) !== t4 && (this._currentLink.state.decorations.underline = t4, this._currentLink.state.isHovered && this._fireUnderlineEvent(e3.link, t4));
142337
- } } }), this._renderService && this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(((e4) => {
142344
+ t3 && this._linkAtPosition(e3.link, t3) && (this._currentLink = e3, this._currentLink.state = { decorations: { underline: void 0 === e3.link.decorations || e3.link.decorations.underline, pointerCursor: void 0 === e3.link.decorations || e3.link.decorations.pointerCursor }, isHovered: true }, this._linkHover(this._element, e3.link, this._lastMouseEvent), e3.link.decorations = {}, Object.defineProperties(e3.link.decorations, { pointerCursor: { get: () => this._currentLink?.state?.decorations.pointerCursor, set: (e4) => {
142345
+ this._currentLink?.state && this._currentLink.state.decorations.pointerCursor !== e4 && (this._currentLink.state.decorations.pointerCursor = e4, this._currentLink.state.isHovered && this._element.classList.toggle("xterm-cursor-pointer", e4));
142346
+ } }, underline: { get: () => this._currentLink?.state?.decorations.underline, set: (t4) => {
142347
+ this._currentLink?.state && this._currentLink?.state?.decorations.underline !== t4 && (this._currentLink.state.decorations.underline = t4, this._currentLink.state.isHovered && this._fireUnderlineEvent(e3.link, t4));
142348
+ } } }), this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(((e4) => {
142338
142349
  if (!this._currentLink) return;
142339
142350
  const t4 = 0 === e4.start ? 0 : e4.start + 1 + this._bufferService.buffer.ydisp, i3 = this._bufferService.buffer.ydisp + 1 + e4.end;
142340
- if (this._currentLink.link.range.start.y >= t4 && this._currentLink.link.range.end.y <= i3 && (this._clearCurrentLink(t4, i3), this._lastMouseEvent && this._element)) {
142351
+ if (this._currentLink.link.range.start.y >= t4 && this._currentLink.link.range.end.y <= i3 && (this._clearCurrentLink(t4, i3), this._lastMouseEvent)) {
142341
142352
  const e5 = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
142342
142353
  e5 && this._askForLink(e5, false);
142343
142354
  }
142344
142355
  }))));
142345
142356
  }
142346
142357
  _linkHover(e3, t3, i3) {
142347
- var s3;
142348
- (null === (s3 = this._currentLink) || void 0 === s3 ? void 0 : s3.state) && (this._currentLink.state.isHovered = true, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t3, true), this._currentLink.state.decorations.pointerCursor && e3.classList.add("xterm-cursor-pointer")), t3.hover && t3.hover(i3, t3.text);
142358
+ this._currentLink?.state && (this._currentLink.state.isHovered = true, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t3, true), this._currentLink.state.decorations.pointerCursor && e3.classList.add("xterm-cursor-pointer")), t3.hover && t3.hover(i3, t3.text);
142349
142359
  }
142350
142360
  _fireUnderlineEvent(e3, t3) {
142351
142361
  const i3 = e3.range, s3 = this._bufferService.buffer.ydisp, r2 = this._createLinkUnderlineEvent(i3.start.x - 1, i3.start.y - s3 - 1, i3.end.x, i3.end.y - s3 - 1, void 0);
142352
142362
  (t3 ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(r2);
142353
142363
  }
142354
142364
  _linkLeave(e3, t3, i3) {
142355
- var s3;
142356
- (null === (s3 = this._currentLink) || void 0 === s3 ? void 0 : s3.state) && (this._currentLink.state.isHovered = false, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t3, false), this._currentLink.state.decorations.pointerCursor && e3.classList.remove("xterm-cursor-pointer")), t3.leave && t3.leave(i3, t3.text);
142365
+ this._currentLink?.state && (this._currentLink.state.isHovered = false, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t3, false), this._currentLink.state.decorations.pointerCursor && e3.classList.remove("xterm-cursor-pointer")), t3.leave && t3.leave(i3, t3.text);
142357
142366
  }
142358
142367
  _linkAtPosition(e3, t3) {
142359
142368
  const i3 = e3.range.start.y * this._bufferService.cols + e3.range.start.x, s3 = e3.range.end.y * this._bufferService.cols + e3.range.end.x, r2 = t3.y * this._bufferService.cols + t3.x;
@@ -142367,7 +142376,7 @@ var CopilotOffice = (() => {
142367
142376
  return { x1: e3, y1: t3, x2: i3, y2: s3, cols: this._bufferService.cols, fg: r2 };
142368
142377
  }
142369
142378
  };
142370
- t2.Linkifier2 = c = s2([r(0, h.IBufferService)], c);
142379
+ t2.Linkifier = l = s2([r(1, c.IMouseService), r(2, c.IRenderService), r(3, h.IBufferService), r(4, c.ILinkProviderService)], l);
142371
142380
  }, 9042: (e2, t2) => {
142372
142381
  Object.defineProperty(t2, "__esModule", { value: true }), t2.tooMuchOutput = t2.promptLabel = void 0, t2.promptLabel = "Terminal input", t2.tooMuchOutput = "Too much output to announce, navigate to rows manually to read";
142373
142382
  }, 3730: function(e2, t2, i2) {
@@ -142388,42 +142397,35 @@ var CopilotOffice = (() => {
142388
142397
  this._bufferService = e3, this._optionsService = t3, this._oscLinkService = i3;
142389
142398
  }
142390
142399
  provideLinks(e3, t3) {
142391
- var i3;
142392
- const s3 = this._bufferService.buffer.lines.get(e3 - 1);
142393
- if (!s3) return void t3(void 0);
142394
- const r2 = [], o2 = this._optionsService.rawOptions.linkHandler, a2 = new n.CellData(), c = s3.getTrimmedLength();
142395
- let l = -1, d = -1, _ = false;
142396
- for (let t4 = 0; t4 < c; t4++) if (-1 !== d || s3.hasContent(t4)) {
142397
- if (s3.loadCell(t4, a2), a2.hasExtendedAttrs() && a2.extended.urlId) {
142398
- if (-1 === d) {
142399
- d = t4, l = a2.extended.urlId;
142400
+ const i3 = this._bufferService.buffer.lines.get(e3 - 1);
142401
+ if (!i3) return void t3(void 0);
142402
+ const s3 = [], r2 = this._optionsService.rawOptions.linkHandler, o2 = new n.CellData(), a2 = i3.getTrimmedLength();
142403
+ let c = -1, l = -1, d = false;
142404
+ for (let t4 = 0; t4 < a2; t4++) if (-1 !== l || i3.hasContent(t4)) {
142405
+ if (i3.loadCell(t4, o2), o2.hasExtendedAttrs() && o2.extended.urlId) {
142406
+ if (-1 === l) {
142407
+ l = t4, c = o2.extended.urlId;
142400
142408
  continue;
142401
142409
  }
142402
- _ = a2.extended.urlId !== l;
142403
- } else -1 !== d && (_ = true);
142404
- if (_ || -1 !== d && t4 === c - 1) {
142405
- const s4 = null === (i3 = this._oscLinkService.getLinkData(l)) || void 0 === i3 ? void 0 : i3.uri;
142406
- if (s4) {
142407
- const i4 = { start: { x: d + 1, y: e3 }, end: { x: t4 + (_ || t4 !== c - 1 ? 0 : 1), y: e3 } };
142408
- let n2 = false;
142409
- if (!(null == o2 ? void 0 : o2.allowNonHttpProtocols)) try {
142410
- const e4 = new URL(s4);
142411
- ["http:", "https:"].includes(e4.protocol) || (n2 = true);
142410
+ d = o2.extended.urlId !== c;
142411
+ } else -1 !== l && (d = true);
142412
+ if (d || -1 !== l && t4 === a2 - 1) {
142413
+ const i4 = this._oscLinkService.getLinkData(c)?.uri;
142414
+ if (i4) {
142415
+ const n2 = { start: { x: l + 1, y: e3 }, end: { x: t4 + (d || t4 !== a2 - 1 ? 0 : 1), y: e3 } };
142416
+ let o3 = false;
142417
+ if (!r2?.allowNonHttpProtocols) try {
142418
+ const e4 = new URL(i4);
142419
+ ["http:", "https:"].includes(e4.protocol) || (o3 = true);
142412
142420
  } catch (e4) {
142413
- n2 = true;
142414
- }
142415
- n2 || r2.push({ text: s4, range: i4, activate: (e4, t5) => o2 ? o2.activate(e4, t5, i4) : h(0, t5), hover: (e4, t5) => {
142416
- var s5;
142417
- return null === (s5 = null == o2 ? void 0 : o2.hover) || void 0 === s5 ? void 0 : s5.call(o2, e4, t5, i4);
142418
- }, leave: (e4, t5) => {
142419
- var s5;
142420
- return null === (s5 = null == o2 ? void 0 : o2.leave) || void 0 === s5 ? void 0 : s5.call(o2, e4, t5, i4);
142421
- } });
142421
+ o3 = true;
142422
+ }
142423
+ o3 || s3.push({ text: i4, range: n2, activate: (e4, t5) => r2 ? r2.activate(e4, t5, n2) : h(0, t5), hover: (e4, t5) => r2?.hover?.(e4, t5, n2), leave: (e4, t5) => r2?.leave?.(e4, t5, n2) });
142422
142424
  }
142423
- _ = false, a2.hasExtendedAttrs() && a2.extended.urlId ? (d = t4, l = a2.extended.urlId) : (d = -1, l = -1);
142425
+ d = false, o2.hasExtendedAttrs() && o2.extended.urlId ? (l = t4, c = o2.extended.urlId) : (l = -1, c = -1);
142424
142426
  }
142425
142427
  }
142426
- t3(r2);
142428
+ t3(s3);
142427
142429
  }
142428
142430
  };
142429
142431
  function h(e3, t3) {
@@ -142434,7 +142436,7 @@ WARNING: This link could potentially be dangerous`)) {
142434
142436
  if (e4) {
142435
142437
  try {
142436
142438
  e4.opener = null;
142437
- } catch (e5) {
142439
+ } catch {
142438
142440
  }
142439
142441
  e4.location.href = t3;
142440
142442
  } else console.warn("Opening link blocked as opener could not be cleared");
@@ -142444,16 +142446,16 @@ WARNING: This link could potentially be dangerous`)) {
142444
142446
  }, 6193: (e2, t2) => {
142445
142447
  Object.defineProperty(t2, "__esModule", { value: true }), t2.RenderDebouncer = void 0, t2.RenderDebouncer = class {
142446
142448
  constructor(e3, t3) {
142447
- this._parentWindow = e3, this._renderCallback = t3, this._refreshCallbacks = [];
142449
+ this._renderCallback = e3, this._coreBrowserService = t3, this._refreshCallbacks = [];
142448
142450
  }
142449
142451
  dispose() {
142450
- this._animationFrame && (this._parentWindow.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
142452
+ this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
142451
142453
  }
142452
142454
  addRefreshCallback(e3) {
142453
- return this._refreshCallbacks.push(e3), this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame((() => this._innerRefresh()))), this._animationFrame;
142455
+ return this._refreshCallbacks.push(e3), this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame((() => this._innerRefresh()))), this._animationFrame;
142454
142456
  }
142455
142457
  refresh(e3, t3, i2) {
142456
- this._rowCount = i2, e3 = void 0 !== e3 ? e3 : 0, t3 = void 0 !== t3 ? t3 : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e3) : e3, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t3) : t3, this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame((() => this._innerRefresh())));
142458
+ this._rowCount = i2, e3 = void 0 !== e3 ? e3 : 0, t3 = void 0 !== t3 ? t3 : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e3) : e3, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t3) : t3, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame((() => this._innerRefresh())));
142457
142459
  }
142458
142460
  _innerRefresh() {
142459
142461
  if (this._animationFrame = void 0, void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return void this._runRefreshCallbacks();
@@ -142465,33 +142467,10 @@ WARNING: This link could potentially be dangerous`)) {
142465
142467
  this._refreshCallbacks = [];
142466
142468
  }
142467
142469
  };
142468
- }, 5596: (e2, t2, i2) => {
142469
- Object.defineProperty(t2, "__esModule", { value: true }), t2.ScreenDprMonitor = void 0;
142470
- const s2 = i2(844);
142471
- class r extends s2.Disposable {
142472
- constructor(e3) {
142473
- super(), this._parentWindow = e3, this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this.register((0, s2.toDisposable)((() => {
142474
- this.clearListener();
142475
- })));
142476
- }
142477
- setListener(e3) {
142478
- this._listener && this.clearListener(), this._listener = e3, this._outerListener = () => {
142479
- this._listener && (this._listener(this._parentWindow.devicePixelRatio, this._currentDevicePixelRatio), this._updateDpr());
142480
- }, this._updateDpr();
142481
- }
142482
- _updateDpr() {
142483
- var e3;
142484
- this._outerListener && (null === (e3 = this._resolutionMediaMatchList) || void 0 === e3 || e3.removeListener(this._outerListener), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._resolutionMediaMatchList = this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`), this._resolutionMediaMatchList.addListener(this._outerListener));
142485
- }
142486
- clearListener() {
142487
- this._resolutionMediaMatchList && this._listener && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._listener = void 0, this._outerListener = void 0);
142488
- }
142489
- }
142490
- t2.ScreenDprMonitor = r;
142491
142470
  }, 3236: (e2, t2, i2) => {
142492
142471
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Terminal = void 0;
142493
- const s2 = i2(3614), r = i2(3656), n = i2(6465), o = i2(9042), a = i2(3730), h = i2(1680), c = i2(3107), l = i2(5744), d = i2(2950), _ = i2(1296), u = i2(428), f = i2(4269), v = i2(5114), p = i2(8934), g = i2(3230), m = i2(9312), S = i2(4725), C = i2(6731), b = i2(8055), y = i2(8969), w = i2(8460), E = i2(844), k = i2(6114), L = i2(8437), D2 = i2(2584), R = i2(7399), x = i2(5941), A = i2(9074), B = i2(2585), T = i2(5435), M = i2(4567), O = "undefined" != typeof window ? window.document : null;
142494
- class P extends y.CoreTerminal {
142472
+ const s2 = i2(3614), r = i2(3656), n = i2(3551), o = i2(9042), a = i2(3730), h = i2(1680), c = i2(3107), l = i2(5744), d = i2(2950), _ = i2(1296), u = i2(428), f = i2(4269), v = i2(5114), p = i2(8934), g = i2(3230), m = i2(9312), S = i2(4725), C = i2(6731), b = i2(8055), w = i2(8969), y = i2(8460), E = i2(844), k = i2(6114), L = i2(8437), D2 = i2(2584), R = i2(7399), x = i2(5941), A = i2(9074), B = i2(2585), T = i2(5435), M = i2(4567), O = i2(779);
142473
+ class P extends w.CoreTerminal {
142495
142474
  get onFocus() {
142496
142475
  return this._onFocus.event;
142497
142476
  }
@@ -142508,9 +142487,8 @@ WARNING: This link could potentially be dangerous`)) {
142508
142487
  return this._onWillOpen.event;
142509
142488
  }
142510
142489
  constructor(e3 = {}) {
142511
- super(e3), this.browser = k, this._keyDownHandled = false, this._keyDownSeen = false, this._keyPressHandled = false, this._unprocessedDeadKey = false, this._accessibilityManager = this.register(new E.MutableDisposable()), this._onCursorMove = this.register(new w.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new w.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new w.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new w.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new w.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new w.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new w.EventEmitter()), this._onBlur = this.register(new w.EventEmitter()), this._onA11yCharEmitter = this.register(new w.EventEmitter()), this._onA11yTabEmitter = this.register(new w.EventEmitter()), this._onWillOpen = this.register(new w.EventEmitter()), this._setup(), this.linkifier2 = this.register(this._instantiationService.createInstance(n.Linkifier2)), this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(a.OscLinkProvider)), this._decorationService = this._instantiationService.createInstance(A.DecorationService), this._instantiationService.setService(B.IDecorationService, this._decorationService), this.register(this._inputHandler.onRequestBell((() => this._onBell.fire()))), this.register(this._inputHandler.onRequestRefreshRows(((e4, t3) => this.refresh(e4, t3)))), this.register(this._inputHandler.onRequestSendFocus((() => this._reportFocus()))), this.register(this._inputHandler.onRequestReset((() => this.reset()))), this.register(this._inputHandler.onRequestWindowsOptionsReport(((e4) => this._reportWindowsOptions(e4)))), this.register(this._inputHandler.onColor(((e4) => this._handleColorEvent(e4)))), this.register((0, w.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, w.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, w.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, w.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize(((e4) => this._afterResize(e4.cols, e4.rows)))), this.register((0, E.toDisposable)((() => {
142512
- var e4, t3;
142513
- this._customKeyEventHandler = void 0, null === (t3 = null === (e4 = this.element) || void 0 === e4 ? void 0 : e4.parentNode) || void 0 === t3 || t3.removeChild(this.element);
142490
+ super(e3), this.browser = k, this._keyDownHandled = false, this._keyDownSeen = false, this._keyPressHandled = false, this._unprocessedDeadKey = false, this._accessibilityManager = this.register(new E.MutableDisposable()), this._onCursorMove = this.register(new y.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new y.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new y.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new y.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new y.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new y.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new y.EventEmitter()), this._onBlur = this.register(new y.EventEmitter()), this._onA11yCharEmitter = this.register(new y.EventEmitter()), this._onA11yTabEmitter = this.register(new y.EventEmitter()), this._onWillOpen = this.register(new y.EventEmitter()), this._setup(), this._decorationService = this._instantiationService.createInstance(A.DecorationService), this._instantiationService.setService(B.IDecorationService, this._decorationService), this._linkProviderService = this._instantiationService.createInstance(O.LinkProviderService), this._instantiationService.setService(S.ILinkProviderService, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(a.OscLinkProvider)), this.register(this._inputHandler.onRequestBell((() => this._onBell.fire()))), this.register(this._inputHandler.onRequestRefreshRows(((e4, t3) => this.refresh(e4, t3)))), this.register(this._inputHandler.onRequestSendFocus((() => this._reportFocus()))), this.register(this._inputHandler.onRequestReset((() => this.reset()))), this.register(this._inputHandler.onRequestWindowsOptionsReport(((e4) => this._reportWindowsOptions(e4)))), this.register(this._inputHandler.onColor(((e4) => this._handleColorEvent(e4)))), this.register((0, y.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, y.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, y.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, y.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize(((e4) => this._afterResize(e4.cols, e4.rows)))), this.register((0, E.toDisposable)((() => {
142491
+ this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
142514
142492
  })));
142515
142493
  }
142516
142494
  _handleColorEvent(e3) {
@@ -142535,10 +142513,10 @@ WARNING: This link could potentially be dangerous`)) {
142535
142513
  this.coreService.triggerDataEvent(`${D2.C0.ESC}]${i3};${(0, x.toRgbString)(s3)}${D2.C1_ESCAPED.ST}`);
142536
142514
  break;
142537
142515
  case 1:
142538
- if ("ansi" === e4) this._themeService.modifyColors(((e5) => e5.ansi[t3.index] = b.rgba.toColor(...t3.color)));
142516
+ if ("ansi" === e4) this._themeService.modifyColors(((e5) => e5.ansi[t3.index] = b.channels.toColor(...t3.color)));
142539
142517
  else {
142540
142518
  const i4 = e4;
142541
- this._themeService.modifyColors(((e5) => e5[i4] = b.rgba.toColor(...t3.color)));
142519
+ this._themeService.modifyColors(((e5) => e5[i4] = b.channels.toColor(...t3.color)));
142542
142520
  }
142543
142521
  break;
142544
142522
  case 2:
@@ -142559,11 +142537,10 @@ WARNING: This link could potentially be dangerous`)) {
142559
142537
  e3 ? !this._accessibilityManager.value && this._renderService && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)) : this._accessibilityManager.clear();
142560
142538
  }
142561
142539
  _handleTextAreaFocus(e3) {
142562
- this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D2.C0.ESC + "[I"), this.updateCursorStyle(e3), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
142540
+ this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D2.C0.ESC + "[I"), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
142563
142541
  }
142564
142542
  blur() {
142565
- var e3;
142566
- return null === (e3 = this.textarea) || void 0 === e3 ? void 0 : e3.blur();
142543
+ return this.textarea?.blur();
142567
142544
  }
142568
142545
  _handleTextAreaBlur() {
142569
142546
  this.textarea.value = "", this.refresh(this.buffer.y, this.buffer.y), this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D2.C0.ESC + "[O"), this.element.classList.remove("focus"), this._onBlur.fire();
@@ -142592,27 +142569,27 @@ WARNING: This link could potentially be dangerous`)) {
142592
142569
  this.register((0, r.addDisposableDomListener)(this.textarea, "keyup", ((e3) => this._keyUp(e3)), true)), this.register((0, r.addDisposableDomListener)(this.textarea, "keydown", ((e3) => this._keyDown(e3)), true)), this.register((0, r.addDisposableDomListener)(this.textarea, "keypress", ((e3) => this._keyPress(e3)), true)), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionstart", (() => this._compositionHelper.compositionstart()))), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionupdate", ((e3) => this._compositionHelper.compositionupdate(e3)))), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionend", (() => this._compositionHelper.compositionend()))), this.register((0, r.addDisposableDomListener)(this.textarea, "input", ((e3) => this._inputEvent(e3)), true)), this.register(this.onRender((() => this._compositionHelper.updateCompositionElements())));
142593
142570
  }
142594
142571
  open(e3) {
142595
- var t3;
142596
142572
  if (!e3) throw new Error("Terminal requires a parent element.");
142597
- e3.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this._document = e3.ownerDocument, this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), e3.appendChild(this.element);
142598
- const i3 = O.createDocumentFragment();
142599
- this._viewportElement = O.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), i3.appendChild(this._viewportElement), this._viewportScrollArea = O.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = O.createElement("div"), this.screenElement.classList.add("xterm-screen"), this._helperContainer = O.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), i3.appendChild(this.screenElement), this.textarea = O.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", o.promptLabel), k.isChromeOS || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._coreBrowserService = this._instantiationService.createInstance(v.CoreBrowserService, this.textarea, null !== (t3 = this._document.defaultView) && void 0 !== t3 ? t3 : window), this._instantiationService.setService(S.ICoreBrowserService, this._coreBrowserService), this.register((0, r.addDisposableDomListener)(this.textarea, "focus", ((e4) => this._handleTextAreaFocus(e4)))), this.register((0, r.addDisposableDomListener)(this.textarea, "blur", (() => this._handleTextAreaBlur()))), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(u.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(S.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(C.ThemeService), this._instantiationService.setService(S.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(f.CharacterJoinerService), this._instantiationService.setService(S.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(g.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(S.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange(((e4) => this._onRender.fire(e4)))), this.onResize(((e4) => this._renderService.resize(e4.cols, e4.rows))), this._compositionView = O.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(d.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this.element.appendChild(i3);
142573
+ if (e3.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this.element?.ownerDocument.defaultView && this._coreBrowserService) return void (this.element.ownerDocument.defaultView !== this._coreBrowserService.window && (this._coreBrowserService.window = this.element.ownerDocument.defaultView));
142574
+ this._document = e3.ownerDocument, this.options.documentOverride && this.options.documentOverride instanceof Document && (this._document = this.optionsService.rawOptions.documentOverride), this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), e3.appendChild(this.element);
142575
+ const t3 = this._document.createDocumentFragment();
142576
+ this._viewportElement = this._document.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), t3.appendChild(this._viewportElement), this._viewportScrollArea = this._document.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = this._document.createElement("div"), this.screenElement.classList.add("xterm-screen"), this.register((0, r.addDisposableDomListener)(this.screenElement, "mousemove", ((e4) => this.updateCursorStyle(e4)))), this._helperContainer = this._document.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), t3.appendChild(this.screenElement), this.textarea = this._document.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", o.promptLabel), k.isChromeOS || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._coreBrowserService = this.register(this._instantiationService.createInstance(v.CoreBrowserService, this.textarea, e3.ownerDocument.defaultView ?? window, this._document ?? "undefined" != typeof window ? window.document : null)), this._instantiationService.setService(S.ICoreBrowserService, this._coreBrowserService), this.register((0, r.addDisposableDomListener)(this.textarea, "focus", ((e4) => this._handleTextAreaFocus(e4)))), this.register((0, r.addDisposableDomListener)(this.textarea, "blur", (() => this._handleTextAreaBlur()))), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(u.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(S.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(C.ThemeService), this._instantiationService.setService(S.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(f.CharacterJoinerService), this._instantiationService.setService(S.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(g.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(S.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange(((e4) => this._onRender.fire(e4)))), this.onResize(((e4) => this._renderService.resize(e4.cols, e4.rows))), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(d.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseService = this._instantiationService.createInstance(p.MouseService), this._instantiationService.setService(S.IMouseService, this._mouseService), this.linkifier = this.register(this._instantiationService.createInstance(n.Linkifier, this.screenElement)), this.element.appendChild(t3);
142600
142577
  try {
142601
142578
  this._onWillOpen.fire(this.element);
142602
- } catch (e4) {
142579
+ } catch {
142603
142580
  }
142604
- this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this._mouseService = this._instantiationService.createInstance(p.MouseService), this._instantiationService.setService(S.IMouseService, this._mouseService), this.viewport = this._instantiationService.createInstance(h.Viewport, this._viewportElement, this._viewportScrollArea), this.viewport.onRequestScrollLines(((e4) => this.scrollLines(e4.amount, e4.suppressScrollEvent, 1))), this.register(this._inputHandler.onRequestSyncScrollBar((() => this.viewport.syncScrollArea()))), this.register(this.viewport), this.register(this.onCursorMove((() => {
142581
+ this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this.viewport = this._instantiationService.createInstance(h.Viewport, this._viewportElement, this._viewportScrollArea), this.viewport.onRequestScrollLines(((e4) => this.scrollLines(e4.amount, e4.suppressScrollEvent, 1))), this.register(this._inputHandler.onRequestSyncScrollBar((() => this.viewport.syncScrollArea()))), this.register(this.viewport), this.register(this.onCursorMove((() => {
142605
142582
  this._renderService.handleCursorMove(), this._syncTextArea();
142606
- }))), this.register(this.onResize((() => this._renderService.handleResize(this.cols, this.rows)))), this.register(this.onBlur((() => this._renderService.handleBlur()))), this.register(this.onFocus((() => this._renderService.handleFocus()))), this.register(this._renderService.onDimensionsChange((() => this.viewport.syncScrollArea()))), this._selectionService = this.register(this._instantiationService.createInstance(m.SelectionService, this.element, this.screenElement, this.linkifier2)), this._instantiationService.setService(S.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines(((e4) => this.scrollLines(e4.amount, e4.suppressScrollEvent)))), this.register(this._selectionService.onSelectionChange((() => this._onSelectionChange.fire()))), this.register(this._selectionService.onRequestRedraw(((e4) => this._renderService.handleSelectionChanged(e4.start, e4.end, e4.columnSelectMode)))), this.register(this._selectionService.onLinuxMouseSelection(((e4) => {
142583
+ }))), this.register(this.onResize((() => this._renderService.handleResize(this.cols, this.rows)))), this.register(this.onBlur((() => this._renderService.handleBlur()))), this.register(this.onFocus((() => this._renderService.handleFocus()))), this.register(this._renderService.onDimensionsChange((() => this.viewport.syncScrollArea()))), this._selectionService = this.register(this._instantiationService.createInstance(m.SelectionService, this.element, this.screenElement, this.linkifier)), this._instantiationService.setService(S.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines(((e4) => this.scrollLines(e4.amount, e4.suppressScrollEvent)))), this.register(this._selectionService.onSelectionChange((() => this._onSelectionChange.fire()))), this.register(this._selectionService.onRequestRedraw(((e4) => this._renderService.handleSelectionChanged(e4.start, e4.end, e4.columnSelectMode)))), this.register(this._selectionService.onLinuxMouseSelection(((e4) => {
142607
142584
  this.textarea.value = e4, this.textarea.focus(), this.textarea.select();
142608
142585
  }))), this.register(this._onScroll.event(((e4) => {
142609
142586
  this.viewport.syncScrollArea(), this._selectionService.refresh();
142610
- }))), this.register((0, r.addDisposableDomListener)(this._viewportElement, "scroll", (() => this._selectionService.refresh()))), this.linkifier2.attachToDom(this.screenElement, this._mouseService, this._renderService), this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer, this.screenElement)), this.register((0, r.addDisposableDomListener)(this.element, "mousedown", ((e4) => this._selectionService.handleMouseDown(e4)))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", ((e4) => this._handleScreenReaderModeOptionChange(e4)))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", ((e4) => {
142587
+ }))), this.register((0, r.addDisposableDomListener)(this._viewportElement, "scroll", (() => this._selectionService.refresh()))), this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer, this.screenElement)), this.register((0, r.addDisposableDomListener)(this.element, "mousedown", ((e4) => this._selectionService.handleMouseDown(e4)))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", ((e4) => this._handleScreenReaderModeOptionChange(e4)))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", ((e4) => {
142611
142588
  !this._overviewRulerRenderer && e4 && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
142612
142589
  })), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
142613
142590
  }
142614
142591
  _createRenderer() {
142615
- return this._instantiationService.createInstance(_.DomRenderer, this.element, this.screenElement, this._viewportElement, this.linkifier2);
142592
+ return this._instantiationService.createInstance(_.DomRenderer, this, this._document, this.element, this.screenElement, this._viewportElement, this._helperContainer, this.linkifier);
142616
142593
  }
142617
142594
  bindMouse() {
142618
142595
  const e3 = this, t3 = this.element;
@@ -142631,6 +142608,7 @@ WARNING: This link could potentially be dangerous`)) {
142631
142608
  r2 = 1, s4 = t4.button < 3 ? t4.button : 3;
142632
142609
  break;
142633
142610
  case "wheel":
142611
+ if (e3._customWheelEventHandler && false === e3._customWheelEventHandler(t4)) return false;
142634
142612
  if (0 === e3.viewport.getLinesScrolled(t4)) return false;
142635
142613
  r2 = t4.deltaY < 0 ? 0 : 1, s4 = 4;
142636
142614
  break;
@@ -142645,11 +142623,12 @@ WARNING: This link could potentially be dangerous`)) {
142645
142623
  e4.buttons || i3(e4);
142646
142624
  } };
142647
142625
  this.register(this.coreMouseService.onProtocolChange(((e4) => {
142648
- e4 ? ("debug" === this.optionsService.rawOptions.logLevel && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(e4)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), 8 & e4 ? s3.mousemove || (t3.addEventListener("mousemove", n2.mousemove), s3.mousemove = n2.mousemove) : (t3.removeEventListener("mousemove", s3.mousemove), s3.mousemove = null), 16 & e4 ? s3.wheel || (t3.addEventListener("wheel", n2.wheel, { passive: false }), s3.wheel = n2.wheel) : (t3.removeEventListener("wheel", s3.wheel), s3.wheel = null), 2 & e4 ? s3.mouseup || (t3.addEventListener("mouseup", n2.mouseup), s3.mouseup = n2.mouseup) : (this._document.removeEventListener("mouseup", s3.mouseup), t3.removeEventListener("mouseup", s3.mouseup), s3.mouseup = null), 4 & e4 ? s3.mousedrag || (s3.mousedrag = n2.mousedrag) : (this._document.removeEventListener("mousemove", s3.mousedrag), s3.mousedrag = null);
142626
+ e4 ? ("debug" === this.optionsService.rawOptions.logLevel && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(e4)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), 8 & e4 ? s3.mousemove || (t3.addEventListener("mousemove", n2.mousemove), s3.mousemove = n2.mousemove) : (t3.removeEventListener("mousemove", s3.mousemove), s3.mousemove = null), 16 & e4 ? s3.wheel || (t3.addEventListener("wheel", n2.wheel, { passive: false }), s3.wheel = n2.wheel) : (t3.removeEventListener("wheel", s3.wheel), s3.wheel = null), 2 & e4 ? s3.mouseup || (s3.mouseup = n2.mouseup) : (this._document.removeEventListener("mouseup", s3.mouseup), s3.mouseup = null), 4 & e4 ? s3.mousedrag || (s3.mousedrag = n2.mousedrag) : (this._document.removeEventListener("mousemove", s3.mousedrag), s3.mousedrag = null);
142649
142627
  }))), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, r.addDisposableDomListener)(t3, "mousedown", ((e4) => {
142650
142628
  if (e4.preventDefault(), this.focus(), this.coreMouseService.areMouseEventsActive && !this._selectionService.shouldForceSelection(e4)) return i3(e4), s3.mouseup && this._document.addEventListener("mouseup", s3.mouseup), s3.mousedrag && this._document.addEventListener("mousemove", s3.mousedrag), this.cancel(e4);
142651
142629
  }))), this.register((0, r.addDisposableDomListener)(t3, "wheel", ((e4) => {
142652
142630
  if (!s3.wheel) {
142631
+ if (this._customWheelEventHandler && false === this._customWheelEventHandler(e4)) return false;
142653
142632
  if (!this.buffer.hasScrollback) {
142654
142633
  const t4 = this.viewport.getLinesScrolled(e4);
142655
142634
  if (0 === t4) return;
@@ -142667,19 +142646,16 @@ WARNING: This link could potentially be dangerous`)) {
142667
142646
  }), { passive: false }));
142668
142647
  }
142669
142648
  refresh(e3, t3) {
142670
- var i3;
142671
- null === (i3 = this._renderService) || void 0 === i3 || i3.refreshRows(e3, t3);
142649
+ this._renderService?.refreshRows(e3, t3);
142672
142650
  }
142673
142651
  updateCursorStyle(e3) {
142674
- var t3;
142675
- (null === (t3 = this._selectionService) || void 0 === t3 ? void 0 : t3.shouldColumnSelect(e3)) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
142652
+ this._selectionService?.shouldColumnSelect(e3) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
142676
142653
  }
142677
142654
  _showCursor() {
142678
142655
  this.coreService.isCursorInitialized || (this.coreService.isCursorInitialized = true, this.refresh(this.buffer.y, this.buffer.y));
142679
142656
  }
142680
142657
  scrollLines(e3, t3, i3 = 0) {
142681
- var s3;
142682
- 1 === i3 ? (super.scrollLines(e3, t3, i3), this.refresh(0, this.rows - 1)) : null === (s3 = this.viewport) || void 0 === s3 || s3.scrollLines(e3);
142658
+ 1 === i3 ? (super.scrollLines(e3, t3, i3), this.refresh(0, this.rows - 1)) : this.viewport?.scrollLines(e3);
142683
142659
  }
142684
142660
  paste(e3) {
142685
142661
  (0, s2.paste)(e3, this.textarea, this.coreService, this.optionsService);
@@ -142687,8 +142663,11 @@ WARNING: This link could potentially be dangerous`)) {
142687
142663
  attachCustomKeyEventHandler(e3) {
142688
142664
  this._customKeyEventHandler = e3;
142689
142665
  }
142666
+ attachCustomWheelEventHandler(e3) {
142667
+ this._customWheelEventHandler = e3;
142668
+ }
142690
142669
  registerLinkProvider(e3) {
142691
- return this.linkifier2.registerLinkProvider(e3);
142670
+ return this._linkProviderService.registerLinkProvider(e3);
142692
142671
  }
142693
142672
  registerCharacterJoiner(e3) {
142694
142673
  if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
@@ -142721,16 +142700,13 @@ WARNING: This link could potentially be dangerous`)) {
142721
142700
  if (this._selectionService && this._selectionService.hasSelection) return { start: { x: this._selectionService.selectionStart[0], y: this._selectionService.selectionStart[1] }, end: { x: this._selectionService.selectionEnd[0], y: this._selectionService.selectionEnd[1] } };
142722
142701
  }
142723
142702
  clearSelection() {
142724
- var e3;
142725
- null === (e3 = this._selectionService) || void 0 === e3 || e3.clearSelection();
142703
+ this._selectionService?.clearSelection();
142726
142704
  }
142727
142705
  selectAll() {
142728
- var e3;
142729
- null === (e3 = this._selectionService) || void 0 === e3 || e3.selectAll();
142706
+ this._selectionService?.selectAll();
142730
142707
  }
142731
142708
  selectLines(e3, t3) {
142732
- var i3;
142733
- null === (i3 = this._selectionService) || void 0 === i3 || i3.selectLines(e3, t3);
142709
+ this._selectionService?.selectLines(e3, t3);
142734
142710
  }
142735
142711
  _keyDown(e3) {
142736
142712
  if (this._keyDownHandled = false, this._keyDownSeen = true, this._customKeyEventHandler && false === this._customKeyEventHandler(e3)) return false;
@@ -142778,30 +142754,25 @@ WARNING: This link could potentially be dangerous`)) {
142778
142754
  e3 !== this.cols || t3 !== this.rows ? super.resize(e3, t3) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
142779
142755
  }
142780
142756
  _afterResize(e3, t3) {
142781
- var i3, s3;
142782
- null === (i3 = this._charSizeService) || void 0 === i3 || i3.measure(), null === (s3 = this.viewport) || void 0 === s3 || s3.syncScrollArea(true);
142757
+ this._charSizeService?.measure(), this.viewport?.syncScrollArea(true);
142783
142758
  }
142784
142759
  clear() {
142785
- var e3;
142786
142760
  if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
142787
142761
  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;
142788
- for (let e4 = 1; e4 < this.rows; e4++) this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));
142789
- this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }), null === (e3 = this.viewport) || void 0 === e3 || e3.reset(), this.refresh(0, this.rows - 1);
142762
+ for (let e3 = 1; e3 < this.rows; e3++) this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));
142763
+ this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }), this.viewport?.reset(), this.refresh(0, this.rows - 1);
142790
142764
  }
142791
142765
  }
142792
142766
  reset() {
142793
- var e3, t3;
142794
142767
  this.options.rows = this.rows, this.options.cols = this.cols;
142795
- const i3 = this._customKeyEventHandler;
142796
- this._setup(), super.reset(), null === (e3 = this._selectionService) || void 0 === e3 || e3.reset(), this._decorationService.reset(), null === (t3 = this.viewport) || void 0 === t3 || t3.reset(), this._customKeyEventHandler = i3, this.refresh(0, this.rows - 1);
142768
+ const e3 = this._customKeyEventHandler;
142769
+ this._setup(), super.reset(), this._selectionService?.reset(), this._decorationService.reset(), this.viewport?.reset(), this._customKeyEventHandler = e3, this.refresh(0, this.rows - 1);
142797
142770
  }
142798
142771
  clearTextureAtlas() {
142799
- var e3;
142800
- null === (e3 = this._renderService) || void 0 === e3 || e3.clearTextureAtlas();
142772
+ this._renderService?.clearTextureAtlas();
142801
142773
  }
142802
142774
  _reportFocus() {
142803
- var e3;
142804
- (null === (e3 = this.element) || void 0 === e3 ? void 0 : e3.classList.contains("focus")) ? this.coreService.triggerDataEvent(D2.C0.ESC + "[I") : this.coreService.triggerDataEvent(D2.C0.ESC + "[O");
142775
+ this.element?.classList.contains("focus") ? this.coreService.triggerDataEvent(D2.C0.ESC + "[I") : this.coreService.triggerDataEvent(D2.C0.ESC + "[O");
142805
142776
  }
142806
142777
  _reportWindowsOptions(e3) {
142807
142778
  if (this._renderService) switch (e3) {
@@ -142873,8 +142844,8 @@ WARNING: This link could potentially be dangerous`)) {
142873
142844
  }
142874
142845
  _innerRefresh() {
142875
142846
  if (this._charSizeService.height > 0) {
142876
- this._currentRowHeight = this._renderService.dimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderService.dimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
142877
- const e4 = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.css.canvas.height);
142847
+ this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderDimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
142848
+ const e4 = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
142878
142849
  this._lastRecordedBufferHeight !== e4 && (this._lastRecordedBufferHeight = e4, this._scrollArea.style.height = this._lastRecordedBufferHeight + "px");
142879
142850
  }
142880
142851
  const e3 = this._bufferService.buffer.ydisp * this._currentRowHeight;
@@ -142921,19 +142892,18 @@ WARNING: This link could potentially be dangerous`)) {
142921
142892
  return e3.deltaMode === WheelEvent.DOM_DELTA_LINE ? t3 *= this._currentRowHeight : e3.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t3 *= this._currentRowHeight * this._bufferService.rows), t3;
142922
142893
  }
142923
142894
  getBufferElements(e3, t3) {
142924
- var i3;
142925
- let s3, r2 = "";
142926
- const n2 = [], o2 = null != t3 ? t3 : this._bufferService.buffer.lines.length, a2 = this._bufferService.buffer.lines;
142927
- for (let t4 = e3; t4 < o2; t4++) {
142928
- const e4 = a2.get(t4);
142895
+ let i3, s3 = "";
142896
+ const r2 = [], n2 = t3 ?? this._bufferService.buffer.lines.length, o2 = this._bufferService.buffer.lines;
142897
+ for (let t4 = e3; t4 < n2; t4++) {
142898
+ const e4 = o2.get(t4);
142929
142899
  if (!e4) continue;
142930
- const o3 = null === (i3 = a2.get(t4 + 1)) || void 0 === i3 ? void 0 : i3.isWrapped;
142931
- if (r2 += e4.translateToString(!o3), !o3 || t4 === a2.length - 1) {
142900
+ const n3 = o2.get(t4 + 1)?.isWrapped;
142901
+ if (s3 += e4.translateToString(!n3), !n3 || t4 === o2.length - 1) {
142932
142902
  const e5 = document.createElement("div");
142933
- e5.textContent = r2, n2.push(e5), r2.length > 0 && (s3 = e5), r2 = "";
142903
+ e5.textContent = s3, r2.push(e5), s3.length > 0 && (i3 = e5), s3 = "";
142934
142904
  }
142935
142905
  }
142936
- return { bufferElements: n2, cursorElement: s3 };
142906
+ return { bufferElements: r2, cursorElement: i3 };
142937
142907
  }
142938
142908
  getLinesScrolled(e3) {
142939
142909
  if (0 === e3.deltaY || e3.shiftKey) return 0;
@@ -142965,14 +142935,14 @@ WARNING: This link could potentially be dangerous`)) {
142965
142935
  };
142966
142936
  };
142967
142937
  Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferDecorationRenderer = void 0;
142968
- const n = i2(3656), o = i2(4725), a = i2(844), h = i2(2585);
142969
- let c = t2.BufferDecorationRenderer = class extends a.Disposable {
142970
- constructor(e3, t3, i3, s3) {
142971
- super(), this._screenElement = e3, this._bufferService = t3, this._decorationService = i3, this._renderService = s3, this._decorationElements = /* @__PURE__ */ new Map(), this._altBufferIsActive = false, this._dimensionsChanged = false, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this.register(this._renderService.onRenderedViewportChange((() => this._doRefreshDecorations()))), this.register(this._renderService.onDimensionsChange((() => {
142938
+ const n = i2(4725), o = i2(844), a = i2(2585);
142939
+ let h = t2.BufferDecorationRenderer = class extends o.Disposable {
142940
+ constructor(e3, t3, i3, s3, r2) {
142941
+ super(), this._screenElement = e3, this._bufferService = t3, this._coreBrowserService = i3, this._decorationService = s3, this._renderService = r2, this._decorationElements = /* @__PURE__ */ new Map(), this._altBufferIsActive = false, this._dimensionsChanged = false, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this.register(this._renderService.onRenderedViewportChange((() => this._doRefreshDecorations()))), this.register(this._renderService.onDimensionsChange((() => {
142972
142942
  this._dimensionsChanged = true, this._queueRefresh();
142973
- }))), this.register((0, n.addDisposableDomListener)(window, "resize", (() => this._queueRefresh()))), this.register(this._bufferService.buffers.onBufferActivate((() => {
142943
+ }))), this.register(this._coreBrowserService.onDprChange((() => this._queueRefresh()))), this.register(this._bufferService.buffers.onBufferActivate((() => {
142974
142944
  this._altBufferIsActive = this._bufferService.buffer === this._bufferService.buffers.alt;
142975
- }))), this.register(this._decorationService.onDecorationRegistered((() => this._queueRefresh()))), this.register(this._decorationService.onDecorationRemoved(((e4) => this._removeDecoration(e4)))), this.register((0, a.toDisposable)((() => {
142945
+ }))), this.register(this._decorationService.onDecorationRegistered((() => this._queueRefresh()))), this.register(this._decorationService.onDecorationRemoved(((e4) => this._removeDecoration(e4)))), this.register((0, o.toDisposable)((() => {
142976
142946
  this._container.remove(), this._decorationElements.clear();
142977
142947
  })));
142978
142948
  }
@@ -142989,11 +142959,10 @@ WARNING: This link could potentially be dangerous`)) {
142989
142959
  this._refreshStyle(e3), this._dimensionsChanged && this._refreshXPosition(e3);
142990
142960
  }
142991
142961
  _createElement(e3) {
142992
- var t3, i3;
142993
- const s3 = document.createElement("div");
142994
- s3.classList.add("xterm-decoration"), s3.classList.toggle("xterm-decoration-top-layer", "top" === (null === (t3 = null == e3 ? void 0 : e3.options) || void 0 === t3 ? void 0 : t3.layer)), s3.style.width = `${Math.round((e3.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, s3.style.height = (e3.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", s3.style.top = (e3.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", s3.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
142995
- const r2 = null !== (i3 = e3.options.x) && void 0 !== i3 ? i3 : 0;
142996
- return r2 && r2 > this._bufferService.cols && (s3.style.display = "none"), this._refreshXPosition(e3, s3), s3;
142962
+ const t3 = this._coreBrowserService.mainDocument.createElement("div");
142963
+ t3.classList.add("xterm-decoration"), t3.classList.toggle("xterm-decoration-top-layer", "top" === e3?.options?.layer), t3.style.width = `${Math.round((e3.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, t3.style.height = (e3.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", t3.style.top = (e3.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", t3.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
142964
+ const i3 = e3.options.x ?? 0;
142965
+ return i3 && i3 > this._bufferService.cols && (t3.style.display = "none"), this._refreshXPosition(e3, t3), t3;
142997
142966
  }
142998
142967
  _refreshStyle(e3) {
142999
142968
  const t3 = e3.marker.line - this._bufferService.buffers.active.ydisp;
@@ -143006,17 +142975,15 @@ WARNING: This link could potentially be dangerous`)) {
143006
142975
  }
143007
142976
  }
143008
142977
  _refreshXPosition(e3, t3 = e3.element) {
143009
- var i3;
143010
142978
  if (!t3) return;
143011
- const s3 = null !== (i3 = e3.options.x) && void 0 !== i3 ? i3 : 0;
143012
- "right" === (e3.options.anchor || "left") ? t3.style.right = s3 ? s3 * this._renderService.dimensions.css.cell.width + "px" : "" : t3.style.left = s3 ? s3 * this._renderService.dimensions.css.cell.width + "px" : "";
142979
+ const i3 = e3.options.x ?? 0;
142980
+ "right" === (e3.options.anchor || "left") ? t3.style.right = i3 ? i3 * this._renderService.dimensions.css.cell.width + "px" : "" : t3.style.left = i3 ? i3 * this._renderService.dimensions.css.cell.width + "px" : "";
143013
142981
  }
143014
142982
  _removeDecoration(e3) {
143015
- var t3;
143016
- null === (t3 = this._decorationElements.get(e3)) || void 0 === t3 || t3.remove(), this._decorationElements.delete(e3), e3.dispose();
142983
+ this._decorationElements.get(e3)?.remove(), this._decorationElements.delete(e3), e3.dispose();
143017
142984
  }
143018
142985
  };
143019
- t2.BufferDecorationRenderer = c = s2([r(1, h.IBufferService), r(2, h.IDecorationService), r(3, o.IRenderService)], c);
142986
+ t2.BufferDecorationRenderer = h = s2([r(1, a.IBufferService), r(2, n.ICoreBrowserService), r(3, a.IDecorationService), r(4, n.IRenderService)], h);
143020
142987
  }, 5871: (e2, t2) => {
143021
142988
  Object.defineProperty(t2, "__esModule", { value: true }), t2.ColorZoneStore = void 0, t2.ColorZoneStore = class {
143022
142989
  constructor() {
@@ -143063,19 +143030,17 @@ WARNING: This link could potentially be dangerous`)) {
143063
143030
  };
143064
143031
  };
143065
143032
  Object.defineProperty(t2, "__esModule", { value: true }), t2.OverviewRulerRenderer = void 0;
143066
- const n = i2(5871), o = i2(3656), a = i2(4725), h = i2(844), c = i2(2585), l = { full: 0, left: 0, center: 0, right: 0 }, d = { full: 0, left: 0, center: 0, right: 0 }, _ = { full: 0, left: 0, center: 0, right: 0 };
143067
- let u = t2.OverviewRulerRenderer = class extends h.Disposable {
143033
+ const n = i2(5871), o = i2(4725), a = i2(844), h = i2(2585), c = { full: 0, left: 0, center: 0, right: 0 }, l = { full: 0, left: 0, center: 0, right: 0 }, d = { full: 0, left: 0, center: 0, right: 0 };
143034
+ let _ = t2.OverviewRulerRenderer = class extends a.Disposable {
143068
143035
  get _width() {
143069
143036
  return this._optionsService.options.overviewRulerWidth || 0;
143070
143037
  }
143071
- constructor(e3, t3, i3, s3, r2, o2, a2) {
143072
- var c2;
143073
- super(), this._viewportElement = e3, this._screenElement = t3, this._bufferService = i3, this._decorationService = s3, this._renderService = r2, this._optionsService = o2, this._coreBrowseService = a2, this._colorZoneStore = new n.ColorZoneStore(), this._shouldUpdateDimensions = true, this._shouldUpdateAnchor = true, this._lastKnownBufferLength = 0, this._canvas = document.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), null === (c2 = this._viewportElement.parentElement) || void 0 === c2 || c2.insertBefore(this._canvas, this._viewportElement);
143074
- const l2 = this._canvas.getContext("2d");
143075
- if (!l2) throw new Error("Ctx cannot be null");
143076
- this._ctx = l2, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, h.toDisposable)((() => {
143077
- var e4;
143078
- null === (e4 = this._canvas) || void 0 === e4 || e4.remove();
143038
+ constructor(e3, t3, i3, s3, r2, o2, h2) {
143039
+ super(), this._viewportElement = e3, this._screenElement = t3, this._bufferService = i3, this._decorationService = s3, this._renderService = r2, this._optionsService = o2, this._coreBrowserService = h2, this._colorZoneStore = new n.ColorZoneStore(), this._shouldUpdateDimensions = true, this._shouldUpdateAnchor = true, this._lastKnownBufferLength = 0, this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement);
143040
+ const c2 = this._canvas.getContext("2d");
143041
+ if (!c2) throw new Error("Ctx cannot be null");
143042
+ this._ctx = c2, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, a.toDisposable)((() => {
143043
+ this._canvas?.remove();
143079
143044
  })));
143080
143045
  }
143081
143046
  _registerDecorationListeners() {
@@ -143091,22 +143056,22 @@ WARNING: This link could potentially be dangerous`)) {
143091
143056
  _registerDimensionChangeListeners() {
143092
143057
  this.register(this._renderService.onRender((() => {
143093
143058
  this._containerHeight && this._containerHeight === this._screenElement.clientHeight || (this._queueRefresh(true), this._containerHeight = this._screenElement.clientHeight);
143094
- }))), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", (() => this._queueRefresh(true)))), this.register((0, o.addDisposableDomListener)(this._coreBrowseService.window, "resize", (() => this._queueRefresh(true)))), this._queueRefresh(true);
143059
+ }))), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", (() => this._queueRefresh(true)))), this.register(this._coreBrowserService.onDprChange((() => this._queueRefresh(true)))), this._queueRefresh(true);
143095
143060
  }
143096
143061
  _refreshDrawConstants() {
143097
143062
  const e3 = Math.floor(this._canvas.width / 3), t3 = Math.ceil(this._canvas.width / 3);
143098
- d.full = this._canvas.width, d.left = e3, d.center = t3, d.right = e3, this._refreshDrawHeightConstants(), _.full = 0, _.left = 0, _.center = d.left, _.right = d.left + d.center;
143063
+ l.full = this._canvas.width, l.left = e3, l.center = t3, l.right = e3, this._refreshDrawHeightConstants(), d.full = 0, d.left = 0, d.center = l.left, d.right = l.left + l.center;
143099
143064
  }
143100
143065
  _refreshDrawHeightConstants() {
143101
- l.full = Math.round(2 * this._coreBrowseService.dpr);
143102
- const e3 = this._canvas.height / this._bufferService.buffer.lines.length, t3 = Math.round(Math.max(Math.min(e3, 12), 6) * this._coreBrowseService.dpr);
143103
- l.left = t3, l.center = t3, l.right = t3;
143066
+ c.full = Math.round(2 * this._coreBrowserService.dpr);
143067
+ const e3 = this._canvas.height / this._bufferService.buffer.lines.length, t3 = Math.round(Math.max(Math.min(e3, 12), 6) * this._coreBrowserService.dpr);
143068
+ c.left = t3, c.center = t3, c.right = t3;
143104
143069
  }
143105
143070
  _refreshColorZonePadding() {
143106
- this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.full), left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.left), center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.center), right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.right) }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
143071
+ this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.full), left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.left), center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.center), right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.right) }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
143107
143072
  }
143108
143073
  _refreshCanvasDimensions() {
143109
- this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowseService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowseService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
143074
+ this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowserService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
143110
143075
  }
143111
143076
  _refreshDecorations() {
143112
143077
  this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
@@ -143118,15 +143083,15 @@ WARNING: This link could potentially be dangerous`)) {
143118
143083
  this._shouldUpdateDimensions = false, this._shouldUpdateAnchor = false;
143119
143084
  }
143120
143085
  _renderColorZone(e3) {
143121
- this._ctx.fillStyle = e3.color, this._ctx.fillRect(_[e3.position || "full"], Math.round((this._canvas.height - 1) * (e3.startBufferLine / this._bufferService.buffers.active.lines.length) - l[e3.position || "full"] / 2), d[e3.position || "full"], Math.round((this._canvas.height - 1) * ((e3.endBufferLine - e3.startBufferLine) / this._bufferService.buffers.active.lines.length) + l[e3.position || "full"]));
143086
+ this._ctx.fillStyle = e3.color, this._ctx.fillRect(d[e3.position || "full"], Math.round((this._canvas.height - 1) * (e3.startBufferLine / this._bufferService.buffers.active.lines.length) - c[e3.position || "full"] / 2), l[e3.position || "full"], Math.round((this._canvas.height - 1) * ((e3.endBufferLine - e3.startBufferLine) / this._bufferService.buffers.active.lines.length) + c[e3.position || "full"]));
143122
143087
  }
143123
143088
  _queueRefresh(e3, t3) {
143124
- this._shouldUpdateDimensions = e3 || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t3 || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this._coreBrowseService.window.requestAnimationFrame((() => {
143089
+ this._shouldUpdateDimensions = e3 || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t3 || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame((() => {
143125
143090
  this._refreshDecorations(), this._animationFrame = void 0;
143126
143091
  })));
143127
143092
  }
143128
143093
  };
143129
- t2.OverviewRulerRenderer = u = s2([r(2, c.IBufferService), r(3, c.IDecorationService), r(4, a.IRenderService), r(5, c.IOptionsService), r(6, a.ICoreBrowserService)], u);
143094
+ t2.OverviewRulerRenderer = _ = s2([r(2, h.IBufferService), r(3, h.IDecorationService), r(4, o.IRenderService), r(5, h.IOptionsService), r(6, o.ICoreBrowserService)], _);
143130
143095
  }, 2950: function(e2, t2, i2) {
143131
143096
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
143132
143097
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
@@ -143222,15 +143187,15 @@ WARNING: This link could potentially be dangerous`)) {
143222
143187
  const r3 = e4 - n(e4, i4), a3 = t4 - n(t4, i4);
143223
143188
  for (let n2 = 0; n2 < Math.abs(r3 - a3); n2++) {
143224
143189
  const a4 = "A" === o(e4, t4) ? -1 : 1, h2 = i4.buffer.lines.get(r3 + a4 * n2);
143225
- (null == h2 ? void 0 : h2.isWrapped) && s4++;
143190
+ h2?.isWrapped && s4++;
143226
143191
  }
143227
143192
  return s4;
143228
143193
  })(e3, t3, i3);
143229
143194
  return c(l, h(o(e3, t3), s3));
143230
143195
  }
143231
143196
  function n(e3, t3) {
143232
- let i3 = 0, s3 = t3.buffer.lines.get(e3), r2 = null == s3 ? void 0 : s3.isWrapped;
143233
- for (; r2 && e3 >= 0 && e3 < t3.rows; ) i3++, s3 = t3.buffer.lines.get(--e3), r2 = null == s3 ? void 0 : s3.isWrapped;
143197
+ let i3 = 0, s3 = t3.buffer.lines.get(e3), r2 = s3?.isWrapped;
143198
+ for (; r2 && e3 >= 0 && e3 < t3.rows; ) i3++, s3 = t3.buffer.lines.get(--e3), r2 = s3?.isWrapped;
143234
143199
  return i3;
143235
143200
  }
143236
143201
  function o(e3, t3) {
@@ -143284,27 +143249,29 @@ WARNING: This link could potentially be dangerous`)) {
143284
143249
  };
143285
143250
  };
143286
143251
  Object.defineProperty(t2, "__esModule", { value: true }), t2.DomRenderer = void 0;
143287
- const n = i2(3787), o = i2(2550), a = i2(2223), h = i2(6171), c = i2(4725), l = i2(8055), d = i2(8460), _ = i2(844), u = i2(2585), f = "xterm-dom-renderer-owner-", v = "xterm-rows", p = "xterm-fg-", g = "xterm-bg-", m = "xterm-focus", S = "xterm-selection";
143288
- let C = 1, b = t2.DomRenderer = class extends _.Disposable {
143289
- constructor(e3, t3, i3, s3, r2, a2, c2, l2, u2, p2) {
143290
- super(), this._element = e3, this._screenElement = t3, this._viewportElement = i3, this._linkifier2 = s3, this._charSizeService = a2, this._optionsService = c2, this._bufferService = l2, this._coreBrowserService = u2, this._themeService = p2, this._terminalClass = C++, this._rowElements = [], this.onRequestRedraw = this.register(new d.EventEmitter()).event, this._rowContainer = document.createElement("div"), this._rowContainer.classList.add(v), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = document.createElement("div"), this._selectionContainer.classList.add(S), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, h.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange((() => this._handleOptionsChanged()))), this.register(this._themeService.onChangeColors(((e4) => this._injectCss(e4)))), this._injectCss(this._themeService.colors), this._rowFactory = r2.createInstance(n.DomRendererRowFactory, document), this._element.classList.add(f + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline(((e4) => this._handleLinkHover(e4)))), this.register(this._linkifier2.onHideLinkUnderline(((e4) => this._handleLinkLeave(e4)))), this.register((0, _.toDisposable)((() => {
143291
- this._element.classList.remove(f + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
143292
- }))), this._widthCache = new o.WidthCache(document), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
143252
+ const n = i2(3787), o = i2(2550), a = i2(2223), h = i2(6171), c = i2(6052), l = i2(4725), d = i2(8055), _ = i2(8460), u = i2(844), f = i2(2585), v = "xterm-dom-renderer-owner-", p = "xterm-rows", g = "xterm-fg-", m = "xterm-bg-", S = "xterm-focus", C = "xterm-selection";
143253
+ let b = 1, w = t2.DomRenderer = class extends u.Disposable {
143254
+ constructor(e3, t3, i3, s3, r2, a2, l2, d2, f2, g2, m2, S2, w2) {
143255
+ super(), this._terminal = e3, this._document = t3, this._element = i3, this._screenElement = s3, this._viewportElement = r2, this._helperContainer = a2, this._linkifier2 = l2, this._charSizeService = f2, this._optionsService = g2, this._bufferService = m2, this._coreBrowserService = S2, this._themeService = w2, this._terminalClass = b++, this._rowElements = [], this._selectionRenderModel = (0, c.createSelectionRenderModel)(), this.onRequestRedraw = this.register(new _.EventEmitter()).event, this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add(p), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add(C), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, h.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange((() => this._handleOptionsChanged()))), this.register(this._themeService.onChangeColors(((e4) => this._injectCss(e4)))), this._injectCss(this._themeService.colors), this._rowFactory = d2.createInstance(n.DomRendererRowFactory, document), this._element.classList.add(v + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline(((e4) => this._handleLinkHover(e4)))), this.register(this._linkifier2.onHideLinkUnderline(((e4) => this._handleLinkLeave(e4)))), this.register((0, u.toDisposable)((() => {
143256
+ this._element.classList.remove(v + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
143257
+ }))), this._widthCache = new o.WidthCache(this._document, this._helperContainer), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
143293
143258
  }
143294
143259
  _updateDimensions() {
143295
143260
  const e3 = this._coreBrowserService.dpr;
143296
143261
  this.dimensions.device.char.width = this._charSizeService.width * e3, this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e3), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.left = 0, this.dimensions.device.char.top = 0, this.dimensions.device.canvas.width = this.dimensions.device.cell.width * this._bufferService.cols, this.dimensions.device.canvas.height = this.dimensions.device.cell.height * this._bufferService.rows, this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / e3), this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e3), this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols, this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows;
143297
143262
  for (const e4 of this._rowElements) e4.style.width = `${this.dimensions.css.canvas.width}px`, e4.style.height = `${this.dimensions.css.cell.height}px`, e4.style.lineHeight = `${this.dimensions.css.cell.height}px`, e4.style.overflow = "hidden";
143298
- this._dimensionsStyleElement || (this._dimensionsStyleElement = document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
143299
- const t3 = `${this._terminalSelector} .${v} span { display: inline-block; height: 100%; vertical-align: top;}`;
143263
+ this._dimensionsStyleElement || (this._dimensionsStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
143264
+ const t3 = `${this._terminalSelector} .${p} span { display: inline-block; height: 100%; vertical-align: top;}`;
143300
143265
  this._dimensionsStyleElement.textContent = t3, this._selectionContainer.style.height = this._viewportElement.style.height, this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
143301
143266
  }
143302
143267
  _injectCss(e3) {
143303
- this._themeStyleElement || (this._themeStyleElement = document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
143304
- let t3 = `${this._terminalSelector} .${v} { color: ${e3.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;
143305
- t3 += `${this._terminalSelector} .${v} .xterm-dim { color: ${l.color.multiplyOpacity(e3.foreground, 0.5).css};}`, t3 += `${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`, t3 += "@keyframes blink_box_shadow_" + this._terminalClass + " { 50% { border-bottom-style: hidden; }}", t3 += "@keyframes blink_block_" + this._terminalClass + ` { 0% { background-color: ${e3.cursor.css}; color: ${e3.cursorAccent.css}; } 50% { background-color: inherit; color: ${e3.cursor.css}; }}`, t3 += `${this._terminalSelector} .${v}.${m} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_` + this._terminalClass + ` 1s step-end infinite;}${this._terminalSelector} .${v}.${m} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_` + this._terminalClass + ` 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${e3.cursor.css}; color: ${e3.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e3.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e3.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e3.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`, t3 += `${this._terminalSelector} .${S} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${S} div { position: absolute; background-color: ${e3.selectionBackgroundOpaque.css};}${this._terminalSelector} .${S} div { position: absolute; background-color: ${e3.selectionInactiveBackgroundOpaque.css};}`;
143306
- for (const [i3, s3] of e3.ansi.entries()) t3 += `${this._terminalSelector} .${p}${i3} { color: ${s3.css}; }${this._terminalSelector} .${p}${i3}.xterm-dim { color: ${l.color.multiplyOpacity(s3, 0.5).css}; }${this._terminalSelector} .${g}${i3} { background-color: ${s3.css}; }`;
143307
- t3 += `${this._terminalSelector} .${p}${a.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(e3.background).css}; }${this._terminalSelector} .${p}${a.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(e3.background), 0.5).css}; }${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR} { background-color: ${e3.foreground.css}; }`, this._themeStyleElement.textContent = t3;
143268
+ this._themeStyleElement || (this._themeStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
143269
+ let t3 = `${this._terminalSelector} .${p} { color: ${e3.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;
143270
+ t3 += `${this._terminalSelector} .${p} .xterm-dim { color: ${d.color.multiplyOpacity(e3.foreground, 0.5).css};}`, t3 += `${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;
143271
+ const i3 = `blink_underline_${this._terminalClass}`, s3 = `blink_bar_${this._terminalClass}`, r2 = `blink_block_${this._terminalClass}`;
143272
+ t3 += `@keyframes ${i3} { 50% { border-bottom-style: hidden; }}`, t3 += `@keyframes ${s3} { 50% { box-shadow: none; }}`, t3 += `@keyframes ${r2} { 0% { background-color: ${e3.cursor.css}; color: ${e3.cursorAccent.css}; } 50% { background-color: inherit; color: ${e3.cursor.css}; }}`, t3 += `${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i3} 1s step-end infinite;}${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s3} 1s step-end infinite;}${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r2} 1s step-end infinite;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-block { background-color: ${e3.cursor.css}; color: ${e3.cursorAccent.css};}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e3.cursor.css} !important; color: ${e3.cursorAccent.css} !important;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e3.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e3.cursor.css} inset;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e3.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`, t3 += `${this._terminalSelector} .${C} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${C} div { position: absolute; background-color: ${e3.selectionBackgroundOpaque.css};}${this._terminalSelector} .${C} div { position: absolute; background-color: ${e3.selectionInactiveBackgroundOpaque.css};}`;
143273
+ for (const [i4, s4] of e3.ansi.entries()) t3 += `${this._terminalSelector} .${g}${i4} { color: ${s4.css}; }${this._terminalSelector} .${g}${i4}.xterm-dim { color: ${d.color.multiplyOpacity(s4, 0.5).css}; }${this._terminalSelector} .${m}${i4} { background-color: ${s4.css}; }`;
143274
+ t3 += `${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(e3.background).css}; }${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(e3.background), 0.5).css}; }${this._terminalSelector} .${m}${a.INVERTED_DEFAULT_COLOR} { background-color: ${e3.foreground.css}; }`, this._themeStyleElement.textContent = t3;
143308
143275
  }
143309
143276
  _setDefaultSpacing() {
143310
143277
  const e3 = this.dimensions.css.cell.width - this._widthCache.get("W", false, false);
@@ -143315,28 +143282,29 @@ WARNING: This link could potentially be dangerous`)) {
143315
143282
  }
143316
143283
  _refreshRowElements(e3, t3) {
143317
143284
  for (let e4 = this._rowElements.length; e4 <= t3; e4++) {
143318
- const e5 = document.createElement("div");
143285
+ const e5 = this._document.createElement("div");
143319
143286
  this._rowContainer.appendChild(e5), this._rowElements.push(e5);
143320
143287
  }
143321
143288
  for (; this._rowElements.length > t3; ) this._rowContainer.removeChild(this._rowElements.pop());
143322
143289
  }
143323
143290
  handleResize(e3, t3) {
143324
- this._refreshRowElements(e3, t3), this._updateDimensions();
143291
+ this._refreshRowElements(e3, t3), this._updateDimensions(), this.handleSelectionChanged(this._selectionRenderModel.selectionStart, this._selectionRenderModel.selectionEnd, this._selectionRenderModel.columnSelectMode);
143325
143292
  }
143326
143293
  handleCharSizeChanged() {
143327
143294
  this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
143328
143295
  }
143329
143296
  handleBlur() {
143330
- this._rowContainer.classList.remove(m);
143297
+ this._rowContainer.classList.remove(S), this.renderRows(0, this._bufferService.rows - 1);
143331
143298
  }
143332
143299
  handleFocus() {
143333
- this._rowContainer.classList.add(m), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
143300
+ this._rowContainer.classList.add(S), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
143334
143301
  }
143335
143302
  handleSelectionChanged(e3, t3, i3) {
143336
143303
  if (this._selectionContainer.replaceChildren(), this._rowFactory.handleSelectionChanged(e3, t3, i3), this.renderRows(0, this._bufferService.rows - 1), !e3 || !t3) return;
143337
- const s3 = e3[1] - this._bufferService.buffer.ydisp, r2 = t3[1] - this._bufferService.buffer.ydisp, n2 = Math.max(s3, 0), o2 = Math.min(r2, this._bufferService.rows - 1);
143304
+ this._selectionRenderModel.update(this._terminal, e3, t3, i3);
143305
+ const s3 = this._selectionRenderModel.viewportStartRow, r2 = this._selectionRenderModel.viewportEndRow, n2 = this._selectionRenderModel.viewportCappedStartRow, o2 = this._selectionRenderModel.viewportCappedEndRow;
143338
143306
  if (n2 >= this._bufferService.rows || o2 < 0) return;
143339
- const a2 = document.createDocumentFragment();
143307
+ const a2 = this._document.createDocumentFragment();
143340
143308
  if (i3) {
143341
143309
  const i4 = e3[0] > t3[0];
143342
143310
  a2.appendChild(this._createSelectionElement(n2, i4 ? t3[0] : e3[0], i4 ? e3[0] : t3[0], o2 - n2 + 1));
@@ -143352,8 +143320,9 @@ WARNING: This link could potentially be dangerous`)) {
143352
143320
  this._selectionContainer.appendChild(a2);
143353
143321
  }
143354
143322
  _createSelectionElement(e3, t3, i3, s3 = 1) {
143355
- const r2 = document.createElement("div");
143356
- return r2.style.height = s3 * this.dimensions.css.cell.height + "px", r2.style.top = e3 * this.dimensions.css.cell.height + "px", r2.style.left = t3 * this.dimensions.css.cell.width + "px", r2.style.width = this.dimensions.css.cell.width * (i3 - t3) + "px", r2;
143323
+ const r2 = this._document.createElement("div"), n2 = t3 * this.dimensions.css.cell.width;
143324
+ let o2 = this.dimensions.css.cell.width * (i3 - t3);
143325
+ return n2 + o2 > this.dimensions.css.canvas.width && (o2 = this.dimensions.css.canvas.width - n2), r2.style.height = s3 * this.dimensions.css.cell.height + "px", r2.style.top = e3 * this.dimensions.css.cell.height + "px", r2.style.left = `${n2}px`, r2.style.width = `${o2}px`, r2;
143357
143326
  }
143358
143327
  handleCursorMove() {
143359
143328
  }
@@ -143372,7 +143341,7 @@ WARNING: This link could potentially be dangerous`)) {
143372
143341
  }
143373
143342
  }
143374
143343
  get _terminalSelector() {
143375
- return `.${f}${this._terminalClass}`;
143344
+ return `.${v}${this._terminalClass}`;
143376
143345
  }
143377
143346
  _handleLinkHover(e3) {
143378
143347
  this._setCellUnderline(e3.x1, e3.x2, e3.y1, e3.y2, e3.cols, true);
@@ -143392,7 +143361,7 @@ WARNING: This link could potentially be dangerous`)) {
143392
143361
  }
143393
143362
  }
143394
143363
  };
143395
- t2.DomRenderer = b = s2([r(4, u.IInstantiationService), r(5, c.ICharSizeService), r(6, u.IOptionsService), r(7, u.IBufferService), r(8, c.ICoreBrowserService), r(9, c.IThemeService)], b);
143364
+ t2.DomRenderer = w = s2([r(7, f.IInstantiationService), r(8, l.ICharSizeService), r(9, f.IOptionsService), r(10, f.IBufferService), r(11, l.ICoreBrowserService), r(12, l.IThemeService)], w);
143396
143365
  }, 3787: function(e2, t2, i2) {
143397
143366
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
143398
143367
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
@@ -143417,7 +143386,7 @@ WARNING: This link could potentially be dangerous`)) {
143417
143386
  const g = [], m = this._characterJoinerService.getJoinedCharacters(t3), S = this._themeService.colors;
143418
143387
  let C, b = e3.getNoBgTrimmedLength();
143419
143388
  i3 && b < a2 + 1 && (b = a2 + 1);
143420
- let y = 0, w = "", E = 0, k = 0, L = 0, D2 = false, R = 0, x = false, A = 0;
143389
+ let w = 0, y = "", E = 0, k = 0, L = 0, D2 = false, R = 0, x = false, A = 0;
143421
143390
  const B = [], T = -1 !== f2 && -1 !== p;
143422
143391
  for (let M = 0; M < b; M++) {
143423
143392
  e3.loadCell(M, this._workCell);
@@ -143436,13 +143405,13 @@ WARNING: This link could potentially be dangerous`)) {
143436
143405
  }));
143437
143406
  let N = I.getChars() || o.WHITESPACE_CELL_CHAR;
143438
143407
  if (" " === N && (I.isUnderline() || I.isOverline()) && (N = "\xA0"), A = b2 * l2 - _2.get(N, I.isBold(), I.isItalic()), C) {
143439
- if (y && (H && x || !H && !x && I.bg === E) && (H && x && S.selectionForeground || I.fg === k) && I.extended.ext === L && W === D2 && A === R && !F && !O && !U) {
143440
- w += N, y++;
143408
+ if (w && (H && x || !H && !x && I.bg === E) && (H && x && S.selectionForeground || I.fg === k) && I.extended.ext === L && W === D2 && A === R && !F && !O && !U) {
143409
+ I.isInvisible() ? y += o.WHITESPACE_CELL_CHAR : y += N, w++;
143441
143410
  continue;
143442
143411
  }
143443
- y && (C.textContent = w), C = this._document.createElement("span"), y = 0, w = "";
143412
+ w && (C.textContent = y), C = this._document.createElement("span"), w = 0, y = "";
143444
143413
  } else C = this._document.createElement("span");
143445
- if (E = I.bg, k = I.fg, L = I.extended.ext, D2 = W, R = A, x = H, O && a2 >= M && a2 <= P && (a2 = M), !this._coreService.isCursorHidden && F) {
143414
+ if (E = I.bg, k = I.fg, L = I.extended.ext, D2 = W, R = A, x = H, O && a2 >= M && a2 <= P && (a2 = M), !this._coreService.isCursorHidden && F && this._coreService.isCursorInitialized) {
143446
143415
  if (B.push("xterm-cursor"), this._coreBrowserService.isFocused) h2 && B.push("xterm-cursor-blink"), B.push("bar" === s3 ? "xterm-cursor-bar" : "underline" === s3 ? "xterm-cursor-underline" : "xterm-cursor-block");
143447
143416
  else if (r2) switch (r2) {
143448
143417
  case "outline":
@@ -143458,12 +143427,12 @@ WARNING: This link could potentially be dangerous`)) {
143458
143427
  B.push("xterm-cursor-underline");
143459
143428
  }
143460
143429
  }
143461
- if (I.isBold() && B.push("xterm-bold"), I.isItalic() && B.push("xterm-italic"), I.isDim() && B.push("xterm-dim"), w = I.isInvisible() ? o.WHITESPACE_CELL_CHAR : I.getChars() || o.WHITESPACE_CELL_CHAR, I.isUnderline() && (B.push(`xterm-underline-${I.extended.underlineStyle}`), " " === w && (w = "\xA0"), !I.isUnderlineColorDefault())) if (I.isUnderlineColorRGB()) C.style.textDecorationColor = `rgb(${u.AttributeData.toColorRGB(I.getUnderlineColor()).join(",")})`;
143430
+ if (I.isBold() && B.push("xterm-bold"), I.isItalic() && B.push("xterm-italic"), I.isDim() && B.push("xterm-dim"), y = I.isInvisible() ? o.WHITESPACE_CELL_CHAR : I.getChars() || o.WHITESPACE_CELL_CHAR, I.isUnderline() && (B.push(`xterm-underline-${I.extended.underlineStyle}`), " " === y && (y = "\xA0"), !I.isUnderlineColorDefault())) if (I.isUnderlineColorRGB()) C.style.textDecorationColor = `rgb(${u.AttributeData.toColorRGB(I.getUnderlineColor()).join(",")})`;
143462
143431
  else {
143463
143432
  let e4 = I.getUnderlineColor();
143464
143433
  this._optionsService.rawOptions.drawBoldTextInBrightColors && I.isBold() && e4 < 8 && (e4 += 8), C.style.textDecorationColor = S.ansi[e4].css;
143465
143434
  }
143466
- I.isOverline() && (B.push("xterm-overline"), " " === w && (w = "\xA0")), I.isStrikethrough() && B.push("xterm-strikethrough"), W && (C.style.textDecoration = "underline");
143435
+ I.isOverline() && (B.push("xterm-overline"), " " === y && (y = "\xA0")), I.isStrikethrough() && B.push("xterm-strikethrough"), W && (C.style.textDecoration = "underline");
143467
143436
  let $ = I.getFgColor(), j = I.getFgColorMode(), z = I.getBgColor(), K = I.getBgColorMode();
143468
143437
  const q = !!I.isInverse();
143469
143438
  if (q) {
@@ -143481,7 +143450,7 @@ WARNING: This link could potentially be dangerous`)) {
143481
143450
  X = S.ansi[z], B.push(`xterm-bg-${z}`);
143482
143451
  break;
143483
143452
  case 50331648:
143484
- X = c.rgba.toColor(z >> 16, z >> 8 & 255, 255 & z), this._addStyle(C, `background-color:#${v((z >>> 0).toString(16), "0", 6)}`);
143453
+ X = c.channels.toColor(z >> 16, z >> 8 & 255, 255 & z), this._addStyle(C, `background-color:#${v((z >>> 0).toString(16), "0", 6)}`);
143485
143454
  break;
143486
143455
  default:
143487
143456
  q ? (X = S.foreground, B.push(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)) : X = S.background;
@@ -143492,23 +143461,23 @@ WARNING: This link could potentially be dangerous`)) {
143492
143461
  I.isBold() && $ < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && ($ += 8), this._applyMinimumContrast(C, X, S.ansi[$], I, V, void 0) || B.push(`xterm-fg-${$}`);
143493
143462
  break;
143494
143463
  case 50331648:
143495
- const e4 = c.rgba.toColor($ >> 16 & 255, $ >> 8 & 255, 255 & $);
143464
+ const e4 = c.channels.toColor($ >> 16 & 255, $ >> 8 & 255, 255 & $);
143496
143465
  this._applyMinimumContrast(C, X, e4, I, V, G) || this._addStyle(C, `color:#${v($.toString(16), "0", 6)}`);
143497
143466
  break;
143498
143467
  default:
143499
- this._applyMinimumContrast(C, X, S.foreground, I, V, void 0) || q && B.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`);
143468
+ this._applyMinimumContrast(C, X, S.foreground, I, V, G) || q && B.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`);
143500
143469
  }
143501
- B.length && (C.className = B.join(" "), B.length = 0), F || O || U ? C.textContent = w : y++, A !== this.defaultSpacing && (C.style.letterSpacing = `${A}px`), g.push(C), M = P;
143470
+ B.length && (C.className = B.join(" "), B.length = 0), F || O || U ? C.textContent = y : w++, A !== this.defaultSpacing && (C.style.letterSpacing = `${A}px`), g.push(C), M = P;
143502
143471
  }
143503
- return C && y && (C.textContent = w), g;
143472
+ return C && w && (C.textContent = y), g;
143504
143473
  }
143505
143474
  _applyMinimumContrast(e3, t3, i3, s3, r2, n2) {
143506
- if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.excludeFromContrastRatioDemands)(s3.getCode())) return false;
143475
+ if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.treatGlyphAsBackgroundColor)(s3.getCode())) return false;
143507
143476
  const o2 = this._getContrastCache(s3);
143508
143477
  let a2;
143509
143478
  if (r2 || n2 || (a2 = o2.getColor(t3.rgba, i3.rgba)), void 0 === a2) {
143510
143479
  const e4 = this._optionsService.rawOptions.minimumContrastRatio / (s3.isDim() ? 2 : 1);
143511
- a2 = c.color.ensureContrastRatio(r2 || t3, n2 || i3, e4), o2.setColor((r2 || t3).rgba, (n2 || i3).rgba, null != a2 ? a2 : null);
143480
+ a2 = c.color.ensureContrastRatio(r2 || t3, n2 || i3, e4), o2.setColor((r2 || t3).rgba, (n2 || i3).rgba, a2 ?? null);
143512
143481
  }
143513
143482
  return !!a2 && (this._addStyle(e3, `color:${a2.css}`), true);
143514
143483
  }
@@ -143530,14 +143499,16 @@ WARNING: This link could potentially be dangerous`)) {
143530
143499
  t2.DomRendererRowFactory = f = s2([r(1, l.ICharacterJoinerService), r(2, h.IOptionsService), r(3, l.ICoreBrowserService), r(4, h.ICoreService), r(5, h.IDecorationService), r(6, l.IThemeService)], f);
143531
143500
  }, 2550: (e2, t2) => {
143532
143501
  Object.defineProperty(t2, "__esModule", { value: true }), t2.WidthCache = void 0, t2.WidthCache = class {
143533
- constructor(e3) {
143534
- this._flat = new Float32Array(256), this._font = "", this._fontSize = 0, this._weight = "normal", this._weightBold = "bold", this._measureElements = [], this._container = e3.createElement("div"), this._container.style.position = "absolute", this._container.style.top = "-50000px", this._container.style.width = "50000px", this._container.style.whiteSpace = "pre", this._container.style.fontKerning = "none";
143535
- const t3 = e3.createElement("span"), i2 = e3.createElement("span");
143536
- i2.style.fontWeight = "bold";
143502
+ constructor(e3, t3) {
143503
+ this._flat = new Float32Array(256), this._font = "", this._fontSize = 0, this._weight = "normal", this._weightBold = "bold", this._measureElements = [], this._container = e3.createElement("div"), this._container.classList.add("xterm-width-cache-measure-container"), this._container.setAttribute("aria-hidden", "true"), this._container.style.whiteSpace = "pre", this._container.style.fontKerning = "none";
143504
+ const i2 = e3.createElement("span");
143505
+ i2.classList.add("xterm-char-measure-element");
143537
143506
  const s2 = e3.createElement("span");
143538
- s2.style.fontStyle = "italic";
143507
+ s2.classList.add("xterm-char-measure-element"), s2.style.fontWeight = "bold";
143539
143508
  const r = e3.createElement("span");
143540
- r.style.fontWeight = "bold", r.style.fontStyle = "italic", this._measureElements = [t3, i2, s2, r], this._container.appendChild(t3), this._container.appendChild(i2), this._container.appendChild(s2), this._container.appendChild(r), e3.body.appendChild(this._container), this.clear();
143509
+ r.classList.add("xterm-char-measure-element"), r.style.fontStyle = "italic";
143510
+ const n = e3.createElement("span");
143511
+ n.classList.add("xterm-char-measure-element"), n.style.fontWeight = "bold", n.style.fontStyle = "italic", this._measureElements = [i2, s2, r, n], this._container.appendChild(i2), this._container.appendChild(s2), this._container.appendChild(r), this._container.appendChild(n), t3.appendChild(this._container), this.clear();
143541
143512
  }
143542
143513
  dispose() {
143543
143514
  this._container.remove(), this._measureElements.length = 0, this._holey = void 0;
@@ -143550,13 +143521,17 @@ WARNING: This link could potentially be dangerous`)) {
143550
143521
  }
143551
143522
  get(e3, t3, i2) {
143552
143523
  let s2 = 0;
143553
- if (!t3 && !i2 && 1 === e3.length && (s2 = e3.charCodeAt(0)) < 256) return -9999 !== this._flat[s2] ? this._flat[s2] : this._flat[s2] = this._measure(e3, 0);
143524
+ if (!t3 && !i2 && 1 === e3.length && (s2 = e3.charCodeAt(0)) < 256) {
143525
+ if (-9999 !== this._flat[s2]) return this._flat[s2];
143526
+ const t4 = this._measure(e3, 0);
143527
+ return t4 > 0 && (this._flat[s2] = t4), t4;
143528
+ }
143554
143529
  let r = e3;
143555
143530
  t3 && (r += "B"), i2 && (r += "I");
143556
143531
  let n = this._holey.get(r);
143557
143532
  if (void 0 === n) {
143558
143533
  let s3 = 0;
143559
- t3 && (s3 |= 1), i2 && (s3 |= 2), n = this._measure(e3, s3), this._holey.set(r, n);
143534
+ t3 && (s3 |= 1), i2 && (s3 |= 2), n = this._measure(e3, s3), n > 0 && this._holey.set(r, n);
143560
143535
  }
143561
143536
  return n;
143562
143537
  }
@@ -143573,17 +143548,47 @@ WARNING: This link could potentially be dangerous`)) {
143573
143548
  function i2(e3) {
143574
143549
  return 57508 <= e3 && e3 <= 57558;
143575
143550
  }
143576
- Object.defineProperty(t2, "__esModule", { value: true }), t2.createRenderDimensions = t2.excludeFromContrastRatioDemands = t2.isRestrictedPowerlineGlyph = t2.isPowerlineGlyph = t2.throwIfFalsy = void 0, t2.throwIfFalsy = function(e3) {
143551
+ function s2(e3) {
143552
+ return e3 >= 128512 && e3 <= 128591 || e3 >= 127744 && e3 <= 128511 || e3 >= 128640 && e3 <= 128767 || e3 >= 9728 && e3 <= 9983 || e3 >= 9984 && e3 <= 10175 || e3 >= 65024 && e3 <= 65039 || e3 >= 129280 && e3 <= 129535 || e3 >= 127462 && e3 <= 127487;
143553
+ }
143554
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.computeNextVariantOffset = t2.createRenderDimensions = t2.treatGlyphAsBackgroundColor = t2.allowRescaling = t2.isEmoji = t2.isRestrictedPowerlineGlyph = t2.isPowerlineGlyph = t2.throwIfFalsy = void 0, t2.throwIfFalsy = function(e3) {
143577
143555
  if (!e3) throw new Error("value must not be falsy");
143578
143556
  return e3;
143579
143557
  }, t2.isPowerlineGlyph = i2, t2.isRestrictedPowerlineGlyph = function(e3) {
143580
143558
  return 57520 <= e3 && e3 <= 57527;
143581
- }, t2.excludeFromContrastRatioDemands = function(e3) {
143559
+ }, t2.isEmoji = s2, t2.allowRescaling = function(e3, t3, r, n) {
143560
+ return 1 === t3 && r > Math.ceil(1.5 * n) && void 0 !== e3 && e3 > 255 && !s2(e3) && !i2(e3) && !(function(e4) {
143561
+ return 57344 <= e4 && e4 <= 63743;
143562
+ })(e3);
143563
+ }, t2.treatGlyphAsBackgroundColor = function(e3) {
143582
143564
  return i2(e3) || (function(e4) {
143583
143565
  return 9472 <= e4 && e4 <= 9631;
143584
143566
  })(e3);
143585
143567
  }, t2.createRenderDimensions = function() {
143586
143568
  return { css: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 } }, device: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 }, char: { width: 0, height: 0, left: 0, top: 0 } } };
143569
+ }, t2.computeNextVariantOffset = function(e3, t3, i3 = 0) {
143570
+ return (e3 - (2 * Math.round(t3) - i3)) % (2 * Math.round(t3));
143571
+ };
143572
+ }, 6052: (e2, t2) => {
143573
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.createSelectionRenderModel = void 0;
143574
+ class i2 {
143575
+ constructor() {
143576
+ this.clear();
143577
+ }
143578
+ clear() {
143579
+ this.hasSelection = false, this.columnSelectMode = false, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
143580
+ }
143581
+ update(e3, t3, i3, s2 = false) {
143582
+ if (this.selectionStart = t3, this.selectionEnd = i3, !t3 || !i3 || t3[0] === i3[0] && t3[1] === i3[1]) return void this.clear();
143583
+ const r = e3.buffers.active.ydisp, n = t3[1] - r, o = i3[1] - r, a = Math.max(n, 0), h = Math.min(o, e3.rows - 1);
143584
+ a >= e3.rows || h < 0 ? this.clear() : (this.hasSelection = true, this.columnSelectMode = s2, this.viewportStartRow = n, this.viewportEndRow = o, this.viewportCappedStartRow = a, this.viewportCappedEndRow = h, this.startCol = t3[0], this.endCol = i3[0]);
143585
+ }
143586
+ isCellSelected(e3, t3, i3) {
143587
+ return !!this.hasSelection && (i3 -= e3.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t3 >= this.startCol && i3 >= this.viewportCappedStartRow && t3 < this.endCol && i3 <= this.viewportCappedEndRow : t3 < this.startCol && i3 >= this.viewportCappedStartRow && t3 >= this.endCol && i3 <= this.viewportCappedEndRow : i3 > this.viewportStartRow && i3 < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i3 === this.viewportStartRow && t3 >= this.startCol && t3 < this.endCol || this.viewportStartRow < this.viewportEndRow && i3 === this.viewportEndRow && t3 < this.endCol || this.viewportStartRow < this.viewportEndRow && i3 === this.viewportStartRow && t3 >= this.startCol);
143588
+ }
143589
+ }
143590
+ t2.createSelectionRenderModel = function() {
143591
+ return new i2();
143587
143592
  };
143588
143593
  }, 456: (e2, t2) => {
143589
143594
  Object.defineProperty(t2, "__esModule", { value: true }), t2.SelectionModel = void 0, t2.SelectionModel = class {
@@ -143636,7 +143641,13 @@ WARNING: This link could potentially be dangerous`)) {
143636
143641
  return this.width > 0 && this.height > 0;
143637
143642
  }
143638
143643
  constructor(e3, t3, i3) {
143639
- super(), this._optionsService = i3, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new o.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event, this._measureStrategy = new c(e3, t3, this._optionsService), this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], (() => this.measure())));
143644
+ super(), this._optionsService = i3, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new o.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event;
143645
+ try {
143646
+ this._measureStrategy = this.register(new d(this._optionsService));
143647
+ } catch {
143648
+ this._measureStrategy = this.register(new l(e3, t3, this._optionsService));
143649
+ }
143650
+ this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], (() => this.measure())));
143640
143651
  }
143641
143652
  measure() {
143642
143653
  const e3 = this._measureStrategy.measure();
@@ -143644,14 +143655,32 @@ WARNING: This link could potentially be dangerous`)) {
143644
143655
  }
143645
143656
  };
143646
143657
  t2.CharSizeService = h = s2([r(2, n.IOptionsService)], h);
143647
- class c {
143658
+ class c extends a.Disposable {
143659
+ constructor() {
143660
+ super(...arguments), this._result = { width: 0, height: 0 };
143661
+ }
143662
+ _validateAndSet(e3, t3) {
143663
+ void 0 !== e3 && e3 > 0 && void 0 !== t3 && t3 > 0 && (this._result.width = e3, this._result.height = t3);
143664
+ }
143665
+ }
143666
+ class l extends c {
143648
143667
  constructor(e3, t3, i3) {
143649
- this._document = e3, this._parentElement = t3, this._optionsService = i3, this._result = { width: 0, height: 0 }, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W".repeat(32), this._measureElement.setAttribute("aria-hidden", "true"), this._measureElement.style.whiteSpace = "pre", this._measureElement.style.fontKerning = "none", this._parentElement.appendChild(this._measureElement);
143668
+ super(), this._document = e3, this._parentElement = t3, this._optionsService = i3, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W".repeat(32), this._measureElement.setAttribute("aria-hidden", "true"), this._measureElement.style.whiteSpace = "pre", this._measureElement.style.fontKerning = "none", this._parentElement.appendChild(this._measureElement);
143669
+ }
143670
+ measure() {
143671
+ return this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`, this._validateAndSet(Number(this._measureElement.offsetWidth) / 32, Number(this._measureElement.offsetHeight)), this._result;
143672
+ }
143673
+ }
143674
+ class d extends c {
143675
+ constructor(e3) {
143676
+ super(), this._optionsService = e3, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d");
143677
+ const t3 = this._ctx.measureText("W");
143678
+ if (!("width" in t3 && "fontBoundingBoxAscent" in t3 && "fontBoundingBoxDescent" in t3)) throw new Error("Required font metrics not supported");
143650
143679
  }
143651
143680
  measure() {
143652
- this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`;
143653
- const e3 = { height: Number(this._measureElement.offsetHeight), width: Number(this._measureElement.offsetWidth) };
143654
- return 0 !== e3.width && 0 !== e3.height && (this._result.width = e3.width / 32, this._result.height = Math.ceil(e3.height)), this._result;
143681
+ this._ctx.font = `${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;
143682
+ const e3 = this._ctx.measureText("W");
143683
+ return this._validateAndSet(e3.width, e3.fontBoundingBoxAscent + e3.fontBoundingBoxDescent), this._result;
143655
143684
  }
143656
143685
  }
143657
143686
  }, 4269: function(e2, t2, i2) {
@@ -143775,10 +143804,18 @@ WARNING: This link could potentially be dangerous`)) {
143775
143804
  }
143776
143805
  };
143777
143806
  t2.CharacterJoinerService = l = s2([r(0, h.IBufferService)], l);
143778
- }, 5114: (e2, t2) => {
143779
- Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreBrowserService = void 0, t2.CoreBrowserService = class {
143780
- constructor(e3, t3) {
143781
- this._textarea = e3, this.window = t3, this._isFocused = false, this._cachedIsFocused = void 0, this._textarea.addEventListener("focus", (() => this._isFocused = true)), this._textarea.addEventListener("blur", (() => this._isFocused = false));
143807
+ }, 5114: (e2, t2, i2) => {
143808
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreBrowserService = void 0;
143809
+ const s2 = i2(844), r = i2(8460), n = i2(3656);
143810
+ class o extends s2.Disposable {
143811
+ constructor(e3, t3, i3) {
143812
+ super(), this._textarea = e3, this._window = t3, this.mainDocument = i3, this._isFocused = false, this._cachedIsFocused = void 0, this._screenDprMonitor = new a(this._window), this._onDprChange = this.register(new r.EventEmitter()), this.onDprChange = this._onDprChange.event, this._onWindowChange = this.register(new r.EventEmitter()), this.onWindowChange = this._onWindowChange.event, this.register(this.onWindowChange(((e4) => this._screenDprMonitor.setWindow(e4)))), this.register((0, r.forwardEvent)(this._screenDprMonitor.onDprChange, this._onDprChange)), this._textarea.addEventListener("focus", (() => this._isFocused = true)), this._textarea.addEventListener("blur", (() => this._isFocused = false));
143813
+ }
143814
+ get window() {
143815
+ return this._window;
143816
+ }
143817
+ set window(e3) {
143818
+ this._window !== e3 && (this._window = e3, this._onWindowChange.fire(this._window));
143782
143819
  }
143783
143820
  get dpr() {
143784
143821
  return this.window.devicePixelRatio;
@@ -143786,7 +143823,43 @@ WARNING: This link could potentially be dangerous`)) {
143786
143823
  get isFocused() {
143787
143824
  return void 0 === this._cachedIsFocused && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask((() => this._cachedIsFocused = void 0))), this._cachedIsFocused;
143788
143825
  }
143789
- };
143826
+ }
143827
+ t2.CoreBrowserService = o;
143828
+ class a extends s2.Disposable {
143829
+ constructor(e3) {
143830
+ super(), this._parentWindow = e3, this._windowResizeListener = this.register(new s2.MutableDisposable()), this._onDprChange = this.register(new r.EventEmitter()), this.onDprChange = this._onDprChange.event, this._outerListener = () => this._setDprAndFireIfDiffers(), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._updateDpr(), this._setWindowResizeListener(), this.register((0, s2.toDisposable)((() => this.clearListener())));
143831
+ }
143832
+ setWindow(e3) {
143833
+ this._parentWindow = e3, this._setWindowResizeListener(), this._setDprAndFireIfDiffers();
143834
+ }
143835
+ _setWindowResizeListener() {
143836
+ this._windowResizeListener.value = (0, n.addDisposableDomListener)(this._parentWindow, "resize", (() => this._setDprAndFireIfDiffers()));
143837
+ }
143838
+ _setDprAndFireIfDiffers() {
143839
+ this._parentWindow.devicePixelRatio !== this._currentDevicePixelRatio && this._onDprChange.fire(this._parentWindow.devicePixelRatio), this._updateDpr();
143840
+ }
143841
+ _updateDpr() {
143842
+ this._outerListener && (this._resolutionMediaMatchList?.removeListener(this._outerListener), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._resolutionMediaMatchList = this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`), this._resolutionMediaMatchList.addListener(this._outerListener));
143843
+ }
143844
+ clearListener() {
143845
+ this._resolutionMediaMatchList && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
143846
+ }
143847
+ }
143848
+ }, 779: (e2, t2, i2) => {
143849
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.LinkProviderService = void 0;
143850
+ const s2 = i2(844);
143851
+ class r extends s2.Disposable {
143852
+ constructor() {
143853
+ super(), this.linkProviders = [], this.register((0, s2.toDisposable)((() => this.linkProviders.length = 0)));
143854
+ }
143855
+ registerLinkProvider(e3) {
143856
+ return this.linkProviders.push(e3), { dispose: () => {
143857
+ const t3 = this.linkProviders.indexOf(e3);
143858
+ -1 !== t3 && this.linkProviders.splice(t3, 1);
143859
+ } };
143860
+ }
143861
+ }
143862
+ t2.LinkProviderService = r;
143790
143863
  }, 8934: function(e2, t2, i2) {
143791
143864
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
143792
143865
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
@@ -143825,20 +143898,20 @@ WARNING: This link could potentially be dangerous`)) {
143825
143898
  };
143826
143899
  };
143827
143900
  Object.defineProperty(t2, "__esModule", { value: true }), t2.RenderService = void 0;
143828
- const n = i2(3656), o = i2(6193), a = i2(5596), h = i2(4725), c = i2(8460), l = i2(844), d = i2(7226), _ = i2(2585);
143829
- let u = t2.RenderService = class extends l.Disposable {
143901
+ const n = i2(6193), o = i2(4725), a = i2(8460), h = i2(844), c = i2(7226), l = i2(2585);
143902
+ let d = t2.RenderService = class extends h.Disposable {
143830
143903
  get dimensions() {
143831
143904
  return this._renderer.value.dimensions;
143832
143905
  }
143833
- constructor(e3, t3, i3, s3, r2, h2, _2, u2) {
143834
- if (super(), this._rowCount = e3, this._charSizeService = s3, this._renderer = this.register(new l.MutableDisposable()), this._pausedResizeTask = new d.DebouncedIdleTask(), this._isPaused = false, this._needsFullRefresh = false, this._isNextRenderRedrawOnly = true, this._needsSelectionRefresh = false, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = { start: void 0, end: void 0, columnSelectMode: false }, this._onDimensionsChange = this.register(new c.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new c.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new c.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new c.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this._renderDebouncer = new o.RenderDebouncer(_2.window, ((e4, t4) => this._renderRows(e4, t4))), this.register(this._renderDebouncer), this._screenDprMonitor = new a.ScreenDprMonitor(_2.window), this._screenDprMonitor.setListener((() => this.handleDevicePixelRatioChange())), this.register(this._screenDprMonitor), this.register(h2.onResize((() => this._fullRefresh()))), this.register(h2.buffers.onBufferActivate((() => {
143835
- var e4;
143836
- return null === (e4 = this._renderer.value) || void 0 === e4 ? void 0 : e4.clear();
143837
- }))), this.register(i3.onOptionChange((() => this._handleOptionsChanged()))), this.register(this._charSizeService.onCharSizeChange((() => this.handleCharSizeChanged()))), this.register(r2.onDecorationRegistered((() => this._fullRefresh()))), this.register(r2.onDecorationRemoved((() => this._fullRefresh()))), this.register(i3.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio"], (() => {
143838
- this.clear(), this.handleResize(h2.cols, h2.rows), this._fullRefresh();
143839
- }))), this.register(i3.onMultipleOptionChange(["cursorBlink", "cursorStyle"], (() => this.refreshRows(h2.buffer.y, h2.buffer.y, true)))), this.register((0, n.addDisposableDomListener)(_2.window, "resize", (() => this.handleDevicePixelRatioChange()))), this.register(u2.onChangeColors((() => this._fullRefresh()))), "IntersectionObserver" in _2.window) {
143840
- const e4 = new _2.window.IntersectionObserver(((e5) => this._handleIntersectionChange(e5[e5.length - 1])), { threshold: 0 });
143841
- e4.observe(t3), this.register({ dispose: () => e4.disconnect() });
143906
+ constructor(e3, t3, i3, s3, r2, o2, l2, d2) {
143907
+ super(), this._rowCount = e3, this._charSizeService = s3, this._renderer = this.register(new h.MutableDisposable()), this._pausedResizeTask = new c.DebouncedIdleTask(), this._observerDisposable = this.register(new h.MutableDisposable()), this._isPaused = false, this._needsFullRefresh = false, this._isNextRenderRedrawOnly = true, this._needsSelectionRefresh = false, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = { start: void 0, end: void 0, columnSelectMode: false }, this._onDimensionsChange = this.register(new a.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new a.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new a.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new a.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this._renderDebouncer = new n.RenderDebouncer(((e4, t4) => this._renderRows(e4, t4)), l2), this.register(this._renderDebouncer), this.register(l2.onDprChange((() => this.handleDevicePixelRatioChange()))), this.register(o2.onResize((() => this._fullRefresh()))), this.register(o2.buffers.onBufferActivate((() => this._renderer.value?.clear()))), this.register(i3.onOptionChange((() => this._handleOptionsChanged()))), this.register(this._charSizeService.onCharSizeChange((() => this.handleCharSizeChanged()))), this.register(r2.onDecorationRegistered((() => this._fullRefresh()))), this.register(r2.onDecorationRemoved((() => this._fullRefresh()))), this.register(i3.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio", "rescaleOverlappingGlyphs"], (() => {
143908
+ this.clear(), this.handleResize(o2.cols, o2.rows), this._fullRefresh();
143909
+ }))), this.register(i3.onMultipleOptionChange(["cursorBlink", "cursorStyle"], (() => this.refreshRows(o2.buffer.y, o2.buffer.y, true)))), this.register(d2.onChangeColors((() => this._fullRefresh()))), this._registerIntersectionObserver(l2.window, t3), this.register(l2.onWindowChange(((e4) => this._registerIntersectionObserver(e4, t3))));
143910
+ }
143911
+ _registerIntersectionObserver(e3, t3) {
143912
+ if ("IntersectionObserver" in e3) {
143913
+ const i3 = new e3.IntersectionObserver(((e4) => this._handleIntersectionChange(e4[e4.length - 1])), { threshold: 0 });
143914
+ i3.observe(t3), this._observerDisposable.value = (0, h.toDisposable)((() => i3.disconnect()));
143842
143915
  }
143843
143916
  }
143844
143917
  _handleIntersectionChange(e3) {
@@ -143863,7 +143936,7 @@ WARNING: This link could potentially be dangerous`)) {
143863
143936
  return !!this._renderer.value;
143864
143937
  }
143865
143938
  setRenderer(e3) {
143866
- this._renderer.value = e3, this._renderer.value.onRequestRedraw(((e4) => this.refreshRows(e4.start, e4.end, true))), this._needsSelectionRefresh = true, this._fullRefresh();
143939
+ this._renderer.value = e3, this._renderer.value && (this._renderer.value.onRequestRedraw(((e4) => this.refreshRows(e4.start, e4.end, true))), this._needsSelectionRefresh = true, this._fullRefresh());
143867
143940
  }
143868
143941
  addRefreshCallback(e3) {
143869
143942
  return this._renderDebouncer.addRefreshCallback(e3);
@@ -143872,41 +143945,34 @@ WARNING: This link could potentially be dangerous`)) {
143872
143945
  this._isPaused ? this._needsFullRefresh = true : this.refreshRows(0, this._rowCount - 1);
143873
143946
  }
143874
143947
  clearTextureAtlas() {
143875
- var e3, t3;
143876
- this._renderer.value && (null === (t3 = (e3 = this._renderer.value).clearTextureAtlas) || void 0 === t3 || t3.call(e3), this._fullRefresh());
143948
+ this._renderer.value && (this._renderer.value.clearTextureAtlas?.(), this._fullRefresh());
143877
143949
  }
143878
143950
  handleDevicePixelRatioChange() {
143879
143951
  this._charSizeService.measure(), this._renderer.value && (this._renderer.value.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
143880
143952
  }
143881
143953
  handleResize(e3, t3) {
143882
- this._renderer.value && (this._isPaused ? this._pausedResizeTask.set((() => this._renderer.value.handleResize(e3, t3))) : this._renderer.value.handleResize(e3, t3), this._fullRefresh());
143954
+ this._renderer.value && (this._isPaused ? this._pausedResizeTask.set((() => this._renderer.value?.handleResize(e3, t3))) : this._renderer.value.handleResize(e3, t3), this._fullRefresh());
143883
143955
  }
143884
143956
  handleCharSizeChanged() {
143885
- var e3;
143886
- null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleCharSizeChanged();
143957
+ this._renderer.value?.handleCharSizeChanged();
143887
143958
  }
143888
143959
  handleBlur() {
143889
- var e3;
143890
- null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleBlur();
143960
+ this._renderer.value?.handleBlur();
143891
143961
  }
143892
143962
  handleFocus() {
143893
- var e3;
143894
- null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleFocus();
143963
+ this._renderer.value?.handleFocus();
143895
143964
  }
143896
143965
  handleSelectionChanged(e3, t3, i3) {
143897
- var s3;
143898
- this._selectionState.start = e3, this._selectionState.end = t3, this._selectionState.columnSelectMode = i3, null === (s3 = this._renderer.value) || void 0 === s3 || s3.handleSelectionChanged(e3, t3, i3);
143966
+ this._selectionState.start = e3, this._selectionState.end = t3, this._selectionState.columnSelectMode = i3, this._renderer.value?.handleSelectionChanged(e3, t3, i3);
143899
143967
  }
143900
143968
  handleCursorMove() {
143901
- var e3;
143902
- null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleCursorMove();
143969
+ this._renderer.value?.handleCursorMove();
143903
143970
  }
143904
143971
  clear() {
143905
- var e3;
143906
- null === (e3 = this._renderer.value) || void 0 === e3 || e3.clear();
143972
+ this._renderer.value?.clear();
143907
143973
  }
143908
143974
  };
143909
- t2.RenderService = u = s2([r(2, _.IOptionsService), r(3, h.ICharSizeService), r(4, _.IDecorationService), r(5, _.IBufferService), r(6, h.ICoreBrowserService), r(7, h.IThemeService)], u);
143975
+ t2.RenderService = d = s2([r(2, l.IOptionsService), r(3, o.ICharSizeService), r(4, l.IDecorationService), r(5, l.IBufferService), r(6, o.ICoreBrowserService), r(7, o.IThemeService)], d);
143910
143976
  }, 9312: function(e2, t2, i2) {
143911
143977
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
143912
143978
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
@@ -143963,7 +144029,7 @@ WARNING: This link could potentially be dangerous`)) {
143963
144029
  s3.push(i3.translateBufferLineToString(e3[1], true, e3[0], r2));
143964
144030
  for (let r3 = e3[1] + 1; r3 <= t3[1] - 1; r3++) {
143965
144031
  const e4 = i3.lines.get(r3), t4 = i3.translateBufferLineToString(r3, true);
143966
- (null == e4 ? void 0 : e4.isWrapped) ? s3[s3.length - 1] += t4 : s3.push(t4);
144032
+ e4?.isWrapped ? s3[s3.length - 1] += t4 : s3.push(t4);
143967
144033
  }
143968
144034
  if (e3[1] !== t3[1]) {
143969
144035
  const e4 = i3.lines.get(t3[1]), r3 = i3.translateBufferLineToString(t3[1], true, 0, t3[0]);
@@ -143993,11 +144059,10 @@ WARNING: This link could potentially be dangerous`)) {
143993
144059
  return e3[1] > t3[1] && e3[1] < i3[1] || t3[1] === i3[1] && e3[1] === t3[1] && e3[0] >= t3[0] && e3[0] < i3[0] || t3[1] < i3[1] && e3[1] === i3[1] && e3[0] < i3[0] || t3[1] < i3[1] && e3[1] === t3[1] && e3[0] >= t3[0];
143994
144060
  }
143995
144061
  _selectWordAtCursor(e3, t3) {
143996
- var i3, s3;
143997
- const r2 = null === (s3 = null === (i3 = this._linkifier.currentLink) || void 0 === i3 ? void 0 : i3.link) || void 0 === s3 ? void 0 : s3.range;
143998
- if (r2) return this._model.selectionStart = [r2.start.x - 1, r2.start.y - 1], this._model.selectionStartLength = (0, _.getRangeLength)(r2, this._bufferService.cols), this._model.selectionEnd = void 0, true;
143999
- const n2 = this._getMouseBufferCoords(e3);
144000
- return !!n2 && (this._selectWordAt(n2, t3), this._model.selectionEnd = void 0, true);
144062
+ const i3 = this._linkifier.currentLink?.link?.range;
144063
+ if (i3) return this._model.selectionStart = [i3.start.x - 1, i3.start.y - 1], this._model.selectionStartLength = (0, _.getRangeLength)(i3, this._bufferService.cols), this._model.selectionEnd = void 0, true;
144064
+ const s3 = this._getMouseBufferCoords(e3);
144065
+ return !!s3 && (this._selectWordAt(s3, t3), this._model.selectionEnd = void 0, true);
144001
144066
  }
144002
144067
  selectAll() {
144003
144068
  this._model.isSelectAllActive = true, this.refresh(), this._onSelectionChange.fire();
@@ -144062,7 +144127,7 @@ WARNING: This link could potentially be dangerous`)) {
144062
144127
  const i3 = this._bufferService.buffer;
144063
144128
  if (this._model.selectionEnd[1] < i3.lines.length) {
144064
144129
  const e4 = i3.lines.get(this._model.selectionEnd[1]);
144065
- e4 && 0 === e4.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0]++;
144130
+ e4 && 0 === e4.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0] < this._bufferService.cols && this._model.selectionEnd[0]++;
144066
144131
  }
144067
144132
  t3 && t3[0] === this._model.selectionEnd[0] && t3[1] === this._model.selectionEnd[1] || this.refresh(true);
144068
144133
  }
@@ -144150,7 +144215,7 @@ WARNING: This link could potentially be dangerous`)) {
144150
144215
  }
144151
144216
  if (s3 && f2 + v2 === this._bufferService.cols && 32 !== n2.getCodePoint(this._bufferService.cols - 1)) {
144152
144217
  const t4 = r2.lines.get(e3[1] + 1);
144153
- if ((null == t4 ? void 0 : t4.isWrapped) && 32 !== t4.getCodePoint(0)) {
144218
+ if (t4?.isWrapped && 32 !== t4.getCodePoint(0)) {
144154
144219
  const t5 = this._getWordAt([0, e3[1] + 1], false, false, true);
144155
144220
  t5 && (v2 += t5.length);
144156
144221
  }
@@ -144184,9 +144249,9 @@ WARNING: This link could potentially be dangerous`)) {
144184
144249
  };
144185
144250
  t2.SelectionService = g = s2([r(3, f.IBufferService), r(4, f.ICoreService), r(5, h.IMouseService), r(6, f.IOptionsService), r(7, h.IRenderService), r(8, h.ICoreBrowserService)], g);
144186
144251
  }, 4725: (e2, t2, i2) => {
144187
- Object.defineProperty(t2, "__esModule", { value: true }), t2.IThemeService = t2.ICharacterJoinerService = t2.ISelectionService = t2.IRenderService = t2.IMouseService = t2.ICoreBrowserService = t2.ICharSizeService = void 0;
144252
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.ILinkProviderService = t2.IThemeService = t2.ICharacterJoinerService = t2.ISelectionService = t2.IRenderService = t2.IMouseService = t2.ICoreBrowserService = t2.ICharSizeService = void 0;
144188
144253
  const s2 = i2(8343);
144189
- t2.ICharSizeService = (0, s2.createDecorator)("CharSizeService"), t2.ICoreBrowserService = (0, s2.createDecorator)("CoreBrowserService"), t2.IMouseService = (0, s2.createDecorator)("MouseService"), t2.IRenderService = (0, s2.createDecorator)("RenderService"), t2.ISelectionService = (0, s2.createDecorator)("SelectionService"), t2.ICharacterJoinerService = (0, s2.createDecorator)("CharacterJoinerService"), t2.IThemeService = (0, s2.createDecorator)("ThemeService");
144254
+ t2.ICharSizeService = (0, s2.createDecorator)("CharSizeService"), t2.ICoreBrowserService = (0, s2.createDecorator)("CoreBrowserService"), t2.IMouseService = (0, s2.createDecorator)("MouseService"), t2.IRenderService = (0, s2.createDecorator)("RenderService"), t2.ISelectionService = (0, s2.createDecorator)("SelectionService"), t2.ICharacterJoinerService = (0, s2.createDecorator)("CharacterJoinerService"), t2.IThemeService = (0, s2.createDecorator)("ThemeService"), t2.ILinkProviderService = (0, s2.createDecorator)("LinkProviderService");
144190
144255
  }, 6731: function(e2, t2, i2) {
144191
144256
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
144192
144257
  var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
@@ -144264,7 +144329,7 @@ WARNING: This link could potentially be dangerous`)) {
144264
144329
  function p(e3, t3) {
144265
144330
  if (void 0 !== e3) try {
144266
144331
  return o.css.toColor(e3);
144267
- } catch (e4) {
144332
+ } catch {
144268
144333
  }
144269
144334
  return t3;
144270
144335
  }
@@ -144349,72 +144414,74 @@ WARNING: This link could potentially be dangerous`)) {
144349
144414
  for (const r in t3) s2[r] = i2 <= 1 ? t3[r] : t3[r] && e3(t3[r], i2 - 1);
144350
144415
  return s2;
144351
144416
  };
144352
- }, 8055: (e2, t2, i2) => {
144417
+ }, 8055: (e2, t2) => {
144353
144418
  Object.defineProperty(t2, "__esModule", { value: true }), t2.contrastRatio = t2.toPaddedHex = t2.rgba = t2.rgb = t2.css = t2.color = t2.channels = t2.NULL_COLOR = void 0;
144354
- const s2 = i2(6114);
144355
- let r = 0, n = 0, o = 0, a = 0;
144356
- var h, c, l, d, _;
144357
- function u(e3) {
144419
+ let i2 = 0, s2 = 0, r = 0, n = 0;
144420
+ var o, a, h, c, l;
144421
+ function d(e3) {
144358
144422
  const t3 = e3.toString(16);
144359
144423
  return t3.length < 2 ? "0" + t3 : t3;
144360
144424
  }
144361
- function f(e3, t3) {
144425
+ function _(e3, t3) {
144362
144426
  return e3 < t3 ? (t3 + 0.05) / (e3 + 0.05) : (e3 + 0.05) / (t3 + 0.05);
144363
144427
  }
144364
144428
  t2.NULL_COLOR = { css: "#00000000", rgba: 0 }, (function(e3) {
144365
144429
  e3.toCss = function(e4, t3, i3, s3) {
144366
- return void 0 !== s3 ? `#${u(e4)}${u(t3)}${u(i3)}${u(s3)}` : `#${u(e4)}${u(t3)}${u(i3)}`;
144430
+ return void 0 !== s3 ? `#${d(e4)}${d(t3)}${d(i3)}${d(s3)}` : `#${d(e4)}${d(t3)}${d(i3)}`;
144367
144431
  }, e3.toRgba = function(e4, t3, i3, s3 = 255) {
144368
144432
  return (e4 << 24 | t3 << 16 | i3 << 8 | s3) >>> 0;
144433
+ }, e3.toColor = function(t3, i3, s3, r2) {
144434
+ return { css: e3.toCss(t3, i3, s3, r2), rgba: e3.toRgba(t3, i3, s3, r2) };
144369
144435
  };
144370
- })(h || (t2.channels = h = {})), (function(e3) {
144436
+ })(o || (t2.channels = o = {})), (function(e3) {
144371
144437
  function t3(e4, t4) {
144372
- return a = Math.round(255 * t4), [r, n, o] = _.toChannels(e4.rgba), { css: h.toCss(r, n, o, a), rgba: h.toRgba(r, n, o, a) };
144438
+ return n = Math.round(255 * t4), [i2, s2, r] = l.toChannels(e4.rgba), { css: o.toCss(i2, s2, r, n), rgba: o.toRgba(i2, s2, r, n) };
144373
144439
  }
144374
144440
  e3.blend = function(e4, t4) {
144375
- if (a = (255 & t4.rgba) / 255, 1 === a) return { css: t4.css, rgba: t4.rgba };
144376
- const i3 = t4.rgba >> 24 & 255, s3 = t4.rgba >> 16 & 255, c2 = t4.rgba >> 8 & 255, l2 = e4.rgba >> 24 & 255, d2 = e4.rgba >> 16 & 255, _2 = e4.rgba >> 8 & 255;
144377
- return r = l2 + Math.round((i3 - l2) * a), n = d2 + Math.round((s3 - d2) * a), o = _2 + Math.round((c2 - _2) * a), { css: h.toCss(r, n, o), rgba: h.toRgba(r, n, o) };
144441
+ if (n = (255 & t4.rgba) / 255, 1 === n) return { css: t4.css, rgba: t4.rgba };
144442
+ const a2 = t4.rgba >> 24 & 255, h2 = t4.rgba >> 16 & 255, c2 = t4.rgba >> 8 & 255, l2 = e4.rgba >> 24 & 255, d2 = e4.rgba >> 16 & 255, _2 = e4.rgba >> 8 & 255;
144443
+ return i2 = l2 + Math.round((a2 - l2) * n), s2 = d2 + Math.round((h2 - d2) * n), r = _2 + Math.round((c2 - _2) * n), { css: o.toCss(i2, s2, r), rgba: o.toRgba(i2, s2, r) };
144378
144444
  }, e3.isOpaque = function(e4) {
144379
144445
  return 255 == (255 & e4.rgba);
144380
144446
  }, e3.ensureContrastRatio = function(e4, t4, i3) {
144381
- const s3 = _.ensureContrastRatio(e4.rgba, t4.rgba, i3);
144382
- if (s3) return _.toColor(s3 >> 24 & 255, s3 >> 16 & 255, s3 >> 8 & 255);
144447
+ const s3 = l.ensureContrastRatio(e4.rgba, t4.rgba, i3);
144448
+ if (s3) return o.toColor(s3 >> 24 & 255, s3 >> 16 & 255, s3 >> 8 & 255);
144383
144449
  }, e3.opaque = function(e4) {
144384
144450
  const t4 = (255 | e4.rgba) >>> 0;
144385
- return [r, n, o] = _.toChannels(t4), { css: h.toCss(r, n, o), rgba: t4 };
144451
+ return [i2, s2, r] = l.toChannels(t4), { css: o.toCss(i2, s2, r), rgba: t4 };
144386
144452
  }, e3.opacity = t3, e3.multiplyOpacity = function(e4, i3) {
144387
- return a = 255 & e4.rgba, t3(e4, a * i3 / 255);
144453
+ return n = 255 & e4.rgba, t3(e4, n * i3 / 255);
144388
144454
  }, e3.toColorRGB = function(e4) {
144389
144455
  return [e4.rgba >> 24 & 255, e4.rgba >> 16 & 255, e4.rgba >> 8 & 255];
144390
144456
  };
144391
- })(c || (t2.color = c = {})), (function(e3) {
144392
- let t3, i3;
144393
- if (!s2.isNode) {
144457
+ })(a || (t2.color = a = {})), (function(e3) {
144458
+ let t3, a2;
144459
+ try {
144394
144460
  const e4 = document.createElement("canvas");
144395
144461
  e4.width = 1, e4.height = 1;
144396
- const s3 = e4.getContext("2d", { willReadFrequently: true });
144397
- s3 && (t3 = s3, t3.globalCompositeOperation = "copy", i3 = t3.createLinearGradient(0, 0, 1, 1));
144462
+ const i3 = e4.getContext("2d", { willReadFrequently: true });
144463
+ i3 && (t3 = i3, t3.globalCompositeOperation = "copy", a2 = t3.createLinearGradient(0, 0, 1, 1));
144464
+ } catch {
144398
144465
  }
144399
144466
  e3.toColor = function(e4) {
144400
144467
  if (e4.match(/#[\da-f]{3,8}/i)) switch (e4.length) {
144401
144468
  case 4:
144402
- return r = parseInt(e4.slice(1, 2).repeat(2), 16), n = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), _.toColor(r, n, o);
144469
+ return i2 = parseInt(e4.slice(1, 2).repeat(2), 16), s2 = parseInt(e4.slice(2, 3).repeat(2), 16), r = parseInt(e4.slice(3, 4).repeat(2), 16), o.toColor(i2, s2, r);
144403
144470
  case 5:
144404
- return r = parseInt(e4.slice(1, 2).repeat(2), 16), n = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), a = parseInt(e4.slice(4, 5).repeat(2), 16), _.toColor(r, n, o, a);
144471
+ return i2 = parseInt(e4.slice(1, 2).repeat(2), 16), s2 = parseInt(e4.slice(2, 3).repeat(2), 16), r = parseInt(e4.slice(3, 4).repeat(2), 16), n = parseInt(e4.slice(4, 5).repeat(2), 16), o.toColor(i2, s2, r, n);
144405
144472
  case 7:
144406
144473
  return { css: e4, rgba: (parseInt(e4.slice(1), 16) << 8 | 255) >>> 0 };
144407
144474
  case 9:
144408
144475
  return { css: e4, rgba: parseInt(e4.slice(1), 16) >>> 0 };
144409
144476
  }
144410
- const s3 = e4.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
144411
- if (s3) return r = parseInt(s3[1]), n = parseInt(s3[2]), o = parseInt(s3[3]), a = Math.round(255 * (void 0 === s3[5] ? 1 : parseFloat(s3[5]))), _.toColor(r, n, o, a);
144412
- if (!t3 || !i3) throw new Error("css.toColor: Unsupported css format");
144413
- if (t3.fillStyle = i3, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format");
144414
- if (t3.fillRect(0, 0, 1, 1), [r, n, o, a] = t3.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
144415
- return { rgba: h.toRgba(r, n, o, a), css: e4 };
144477
+ const h2 = e4.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
144478
+ if (h2) return i2 = parseInt(h2[1]), s2 = parseInt(h2[2]), r = parseInt(h2[3]), n = Math.round(255 * (void 0 === h2[5] ? 1 : parseFloat(h2[5]))), o.toColor(i2, s2, r, n);
144479
+ if (!t3 || !a2) throw new Error("css.toColor: Unsupported css format");
144480
+ if (t3.fillStyle = a2, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format");
144481
+ if (t3.fillRect(0, 0, 1, 1), [i2, s2, r, n] = t3.getImageData(0, 0, 1, 1).data, 255 !== n) throw new Error("css.toColor: Unsupported css format");
144482
+ return { rgba: o.toRgba(i2, s2, r, n), css: e4 };
144416
144483
  };
144417
- })(l || (t2.css = l = {})), (function(e3) {
144484
+ })(h || (t2.css = h = {})), (function(e3) {
144418
144485
  function t3(e4, t4, i3) {
144419
144486
  const s3 = e4 / 255, r2 = t4 / 255, n2 = i3 / 255;
144420
144487
  return 0.2126 * (s3 <= 0.03928 ? s3 / 12.92 : Math.pow((s3 + 0.055) / 1.055, 2.4)) + 0.7152 * (r2 <= 0.03928 ? r2 / 12.92 : Math.pow((r2 + 0.055) / 1.055, 2.4)) + 0.0722 * (n2 <= 0.03928 ? n2 / 12.92 : Math.pow((n2 + 0.055) / 1.055, 2.4));
@@ -144422,43 +144489,45 @@ WARNING: This link could potentially be dangerous`)) {
144422
144489
  e3.relativeLuminance = function(e4) {
144423
144490
  return t3(e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4);
144424
144491
  }, e3.relativeLuminance2 = t3;
144425
- })(d || (t2.rgb = d = {})), (function(e3) {
144426
- function t3(e4, t4, i4) {
144492
+ })(c || (t2.rgb = c = {})), (function(e3) {
144493
+ function t3(e4, t4, i3) {
144427
144494
  const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, n2 = e4 >> 8 & 255;
144428
- let o2 = t4 >> 24 & 255, a2 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, c2 = f(d.relativeLuminance2(o2, a2, h2), d.relativeLuminance2(s3, r2, n2));
144429
- for (; c2 < i4 && (o2 > 0 || a2 > 0 || h2 > 0); ) o2 -= Math.max(0, Math.ceil(0.1 * o2)), a2 -= Math.max(0, Math.ceil(0.1 * a2)), h2 -= Math.max(0, Math.ceil(0.1 * h2)), c2 = f(d.relativeLuminance2(o2, a2, h2), d.relativeLuminance2(s3, r2, n2));
144430
- return (o2 << 24 | a2 << 16 | h2 << 8 | 255) >>> 0;
144495
+ let o2 = t4 >> 24 & 255, a3 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, l2 = _(c.relativeLuminance2(o2, a3, h2), c.relativeLuminance2(s3, r2, n2));
144496
+ for (; l2 < i3 && (o2 > 0 || a3 > 0 || h2 > 0); ) o2 -= Math.max(0, Math.ceil(0.1 * o2)), a3 -= Math.max(0, Math.ceil(0.1 * a3)), h2 -= Math.max(0, Math.ceil(0.1 * h2)), l2 = _(c.relativeLuminance2(o2, a3, h2), c.relativeLuminance2(s3, r2, n2));
144497
+ return (o2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
144431
144498
  }
144432
- function i3(e4, t4, i4) {
144499
+ function a2(e4, t4, i3) {
144433
144500
  const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, n2 = e4 >> 8 & 255;
144434
- let o2 = t4 >> 24 & 255, a2 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, c2 = f(d.relativeLuminance2(o2, a2, h2), d.relativeLuminance2(s3, r2, n2));
144435
- for (; c2 < i4 && (o2 < 255 || a2 < 255 || h2 < 255); ) o2 = Math.min(255, o2 + Math.ceil(0.1 * (255 - o2))), a2 = Math.min(255, a2 + Math.ceil(0.1 * (255 - a2))), h2 = Math.min(255, h2 + Math.ceil(0.1 * (255 - h2))), c2 = f(d.relativeLuminance2(o2, a2, h2), d.relativeLuminance2(s3, r2, n2));
144436
- return (o2 << 24 | a2 << 16 | h2 << 8 | 255) >>> 0;
144437
- }
144438
- e3.ensureContrastRatio = function(e4, s3, r2) {
144439
- const n2 = d.relativeLuminance(e4 >> 8), o2 = d.relativeLuminance(s3 >> 8);
144440
- if (f(n2, o2) < r2) {
144441
- if (o2 < n2) {
144442
- const o3 = t3(e4, s3, r2), a3 = f(n2, d.relativeLuminance(o3 >> 8));
144443
- if (a3 < r2) {
144444
- const t4 = i3(e4, s3, r2);
144445
- return a3 > f(n2, d.relativeLuminance(t4 >> 8)) ? o3 : t4;
144501
+ let o2 = t4 >> 24 & 255, a3 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, l2 = _(c.relativeLuminance2(o2, a3, h2), c.relativeLuminance2(s3, r2, n2));
144502
+ for (; l2 < i3 && (o2 < 255 || a3 < 255 || h2 < 255); ) o2 = Math.min(255, o2 + Math.ceil(0.1 * (255 - o2))), a3 = Math.min(255, a3 + Math.ceil(0.1 * (255 - a3))), h2 = Math.min(255, h2 + Math.ceil(0.1 * (255 - h2))), l2 = _(c.relativeLuminance2(o2, a3, h2), c.relativeLuminance2(s3, r2, n2));
144503
+ return (o2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
144504
+ }
144505
+ e3.blend = function(e4, t4) {
144506
+ if (n = (255 & t4) / 255, 1 === n) return t4;
144507
+ const a3 = t4 >> 24 & 255, h2 = t4 >> 16 & 255, c2 = t4 >> 8 & 255, l2 = e4 >> 24 & 255, d2 = e4 >> 16 & 255, _2 = e4 >> 8 & 255;
144508
+ return i2 = l2 + Math.round((a3 - l2) * n), s2 = d2 + Math.round((h2 - d2) * n), r = _2 + Math.round((c2 - _2) * n), o.toRgba(i2, s2, r);
144509
+ }, e3.ensureContrastRatio = function(e4, i3, s3) {
144510
+ const r2 = c.relativeLuminance(e4 >> 8), n2 = c.relativeLuminance(i3 >> 8);
144511
+ if (_(r2, n2) < s3) {
144512
+ if (n2 < r2) {
144513
+ const n3 = t3(e4, i3, s3), o3 = _(r2, c.relativeLuminance(n3 >> 8));
144514
+ if (o3 < s3) {
144515
+ const t4 = a2(e4, i3, s3);
144516
+ return o3 > _(r2, c.relativeLuminance(t4 >> 8)) ? n3 : t4;
144446
144517
  }
144447
- return o3;
144518
+ return n3;
144448
144519
  }
144449
- const a2 = i3(e4, s3, r2), h2 = f(n2, d.relativeLuminance(a2 >> 8));
144450
- if (h2 < r2) {
144451
- const i4 = t3(e4, s3, r2);
144452
- return h2 > f(n2, d.relativeLuminance(i4 >> 8)) ? a2 : i4;
144520
+ const o2 = a2(e4, i3, s3), h2 = _(r2, c.relativeLuminance(o2 >> 8));
144521
+ if (h2 < s3) {
144522
+ const n3 = t3(e4, i3, s3);
144523
+ return h2 > _(r2, c.relativeLuminance(n3 >> 8)) ? o2 : n3;
144453
144524
  }
144454
- return a2;
144525
+ return o2;
144455
144526
  }
144456
- }, e3.reduceLuminance = t3, e3.increaseLuminance = i3, e3.toChannels = function(e4) {
144527
+ }, e3.reduceLuminance = t3, e3.increaseLuminance = a2, e3.toChannels = function(e4) {
144457
144528
  return [e4 >> 24 & 255, e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4];
144458
- }, e3.toColor = function(e4, t4, i4, s3) {
144459
- return { css: h.toCss(e4, t4, i4, s3), rgba: h.toRgba(e4, t4, i4, s3) };
144460
144529
  };
144461
- })(_ || (t2.rgba = _ = {})), t2.toPaddedHex = u, t2.contrastRatio = f;
144530
+ })(l || (t2.rgba = l = {})), t2.toPaddedHex = d, t2.contrastRatio = _;
144462
144531
  }, 8969: (e2, t2, i2) => {
144463
144532
  Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreTerminal = void 0;
144464
144533
  const s2 = i2(844), r = i2(2585), n = i2(4348), o = i2(7866), a = i2(744), h = i2(7302), c = i2(6975), l = i2(8460), d = i2(1753), _ = i2(1480), u = i2(7994), f = i2(9282), v = i2(5435), p = i2(5981), g = i2(2660);
@@ -144466,8 +144535,7 @@ WARNING: This link could potentially be dangerous`)) {
144466
144535
  class S extends s2.Disposable {
144467
144536
  get onScroll() {
144468
144537
  return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event(((e3) => {
144469
- var t3;
144470
- null === (t3 = this._onScrollApi) || void 0 === t3 || t3.fire(e3.position);
144538
+ this._onScrollApi?.fire(e3.position);
144471
144539
  }))), this._onScrollApi.event;
144472
144540
  }
144473
144541
  get cols() {
@@ -144498,6 +144566,9 @@ WARNING: This link could potentially be dangerous`)) {
144498
144566
  writeSync(e3, t3) {
144499
144567
  this._logService.logLevel <= r.LogLevelEnum.WARN && !m && (this._logService.warn("writeSync is unreliable and will be removed soon."), m = true), this._writeBuffer.writeSync(e3, t3);
144500
144568
  }
144569
+ input(e3, t3 = true) {
144570
+ this.coreService.triggerDataEvent(e3, t3);
144571
+ }
144501
144572
  resize(e3, t3) {
144502
144573
  isNaN(e3) || isNaN(t3) || (e3 = Math.max(e3, a.MINIMUM_COLS), t3 = Math.max(t3, a.MINIMUM_ROWS), this._bufferService.resize(e3, t3));
144503
144574
  }
@@ -144554,7 +144625,7 @@ WARNING: This link could potentially be dangerous`)) {
144554
144625
  }
144555
144626
  t2.CoreTerminal = S;
144556
144627
  }, 8460: (e2, t2) => {
144557
- Object.defineProperty(t2, "__esModule", { value: true }), t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
144628
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
144558
144629
  constructor() {
144559
144630
  this._listeners = [], this._disposed = false;
144560
144631
  }
@@ -144578,6 +144649,8 @@ WARNING: This link could potentially be dangerous`)) {
144578
144649
  }
144579
144650
  }, t2.forwardEvent = function(e3, t3) {
144580
144651
  return e3(((e4) => t3.fire(e4)));
144652
+ }, t2.runAndSubscribe = function(e3, t3) {
144653
+ return t3(void 0), e3(((e4) => t3(e4)));
144581
144654
  };
144582
144655
  }, 5435: function(e2, t2, i2) {
144583
144656
  var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
@@ -144591,8 +144664,8 @@ WARNING: This link could potentially be dangerous`)) {
144591
144664
  };
144592
144665
  };
144593
144666
  Object.defineProperty(t2, "__esModule", { value: true }), t2.InputHandler = t2.WindowsOptionsReportType = void 0;
144594
- const n = i2(2584), o = i2(7116), a = i2(2015), h = i2(844), c = i2(482), l = i2(8437), d = i2(8460), _ = i2(643), u = i2(511), f = i2(3734), v = i2(2585), p = i2(6242), g = i2(6351), m = i2(5941), S = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, C = 131072;
144595
- function b(e3, t3) {
144667
+ const n = i2(2584), o = i2(7116), a = i2(2015), h = i2(844), c = i2(482), l = i2(8437), d = i2(8460), _ = i2(643), u = i2(511), f = i2(3734), v = i2(2585), p = i2(1480), g = i2(6242), m = i2(6351), S = i2(5941), C = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, b = 131072;
144668
+ function w(e3, t3) {
144596
144669
  if (e3 > 24) return t3.setWinLines || false;
144597
144670
  switch (e3) {
144598
144671
  case 1:
@@ -144646,13 +144719,13 @@ WARNING: This link could potentially be dangerous`)) {
144646
144719
  !(function(e3) {
144647
144720
  e3[e3.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e3[e3.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
144648
144721
  })(y || (t2.WindowsOptionsReportType = y = {}));
144649
- let w = 0;
144650
- class E extends h.Disposable {
144722
+ let E = 0;
144723
+ class k extends h.Disposable {
144651
144724
  getAttrData() {
144652
144725
  return this._curAttrData;
144653
144726
  }
144654
144727
  constructor(e3, t3, i3, s3, r2, h2, _2, f2, v2 = new a.EscapeSequenceParser()) {
144655
- super(), this._bufferService = e3, this._charsetService = t3, this._coreService = i3, this._logService = s3, this._optionsService = r2, this._oscLinkService = h2, this._coreMouseService = _2, this._unicodeService = f2, this._parser = v2, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new u.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new d.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new d.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new d.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new d.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new d.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new d.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new d.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new d.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new d.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new d.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new d.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new d.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new d.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: false, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new k(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(((e4) => this._activeBuffer = e4.activeBuffer))), this._parser.setCsiHandlerFallback(((e4, t4) => {
144728
+ super(), this._bufferService = e3, this._charsetService = t3, this._coreService = i3, this._logService = s3, this._optionsService = r2, this._oscLinkService = h2, this._coreMouseService = _2, this._unicodeService = f2, this._parser = v2, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new u.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new d.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new d.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new d.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new d.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new d.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new d.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new d.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new d.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new d.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new d.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new d.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new d.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new d.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: false, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new L(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(((e4) => this._activeBuffer = e4.activeBuffer))), this._parser.setCsiHandlerFallback(((e4, t4) => {
144656
144729
  this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(e4), params: t4.toArray() });
144657
144730
  })), this._parser.setEscHandlerFallback(((e4) => {
144658
144731
  this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(e4) });
@@ -144662,9 +144735,9 @@ WARNING: This link could potentially be dangerous`)) {
144662
144735
  this._logService.debug("Unknown OSC code: ", { identifier: e4, action: t4, data: i4 });
144663
144736
  })), this._parser.setDcsHandlerFallback(((e4, t4, i4) => {
144664
144737
  "HOOK" === t4 && (i4 = i4.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(e4), action: t4, payload: i4 });
144665
- })), this._parser.setPrintHandler(((e4, t4, i4) => this.print(e4, t4, i4))), this._parser.registerCsiHandler({ final: "@" }, ((e4) => this.insertChars(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, ((e4) => this.scrollLeft(e4))), this._parser.registerCsiHandler({ final: "A" }, ((e4) => this.cursorUp(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, ((e4) => this.scrollRight(e4))), this._parser.registerCsiHandler({ final: "B" }, ((e4) => this.cursorDown(e4))), this._parser.registerCsiHandler({ final: "C" }, ((e4) => this.cursorForward(e4))), this._parser.registerCsiHandler({ final: "D" }, ((e4) => this.cursorBackward(e4))), this._parser.registerCsiHandler({ final: "E" }, ((e4) => this.cursorNextLine(e4))), this._parser.registerCsiHandler({ final: "F" }, ((e4) => this.cursorPrecedingLine(e4))), this._parser.registerCsiHandler({ final: "G" }, ((e4) => this.cursorCharAbsolute(e4))), this._parser.registerCsiHandler({ final: "H" }, ((e4) => this.cursorPosition(e4))), this._parser.registerCsiHandler({ final: "I" }, ((e4) => this.cursorForwardTab(e4))), this._parser.registerCsiHandler({ final: "J" }, ((e4) => this.eraseInDisplay(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, ((e4) => this.eraseInDisplay(e4, true))), this._parser.registerCsiHandler({ final: "K" }, ((e4) => this.eraseInLine(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, ((e4) => this.eraseInLine(e4, true))), this._parser.registerCsiHandler({ final: "L" }, ((e4) => this.insertLines(e4))), this._parser.registerCsiHandler({ final: "M" }, ((e4) => this.deleteLines(e4))), this._parser.registerCsiHandler({ final: "P" }, ((e4) => this.deleteChars(e4))), this._parser.registerCsiHandler({ final: "S" }, ((e4) => this.scrollUp(e4))), this._parser.registerCsiHandler({ final: "T" }, ((e4) => this.scrollDown(e4))), this._parser.registerCsiHandler({ final: "X" }, ((e4) => this.eraseChars(e4))), this._parser.registerCsiHandler({ final: "Z" }, ((e4) => this.cursorBackwardTab(e4))), this._parser.registerCsiHandler({ final: "`" }, ((e4) => this.charPosAbsolute(e4))), this._parser.registerCsiHandler({ final: "a" }, ((e4) => this.hPositionRelative(e4))), this._parser.registerCsiHandler({ final: "b" }, ((e4) => this.repeatPrecedingCharacter(e4))), this._parser.registerCsiHandler({ final: "c" }, ((e4) => this.sendDeviceAttributesPrimary(e4))), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, ((e4) => this.sendDeviceAttributesSecondary(e4))), this._parser.registerCsiHandler({ final: "d" }, ((e4) => this.linePosAbsolute(e4))), this._parser.registerCsiHandler({ final: "e" }, ((e4) => this.vPositionRelative(e4))), this._parser.registerCsiHandler({ final: "f" }, ((e4) => this.hVPosition(e4))), this._parser.registerCsiHandler({ final: "g" }, ((e4) => this.tabClear(e4))), this._parser.registerCsiHandler({ final: "h" }, ((e4) => this.setMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, ((e4) => this.setModePrivate(e4))), this._parser.registerCsiHandler({ final: "l" }, ((e4) => this.resetMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, ((e4) => this.resetModePrivate(e4))), this._parser.registerCsiHandler({ final: "m" }, ((e4) => this.charAttributes(e4))), this._parser.registerCsiHandler({ final: "n" }, ((e4) => this.deviceStatus(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, ((e4) => this.deviceStatusPrivate(e4))), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, ((e4) => this.softReset(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, ((e4) => this.setCursorStyle(e4))), this._parser.registerCsiHandler({ final: "r" }, ((e4) => this.setScrollRegion(e4))), this._parser.registerCsiHandler({ final: "s" }, ((e4) => this.saveCursor(e4))), this._parser.registerCsiHandler({ final: "t" }, ((e4) => this.windowOptions(e4))), this._parser.registerCsiHandler({ final: "u" }, ((e4) => this.restoreCursor(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, ((e4) => this.insertColumns(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, ((e4) => this.deleteColumns(e4))), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, ((e4) => this.selectProtected(e4))), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, true))), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, false))), this._parser.setExecuteHandler(n.C0.BEL, (() => this.bell())), this._parser.setExecuteHandler(n.C0.LF, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.VT, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.FF, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.CR, (() => this.carriageReturn())), this._parser.setExecuteHandler(n.C0.BS, (() => this.backspace())), this._parser.setExecuteHandler(n.C0.HT, (() => this.tab())), this._parser.setExecuteHandler(n.C0.SO, (() => this.shiftOut())), this._parser.setExecuteHandler(n.C0.SI, (() => this.shiftIn())), this._parser.setExecuteHandler(n.C1.IND, (() => this.index())), this._parser.setExecuteHandler(n.C1.NEL, (() => this.nextLine())), this._parser.setExecuteHandler(n.C1.HTS, (() => this.tabSet())), this._parser.registerOscHandler(0, new p.OscHandler(((e4) => (this.setTitle(e4), this.setIconName(e4), true)))), this._parser.registerOscHandler(1, new p.OscHandler(((e4) => this.setIconName(e4)))), this._parser.registerOscHandler(2, new p.OscHandler(((e4) => this.setTitle(e4)))), this._parser.registerOscHandler(4, new p.OscHandler(((e4) => this.setOrReportIndexedColor(e4)))), this._parser.registerOscHandler(8, new p.OscHandler(((e4) => this.setHyperlink(e4)))), this._parser.registerOscHandler(10, new p.OscHandler(((e4) => this.setOrReportFgColor(e4)))), this._parser.registerOscHandler(11, new p.OscHandler(((e4) => this.setOrReportBgColor(e4)))), this._parser.registerOscHandler(12, new p.OscHandler(((e4) => this.setOrReportCursorColor(e4)))), this._parser.registerOscHandler(104, new p.OscHandler(((e4) => this.restoreIndexedColor(e4)))), this._parser.registerOscHandler(110, new p.OscHandler(((e4) => this.restoreFgColor(e4)))), this._parser.registerOscHandler(111, new p.OscHandler(((e4) => this.restoreBgColor(e4)))), this._parser.registerOscHandler(112, new p.OscHandler(((e4) => this.restoreCursorColor(e4)))), this._parser.registerEscHandler({ final: "7" }, (() => this.saveCursor())), this._parser.registerEscHandler({ final: "8" }, (() => this.restoreCursor())), this._parser.registerEscHandler({ final: "D" }, (() => this.index())), this._parser.registerEscHandler({ final: "E" }, (() => this.nextLine())), this._parser.registerEscHandler({ final: "H" }, (() => this.tabSet())), this._parser.registerEscHandler({ final: "M" }, (() => this.reverseIndex())), this._parser.registerEscHandler({ final: "=" }, (() => this.keypadApplicationMode())), this._parser.registerEscHandler({ final: ">" }, (() => this.keypadNumericMode())), this._parser.registerEscHandler({ final: "c" }, (() => this.fullReset())), this._parser.registerEscHandler({ final: "n" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "o" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "|" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "}" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "~" }, (() => this.setgLevel(1))), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, (() => this.selectDefaultCharset())), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, (() => this.selectDefaultCharset()));
144738
+ })), this._parser.setPrintHandler(((e4, t4, i4) => this.print(e4, t4, i4))), this._parser.registerCsiHandler({ final: "@" }, ((e4) => this.insertChars(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, ((e4) => this.scrollLeft(e4))), this._parser.registerCsiHandler({ final: "A" }, ((e4) => this.cursorUp(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, ((e4) => this.scrollRight(e4))), this._parser.registerCsiHandler({ final: "B" }, ((e4) => this.cursorDown(e4))), this._parser.registerCsiHandler({ final: "C" }, ((e4) => this.cursorForward(e4))), this._parser.registerCsiHandler({ final: "D" }, ((e4) => this.cursorBackward(e4))), this._parser.registerCsiHandler({ final: "E" }, ((e4) => this.cursorNextLine(e4))), this._parser.registerCsiHandler({ final: "F" }, ((e4) => this.cursorPrecedingLine(e4))), this._parser.registerCsiHandler({ final: "G" }, ((e4) => this.cursorCharAbsolute(e4))), this._parser.registerCsiHandler({ final: "H" }, ((e4) => this.cursorPosition(e4))), this._parser.registerCsiHandler({ final: "I" }, ((e4) => this.cursorForwardTab(e4))), this._parser.registerCsiHandler({ final: "J" }, ((e4) => this.eraseInDisplay(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, ((e4) => this.eraseInDisplay(e4, true))), this._parser.registerCsiHandler({ final: "K" }, ((e4) => this.eraseInLine(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, ((e4) => this.eraseInLine(e4, true))), this._parser.registerCsiHandler({ final: "L" }, ((e4) => this.insertLines(e4))), this._parser.registerCsiHandler({ final: "M" }, ((e4) => this.deleteLines(e4))), this._parser.registerCsiHandler({ final: "P" }, ((e4) => this.deleteChars(e4))), this._parser.registerCsiHandler({ final: "S" }, ((e4) => this.scrollUp(e4))), this._parser.registerCsiHandler({ final: "T" }, ((e4) => this.scrollDown(e4))), this._parser.registerCsiHandler({ final: "X" }, ((e4) => this.eraseChars(e4))), this._parser.registerCsiHandler({ final: "Z" }, ((e4) => this.cursorBackwardTab(e4))), this._parser.registerCsiHandler({ final: "`" }, ((e4) => this.charPosAbsolute(e4))), this._parser.registerCsiHandler({ final: "a" }, ((e4) => this.hPositionRelative(e4))), this._parser.registerCsiHandler({ final: "b" }, ((e4) => this.repeatPrecedingCharacter(e4))), this._parser.registerCsiHandler({ final: "c" }, ((e4) => this.sendDeviceAttributesPrimary(e4))), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, ((e4) => this.sendDeviceAttributesSecondary(e4))), this._parser.registerCsiHandler({ final: "d" }, ((e4) => this.linePosAbsolute(e4))), this._parser.registerCsiHandler({ final: "e" }, ((e4) => this.vPositionRelative(e4))), this._parser.registerCsiHandler({ final: "f" }, ((e4) => this.hVPosition(e4))), this._parser.registerCsiHandler({ final: "g" }, ((e4) => this.tabClear(e4))), this._parser.registerCsiHandler({ final: "h" }, ((e4) => this.setMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, ((e4) => this.setModePrivate(e4))), this._parser.registerCsiHandler({ final: "l" }, ((e4) => this.resetMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, ((e4) => this.resetModePrivate(e4))), this._parser.registerCsiHandler({ final: "m" }, ((e4) => this.charAttributes(e4))), this._parser.registerCsiHandler({ final: "n" }, ((e4) => this.deviceStatus(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, ((e4) => this.deviceStatusPrivate(e4))), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, ((e4) => this.softReset(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, ((e4) => this.setCursorStyle(e4))), this._parser.registerCsiHandler({ final: "r" }, ((e4) => this.setScrollRegion(e4))), this._parser.registerCsiHandler({ final: "s" }, ((e4) => this.saveCursor(e4))), this._parser.registerCsiHandler({ final: "t" }, ((e4) => this.windowOptions(e4))), this._parser.registerCsiHandler({ final: "u" }, ((e4) => this.restoreCursor(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, ((e4) => this.insertColumns(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, ((e4) => this.deleteColumns(e4))), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, ((e4) => this.selectProtected(e4))), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, true))), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, false))), this._parser.setExecuteHandler(n.C0.BEL, (() => this.bell())), this._parser.setExecuteHandler(n.C0.LF, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.VT, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.FF, (() => this.lineFeed())), this._parser.setExecuteHandler(n.C0.CR, (() => this.carriageReturn())), this._parser.setExecuteHandler(n.C0.BS, (() => this.backspace())), this._parser.setExecuteHandler(n.C0.HT, (() => this.tab())), this._parser.setExecuteHandler(n.C0.SO, (() => this.shiftOut())), this._parser.setExecuteHandler(n.C0.SI, (() => this.shiftIn())), this._parser.setExecuteHandler(n.C1.IND, (() => this.index())), this._parser.setExecuteHandler(n.C1.NEL, (() => this.nextLine())), this._parser.setExecuteHandler(n.C1.HTS, (() => this.tabSet())), this._parser.registerOscHandler(0, new g.OscHandler(((e4) => (this.setTitle(e4), this.setIconName(e4), true)))), this._parser.registerOscHandler(1, new g.OscHandler(((e4) => this.setIconName(e4)))), this._parser.registerOscHandler(2, new g.OscHandler(((e4) => this.setTitle(e4)))), this._parser.registerOscHandler(4, new g.OscHandler(((e4) => this.setOrReportIndexedColor(e4)))), this._parser.registerOscHandler(8, new g.OscHandler(((e4) => this.setHyperlink(e4)))), this._parser.registerOscHandler(10, new g.OscHandler(((e4) => this.setOrReportFgColor(e4)))), this._parser.registerOscHandler(11, new g.OscHandler(((e4) => this.setOrReportBgColor(e4)))), this._parser.registerOscHandler(12, new g.OscHandler(((e4) => this.setOrReportCursorColor(e4)))), this._parser.registerOscHandler(104, new g.OscHandler(((e4) => this.restoreIndexedColor(e4)))), this._parser.registerOscHandler(110, new g.OscHandler(((e4) => this.restoreFgColor(e4)))), this._parser.registerOscHandler(111, new g.OscHandler(((e4) => this.restoreBgColor(e4)))), this._parser.registerOscHandler(112, new g.OscHandler(((e4) => this.restoreCursorColor(e4)))), this._parser.registerEscHandler({ final: "7" }, (() => this.saveCursor())), this._parser.registerEscHandler({ final: "8" }, (() => this.restoreCursor())), this._parser.registerEscHandler({ final: "D" }, (() => this.index())), this._parser.registerEscHandler({ final: "E" }, (() => this.nextLine())), this._parser.registerEscHandler({ final: "H" }, (() => this.tabSet())), this._parser.registerEscHandler({ final: "M" }, (() => this.reverseIndex())), this._parser.registerEscHandler({ final: "=" }, (() => this.keypadApplicationMode())), this._parser.registerEscHandler({ final: ">" }, (() => this.keypadNumericMode())), this._parser.registerEscHandler({ final: "c" }, (() => this.fullReset())), this._parser.registerEscHandler({ final: "n" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "o" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "|" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "}" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "~" }, (() => this.setgLevel(1))), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, (() => this.selectDefaultCharset())), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, (() => this.selectDefaultCharset()));
144666
144739
  for (const e4 in o.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: e4 }, (() => this.selectCharset("(" + e4))), this._parser.registerEscHandler({ intermediates: ")", final: e4 }, (() => this.selectCharset(")" + e4))), this._parser.registerEscHandler({ intermediates: "*", final: e4 }, (() => this.selectCharset("*" + e4))), this._parser.registerEscHandler({ intermediates: "+", final: e4 }, (() => this.selectCharset("+" + e4))), this._parser.registerEscHandler({ intermediates: "-", final: e4 }, (() => this.selectCharset("-" + e4))), this._parser.registerEscHandler({ intermediates: ".", final: e4 }, (() => this.selectCharset("." + e4))), this._parser.registerEscHandler({ intermediates: "/", final: e4 }, (() => this.selectCharset("/" + e4)));
144667
- this._parser.registerEscHandler({ intermediates: "#", final: "8" }, (() => this.screenAlignmentPattern())), this._parser.setErrorHandler(((e4) => (this._logService.error("Parsing error: ", e4), e4))), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new g.DcsHandler(((e4, t4) => this.requestStatusString(e4, t4))));
144740
+ this._parser.registerEscHandler({ intermediates: "#", final: "8" }, (() => this.screenAlignmentPattern())), this._parser.setErrorHandler(((e4) => (this._logService.error("Parsing error: ", e4), e4))), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new m.DcsHandler(((e4, t4) => this.requestStatusString(e4, t4))));
144668
144741
  }
144669
144742
  _preserveStack(e3, t3, i3, s3) {
144670
144743
  this._parseStack.paused = true, this._parseStack.cursorStartX = e3, this._parseStack.cursorStartY = t3, this._parseStack.decodedLength = i3, this._parseStack.position = s3;
@@ -144683,51 +144756,60 @@ WARNING: This link could potentially be dangerous`)) {
144683
144756
  const o2 = this._parseStack.paused;
144684
144757
  if (o2) {
144685
144758
  if (i3 = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t3)) return this._logSlowResolvingAsync(i3), i3;
144686
- s3 = this._parseStack.cursorStartX, r2 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > C && (n2 = this._parseStack.position + C);
144759
+ s3 = this._parseStack.cursorStartX, r2 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > b && (n2 = this._parseStack.position + b);
144687
144760
  }
144688
- if (this._logService.logLevel <= v.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e3 ? ` "${e3}"` : ` "${Array.prototype.map.call(e3, ((e4) => String.fromCharCode(e4))).join("")}"`), "string" == typeof e3 ? e3.split("").map(((e4) => e4.charCodeAt(0))) : e3), this._parseBuffer.length < e3.length && this._parseBuffer.length < C && (this._parseBuffer = new Uint32Array(Math.min(e3.length, C))), o2 || this._dirtyRowTracker.clearRange(), e3.length > C) for (let t4 = n2; t4 < e3.length; t4 += C) {
144689
- const n3 = t4 + C < e3.length ? t4 + C : e3.length, o3 = "string" == typeof e3 ? this._stringDecoder.decode(e3.substring(t4, n3), this._parseBuffer) : this._utf8Decoder.decode(e3.subarray(t4, n3), this._parseBuffer);
144761
+ if (this._logService.logLevel <= v.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e3 ? ` "${e3}"` : ` "${Array.prototype.map.call(e3, ((e4) => String.fromCharCode(e4))).join("")}"`), "string" == typeof e3 ? e3.split("").map(((e4) => e4.charCodeAt(0))) : e3), this._parseBuffer.length < e3.length && this._parseBuffer.length < b && (this._parseBuffer = new Uint32Array(Math.min(e3.length, b))), o2 || this._dirtyRowTracker.clearRange(), e3.length > b) for (let t4 = n2; t4 < e3.length; t4 += b) {
144762
+ const n3 = t4 + b < e3.length ? t4 + b : e3.length, o3 = "string" == typeof e3 ? this._stringDecoder.decode(e3.substring(t4, n3), this._parseBuffer) : this._utf8Decoder.decode(e3.subarray(t4, n3), this._parseBuffer);
144690
144763
  if (i3 = this._parser.parse(this._parseBuffer, o3)) return this._preserveStack(s3, r2, o3, t4), this._logSlowResolvingAsync(i3), i3;
144691
144764
  }
144692
144765
  else if (!o2) {
144693
144766
  const t4 = "string" == typeof e3 ? this._stringDecoder.decode(e3, this._parseBuffer) : this._utf8Decoder.decode(e3, this._parseBuffer);
144694
144767
  if (i3 = this._parser.parse(this._parseBuffer, t4)) return this._preserveStack(s3, r2, t4, 0), this._logSlowResolvingAsync(i3), i3;
144695
144768
  }
144696
- this._activeBuffer.x === s3 && this._activeBuffer.y === r2 || this._onCursorMove.fire(), this._onRequestRefreshRows.fire(this._dirtyRowTracker.start, this._dirtyRowTracker.end);
144769
+ this._activeBuffer.x === s3 && this._activeBuffer.y === r2 || this._onCursorMove.fire();
144770
+ const a2 = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), h2 = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
144771
+ h2 < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h2, this._bufferService.rows - 1), Math.min(a2, this._bufferService.rows - 1));
144697
144772
  }
144698
144773
  print(e3, t3, i3) {
144699
144774
  let s3, r2;
144700
- const n2 = this._charsetService.charset, o2 = this._optionsService.rawOptions.screenReaderMode, a2 = this._bufferService.cols, h2 = this._coreService.decPrivateModes.wraparound, l2 = this._coreService.modes.insertMode, d2 = this._curAttrData;
144701
- let u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144702
- this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i3 - t3 > 0 && 2 === u2.getWidth(this._activeBuffer.x - 1) && u2.setCellFromCodePoint(this._activeBuffer.x - 1, 0, 1, d2.fg, d2.bg, d2.extended);
144703
- for (let f2 = t3; f2 < i3; ++f2) {
144704
- if (s3 = e3[f2], r2 = this._unicodeService.wcwidth(s3), s3 < 127 && n2) {
144775
+ const n2 = this._charsetService.charset, o2 = this._optionsService.rawOptions.screenReaderMode, a2 = this._bufferService.cols, h2 = this._coreService.decPrivateModes.wraparound, d2 = this._coreService.modes.insertMode, u2 = this._curAttrData;
144776
+ let f2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144777
+ this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i3 - t3 > 0 && 2 === f2.getWidth(this._activeBuffer.x - 1) && f2.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, u2);
144778
+ let v2 = this._parser.precedingJoinState;
144779
+ for (let g2 = t3; g2 < i3; ++g2) {
144780
+ if (s3 = e3[g2], s3 < 127 && n2) {
144705
144781
  const e4 = n2[String.fromCharCode(s3)];
144706
144782
  e4 && (s3 = e4.charCodeAt(0));
144707
144783
  }
144708
- if (o2 && this._onA11yChar.fire((0, c.stringFromCodePoint)(s3)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), r2 || !this._activeBuffer.x) {
144709
- if (this._activeBuffer.x + r2 - 1 >= a2) {
144710
- if (h2) {
144711
- for (; this._activeBuffer.x < a2; ) u2.setCellFromCodePoint(this._activeBuffer.x++, 0, 1, d2.fg, d2.bg, d2.extended);
144712
- this._activeBuffer.x = 0, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), true)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = true), u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144713
- } else if (this._activeBuffer.x = a2 - 1, 2 === r2) continue;
144714
- }
144715
- if (l2 && (u2.insertCells(this._activeBuffer.x, r2, this._activeBuffer.getNullCell(d2), d2), 2 === u2.getWidth(a2 - 1) && u2.setCellFromCodePoint(a2 - 1, _.NULL_CELL_CODE, _.NULL_CELL_WIDTH, d2.fg, d2.bg, d2.extended)), u2.setCellFromCodePoint(this._activeBuffer.x++, s3, r2, d2.fg, d2.bg, d2.extended), r2 > 0) for (; --r2; ) u2.setCellFromCodePoint(this._activeBuffer.x++, 0, 0, d2.fg, d2.bg, d2.extended);
144716
- } else u2.getWidth(this._activeBuffer.x - 1) ? u2.addCodepointToCell(this._activeBuffer.x - 1, s3) : u2.addCodepointToCell(this._activeBuffer.x - 2, s3);
144784
+ const t4 = this._unicodeService.charProperties(s3, v2);
144785
+ r2 = p.UnicodeService.extractWidth(t4);
144786
+ const i4 = p.UnicodeService.extractShouldJoin(t4), m2 = i4 ? p.UnicodeService.extractWidth(v2) : 0;
144787
+ if (v2 = t4, o2 && this._onA11yChar.fire((0, c.stringFromCodePoint)(s3)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + r2 - m2 > a2) {
144788
+ if (h2) {
144789
+ const e4 = f2;
144790
+ let t5 = this._activeBuffer.x - m2;
144791
+ for (this._activeBuffer.x = m2, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), true)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = true), f2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), m2 > 0 && f2 instanceof l.BufferLine && f2.copyCellsFrom(e4, t5, 0, m2, false); t5 < a2; ) e4.setCellFromCodepoint(t5++, 0, 1, u2);
144792
+ } else if (this._activeBuffer.x = a2 - 1, 2 === r2) continue;
144793
+ }
144794
+ if (i4 && this._activeBuffer.x) {
144795
+ const e4 = f2.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
144796
+ f2.addCodepointToCell(this._activeBuffer.x - e4, s3, r2);
144797
+ for (let e5 = r2 - m2; --e5 >= 0; ) f2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, u2);
144798
+ } else if (d2 && (f2.insertCells(this._activeBuffer.x, r2 - m2, this._activeBuffer.getNullCell(u2)), 2 === f2.getWidth(a2 - 1) && f2.setCellFromCodepoint(a2 - 1, _.NULL_CELL_CODE, _.NULL_CELL_WIDTH, u2)), f2.setCellFromCodepoint(this._activeBuffer.x++, s3, r2, u2), r2 > 0) for (; --r2; ) f2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, u2);
144717
144799
  }
144718
- i3 - t3 > 0 && (u2.loadCell(this._activeBuffer.x - 1, this._workCell), 2 === this._workCell.getWidth() || this._workCell.getCode() > 65535 ? this._parser.precedingCodepoint = 0 : this._workCell.isCombined() ? this._parser.precedingCodepoint = this._workCell.getChars().charCodeAt(0) : this._parser.precedingCodepoint = this._workCell.content), this._activeBuffer.x < a2 && i3 - t3 > 0 && 0 === u2.getWidth(this._activeBuffer.x) && !u2.hasContent(this._activeBuffer.x) && u2.setCellFromCodePoint(this._activeBuffer.x, 0, 1, d2.fg, d2.bg, d2.extended), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
144800
+ this._parser.precedingJoinState = v2, this._activeBuffer.x < a2 && i3 - t3 > 0 && 0 === f2.getWidth(this._activeBuffer.x) && !f2.hasContent(this._activeBuffer.x) && f2.setCellFromCodepoint(this._activeBuffer.x, 0, 1, u2), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
144719
144801
  }
144720
144802
  registerCsiHandler(e3, t3) {
144721
- return "t" !== e3.final || e3.prefix || e3.intermediates ? this._parser.registerCsiHandler(e3, t3) : this._parser.registerCsiHandler(e3, ((e4) => !b(e4.params[0], this._optionsService.rawOptions.windowOptions) || t3(e4)));
144803
+ return "t" !== e3.final || e3.prefix || e3.intermediates ? this._parser.registerCsiHandler(e3, t3) : this._parser.registerCsiHandler(e3, ((e4) => !w(e4.params[0], this._optionsService.rawOptions.windowOptions) || t3(e4)));
144722
144804
  }
144723
144805
  registerDcsHandler(e3, t3) {
144724
- return this._parser.registerDcsHandler(e3, new g.DcsHandler(t3));
144806
+ return this._parser.registerDcsHandler(e3, new m.DcsHandler(t3));
144725
144807
  }
144726
144808
  registerEscHandler(e3, t3) {
144727
144809
  return this._parser.registerEscHandler(e3, t3);
144728
144810
  }
144729
144811
  registerOscHandler(e3, t3) {
144730
- return this._parser.registerOscHandler(e3, new p.OscHandler(t3));
144812
+ return this._parser.registerOscHandler(e3, new g.OscHandler(t3));
144731
144813
  }
144732
144814
  bell() {
144733
144815
  return this._onRequestBell.fire(), true;
@@ -144739,13 +144821,12 @@ WARNING: This link could potentially be dangerous`)) {
144739
144821
  return this._activeBuffer.x = 0, true;
144740
144822
  }
144741
144823
  backspace() {
144742
- var e3;
144743
144824
  if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, true;
144744
144825
  if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;
144745
- else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && (null === (e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)) || void 0 === e3 ? void 0 : e3.isWrapped)) {
144826
+ else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
144746
144827
  this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
144747
- const e4 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144748
- e4.hasWidth(this._activeBuffer.x) && !e4.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
144828
+ const e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144829
+ e3.hasWidth(this._activeBuffer.x) && !e3.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
144749
144830
  }
144750
144831
  return this._restrictCursor(), true;
144751
144832
  }
@@ -144832,7 +144913,7 @@ WARNING: This link could potentially be dangerous`)) {
144832
144913
  }
144833
144914
  _eraseInBufferLine(e3, t3, i3, s3 = false, r2 = false) {
144834
144915
  const n2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
144835
- n2.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData(), r2), s3 && (n2.isWrapped = false);
144916
+ n2.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()), r2), s3 && (n2.isWrapped = false);
144836
144917
  }
144837
144918
  _resetBufferLine(e3, t3 = false) {
144838
144919
  const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
@@ -144892,12 +144973,12 @@ WARNING: This link could potentially be dangerous`)) {
144892
144973
  insertChars(e3) {
144893
144974
  this._restrictCursor();
144894
144975
  const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144895
- return t3 && (t3.insertCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
144976
+ return t3 && (t3.insertCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
144896
144977
  }
144897
144978
  deleteChars(e3) {
144898
144979
  this._restrictCursor();
144899
144980
  const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144900
- return t3 && (t3.deleteCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
144981
+ return t3 && (t3.deleteCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
144901
144982
  }
144902
144983
  scrollUp(e3) {
144903
144984
  let t3 = e3.params[0] || 1;
@@ -144914,7 +144995,7 @@ WARNING: This link could potentially be dangerous`)) {
144914
144995
  const t3 = e3.params[0] || 1;
144915
144996
  for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
144916
144997
  const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
144917
- i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i3.isWrapped = false;
144998
+ i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
144918
144999
  }
144919
145000
  return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
144920
145001
  }
@@ -144923,7 +145004,7 @@ WARNING: This link could potentially be dangerous`)) {
144923
145004
  const t3 = e3.params[0] || 1;
144924
145005
  for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
144925
145006
  const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
144926
- i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i3.isWrapped = false;
145007
+ i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
144927
145008
  }
144928
145009
  return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
144929
145010
  }
@@ -144932,7 +145013,7 @@ WARNING: This link could potentially be dangerous`)) {
144932
145013
  const t3 = e3.params[0] || 1;
144933
145014
  for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
144934
145015
  const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
144935
- i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i3.isWrapped = false;
145016
+ i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
144936
145017
  }
144937
145018
  return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
144938
145019
  }
@@ -144941,20 +145022,27 @@ WARNING: This link could potentially be dangerous`)) {
144941
145022
  const t3 = e3.params[0] || 1;
144942
145023
  for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
144943
145024
  const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
144944
- i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i3.isWrapped = false;
145025
+ i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
144945
145026
  }
144946
145027
  return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
144947
145028
  }
144948
145029
  eraseChars(e3) {
144949
145030
  this._restrictCursor();
144950
145031
  const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
144951
- return t3 && (t3.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e3.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
145032
+ return t3 && (t3.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e3.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
144952
145033
  }
144953
145034
  repeatPrecedingCharacter(e3) {
144954
- if (!this._parser.precedingCodepoint) return true;
144955
- const t3 = e3.params[0] || 1, i3 = new Uint32Array(t3);
144956
- for (let e4 = 0; e4 < t3; ++e4) i3[e4] = this._parser.precedingCodepoint;
144957
- return this.print(i3, 0, i3.length), true;
145035
+ const t3 = this._parser.precedingJoinState;
145036
+ if (!t3) return true;
145037
+ const i3 = e3.params[0] || 1, s3 = p.UnicodeService.extractWidth(t3), r2 = this._activeBuffer.x - s3, n2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(r2), o2 = new Uint32Array(n2.length * i3);
145038
+ let a2 = 0;
145039
+ for (let e4 = 0; e4 < n2.length; ) {
145040
+ const t4 = n2.codePointAt(e4) || 0;
145041
+ o2[a2++] = t4, e4 += t4 > 65535 ? 2 : 1;
145042
+ }
145043
+ let h2 = a2;
145044
+ for (let e4 = 1; e4 < i3; ++e4) o2.copyWithin(h2, 0, a2), h2 += a2;
145045
+ return this.print(o2, 0, h2), true;
144958
145046
  }
144959
145047
  sendDeviceAttributesPrimary(e3) {
144960
145048
  return e3.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n.C0.ESC + "[?6c")), true;
@@ -145208,7 +145296,7 @@ WARNING: This link could potentially be dangerous`)) {
145208
145296
  return (e3.length < 2 || (i3 = e3.params[1]) > this._bufferService.rows || 0 === i3) && (i3 = this._bufferService.rows), i3 > t3 && (this._activeBuffer.scrollTop = t3 - 1, this._activeBuffer.scrollBottom = i3 - 1, this._setCursor(0, 0)), true;
145209
145297
  }
145210
145298
  windowOptions(e3) {
145211
- if (!b(e3.params[0], this._optionsService.rawOptions.windowOptions)) return true;
145299
+ if (!w(e3.params[0], this._optionsService.rawOptions.windowOptions)) return true;
145212
145300
  const t3 = e3.length > 1 ? e3.params[1] : 0;
145213
145301
  switch (e3.params[0]) {
145214
145302
  case 14:
@@ -145246,9 +145334,9 @@ WARNING: This link could potentially be dangerous`)) {
145246
145334
  const e4 = i3.shift(), s3 = i3.shift();
145247
145335
  if (/^\d+$/.exec(e4)) {
145248
145336
  const i4 = parseInt(e4);
145249
- if (L(i4)) if ("?" === s3) t3.push({ type: 0, index: i4 });
145337
+ if (D2(i4)) if ("?" === s3) t3.push({ type: 0, index: i4 });
145250
145338
  else {
145251
- const e5 = (0, m.parseColor)(s3);
145339
+ const e5 = (0, S.parseColor)(s3);
145252
145340
  e5 && t3.push({ type: 1, index: i4, color: e5 });
145253
145341
  }
145254
145342
  }
@@ -145273,7 +145361,7 @@ WARNING: This link could potentially be dangerous`)) {
145273
145361
  const i3 = e3.split(";");
145274
145362
  for (let e4 = 0; e4 < i3.length && !(t3 >= this._specialColors.length); ++e4, ++t3) if ("?" === i3[e4]) this._onColor.fire([{ type: 0, index: this._specialColors[t3] }]);
145275
145363
  else {
145276
- const s3 = (0, m.parseColor)(i3[e4]);
145364
+ const s3 = (0, S.parseColor)(i3[e4]);
145277
145365
  s3 && this._onColor.fire([{ type: 1, index: this._specialColors[t3], color: s3 }]);
145278
145366
  }
145279
145367
  return true;
@@ -145292,7 +145380,7 @@ WARNING: This link could potentially be dangerous`)) {
145292
145380
  const t3 = [], i3 = e3.split(";");
145293
145381
  for (let e4 = 0; e4 < i3.length; ++e4) if (/^\d+$/.exec(i3[e4])) {
145294
145382
  const s3 = parseInt(i3[e4]);
145295
- L(s3) && t3.push({ type: 2, index: s3 });
145383
+ D2(s3) && t3.push({ type: 2, index: s3 });
145296
145384
  }
145297
145385
  return t3.length && this._onColor.fire(t3), true;
145298
145386
  }
@@ -145318,7 +145406,7 @@ WARNING: This link could potentially be dangerous`)) {
145318
145406
  return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, o.DEFAULT_CHARSET), true;
145319
145407
  }
145320
145408
  selectCharset(e3) {
145321
- return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(S[e3[0]], o.CHARSETS[e3[1]] || o.DEFAULT_CHARSET), true);
145409
+ return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(C[e3[0]], o.CHARSETS[e3[1]] || o.DEFAULT_CHARSET), true);
145322
145410
  }
145323
145411
  index() {
145324
145412
  return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), true;
@@ -145362,8 +145450,8 @@ WARNING: This link could potentially be dangerous`)) {
145362
145450
  this._dirtyRowTracker.markRangeDirty(e3, t3);
145363
145451
  }
145364
145452
  }
145365
- t2.InputHandler = E;
145366
- let k = class {
145453
+ t2.InputHandler = k;
145454
+ let L = class {
145367
145455
  constructor(e3) {
145368
145456
  this._bufferService = e3, this.clearRange();
145369
145457
  }
@@ -145374,16 +145462,16 @@ WARNING: This link could potentially be dangerous`)) {
145374
145462
  e3 < this.start ? this.start = e3 : e3 > this.end && (this.end = e3);
145375
145463
  }
145376
145464
  markRangeDirty(e3, t3) {
145377
- e3 > t3 && (w = e3, e3 = t3, t3 = w), e3 < this.start && (this.start = e3), t3 > this.end && (this.end = t3);
145465
+ e3 > t3 && (E = e3, e3 = t3, t3 = E), e3 < this.start && (this.start = e3), t3 > this.end && (this.end = t3);
145378
145466
  }
145379
145467
  markAllDirty() {
145380
145468
  this.markRangeDirty(0, this._bufferService.rows - 1);
145381
145469
  }
145382
145470
  };
145383
- function L(e3) {
145471
+ function D2(e3) {
145384
145472
  return 0 <= e3 && e3 < 256;
145385
145473
  }
145386
- k = s2([r(0, v.IBufferService)], k);
145474
+ L = s2([r(0, v.IBufferService)], L);
145387
145475
  }, 844: (e2, t2) => {
145388
145476
  function i2(e3) {
145389
145477
  for (const t3 of e3) t3.dispose();
@@ -145413,15 +145501,13 @@ WARNING: This link could potentially be dangerous`)) {
145413
145501
  return this._isDisposed ? void 0 : this._value;
145414
145502
  }
145415
145503
  set value(e3) {
145416
- var t3;
145417
- this._isDisposed || e3 === this._value || (null === (t3 = this._value) || void 0 === t3 || t3.dispose(), this._value = e3);
145504
+ this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
145418
145505
  }
145419
145506
  clear() {
145420
145507
  this.value = void 0;
145421
145508
  }
145422
145509
  dispose() {
145423
- var e3;
145424
- this._isDisposed = true, null === (e3 = this._value) || void 0 === e3 || e3.dispose(), this._value = void 0;
145510
+ this._isDisposed = true, this._value?.dispose(), this._value = void 0;
145425
145511
  }
145426
145512
  }, t2.toDisposable = function(e3) {
145427
145513
  return { dispose: e3 };
@@ -145452,15 +145538,14 @@ WARNING: This link could potentially be dangerous`)) {
145452
145538
  this._data.get(e3, t3) || this._data.set(e3, t3, new i2()), this._data.get(e3, t3).set(s2, r, n);
145453
145539
  }
145454
145540
  get(e3, t3, i3, s2) {
145455
- var r;
145456
- return null === (r = this._data.get(e3, t3)) || void 0 === r ? void 0 : r.get(i3, s2);
145541
+ return this._data.get(e3, t3)?.get(i3, s2);
145457
145542
  }
145458
145543
  clear() {
145459
145544
  this._data.clear();
145460
145545
  }
145461
145546
  };
145462
145547
  }, 6114: (e2, t2) => {
145463
- Object.defineProperty(t2, "__esModule", { value: true }), t2.isChromeOS = t2.isLinux = t2.isWindows = t2.isIphone = t2.isIpad = t2.isMac = t2.getSafariVersion = t2.isSafari = t2.isLegacyEdge = t2.isFirefox = t2.isNode = void 0, t2.isNode = "undefined" == typeof navigator;
145548
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.isChromeOS = t2.isLinux = t2.isWindows = t2.isIphone = t2.isIpad = t2.isMac = t2.getSafariVersion = t2.isSafari = t2.isLegacyEdge = t2.isFirefox = t2.isNode = void 0, t2.isNode = "undefined" != typeof process && "title" in process;
145464
145549
  const i2 = t2.isNode ? "node" : navigator.userAgent, s2 = t2.isNode ? "node" : navigator.platform;
145465
145550
  t2.isFirefox = i2.includes("Firefox"), t2.isLegacyEdge = i2.includes("Edge"), t2.isSafari = /^((?!chrome|android).)*safari/i.test(i2), t2.getSafariVersion = function() {
145466
145551
  if (!t2.isSafari) return 0;
@@ -145585,7 +145670,7 @@ WARNING: This link could potentially be dangerous`)) {
145585
145670
  Object.defineProperty(t2, "__esModule", { value: true }), t2.updateWindowsModeWrappedState = void 0;
145586
145671
  const s2 = i2(643);
145587
145672
  t2.updateWindowsModeWrappedState = function(e3) {
145588
- const t3 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y - 1), i3 = null == t3 ? void 0 : t3.get(e3.cols - 1), r = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y);
145673
+ const t3 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y - 1), i3 = t3?.get(e3.cols - 1), r = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y);
145589
145674
  r && i3 && (r.isWrapped = i3[s2.CHAR_DATA_CODE_INDEX] !== s2.NULL_CELL_CODE && i3[s2.CHAR_DATA_CODE_INDEX] !== s2.WHITESPACE_CELL_CODE);
145590
145675
  };
145591
145676
  }, 3734: (e2, t2) => {
@@ -145716,6 +145801,9 @@ WARNING: This link could potentially be dangerous`)) {
145716
145801
  getUnderlineStyle() {
145717
145802
  return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
145718
145803
  }
145804
+ getUnderlineVariantOffset() {
145805
+ return this.extended.underlineVariantOffset;
145806
+ }
145719
145807
  }
145720
145808
  t2.AttributeData = i2;
145721
145809
  class s2 {
@@ -145743,6 +145831,13 @@ WARNING: This link could potentially be dangerous`)) {
145743
145831
  set urlId(e3) {
145744
145832
  this._urlId = e3;
145745
145833
  }
145834
+ get underlineVariantOffset() {
145835
+ const e3 = (3758096384 & this._ext) >> 29;
145836
+ return e3 < 0 ? 4294967288 ^ e3 : e3;
145837
+ }
145838
+ set underlineVariantOffset(e3) {
145839
+ this._ext &= 536870911, this._ext |= e3 << 29 & 3758096384;
145840
+ }
145746
145841
  constructor(e3 = 0, t3 = 0) {
145747
145842
  this._ext = 0, this._urlId = 0, this._ext = e3, this._urlId = t3;
145748
145843
  }
@@ -145989,32 +146084,32 @@ WARNING: This link could potentially be dangerous`)) {
145989
146084
  setCell(e3, t3) {
145990
146085
  2097152 & t3.content && (this._combined[e3] = t3.combinedData), 268435456 & t3.bg && (this._extendedAttrs[e3] = t3.extended), this._data[3 * e3 + 0] = t3.content, this._data[3 * e3 + 1] = t3.fg, this._data[3 * e3 + 2] = t3.bg;
145991
146086
  }
145992
- setCellFromCodePoint(e3, t3, i3, s3, r2, n2) {
145993
- 268435456 & r2 && (this._extendedAttrs[e3] = n2), this._data[3 * e3 + 0] = t3 | i3 << 22, this._data[3 * e3 + 1] = s3, this._data[3 * e3 + 2] = r2;
146087
+ setCellFromCodepoint(e3, t3, i3, s3) {
146088
+ 268435456 & s3.bg && (this._extendedAttrs[e3] = s3.extended), this._data[3 * e3 + 0] = t3 | i3 << 22, this._data[3 * e3 + 1] = s3.fg, this._data[3 * e3 + 2] = s3.bg;
145994
146089
  }
145995
- addCodepointToCell(e3, t3) {
145996
- let i3 = this._data[3 * e3 + 0];
145997
- 2097152 & i3 ? this._combined[e3] += (0, o.stringFromCodePoint)(t3) : (2097151 & i3 ? (this._combined[e3] = (0, o.stringFromCodePoint)(2097151 & i3) + (0, o.stringFromCodePoint)(t3), i3 &= -2097152, i3 |= 2097152) : i3 = t3 | 1 << 22, this._data[3 * e3 + 0] = i3);
146090
+ addCodepointToCell(e3, t3, i3) {
146091
+ let s3 = this._data[3 * e3 + 0];
146092
+ 2097152 & s3 ? this._combined[e3] += (0, o.stringFromCodePoint)(t3) : 2097151 & s3 ? (this._combined[e3] = (0, o.stringFromCodePoint)(2097151 & s3) + (0, o.stringFromCodePoint)(t3), s3 &= -2097152, s3 |= 2097152) : s3 = t3 | 1 << 22, i3 && (s3 &= -12582913, s3 |= i3 << 22), this._data[3 * e3 + 0] = s3;
145998
146093
  }
145999
- insertCells(e3, t3, i3, n2) {
146000
- if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.setCellFromCodePoint(e3 - 1, 0, 1, (null == n2 ? void 0 : n2.fg) || 0, (null == n2 ? void 0 : n2.bg) || 0, (null == n2 ? void 0 : n2.extended) || new s2.ExtendedAttrs()), t3 < this.length - e3) {
146094
+ insertCells(e3, t3, i3) {
146095
+ if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length - e3) {
146001
146096
  const s3 = new r.CellData();
146002
146097
  for (let i4 = this.length - e3 - t3 - 1; i4 >= 0; --i4) this.setCell(e3 + t3 + i4, this.loadCell(e3 + i4, s3));
146003
146098
  for (let s4 = 0; s4 < t3; ++s4) this.setCell(e3 + s4, i3);
146004
146099
  } else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
146005
- 2 === this.getWidth(this.length - 1) && this.setCellFromCodePoint(this.length - 1, 0, 1, (null == n2 ? void 0 : n2.fg) || 0, (null == n2 ? void 0 : n2.bg) || 0, (null == n2 ? void 0 : n2.extended) || new s2.ExtendedAttrs());
146100
+ 2 === this.getWidth(this.length - 1) && this.setCellFromCodepoint(this.length - 1, 0, 1, i3);
146006
146101
  }
146007
- deleteCells(e3, t3, i3, n2) {
146102
+ deleteCells(e3, t3, i3) {
146008
146103
  if (e3 %= this.length, t3 < this.length - e3) {
146009
146104
  const s3 = new r.CellData();
146010
146105
  for (let i4 = 0; i4 < this.length - e3 - t3; ++i4) this.setCell(e3 + i4, this.loadCell(e3 + t3 + i4, s3));
146011
146106
  for (let e4 = this.length - t3; e4 < this.length; ++e4) this.setCell(e4, i3);
146012
146107
  } else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
146013
- e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodePoint(e3 - 1, 0, 1, (null == n2 ? void 0 : n2.fg) || 0, (null == n2 ? void 0 : n2.bg) || 0, (null == n2 ? void 0 : n2.extended) || new s2.ExtendedAttrs()), 0 !== this.getWidth(e3) || this.hasContent(e3) || this.setCellFromCodePoint(e3, 0, 1, (null == n2 ? void 0 : n2.fg) || 0, (null == n2 ? void 0 : n2.bg) || 0, (null == n2 ? void 0 : n2.extended) || new s2.ExtendedAttrs());
146108
+ e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), 0 !== this.getWidth(e3) || this.hasContent(e3) || this.setCellFromCodepoint(e3, 0, 1, i3);
146014
146109
  }
146015
- replaceCells(e3, t3, i3, r2, n2 = false) {
146016
- if (n2) for (e3 && 2 === this.getWidth(e3 - 1) && !this.isProtected(e3 - 1) && this.setCellFromCodePoint(e3 - 1, 0, 1, (null == r2 ? void 0 : r2.fg) || 0, (null == r2 ? void 0 : r2.bg) || 0, (null == r2 ? void 0 : r2.extended) || new s2.ExtendedAttrs()), t3 < this.length && 2 === this.getWidth(t3 - 1) && !this.isProtected(t3) && this.setCellFromCodePoint(t3, 0, 1, (null == r2 ? void 0 : r2.fg) || 0, (null == r2 ? void 0 : r2.bg) || 0, (null == r2 ? void 0 : r2.extended) || new s2.ExtendedAttrs()); e3 < t3 && e3 < this.length; ) this.isProtected(e3) || this.setCell(e3, i3), e3++;
146017
- else for (e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodePoint(e3 - 1, 0, 1, (null == r2 ? void 0 : r2.fg) || 0, (null == r2 ? void 0 : r2.bg) || 0, (null == r2 ? void 0 : r2.extended) || new s2.ExtendedAttrs()), t3 < this.length && 2 === this.getWidth(t3 - 1) && this.setCellFromCodePoint(t3, 0, 1, (null == r2 ? void 0 : r2.fg) || 0, (null == r2 ? void 0 : r2.bg) || 0, (null == r2 ? void 0 : r2.extended) || new s2.ExtendedAttrs()); e3 < t3 && e3 < this.length; ) this.setCell(e3++, i3);
146110
+ replaceCells(e3, t3, i3, s3 = false) {
146111
+ if (s3) for (e3 && 2 === this.getWidth(e3 - 1) && !this.isProtected(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && !this.isProtected(t3) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.isProtected(e3) || this.setCell(e3, i3), e3++;
146112
+ else for (e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.setCell(e3++, i3);
146018
146113
  }
146019
146114
  resize(e3, t3) {
146020
146115
  if (e3 === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
@@ -146093,14 +146188,15 @@ WARNING: This link could potentially be dangerous`)) {
146093
146188
  r3 >= t3 && (this._combined[r3 - t3 + i3] = e3._combined[r3]);
146094
146189
  }
146095
146190
  }
146096
- translateToString(e3 = false, t3 = 0, i3 = this.length) {
146097
- e3 && (i3 = Math.min(i3, this.getTrimmedLength()));
146098
- let s3 = "";
146191
+ translateToString(e3, t3, i3, s3) {
146192
+ t3 = t3 ?? 0, i3 = i3 ?? this.length, e3 && (i3 = Math.min(i3, this.getTrimmedLength())), s3 && (s3.length = 0);
146193
+ let r2 = "";
146099
146194
  for (; t3 < i3; ) {
146100
- const e4 = this._data[3 * t3 + 0], i4 = 2097151 & e4;
146101
- s3 += 2097152 & e4 ? this._combined[t3] : i4 ? (0, o.stringFromCodePoint)(i4) : n.WHITESPACE_CELL_CHAR, t3 += e4 >> 22 || 1;
146195
+ const e4 = this._data[3 * t3 + 0], i4 = 2097151 & e4, a2 = 2097152 & e4 ? this._combined[t3] : i4 ? (0, o.stringFromCodePoint)(i4) : n.WHITESPACE_CELL_CHAR;
146196
+ if (r2 += a2, s3) for (let e5 = 0; e5 < a2.length; ++e5) s3.push(t3);
146197
+ t3 += e4 >> 22 || 1;
146102
146198
  }
146103
- return s3;
146199
+ return s3 && s3.push(t3), r2;
146104
146200
  }
146105
146201
  }
146106
146202
  t2.BufferLine = h;
@@ -146283,11 +146379,7 @@ WARNING: This link could potentially be dangerous`)) {
146283
146379
  "UIKeyInputUpArrow" === e3.key ? o.key = t3 ? s2.C0.ESC + "OA" : s2.C0.ESC + "[A" : "UIKeyInputLeftArrow" === e3.key ? o.key = t3 ? s2.C0.ESC + "OD" : s2.C0.ESC + "[D" : "UIKeyInputRightArrow" === e3.key ? o.key = t3 ? s2.C0.ESC + "OC" : s2.C0.ESC + "[C" : "UIKeyInputDownArrow" === e3.key && (o.key = t3 ? s2.C0.ESC + "OB" : s2.C0.ESC + "[B");
146284
146380
  break;
146285
146381
  case 8:
146286
- if (e3.altKey) {
146287
- o.key = s2.C0.ESC + s2.C0.DEL;
146288
- break;
146289
- }
146290
- o.key = s2.C0.DEL;
146382
+ o.key = e3.ctrlKey ? "\b" : s2.C0.DEL, e3.altKey && (o.key = s2.C0.ESC + o.key);
146291
146383
  break;
146292
146384
  case 9:
146293
146385
  if (e3.shiftKey) {
@@ -146375,7 +146467,7 @@ WARNING: This link could potentially be dangerous`)) {
146375
146467
  default:
146376
146468
  if (!e3.ctrlKey || e3.shiftKey || e3.altKey || e3.metaKey) if (i3 && !n || !e3.altKey || e3.metaKey) !i3 || e3.altKey || e3.ctrlKey || e3.shiftKey || !e3.metaKey ? e3.key && !e3.ctrlKey && !e3.altKey && !e3.metaKey && e3.keyCode >= 48 && 1 === e3.key.length ? o.key = e3.key : e3.key && e3.ctrlKey && ("_" === e3.key && (o.key = s2.C0.US), "@" === e3.key && (o.key = s2.C0.NUL)) : 65 === e3.keyCode && (o.type = 1);
146377
146469
  else {
146378
- const t4 = r[e3.keyCode], i4 = null == t4 ? void 0 : t4[e3.shiftKey ? 1 : 0];
146470
+ const t4 = r[e3.keyCode], i4 = t4?.[e3.shiftKey ? 1 : 0];
146379
146471
  if (i4) o.key = s2.C0.ESC + i4;
146380
146472
  else if (e3.keyCode >= 65 && e3.keyCode <= 90) {
146381
146473
  const t5 = e3.ctrlKey ? e3.keyCode - 64 : e3.keyCode + 32;
@@ -146505,19 +146597,19 @@ WARNING: This link could potentially be dangerous`)) {
146505
146597
  return a;
146506
146598
  }
146507
146599
  };
146508
- }, 225: (e2, t2) => {
146600
+ }, 225: (e2, t2, i2) => {
146509
146601
  Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeV6 = void 0;
146510
- const i2 = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], s2 = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
146511
- let r;
146602
+ const s2 = i2(1480), r = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], n = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
146603
+ let o;
146512
146604
  t2.UnicodeV6 = class {
146513
146605
  constructor() {
146514
- if (this.version = "6", !r) {
146515
- r = new Uint8Array(65536), r.fill(1), r[0] = 0, r.fill(0, 1, 32), r.fill(0, 127, 160), r.fill(2, 4352, 4448), r[9001] = 2, r[9002] = 2, r.fill(2, 11904, 42192), r[12351] = 1, r.fill(2, 44032, 55204), r.fill(2, 63744, 64256), r.fill(2, 65040, 65050), r.fill(2, 65072, 65136), r.fill(2, 65280, 65377), r.fill(2, 65504, 65511);
146516
- for (let e3 = 0; e3 < i2.length; ++e3) r.fill(0, i2[e3][0], i2[e3][1] + 1);
146606
+ if (this.version = "6", !o) {
146607
+ o = new Uint8Array(65536), o.fill(1), o[0] = 0, o.fill(0, 1, 32), o.fill(0, 127, 160), o.fill(2, 4352, 4448), o[9001] = 2, o[9002] = 2, o.fill(2, 11904, 42192), o[12351] = 1, o.fill(2, 44032, 55204), o.fill(2, 63744, 64256), o.fill(2, 65040, 65050), o.fill(2, 65072, 65136), o.fill(2, 65280, 65377), o.fill(2, 65504, 65511);
146608
+ for (let e3 = 0; e3 < r.length; ++e3) o.fill(0, r[e3][0], r[e3][1] + 1);
146517
146609
  }
146518
146610
  }
146519
146611
  wcwidth(e3) {
146520
- return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ? r[e3] : (function(e4, t3) {
146612
+ return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ? o[e3] : (function(e4, t3) {
146521
146613
  let i3, s3 = 0, r2 = t3.length - 1;
146522
146614
  if (e4 < t3[0][0] || e4 > t3[r2][1]) return false;
146523
146615
  for (; r2 >= s3; ) if (i3 = s3 + r2 >> 1, e4 > t3[i3][1]) s3 = i3 + 1;
@@ -146526,7 +146618,15 @@ WARNING: This link could potentially be dangerous`)) {
146526
146618
  r2 = i3 - 1;
146527
146619
  }
146528
146620
  return false;
146529
- })(e3, s2) ? 0 : e3 >= 131072 && e3 <= 196605 || e3 >= 196608 && e3 <= 262141 ? 2 : 1;
146621
+ })(e3, n) ? 0 : e3 >= 131072 && e3 <= 196605 || e3 >= 196608 && e3 <= 262141 ? 2 : 1;
146622
+ }
146623
+ charProperties(e3, t3) {
146624
+ let i3 = this.wcwidth(e3), r2 = 0 === i3 && 0 !== t3;
146625
+ if (r2) {
146626
+ const e4 = s2.UnicodeService.extractWidth(t3);
146627
+ 0 === e4 ? r2 = false : e4 > i3 && (i3 = e4);
146628
+ }
146629
+ return s2.UnicodeService.createPropertyValue(0, i3, r2);
146530
146630
  }
146531
146631
  };
146532
146632
  }, 5981: (e2, t2, i2) => {
@@ -146712,7 +146812,7 @@ WARNING: This link could potentially be dangerous`)) {
146712
146812
  })();
146713
146813
  class c extends s2.Disposable {
146714
146814
  constructor(e3 = t2.VT500_TRANSITION_TABLE) {
146715
- super(), this._transitions = e3, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new r.Params(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, this._printHandlerFb = (e4, t3, i3) => {
146815
+ super(), this._transitions = e3, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new r.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (e4, t3, i3) => {
146716
146816
  }, this._executeHandlerFb = (e4) => {
146717
146817
  }, this._csiHandlerFb = (e4, t3) => {
146718
146818
  }, this._escHandlerFb = (e4) => {
@@ -146814,7 +146914,7 @@ WARNING: This link could potentially be dangerous`)) {
146814
146914
  this._errorHandler = this._errorHandlerFb;
146815
146915
  }
146816
146916
  reset() {
146817
- this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
146917
+ this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
146818
146918
  }
146819
146919
  _preserveStack(e3, t3, i3, s3, r2) {
146820
146920
  this._parseStack.state = e3, this._parseStack.handlers = t3, this._parseStack.handlerPos = i3, this._parseStack.transition = s3, this._parseStack.chunkPos = r2;
@@ -146847,7 +146947,7 @@ WARNING: This link could potentially be dangerous`)) {
146847
146947
  if (r2 = e3[this._parseStack.chunkPos], s3 = this._oscParser.end(24 !== r2 && 26 !== r2, i3), s3) return s3;
146848
146948
  27 === r2 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
146849
146949
  }
146850
- this._parseStack.state = 0, o2 = this._parseStack.chunkPos + 1, this.precedingCodepoint = 0, this.currentState = 15 & this._parseStack.transition;
146950
+ this._parseStack.state = 0, o2 = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
146851
146951
  }
146852
146952
  for (let i4 = o2; i4 < t3; ++i4) {
146853
146953
  switch (r2 = e3[i4], n2 = this._transitions.table[this.currentState << 8 | (r2 < 160 ? r2 : h)], n2 >> 4) {
@@ -146872,7 +146972,7 @@ WARNING: This link could potentially be dangerous`)) {
146872
146972
  }
146873
146973
  break;
146874
146974
  case 3:
146875
- this._executeHandlers[r2] ? this._executeHandlers[r2]() : this._executeHandlerFb(r2), this.precedingCodepoint = 0;
146975
+ this._executeHandlers[r2] ? this._executeHandlers[r2]() : this._executeHandlerFb(r2), this.precedingJoinState = 0;
146876
146976
  break;
146877
146977
  case 0:
146878
146978
  break;
@@ -146883,7 +146983,7 @@ WARNING: This link could potentially be dangerous`)) {
146883
146983
  const o3 = this._csiHandlers[this._collect << 8 | r2];
146884
146984
  let a2 = o3 ? o3.length - 1 : -1;
146885
146985
  for (; a2 >= 0 && (s3 = o3[a2](this._params), true !== s3); a2--) if (s3 instanceof Promise) return this._preserveStack(3, o3, a2, n2, i4), s3;
146886
- a2 < 0 && this._csiHandlerFb(this._collect << 8 | r2, this._params), this.precedingCodepoint = 0;
146986
+ a2 < 0 && this._csiHandlerFb(this._collect << 8 | r2, this._params), this.precedingJoinState = 0;
146887
146987
  break;
146888
146988
  case 8:
146889
146989
  do {
@@ -146907,7 +147007,7 @@ WARNING: This link could potentially be dangerous`)) {
146907
147007
  const c2 = this._escHandlers[this._collect << 8 | r2];
146908
147008
  let l = c2 ? c2.length - 1 : -1;
146909
147009
  for (; l >= 0 && (s3 = c2[l](), true !== s3); l--) if (s3 instanceof Promise) return this._preserveStack(4, c2, l, n2, i4), s3;
146910
- l < 0 && this._escHandlerFb(this._collect << 8 | r2), this.precedingCodepoint = 0;
147010
+ l < 0 && this._escHandlerFb(this._collect << 8 | r2), this.precedingJoinState = 0;
146911
147011
  break;
146912
147012
  case 11:
146913
147013
  this._params.reset(), this._params.addParam(0), this._collect = 0;
@@ -146923,7 +147023,7 @@ WARNING: This link could potentially be dangerous`)) {
146923
147023
  break;
146924
147024
  case 14:
146925
147025
  if (s3 = this._dcsParser.unhook(24 !== r2 && 26 !== r2), s3) return this._preserveStack(6, [], 0, n2, i4), s3;
146926
- 27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
147026
+ 27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
146927
147027
  break;
146928
147028
  case 4:
146929
147029
  this._oscParser.start();
@@ -146936,7 +147036,7 @@ WARNING: This link could potentially be dangerous`)) {
146936
147036
  break;
146937
147037
  case 6:
146938
147038
  if (s3 = this._oscParser.end(24 !== r2 && 26 !== r2), s3) return this._preserveStack(5, [], 0, n2, i4), s3;
146939
- 27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
147039
+ 27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
146940
147040
  }
146941
147041
  this.currentState = 15 & n2;
146942
147042
  }
@@ -147434,7 +147534,7 @@ WARNING: This link could potentially be dangerous`)) {
147434
147534
  return this._decorations.values();
147435
147535
  }
147436
147536
  constructor() {
147437
- super(), this._decorations = new o.SortedList(((e3) => null == e3 ? void 0 : e3.marker.line)), this._onDecorationRegistered = this.register(new r.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new r.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, n.toDisposable)((() => this.reset())));
147537
+ super(), this._decorations = new o.SortedList(((e3) => e3?.marker.line)), this._onDecorationRegistered = this.register(new r.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new r.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, n.toDisposable)((() => this.reset())));
147438
147538
  }
147439
147539
  registerDecoration(e3) {
147440
147540
  if (e3.marker.isDisposed) return;
@@ -147452,14 +147552,12 @@ WARNING: This link could potentially be dangerous`)) {
147452
147552
  this._decorations.clear();
147453
147553
  }
147454
147554
  *getDecorationsAtCell(e3, t3, i3) {
147455
- var s3, r2, n2;
147456
- let o2 = 0, a2 = 0;
147457
- for (const h2 of this._decorations.getKeyIterator(t3)) o2 = null !== (s3 = h2.options.x) && void 0 !== s3 ? s3 : 0, a2 = o2 + (null !== (r2 = h2.options.width) && void 0 !== r2 ? r2 : 1), e3 >= o2 && e3 < a2 && (!i3 || (null !== (n2 = h2.options.layer) && void 0 !== n2 ? n2 : "bottom") === i3) && (yield h2);
147555
+ let s3 = 0, r2 = 0;
147556
+ for (const n2 of this._decorations.getKeyIterator(t3)) s3 = n2.options.x ?? 0, r2 = s3 + (n2.options.width ?? 1), e3 >= s3 && e3 < r2 && (!i3 || (n2.options.layer ?? "bottom") === i3) && (yield n2);
147458
147557
  }
147459
147558
  forEachDecorationAtCell(e3, t3, i3, s3) {
147460
147559
  this._decorations.forEachByKey(t3, ((t4) => {
147461
- var r2, n2, o2;
147462
- a = null !== (r2 = t4.options.x) && void 0 !== r2 ? r2 : 0, h = a + (null !== (n2 = t4.options.width) && void 0 !== n2 ? n2 : 1), e3 >= a && e3 < h && (!i3 || (null !== (o2 = t4.options.layer) && void 0 !== o2 ? o2 : "bottom") === i3) && s3(t4);
147560
+ a = t4.options.x ?? 0, h = a + (t4.options.width ?? 1), e3 >= a && e3 < h && (!i3 || (t4.options.layer ?? "bottom") === i3) && s3(t4);
147463
147561
  }));
147464
147562
  }
147465
147563
  }
@@ -147555,24 +147653,19 @@ WARNING: This link could potentially be dangerous`)) {
147555
147653
  this._evalLazyOptionalParams(i3), e3.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t3, ...i3);
147556
147654
  }
147557
147655
  trace(e3, ...t3) {
147558
- var i3, s3;
147559
- this._logLevel <= o.LogLevelEnum.TRACE && this._log(null !== (s3 = null === (i3 = this._optionsService.options.logger) || void 0 === i3 ? void 0 : i3.trace.bind(this._optionsService.options.logger)) && void 0 !== s3 ? s3 : console.log, e3, t3);
147656
+ this._logLevel <= o.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
147560
147657
  }
147561
147658
  debug(e3, ...t3) {
147562
- var i3, s3;
147563
- this._logLevel <= o.LogLevelEnum.DEBUG && this._log(null !== (s3 = null === (i3 = this._optionsService.options.logger) || void 0 === i3 ? void 0 : i3.debug.bind(this._optionsService.options.logger)) && void 0 !== s3 ? s3 : console.log, e3, t3);
147659
+ this._logLevel <= o.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
147564
147660
  }
147565
147661
  info(e3, ...t3) {
147566
- var i3, s3;
147567
- this._logLevel <= o.LogLevelEnum.INFO && this._log(null !== (s3 = null === (i3 = this._optionsService.options.logger) || void 0 === i3 ? void 0 : i3.info.bind(this._optionsService.options.logger)) && void 0 !== s3 ? s3 : console.info, e3, t3);
147662
+ this._logLevel <= o.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e3, t3);
147568
147663
  }
147569
147664
  warn(e3, ...t3) {
147570
- var i3, s3;
147571
- this._logLevel <= o.LogLevelEnum.WARN && this._log(null !== (s3 = null === (i3 = this._optionsService.options.logger) || void 0 === i3 ? void 0 : i3.warn.bind(this._optionsService.options.logger)) && void 0 !== s3 ? s3 : console.warn, e3, t3);
147665
+ this._logLevel <= o.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e3, t3);
147572
147666
  }
147573
147667
  error(e3, ...t3) {
147574
- var i3, s3;
147575
- this._logLevel <= o.LogLevelEnum.ERROR && this._log(null !== (s3 = null === (i3 = this._optionsService.options.logger) || void 0 === i3 ? void 0 : i3.error.bind(this._optionsService.options.logger)) && void 0 !== s3 ? s3 : console.error, e3, t3);
147668
+ this._logLevel <= o.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e3, t3);
147576
147669
  }
147577
147670
  };
147578
147671
  t2.LogService = c = s2([r(0, o.IOptionsService)], c), t2.setTraceLogger = function(e3) {
@@ -147590,19 +147683,21 @@ WARNING: This link could potentially be dangerous`)) {
147590
147683
  }, 7302: (e2, t2, i2) => {
147591
147684
  Object.defineProperty(t2, "__esModule", { value: true }), t2.OptionsService = t2.DEFAULT_OPTIONS = void 0;
147592
147685
  const s2 = i2(8460), r = i2(844), n = i2(6114);
147593
- t2.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: false, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: true, drawBoldTextInBrightColors: true, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, rightClickSelectsWord: n.isMac, windowOptions: {}, windowsMode: false, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", cancelEvents: false, overviewRulerWidth: 0 };
147686
+ t2.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: false, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: true, drawBoldTextInBrightColors: true, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: false, rightClickSelectsWord: n.isMac, windowOptions: {}, windowsMode: false, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", cancelEvents: false, overviewRulerWidth: 0 };
147594
147687
  const o = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
147595
147688
  class a extends r.Disposable {
147596
147689
  constructor(e3) {
147597
147690
  super(), this._onOptionChange = this.register(new s2.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
147598
- const i3 = Object.assign({}, t2.DEFAULT_OPTIONS);
147691
+ const i3 = { ...t2.DEFAULT_OPTIONS };
147599
147692
  for (const t3 in e3) if (t3 in i3) try {
147600
147693
  const s3 = e3[t3];
147601
147694
  i3[t3] = this._sanitizeAndValidateOption(t3, s3);
147602
147695
  } catch (e4) {
147603
147696
  console.error(e4);
147604
147697
  }
147605
- this.rawOptions = i3, this.options = Object.assign({}, i3), this._setupOptions();
147698
+ this.rawOptions = i3, this.options = { ...i3 }, this._setupOptions(), this.register((0, r.toDisposable)((() => {
147699
+ this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
147700
+ })));
147606
147701
  }
147607
147702
  onSpecificOptionChange(e3, t3) {
147608
147703
  return this.onOptionChange(((i3) => {
@@ -147663,7 +147758,7 @@ WARNING: This link could potentially be dangerous`)) {
147663
147758
  if (!i3 && 0 !== i3) throw new Error(`${e3} must be numeric, value: ${i3}`);
147664
147759
  break;
147665
147760
  case "windowsPty":
147666
- i3 = null != i3 ? i3 : {};
147761
+ i3 = i3 ?? {};
147667
147762
  }
147668
147763
  return i3;
147669
147764
  }
@@ -147705,8 +147800,7 @@ WARNING: This link could potentially be dangerous`)) {
147705
147800
  }
147706
147801
  }
147707
147802
  getLinkData(e3) {
147708
- var t3;
147709
- return null === (t3 = this._dataByLinkId.get(e3)) || void 0 === t3 ? void 0 : t3.data;
147803
+ return this._dataByLinkId.get(e3)?.data;
147710
147804
  }
147711
147805
  _getEntryIdKey(e3) {
147712
147806
  return `${e3.id};;${e3.uri}`;
@@ -147742,7 +147836,19 @@ WARNING: This link could potentially be dangerous`)) {
147742
147836
  }, 1480: (e2, t2, i2) => {
147743
147837
  Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeService = void 0;
147744
147838
  const s2 = i2(8460), r = i2(225);
147745
- t2.UnicodeService = class {
147839
+ class n {
147840
+ static extractShouldJoin(e3) {
147841
+ return 0 != (1 & e3);
147842
+ }
147843
+ static extractWidth(e3) {
147844
+ return e3 >> 1 & 3;
147845
+ }
147846
+ static extractCharKind(e3) {
147847
+ return e3 >> 3;
147848
+ }
147849
+ static createPropertyValue(e3, t3, i3 = false) {
147850
+ return (16777215 & e3) << 3 | (3 & t3) << 1 | (i3 ? 1 : 0);
147851
+ }
147746
147852
  constructor() {
147747
147853
  this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new s2.EventEmitter(), this.onChange = this._onChange.event;
147748
147854
  const e3 = new r.UnicodeV6();
@@ -147768,20 +147874,26 @@ WARNING: This link could potentially be dangerous`)) {
147768
147874
  return this._activeProvider.wcwidth(e3);
147769
147875
  }
147770
147876
  getStringCellWidth(e3) {
147771
- let t3 = 0;
147772
- const i3 = e3.length;
147773
- for (let s3 = 0; s3 < i3; ++s3) {
147774
- let r2 = e3.charCodeAt(s3);
147775
- if (55296 <= r2 && r2 <= 56319) {
147776
- if (++s3 >= i3) return t3 + this.wcwidth(r2);
147777
- const n = e3.charCodeAt(s3);
147778
- 56320 <= n && n <= 57343 ? r2 = 1024 * (r2 - 55296) + n - 56320 + 65536 : t3 += this.wcwidth(n);
147877
+ let t3 = 0, i3 = 0;
147878
+ const s3 = e3.length;
147879
+ for (let r2 = 0; r2 < s3; ++r2) {
147880
+ let o = e3.charCodeAt(r2);
147881
+ if (55296 <= o && o <= 56319) {
147882
+ if (++r2 >= s3) return t3 + this.wcwidth(o);
147883
+ const i4 = e3.charCodeAt(r2);
147884
+ 56320 <= i4 && i4 <= 57343 ? o = 1024 * (o - 55296) + i4 - 56320 + 65536 : t3 += this.wcwidth(i4);
147779
147885
  }
147780
- t3 += this.wcwidth(r2);
147886
+ const a = this.charProperties(o, i3);
147887
+ let h = n.extractWidth(a);
147888
+ n.extractShouldJoin(a) && (h -= n.extractWidth(i3)), t3 += h, i3 = a;
147781
147889
  }
147782
147890
  return t3;
147783
147891
  }
147784
- };
147892
+ charProperties(e3, t3) {
147893
+ return this._activeProvider.charProperties(e3, t3);
147894
+ }
147895
+ }
147896
+ t2.UnicodeService = n;
147785
147897
  } }, t = {};
147786
147898
  function i(s2) {
147787
147899
  var r = t[s2];
@@ -147796,7 +147908,7 @@ WARNING: This link could potentially be dangerous`)) {
147796
147908
  const t2 = i(9042), r = i(3236), n = i(844), o = i(5741), a = i(8285), h = i(7975), c = i(7090), l = ["cols", "rows"];
147797
147909
  class d extends n.Disposable {
147798
147910
  constructor(e3) {
147799
- super(), this._core = this.register(new r.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = Object.assign({}, this._core.options);
147911
+ super(), this._core = this.register(new r.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = { ...this._core.options };
147800
147912
  const t3 = (e4) => this._core.options[e4], i2 = (e4, t4) => {
147801
147913
  this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
147802
147914
  };
@@ -147901,6 +148013,9 @@ WARNING: This link could potentially be dangerous`)) {
147901
148013
  focus() {
147902
148014
  this._core.focus();
147903
148015
  }
148016
+ input(e3, t3 = true) {
148017
+ this._core.input(e3, t3);
148018
+ }
147904
148019
  resize(e3, t3) {
147905
148020
  this._verifyIntegers(e3, t3), this._core.resize(e3, t3);
147906
148021
  }
@@ -147910,6 +148025,9 @@ WARNING: This link could potentially be dangerous`)) {
147910
148025
  attachCustomKeyEventHandler(e3) {
147911
148026
  this._core.attachCustomKeyEventHandler(e3);
147912
148027
  }
148028
+ attachCustomWheelEventHandler(e3) {
148029
+ this._core.attachCustomWheelEventHandler(e3);
148030
+ }
147913
148031
  registerLinkProvider(e3) {
147914
148032
  return this._core.registerLinkProvider(e3);
147915
148033
  }
@@ -147923,8 +148041,7 @@ WARNING: This link could potentially be dangerous`)) {
147923
148041
  return this._verifyIntegers(e3), this._core.registerMarker(e3);
147924
148042
  }
147925
148043
  registerDecoration(e3) {
147926
- var t3, i2, s2;
147927
- return this._checkProposedApi(), this._verifyPositiveIntegers(null !== (t3 = e3.x) && void 0 !== t3 ? t3 : 0, null !== (i2 = e3.width) && void 0 !== i2 ? i2 : 0, null !== (s2 = e3.height) && void 0 !== s2 ? s2 : 0), this._core.registerDecoration(e3);
148044
+ return this._checkProposedApi(), this._verifyPositiveIntegers(e3.x ?? 0, e3.width ?? 0, e3.height ?? 0), this._core.registerDecoration(e3);
147928
148045
  }
147929
148046
  hasSelection() {
147930
148047
  return this._core.hasSelection();
@@ -148005,9 +148122,9 @@ WARNING: This link could potentially be dangerous`)) {
148005
148122
  }
148006
148123
  });
148007
148124
 
148008
- // node_modules/xterm-addon-fit/lib/xterm-addon-fit.js
148009
- var require_xterm_addon_fit = __commonJS({
148010
- "node_modules/xterm-addon-fit/lib/xterm-addon-fit.js"(exports, module) {
148125
+ // node_modules/@xterm/addon-fit/lib/addon-fit.js
148126
+ var require_addon_fit = __commonJS({
148127
+ "node_modules/@xterm/addon-fit/lib/addon-fit.js"(exports, module) {
148011
148128
  !(function(e, t) {
148012
148129
  "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.FitAddon = t() : e.FitAddon = t();
148013
148130
  })(self, (() => (() => {
@@ -148455,12 +148572,12 @@ WARNING: This link could potentially be dangerous`)) {
148455
148572
  });
148456
148573
  });
148457
148574
  }
148458
- var import_xterm, import_xterm_addon_fit, IPC_TIMEOUT, TerminalOverlay;
148575
+ var import_xterm, import_addon_fit, IPC_TIMEOUT, TerminalOverlay;
148459
148576
  var init_TerminalOverlay = __esm({
148460
148577
  "src/ui/TerminalOverlay.ts"() {
148461
148578
  "use strict";
148462
148579
  import_xterm = __toESM(require_xterm());
148463
- import_xterm_addon_fit = __toESM(require_xterm_addon_fit());
148580
+ import_addon_fit = __toESM(require_addon_fit());
148464
148581
  init_officeManager();
148465
148582
  IPC_TIMEOUT = 1e4;
148466
148583
  TerminalOverlay = class _TerminalOverlay {
@@ -149102,7 +149219,7 @@ WARNING: This link could potentially be dangerous`)) {
149102
149219
  scrollback: 1e4,
149103
149220
  allowProposedApi: true
149104
149221
  });
149105
- this.fitAddon = new import_xterm_addon_fit.FitAddon();
149222
+ this.fitAddon = new import_addon_fit.FitAddon();
149106
149223
  this.terminal.loadAddon(this.fitAddon);
149107
149224
  this.terminal.open(this.terminalDiv);
149108
149225
  this.fitAddon.fit();
@@ -152219,9 +152336,11 @@ WARNING: This link could potentially be dangerous`)) {
152219
152336
  laptop.setDepth(ySortDepth(deskY, worldH) + 0.1);
152220
152337
  this.desks.push({ sprite: desk, agentId: agent.id, x: deskX, y: deskY, laptopSprite: laptop, laptopDirection: dir });
152221
152338
  };
152339
+ const leftTableAgent = AGENTS.find((a) => a.position.x === 4 && a.position.y === 3);
152340
+ const rightTableAgent = AGENTS.find((a) => a.position.x === 13 && a.position.y === 3);
152222
152341
  const communalTables = [
152223
- { startCol: 4, agent: AGENTS[0] },
152224
- { startCol: 13, agent: AGENTS[2] }
152342
+ { startCol: 4, agent: leftTableAgent },
152343
+ { startCol: 13, agent: rightTableAgent }
152225
152344
  ];
152226
152345
  const tableStartRow = 4;
152227
152346
  communalTables.forEach((table) => {
@@ -152288,7 +152407,8 @@ WARNING: This link could potentially be dangerous`)) {
152288
152407
  y: sideStoolY
152289
152408
  });
152290
152409
  });
152291
- [AGENTS[1], AGENTS[3]].filter(Boolean).forEach((agent) => {
152410
+ const cornerAgents = AGENTS.filter((agent) => agent.position.y >= 8);
152411
+ cornerAgents.forEach((agent) => {
152292
152412
  const deskX = agent.position.x * this.tileSize + this.tileSize / 2;
152293
152413
  const deskY = (agent.position.y + 1) * this.tileSize + this.tileSize / 2;
152294
152414
  placeAgentDesk(agent, deskX, deskY);