copilotoffice 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/game.bundle.js +655 -544
- package/package.json +4 -4
- package/src/index.html +1 -1
package/dist/game.bundle.js
CHANGED
|
@@ -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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
55413
|
+
function Node2(i, x, y) {
|
|
55414
55414
|
this.i = i;
|
|
55415
55415
|
this.x = x;
|
|
55416
55416
|
this.y = y;
|
|
@@ -142057,9 +142057,9 @@ var CopilotOffice = (() => {
|
|
|
142057
142057
|
}
|
|
142058
142058
|
});
|
|
142059
142059
|
|
|
142060
|
-
// node_modules/xterm/lib/xterm.js
|
|
142060
|
+
// node_modules/@xterm/xterm/lib/xterm.js
|
|
142061
142061
|
var require_xterm = __commonJS({
|
|
142062
|
-
"node_modules/xterm/lib/xterm.js"(exports, module) {
|
|
142062
|
+
"node_modules/@xterm/xterm/lib/xterm.js"(exports, module) {
|
|
142063
142063
|
!(function(e, t) {
|
|
142064
142064
|
if ("object" == typeof exports && "object" == typeof module) module.exports = t();
|
|
142065
142065
|
else if ("function" == typeof define && define.amd) define([], t);
|
|
@@ -142067,7 +142067,7 @@ var CopilotOffice = (() => {
|
|
|
142067
142067
|
var i = t();
|
|
142068
142068
|
for (var s in i) ("object" == typeof exports ? exports : e)[s] = i[s];
|
|
142069
142069
|
}
|
|
142070
|
-
})(
|
|
142070
|
+
})(globalThis, (() => (() => {
|
|
142071
142071
|
"use strict";
|
|
142072
142072
|
var e = { 4567: function(e2, t2, i2) {
|
|
142073
142073
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
@@ -142081,13 +142081,13 @@ var CopilotOffice = (() => {
|
|
|
142081
142081
|
};
|
|
142082
142082
|
};
|
|
142083
142083
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.AccessibilityManager = void 0;
|
|
142084
|
-
const n = i2(9042), o = i2(
|
|
142085
|
-
let
|
|
142086
|
-
constructor(e3, t3) {
|
|
142087
|
-
super(), this._terminal = e3, this._renderService =
|
|
142084
|
+
const n = i2(9042), o = i2(9924), a = i2(844), h = i2(4725), c = i2(2585), l = i2(3656);
|
|
142085
|
+
let d = t2.AccessibilityManager = class extends a.Disposable {
|
|
142086
|
+
constructor(e3, t3, i3, s3) {
|
|
142087
|
+
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
142088
|
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 =
|
|
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.
|
|
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 = 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");
|
|
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.register((0, l.addDisposableDomListener)(document, "selectionchange", (() => this._handleSelectionChange()))), this.register(this._coreBrowserService.onDprChange((() => this._refreshRowsDimensions()))), this._refreshRows(), this.register((0, a.toDisposable)((() => {
|
|
142091
142091
|
this._accessibilityContainer.remove(), this._rowElements.length = 0;
|
|
142092
142092
|
})));
|
|
142093
142093
|
}
|
|
@@ -142095,12 +142095,10 @@ var CopilotOffice = (() => {
|
|
|
142095
142095
|
for (let t3 = 0; t3 < e3; t3++) this._handleChar(" ");
|
|
142096
142096
|
}
|
|
142097
142097
|
_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))
|
|
142099
|
-
this._accessibilityContainer.appendChild(this._liveRegion);
|
|
142100
|
-
}), 0));
|
|
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)));
|
|
142101
142099
|
}
|
|
142102
142100
|
_clearLiveRegion() {
|
|
142103
|
-
this._liveRegion.textContent = "", this._liveRegionLineCount = 0
|
|
142101
|
+
this._liveRegion.textContent = "", this._liveRegionLineCount = 0;
|
|
142104
142102
|
}
|
|
142105
142103
|
_handleKey(e3) {
|
|
142106
142104
|
this._clearLiveRegion(), /\p{Control}/u.test(e3) || this._charsToConsume.push(e3);
|
|
@@ -142111,8 +142109,8 @@ var CopilotOffice = (() => {
|
|
|
142111
142109
|
_renderRows(e3, t3) {
|
|
142112
142110
|
const i3 = this._terminal.buffer, s3 = i3.lines.length.toString();
|
|
142113
142111
|
for (let r2 = e3; r2 <= t3; r2++) {
|
|
142114
|
-
const e4 = i3.
|
|
142115
|
-
|
|
142112
|
+
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];
|
|
142113
|
+
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
142114
|
}
|
|
142117
142115
|
this._announceCharacters();
|
|
142118
142116
|
}
|
|
@@ -142133,6 +142131,30 @@ var CopilotOffice = (() => {
|
|
|
142133
142131
|
}
|
|
142134
142132
|
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
142133
|
}
|
|
142134
|
+
_handleSelectionChange() {
|
|
142135
|
+
if (0 === this._rowElements.length) return;
|
|
142136
|
+
const e3 = document.getSelection();
|
|
142137
|
+
if (!e3) return;
|
|
142138
|
+
if (e3.isCollapsed) return void (this._rowContainer.contains(e3.anchorNode) && this._terminal.clearSelection());
|
|
142139
|
+
if (!e3.anchorNode || !e3.focusNode) return void console.error("anchorNode and/or focusNode are null");
|
|
142140
|
+
let t3 = { node: e3.anchorNode, offset: e3.anchorOffset }, i3 = { node: e3.focusNode, offset: e3.focusOffset };
|
|
142141
|
+
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;
|
|
142142
|
+
const s3 = this._rowElements.slice(-1)[0];
|
|
142143
|
+
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;
|
|
142144
|
+
const r2 = ({ node: e4, offset: t4 }) => {
|
|
142145
|
+
const i4 = e4 instanceof Text ? e4.parentNode : e4;
|
|
142146
|
+
let s4 = parseInt(i4?.getAttribute("aria-posinset"), 10) - 1;
|
|
142147
|
+
if (isNaN(s4)) return console.warn("row is invalid. Race condition?"), null;
|
|
142148
|
+
const r3 = this._rowColumns.get(i4);
|
|
142149
|
+
if (!r3) return console.warn("columns is null. Race condition?"), null;
|
|
142150
|
+
let n3 = t4 < r3.length ? r3[t4] : r3.slice(-1)[0] + 1;
|
|
142151
|
+
return n3 >= this._terminal.cols && (++s4, n3 = 0), { row: s4, column: n3 };
|
|
142152
|
+
}, n2 = r2(t3), o2 = r2(i3);
|
|
142153
|
+
if (n2 && o2) {
|
|
142154
|
+
if (n2.row > o2.row || n2.row === o2.row && n2.column >= o2.column) throw new Error("invalid range");
|
|
142155
|
+
this._terminal.select(n2.column, n2.row, (o2.row - n2.row) * this._terminal.cols - n2.column + o2.column);
|
|
142156
|
+
}
|
|
142157
|
+
}
|
|
142136
142158
|
_handleResize(e3) {
|
|
142137
142159
|
this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
|
|
142138
142160
|
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 +142162,7 @@ var CopilotOffice = (() => {
|
|
|
142140
142162
|
this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
|
|
142141
142163
|
}
|
|
142142
142164
|
_createAccessibilityTreeNode() {
|
|
142143
|
-
const e3 =
|
|
142165
|
+
const e3 = this._coreBrowserService.mainDocument.createElement("div");
|
|
142144
142166
|
return e3.setAttribute("role", "listitem"), e3.tabIndex = -1, this._refreshRowDimensions(e3), e3;
|
|
142145
142167
|
}
|
|
142146
142168
|
_refreshRowsDimensions() {
|
|
@@ -142153,7 +142175,7 @@ var CopilotOffice = (() => {
|
|
|
142153
142175
|
e3.style.height = `${this._renderService.dimensions.css.cell.height}px`;
|
|
142154
142176
|
}
|
|
142155
142177
|
};
|
|
142156
|
-
t2.AccessibilityManager =
|
|
142178
|
+
t2.AccessibilityManager = d = s2([r(1, c.IInstantiationService), r(2, h.ICoreBrowserService), r(3, h.IRenderService)], d);
|
|
142157
142179
|
}, 3614: (e2, t2) => {
|
|
142158
142180
|
function i2(e3) {
|
|
142159
142181
|
return e3.replace(/\r?\n/g, "\r");
|
|
@@ -142206,7 +142228,7 @@ var CopilotOffice = (() => {
|
|
|
142206
142228
|
r || (r = true, e3.removeEventListener(t3, i2, s2));
|
|
142207
142229
|
} };
|
|
142208
142230
|
};
|
|
142209
|
-
},
|
|
142231
|
+
}, 3551: function(e2, t2, i2) {
|
|
142210
142232
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
142211
142233
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
142212
142234
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o2 = Reflect.decorate(e3, t3, i3, s3);
|
|
@@ -142217,32 +142239,23 @@ var CopilotOffice = (() => {
|
|
|
142217
142239
|
t3(i3, s3, e3);
|
|
142218
142240
|
};
|
|
142219
142241
|
};
|
|
142220
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.
|
|
142221
|
-
const n = i2(3656), o = i2(8460), a = i2(844), h = i2(2585);
|
|
142222
|
-
let
|
|
142242
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Linkifier = void 0;
|
|
142243
|
+
const n = i2(3656), o = i2(8460), a = i2(844), h = i2(2585), c = i2(4725);
|
|
142244
|
+
let l = t2.Linkifier = class extends a.Disposable {
|
|
142223
142245
|
get currentLink() {
|
|
142224
142246
|
return this._currentLink;
|
|
142225
142247
|
}
|
|
142226
|
-
constructor(e3) {
|
|
142227
|
-
super(), this.
|
|
142228
|
-
this._lastMouseEvent = void 0;
|
|
142248
|
+
constructor(e3, t3, i3, s3, r2) {
|
|
142249
|
+
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)((() => {
|
|
142250
|
+
this._lastMouseEvent = void 0, this._activeProviderReplies?.clear();
|
|
142229
142251
|
}))), this.register(this._bufferService.onResize((() => {
|
|
142230
142252
|
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", (() => {
|
|
142253
|
+
}))), this.register((0, n.addDisposableDomListener)(this._element, "mouseleave", (() => {
|
|
142241
142254
|
this._isMouseOut = true, this._clearCurrentLink();
|
|
142242
142255
|
}))), 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
142256
|
}
|
|
142244
142257
|
_handleMouseMove(e3) {
|
|
142245
|
-
|
|
142258
|
+
this._lastMouseEvent = e3;
|
|
142246
142259
|
const t3 = this._positionFromMouseEvent(e3, this._element, this._mouseService);
|
|
142247
142260
|
if (!t3) return;
|
|
142248
142261
|
this._isMouseOut = false;
|
|
@@ -142259,18 +142272,19 @@ var CopilotOffice = (() => {
|
|
|
142259
142272
|
this._currentLink && this._linkAtPosition(this._currentLink.link, e3) || (this._clearCurrentLink(), this._askForLink(e3, true));
|
|
142260
142273
|
}
|
|
142261
142274
|
_askForLink(e3, t3) {
|
|
142262
|
-
|
|
142263
|
-
|
|
142264
|
-
null == e4 || e4.forEach(((e5) => {
|
|
142275
|
+
this._activeProviderReplies && t3 || (this._activeProviderReplies?.forEach(((e4) => {
|
|
142276
|
+
e4?.forEach(((e5) => {
|
|
142265
142277
|
e5.link.dispose && e5.link.dispose();
|
|
142266
142278
|
}));
|
|
142267
142279
|
})), this._activeProviderReplies = /* @__PURE__ */ new Map(), this._activeLine = e3.y);
|
|
142268
|
-
let
|
|
142269
|
-
for (const [
|
|
142270
|
-
|
|
142280
|
+
let i3 = false;
|
|
142281
|
+
for (const [s3, r2] of this._linkProviderService.linkProviders.entries()) if (t3) {
|
|
142282
|
+
const t4 = this._activeProviderReplies?.get(s3);
|
|
142283
|
+
t4 && (i3 = this._checkLinkProviderResult(s3, e3, i3));
|
|
142284
|
+
} else r2.provideLinks(e3.y, ((t4) => {
|
|
142271
142285
|
if (this._isMouseOut) return;
|
|
142272
|
-
const
|
|
142273
|
-
|
|
142286
|
+
const r3 = t4?.map(((e4) => ({ link: e4 })));
|
|
142287
|
+
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
142288
|
}));
|
|
142275
142289
|
}
|
|
142276
142290
|
_removeIntersectingLinks(e3, t3) {
|
|
@@ -142290,19 +142304,18 @@ var CopilotOffice = (() => {
|
|
|
142290
142304
|
}
|
|
142291
142305
|
}
|
|
142292
142306
|
_checkLinkProviderResult(e3, t3, i3) {
|
|
142293
|
-
var s3;
|
|
142294
142307
|
if (!this._activeProviderReplies) return i3;
|
|
142295
|
-
const
|
|
142296
|
-
let
|
|
142297
|
-
for (let t4 = 0; t4 < e3; t4++) this._activeProviderReplies.has(t4) && !this._activeProviderReplies.get(t4) || (
|
|
142298
|
-
if (!
|
|
142299
|
-
const e4 =
|
|
142308
|
+
const s3 = this._activeProviderReplies.get(e3);
|
|
142309
|
+
let r2 = false;
|
|
142310
|
+
for (let t4 = 0; t4 < e3; t4++) this._activeProviderReplies.has(t4) && !this._activeProviderReplies.get(t4) || (r2 = true);
|
|
142311
|
+
if (!r2 && s3) {
|
|
142312
|
+
const e4 = s3.find(((e5) => this._linkAtPosition(e5.link, t3)));
|
|
142300
142313
|
e4 && (i3 = true, this._handleNewLink(e4));
|
|
142301
142314
|
}
|
|
142302
|
-
if (this._activeProviderReplies.size === this.
|
|
142303
|
-
const
|
|
142304
|
-
if (
|
|
142305
|
-
i3 = true, this._handleNewLink(
|
|
142315
|
+
if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !i3) for (let e4 = 0; e4 < this._activeProviderReplies.size; e4++) {
|
|
142316
|
+
const s4 = this._activeProviderReplies.get(e4)?.find(((e5) => this._linkAtPosition(e5.link, t3)));
|
|
142317
|
+
if (s4) {
|
|
142318
|
+
i3 = true, this._handleNewLink(s4);
|
|
142306
142319
|
break;
|
|
142307
142320
|
}
|
|
142308
142321
|
}
|
|
@@ -142312,48 +142325,38 @@ var CopilotOffice = (() => {
|
|
|
142312
142325
|
this._mouseDownLink = this._currentLink;
|
|
142313
142326
|
}
|
|
142314
142327
|
_handleMouseUp(e3) {
|
|
142315
|
-
if (!this.
|
|
142328
|
+
if (!this._currentLink) return;
|
|
142316
142329
|
const t3 = this._positionFromMouseEvent(e3, this._element, this._mouseService);
|
|
142317
142330
|
t3 && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, t3) && this._currentLink.link.activate(e3, this._currentLink.link.text);
|
|
142318
142331
|
}
|
|
142319
142332
|
_clearCurrentLink(e3, t3) {
|
|
142320
|
-
this.
|
|
142333
|
+
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
142334
|
}
|
|
142322
142335
|
_handleNewLink(e3) {
|
|
142323
|
-
if (!this.
|
|
142336
|
+
if (!this._lastMouseEvent) return;
|
|
142324
142337
|
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
|
-
|
|
142327
|
-
|
|
142328
|
-
|
|
142329
|
-
|
|
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) => {
|
|
142338
|
+
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) => {
|
|
142339
|
+
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));
|
|
142340
|
+
} }, underline: { get: () => this._currentLink?.state?.decorations.underline, set: (t4) => {
|
|
142341
|
+
this._currentLink?.state && this._currentLink?.state?.decorations.underline !== t4 && (this._currentLink.state.decorations.underline = t4, this._currentLink.state.isHovered && this._fireUnderlineEvent(e3.link, t4));
|
|
142342
|
+
} } }), this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(((e4) => {
|
|
142338
142343
|
if (!this._currentLink) return;
|
|
142339
142344
|
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
|
|
142345
|
+
if (this._currentLink.link.range.start.y >= t4 && this._currentLink.link.range.end.y <= i3 && (this._clearCurrentLink(t4, i3), this._lastMouseEvent)) {
|
|
142341
142346
|
const e5 = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
|
|
142342
142347
|
e5 && this._askForLink(e5, false);
|
|
142343
142348
|
}
|
|
142344
142349
|
}))));
|
|
142345
142350
|
}
|
|
142346
142351
|
_linkHover(e3, t3, i3) {
|
|
142347
|
-
|
|
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);
|
|
142352
|
+
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
142353
|
}
|
|
142350
142354
|
_fireUnderlineEvent(e3, t3) {
|
|
142351
142355
|
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
142356
|
(t3 ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(r2);
|
|
142353
142357
|
}
|
|
142354
142358
|
_linkLeave(e3, t3, i3) {
|
|
142355
|
-
|
|
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);
|
|
142359
|
+
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
142360
|
}
|
|
142358
142361
|
_linkAtPosition(e3, t3) {
|
|
142359
142362
|
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 +142370,7 @@ var CopilotOffice = (() => {
|
|
|
142367
142370
|
return { x1: e3, y1: t3, x2: i3, y2: s3, cols: this._bufferService.cols, fg: r2 };
|
|
142368
142371
|
}
|
|
142369
142372
|
};
|
|
142370
|
-
t2.
|
|
142373
|
+
t2.Linkifier = l = s2([r(1, c.IMouseService), r(2, c.IRenderService), r(3, h.IBufferService), r(4, c.ILinkProviderService)], l);
|
|
142371
142374
|
}, 9042: (e2, t2) => {
|
|
142372
142375
|
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
142376
|
}, 3730: function(e2, t2, i2) {
|
|
@@ -142388,42 +142391,35 @@ var CopilotOffice = (() => {
|
|
|
142388
142391
|
this._bufferService = e3, this._optionsService = t3, this._oscLinkService = i3;
|
|
142389
142392
|
}
|
|
142390
142393
|
provideLinks(e3, t3) {
|
|
142391
|
-
|
|
142392
|
-
|
|
142393
|
-
|
|
142394
|
-
|
|
142395
|
-
let
|
|
142396
|
-
|
|
142397
|
-
|
|
142398
|
-
|
|
142399
|
-
d = t4, l = a2.extended.urlId;
|
|
142394
|
+
const i3 = this._bufferService.buffer.lines.get(e3 - 1);
|
|
142395
|
+
if (!i3) return void t3(void 0);
|
|
142396
|
+
const s3 = [], r2 = this._optionsService.rawOptions.linkHandler, o2 = new n.CellData(), a2 = i3.getTrimmedLength();
|
|
142397
|
+
let c = -1, l = -1, d = false;
|
|
142398
|
+
for (let t4 = 0; t4 < a2; t4++) if (-1 !== l || i3.hasContent(t4)) {
|
|
142399
|
+
if (i3.loadCell(t4, o2), o2.hasExtendedAttrs() && o2.extended.urlId) {
|
|
142400
|
+
if (-1 === l) {
|
|
142401
|
+
l = t4, c = o2.extended.urlId;
|
|
142400
142402
|
continue;
|
|
142401
142403
|
}
|
|
142402
|
-
|
|
142403
|
-
} else -1 !==
|
|
142404
|
-
if (
|
|
142405
|
-
const
|
|
142406
|
-
if (
|
|
142407
|
-
const
|
|
142408
|
-
let
|
|
142409
|
-
if (!
|
|
142410
|
-
const e4 = new URL(
|
|
142411
|
-
["http:", "https:"].includes(e4.protocol) || (
|
|
142404
|
+
d = o2.extended.urlId !== c;
|
|
142405
|
+
} else -1 !== l && (d = true);
|
|
142406
|
+
if (d || -1 !== l && t4 === a2 - 1) {
|
|
142407
|
+
const i4 = this._oscLinkService.getLinkData(c)?.uri;
|
|
142408
|
+
if (i4) {
|
|
142409
|
+
const n2 = { start: { x: l + 1, y: e3 }, end: { x: t4 + (d || t4 !== a2 - 1 ? 0 : 1), y: e3 } };
|
|
142410
|
+
let o3 = false;
|
|
142411
|
+
if (!r2?.allowNonHttpProtocols) try {
|
|
142412
|
+
const e4 = new URL(i4);
|
|
142413
|
+
["http:", "https:"].includes(e4.protocol) || (o3 = true);
|
|
142412
142414
|
} catch (e4) {
|
|
142413
|
-
|
|
142414
|
-
}
|
|
142415
|
-
|
|
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
|
-
} });
|
|
142415
|
+
o3 = true;
|
|
142416
|
+
}
|
|
142417
|
+
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
142418
|
}
|
|
142423
|
-
|
|
142419
|
+
d = false, o2.hasExtendedAttrs() && o2.extended.urlId ? (l = t4, c = o2.extended.urlId) : (l = -1, c = -1);
|
|
142424
142420
|
}
|
|
142425
142421
|
}
|
|
142426
|
-
t3(
|
|
142422
|
+
t3(s3);
|
|
142427
142423
|
}
|
|
142428
142424
|
};
|
|
142429
142425
|
function h(e3, t3) {
|
|
@@ -142434,7 +142430,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142434
142430
|
if (e4) {
|
|
142435
142431
|
try {
|
|
142436
142432
|
e4.opener = null;
|
|
142437
|
-
} catch
|
|
142433
|
+
} catch {
|
|
142438
142434
|
}
|
|
142439
142435
|
e4.location.href = t3;
|
|
142440
142436
|
} else console.warn("Opening link blocked as opener could not be cleared");
|
|
@@ -142444,16 +142440,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142444
142440
|
}, 6193: (e2, t2) => {
|
|
142445
142441
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.RenderDebouncer = void 0, t2.RenderDebouncer = class {
|
|
142446
142442
|
constructor(e3, t3) {
|
|
142447
|
-
this.
|
|
142443
|
+
this._renderCallback = e3, this._coreBrowserService = t3, this._refreshCallbacks = [];
|
|
142448
142444
|
}
|
|
142449
142445
|
dispose() {
|
|
142450
|
-
this._animationFrame && (this.
|
|
142446
|
+
this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
|
|
142451
142447
|
}
|
|
142452
142448
|
addRefreshCallback(e3) {
|
|
142453
|
-
return this._refreshCallbacks.push(e3), this._animationFrame || (this._animationFrame = this.
|
|
142449
|
+
return this._refreshCallbacks.push(e3), this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame((() => this._innerRefresh()))), this._animationFrame;
|
|
142454
142450
|
}
|
|
142455
142451
|
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.
|
|
142452
|
+
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
142453
|
}
|
|
142458
142454
|
_innerRefresh() {
|
|
142459
142455
|
if (this._animationFrame = void 0, void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return void this._runRefreshCallbacks();
|
|
@@ -142465,33 +142461,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142465
142461
|
this._refreshCallbacks = [];
|
|
142466
142462
|
}
|
|
142467
142463
|
};
|
|
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
142464
|
}, 3236: (e2, t2, i2) => {
|
|
142492
142465
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Terminal = void 0;
|
|
142493
|
-
const s2 = i2(3614), r = i2(3656), n = i2(
|
|
142494
|
-
class P extends
|
|
142466
|
+
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);
|
|
142467
|
+
class P extends w.CoreTerminal {
|
|
142495
142468
|
get onFocus() {
|
|
142496
142469
|
return this._onFocus.event;
|
|
142497
142470
|
}
|
|
@@ -142508,9 +142481,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142508
142481
|
return this._onWillOpen.event;
|
|
142509
142482
|
}
|
|
142510
142483
|
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
|
|
142512
|
-
|
|
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);
|
|
142484
|
+
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)((() => {
|
|
142485
|
+
this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
|
|
142514
142486
|
})));
|
|
142515
142487
|
}
|
|
142516
142488
|
_handleColorEvent(e3) {
|
|
@@ -142535,10 +142507,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142535
142507
|
this.coreService.triggerDataEvent(`${D2.C0.ESC}]${i3};${(0, x.toRgbString)(s3)}${D2.C1_ESCAPED.ST}`);
|
|
142536
142508
|
break;
|
|
142537
142509
|
case 1:
|
|
142538
|
-
if ("ansi" === e4) this._themeService.modifyColors(((e5) => e5.ansi[t3.index] = b.
|
|
142510
|
+
if ("ansi" === e4) this._themeService.modifyColors(((e5) => e5.ansi[t3.index] = b.channels.toColor(...t3.color)));
|
|
142539
142511
|
else {
|
|
142540
142512
|
const i4 = e4;
|
|
142541
|
-
this._themeService.modifyColors(((e5) => e5[i4] = b.
|
|
142513
|
+
this._themeService.modifyColors(((e5) => e5[i4] = b.channels.toColor(...t3.color)));
|
|
142542
142514
|
}
|
|
142543
142515
|
break;
|
|
142544
142516
|
case 2:
|
|
@@ -142559,11 +142531,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142559
142531
|
e3 ? !this._accessibilityManager.value && this._renderService && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)) : this._accessibilityManager.clear();
|
|
142560
142532
|
}
|
|
142561
142533
|
_handleTextAreaFocus(e3) {
|
|
142562
|
-
this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D2.C0.ESC + "[I"), this.
|
|
142534
|
+
this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D2.C0.ESC + "[I"), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
|
|
142563
142535
|
}
|
|
142564
142536
|
blur() {
|
|
142565
|
-
|
|
142566
|
-
return null === (e3 = this.textarea) || void 0 === e3 ? void 0 : e3.blur();
|
|
142537
|
+
return this.textarea?.blur();
|
|
142567
142538
|
}
|
|
142568
142539
|
_handleTextAreaBlur() {
|
|
142569
142540
|
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 +142563,27 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142592
142563
|
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
142564
|
}
|
|
142594
142565
|
open(e3) {
|
|
142595
|
-
var t3;
|
|
142596
142566
|
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.
|
|
142598
|
-
|
|
142599
|
-
|
|
142567
|
+
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));
|
|
142568
|
+
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);
|
|
142569
|
+
const t3 = this._document.createDocumentFragment();
|
|
142570
|
+
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
142571
|
try {
|
|
142601
142572
|
this._onWillOpen.fire(this.element);
|
|
142602
|
-
} catch
|
|
142573
|
+
} catch {
|
|
142603
142574
|
}
|
|
142604
|
-
this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this.
|
|
142575
|
+
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
142576
|
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.
|
|
142577
|
+
}))), 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
142578
|
this.textarea.value = e4, this.textarea.focus(), this.textarea.select();
|
|
142608
142579
|
}))), this.register(this._onScroll.event(((e4) => {
|
|
142609
142580
|
this.viewport.syncScrollArea(), this._selectionService.refresh();
|
|
142610
|
-
}))), this.register((0, r.addDisposableDomListener)(this._viewportElement, "scroll", (() => this._selectionService.refresh()))), this.
|
|
142581
|
+
}))), 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
142582
|
!this._overviewRulerRenderer && e4 && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
|
|
142612
142583
|
})), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
|
|
142613
142584
|
}
|
|
142614
142585
|
_createRenderer() {
|
|
142615
|
-
return this._instantiationService.createInstance(_.DomRenderer, this.element, this.screenElement, this._viewportElement, this.
|
|
142586
|
+
return this._instantiationService.createInstance(_.DomRenderer, this, this._document, this.element, this.screenElement, this._viewportElement, this._helperContainer, this.linkifier);
|
|
142616
142587
|
}
|
|
142617
142588
|
bindMouse() {
|
|
142618
142589
|
const e3 = this, t3 = this.element;
|
|
@@ -142631,6 +142602,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142631
142602
|
r2 = 1, s4 = t4.button < 3 ? t4.button : 3;
|
|
142632
142603
|
break;
|
|
142633
142604
|
case "wheel":
|
|
142605
|
+
if (e3._customWheelEventHandler && false === e3._customWheelEventHandler(t4)) return false;
|
|
142634
142606
|
if (0 === e3.viewport.getLinesScrolled(t4)) return false;
|
|
142635
142607
|
r2 = t4.deltaY < 0 ? 0 : 1, s4 = 4;
|
|
142636
142608
|
break;
|
|
@@ -142645,11 +142617,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142645
142617
|
e4.buttons || i3(e4);
|
|
142646
142618
|
} };
|
|
142647
142619
|
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 || (
|
|
142620
|
+
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
142621
|
}))), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, r.addDisposableDomListener)(t3, "mousedown", ((e4) => {
|
|
142650
142622
|
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
142623
|
}))), this.register((0, r.addDisposableDomListener)(t3, "wheel", ((e4) => {
|
|
142652
142624
|
if (!s3.wheel) {
|
|
142625
|
+
if (this._customWheelEventHandler && false === this._customWheelEventHandler(e4)) return false;
|
|
142653
142626
|
if (!this.buffer.hasScrollback) {
|
|
142654
142627
|
const t4 = this.viewport.getLinesScrolled(e4);
|
|
142655
142628
|
if (0 === t4) return;
|
|
@@ -142667,19 +142640,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142667
142640
|
}), { passive: false }));
|
|
142668
142641
|
}
|
|
142669
142642
|
refresh(e3, t3) {
|
|
142670
|
-
|
|
142671
|
-
null === (i3 = this._renderService) || void 0 === i3 || i3.refreshRows(e3, t3);
|
|
142643
|
+
this._renderService?.refreshRows(e3, t3);
|
|
142672
142644
|
}
|
|
142673
142645
|
updateCursorStyle(e3) {
|
|
142674
|
-
|
|
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");
|
|
142646
|
+
this._selectionService?.shouldColumnSelect(e3) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
|
|
142676
142647
|
}
|
|
142677
142648
|
_showCursor() {
|
|
142678
142649
|
this.coreService.isCursorInitialized || (this.coreService.isCursorInitialized = true, this.refresh(this.buffer.y, this.buffer.y));
|
|
142679
142650
|
}
|
|
142680
142651
|
scrollLines(e3, t3, i3 = 0) {
|
|
142681
|
-
|
|
142682
|
-
1 === i3 ? (super.scrollLines(e3, t3, i3), this.refresh(0, this.rows - 1)) : null === (s3 = this.viewport) || void 0 === s3 || s3.scrollLines(e3);
|
|
142652
|
+
1 === i3 ? (super.scrollLines(e3, t3, i3), this.refresh(0, this.rows - 1)) : this.viewport?.scrollLines(e3);
|
|
142683
142653
|
}
|
|
142684
142654
|
paste(e3) {
|
|
142685
142655
|
(0, s2.paste)(e3, this.textarea, this.coreService, this.optionsService);
|
|
@@ -142687,8 +142657,11 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142687
142657
|
attachCustomKeyEventHandler(e3) {
|
|
142688
142658
|
this._customKeyEventHandler = e3;
|
|
142689
142659
|
}
|
|
142660
|
+
attachCustomWheelEventHandler(e3) {
|
|
142661
|
+
this._customWheelEventHandler = e3;
|
|
142662
|
+
}
|
|
142690
142663
|
registerLinkProvider(e3) {
|
|
142691
|
-
return this.
|
|
142664
|
+
return this._linkProviderService.registerLinkProvider(e3);
|
|
142692
142665
|
}
|
|
142693
142666
|
registerCharacterJoiner(e3) {
|
|
142694
142667
|
if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
|
|
@@ -142721,16 +142694,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142721
142694
|
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
142695
|
}
|
|
142723
142696
|
clearSelection() {
|
|
142724
|
-
|
|
142725
|
-
null === (e3 = this._selectionService) || void 0 === e3 || e3.clearSelection();
|
|
142697
|
+
this._selectionService?.clearSelection();
|
|
142726
142698
|
}
|
|
142727
142699
|
selectAll() {
|
|
142728
|
-
|
|
142729
|
-
null === (e3 = this._selectionService) || void 0 === e3 || e3.selectAll();
|
|
142700
|
+
this._selectionService?.selectAll();
|
|
142730
142701
|
}
|
|
142731
142702
|
selectLines(e3, t3) {
|
|
142732
|
-
|
|
142733
|
-
null === (i3 = this._selectionService) || void 0 === i3 || i3.selectLines(e3, t3);
|
|
142703
|
+
this._selectionService?.selectLines(e3, t3);
|
|
142734
142704
|
}
|
|
142735
142705
|
_keyDown(e3) {
|
|
142736
142706
|
if (this._keyDownHandled = false, this._keyDownSeen = true, this._customKeyEventHandler && false === this._customKeyEventHandler(e3)) return false;
|
|
@@ -142778,30 +142748,25 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142778
142748
|
e3 !== this.cols || t3 !== this.rows ? super.resize(e3, t3) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
|
|
142779
142749
|
}
|
|
142780
142750
|
_afterResize(e3, t3) {
|
|
142781
|
-
|
|
142782
|
-
null === (i3 = this._charSizeService) || void 0 === i3 || i3.measure(), null === (s3 = this.viewport) || void 0 === s3 || s3.syncScrollArea(true);
|
|
142751
|
+
this._charSizeService?.measure(), this.viewport?.syncScrollArea(true);
|
|
142783
142752
|
}
|
|
142784
142753
|
clear() {
|
|
142785
|
-
var e3;
|
|
142786
142754
|
if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
|
|
142787
142755
|
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
|
|
142789
|
-
this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }),
|
|
142756
|
+
for (let e3 = 1; e3 < this.rows; e3++) this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));
|
|
142757
|
+
this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }), this.viewport?.reset(), this.refresh(0, this.rows - 1);
|
|
142790
142758
|
}
|
|
142791
142759
|
}
|
|
142792
142760
|
reset() {
|
|
142793
|
-
var e3, t3;
|
|
142794
142761
|
this.options.rows = this.rows, this.options.cols = this.cols;
|
|
142795
|
-
const
|
|
142796
|
-
this._setup(), super.reset(),
|
|
142762
|
+
const e3 = this._customKeyEventHandler;
|
|
142763
|
+
this._setup(), super.reset(), this._selectionService?.reset(), this._decorationService.reset(), this.viewport?.reset(), this._customKeyEventHandler = e3, this.refresh(0, this.rows - 1);
|
|
142797
142764
|
}
|
|
142798
142765
|
clearTextureAtlas() {
|
|
142799
|
-
|
|
142800
|
-
null === (e3 = this._renderService) || void 0 === e3 || e3.clearTextureAtlas();
|
|
142766
|
+
this._renderService?.clearTextureAtlas();
|
|
142801
142767
|
}
|
|
142802
142768
|
_reportFocus() {
|
|
142803
|
-
|
|
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");
|
|
142769
|
+
this.element?.classList.contains("focus") ? this.coreService.triggerDataEvent(D2.C0.ESC + "[I") : this.coreService.triggerDataEvent(D2.C0.ESC + "[O");
|
|
142805
142770
|
}
|
|
142806
142771
|
_reportWindowsOptions(e3) {
|
|
142807
142772
|
if (this._renderService) switch (e3) {
|
|
@@ -142873,8 +142838,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142873
142838
|
}
|
|
142874
142839
|
_innerRefresh() {
|
|
142875
142840
|
if (this._charSizeService.height > 0) {
|
|
142876
|
-
this._currentRowHeight = this.
|
|
142877
|
-
const e4 = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this.
|
|
142841
|
+
this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderDimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
|
|
142842
|
+
const e4 = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
|
|
142878
142843
|
this._lastRecordedBufferHeight !== e4 && (this._lastRecordedBufferHeight = e4, this._scrollArea.style.height = this._lastRecordedBufferHeight + "px");
|
|
142879
142844
|
}
|
|
142880
142845
|
const e3 = this._bufferService.buffer.ydisp * this._currentRowHeight;
|
|
@@ -142921,19 +142886,18 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142921
142886
|
return e3.deltaMode === WheelEvent.DOM_DELTA_LINE ? t3 *= this._currentRowHeight : e3.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t3 *= this._currentRowHeight * this._bufferService.rows), t3;
|
|
142922
142887
|
}
|
|
142923
142888
|
getBufferElements(e3, t3) {
|
|
142924
|
-
|
|
142925
|
-
|
|
142926
|
-
|
|
142927
|
-
|
|
142928
|
-
const e4 = a2.get(t4);
|
|
142889
|
+
let i3, s3 = "";
|
|
142890
|
+
const r2 = [], n2 = t3 ?? this._bufferService.buffer.lines.length, o2 = this._bufferService.buffer.lines;
|
|
142891
|
+
for (let t4 = e3; t4 < n2; t4++) {
|
|
142892
|
+
const e4 = o2.get(t4);
|
|
142929
142893
|
if (!e4) continue;
|
|
142930
|
-
const
|
|
142931
|
-
if (
|
|
142894
|
+
const n3 = o2.get(t4 + 1)?.isWrapped;
|
|
142895
|
+
if (s3 += e4.translateToString(!n3), !n3 || t4 === o2.length - 1) {
|
|
142932
142896
|
const e5 = document.createElement("div");
|
|
142933
|
-
e5.textContent =
|
|
142897
|
+
e5.textContent = s3, r2.push(e5), s3.length > 0 && (i3 = e5), s3 = "";
|
|
142934
142898
|
}
|
|
142935
142899
|
}
|
|
142936
|
-
return { bufferElements:
|
|
142900
|
+
return { bufferElements: r2, cursorElement: i3 };
|
|
142937
142901
|
}
|
|
142938
142902
|
getLinesScrolled(e3) {
|
|
142939
142903
|
if (0 === e3.deltaY || e3.shiftKey) return 0;
|
|
@@ -142965,14 +142929,14 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142965
142929
|
};
|
|
142966
142930
|
};
|
|
142967
142931
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferDecorationRenderer = void 0;
|
|
142968
|
-
const n = i2(
|
|
142969
|
-
let
|
|
142970
|
-
constructor(e3, t3, i3, s3) {
|
|
142971
|
-
super(), this._screenElement = e3, this._bufferService = t3, this.
|
|
142932
|
+
const n = i2(4725), o = i2(844), a = i2(2585);
|
|
142933
|
+
let h = t2.BufferDecorationRenderer = class extends o.Disposable {
|
|
142934
|
+
constructor(e3, t3, i3, s3, r2) {
|
|
142935
|
+
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
142936
|
this._dimensionsChanged = true, this._queueRefresh();
|
|
142973
|
-
}))), this.register(
|
|
142937
|
+
}))), this.register(this._coreBrowserService.onDprChange((() => this._queueRefresh()))), this.register(this._bufferService.buffers.onBufferActivate((() => {
|
|
142974
142938
|
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,
|
|
142939
|
+
}))), this.register(this._decorationService.onDecorationRegistered((() => this._queueRefresh()))), this.register(this._decorationService.onDecorationRemoved(((e4) => this._removeDecoration(e4)))), this.register((0, o.toDisposable)((() => {
|
|
142976
142940
|
this._container.remove(), this._decorationElements.clear();
|
|
142977
142941
|
})));
|
|
142978
142942
|
}
|
|
@@ -142989,11 +142953,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
142989
142953
|
this._refreshStyle(e3), this._dimensionsChanged && this._refreshXPosition(e3);
|
|
142990
142954
|
}
|
|
142991
142955
|
_createElement(e3) {
|
|
142992
|
-
|
|
142993
|
-
|
|
142994
|
-
|
|
142995
|
-
|
|
142996
|
-
return r2 && r2 > this._bufferService.cols && (s3.style.display = "none"), this._refreshXPosition(e3, s3), s3;
|
|
142956
|
+
const t3 = this._coreBrowserService.mainDocument.createElement("div");
|
|
142957
|
+
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`;
|
|
142958
|
+
const i3 = e3.options.x ?? 0;
|
|
142959
|
+
return i3 && i3 > this._bufferService.cols && (t3.style.display = "none"), this._refreshXPosition(e3, t3), t3;
|
|
142997
142960
|
}
|
|
142998
142961
|
_refreshStyle(e3) {
|
|
142999
142962
|
const t3 = e3.marker.line - this._bufferService.buffers.active.ydisp;
|
|
@@ -143006,17 +142969,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143006
142969
|
}
|
|
143007
142970
|
}
|
|
143008
142971
|
_refreshXPosition(e3, t3 = e3.element) {
|
|
143009
|
-
var i3;
|
|
143010
142972
|
if (!t3) return;
|
|
143011
|
-
const
|
|
143012
|
-
"right" === (e3.options.anchor || "left") ? t3.style.right =
|
|
142973
|
+
const i3 = e3.options.x ?? 0;
|
|
142974
|
+
"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
142975
|
}
|
|
143014
142976
|
_removeDecoration(e3) {
|
|
143015
|
-
|
|
143016
|
-
null === (t3 = this._decorationElements.get(e3)) || void 0 === t3 || t3.remove(), this._decorationElements.delete(e3), e3.dispose();
|
|
142977
|
+
this._decorationElements.get(e3)?.remove(), this._decorationElements.delete(e3), e3.dispose();
|
|
143017
142978
|
}
|
|
143018
142979
|
};
|
|
143019
|
-
t2.BufferDecorationRenderer =
|
|
142980
|
+
t2.BufferDecorationRenderer = h = s2([r(1, a.IBufferService), r(2, n.ICoreBrowserService), r(3, a.IDecorationService), r(4, n.IRenderService)], h);
|
|
143020
142981
|
}, 5871: (e2, t2) => {
|
|
143021
142982
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.ColorZoneStore = void 0, t2.ColorZoneStore = class {
|
|
143022
142983
|
constructor() {
|
|
@@ -143063,19 +143024,17 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143063
143024
|
};
|
|
143064
143025
|
};
|
|
143065
143026
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.OverviewRulerRenderer = void 0;
|
|
143066
|
-
const n = i2(5871), o = i2(
|
|
143067
|
-
let
|
|
143027
|
+
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 };
|
|
143028
|
+
let _ = t2.OverviewRulerRenderer = class extends a.Disposable {
|
|
143068
143029
|
get _width() {
|
|
143069
143030
|
return this._optionsService.options.overviewRulerWidth || 0;
|
|
143070
143031
|
}
|
|
143071
|
-
constructor(e3, t3, i3, s3, r2, o2,
|
|
143072
|
-
|
|
143073
|
-
|
|
143074
|
-
|
|
143075
|
-
|
|
143076
|
-
|
|
143077
|
-
var e4;
|
|
143078
|
-
null === (e4 = this._canvas) || void 0 === e4 || e4.remove();
|
|
143032
|
+
constructor(e3, t3, i3, s3, r2, o2, h2) {
|
|
143033
|
+
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);
|
|
143034
|
+
const c2 = this._canvas.getContext("2d");
|
|
143035
|
+
if (!c2) throw new Error("Ctx cannot be null");
|
|
143036
|
+
this._ctx = c2, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, a.toDisposable)((() => {
|
|
143037
|
+
this._canvas?.remove();
|
|
143079
143038
|
})));
|
|
143080
143039
|
}
|
|
143081
143040
|
_registerDecorationListeners() {
|
|
@@ -143091,22 +143050,22 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143091
143050
|
_registerDimensionChangeListeners() {
|
|
143092
143051
|
this.register(this._renderService.onRender((() => {
|
|
143093
143052
|
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(
|
|
143053
|
+
}))), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", (() => this._queueRefresh(true)))), this.register(this._coreBrowserService.onDprChange((() => this._queueRefresh(true)))), this._queueRefresh(true);
|
|
143095
143054
|
}
|
|
143096
143055
|
_refreshDrawConstants() {
|
|
143097
143056
|
const e3 = Math.floor(this._canvas.width / 3), t3 = Math.ceil(this._canvas.width / 3);
|
|
143098
|
-
|
|
143057
|
+
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
143058
|
}
|
|
143100
143059
|
_refreshDrawHeightConstants() {
|
|
143101
|
-
|
|
143102
|
-
const e3 = this._canvas.height / this._bufferService.buffer.lines.length, t3 = Math.round(Math.max(Math.min(e3, 12), 6) * this.
|
|
143103
|
-
|
|
143060
|
+
c.full = Math.round(2 * this._coreBrowserService.dpr);
|
|
143061
|
+
const e3 = this._canvas.height / this._bufferService.buffer.lines.length, t3 = Math.round(Math.max(Math.min(e3, 12), 6) * this._coreBrowserService.dpr);
|
|
143062
|
+
c.left = t3, c.center = t3, c.right = t3;
|
|
143104
143063
|
}
|
|
143105
143064
|
_refreshColorZonePadding() {
|
|
143106
|
-
this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) *
|
|
143065
|
+
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
143066
|
}
|
|
143108
143067
|
_refreshCanvasDimensions() {
|
|
143109
|
-
this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this.
|
|
143068
|
+
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
143069
|
}
|
|
143111
143070
|
_refreshDecorations() {
|
|
143112
143071
|
this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
|
|
@@ -143118,15 +143077,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143118
143077
|
this._shouldUpdateDimensions = false, this._shouldUpdateAnchor = false;
|
|
143119
143078
|
}
|
|
143120
143079
|
_renderColorZone(e3) {
|
|
143121
|
-
this._ctx.fillStyle = e3.color, this._ctx.fillRect(
|
|
143080
|
+
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
143081
|
}
|
|
143123
143082
|
_queueRefresh(e3, t3) {
|
|
143124
|
-
this._shouldUpdateDimensions = e3 || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t3 || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this.
|
|
143083
|
+
this._shouldUpdateDimensions = e3 || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t3 || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame((() => {
|
|
143125
143084
|
this._refreshDecorations(), this._animationFrame = void 0;
|
|
143126
143085
|
})));
|
|
143127
143086
|
}
|
|
143128
143087
|
};
|
|
143129
|
-
t2.OverviewRulerRenderer =
|
|
143088
|
+
t2.OverviewRulerRenderer = _ = s2([r(2, h.IBufferService), r(3, h.IDecorationService), r(4, o.IRenderService), r(5, h.IOptionsService), r(6, o.ICoreBrowserService)], _);
|
|
143130
143089
|
}, 2950: function(e2, t2, i2) {
|
|
143131
143090
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
143132
143091
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
@@ -143222,15 +143181,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143222
143181
|
const r3 = e4 - n(e4, i4), a3 = t4 - n(t4, i4);
|
|
143223
143182
|
for (let n2 = 0; n2 < Math.abs(r3 - a3); n2++) {
|
|
143224
143183
|
const a4 = "A" === o(e4, t4) ? -1 : 1, h2 = i4.buffer.lines.get(r3 + a4 * n2);
|
|
143225
|
-
|
|
143184
|
+
h2?.isWrapped && s4++;
|
|
143226
143185
|
}
|
|
143227
143186
|
return s4;
|
|
143228
143187
|
})(e3, t3, i3);
|
|
143229
143188
|
return c(l, h(o(e3, t3), s3));
|
|
143230
143189
|
}
|
|
143231
143190
|
function n(e3, t3) {
|
|
143232
|
-
let i3 = 0, s3 = t3.buffer.lines.get(e3), r2 =
|
|
143233
|
-
for (; r2 && e3 >= 0 && e3 < t3.rows; ) i3++, s3 = t3.buffer.lines.get(--e3), r2 =
|
|
143191
|
+
let i3 = 0, s3 = t3.buffer.lines.get(e3), r2 = s3?.isWrapped;
|
|
143192
|
+
for (; r2 && e3 >= 0 && e3 < t3.rows; ) i3++, s3 = t3.buffer.lines.get(--e3), r2 = s3?.isWrapped;
|
|
143234
143193
|
return i3;
|
|
143235
143194
|
}
|
|
143236
143195
|
function o(e3, t3) {
|
|
@@ -143284,27 +143243,29 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143284
143243
|
};
|
|
143285
143244
|
};
|
|
143286
143245
|
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(
|
|
143288
|
-
let
|
|
143289
|
-
constructor(e3, t3, i3, s3, r2, a2,
|
|
143290
|
-
super(), this.
|
|
143291
|
-
this._element.classList.remove(
|
|
143292
|
-
}))), this._widthCache = new o.WidthCache(
|
|
143246
|
+
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";
|
|
143247
|
+
let b = 1, w = t2.DomRenderer = class extends u.Disposable {
|
|
143248
|
+
constructor(e3, t3, i3, s3, r2, a2, l2, d2, f2, g2, m2, S2, w2) {
|
|
143249
|
+
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)((() => {
|
|
143250
|
+
this._element.classList.remove(v + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
|
|
143251
|
+
}))), 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
143252
|
}
|
|
143294
143253
|
_updateDimensions() {
|
|
143295
143254
|
const e3 = this._coreBrowserService.dpr;
|
|
143296
143255
|
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
143256
|
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 =
|
|
143299
|
-
const t3 = `${this._terminalSelector} .${
|
|
143257
|
+
this._dimensionsStyleElement || (this._dimensionsStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
|
|
143258
|
+
const t3 = `${this._terminalSelector} .${p} span { display: inline-block; height: 100%; vertical-align: top;}`;
|
|
143300
143259
|
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
143260
|
}
|
|
143302
143261
|
_injectCss(e3) {
|
|
143303
|
-
this._themeStyleElement || (this._themeStyleElement =
|
|
143304
|
-
let t3 = `${this._terminalSelector} .${
|
|
143305
|
-
t3 += `${this._terminalSelector} .${
|
|
143306
|
-
|
|
143307
|
-
t3 +=
|
|
143262
|
+
this._themeStyleElement || (this._themeStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
|
|
143263
|
+
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}`;
|
|
143264
|
+
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;}`;
|
|
143265
|
+
const i3 = `blink_underline_${this._terminalClass}`, s3 = `blink_bar_${this._terminalClass}`, r2 = `blink_block_${this._terminalClass}`;
|
|
143266
|
+
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};}`;
|
|
143267
|
+
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}; }`;
|
|
143268
|
+
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
143269
|
}
|
|
143309
143270
|
_setDefaultSpacing() {
|
|
143310
143271
|
const e3 = this.dimensions.css.cell.width - this._widthCache.get("W", false, false);
|
|
@@ -143315,28 +143276,29 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143315
143276
|
}
|
|
143316
143277
|
_refreshRowElements(e3, t3) {
|
|
143317
143278
|
for (let e4 = this._rowElements.length; e4 <= t3; e4++) {
|
|
143318
|
-
const e5 =
|
|
143279
|
+
const e5 = this._document.createElement("div");
|
|
143319
143280
|
this._rowContainer.appendChild(e5), this._rowElements.push(e5);
|
|
143320
143281
|
}
|
|
143321
143282
|
for (; this._rowElements.length > t3; ) this._rowContainer.removeChild(this._rowElements.pop());
|
|
143322
143283
|
}
|
|
143323
143284
|
handleResize(e3, t3) {
|
|
143324
|
-
this._refreshRowElements(e3, t3), this._updateDimensions();
|
|
143285
|
+
this._refreshRowElements(e3, t3), this._updateDimensions(), this.handleSelectionChanged(this._selectionRenderModel.selectionStart, this._selectionRenderModel.selectionEnd, this._selectionRenderModel.columnSelectMode);
|
|
143325
143286
|
}
|
|
143326
143287
|
handleCharSizeChanged() {
|
|
143327
143288
|
this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
|
|
143328
143289
|
}
|
|
143329
143290
|
handleBlur() {
|
|
143330
|
-
this._rowContainer.classList.remove(
|
|
143291
|
+
this._rowContainer.classList.remove(S), this.renderRows(0, this._bufferService.rows - 1);
|
|
143331
143292
|
}
|
|
143332
143293
|
handleFocus() {
|
|
143333
|
-
this._rowContainer.classList.add(
|
|
143294
|
+
this._rowContainer.classList.add(S), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
|
|
143334
143295
|
}
|
|
143335
143296
|
handleSelectionChanged(e3, t3, i3) {
|
|
143336
143297
|
if (this._selectionContainer.replaceChildren(), this._rowFactory.handleSelectionChanged(e3, t3, i3), this.renderRows(0, this._bufferService.rows - 1), !e3 || !t3) return;
|
|
143337
|
-
|
|
143298
|
+
this._selectionRenderModel.update(this._terminal, e3, t3, i3);
|
|
143299
|
+
const s3 = this._selectionRenderModel.viewportStartRow, r2 = this._selectionRenderModel.viewportEndRow, n2 = this._selectionRenderModel.viewportCappedStartRow, o2 = this._selectionRenderModel.viewportCappedEndRow;
|
|
143338
143300
|
if (n2 >= this._bufferService.rows || o2 < 0) return;
|
|
143339
|
-
const a2 =
|
|
143301
|
+
const a2 = this._document.createDocumentFragment();
|
|
143340
143302
|
if (i3) {
|
|
143341
143303
|
const i4 = e3[0] > t3[0];
|
|
143342
143304
|
a2.appendChild(this._createSelectionElement(n2, i4 ? t3[0] : e3[0], i4 ? e3[0] : t3[0], o2 - n2 + 1));
|
|
@@ -143352,8 +143314,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143352
143314
|
this._selectionContainer.appendChild(a2);
|
|
143353
143315
|
}
|
|
143354
143316
|
_createSelectionElement(e3, t3, i3, s3 = 1) {
|
|
143355
|
-
const r2 =
|
|
143356
|
-
|
|
143317
|
+
const r2 = this._document.createElement("div"), n2 = t3 * this.dimensions.css.cell.width;
|
|
143318
|
+
let o2 = this.dimensions.css.cell.width * (i3 - t3);
|
|
143319
|
+
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
143320
|
}
|
|
143358
143321
|
handleCursorMove() {
|
|
143359
143322
|
}
|
|
@@ -143372,7 +143335,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143372
143335
|
}
|
|
143373
143336
|
}
|
|
143374
143337
|
get _terminalSelector() {
|
|
143375
|
-
return `.${
|
|
143338
|
+
return `.${v}${this._terminalClass}`;
|
|
143376
143339
|
}
|
|
143377
143340
|
_handleLinkHover(e3) {
|
|
143378
143341
|
this._setCellUnderline(e3.x1, e3.x2, e3.y1, e3.y2, e3.cols, true);
|
|
@@ -143392,7 +143355,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143392
143355
|
}
|
|
143393
143356
|
}
|
|
143394
143357
|
};
|
|
143395
|
-
t2.DomRenderer =
|
|
143358
|
+
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
143359
|
}, 3787: function(e2, t2, i2) {
|
|
143397
143360
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
143398
143361
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
@@ -143417,7 +143380,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143417
143380
|
const g = [], m = this._characterJoinerService.getJoinedCharacters(t3), S = this._themeService.colors;
|
|
143418
143381
|
let C, b = e3.getNoBgTrimmedLength();
|
|
143419
143382
|
i3 && b < a2 + 1 && (b = a2 + 1);
|
|
143420
|
-
let
|
|
143383
|
+
let w = 0, y = "", E = 0, k = 0, L = 0, D2 = false, R = 0, x = false, A = 0;
|
|
143421
143384
|
const B = [], T = -1 !== f2 && -1 !== p;
|
|
143422
143385
|
for (let M = 0; M < b; M++) {
|
|
143423
143386
|
e3.loadCell(M, this._workCell);
|
|
@@ -143436,13 +143399,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143436
143399
|
}));
|
|
143437
143400
|
let N = I.getChars() || o.WHITESPACE_CELL_CHAR;
|
|
143438
143401
|
if (" " === N && (I.isUnderline() || I.isOverline()) && (N = "\xA0"), A = b2 * l2 - _2.get(N, I.isBold(), I.isItalic()), C) {
|
|
143439
|
-
if (
|
|
143440
|
-
|
|
143402
|
+
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) {
|
|
143403
|
+
I.isInvisible() ? y += o.WHITESPACE_CELL_CHAR : y += N, w++;
|
|
143441
143404
|
continue;
|
|
143442
143405
|
}
|
|
143443
|
-
|
|
143406
|
+
w && (C.textContent = y), C = this._document.createElement("span"), w = 0, y = "";
|
|
143444
143407
|
} 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) {
|
|
143408
|
+
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
143409
|
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
143410
|
else if (r2) switch (r2) {
|
|
143448
143411
|
case "outline":
|
|
@@ -143458,12 +143421,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143458
143421
|
B.push("xterm-cursor-underline");
|
|
143459
143422
|
}
|
|
143460
143423
|
}
|
|
143461
|
-
if (I.isBold() && B.push("xterm-bold"), I.isItalic() && B.push("xterm-italic"), I.isDim() && B.push("xterm-dim"),
|
|
143424
|
+
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
143425
|
else {
|
|
143463
143426
|
let e4 = I.getUnderlineColor();
|
|
143464
143427
|
this._optionsService.rawOptions.drawBoldTextInBrightColors && I.isBold() && e4 < 8 && (e4 += 8), C.style.textDecorationColor = S.ansi[e4].css;
|
|
143465
143428
|
}
|
|
143466
|
-
I.isOverline() && (B.push("xterm-overline"), " " ===
|
|
143429
|
+
I.isOverline() && (B.push("xterm-overline"), " " === y && (y = "\xA0")), I.isStrikethrough() && B.push("xterm-strikethrough"), W && (C.style.textDecoration = "underline");
|
|
143467
143430
|
let $ = I.getFgColor(), j = I.getFgColorMode(), z = I.getBgColor(), K = I.getBgColorMode();
|
|
143468
143431
|
const q = !!I.isInverse();
|
|
143469
143432
|
if (q) {
|
|
@@ -143481,7 +143444,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143481
143444
|
X = S.ansi[z], B.push(`xterm-bg-${z}`);
|
|
143482
143445
|
break;
|
|
143483
143446
|
case 50331648:
|
|
143484
|
-
X = c.
|
|
143447
|
+
X = c.channels.toColor(z >> 16, z >> 8 & 255, 255 & z), this._addStyle(C, `background-color:#${v((z >>> 0).toString(16), "0", 6)}`);
|
|
143485
143448
|
break;
|
|
143486
143449
|
default:
|
|
143487
143450
|
q ? (X = S.foreground, B.push(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)) : X = S.background;
|
|
@@ -143492,23 +143455,23 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143492
143455
|
I.isBold() && $ < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && ($ += 8), this._applyMinimumContrast(C, X, S.ansi[$], I, V, void 0) || B.push(`xterm-fg-${$}`);
|
|
143493
143456
|
break;
|
|
143494
143457
|
case 50331648:
|
|
143495
|
-
const e4 = c.
|
|
143458
|
+
const e4 = c.channels.toColor($ >> 16 & 255, $ >> 8 & 255, 255 & $);
|
|
143496
143459
|
this._applyMinimumContrast(C, X, e4, I, V, G) || this._addStyle(C, `color:#${v($.toString(16), "0", 6)}`);
|
|
143497
143460
|
break;
|
|
143498
143461
|
default:
|
|
143499
|
-
this._applyMinimumContrast(C, X, S.foreground, I, V,
|
|
143462
|
+
this._applyMinimumContrast(C, X, S.foreground, I, V, G) || q && B.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`);
|
|
143500
143463
|
}
|
|
143501
|
-
B.length && (C.className = B.join(" "), B.length = 0), F || O || U ? C.textContent =
|
|
143464
|
+
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
143465
|
}
|
|
143503
|
-
return C &&
|
|
143466
|
+
return C && w && (C.textContent = y), g;
|
|
143504
143467
|
}
|
|
143505
143468
|
_applyMinimumContrast(e3, t3, i3, s3, r2, n2) {
|
|
143506
|
-
if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.
|
|
143469
|
+
if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.treatGlyphAsBackgroundColor)(s3.getCode())) return false;
|
|
143507
143470
|
const o2 = this._getContrastCache(s3);
|
|
143508
143471
|
let a2;
|
|
143509
143472
|
if (r2 || n2 || (a2 = o2.getColor(t3.rgba, i3.rgba)), void 0 === a2) {
|
|
143510
143473
|
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,
|
|
143474
|
+
a2 = c.color.ensureContrastRatio(r2 || t3, n2 || i3, e4), o2.setColor((r2 || t3).rgba, (n2 || i3).rgba, a2 ?? null);
|
|
143512
143475
|
}
|
|
143513
143476
|
return !!a2 && (this._addStyle(e3, `color:${a2.css}`), true);
|
|
143514
143477
|
}
|
|
@@ -143530,14 +143493,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143530
143493
|
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
143494
|
}, 2550: (e2, t2) => {
|
|
143532
143495
|
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.
|
|
143535
|
-
const
|
|
143536
|
-
i2.
|
|
143496
|
+
constructor(e3, t3) {
|
|
143497
|
+
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";
|
|
143498
|
+
const i2 = e3.createElement("span");
|
|
143499
|
+
i2.classList.add("xterm-char-measure-element");
|
|
143537
143500
|
const s2 = e3.createElement("span");
|
|
143538
|
-
s2.style.
|
|
143501
|
+
s2.classList.add("xterm-char-measure-element"), s2.style.fontWeight = "bold";
|
|
143539
143502
|
const r = e3.createElement("span");
|
|
143540
|
-
r.
|
|
143503
|
+
r.classList.add("xterm-char-measure-element"), r.style.fontStyle = "italic";
|
|
143504
|
+
const n = e3.createElement("span");
|
|
143505
|
+
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
143506
|
}
|
|
143542
143507
|
dispose() {
|
|
143543
143508
|
this._container.remove(), this._measureElements.length = 0, this._holey = void 0;
|
|
@@ -143550,13 +143515,17 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143550
143515
|
}
|
|
143551
143516
|
get(e3, t3, i2) {
|
|
143552
143517
|
let s2 = 0;
|
|
143553
|
-
if (!t3 && !i2 && 1 === e3.length && (s2 = e3.charCodeAt(0)) < 256)
|
|
143518
|
+
if (!t3 && !i2 && 1 === e3.length && (s2 = e3.charCodeAt(0)) < 256) {
|
|
143519
|
+
if (-9999 !== this._flat[s2]) return this._flat[s2];
|
|
143520
|
+
const t4 = this._measure(e3, 0);
|
|
143521
|
+
return t4 > 0 && (this._flat[s2] = t4), t4;
|
|
143522
|
+
}
|
|
143554
143523
|
let r = e3;
|
|
143555
143524
|
t3 && (r += "B"), i2 && (r += "I");
|
|
143556
143525
|
let n = this._holey.get(r);
|
|
143557
143526
|
if (void 0 === n) {
|
|
143558
143527
|
let s3 = 0;
|
|
143559
|
-
t3 && (s3 |= 1), i2 && (s3 |= 2), n = this._measure(e3, s3), this._holey.set(r, n);
|
|
143528
|
+
t3 && (s3 |= 1), i2 && (s3 |= 2), n = this._measure(e3, s3), n > 0 && this._holey.set(r, n);
|
|
143560
143529
|
}
|
|
143561
143530
|
return n;
|
|
143562
143531
|
}
|
|
@@ -143573,17 +143542,47 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143573
143542
|
function i2(e3) {
|
|
143574
143543
|
return 57508 <= e3 && e3 <= 57558;
|
|
143575
143544
|
}
|
|
143576
|
-
|
|
143545
|
+
function s2(e3) {
|
|
143546
|
+
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;
|
|
143547
|
+
}
|
|
143548
|
+
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
143549
|
if (!e3) throw new Error("value must not be falsy");
|
|
143578
143550
|
return e3;
|
|
143579
143551
|
}, t2.isPowerlineGlyph = i2, t2.isRestrictedPowerlineGlyph = function(e3) {
|
|
143580
143552
|
return 57520 <= e3 && e3 <= 57527;
|
|
143581
|
-
}, t2.
|
|
143553
|
+
}, t2.isEmoji = s2, t2.allowRescaling = function(e3, t3, r, n) {
|
|
143554
|
+
return 1 === t3 && r > Math.ceil(1.5 * n) && void 0 !== e3 && e3 > 255 && !s2(e3) && !i2(e3) && !(function(e4) {
|
|
143555
|
+
return 57344 <= e4 && e4 <= 63743;
|
|
143556
|
+
})(e3);
|
|
143557
|
+
}, t2.treatGlyphAsBackgroundColor = function(e3) {
|
|
143582
143558
|
return i2(e3) || (function(e4) {
|
|
143583
143559
|
return 9472 <= e4 && e4 <= 9631;
|
|
143584
143560
|
})(e3);
|
|
143585
143561
|
}, t2.createRenderDimensions = function() {
|
|
143586
143562
|
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 } } };
|
|
143563
|
+
}, t2.computeNextVariantOffset = function(e3, t3, i3 = 0) {
|
|
143564
|
+
return (e3 - (2 * Math.round(t3) - i3)) % (2 * Math.round(t3));
|
|
143565
|
+
};
|
|
143566
|
+
}, 6052: (e2, t2) => {
|
|
143567
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createSelectionRenderModel = void 0;
|
|
143568
|
+
class i2 {
|
|
143569
|
+
constructor() {
|
|
143570
|
+
this.clear();
|
|
143571
|
+
}
|
|
143572
|
+
clear() {
|
|
143573
|
+
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;
|
|
143574
|
+
}
|
|
143575
|
+
update(e3, t3, i3, s2 = false) {
|
|
143576
|
+
if (this.selectionStart = t3, this.selectionEnd = i3, !t3 || !i3 || t3[0] === i3[0] && t3[1] === i3[1]) return void this.clear();
|
|
143577
|
+
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);
|
|
143578
|
+
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]);
|
|
143579
|
+
}
|
|
143580
|
+
isCellSelected(e3, t3, i3) {
|
|
143581
|
+
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);
|
|
143582
|
+
}
|
|
143583
|
+
}
|
|
143584
|
+
t2.createSelectionRenderModel = function() {
|
|
143585
|
+
return new i2();
|
|
143587
143586
|
};
|
|
143588
143587
|
}, 456: (e2, t2) => {
|
|
143589
143588
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.SelectionModel = void 0, t2.SelectionModel = class {
|
|
@@ -143636,7 +143635,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143636
143635
|
return this.width > 0 && this.height > 0;
|
|
143637
143636
|
}
|
|
143638
143637
|
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
|
|
143638
|
+
super(), this._optionsService = i3, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new o.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event;
|
|
143639
|
+
try {
|
|
143640
|
+
this._measureStrategy = this.register(new d(this._optionsService));
|
|
143641
|
+
} catch {
|
|
143642
|
+
this._measureStrategy = this.register(new l(e3, t3, this._optionsService));
|
|
143643
|
+
}
|
|
143644
|
+
this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], (() => this.measure())));
|
|
143640
143645
|
}
|
|
143641
143646
|
measure() {
|
|
143642
143647
|
const e3 = this._measureStrategy.measure();
|
|
@@ -143644,14 +143649,32 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143644
143649
|
}
|
|
143645
143650
|
};
|
|
143646
143651
|
t2.CharSizeService = h = s2([r(2, n.IOptionsService)], h);
|
|
143647
|
-
class c {
|
|
143652
|
+
class c extends a.Disposable {
|
|
143653
|
+
constructor() {
|
|
143654
|
+
super(...arguments), this._result = { width: 0, height: 0 };
|
|
143655
|
+
}
|
|
143656
|
+
_validateAndSet(e3, t3) {
|
|
143657
|
+
void 0 !== e3 && e3 > 0 && void 0 !== t3 && t3 > 0 && (this._result.width = e3, this._result.height = t3);
|
|
143658
|
+
}
|
|
143659
|
+
}
|
|
143660
|
+
class l extends c {
|
|
143648
143661
|
constructor(e3, t3, i3) {
|
|
143649
|
-
this._document = e3, this._parentElement = t3, this._optionsService = i3, this.
|
|
143662
|
+
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);
|
|
143663
|
+
}
|
|
143664
|
+
measure() {
|
|
143665
|
+
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;
|
|
143666
|
+
}
|
|
143667
|
+
}
|
|
143668
|
+
class d extends c {
|
|
143669
|
+
constructor(e3) {
|
|
143670
|
+
super(), this._optionsService = e3, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d");
|
|
143671
|
+
const t3 = this._ctx.measureText("W");
|
|
143672
|
+
if (!("width" in t3 && "fontBoundingBoxAscent" in t3 && "fontBoundingBoxDescent" in t3)) throw new Error("Required font metrics not supported");
|
|
143650
143673
|
}
|
|
143651
143674
|
measure() {
|
|
143652
|
-
this.
|
|
143653
|
-
const e3 =
|
|
143654
|
-
return
|
|
143675
|
+
this._ctx.font = `${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;
|
|
143676
|
+
const e3 = this._ctx.measureText("W");
|
|
143677
|
+
return this._validateAndSet(e3.width, e3.fontBoundingBoxAscent + e3.fontBoundingBoxDescent), this._result;
|
|
143655
143678
|
}
|
|
143656
143679
|
}
|
|
143657
143680
|
}, 4269: function(e2, t2, i2) {
|
|
@@ -143775,10 +143798,18 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143775
143798
|
}
|
|
143776
143799
|
};
|
|
143777
143800
|
t2.CharacterJoinerService = l = s2([r(0, h.IBufferService)], l);
|
|
143778
|
-
}, 5114: (e2, t2) => {
|
|
143779
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreBrowserService = void 0
|
|
143780
|
-
|
|
143781
|
-
|
|
143801
|
+
}, 5114: (e2, t2, i2) => {
|
|
143802
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreBrowserService = void 0;
|
|
143803
|
+
const s2 = i2(844), r = i2(8460), n = i2(3656);
|
|
143804
|
+
class o extends s2.Disposable {
|
|
143805
|
+
constructor(e3, t3, i3) {
|
|
143806
|
+
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));
|
|
143807
|
+
}
|
|
143808
|
+
get window() {
|
|
143809
|
+
return this._window;
|
|
143810
|
+
}
|
|
143811
|
+
set window(e3) {
|
|
143812
|
+
this._window !== e3 && (this._window = e3, this._onWindowChange.fire(this._window));
|
|
143782
143813
|
}
|
|
143783
143814
|
get dpr() {
|
|
143784
143815
|
return this.window.devicePixelRatio;
|
|
@@ -143786,7 +143817,43 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143786
143817
|
get isFocused() {
|
|
143787
143818
|
return void 0 === this._cachedIsFocused && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask((() => this._cachedIsFocused = void 0))), this._cachedIsFocused;
|
|
143788
143819
|
}
|
|
143789
|
-
}
|
|
143820
|
+
}
|
|
143821
|
+
t2.CoreBrowserService = o;
|
|
143822
|
+
class a extends s2.Disposable {
|
|
143823
|
+
constructor(e3) {
|
|
143824
|
+
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())));
|
|
143825
|
+
}
|
|
143826
|
+
setWindow(e3) {
|
|
143827
|
+
this._parentWindow = e3, this._setWindowResizeListener(), this._setDprAndFireIfDiffers();
|
|
143828
|
+
}
|
|
143829
|
+
_setWindowResizeListener() {
|
|
143830
|
+
this._windowResizeListener.value = (0, n.addDisposableDomListener)(this._parentWindow, "resize", (() => this._setDprAndFireIfDiffers()));
|
|
143831
|
+
}
|
|
143832
|
+
_setDprAndFireIfDiffers() {
|
|
143833
|
+
this._parentWindow.devicePixelRatio !== this._currentDevicePixelRatio && this._onDprChange.fire(this._parentWindow.devicePixelRatio), this._updateDpr();
|
|
143834
|
+
}
|
|
143835
|
+
_updateDpr() {
|
|
143836
|
+
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));
|
|
143837
|
+
}
|
|
143838
|
+
clearListener() {
|
|
143839
|
+
this._resolutionMediaMatchList && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
|
|
143840
|
+
}
|
|
143841
|
+
}
|
|
143842
|
+
}, 779: (e2, t2, i2) => {
|
|
143843
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.LinkProviderService = void 0;
|
|
143844
|
+
const s2 = i2(844);
|
|
143845
|
+
class r extends s2.Disposable {
|
|
143846
|
+
constructor() {
|
|
143847
|
+
super(), this.linkProviders = [], this.register((0, s2.toDisposable)((() => this.linkProviders.length = 0)));
|
|
143848
|
+
}
|
|
143849
|
+
registerLinkProvider(e3) {
|
|
143850
|
+
return this.linkProviders.push(e3), { dispose: () => {
|
|
143851
|
+
const t3 = this.linkProviders.indexOf(e3);
|
|
143852
|
+
-1 !== t3 && this.linkProviders.splice(t3, 1);
|
|
143853
|
+
} };
|
|
143854
|
+
}
|
|
143855
|
+
}
|
|
143856
|
+
t2.LinkProviderService = r;
|
|
143790
143857
|
}, 8934: function(e2, t2, i2) {
|
|
143791
143858
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
143792
143859
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
@@ -143825,20 +143892,20 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143825
143892
|
};
|
|
143826
143893
|
};
|
|
143827
143894
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.RenderService = void 0;
|
|
143828
|
-
const n = i2(
|
|
143829
|
-
let
|
|
143895
|
+
const n = i2(6193), o = i2(4725), a = i2(8460), h = i2(844), c = i2(7226), l = i2(2585);
|
|
143896
|
+
let d = t2.RenderService = class extends h.Disposable {
|
|
143830
143897
|
get dimensions() {
|
|
143831
143898
|
return this._renderer.value.dimensions;
|
|
143832
143899
|
}
|
|
143833
|
-
constructor(e3, t3, i3, s3, r2,
|
|
143834
|
-
|
|
143835
|
-
|
|
143836
|
-
|
|
143837
|
-
|
|
143838
|
-
|
|
143839
|
-
|
|
143840
|
-
const
|
|
143841
|
-
|
|
143900
|
+
constructor(e3, t3, i3, s3, r2, o2, l2, d2) {
|
|
143901
|
+
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"], (() => {
|
|
143902
|
+
this.clear(), this.handleResize(o2.cols, o2.rows), this._fullRefresh();
|
|
143903
|
+
}))), 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))));
|
|
143904
|
+
}
|
|
143905
|
+
_registerIntersectionObserver(e3, t3) {
|
|
143906
|
+
if ("IntersectionObserver" in e3) {
|
|
143907
|
+
const i3 = new e3.IntersectionObserver(((e4) => this._handleIntersectionChange(e4[e4.length - 1])), { threshold: 0 });
|
|
143908
|
+
i3.observe(t3), this._observerDisposable.value = (0, h.toDisposable)((() => i3.disconnect()));
|
|
143842
143909
|
}
|
|
143843
143910
|
}
|
|
143844
143911
|
_handleIntersectionChange(e3) {
|
|
@@ -143863,7 +143930,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143863
143930
|
return !!this._renderer.value;
|
|
143864
143931
|
}
|
|
143865
143932
|
setRenderer(e3) {
|
|
143866
|
-
this._renderer.value = e3, this._renderer.value.onRequestRedraw(((e4) => this.refreshRows(e4.start, e4.end, true))), this._needsSelectionRefresh = true, this._fullRefresh();
|
|
143933
|
+
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
143934
|
}
|
|
143868
143935
|
addRefreshCallback(e3) {
|
|
143869
143936
|
return this._renderDebouncer.addRefreshCallback(e3);
|
|
@@ -143872,41 +143939,34 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143872
143939
|
this._isPaused ? this._needsFullRefresh = true : this.refreshRows(0, this._rowCount - 1);
|
|
143873
143940
|
}
|
|
143874
143941
|
clearTextureAtlas() {
|
|
143875
|
-
|
|
143876
|
-
this._renderer.value && (null === (t3 = (e3 = this._renderer.value).clearTextureAtlas) || void 0 === t3 || t3.call(e3), this._fullRefresh());
|
|
143942
|
+
this._renderer.value && (this._renderer.value.clearTextureAtlas?.(), this._fullRefresh());
|
|
143877
143943
|
}
|
|
143878
143944
|
handleDevicePixelRatioChange() {
|
|
143879
143945
|
this._charSizeService.measure(), this._renderer.value && (this._renderer.value.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
|
|
143880
143946
|
}
|
|
143881
143947
|
handleResize(e3, t3) {
|
|
143882
|
-
this._renderer.value && (this._isPaused ? this._pausedResizeTask.set((() => this._renderer.value
|
|
143948
|
+
this._renderer.value && (this._isPaused ? this._pausedResizeTask.set((() => this._renderer.value?.handleResize(e3, t3))) : this._renderer.value.handleResize(e3, t3), this._fullRefresh());
|
|
143883
143949
|
}
|
|
143884
143950
|
handleCharSizeChanged() {
|
|
143885
|
-
|
|
143886
|
-
null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleCharSizeChanged();
|
|
143951
|
+
this._renderer.value?.handleCharSizeChanged();
|
|
143887
143952
|
}
|
|
143888
143953
|
handleBlur() {
|
|
143889
|
-
|
|
143890
|
-
null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleBlur();
|
|
143954
|
+
this._renderer.value?.handleBlur();
|
|
143891
143955
|
}
|
|
143892
143956
|
handleFocus() {
|
|
143893
|
-
|
|
143894
|
-
null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleFocus();
|
|
143957
|
+
this._renderer.value?.handleFocus();
|
|
143895
143958
|
}
|
|
143896
143959
|
handleSelectionChanged(e3, t3, i3) {
|
|
143897
|
-
|
|
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);
|
|
143960
|
+
this._selectionState.start = e3, this._selectionState.end = t3, this._selectionState.columnSelectMode = i3, this._renderer.value?.handleSelectionChanged(e3, t3, i3);
|
|
143899
143961
|
}
|
|
143900
143962
|
handleCursorMove() {
|
|
143901
|
-
|
|
143902
|
-
null === (e3 = this._renderer.value) || void 0 === e3 || e3.handleCursorMove();
|
|
143963
|
+
this._renderer.value?.handleCursorMove();
|
|
143903
143964
|
}
|
|
143904
143965
|
clear() {
|
|
143905
|
-
|
|
143906
|
-
null === (e3 = this._renderer.value) || void 0 === e3 || e3.clear();
|
|
143966
|
+
this._renderer.value?.clear();
|
|
143907
143967
|
}
|
|
143908
143968
|
};
|
|
143909
|
-
t2.RenderService =
|
|
143969
|
+
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
143970
|
}, 9312: function(e2, t2, i2) {
|
|
143911
143971
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
143912
143972
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
@@ -143963,7 +144023,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143963
144023
|
s3.push(i3.translateBufferLineToString(e3[1], true, e3[0], r2));
|
|
143964
144024
|
for (let r3 = e3[1] + 1; r3 <= t3[1] - 1; r3++) {
|
|
143965
144025
|
const e4 = i3.lines.get(r3), t4 = i3.translateBufferLineToString(r3, true);
|
|
143966
|
-
|
|
144026
|
+
e4?.isWrapped ? s3[s3.length - 1] += t4 : s3.push(t4);
|
|
143967
144027
|
}
|
|
143968
144028
|
if (e3[1] !== t3[1]) {
|
|
143969
144029
|
const e4 = i3.lines.get(t3[1]), r3 = i3.translateBufferLineToString(t3[1], true, 0, t3[0]);
|
|
@@ -143993,11 +144053,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
143993
144053
|
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
144054
|
}
|
|
143995
144055
|
_selectWordAtCursor(e3, t3) {
|
|
143996
|
-
|
|
143997
|
-
|
|
143998
|
-
|
|
143999
|
-
|
|
144000
|
-
return !!n2 && (this._selectWordAt(n2, t3), this._model.selectionEnd = void 0, true);
|
|
144056
|
+
const i3 = this._linkifier.currentLink?.link?.range;
|
|
144057
|
+
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;
|
|
144058
|
+
const s3 = this._getMouseBufferCoords(e3);
|
|
144059
|
+
return !!s3 && (this._selectWordAt(s3, t3), this._model.selectionEnd = void 0, true);
|
|
144001
144060
|
}
|
|
144002
144061
|
selectAll() {
|
|
144003
144062
|
this._model.isSelectAllActive = true, this.refresh(), this._onSelectionChange.fire();
|
|
@@ -144062,7 +144121,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144062
144121
|
const i3 = this._bufferService.buffer;
|
|
144063
144122
|
if (this._model.selectionEnd[1] < i3.lines.length) {
|
|
144064
144123
|
const e4 = i3.lines.get(this._model.selectionEnd[1]);
|
|
144065
|
-
e4 && 0 === e4.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0]++;
|
|
144124
|
+
e4 && 0 === e4.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0] < this._bufferService.cols && this._model.selectionEnd[0]++;
|
|
144066
144125
|
}
|
|
144067
144126
|
t3 && t3[0] === this._model.selectionEnd[0] && t3[1] === this._model.selectionEnd[1] || this.refresh(true);
|
|
144068
144127
|
}
|
|
@@ -144150,7 +144209,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144150
144209
|
}
|
|
144151
144210
|
if (s3 && f2 + v2 === this._bufferService.cols && 32 !== n2.getCodePoint(this._bufferService.cols - 1)) {
|
|
144152
144211
|
const t4 = r2.lines.get(e3[1] + 1);
|
|
144153
|
-
if (
|
|
144212
|
+
if (t4?.isWrapped && 32 !== t4.getCodePoint(0)) {
|
|
144154
144213
|
const t5 = this._getWordAt([0, e3[1] + 1], false, false, true);
|
|
144155
144214
|
t5 && (v2 += t5.length);
|
|
144156
144215
|
}
|
|
@@ -144184,9 +144243,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144184
144243
|
};
|
|
144185
144244
|
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
144245
|
}, 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;
|
|
144246
|
+
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
144247
|
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");
|
|
144248
|
+
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
144249
|
}, 6731: function(e2, t2, i2) {
|
|
144191
144250
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
144192
144251
|
var r2, n2 = arguments.length, o2 = n2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
@@ -144264,7 +144323,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144264
144323
|
function p(e3, t3) {
|
|
144265
144324
|
if (void 0 !== e3) try {
|
|
144266
144325
|
return o.css.toColor(e3);
|
|
144267
|
-
} catch
|
|
144326
|
+
} catch {
|
|
144268
144327
|
}
|
|
144269
144328
|
return t3;
|
|
144270
144329
|
}
|
|
@@ -144349,72 +144408,74 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144349
144408
|
for (const r in t3) s2[r] = i2 <= 1 ? t3[r] : t3[r] && e3(t3[r], i2 - 1);
|
|
144350
144409
|
return s2;
|
|
144351
144410
|
};
|
|
144352
|
-
}, 8055: (e2, t2
|
|
144411
|
+
}, 8055: (e2, t2) => {
|
|
144353
144412
|
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
|
-
|
|
144355
|
-
|
|
144356
|
-
|
|
144357
|
-
function u(e3) {
|
|
144413
|
+
let i2 = 0, s2 = 0, r = 0, n = 0;
|
|
144414
|
+
var o, a, h, c, l;
|
|
144415
|
+
function d(e3) {
|
|
144358
144416
|
const t3 = e3.toString(16);
|
|
144359
144417
|
return t3.length < 2 ? "0" + t3 : t3;
|
|
144360
144418
|
}
|
|
144361
|
-
function
|
|
144419
|
+
function _(e3, t3) {
|
|
144362
144420
|
return e3 < t3 ? (t3 + 0.05) / (e3 + 0.05) : (e3 + 0.05) / (t3 + 0.05);
|
|
144363
144421
|
}
|
|
144364
144422
|
t2.NULL_COLOR = { css: "#00000000", rgba: 0 }, (function(e3) {
|
|
144365
144423
|
e3.toCss = function(e4, t3, i3, s3) {
|
|
144366
|
-
return void 0 !== s3 ? `#${
|
|
144424
|
+
return void 0 !== s3 ? `#${d(e4)}${d(t3)}${d(i3)}${d(s3)}` : `#${d(e4)}${d(t3)}${d(i3)}`;
|
|
144367
144425
|
}, e3.toRgba = function(e4, t3, i3, s3 = 255) {
|
|
144368
144426
|
return (e4 << 24 | t3 << 16 | i3 << 8 | s3) >>> 0;
|
|
144427
|
+
}, e3.toColor = function(t3, i3, s3, r2) {
|
|
144428
|
+
return { css: e3.toCss(t3, i3, s3, r2), rgba: e3.toRgba(t3, i3, s3, r2) };
|
|
144369
144429
|
};
|
|
144370
|
-
})(
|
|
144430
|
+
})(o || (t2.channels = o = {})), (function(e3) {
|
|
144371
144431
|
function t3(e4, t4) {
|
|
144372
|
-
return
|
|
144432
|
+
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
144433
|
}
|
|
144374
144434
|
e3.blend = function(e4, t4) {
|
|
144375
|
-
if (
|
|
144376
|
-
const
|
|
144377
|
-
return
|
|
144435
|
+
if (n = (255 & t4.rgba) / 255, 1 === n) return { css: t4.css, rgba: t4.rgba };
|
|
144436
|
+
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;
|
|
144437
|
+
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
144438
|
}, e3.isOpaque = function(e4) {
|
|
144379
144439
|
return 255 == (255 & e4.rgba);
|
|
144380
144440
|
}, e3.ensureContrastRatio = function(e4, t4, i3) {
|
|
144381
|
-
const s3 =
|
|
144382
|
-
if (s3) return
|
|
144441
|
+
const s3 = l.ensureContrastRatio(e4.rgba, t4.rgba, i3);
|
|
144442
|
+
if (s3) return o.toColor(s3 >> 24 & 255, s3 >> 16 & 255, s3 >> 8 & 255);
|
|
144383
144443
|
}, e3.opaque = function(e4) {
|
|
144384
144444
|
const t4 = (255 | e4.rgba) >>> 0;
|
|
144385
|
-
return [
|
|
144445
|
+
return [i2, s2, r] = l.toChannels(t4), { css: o.toCss(i2, s2, r), rgba: t4 };
|
|
144386
144446
|
}, e3.opacity = t3, e3.multiplyOpacity = function(e4, i3) {
|
|
144387
|
-
return
|
|
144447
|
+
return n = 255 & e4.rgba, t3(e4, n * i3 / 255);
|
|
144388
144448
|
}, e3.toColorRGB = function(e4) {
|
|
144389
144449
|
return [e4.rgba >> 24 & 255, e4.rgba >> 16 & 255, e4.rgba >> 8 & 255];
|
|
144390
144450
|
};
|
|
144391
|
-
})(
|
|
144392
|
-
let t3,
|
|
144393
|
-
|
|
144451
|
+
})(a || (t2.color = a = {})), (function(e3) {
|
|
144452
|
+
let t3, a2;
|
|
144453
|
+
try {
|
|
144394
144454
|
const e4 = document.createElement("canvas");
|
|
144395
144455
|
e4.width = 1, e4.height = 1;
|
|
144396
|
-
const
|
|
144397
|
-
|
|
144456
|
+
const i3 = e4.getContext("2d", { willReadFrequently: true });
|
|
144457
|
+
i3 && (t3 = i3, t3.globalCompositeOperation = "copy", a2 = t3.createLinearGradient(0, 0, 1, 1));
|
|
144458
|
+
} catch {
|
|
144398
144459
|
}
|
|
144399
144460
|
e3.toColor = function(e4) {
|
|
144400
144461
|
if (e4.match(/#[\da-f]{3,8}/i)) switch (e4.length) {
|
|
144401
144462
|
case 4:
|
|
144402
|
-
return
|
|
144463
|
+
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
144464
|
case 5:
|
|
144404
|
-
return
|
|
144465
|
+
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
144466
|
case 7:
|
|
144406
144467
|
return { css: e4, rgba: (parseInt(e4.slice(1), 16) << 8 | 255) >>> 0 };
|
|
144407
144468
|
case 9:
|
|
144408
144469
|
return { css: e4, rgba: parseInt(e4.slice(1), 16) >>> 0 };
|
|
144409
144470
|
}
|
|
144410
|
-
const
|
|
144411
|
-
if (
|
|
144412
|
-
if (!t3 || !
|
|
144413
|
-
if (t3.fillStyle =
|
|
144414
|
-
if (t3.fillRect(0, 0, 1, 1), [
|
|
144415
|
-
return { rgba:
|
|
144471
|
+
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*)?\)/);
|
|
144472
|
+
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);
|
|
144473
|
+
if (!t3 || !a2) throw new Error("css.toColor: Unsupported css format");
|
|
144474
|
+
if (t3.fillStyle = a2, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format");
|
|
144475
|
+
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");
|
|
144476
|
+
return { rgba: o.toRgba(i2, s2, r, n), css: e4 };
|
|
144416
144477
|
};
|
|
144417
|
-
})(
|
|
144478
|
+
})(h || (t2.css = h = {})), (function(e3) {
|
|
144418
144479
|
function t3(e4, t4, i3) {
|
|
144419
144480
|
const s3 = e4 / 255, r2 = t4 / 255, n2 = i3 / 255;
|
|
144420
144481
|
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 +144483,45 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144422
144483
|
e3.relativeLuminance = function(e4) {
|
|
144423
144484
|
return t3(e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4);
|
|
144424
144485
|
}, e3.relativeLuminance2 = t3;
|
|
144425
|
-
})(
|
|
144426
|
-
function t3(e4, t4,
|
|
144486
|
+
})(c || (t2.rgb = c = {})), (function(e3) {
|
|
144487
|
+
function t3(e4, t4, i3) {
|
|
144427
144488
|
const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, n2 = e4 >> 8 & 255;
|
|
144428
|
-
let o2 = t4 >> 24 & 255,
|
|
144429
|
-
for (;
|
|
144430
|
-
return (o2 << 24 |
|
|
144489
|
+
let o2 = t4 >> 24 & 255, a3 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, l2 = _(c.relativeLuminance2(o2, a3, h2), c.relativeLuminance2(s3, r2, n2));
|
|
144490
|
+
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));
|
|
144491
|
+
return (o2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
|
|
144431
144492
|
}
|
|
144432
|
-
function
|
|
144493
|
+
function a2(e4, t4, i3) {
|
|
144433
144494
|
const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, n2 = e4 >> 8 & 255;
|
|
144434
|
-
let o2 = t4 >> 24 & 255,
|
|
144435
|
-
for (;
|
|
144436
|
-
return (o2 << 24 |
|
|
144437
|
-
}
|
|
144438
|
-
e3.
|
|
144439
|
-
|
|
144440
|
-
|
|
144441
|
-
|
|
144442
|
-
|
|
144443
|
-
|
|
144444
|
-
|
|
144445
|
-
|
|
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 < 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));
|
|
144497
|
+
return (o2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
|
|
144498
|
+
}
|
|
144499
|
+
e3.blend = function(e4, t4) {
|
|
144500
|
+
if (n = (255 & t4) / 255, 1 === n) return t4;
|
|
144501
|
+
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;
|
|
144502
|
+
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);
|
|
144503
|
+
}, e3.ensureContrastRatio = function(e4, i3, s3) {
|
|
144504
|
+
const r2 = c.relativeLuminance(e4 >> 8), n2 = c.relativeLuminance(i3 >> 8);
|
|
144505
|
+
if (_(r2, n2) < s3) {
|
|
144506
|
+
if (n2 < r2) {
|
|
144507
|
+
const n3 = t3(e4, i3, s3), o3 = _(r2, c.relativeLuminance(n3 >> 8));
|
|
144508
|
+
if (o3 < s3) {
|
|
144509
|
+
const t4 = a2(e4, i3, s3);
|
|
144510
|
+
return o3 > _(r2, c.relativeLuminance(t4 >> 8)) ? n3 : t4;
|
|
144446
144511
|
}
|
|
144447
|
-
return
|
|
144512
|
+
return n3;
|
|
144448
144513
|
}
|
|
144449
|
-
const
|
|
144450
|
-
if (h2 <
|
|
144451
|
-
const
|
|
144452
|
-
return h2 >
|
|
144514
|
+
const o2 = a2(e4, i3, s3), h2 = _(r2, c.relativeLuminance(o2 >> 8));
|
|
144515
|
+
if (h2 < s3) {
|
|
144516
|
+
const n3 = t3(e4, i3, s3);
|
|
144517
|
+
return h2 > _(r2, c.relativeLuminance(n3 >> 8)) ? o2 : n3;
|
|
144453
144518
|
}
|
|
144454
|
-
return
|
|
144519
|
+
return o2;
|
|
144455
144520
|
}
|
|
144456
|
-
}, e3.reduceLuminance = t3, e3.increaseLuminance =
|
|
144521
|
+
}, e3.reduceLuminance = t3, e3.increaseLuminance = a2, e3.toChannels = function(e4) {
|
|
144457
144522
|
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
144523
|
};
|
|
144461
|
-
})(
|
|
144524
|
+
})(l || (t2.rgba = l = {})), t2.toPaddedHex = d, t2.contrastRatio = _;
|
|
144462
144525
|
}, 8969: (e2, t2, i2) => {
|
|
144463
144526
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreTerminal = void 0;
|
|
144464
144527
|
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 +144529,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144466
144529
|
class S extends s2.Disposable {
|
|
144467
144530
|
get onScroll() {
|
|
144468
144531
|
return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event(((e3) => {
|
|
144469
|
-
|
|
144470
|
-
null === (t3 = this._onScrollApi) || void 0 === t3 || t3.fire(e3.position);
|
|
144532
|
+
this._onScrollApi?.fire(e3.position);
|
|
144471
144533
|
}))), this._onScrollApi.event;
|
|
144472
144534
|
}
|
|
144473
144535
|
get cols() {
|
|
@@ -144498,6 +144560,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144498
144560
|
writeSync(e3, t3) {
|
|
144499
144561
|
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
144562
|
}
|
|
144563
|
+
input(e3, t3 = true) {
|
|
144564
|
+
this.coreService.triggerDataEvent(e3, t3);
|
|
144565
|
+
}
|
|
144501
144566
|
resize(e3, t3) {
|
|
144502
144567
|
isNaN(e3) || isNaN(t3) || (e3 = Math.max(e3, a.MINIMUM_COLS), t3 = Math.max(t3, a.MINIMUM_ROWS), this._bufferService.resize(e3, t3));
|
|
144503
144568
|
}
|
|
@@ -144554,7 +144619,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144554
144619
|
}
|
|
144555
144620
|
t2.CoreTerminal = S;
|
|
144556
144621
|
}, 8460: (e2, t2) => {
|
|
144557
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
|
|
144622
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
|
|
144558
144623
|
constructor() {
|
|
144559
144624
|
this._listeners = [], this._disposed = false;
|
|
144560
144625
|
}
|
|
@@ -144578,6 +144643,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144578
144643
|
}
|
|
144579
144644
|
}, t2.forwardEvent = function(e3, t3) {
|
|
144580
144645
|
return e3(((e4) => t3.fire(e4)));
|
|
144646
|
+
}, t2.runAndSubscribe = function(e3, t3) {
|
|
144647
|
+
return t3(void 0), e3(((e4) => t3(e4)));
|
|
144581
144648
|
};
|
|
144582
144649
|
}, 5435: function(e2, t2, i2) {
|
|
144583
144650
|
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
@@ -144591,8 +144658,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144591
144658
|
};
|
|
144592
144659
|
};
|
|
144593
144660
|
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(
|
|
144595
|
-
function
|
|
144661
|
+
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;
|
|
144662
|
+
function w(e3, t3) {
|
|
144596
144663
|
if (e3 > 24) return t3.setWinLines || false;
|
|
144597
144664
|
switch (e3) {
|
|
144598
144665
|
case 1:
|
|
@@ -144646,13 +144713,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144646
144713
|
!(function(e3) {
|
|
144647
144714
|
e3[e3.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e3[e3.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
|
|
144648
144715
|
})(y || (t2.WindowsOptionsReportType = y = {}));
|
|
144649
|
-
let
|
|
144650
|
-
class
|
|
144716
|
+
let E = 0;
|
|
144717
|
+
class k extends h.Disposable {
|
|
144651
144718
|
getAttrData() {
|
|
144652
144719
|
return this._curAttrData;
|
|
144653
144720
|
}
|
|
144654
144721
|
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
|
|
144722
|
+
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
144723
|
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(e4), params: t4.toArray() });
|
|
144657
144724
|
})), this._parser.setEscHandlerFallback(((e4) => {
|
|
144658
144725
|
this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(e4) });
|
|
@@ -144662,9 +144729,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144662
144729
|
this._logService.debug("Unknown OSC code: ", { identifier: e4, action: t4, data: i4 });
|
|
144663
144730
|
})), this._parser.setDcsHandlerFallback(((e4, t4, i4) => {
|
|
144664
144731
|
"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
|
|
144732
|
+
})), 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
144733
|
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
|
|
144734
|
+
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
144735
|
}
|
|
144669
144736
|
_preserveStack(e3, t3, i3, s3) {
|
|
144670
144737
|
this._parseStack.paused = true, this._parseStack.cursorStartX = e3, this._parseStack.cursorStartY = t3, this._parseStack.decodedLength = i3, this._parseStack.position = s3;
|
|
@@ -144683,51 +144750,60 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144683
144750
|
const o2 = this._parseStack.paused;
|
|
144684
144751
|
if (o2) {
|
|
144685
144752
|
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 >
|
|
144753
|
+
s3 = this._parseStack.cursorStartX, r2 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > b && (n2 = this._parseStack.position + b);
|
|
144687
144754
|
}
|
|
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 <
|
|
144689
|
-
const n3 = t4 +
|
|
144755
|
+
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) {
|
|
144756
|
+
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
144757
|
if (i3 = this._parser.parse(this._parseBuffer, o3)) return this._preserveStack(s3, r2, o3, t4), this._logSlowResolvingAsync(i3), i3;
|
|
144691
144758
|
}
|
|
144692
144759
|
else if (!o2) {
|
|
144693
144760
|
const t4 = "string" == typeof e3 ? this._stringDecoder.decode(e3, this._parseBuffer) : this._utf8Decoder.decode(e3, this._parseBuffer);
|
|
144694
144761
|
if (i3 = this._parser.parse(this._parseBuffer, t4)) return this._preserveStack(s3, r2, t4, 0), this._logSlowResolvingAsync(i3), i3;
|
|
144695
144762
|
}
|
|
144696
|
-
this._activeBuffer.x === s3 && this._activeBuffer.y === r2 || this._onCursorMove.fire()
|
|
144763
|
+
this._activeBuffer.x === s3 && this._activeBuffer.y === r2 || this._onCursorMove.fire();
|
|
144764
|
+
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);
|
|
144765
|
+
h2 < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h2, this._bufferService.rows - 1), Math.min(a2, this._bufferService.rows - 1));
|
|
144697
144766
|
}
|
|
144698
144767
|
print(e3, t3, i3) {
|
|
144699
144768
|
let s3, r2;
|
|
144700
|
-
const n2 = this._charsetService.charset, o2 = this._optionsService.rawOptions.screenReaderMode, a2 = this._bufferService.cols, h2 = this._coreService.decPrivateModes.wraparound,
|
|
144701
|
-
let
|
|
144702
|
-
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i3 - t3 > 0 && 2 ===
|
|
144703
|
-
|
|
144704
|
-
|
|
144769
|
+
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;
|
|
144770
|
+
let f2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
144771
|
+
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);
|
|
144772
|
+
let v2 = this._parser.precedingJoinState;
|
|
144773
|
+
for (let g2 = t3; g2 < i3; ++g2) {
|
|
144774
|
+
if (s3 = e3[g2], s3 < 127 && n2) {
|
|
144705
144775
|
const e4 = n2[String.fromCharCode(s3)];
|
|
144706
144776
|
e4 && (s3 = e4.charCodeAt(0));
|
|
144707
144777
|
}
|
|
144708
|
-
|
|
144709
|
-
|
|
144710
|
-
|
|
144711
|
-
|
|
144712
|
-
|
|
144713
|
-
|
|
144714
|
-
|
|
144715
|
-
|
|
144716
|
-
|
|
144778
|
+
const t4 = this._unicodeService.charProperties(s3, v2);
|
|
144779
|
+
r2 = p.UnicodeService.extractWidth(t4);
|
|
144780
|
+
const i4 = p.UnicodeService.extractShouldJoin(t4), m2 = i4 ? p.UnicodeService.extractWidth(v2) : 0;
|
|
144781
|
+
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) {
|
|
144782
|
+
if (h2) {
|
|
144783
|
+
const e4 = f2;
|
|
144784
|
+
let t5 = this._activeBuffer.x - m2;
|
|
144785
|
+
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);
|
|
144786
|
+
} else if (this._activeBuffer.x = a2 - 1, 2 === r2) continue;
|
|
144787
|
+
}
|
|
144788
|
+
if (i4 && this._activeBuffer.x) {
|
|
144789
|
+
const e4 = f2.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
|
144790
|
+
f2.addCodepointToCell(this._activeBuffer.x - e4, s3, r2);
|
|
144791
|
+
for (let e5 = r2 - m2; --e5 >= 0; ) f2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, u2);
|
|
144792
|
+
} 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
144793
|
}
|
|
144718
|
-
|
|
144794
|
+
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
144795
|
}
|
|
144720
144796
|
registerCsiHandler(e3, t3) {
|
|
144721
|
-
return "t" !== e3.final || e3.prefix || e3.intermediates ? this._parser.registerCsiHandler(e3, t3) : this._parser.registerCsiHandler(e3, ((e4) => !
|
|
144797
|
+
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
144798
|
}
|
|
144723
144799
|
registerDcsHandler(e3, t3) {
|
|
144724
|
-
return this._parser.registerDcsHandler(e3, new
|
|
144800
|
+
return this._parser.registerDcsHandler(e3, new m.DcsHandler(t3));
|
|
144725
144801
|
}
|
|
144726
144802
|
registerEscHandler(e3, t3) {
|
|
144727
144803
|
return this._parser.registerEscHandler(e3, t3);
|
|
144728
144804
|
}
|
|
144729
144805
|
registerOscHandler(e3, t3) {
|
|
144730
|
-
return this._parser.registerOscHandler(e3, new
|
|
144806
|
+
return this._parser.registerOscHandler(e3, new g.OscHandler(t3));
|
|
144731
144807
|
}
|
|
144732
144808
|
bell() {
|
|
144733
144809
|
return this._onRequestBell.fire(), true;
|
|
@@ -144739,13 +144815,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144739
144815
|
return this._activeBuffer.x = 0, true;
|
|
144740
144816
|
}
|
|
144741
144817
|
backspace() {
|
|
144742
|
-
var e3;
|
|
144743
144818
|
if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, true;
|
|
144744
144819
|
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 &&
|
|
144820
|
+
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
144821
|
this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
|
|
144747
|
-
const
|
|
144748
|
-
|
|
144822
|
+
const e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
144823
|
+
e3.hasWidth(this._activeBuffer.x) && !e3.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
|
|
144749
144824
|
}
|
|
144750
144825
|
return this._restrictCursor(), true;
|
|
144751
144826
|
}
|
|
@@ -144832,7 +144907,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144832
144907
|
}
|
|
144833
144908
|
_eraseInBufferLine(e3, t3, i3, s3 = false, r2 = false) {
|
|
144834
144909
|
const n2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
|
|
144835
|
-
n2.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()),
|
|
144910
|
+
n2.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()), r2), s3 && (n2.isWrapped = false);
|
|
144836
144911
|
}
|
|
144837
144912
|
_resetBufferLine(e3, t3 = false) {
|
|
144838
144913
|
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
|
|
@@ -144892,12 +144967,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144892
144967
|
insertChars(e3) {
|
|
144893
144968
|
this._restrictCursor();
|
|
144894
144969
|
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())
|
|
144970
|
+
return t3 && (t3.insertCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
|
|
144896
144971
|
}
|
|
144897
144972
|
deleteChars(e3) {
|
|
144898
144973
|
this._restrictCursor();
|
|
144899
144974
|
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())
|
|
144975
|
+
return t3 && (t3.deleteCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
|
|
144901
144976
|
}
|
|
144902
144977
|
scrollUp(e3) {
|
|
144903
144978
|
let t3 = e3.params[0] || 1;
|
|
@@ -144914,7 +144989,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144914
144989
|
const t3 = e3.params[0] || 1;
|
|
144915
144990
|
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
144916
144991
|
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
144917
|
-
i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())
|
|
144992
|
+
i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
144918
144993
|
}
|
|
144919
144994
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
144920
144995
|
}
|
|
@@ -144923,7 +144998,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144923
144998
|
const t3 = e3.params[0] || 1;
|
|
144924
144999
|
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
144925
145000
|
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
144926
|
-
i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())
|
|
145001
|
+
i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
144927
145002
|
}
|
|
144928
145003
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
144929
145004
|
}
|
|
@@ -144932,7 +145007,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144932
145007
|
const t3 = e3.params[0] || 1;
|
|
144933
145008
|
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
144934
145009
|
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
144935
|
-
i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())
|
|
145010
|
+
i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
144936
145011
|
}
|
|
144937
145012
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
144938
145013
|
}
|
|
@@ -144941,20 +145016,27 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
144941
145016
|
const t3 = e3.params[0] || 1;
|
|
144942
145017
|
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
144943
145018
|
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
144944
|
-
i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())
|
|
145019
|
+
i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
144945
145020
|
}
|
|
144946
145021
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
144947
145022
|
}
|
|
144948
145023
|
eraseChars(e3) {
|
|
144949
145024
|
this._restrictCursor();
|
|
144950
145025
|
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())
|
|
145026
|
+
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
145027
|
}
|
|
144953
145028
|
repeatPrecedingCharacter(e3) {
|
|
144954
|
-
|
|
144955
|
-
|
|
144956
|
-
|
|
144957
|
-
|
|
145029
|
+
const t3 = this._parser.precedingJoinState;
|
|
145030
|
+
if (!t3) return true;
|
|
145031
|
+
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);
|
|
145032
|
+
let a2 = 0;
|
|
145033
|
+
for (let e4 = 0; e4 < n2.length; ) {
|
|
145034
|
+
const t4 = n2.codePointAt(e4) || 0;
|
|
145035
|
+
o2[a2++] = t4, e4 += t4 > 65535 ? 2 : 1;
|
|
145036
|
+
}
|
|
145037
|
+
let h2 = a2;
|
|
145038
|
+
for (let e4 = 1; e4 < i3; ++e4) o2.copyWithin(h2, 0, a2), h2 += a2;
|
|
145039
|
+
return this.print(o2, 0, h2), true;
|
|
144958
145040
|
}
|
|
144959
145041
|
sendDeviceAttributesPrimary(e3) {
|
|
144960
145042
|
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 +145290,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145208
145290
|
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
145291
|
}
|
|
145210
145292
|
windowOptions(e3) {
|
|
145211
|
-
if (!
|
|
145293
|
+
if (!w(e3.params[0], this._optionsService.rawOptions.windowOptions)) return true;
|
|
145212
145294
|
const t3 = e3.length > 1 ? e3.params[1] : 0;
|
|
145213
145295
|
switch (e3.params[0]) {
|
|
145214
145296
|
case 14:
|
|
@@ -145246,9 +145328,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145246
145328
|
const e4 = i3.shift(), s3 = i3.shift();
|
|
145247
145329
|
if (/^\d+$/.exec(e4)) {
|
|
145248
145330
|
const i4 = parseInt(e4);
|
|
145249
|
-
if (
|
|
145331
|
+
if (D2(i4)) if ("?" === s3) t3.push({ type: 0, index: i4 });
|
|
145250
145332
|
else {
|
|
145251
|
-
const e5 = (0,
|
|
145333
|
+
const e5 = (0, S.parseColor)(s3);
|
|
145252
145334
|
e5 && t3.push({ type: 1, index: i4, color: e5 });
|
|
145253
145335
|
}
|
|
145254
145336
|
}
|
|
@@ -145273,7 +145355,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145273
145355
|
const i3 = e3.split(";");
|
|
145274
145356
|
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
145357
|
else {
|
|
145276
|
-
const s3 = (0,
|
|
145358
|
+
const s3 = (0, S.parseColor)(i3[e4]);
|
|
145277
145359
|
s3 && this._onColor.fire([{ type: 1, index: this._specialColors[t3], color: s3 }]);
|
|
145278
145360
|
}
|
|
145279
145361
|
return true;
|
|
@@ -145292,7 +145374,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145292
145374
|
const t3 = [], i3 = e3.split(";");
|
|
145293
145375
|
for (let e4 = 0; e4 < i3.length; ++e4) if (/^\d+$/.exec(i3[e4])) {
|
|
145294
145376
|
const s3 = parseInt(i3[e4]);
|
|
145295
|
-
|
|
145377
|
+
D2(s3) && t3.push({ type: 2, index: s3 });
|
|
145296
145378
|
}
|
|
145297
145379
|
return t3.length && this._onColor.fire(t3), true;
|
|
145298
145380
|
}
|
|
@@ -145318,7 +145400,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145318
145400
|
return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, o.DEFAULT_CHARSET), true;
|
|
145319
145401
|
}
|
|
145320
145402
|
selectCharset(e3) {
|
|
145321
|
-
return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(
|
|
145403
|
+
return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(C[e3[0]], o.CHARSETS[e3[1]] || o.DEFAULT_CHARSET), true);
|
|
145322
145404
|
}
|
|
145323
145405
|
index() {
|
|
145324
145406
|
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 +145444,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145362
145444
|
this._dirtyRowTracker.markRangeDirty(e3, t3);
|
|
145363
145445
|
}
|
|
145364
145446
|
}
|
|
145365
|
-
t2.InputHandler =
|
|
145366
|
-
let
|
|
145447
|
+
t2.InputHandler = k;
|
|
145448
|
+
let L = class {
|
|
145367
145449
|
constructor(e3) {
|
|
145368
145450
|
this._bufferService = e3, this.clearRange();
|
|
145369
145451
|
}
|
|
@@ -145374,16 +145456,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145374
145456
|
e3 < this.start ? this.start = e3 : e3 > this.end && (this.end = e3);
|
|
145375
145457
|
}
|
|
145376
145458
|
markRangeDirty(e3, t3) {
|
|
145377
|
-
e3 > t3 && (
|
|
145459
|
+
e3 > t3 && (E = e3, e3 = t3, t3 = E), e3 < this.start && (this.start = e3), t3 > this.end && (this.end = t3);
|
|
145378
145460
|
}
|
|
145379
145461
|
markAllDirty() {
|
|
145380
145462
|
this.markRangeDirty(0, this._bufferService.rows - 1);
|
|
145381
145463
|
}
|
|
145382
145464
|
};
|
|
145383
|
-
function
|
|
145465
|
+
function D2(e3) {
|
|
145384
145466
|
return 0 <= e3 && e3 < 256;
|
|
145385
145467
|
}
|
|
145386
|
-
|
|
145468
|
+
L = s2([r(0, v.IBufferService)], L);
|
|
145387
145469
|
}, 844: (e2, t2) => {
|
|
145388
145470
|
function i2(e3) {
|
|
145389
145471
|
for (const t3 of e3) t3.dispose();
|
|
@@ -145413,15 +145495,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145413
145495
|
return this._isDisposed ? void 0 : this._value;
|
|
145414
145496
|
}
|
|
145415
145497
|
set value(e3) {
|
|
145416
|
-
|
|
145417
|
-
this._isDisposed || e3 === this._value || (null === (t3 = this._value) || void 0 === t3 || t3.dispose(), this._value = e3);
|
|
145498
|
+
this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
|
|
145418
145499
|
}
|
|
145419
145500
|
clear() {
|
|
145420
145501
|
this.value = void 0;
|
|
145421
145502
|
}
|
|
145422
145503
|
dispose() {
|
|
145423
|
-
|
|
145424
|
-
this._isDisposed = true, null === (e3 = this._value) || void 0 === e3 || e3.dispose(), this._value = void 0;
|
|
145504
|
+
this._isDisposed = true, this._value?.dispose(), this._value = void 0;
|
|
145425
145505
|
}
|
|
145426
145506
|
}, t2.toDisposable = function(e3) {
|
|
145427
145507
|
return { dispose: e3 };
|
|
@@ -145452,15 +145532,14 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145452
145532
|
this._data.get(e3, t3) || this._data.set(e3, t3, new i2()), this._data.get(e3, t3).set(s2, r, n);
|
|
145453
145533
|
}
|
|
145454
145534
|
get(e3, t3, i3, s2) {
|
|
145455
|
-
|
|
145456
|
-
return null === (r = this._data.get(e3, t3)) || void 0 === r ? void 0 : r.get(i3, s2);
|
|
145535
|
+
return this._data.get(e3, t3)?.get(i3, s2);
|
|
145457
145536
|
}
|
|
145458
145537
|
clear() {
|
|
145459
145538
|
this._data.clear();
|
|
145460
145539
|
}
|
|
145461
145540
|
};
|
|
145462
145541
|
}, 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"
|
|
145542
|
+
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
145543
|
const i2 = t2.isNode ? "node" : navigator.userAgent, s2 = t2.isNode ? "node" : navigator.platform;
|
|
145465
145544
|
t2.isFirefox = i2.includes("Firefox"), t2.isLegacyEdge = i2.includes("Edge"), t2.isSafari = /^((?!chrome|android).)*safari/i.test(i2), t2.getSafariVersion = function() {
|
|
145466
145545
|
if (!t2.isSafari) return 0;
|
|
@@ -145585,7 +145664,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145585
145664
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.updateWindowsModeWrappedState = void 0;
|
|
145586
145665
|
const s2 = i2(643);
|
|
145587
145666
|
t2.updateWindowsModeWrappedState = function(e3) {
|
|
145588
|
-
const t3 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y - 1), i3 =
|
|
145667
|
+
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
145668
|
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
145669
|
};
|
|
145591
145670
|
}, 3734: (e2, t2) => {
|
|
@@ -145716,6 +145795,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145716
145795
|
getUnderlineStyle() {
|
|
145717
145796
|
return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
|
|
145718
145797
|
}
|
|
145798
|
+
getUnderlineVariantOffset() {
|
|
145799
|
+
return this.extended.underlineVariantOffset;
|
|
145800
|
+
}
|
|
145719
145801
|
}
|
|
145720
145802
|
t2.AttributeData = i2;
|
|
145721
145803
|
class s2 {
|
|
@@ -145743,6 +145825,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145743
145825
|
set urlId(e3) {
|
|
145744
145826
|
this._urlId = e3;
|
|
145745
145827
|
}
|
|
145828
|
+
get underlineVariantOffset() {
|
|
145829
|
+
const e3 = (3758096384 & this._ext) >> 29;
|
|
145830
|
+
return e3 < 0 ? 4294967288 ^ e3 : e3;
|
|
145831
|
+
}
|
|
145832
|
+
set underlineVariantOffset(e3) {
|
|
145833
|
+
this._ext &= 536870911, this._ext |= e3 << 29 & 3758096384;
|
|
145834
|
+
}
|
|
145746
145835
|
constructor(e3 = 0, t3 = 0) {
|
|
145747
145836
|
this._ext = 0, this._urlId = 0, this._ext = e3, this._urlId = t3;
|
|
145748
145837
|
}
|
|
@@ -145989,32 +146078,32 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
145989
146078
|
setCell(e3, t3) {
|
|
145990
146079
|
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
146080
|
}
|
|
145992
|
-
|
|
145993
|
-
268435456 &
|
|
146081
|
+
setCellFromCodepoint(e3, t3, i3, s3) {
|
|
146082
|
+
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
146083
|
}
|
|
145995
|
-
addCodepointToCell(e3, t3) {
|
|
145996
|
-
let
|
|
145997
|
-
2097152 &
|
|
146084
|
+
addCodepointToCell(e3, t3, i3) {
|
|
146085
|
+
let s3 = this._data[3 * e3 + 0];
|
|
146086
|
+
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
146087
|
}
|
|
145999
|
-
insertCells(e3, t3, i3
|
|
146000
|
-
if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.
|
|
146088
|
+
insertCells(e3, t3, i3) {
|
|
146089
|
+
if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length - e3) {
|
|
146001
146090
|
const s3 = new r.CellData();
|
|
146002
146091
|
for (let i4 = this.length - e3 - t3 - 1; i4 >= 0; --i4) this.setCell(e3 + t3 + i4, this.loadCell(e3 + i4, s3));
|
|
146003
146092
|
for (let s4 = 0; s4 < t3; ++s4) this.setCell(e3 + s4, i3);
|
|
146004
146093
|
} else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
|
|
146005
|
-
2 === this.getWidth(this.length - 1) && this.
|
|
146094
|
+
2 === this.getWidth(this.length - 1) && this.setCellFromCodepoint(this.length - 1, 0, 1, i3);
|
|
146006
146095
|
}
|
|
146007
|
-
deleteCells(e3, t3, i3
|
|
146096
|
+
deleteCells(e3, t3, i3) {
|
|
146008
146097
|
if (e3 %= this.length, t3 < this.length - e3) {
|
|
146009
146098
|
const s3 = new r.CellData();
|
|
146010
146099
|
for (let i4 = 0; i4 < this.length - e3 - t3; ++i4) this.setCell(e3 + i4, this.loadCell(e3 + t3 + i4, s3));
|
|
146011
146100
|
for (let e4 = this.length - t3; e4 < this.length; ++e4) this.setCell(e4, i3);
|
|
146012
146101
|
} else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
|
|
146013
|
-
e3 && 2 === this.getWidth(e3 - 1) && this.
|
|
146102
|
+
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
146103
|
}
|
|
146015
|
-
replaceCells(e3, t3, i3,
|
|
146016
|
-
if (
|
|
146017
|
-
else for (e3 && 2 === this.getWidth(e3 - 1) && this.
|
|
146104
|
+
replaceCells(e3, t3, i3, s3 = false) {
|
|
146105
|
+
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++;
|
|
146106
|
+
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
146107
|
}
|
|
146019
146108
|
resize(e3, t3) {
|
|
146020
146109
|
if (e3 === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
|
|
@@ -146093,14 +146182,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146093
146182
|
r3 >= t3 && (this._combined[r3 - t3 + i3] = e3._combined[r3]);
|
|
146094
146183
|
}
|
|
146095
146184
|
}
|
|
146096
|
-
translateToString(e3
|
|
146097
|
-
e3 && (i3 = Math.min(i3, this.getTrimmedLength()));
|
|
146098
|
-
let
|
|
146185
|
+
translateToString(e3, t3, i3, s3) {
|
|
146186
|
+
t3 = t3 ?? 0, i3 = i3 ?? this.length, e3 && (i3 = Math.min(i3, this.getTrimmedLength())), s3 && (s3.length = 0);
|
|
146187
|
+
let r2 = "";
|
|
146099
146188
|
for (; t3 < i3; ) {
|
|
146100
|
-
const e4 = this._data[3 * t3 + 0], i4 = 2097151 & e4;
|
|
146101
|
-
|
|
146189
|
+
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;
|
|
146190
|
+
if (r2 += a2, s3) for (let e5 = 0; e5 < a2.length; ++e5) s3.push(t3);
|
|
146191
|
+
t3 += e4 >> 22 || 1;
|
|
146102
146192
|
}
|
|
146103
|
-
return s3;
|
|
146193
|
+
return s3 && s3.push(t3), r2;
|
|
146104
146194
|
}
|
|
146105
146195
|
}
|
|
146106
146196
|
t2.BufferLine = h;
|
|
@@ -146283,11 +146373,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146283
146373
|
"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
146374
|
break;
|
|
146285
146375
|
case 8:
|
|
146286
|
-
|
|
146287
|
-
o.key = s2.C0.ESC + s2.C0.DEL;
|
|
146288
|
-
break;
|
|
146289
|
-
}
|
|
146290
|
-
o.key = s2.C0.DEL;
|
|
146376
|
+
o.key = e3.ctrlKey ? "\b" : s2.C0.DEL, e3.altKey && (o.key = s2.C0.ESC + o.key);
|
|
146291
146377
|
break;
|
|
146292
146378
|
case 9:
|
|
146293
146379
|
if (e3.shiftKey) {
|
|
@@ -146375,7 +146461,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146375
146461
|
default:
|
|
146376
146462
|
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
146463
|
else {
|
|
146378
|
-
const t4 = r[e3.keyCode], i4 =
|
|
146464
|
+
const t4 = r[e3.keyCode], i4 = t4?.[e3.shiftKey ? 1 : 0];
|
|
146379
146465
|
if (i4) o.key = s2.C0.ESC + i4;
|
|
146380
146466
|
else if (e3.keyCode >= 65 && e3.keyCode <= 90) {
|
|
146381
146467
|
const t5 = e3.ctrlKey ? e3.keyCode - 64 : e3.keyCode + 32;
|
|
@@ -146505,19 +146591,19 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146505
146591
|
return a;
|
|
146506
146592
|
}
|
|
146507
146593
|
};
|
|
146508
|
-
}, 225: (e2, t2) => {
|
|
146594
|
+
}, 225: (e2, t2, i2) => {
|
|
146509
146595
|
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]],
|
|
146511
|
-
let
|
|
146596
|
+
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]];
|
|
146597
|
+
let o;
|
|
146512
146598
|
t2.UnicodeV6 = class {
|
|
146513
146599
|
constructor() {
|
|
146514
|
-
if (this.version = "6", !
|
|
146515
|
-
|
|
146516
|
-
for (let e3 = 0; e3 <
|
|
146600
|
+
if (this.version = "6", !o) {
|
|
146601
|
+
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);
|
|
146602
|
+
for (let e3 = 0; e3 < r.length; ++e3) o.fill(0, r[e3][0], r[e3][1] + 1);
|
|
146517
146603
|
}
|
|
146518
146604
|
}
|
|
146519
146605
|
wcwidth(e3) {
|
|
146520
|
-
return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ?
|
|
146606
|
+
return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ? o[e3] : (function(e4, t3) {
|
|
146521
146607
|
let i3, s3 = 0, r2 = t3.length - 1;
|
|
146522
146608
|
if (e4 < t3[0][0] || e4 > t3[r2][1]) return false;
|
|
146523
146609
|
for (; r2 >= s3; ) if (i3 = s3 + r2 >> 1, e4 > t3[i3][1]) s3 = i3 + 1;
|
|
@@ -146526,7 +146612,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146526
146612
|
r2 = i3 - 1;
|
|
146527
146613
|
}
|
|
146528
146614
|
return false;
|
|
146529
|
-
})(e3,
|
|
146615
|
+
})(e3, n) ? 0 : e3 >= 131072 && e3 <= 196605 || e3 >= 196608 && e3 <= 262141 ? 2 : 1;
|
|
146616
|
+
}
|
|
146617
|
+
charProperties(e3, t3) {
|
|
146618
|
+
let i3 = this.wcwidth(e3), r2 = 0 === i3 && 0 !== t3;
|
|
146619
|
+
if (r2) {
|
|
146620
|
+
const e4 = s2.UnicodeService.extractWidth(t3);
|
|
146621
|
+
0 === e4 ? r2 = false : e4 > i3 && (i3 = e4);
|
|
146622
|
+
}
|
|
146623
|
+
return s2.UnicodeService.createPropertyValue(0, i3, r2);
|
|
146530
146624
|
}
|
|
146531
146625
|
};
|
|
146532
146626
|
}, 5981: (e2, t2, i2) => {
|
|
@@ -146712,7 +146806,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146712
146806
|
})();
|
|
146713
146807
|
class c extends s2.Disposable {
|
|
146714
146808
|
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.
|
|
146809
|
+
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
146810
|
}, this._executeHandlerFb = (e4) => {
|
|
146717
146811
|
}, this._csiHandlerFb = (e4, t3) => {
|
|
146718
146812
|
}, this._escHandlerFb = (e4) => {
|
|
@@ -146814,7 +146908,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146814
146908
|
this._errorHandler = this._errorHandlerFb;
|
|
146815
146909
|
}
|
|
146816
146910
|
reset() {
|
|
146817
|
-
this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.
|
|
146911
|
+
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
146912
|
}
|
|
146819
146913
|
_preserveStack(e3, t3, i3, s3, r2) {
|
|
146820
146914
|
this._parseStack.state = e3, this._parseStack.handlers = t3, this._parseStack.handlerPos = i3, this._parseStack.transition = s3, this._parseStack.chunkPos = r2;
|
|
@@ -146847,7 +146941,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146847
146941
|
if (r2 = e3[this._parseStack.chunkPos], s3 = this._oscParser.end(24 !== r2 && 26 !== r2, i3), s3) return s3;
|
|
146848
146942
|
27 === r2 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
146849
146943
|
}
|
|
146850
|
-
this._parseStack.state = 0, o2 = this._parseStack.chunkPos + 1, this.
|
|
146944
|
+
this._parseStack.state = 0, o2 = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
|
|
146851
146945
|
}
|
|
146852
146946
|
for (let i4 = o2; i4 < t3; ++i4) {
|
|
146853
146947
|
switch (r2 = e3[i4], n2 = this._transitions.table[this.currentState << 8 | (r2 < 160 ? r2 : h)], n2 >> 4) {
|
|
@@ -146872,7 +146966,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146872
146966
|
}
|
|
146873
146967
|
break;
|
|
146874
146968
|
case 3:
|
|
146875
|
-
this._executeHandlers[r2] ? this._executeHandlers[r2]() : this._executeHandlerFb(r2), this.
|
|
146969
|
+
this._executeHandlers[r2] ? this._executeHandlers[r2]() : this._executeHandlerFb(r2), this.precedingJoinState = 0;
|
|
146876
146970
|
break;
|
|
146877
146971
|
case 0:
|
|
146878
146972
|
break;
|
|
@@ -146883,7 +146977,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146883
146977
|
const o3 = this._csiHandlers[this._collect << 8 | r2];
|
|
146884
146978
|
let a2 = o3 ? o3.length - 1 : -1;
|
|
146885
146979
|
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.
|
|
146980
|
+
a2 < 0 && this._csiHandlerFb(this._collect << 8 | r2, this._params), this.precedingJoinState = 0;
|
|
146887
146981
|
break;
|
|
146888
146982
|
case 8:
|
|
146889
146983
|
do {
|
|
@@ -146907,7 +147001,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146907
147001
|
const c2 = this._escHandlers[this._collect << 8 | r2];
|
|
146908
147002
|
let l = c2 ? c2.length - 1 : -1;
|
|
146909
147003
|
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.
|
|
147004
|
+
l < 0 && this._escHandlerFb(this._collect << 8 | r2), this.precedingJoinState = 0;
|
|
146911
147005
|
break;
|
|
146912
147006
|
case 11:
|
|
146913
147007
|
this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
@@ -146923,7 +147017,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146923
147017
|
break;
|
|
146924
147018
|
case 14:
|
|
146925
147019
|
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.
|
|
147020
|
+
27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
146927
147021
|
break;
|
|
146928
147022
|
case 4:
|
|
146929
147023
|
this._oscParser.start();
|
|
@@ -146936,7 +147030,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
146936
147030
|
break;
|
|
146937
147031
|
case 6:
|
|
146938
147032
|
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.
|
|
147033
|
+
27 === r2 && (n2 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
146940
147034
|
}
|
|
146941
147035
|
this.currentState = 15 & n2;
|
|
146942
147036
|
}
|
|
@@ -147434,7 +147528,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147434
147528
|
return this._decorations.values();
|
|
147435
147529
|
}
|
|
147436
147530
|
constructor() {
|
|
147437
|
-
super(), this._decorations = new o.SortedList(((e3) =>
|
|
147531
|
+
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
147532
|
}
|
|
147439
147533
|
registerDecoration(e3) {
|
|
147440
147534
|
if (e3.marker.isDisposed) return;
|
|
@@ -147452,14 +147546,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147452
147546
|
this._decorations.clear();
|
|
147453
147547
|
}
|
|
147454
147548
|
*getDecorationsAtCell(e3, t3, i3) {
|
|
147455
|
-
|
|
147456
|
-
|
|
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);
|
|
147549
|
+
let s3 = 0, r2 = 0;
|
|
147550
|
+
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
147551
|
}
|
|
147459
147552
|
forEachDecorationAtCell(e3, t3, i3, s3) {
|
|
147460
147553
|
this._decorations.forEachByKey(t3, ((t4) => {
|
|
147461
|
-
|
|
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);
|
|
147554
|
+
a = t4.options.x ?? 0, h = a + (t4.options.width ?? 1), e3 >= a && e3 < h && (!i3 || (t4.options.layer ?? "bottom") === i3) && s3(t4);
|
|
147463
147555
|
}));
|
|
147464
147556
|
}
|
|
147465
147557
|
}
|
|
@@ -147555,24 +147647,19 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147555
147647
|
this._evalLazyOptionalParams(i3), e3.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t3, ...i3);
|
|
147556
147648
|
}
|
|
147557
147649
|
trace(e3, ...t3) {
|
|
147558
|
-
|
|
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);
|
|
147650
|
+
this._logLevel <= o.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
147560
147651
|
}
|
|
147561
147652
|
debug(e3, ...t3) {
|
|
147562
|
-
|
|
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);
|
|
147653
|
+
this._logLevel <= o.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
147564
147654
|
}
|
|
147565
147655
|
info(e3, ...t3) {
|
|
147566
|
-
|
|
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);
|
|
147656
|
+
this._logLevel <= o.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e3, t3);
|
|
147568
147657
|
}
|
|
147569
147658
|
warn(e3, ...t3) {
|
|
147570
|
-
|
|
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);
|
|
147659
|
+
this._logLevel <= o.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e3, t3);
|
|
147572
147660
|
}
|
|
147573
147661
|
error(e3, ...t3) {
|
|
147574
|
-
|
|
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);
|
|
147662
|
+
this._logLevel <= o.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e3, t3);
|
|
147576
147663
|
}
|
|
147577
147664
|
};
|
|
147578
147665
|
t2.LogService = c = s2([r(0, o.IOptionsService)], c), t2.setTraceLogger = function(e3) {
|
|
@@ -147590,19 +147677,21 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147590
147677
|
}, 7302: (e2, t2, i2) => {
|
|
147591
147678
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.OptionsService = t2.DEFAULT_OPTIONS = void 0;
|
|
147592
147679
|
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 };
|
|
147680
|
+
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
147681
|
const o = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
147595
147682
|
class a extends r.Disposable {
|
|
147596
147683
|
constructor(e3) {
|
|
147597
147684
|
super(), this._onOptionChange = this.register(new s2.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
|
|
147598
|
-
const i3 =
|
|
147685
|
+
const i3 = { ...t2.DEFAULT_OPTIONS };
|
|
147599
147686
|
for (const t3 in e3) if (t3 in i3) try {
|
|
147600
147687
|
const s3 = e3[t3];
|
|
147601
147688
|
i3[t3] = this._sanitizeAndValidateOption(t3, s3);
|
|
147602
147689
|
} catch (e4) {
|
|
147603
147690
|
console.error(e4);
|
|
147604
147691
|
}
|
|
147605
|
-
this.rawOptions = i3, this.options =
|
|
147692
|
+
this.rawOptions = i3, this.options = { ...i3 }, this._setupOptions(), this.register((0, r.toDisposable)((() => {
|
|
147693
|
+
this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
|
|
147694
|
+
})));
|
|
147606
147695
|
}
|
|
147607
147696
|
onSpecificOptionChange(e3, t3) {
|
|
147608
147697
|
return this.onOptionChange(((i3) => {
|
|
@@ -147663,7 +147752,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147663
147752
|
if (!i3 && 0 !== i3) throw new Error(`${e3} must be numeric, value: ${i3}`);
|
|
147664
147753
|
break;
|
|
147665
147754
|
case "windowsPty":
|
|
147666
|
-
i3 =
|
|
147755
|
+
i3 = i3 ?? {};
|
|
147667
147756
|
}
|
|
147668
147757
|
return i3;
|
|
147669
147758
|
}
|
|
@@ -147705,8 +147794,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147705
147794
|
}
|
|
147706
147795
|
}
|
|
147707
147796
|
getLinkData(e3) {
|
|
147708
|
-
|
|
147709
|
-
return null === (t3 = this._dataByLinkId.get(e3)) || void 0 === t3 ? void 0 : t3.data;
|
|
147797
|
+
return this._dataByLinkId.get(e3)?.data;
|
|
147710
147798
|
}
|
|
147711
147799
|
_getEntryIdKey(e3) {
|
|
147712
147800
|
return `${e3.id};;${e3.uri}`;
|
|
@@ -147742,7 +147830,19 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147742
147830
|
}, 1480: (e2, t2, i2) => {
|
|
147743
147831
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeService = void 0;
|
|
147744
147832
|
const s2 = i2(8460), r = i2(225);
|
|
147745
|
-
|
|
147833
|
+
class n {
|
|
147834
|
+
static extractShouldJoin(e3) {
|
|
147835
|
+
return 0 != (1 & e3);
|
|
147836
|
+
}
|
|
147837
|
+
static extractWidth(e3) {
|
|
147838
|
+
return e3 >> 1 & 3;
|
|
147839
|
+
}
|
|
147840
|
+
static extractCharKind(e3) {
|
|
147841
|
+
return e3 >> 3;
|
|
147842
|
+
}
|
|
147843
|
+
static createPropertyValue(e3, t3, i3 = false) {
|
|
147844
|
+
return (16777215 & e3) << 3 | (3 & t3) << 1 | (i3 ? 1 : 0);
|
|
147845
|
+
}
|
|
147746
147846
|
constructor() {
|
|
147747
147847
|
this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new s2.EventEmitter(), this.onChange = this._onChange.event;
|
|
147748
147848
|
const e3 = new r.UnicodeV6();
|
|
@@ -147768,20 +147868,26 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147768
147868
|
return this._activeProvider.wcwidth(e3);
|
|
147769
147869
|
}
|
|
147770
147870
|
getStringCellWidth(e3) {
|
|
147771
|
-
let t3 = 0;
|
|
147772
|
-
const
|
|
147773
|
-
for (let
|
|
147774
|
-
let
|
|
147775
|
-
if (55296 <=
|
|
147776
|
-
if (++
|
|
147777
|
-
const
|
|
147778
|
-
56320 <=
|
|
147871
|
+
let t3 = 0, i3 = 0;
|
|
147872
|
+
const s3 = e3.length;
|
|
147873
|
+
for (let r2 = 0; r2 < s3; ++r2) {
|
|
147874
|
+
let o = e3.charCodeAt(r2);
|
|
147875
|
+
if (55296 <= o && o <= 56319) {
|
|
147876
|
+
if (++r2 >= s3) return t3 + this.wcwidth(o);
|
|
147877
|
+
const i4 = e3.charCodeAt(r2);
|
|
147878
|
+
56320 <= i4 && i4 <= 57343 ? o = 1024 * (o - 55296) + i4 - 56320 + 65536 : t3 += this.wcwidth(i4);
|
|
147779
147879
|
}
|
|
147780
|
-
|
|
147880
|
+
const a = this.charProperties(o, i3);
|
|
147881
|
+
let h = n.extractWidth(a);
|
|
147882
|
+
n.extractShouldJoin(a) && (h -= n.extractWidth(i3)), t3 += h, i3 = a;
|
|
147781
147883
|
}
|
|
147782
147884
|
return t3;
|
|
147783
147885
|
}
|
|
147784
|
-
|
|
147886
|
+
charProperties(e3, t3) {
|
|
147887
|
+
return this._activeProvider.charProperties(e3, t3);
|
|
147888
|
+
}
|
|
147889
|
+
}
|
|
147890
|
+
t2.UnicodeService = n;
|
|
147785
147891
|
} }, t = {};
|
|
147786
147892
|
function i(s2) {
|
|
147787
147893
|
var r = t[s2];
|
|
@@ -147796,7 +147902,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147796
147902
|
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
147903
|
class d extends n.Disposable {
|
|
147798
147904
|
constructor(e3) {
|
|
147799
|
-
super(), this._core = this.register(new r.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions =
|
|
147905
|
+
super(), this._core = this.register(new r.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = { ...this._core.options };
|
|
147800
147906
|
const t3 = (e4) => this._core.options[e4], i2 = (e4, t4) => {
|
|
147801
147907
|
this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
|
|
147802
147908
|
};
|
|
@@ -147901,6 +148007,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147901
148007
|
focus() {
|
|
147902
148008
|
this._core.focus();
|
|
147903
148009
|
}
|
|
148010
|
+
input(e3, t3 = true) {
|
|
148011
|
+
this._core.input(e3, t3);
|
|
148012
|
+
}
|
|
147904
148013
|
resize(e3, t3) {
|
|
147905
148014
|
this._verifyIntegers(e3, t3), this._core.resize(e3, t3);
|
|
147906
148015
|
}
|
|
@@ -147910,6 +148019,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147910
148019
|
attachCustomKeyEventHandler(e3) {
|
|
147911
148020
|
this._core.attachCustomKeyEventHandler(e3);
|
|
147912
148021
|
}
|
|
148022
|
+
attachCustomWheelEventHandler(e3) {
|
|
148023
|
+
this._core.attachCustomWheelEventHandler(e3);
|
|
148024
|
+
}
|
|
147913
148025
|
registerLinkProvider(e3) {
|
|
147914
148026
|
return this._core.registerLinkProvider(e3);
|
|
147915
148027
|
}
|
|
@@ -147923,8 +148035,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
147923
148035
|
return this._verifyIntegers(e3), this._core.registerMarker(e3);
|
|
147924
148036
|
}
|
|
147925
148037
|
registerDecoration(e3) {
|
|
147926
|
-
|
|
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);
|
|
148038
|
+
return this._checkProposedApi(), this._verifyPositiveIntegers(e3.x ?? 0, e3.width ?? 0, e3.height ?? 0), this._core.registerDecoration(e3);
|
|
147928
148039
|
}
|
|
147929
148040
|
hasSelection() {
|
|
147930
148041
|
return this._core.hasSelection();
|
|
@@ -148005,9 +148116,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
148005
148116
|
}
|
|
148006
148117
|
});
|
|
148007
148118
|
|
|
148008
|
-
// node_modules/
|
|
148009
|
-
var
|
|
148010
|
-
"node_modules/
|
|
148119
|
+
// node_modules/@xterm/addon-fit/lib/addon-fit.js
|
|
148120
|
+
var require_addon_fit = __commonJS({
|
|
148121
|
+
"node_modules/@xterm/addon-fit/lib/addon-fit.js"(exports, module) {
|
|
148011
148122
|
!(function(e, t) {
|
|
148012
148123
|
"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
148124
|
})(self, (() => (() => {
|
|
@@ -148455,12 +148566,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
148455
148566
|
});
|
|
148456
148567
|
});
|
|
148457
148568
|
}
|
|
148458
|
-
var import_xterm,
|
|
148569
|
+
var import_xterm, import_addon_fit, IPC_TIMEOUT, TerminalOverlay;
|
|
148459
148570
|
var init_TerminalOverlay = __esm({
|
|
148460
148571
|
"src/ui/TerminalOverlay.ts"() {
|
|
148461
148572
|
"use strict";
|
|
148462
148573
|
import_xterm = __toESM(require_xterm());
|
|
148463
|
-
|
|
148574
|
+
import_addon_fit = __toESM(require_addon_fit());
|
|
148464
148575
|
init_officeManager();
|
|
148465
148576
|
IPC_TIMEOUT = 1e4;
|
|
148466
148577
|
TerminalOverlay = class _TerminalOverlay {
|
|
@@ -149102,7 +149213,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
149102
149213
|
scrollback: 1e4,
|
|
149103
149214
|
allowProposedApi: true
|
|
149104
149215
|
});
|
|
149105
|
-
this.fitAddon = new
|
|
149216
|
+
this.fitAddon = new import_addon_fit.FitAddon();
|
|
149106
149217
|
this.terminal.loadAddon(this.fitAddon);
|
|
149107
149218
|
this.terminal.open(this.terminalDiv);
|
|
149108
149219
|
this.fitAddon.fit();
|