@sourcegraph/amp 0.0.1749182771-gb19aef → 0.0.1749211345-g16cdfc
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/amp.js +3 -3
- package/dist/{client-DQvLVO0y.js → client-Dd8T5Ydk.js} +2 -2
- package/dist/{client-DQvLVO0y.js.map → client-Dd8T5Ydk.js.map} +1 -1
- package/dist/{console-B2SF1aqQ.js → console-D_ZxbRrA.js} +14 -14
- package/dist/{console-B2SF1aqQ.js.map → console-D_ZxbRrA.js.map} +1 -1
- package/dist/{create_file.node-CTYL8XSm.js → create_file.node-D_xwgdhJ.js} +2 -2
- package/dist/{create_file.node-CTYL8XSm.js.map → create_file.node-D_xwgdhJ.js.map} +1 -1
- package/dist/{edit_file.node-Bsj3aCak.js → edit_file.node-Cv9nC-uR.js} +3 -3
- package/dist/{edit_file.node-Bsj3aCak.js.map → edit_file.node-Cv9nC-uR.js.map} +1 -1
- package/dist/{executable-DdVPivLU.js → executable-BTpHtmPV.js} +2 -2
- package/dist/{executable-DdVPivLU.js.map → executable-BTpHtmPV.js.map} +1 -1
- package/dist/{files-DgmPJSHS.js → files-CNmw2a6V.js} +2 -2
- package/dist/{files-DgmPJSHS.js.map → files-CNmw2a6V.js.map} +1 -1
- package/dist/{glob.node-CvxhbXXV.js → glob.node-Dbygwo7q.js} +4 -4
- package/dist/{glob.node-CvxhbXXV.js.map → glob.node-Dbygwo7q.js.map} +1 -1
- package/dist/{index-DG5uxXfG.js → index-DGuVA6oK.js} +2 -2
- package/dist/{index-DG5uxXfG.js.map → index-DGuVA6oK.js.map} +1 -1
- package/dist/{list_directory.node-D7kWIPfS.js → list_directory.node-DJCJkqLg.js} +2 -2
- package/dist/{list_directory.node-D7kWIPfS.js.map → list_directory.node-DJCJkqLg.js.map} +1 -1
- package/dist/{load-profile-DD55GCpN.js → load-profile-CXHBU_AI.js} +2 -2
- package/dist/{load-profile-DD55GCpN.js.map → load-profile-CXHBU_AI.js.map} +1 -1
- package/dist/{main-CnaIlgJ-.js → main-CtHA5Ylu.js} +409 -398
- package/dist/{main-CnaIlgJ-.js.map → main-CtHA5Ylu.js.map} +1 -1
- package/dist/{node-CDbBRzSe.js → node-BOIz1I5S.js} +728 -673
- package/dist/node-BOIz1I5S.js.map +1 -0
- package/dist/{node-q5EJWNpV.js → node-C2cKbj9k.js} +3 -3
- package/dist/{node-q5EJWNpV.js.map → node-C2cKbj9k.js.map} +1 -1
- package/dist/{node-CBGz4YST.js → node-D9dPV0eu.js} +4 -4
- package/dist/{node-CBGz4YST.js.map → node-D9dPV0eu.js.map} +1 -1
- package/dist/{node-BHadfrnF.js → node-DPPbAAw0.js} +2 -2
- package/dist/{node-BHadfrnF.js.map → node-DPPbAAw0.js.map} +1 -1
- package/dist/{node-DExO0xPV.js → node-DZCyuAqY.js} +2 -2
- package/dist/{node-DExO0xPV.js.map → node-DZCyuAqY.js.map} +1 -1
- package/dist/{node-BcF9KV_p.js → node-DaL4eJRQ.js} +3 -3
- package/dist/{node-BcF9KV_p.js.map → node-DaL4eJRQ.js.map} +1 -1
- package/dist/{read_file.node-CpfHdJYY.js → read_file.node-CAD-I3qI.js} +2 -2
- package/dist/{read_file.node-CpfHdJYY.js.map → read_file.node-CAD-I3qI.js.map} +1 -1
- package/dist/{stdio-Clxnyx58.js → stdio-7mSc8Mj0.js} +3 -3
- package/dist/{stdio-Clxnyx58.js.map → stdio-7mSc8Mj0.js.map} +1 -1
- package/dist/storybook.js +1 -1
- package/dist/{undo_edit.node-DDFebFdr.js → undo_edit.node-BYH1ok_y.js} +2 -2
- package/dist/{undo_edit.node-DDFebFdr.js.map → undo_edit.node-BYH1ok_y.js.map} +1 -1
- package/package.json +1 -1
- package/dist/node-CDbBRzSe.js.map +0 -1
@@ -1,9 +1,10 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import * as
|
3
|
-
import ee, { resolve as
|
4
|
-
import { aT as
|
5
|
-
import { loadProfileEnvironmentVariables as
|
6
|
-
const
|
2
|
+
import * as le from "node:os";
|
3
|
+
import ee, { resolve as fe } from "node:path";
|
4
|
+
import { aT as de, aU as _e, C as pe, aV as ne, aW as ge, aX as ve, aI as oe, aQ as me, aH as be, aC as Se, O as se } from "./console-D_ZxbRrA.js";
|
5
|
+
import { loadProfileEnvironmentVariables as Ce } from "./load-profile-CXHBU_AI.js";
|
6
|
+
const ye = [
|
7
|
+
// Basic read/info operations
|
7
8
|
"ls",
|
8
9
|
"dir",
|
9
10
|
"find",
|
@@ -25,8 +26,6 @@ const Ce = [
|
|
25
26
|
"ps",
|
26
27
|
"top",
|
27
28
|
"htop",
|
28
|
-
"uname",
|
29
|
-
"whoami",
|
30
29
|
"echo",
|
31
30
|
"printenv",
|
32
31
|
"id",
|
@@ -48,68 +47,56 @@ const Ce = [
|
|
48
47
|
"man",
|
49
48
|
"info",
|
50
49
|
"mkdir",
|
51
|
-
"touch"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
"go run",
|
56
|
-
"go build",
|
57
|
-
"go vet",
|
58
|
-
"go fmt",
|
59
|
-
"go list",
|
50
|
+
"touch",
|
51
|
+
"uname",
|
52
|
+
"whoami",
|
53
|
+
// Go
|
60
54
|
"go version",
|
61
55
|
"go env",
|
62
|
-
|
63
|
-
|
64
|
-
"cargo run",
|
65
|
-
"cargo build",
|
66
|
-
"cargo check",
|
67
|
-
"cargo fmt",
|
56
|
+
"go help",
|
57
|
+
// Cargo
|
68
58
|
"cargo version",
|
69
|
-
"cargo
|
59
|
+
"cargo --version",
|
60
|
+
"cargo help",
|
70
61
|
// Rust
|
71
62
|
"rustc --version",
|
63
|
+
"rustc --help",
|
72
64
|
"rustc --explain",
|
73
65
|
// Java
|
74
66
|
"javac --version",
|
75
67
|
"javac -version",
|
76
68
|
"javac -help",
|
77
|
-
|
78
|
-
"make -n",
|
79
|
-
"make --dry-run",
|
80
|
-
// Maven
|
81
|
-
"mvn test",
|
82
|
-
"mvn verify",
|
83
|
-
"mvn help",
|
84
|
-
"mvn dependency:tree",
|
85
|
-
// Gradle
|
86
|
-
"gradle tasks",
|
87
|
-
"gradle dependencies",
|
88
|
-
"gradle properties",
|
89
|
-
"gradle help",
|
69
|
+
"javac --help",
|
90
70
|
// .NET
|
91
|
-
"dotnet test",
|
92
|
-
"dotnet list",
|
93
71
|
"dotnet --info",
|
94
72
|
"dotnet --version",
|
95
73
|
"dotnet --help",
|
74
|
+
"dotnet help",
|
96
75
|
// C/C++
|
97
76
|
"gcc --version",
|
98
77
|
"gcc -v",
|
78
|
+
"gcc --help",
|
99
79
|
"gcc -dumpversion",
|
100
80
|
"g++ --version",
|
101
81
|
"g++ -v",
|
82
|
+
"g++ --help",
|
102
83
|
"g++ -dumpversion",
|
84
|
+
"clang --version",
|
85
|
+
"clang --help",
|
86
|
+
"clang++ --version",
|
87
|
+
"clang++ --help",
|
103
88
|
// Python
|
104
89
|
"python -V",
|
105
90
|
"python --version",
|
106
91
|
"python -h",
|
107
92
|
"python --help",
|
108
|
-
"
|
93
|
+
"python3 -V",
|
94
|
+
"python3 --version",
|
95
|
+
"python3 -h",
|
96
|
+
"python3 --help",
|
109
97
|
// Ruby
|
110
98
|
"ruby -v",
|
111
99
|
"ruby --version",
|
112
|
-
"ruby -e",
|
113
100
|
"ruby -h",
|
114
101
|
"ruby --help",
|
115
102
|
// Node
|
@@ -117,6 +104,76 @@ const Ce = [
|
|
117
104
|
"node --version",
|
118
105
|
"node -h",
|
119
106
|
"node --help",
|
107
|
+
// npm
|
108
|
+
"npm --help",
|
109
|
+
"npm --version",
|
110
|
+
"npm -v",
|
111
|
+
"npm help",
|
112
|
+
// yarn
|
113
|
+
"yarn --help",
|
114
|
+
"yarn --version",
|
115
|
+
"yarn -v",
|
116
|
+
"yarn help",
|
117
|
+
// pnpm
|
118
|
+
"pnpm --help",
|
119
|
+
"pnpm --version",
|
120
|
+
"pnpm -v",
|
121
|
+
"pnpm help",
|
122
|
+
// Testing
|
123
|
+
"pytest -h",
|
124
|
+
"pytest --help",
|
125
|
+
"pytest --version",
|
126
|
+
"jest --help",
|
127
|
+
"jest --version",
|
128
|
+
"mocha --help",
|
129
|
+
"mocha --version",
|
130
|
+
// Make
|
131
|
+
"make --version",
|
132
|
+
"make --help",
|
133
|
+
// Docker
|
134
|
+
"docker --version",
|
135
|
+
"docker --help",
|
136
|
+
"docker version",
|
137
|
+
"docker help",
|
138
|
+
// Git
|
139
|
+
"git --version",
|
140
|
+
"git --help",
|
141
|
+
"git help",
|
142
|
+
"git version"
|
143
|
+
], ae = [
|
144
|
+
// Go commands
|
145
|
+
"go test",
|
146
|
+
"go run",
|
147
|
+
"go build",
|
148
|
+
"go vet",
|
149
|
+
"go fmt",
|
150
|
+
"go list",
|
151
|
+
// Cargo commands
|
152
|
+
"cargo test",
|
153
|
+
"cargo run",
|
154
|
+
"cargo build",
|
155
|
+
"cargo check",
|
156
|
+
"cargo fmt",
|
157
|
+
"cargo tree",
|
158
|
+
// Make (only dry runs)
|
159
|
+
"make -n",
|
160
|
+
"make --dry-run",
|
161
|
+
// Maven
|
162
|
+
"mvn test",
|
163
|
+
"mvn verify",
|
164
|
+
"mvn dependency:tree",
|
165
|
+
// Gradle
|
166
|
+
"gradle tasks",
|
167
|
+
"gradle dependencies",
|
168
|
+
"gradle properties",
|
169
|
+
// .NET
|
170
|
+
"dotnet test",
|
171
|
+
"dotnet list",
|
172
|
+
// Python
|
173
|
+
"python -c",
|
174
|
+
// Ruby
|
175
|
+
"ruby -e",
|
176
|
+
// Node
|
120
177
|
"node -e",
|
121
178
|
// npm
|
122
179
|
"npm list",
|
@@ -126,7 +183,6 @@ const Ce = [
|
|
126
183
|
"npm run",
|
127
184
|
"npm view",
|
128
185
|
"npm info",
|
129
|
-
"npm --help",
|
130
186
|
// yarn
|
131
187
|
"yarn list",
|
132
188
|
"yarn ls",
|
@@ -134,43 +190,17 @@ const Ce = [
|
|
134
190
|
"yarn test",
|
135
191
|
"yarn run",
|
136
192
|
"yarn why",
|
137
|
-
"yarn --help",
|
138
193
|
// pnpm
|
139
194
|
"pnpm list",
|
140
195
|
"pnpm ls",
|
141
196
|
"pnpm outdated",
|
142
197
|
"pnpm test",
|
143
198
|
"pnpm run",
|
144
|
-
"pnpm --help",
|
145
|
-
"pnpm run build",
|
146
|
-
"pnpm run check",
|
147
|
-
"pnpm run check:fix",
|
148
|
-
"pnpm run test",
|
149
|
-
"pnpm -w build",
|
150
|
-
"pnpm -w check",
|
151
|
-
"pnpm -w check:fix",
|
152
|
-
"pnpm -w test",
|
153
|
-
"pnpm build",
|
154
|
-
"pnpm check",
|
155
|
-
"pnpm check:fix",
|
156
|
-
"pnpm test",
|
157
|
-
"pnpm -w run build",
|
158
|
-
"pnpm -w run check",
|
159
|
-
"pnpm -w run check:fix",
|
160
|
-
"pnpm -w run test",
|
161
|
-
"pnpm --version",
|
162
199
|
// Testing
|
163
200
|
"pytest --collect-only",
|
164
|
-
"pytest -h",
|
165
|
-
"pytest --help",
|
166
|
-
"pytest --version",
|
167
201
|
"jest --listTests",
|
168
202
|
"jest --showConfig",
|
169
|
-
"jest --help",
|
170
|
-
"jest --version",
|
171
203
|
"mocha --list",
|
172
|
-
"mocha --help",
|
173
|
-
"mocha --version",
|
174
204
|
// Git
|
175
205
|
"git status",
|
176
206
|
"git show",
|
@@ -182,99 +212,124 @@ const Ce = [
|
|
182
212
|
"git rev-parse --is-inside-work-tree",
|
183
213
|
"git rev-parse --show-toplevel",
|
184
214
|
"git config --list",
|
185
|
-
"git log"
|
186
|
-
// Go specific commands
|
187
|
-
"go build .",
|
188
|
-
"go test"
|
215
|
+
"git log"
|
189
216
|
], we = ["/dev/null", "/dev/zero", "/dev/stdout", "/dev/stderr", "/dev/stdin"];
|
190
|
-
function
|
191
|
-
if (!
|
217
|
+
function ue(L, O) {
|
218
|
+
if (!L || we.includes(L) || (L.endsWith(ee.sep) && (L = L.slice(0, -1)), O.includes(L)))
|
192
219
|
return !1;
|
193
|
-
if (ee.isAbsolute(
|
194
|
-
return !
|
195
|
-
const
|
196
|
-
let
|
197
|
-
for (const
|
198
|
-
if (
|
199
|
-
if (
|
220
|
+
if (ee.isAbsolute(L))
|
221
|
+
return !O.some((R) => Be(R, L));
|
222
|
+
const I = L.split("/");
|
223
|
+
let k = 0;
|
224
|
+
for (const R of I)
|
225
|
+
if (R === "..") {
|
226
|
+
if (k--, k < 0)
|
200
227
|
return !0;
|
201
|
-
} else
|
228
|
+
} else R !== "" && R !== "." && k++;
|
202
229
|
return !1;
|
203
230
|
}
|
204
|
-
function Be(
|
205
|
-
const
|
206
|
-
return !!
|
231
|
+
function Be(L, O) {
|
232
|
+
const I = ee.relative(ee.normalize(L), ee.normalize(O));
|
233
|
+
return !!I && !I.startsWith("..") && !I.startsWith("/");
|
207
234
|
}
|
208
|
-
function re(
|
209
|
-
if (typeof
|
235
|
+
function re(L, O, I) {
|
236
|
+
if (typeof L == "string")
|
210
237
|
return !1;
|
211
|
-
for (const
|
212
|
-
if (typeof
|
238
|
+
for (const k of L.arguments)
|
239
|
+
if (typeof k == "string" && !(k.startsWith("-") || k.includes("*") || k.startsWith('"') || k.startsWith("'")) && !(I && !I.absolutePaths && k.startsWith("//")) && k.includes("/") && ue(k, O))
|
213
240
|
return !0;
|
214
241
|
return !1;
|
215
242
|
}
|
216
|
-
function Ee(
|
217
|
-
const
|
243
|
+
function Ee(L, O = !1) {
|
244
|
+
const I = {
|
218
245
|
absolutePaths: !0,
|
219
246
|
environmentVariables: !0
|
220
247
|
};
|
221
|
-
if (
|
222
|
-
return
|
223
|
-
const
|
224
|
-
return
|
225
|
-
...
|
248
|
+
if (O || typeof L == "string")
|
249
|
+
return I;
|
250
|
+
const k = typeof L.program == "string" ? L.program.toLowerCase() : "", R = L.arguments.filter((N) => typeof N == "string").join(" "), q = `${k} ${R}`.toLowerCase();
|
251
|
+
return k.includes("bazel") || q.includes("bazel") || k === "ibazel" ? {
|
252
|
+
...I,
|
226
253
|
absolutePaths: !1
|
227
254
|
// Allow bazel-style absolute paths like //path/to/target
|
228
|
-
} :
|
255
|
+
} : I;
|
229
256
|
}
|
230
|
-
function Ae(
|
231
|
-
|
257
|
+
function Ae(L) {
|
258
|
+
for (const O of ye)
|
259
|
+
if (L === O || L.startsWith(O + " "))
|
260
|
+
return !0;
|
261
|
+
return !1;
|
262
|
+
}
|
263
|
+
function Te(L) {
|
264
|
+
const O = /* @__PURE__ */ new Set(), I = L.map(
|
265
|
+
(k) => k.endsWith(" *") ? k.slice(0, -2) : k
|
266
|
+
);
|
267
|
+
for (const k of I)
|
268
|
+
for (const R of ae)
|
269
|
+
if (!O.has(R) && k !== R && k.startsWith(R + " ")) {
|
270
|
+
O.add(R);
|
271
|
+
for (const q of ae)
|
272
|
+
q.startsWith(R + " ") && O.add(q);
|
273
|
+
}
|
274
|
+
return O;
|
275
|
+
}
|
276
|
+
function ke(L, O, I) {
|
277
|
+
let k = [];
|
232
278
|
try {
|
233
|
-
const t =
|
234
|
-
|
279
|
+
const t = de(L, I?.platform);
|
280
|
+
k = _e(t);
|
235
281
|
} catch (t) {
|
236
|
-
|
282
|
+
pe.warn("Failed to parse command", { cmd: L }, t), k = [L];
|
237
283
|
}
|
238
|
-
const
|
239
|
-
if (
|
284
|
+
const R = I?.config?.["commands.allowlist"] || [], q = I?.config?.["commands.strict"] ?? !1;
|
285
|
+
if (R.includes("*"))
|
240
286
|
return {
|
241
287
|
requiresConfirmation: !1,
|
242
|
-
parts:
|
288
|
+
parts: k.map((t) => ({ command: t, requiresConfirmation: !1 }))
|
243
289
|
};
|
244
|
-
const
|
290
|
+
const N = k.map((t) => {
|
245
291
|
if (typeof t == "string")
|
246
292
|
return { command: t, requiresConfirmation: !0 };
|
247
|
-
const l = Ee(t,
|
248
|
-
function _(
|
249
|
-
return
|
293
|
+
const l = Ee(t, q), d = t.arguments.some((a) => typeof a != "string");
|
294
|
+
function _(a) {
|
295
|
+
return a === ne ? "<dynamic>" : a;
|
250
296
|
}
|
251
297
|
const n = `${_(t.program)} ${t.arguments.map(_).join(" ")}`;
|
252
298
|
if (!d) {
|
253
|
-
for (const
|
254
|
-
if (n ===
|
299
|
+
for (const a of R)
|
300
|
+
if (n === a)
|
255
301
|
return { command: t, requiresConfirmation: !1 };
|
256
302
|
}
|
257
|
-
if (
|
258
|
-
return re(t,
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
303
|
+
if (Ae(n))
|
304
|
+
return re(t, O, l) ? { command: t, requiresConfirmation: !0 } : { command: t, requiresConfirmation: !1 };
|
305
|
+
let c;
|
306
|
+
if (q)
|
307
|
+
c = R;
|
308
|
+
else {
|
309
|
+
const a = Te(R);
|
310
|
+
c = [...ae.filter(
|
311
|
+
(u) => !a.has(u)
|
312
|
+
), ...R];
|
313
|
+
}
|
314
|
+
for (let a of c) {
|
315
|
+
a.endsWith(" *") && (a = a.slice(0, -2));
|
316
|
+
const h = " * ";
|
317
|
+
if (a.includes(h) && !a.startsWith(h)) {
|
318
|
+
const u = a.split(h).map((r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
319
|
+
if (new RegExp(`^${u.join(" .* ")}(\\s.*)?$`).test(n))
|
320
|
+
return re(t, O, l) ? { command: t, requiresConfirmation: !0 } : { command: t, requiresConfirmation: !1 };
|
321
|
+
} else if (n === a || n.startsWith(a + " "))
|
322
|
+
return re(t, O, l) ? { command: t, requiresConfirmation: !0 } : { command: t, requiresConfirmation: !1 };
|
268
323
|
}
|
269
324
|
return { command: t, requiresConfirmation: !0 };
|
270
325
|
});
|
271
|
-
return { requiresConfirmation:
|
326
|
+
return { requiresConfirmation: N.some((t) => t.requiresConfirmation), parts: N };
|
272
327
|
}
|
273
|
-
var ie = {},
|
274
|
-
function
|
275
|
-
return
|
328
|
+
var ie = {}, he;
|
329
|
+
function Le() {
|
330
|
+
return he || (he = 1, function(L) {
|
276
331
|
(() => {
|
277
|
-
var
|
332
|
+
var O = { 349: (w, t, l) => {
|
278
333
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CircularList = void 0;
|
279
334
|
const d = l(460), _ = l(844);
|
280
335
|
class n extends _.Disposable {
|
@@ -286,22 +341,22 @@ function ke() {
|
|
286
341
|
}
|
287
342
|
set maxLength(a) {
|
288
343
|
if (this._maxLength === a) return;
|
289
|
-
const
|
290
|
-
for (let u = 0; u < Math.min(a, this.length); u++)
|
291
|
-
this._array =
|
344
|
+
const h = new Array(a);
|
345
|
+
for (let u = 0; u < Math.min(a, this.length); u++) h[u] = this._array[this._getCyclicIndex(u)];
|
346
|
+
this._array = h, this._maxLength = a, this._startIndex = 0;
|
292
347
|
}
|
293
348
|
get length() {
|
294
349
|
return this._length;
|
295
350
|
}
|
296
351
|
set length(a) {
|
297
|
-
if (a > this._length) for (let
|
352
|
+
if (a > this._length) for (let h = this._length; h < a; h++) this._array[h] = void 0;
|
298
353
|
this._length = a;
|
299
354
|
}
|
300
355
|
get(a) {
|
301
356
|
return this._array[this._getCyclicIndex(a)];
|
302
357
|
}
|
303
|
-
set(a,
|
304
|
-
this._array[this._getCyclicIndex(a)] =
|
358
|
+
set(a, h) {
|
359
|
+
this._array[this._getCyclicIndex(a)] = h;
|
305
360
|
}
|
306
361
|
push(a) {
|
307
362
|
this._array[this._getCyclicIndex(this._length)] = a, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
|
@@ -316,10 +371,10 @@ function ke() {
|
|
316
371
|
pop() {
|
317
372
|
return this._array[this._getCyclicIndex(this._length-- - 1)];
|
318
373
|
}
|
319
|
-
splice(a,
|
320
|
-
if (
|
321
|
-
for (let e = a; e < this._length -
|
322
|
-
this._length -=
|
374
|
+
splice(a, h, ...u) {
|
375
|
+
if (h) {
|
376
|
+
for (let e = a; e < this._length - h; e++) this._array[this._getCyclicIndex(e)] = this._array[this._getCyclicIndex(e + h)];
|
377
|
+
this._length -= h, this.onDeleteEmitter.fire({ index: a, amount: h });
|
323
378
|
}
|
324
379
|
for (let e = this._length - 1; e >= a; e--) this._array[this._getCyclicIndex(e + u.length)] = this._array[this._getCyclicIndex(e)];
|
325
380
|
for (let e = 0; e < u.length; e++) this._array[this._getCyclicIndex(a + e)] = u[e];
|
@@ -331,15 +386,15 @@ function ke() {
|
|
331
386
|
trimStart(a) {
|
332
387
|
a > this._length && (a = this._length), this._startIndex += a, this._length -= a, this.onTrimEmitter.fire(a);
|
333
388
|
}
|
334
|
-
shiftElements(a,
|
335
|
-
if (!(
|
389
|
+
shiftElements(a, h, u) {
|
390
|
+
if (!(h <= 0)) {
|
336
391
|
if (a < 0 || a >= this._length) throw new Error("start argument out of range");
|
337
392
|
if (a + u < 0) throw new Error("Cannot shift elements in list beyond index 0");
|
338
393
|
if (u > 0) {
|
339
|
-
for (let r =
|
340
|
-
const e = a +
|
394
|
+
for (let r = h - 1; r >= 0; r--) this.set(a + r + u, this.get(a + r));
|
395
|
+
const e = a + h + u - this._length;
|
341
396
|
if (e > 0) for (this._length += e; this._length > this._maxLength; ) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
|
342
|
-
} else for (let e = 0; e <
|
397
|
+
} else for (let e = 0; e < h; e++) this.set(a + e + u, this.get(a + e));
|
343
398
|
}
|
344
399
|
}
|
345
400
|
_getCyclicIndex(a) {
|
@@ -351,14 +406,14 @@ function ke() {
|
|
351
406
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.clone = void 0, t.clone = function l(d, _ = 5) {
|
352
407
|
if (typeof d != "object") return d;
|
353
408
|
const n = Array.isArray(d) ? [] : {};
|
354
|
-
for (const
|
409
|
+
for (const c in d) n[c] = _ <= 1 ? d[c] : d[c] && l(d[c], _ - 1);
|
355
410
|
return n;
|
356
411
|
};
|
357
412
|
}, 969: (w, t, l) => {
|
358
413
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CoreTerminal = void 0;
|
359
|
-
const d = l(844), _ = l(585), n = l(348),
|
414
|
+
const d = l(844), _ = l(585), n = l(348), c = l(866), a = l(744), h = l(302), u = l(83), e = l(460), r = l(753), i = l(480), s = l(994), f = l(282), p = l(435), S = l(981), y = l(660);
|
360
415
|
let C = !1;
|
361
|
-
class
|
416
|
+
class T extends d.Disposable {
|
362
417
|
get onScroll() {
|
363
418
|
return this._onScrollApi || (this._onScrollApi = this.register(new e.EventEmitter()), this._onScroll.event((E) => {
|
364
419
|
this._onScrollApi?.fire(E.position);
|
@@ -380,11 +435,11 @@ function ke() {
|
|
380
435
|
for (const B in E) this.optionsService.options[B] = E[B];
|
381
436
|
}
|
382
437
|
constructor(E) {
|
383
|
-
super(), this._windowsWrappingHeuristics = this.register(new d.MutableDisposable()), this._onBinary = this.register(new e.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new e.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new e.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new e.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new e.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new e.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new
|
438
|
+
super(), this._windowsWrappingHeuristics = this.register(new d.MutableDisposable()), this._onBinary = this.register(new e.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new e.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new e.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new e.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new e.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new e.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new h.OptionsService(E)), this._instantiationService.setService(_.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(a.BufferService)), this._instantiationService.setService(_.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(c.LogService)), this._instantiationService.setService(_.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(u.CoreService)), this._instantiationService.setService(_.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(r.CoreMouseService)), this._instantiationService.setService(_.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(i.UnicodeService)), this._instantiationService.setService(_.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(s.CharsetService), this._instantiationService.setService(_.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(y.OscLinkService), this._instantiationService.setService(_.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new p.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, e.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, e.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, e.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, e.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this.register(this._bufferService.onScroll((B) => {
|
384
439
|
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
385
440
|
})), this.register(this._inputHandler.onScroll((B) => {
|
386
441
|
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
387
|
-
})), this._writeBuffer = this.register(new S.WriteBuffer((B,
|
442
|
+
})), this._writeBuffer = this.register(new S.WriteBuffer((B, D) => this._inputHandler.parse(B, D))), this.register((0, e.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
|
388
443
|
}
|
389
444
|
write(E, B) {
|
390
445
|
this._writeBuffer.write(E, B);
|
@@ -401,8 +456,8 @@ function ke() {
|
|
401
456
|
scroll(E, B = !1) {
|
402
457
|
this._bufferService.scroll(E, B);
|
403
458
|
}
|
404
|
-
scrollLines(E, B,
|
405
|
-
this._bufferService.scrollLines(E, B,
|
459
|
+
scrollLines(E, B, D) {
|
460
|
+
this._bufferService.scrollLines(E, B, D);
|
406
461
|
}
|
407
462
|
scrollPages(E) {
|
408
463
|
this.scrollLines(E * (this.rows - 1));
|
@@ -449,7 +504,7 @@ function ke() {
|
|
449
504
|
}
|
450
505
|
}
|
451
506
|
}
|
452
|
-
t.CoreTerminal =
|
507
|
+
t.CoreTerminal = T;
|
453
508
|
}, 460: (w, t) => {
|
454
509
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
|
455
510
|
constructor() {
|
@@ -480,17 +535,17 @@ function ke() {
|
|
480
535
|
};
|
481
536
|
}, 435: function(w, t, l) {
|
482
537
|
var d = this && this.__decorate || function(H, o, m, g) {
|
483
|
-
var b, A = arguments.length,
|
484
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
485
|
-
else for (var
|
486
|
-
return A > 3 &&
|
538
|
+
var b, A = arguments.length, P = A < 3 ? o : g === null ? g = Object.getOwnPropertyDescriptor(o, m) : g;
|
539
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") P = Reflect.decorate(H, o, m, g);
|
540
|
+
else for (var W = H.length - 1; W >= 0; W--) (b = H[W]) && (P = (A < 3 ? b(P) : A > 3 ? b(o, m, P) : b(o, m)) || P);
|
541
|
+
return A > 3 && P && Object.defineProperty(o, m, P), P;
|
487
542
|
}, _ = this && this.__param || function(H, o) {
|
488
543
|
return function(m, g) {
|
489
544
|
o(m, g, H);
|
490
545
|
};
|
491
546
|
};
|
492
547
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.InputHandler = t.WindowsOptionsReportType = void 0;
|
493
|
-
const n = l(584),
|
548
|
+
const n = l(584), c = l(116), a = l(15), h = l(844), u = l(482), e = l(437), r = l(460), i = l(643), s = l(511), f = l(734), p = l(585), S = l(480), y = l(242), C = l(351), T = l(941), $ = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, E = 131072;
|
494
549
|
function B(H, o) {
|
495
550
|
if (H > 24) return o.setWinLines || !1;
|
496
551
|
switch (H) {
|
@@ -541,29 +596,29 @@ function ke() {
|
|
541
596
|
}
|
542
597
|
return !1;
|
543
598
|
}
|
544
|
-
var
|
599
|
+
var D;
|
545
600
|
(function(H) {
|
546
601
|
H[H.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", H[H.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
|
547
|
-
})(
|
602
|
+
})(D || (t.WindowsOptionsReportType = D = {}));
|
548
603
|
let G = 0;
|
549
|
-
class V extends
|
604
|
+
class V extends h.Disposable {
|
550
605
|
getAttrData() {
|
551
606
|
return this._curAttrData;
|
552
607
|
}
|
553
|
-
constructor(o, m, g, b, A,
|
554
|
-
super(), this._bufferService = o, this._charsetService = m, this._coreService = g, this._logService = b, this._optionsService = A, this._oscLinkService =
|
555
|
-
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(v), params:
|
608
|
+
constructor(o, m, g, b, A, P, W, j, z = new a.EscapeSequenceParser()) {
|
609
|
+
super(), this._bufferService = o, this._charsetService = m, this._coreService = g, this._logService = b, this._optionsService = A, this._oscLinkService = P, this._coreMouseService = W, this._unicodeService = j, this._parser = z, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new u.StringToUtf32(), this._utf8Decoder = new u.Utf8ToUtf32(), this._workCell = new s.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = e.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new r.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new r.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new r.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new r.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new r.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new r.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new r.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new r.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new r.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new r.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new r.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new r.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new r.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: !1, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new U(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((v) => this._activeBuffer = v.activeBuffer)), this._parser.setCsiHandlerFallback((v, F) => {
|
610
|
+
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(v), params: F.toArray() });
|
556
611
|
}), this._parser.setEscHandlerFallback((v) => {
|
557
612
|
this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(v) });
|
558
613
|
}), this._parser.setExecuteHandlerFallback((v) => {
|
559
614
|
this._logService.debug("Unknown EXECUTE code: ", { code: v });
|
560
|
-
}), this._parser.setOscHandlerFallback((v,
|
561
|
-
this._logService.debug("Unknown OSC code: ", { identifier: v, action:
|
562
|
-
}), this._parser.setDcsHandlerFallback((v,
|
563
|
-
|
564
|
-
}), this._parser.setPrintHandler((v,
|
565
|
-
for (const v in
|
566
|
-
this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((v) => (this._logService.error("Parsing error: ", v), v)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new C.DcsHandler((v,
|
615
|
+
}), this._parser.setOscHandlerFallback((v, F, x) => {
|
616
|
+
this._logService.debug("Unknown OSC code: ", { identifier: v, action: F, data: x });
|
617
|
+
}), this._parser.setDcsHandlerFallback((v, F, x) => {
|
618
|
+
F === "HOOK" && (x = x.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(v), action: F, payload: x });
|
619
|
+
}), this._parser.setPrintHandler((v, F, x) => this.print(v, F, x)), this._parser.registerCsiHandler({ final: "@" }, (v) => this.insertChars(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (v) => this.scrollLeft(v)), this._parser.registerCsiHandler({ final: "A" }, (v) => this.cursorUp(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (v) => this.scrollRight(v)), this._parser.registerCsiHandler({ final: "B" }, (v) => this.cursorDown(v)), this._parser.registerCsiHandler({ final: "C" }, (v) => this.cursorForward(v)), this._parser.registerCsiHandler({ final: "D" }, (v) => this.cursorBackward(v)), this._parser.registerCsiHandler({ final: "E" }, (v) => this.cursorNextLine(v)), this._parser.registerCsiHandler({ final: "F" }, (v) => this.cursorPrecedingLine(v)), this._parser.registerCsiHandler({ final: "G" }, (v) => this.cursorCharAbsolute(v)), this._parser.registerCsiHandler({ final: "H" }, (v) => this.cursorPosition(v)), this._parser.registerCsiHandler({ final: "I" }, (v) => this.cursorForwardTab(v)), this._parser.registerCsiHandler({ final: "J" }, (v) => this.eraseInDisplay(v, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (v) => this.eraseInDisplay(v, !0)), this._parser.registerCsiHandler({ final: "K" }, (v) => this.eraseInLine(v, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (v) => this.eraseInLine(v, !0)), this._parser.registerCsiHandler({ final: "L" }, (v) => this.insertLines(v)), this._parser.registerCsiHandler({ final: "M" }, (v) => this.deleteLines(v)), this._parser.registerCsiHandler({ final: "P" }, (v) => this.deleteChars(v)), this._parser.registerCsiHandler({ final: "S" }, (v) => this.scrollUp(v)), this._parser.registerCsiHandler({ final: "T" }, (v) => this.scrollDown(v)), this._parser.registerCsiHandler({ final: "X" }, (v) => this.eraseChars(v)), this._parser.registerCsiHandler({ final: "Z" }, (v) => this.cursorBackwardTab(v)), this._parser.registerCsiHandler({ final: "`" }, (v) => this.charPosAbsolute(v)), this._parser.registerCsiHandler({ final: "a" }, (v) => this.hPositionRelative(v)), this._parser.registerCsiHandler({ final: "b" }, (v) => this.repeatPrecedingCharacter(v)), this._parser.registerCsiHandler({ final: "c" }, (v) => this.sendDeviceAttributesPrimary(v)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (v) => this.sendDeviceAttributesSecondary(v)), this._parser.registerCsiHandler({ final: "d" }, (v) => this.linePosAbsolute(v)), this._parser.registerCsiHandler({ final: "e" }, (v) => this.vPositionRelative(v)), this._parser.registerCsiHandler({ final: "f" }, (v) => this.hVPosition(v)), this._parser.registerCsiHandler({ final: "g" }, (v) => this.tabClear(v)), this._parser.registerCsiHandler({ final: "h" }, (v) => this.setMode(v)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (v) => this.setModePrivate(v)), this._parser.registerCsiHandler({ final: "l" }, (v) => this.resetMode(v)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (v) => this.resetModePrivate(v)), this._parser.registerCsiHandler({ final: "m" }, (v) => this.charAttributes(v)), this._parser.registerCsiHandler({ final: "n" }, (v) => this.deviceStatus(v)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (v) => this.deviceStatusPrivate(v)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (v) => this.softReset(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (v) => this.setCursorStyle(v)), this._parser.registerCsiHandler({ final: "r" }, (v) => this.setScrollRegion(v)), this._parser.registerCsiHandler({ final: "s" }, (v) => this.saveCursor(v)), this._parser.registerCsiHandler({ final: "t" }, (v) => this.windowOptions(v)), this._parser.registerCsiHandler({ final: "u" }, (v) => this.restoreCursor(v)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (v) => this.insertColumns(v)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (v) => this.deleteColumns(v)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (v) => this.selectProtected(v)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (v) => this.requestMode(v, !0)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (v) => this.requestMode(v, !1)), this._parser.setExecuteHandler(n.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(n.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(n.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(n.C0.HT, () => this.tab()), this._parser.setExecuteHandler(n.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(n.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(n.C1.IND, () => this.index()), this._parser.setExecuteHandler(n.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(n.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new y.OscHandler((v) => (this.setTitle(v), this.setIconName(v), !0))), this._parser.registerOscHandler(1, new y.OscHandler((v) => this.setIconName(v))), this._parser.registerOscHandler(2, new y.OscHandler((v) => this.setTitle(v))), this._parser.registerOscHandler(4, new y.OscHandler((v) => this.setOrReportIndexedColor(v))), this._parser.registerOscHandler(8, new y.OscHandler((v) => this.setHyperlink(v))), this._parser.registerOscHandler(10, new y.OscHandler((v) => this.setOrReportFgColor(v))), this._parser.registerOscHandler(11, new y.OscHandler((v) => this.setOrReportBgColor(v))), this._parser.registerOscHandler(12, new y.OscHandler((v) => this.setOrReportCursorColor(v))), this._parser.registerOscHandler(104, new y.OscHandler((v) => this.restoreIndexedColor(v))), this._parser.registerOscHandler(110, new y.OscHandler((v) => this.restoreFgColor(v))), this._parser.registerOscHandler(111, new y.OscHandler((v) => this.restoreBgColor(v))), this._parser.registerOscHandler(112, new y.OscHandler((v) => this.restoreCursorColor(v))), 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());
|
620
|
+
for (const v in c.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: v }, () => this.selectCharset("(" + v)), this._parser.registerEscHandler({ intermediates: ")", final: v }, () => this.selectCharset(")" + v)), this._parser.registerEscHandler({ intermediates: "*", final: v }, () => this.selectCharset("*" + v)), this._parser.registerEscHandler({ intermediates: "+", final: v }, () => this.selectCharset("+" + v)), this._parser.registerEscHandler({ intermediates: "-", final: v }, () => this.selectCharset("-" + v)), this._parser.registerEscHandler({ intermediates: ".", final: v }, () => this.selectCharset("." + v)), this._parser.registerEscHandler({ intermediates: "/", final: v }, () => this.selectCharset("/" + v));
|
621
|
+
this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((v) => (this._logService.error("Parsing error: ", v), v)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new C.DcsHandler((v, F) => this.requestStatusString(v, F)));
|
567
622
|
}
|
568
623
|
_preserveStack(o, m, g, b) {
|
569
624
|
this._parseStack.paused = !0, this._parseStack.cursorStartX = o, this._parseStack.cursorStartY = m, this._parseStack.decodedLength = g, this._parseStack.position = b;
|
@@ -578,52 +633,52 @@ function ke() {
|
|
578
633
|
return this._curAttrData.extended.urlId;
|
579
634
|
}
|
580
635
|
parse(o, m) {
|
581
|
-
let g, b = this._activeBuffer.x, A = this._activeBuffer.y,
|
582
|
-
const
|
583
|
-
if (
|
636
|
+
let g, b = this._activeBuffer.x, A = this._activeBuffer.y, P = 0;
|
637
|
+
const W = this._parseStack.paused;
|
638
|
+
if (W) {
|
584
639
|
if (g = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, m)) return this._logSlowResolvingAsync(g), g;
|
585
|
-
b = this._parseStack.cursorStartX, A = this._parseStack.cursorStartY, this._parseStack.paused = !1, o.length > E && (
|
640
|
+
b = this._parseStack.cursorStartX, A = this._parseStack.cursorStartY, this._parseStack.paused = !1, o.length > E && (P = this._parseStack.position + E);
|
586
641
|
}
|
587
|
-
if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof o == "string" ? ` "${o}"` : ` "${Array.prototype.map.call(o, (v) => String.fromCharCode(v)).join("")}"`), typeof o == "string" ? o.split("").map((v) => v.charCodeAt(0)) : o), this._parseBuffer.length < o.length && this._parseBuffer.length < E && (this._parseBuffer = new Uint32Array(Math.min(o.length, E))),
|
588
|
-
const
|
589
|
-
if (g = this._parser.parse(this._parseBuffer,
|
642
|
+
if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof o == "string" ? ` "${o}"` : ` "${Array.prototype.map.call(o, (v) => String.fromCharCode(v)).join("")}"`), typeof o == "string" ? o.split("").map((v) => v.charCodeAt(0)) : o), this._parseBuffer.length < o.length && this._parseBuffer.length < E && (this._parseBuffer = new Uint32Array(Math.min(o.length, E))), W || this._dirtyRowTracker.clearRange(), o.length > E) for (let v = P; v < o.length; v += E) {
|
643
|
+
const F = v + E < o.length ? v + E : o.length, x = typeof o == "string" ? this._stringDecoder.decode(o.substring(v, F), this._parseBuffer) : this._utf8Decoder.decode(o.subarray(v, F), this._parseBuffer);
|
644
|
+
if (g = this._parser.parse(this._parseBuffer, x)) return this._preserveStack(b, A, x, v), this._logSlowResolvingAsync(g), g;
|
590
645
|
}
|
591
|
-
else if (!
|
646
|
+
else if (!W) {
|
592
647
|
const v = typeof o == "string" ? this._stringDecoder.decode(o, this._parseBuffer) : this._utf8Decoder.decode(o, this._parseBuffer);
|
593
648
|
if (g = this._parser.parse(this._parseBuffer, v)) return this._preserveStack(b, A, v, 0), this._logSlowResolvingAsync(g), g;
|
594
649
|
}
|
595
650
|
this._activeBuffer.x === b && this._activeBuffer.y === A || this._onCursorMove.fire();
|
596
|
-
const
|
597
|
-
z < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(z, this._bufferService.rows - 1), Math.min(
|
651
|
+
const j = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), z = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
652
|
+
z < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(z, this._bufferService.rows - 1), Math.min(j, this._bufferService.rows - 1));
|
598
653
|
}
|
599
654
|
print(o, m, g) {
|
600
655
|
let b, A;
|
601
|
-
const
|
602
|
-
let
|
603
|
-
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && g - m > 0 &&
|
604
|
-
let
|
656
|
+
const P = this._charsetService.charset, W = this._optionsService.rawOptions.screenReaderMode, j = this._bufferService.cols, z = this._coreService.decPrivateModes.wraparound, v = this._coreService.modes.insertMode, F = this._curAttrData;
|
657
|
+
let x = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
658
|
+
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && g - m > 0 && x.getWidth(this._activeBuffer.x - 1) === 2 && x.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, F);
|
659
|
+
let M = this._parser.precedingJoinState;
|
605
660
|
for (let J = m; J < g; ++J) {
|
606
|
-
if (b = o[J], b < 127 &&
|
607
|
-
const Y =
|
661
|
+
if (b = o[J], b < 127 && P) {
|
662
|
+
const Y = P[String.fromCharCode(b)];
|
608
663
|
Y && (b = Y.charCodeAt(0));
|
609
664
|
}
|
610
|
-
const Q = this._unicodeService.charProperties(b,
|
665
|
+
const Q = this._unicodeService.charProperties(b, M);
|
611
666
|
A = S.UnicodeService.extractWidth(Q);
|
612
|
-
const te = S.UnicodeService.extractShouldJoin(Q), K = te ? S.UnicodeService.extractWidth(
|
613
|
-
if (
|
667
|
+
const te = S.UnicodeService.extractShouldJoin(Q), K = te ? S.UnicodeService.extractWidth(M) : 0;
|
668
|
+
if (M = Q, W && this._onA11yChar.fire((0, u.stringFromCodePoint)(b)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + A - K > j) {
|
614
669
|
if (z) {
|
615
|
-
const Y =
|
670
|
+
const Y = x;
|
616
671
|
let Z = this._activeBuffer.x - K;
|
617
|
-
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0),
|
618
|
-
} else if (this._activeBuffer.x =
|
672
|
+
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), x = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), K > 0 && x instanceof e.BufferLine && x.copyCellsFrom(Y, Z, 0, K, !1); Z < j; ) Y.setCellFromCodepoint(Z++, 0, 1, F);
|
673
|
+
} else if (this._activeBuffer.x = j - 1, A === 2) continue;
|
619
674
|
}
|
620
675
|
if (te && this._activeBuffer.x) {
|
621
|
-
const Y =
|
622
|
-
|
623
|
-
for (let Z = A - K; --Z >= 0; )
|
624
|
-
} else if (v && (
|
676
|
+
const Y = x.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
677
|
+
x.addCodepointToCell(this._activeBuffer.x - Y, b, A);
|
678
|
+
for (let Z = A - K; --Z >= 0; ) x.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, F);
|
679
|
+
} else if (v && (x.insertCells(this._activeBuffer.x, A - K, this._activeBuffer.getNullCell(F)), x.getWidth(j - 1) === 2 && x.setCellFromCodepoint(j - 1, i.NULL_CELL_CODE, i.NULL_CELL_WIDTH, F)), x.setCellFromCodepoint(this._activeBuffer.x++, b, A, F), A > 0) for (; --A; ) x.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, F);
|
625
680
|
}
|
626
|
-
this._parser.precedingJoinState =
|
681
|
+
this._parser.precedingJoinState = M, this._activeBuffer.x < j && g - m > 0 && x.getWidth(this._activeBuffer.x) === 0 && !x.hasContent(this._activeBuffer.x) && x.setCellFromCodepoint(this._activeBuffer.x, 0, 1, F), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
627
682
|
}
|
628
683
|
registerCsiHandler(o, m) {
|
629
684
|
return o.final !== "t" || o.prefix || o.intermediates ? this._parser.registerCsiHandler(o, m) : this._parser.registerCsiHandler(o, (g) => !B(g.params[0], this._optionsService.rawOptions.windowOptions) || m(g));
|
@@ -738,8 +793,8 @@ function ke() {
|
|
738
793
|
return m === 1 && (this._curAttrData.bg |= 536870912), m !== 2 && m !== 0 || (this._curAttrData.bg &= -536870913), !0;
|
739
794
|
}
|
740
795
|
_eraseInBufferLine(o, m, g, b = !1, A = !1) {
|
741
|
-
const
|
742
|
-
|
796
|
+
const P = this._activeBuffer.lines.get(this._activeBuffer.ybase + o);
|
797
|
+
P.replaceCells(m, g, this._activeBuffer.getNullCell(this._eraseAttrData()), A), b && (P.isWrapped = !1);
|
743
798
|
}
|
744
799
|
_resetBufferLine(o, m = !1) {
|
745
800
|
const g = this._activeBuffer.lines.get(this._activeBuffer.ybase + o);
|
@@ -860,15 +915,15 @@ function ke() {
|
|
860
915
|
repeatPrecedingCharacter(o) {
|
861
916
|
const m = this._parser.precedingJoinState;
|
862
917
|
if (!m) return !0;
|
863
|
-
const g = o.params[0] || 1, b = S.UnicodeService.extractWidth(m), A = this._activeBuffer.x - b,
|
864
|
-
let
|
865
|
-
for (let v = 0; v <
|
866
|
-
const
|
867
|
-
|
918
|
+
const g = o.params[0] || 1, b = S.UnicodeService.extractWidth(m), A = this._activeBuffer.x - b, P = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(A), W = new Uint32Array(P.length * g);
|
919
|
+
let j = 0;
|
920
|
+
for (let v = 0; v < P.length; ) {
|
921
|
+
const F = P.codePointAt(v) || 0;
|
922
|
+
W[j++] = F, v += F > 65535 ? 2 : 1;
|
868
923
|
}
|
869
|
-
let z =
|
870
|
-
for (let v = 1; v < g; ++v)
|
871
|
-
return this.print(
|
924
|
+
let z = j;
|
925
|
+
for (let v = 1; v < g; ++v) W.copyWithin(z, 0, j), z += j;
|
926
|
+
return this.print(W, 0, z), !0;
|
872
927
|
}
|
873
928
|
sendDeviceAttributesPrimary(o) {
|
874
929
|
return o.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n.C0.ESC + "[?6c")), !0;
|
@@ -895,7 +950,7 @@ function ke() {
|
|
895
950
|
this._coreService.decPrivateModes.applicationCursorKeys = !0;
|
896
951
|
break;
|
897
952
|
case 2:
|
898
|
-
this._charsetService.setgCharset(0,
|
953
|
+
this._charsetService.setgCharset(0, c.DEFAULT_CHARSET), this._charsetService.setgCharset(1, c.DEFAULT_CHARSET), this._charsetService.setgCharset(2, c.DEFAULT_CHARSET), this._charsetService.setgCharset(3, c.DEFAULT_CHARSET);
|
899
954
|
break;
|
900
955
|
case 3:
|
901
956
|
this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
|
@@ -1028,8 +1083,8 @@ function ke() {
|
|
1028
1083
|
return !0;
|
1029
1084
|
}
|
1030
1085
|
requestMode(o, m) {
|
1031
|
-
const g = this._coreService.decPrivateModes, { activeProtocol: b, activeEncoding: A } = this._coreMouseService,
|
1032
|
-
return J =
|
1086
|
+
const g = this._coreService.decPrivateModes, { activeProtocol: b, activeEncoding: A } = this._coreMouseService, P = this._coreService, { buffers: W, cols: j } = this._bufferService, { active: z, alt: v } = W, F = this._optionsService.rawOptions, x = (te) => te ? 1 : 2, M = o.params[0];
|
1087
|
+
return J = M, Q = m ? M === 2 ? 4 : M === 4 ? x(P.modes.insertMode) : M === 12 ? 3 : M === 20 ? x(F.convertEol) : 0 : M === 1 ? x(g.applicationCursorKeys) : M === 3 ? F.windowOptions.setWinLines ? j === 80 ? 2 : j === 132 ? 1 : 0 : 0 : M === 6 ? x(g.origin) : M === 7 ? x(g.wraparound) : M === 8 ? 3 : M === 9 ? x(b === "X10") : M === 12 ? x(F.cursorBlink) : M === 25 ? x(!P.isCursorHidden) : M === 45 ? x(g.reverseWraparound) : M === 66 ? x(g.applicationKeypad) : M === 67 ? 4 : M === 1e3 ? x(b === "VT200") : M === 1002 ? x(b === "DRAG") : M === 1003 ? x(b === "ANY") : M === 1004 ? x(g.sendFocus) : M === 1005 ? 4 : M === 1006 ? x(A === "SGR") : M === 1015 ? 4 : M === 1016 ? x(A === "SGR_PIXELS") : M === 1048 ? 1 : M === 47 || M === 1047 || M === 1049 ? x(z === v) : M === 2004 ? x(g.bracketedPasteMode) : 0, P.triggerDataEvent(`${n.C0.ESC}[${m ? "" : "?"}${J};${Q}$y`), !0;
|
1033
1088
|
var J, Q;
|
1034
1089
|
}
|
1035
1090
|
_updateAttrColor(o, m, g, b, A) {
|
@@ -1037,20 +1092,20 @@ function ke() {
|
|
1037
1092
|
}
|
1038
1093
|
_extractColor(o, m, g) {
|
1039
1094
|
const b = [0, 0, -1, 0, 0, 0];
|
1040
|
-
let A = 0,
|
1095
|
+
let A = 0, P = 0;
|
1041
1096
|
do {
|
1042
|
-
if (b[
|
1043
|
-
const
|
1044
|
-
let
|
1097
|
+
if (b[P + A] = o.params[m + P], o.hasSubParams(m + P)) {
|
1098
|
+
const W = o.getSubParams(m + P);
|
1099
|
+
let j = 0;
|
1045
1100
|
do
|
1046
|
-
b[1] === 5 && (A = 1), b[
|
1047
|
-
while (++
|
1101
|
+
b[1] === 5 && (A = 1), b[P + j + 1 + A] = W[j];
|
1102
|
+
while (++j < W.length && j + P + 1 + A < b.length);
|
1048
1103
|
break;
|
1049
1104
|
}
|
1050
|
-
if (b[1] === 5 &&
|
1105
|
+
if (b[1] === 5 && P + A >= 2 || b[1] === 2 && P + A >= 5) break;
|
1051
1106
|
b[1] && (A = 1);
|
1052
|
-
} while (++
|
1053
|
-
for (let
|
1107
|
+
} while (++P + m < o.length && P + A < b.length);
|
1108
|
+
for (let W = 2; W < b.length; ++W) b[W] === -1 && (b[W] = 0);
|
1054
1109
|
switch (b[0]) {
|
1055
1110
|
case 38:
|
1056
1111
|
g.fg = this._updateAttrColor(g.fg, b[1], b[3], b[4], b[5]);
|
@@ -1061,7 +1116,7 @@ function ke() {
|
|
1061
1116
|
case 58:
|
1062
1117
|
g.extended = g.extended.clone(), g.extended.underlineColor = this._updateAttrColor(g.extended.underlineColor, b[1], b[3], b[4], b[5]);
|
1063
1118
|
}
|
1064
|
-
return
|
1119
|
+
return P;
|
1065
1120
|
}
|
1066
1121
|
_processUnderline(o, m) {
|
1067
1122
|
m.extended = m.extended.clone(), (!~o || o > 5) && (o = 1), m.extended.underlineStyle = o, m.fg |= 268435456, o === 0 && (m.fg &= -268435457), m.updateExtended();
|
@@ -1126,10 +1181,10 @@ function ke() {
|
|
1126
1181
|
const m = o.length > 1 ? o.params[1] : 0;
|
1127
1182
|
switch (o.params[0]) {
|
1128
1183
|
case 14:
|
1129
|
-
m !== 2 && this._onRequestWindowsOptionsReport.fire(
|
1184
|
+
m !== 2 && this._onRequestWindowsOptionsReport.fire(D.GET_WIN_SIZE_PIXELS);
|
1130
1185
|
break;
|
1131
1186
|
case 16:
|
1132
|
-
this._onRequestWindowsOptionsReport.fire(
|
1187
|
+
this._onRequestWindowsOptionsReport.fire(D.GET_CELL_SIZE_PIXELS);
|
1133
1188
|
break;
|
1134
1189
|
case 18:
|
1135
1190
|
this._bufferService && this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
|
@@ -1159,11 +1214,11 @@ function ke() {
|
|
1159
1214
|
for (; g.length > 1; ) {
|
1160
1215
|
const b = g.shift(), A = g.shift();
|
1161
1216
|
if (/^\d+$/.exec(b)) {
|
1162
|
-
const
|
1163
|
-
if (
|
1217
|
+
const P = parseInt(b);
|
1218
|
+
if (X(P)) if (A === "?") m.push({ type: 0, index: P });
|
1164
1219
|
else {
|
1165
|
-
const
|
1166
|
-
|
1220
|
+
const W = (0, T.parseColor)(A);
|
1221
|
+
W && m.push({ type: 1, index: P, color: W });
|
1167
1222
|
}
|
1168
1223
|
}
|
1169
1224
|
}
|
@@ -1177,7 +1232,7 @@ function ke() {
|
|
1177
1232
|
this._getCurrentLinkId() && this._finishHyperlink();
|
1178
1233
|
const g = o.split(":");
|
1179
1234
|
let b;
|
1180
|
-
const A = g.findIndex((
|
1235
|
+
const A = g.findIndex((P) => P.startsWith("id="));
|
1181
1236
|
return A !== -1 && (b = g[A].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: b, uri: m }), this._curAttrData.updateExtended(), !0;
|
1182
1237
|
}
|
1183
1238
|
_finishHyperlink() {
|
@@ -1187,7 +1242,7 @@ function ke() {
|
|
1187
1242
|
const g = o.split(";");
|
1188
1243
|
for (let b = 0; b < g.length && !(m >= this._specialColors.length); ++b, ++m) if (g[b] === "?") this._onColor.fire([{ type: 0, index: this._specialColors[m] }]);
|
1189
1244
|
else {
|
1190
|
-
const A = (0,
|
1245
|
+
const A = (0, T.parseColor)(g[b]);
|
1191
1246
|
A && this._onColor.fire([{ type: 1, index: this._specialColors[m], color: A }]);
|
1192
1247
|
}
|
1193
1248
|
return !0;
|
@@ -1206,7 +1261,7 @@ function ke() {
|
|
1206
1261
|
const m = [], g = o.split(";");
|
1207
1262
|
for (let b = 0; b < g.length; ++b) if (/^\d+$/.exec(g[b])) {
|
1208
1263
|
const A = parseInt(g[b]);
|
1209
|
-
|
1264
|
+
X(A) && m.push({ type: 2, index: A });
|
1210
1265
|
}
|
1211
1266
|
return m.length && this._onColor.fire(m), !0;
|
1212
1267
|
}
|
@@ -1229,10 +1284,10 @@ function ke() {
|
|
1229
1284
|
return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire(), !0;
|
1230
1285
|
}
|
1231
1286
|
selectDefaultCharset() {
|
1232
|
-
return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0,
|
1287
|
+
return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, c.DEFAULT_CHARSET), !0;
|
1233
1288
|
}
|
1234
1289
|
selectCharset(o) {
|
1235
|
-
return o.length !== 2 ? (this.selectDefaultCharset(), !0) : (o[0] === "/" || this._charsetService.setgCharset($[o[0]],
|
1290
|
+
return o.length !== 2 ? (this.selectDefaultCharset(), !0) : (o[0] === "/" || this._charsetService.setgCharset($[o[0]], c.CHARSETS[o[1]] || c.DEFAULT_CHARSET), !0);
|
1236
1291
|
}
|
1237
1292
|
index() {
|
1238
1293
|
return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), !0;
|
@@ -1277,7 +1332,7 @@ function ke() {
|
|
1277
1332
|
}
|
1278
1333
|
}
|
1279
1334
|
t.InputHandler = V;
|
1280
|
-
let
|
1335
|
+
let U = class {
|
1281
1336
|
constructor(H) {
|
1282
1337
|
this._bufferService = H, this.clearRange();
|
1283
1338
|
}
|
@@ -1294,10 +1349,10 @@ function ke() {
|
|
1294
1349
|
this.markRangeDirty(0, this._bufferService.rows - 1);
|
1295
1350
|
}
|
1296
1351
|
};
|
1297
|
-
function
|
1352
|
+
function X(H) {
|
1298
1353
|
return 0 <= H && H < 256;
|
1299
1354
|
}
|
1300
|
-
|
1355
|
+
U = d([_(0, p.IBufferService)], U);
|
1301
1356
|
}, 844: (w, t) => {
|
1302
1357
|
function l(d) {
|
1303
1358
|
for (const _ of d) _.dispose();
|
@@ -1370,9 +1425,9 @@ function ke() {
|
|
1370
1425
|
}
|
1371
1426
|
_process(a) {
|
1372
1427
|
this._idleCallback = void 0;
|
1373
|
-
let
|
1428
|
+
let h = 0, u = 0, e = a.timeRemaining(), r = 0;
|
1374
1429
|
for (; this._i < this._tasks.length; ) {
|
1375
|
-
if (
|
1430
|
+
if (h = Date.now(), this._tasks[this._i]() || this._i++, h = Math.max(1, Date.now() - h), u = Math.max(h, u), r = a.timeRemaining(), 1.5 * u > r) return e - h < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e - h))}ms`), void this._start();
|
1376
1431
|
e = r;
|
1377
1432
|
}
|
1378
1433
|
this.clear();
|
@@ -1386,23 +1441,23 @@ function ke() {
|
|
1386
1441
|
clearTimeout(a);
|
1387
1442
|
}
|
1388
1443
|
_createDeadline(a) {
|
1389
|
-
const
|
1390
|
-
return { timeRemaining: () => Math.max(0,
|
1444
|
+
const h = Date.now() + a;
|
1445
|
+
return { timeRemaining: () => Math.max(0, h - Date.now()) };
|
1391
1446
|
}
|
1392
1447
|
}
|
1393
1448
|
t.PriorityTaskQueue = n, t.IdleTaskQueue = !d.isNode && "requestIdleCallback" in window ? class extends _ {
|
1394
|
-
_requestCallback(
|
1395
|
-
return requestIdleCallback(
|
1449
|
+
_requestCallback(c) {
|
1450
|
+
return requestIdleCallback(c);
|
1396
1451
|
}
|
1397
|
-
_cancelCallback(
|
1398
|
-
cancelIdleCallback(
|
1452
|
+
_cancelCallback(c) {
|
1453
|
+
cancelIdleCallback(c);
|
1399
1454
|
}
|
1400
1455
|
} : n, t.DebouncedIdleTask = class {
|
1401
1456
|
constructor() {
|
1402
1457
|
this._queue = new t.IdleTaskQueue();
|
1403
1458
|
}
|
1404
|
-
set(
|
1405
|
-
this._queue.clear(), this._queue.enqueue(
|
1459
|
+
set(c) {
|
1460
|
+
this._queue.clear(), this._queue.enqueue(c);
|
1406
1461
|
}
|
1407
1462
|
flush() {
|
1408
1463
|
this._queue.flush();
|
@@ -1412,8 +1467,8 @@ function ke() {
|
|
1412
1467
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.updateWindowsModeWrappedState = void 0;
|
1413
1468
|
const d = l(643);
|
1414
1469
|
t.updateWindowsModeWrappedState = function(_) {
|
1415
|
-
const n = _.buffer.lines.get(_.buffer.ybase + _.buffer.y - 1),
|
1416
|
-
a &&
|
1470
|
+
const n = _.buffer.lines.get(_.buffer.ybase + _.buffer.y - 1), c = n?.get(_.cols - 1), a = _.buffer.lines.get(_.buffer.ybase + _.buffer.y);
|
1471
|
+
a && c && (a.isWrapped = c[d.CHAR_DATA_CODE_INDEX] !== d.NULL_CELL_CODE && c[d.CHAR_DATA_CODE_INDEX] !== d.WHITESPACE_CELL_CODE);
|
1417
1472
|
};
|
1418
1473
|
}, 734: (w, t) => {
|
1419
1474
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.ExtendedAttrs = t.AttributeData = void 0;
|
@@ -1580,8 +1635,8 @@ function ke() {
|
|
1580
1635
|
set underlineVariantOffset(n) {
|
1581
1636
|
this._ext &= 536870911, this._ext |= n << 29 & 3758096384;
|
1582
1637
|
}
|
1583
|
-
constructor(n = 0,
|
1584
|
-
this._ext = 0, this._urlId = 0, this._ext = n, this._urlId =
|
1638
|
+
constructor(n = 0, c = 0) {
|
1639
|
+
this._ext = 0, this._urlId = 0, this._ext = n, this._urlId = c;
|
1585
1640
|
}
|
1586
1641
|
clone() {
|
1587
1642
|
return new d(this._ext, this._urlId);
|
@@ -1593,10 +1648,10 @@ function ke() {
|
|
1593
1648
|
t.ExtendedAttrs = d;
|
1594
1649
|
}, 92: (w, t, l) => {
|
1595
1650
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.Buffer = t.MAX_BUFFER_SIZE = void 0;
|
1596
|
-
const d = l(349), _ = l(226), n = l(734),
|
1651
|
+
const d = l(349), _ = l(226), n = l(734), c = l(437), a = l(634), h = l(511), u = l(643), e = l(863), r = l(116);
|
1597
1652
|
t.MAX_BUFFER_SIZE = 4294967295, t.Buffer = class {
|
1598
1653
|
constructor(i, s, f) {
|
1599
|
-
this._hasScrollback = i, this._optionsService = s, this._bufferService = f, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData =
|
1654
|
+
this._hasScrollback = i, this._optionsService = s, this._bufferService = f, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = c.DEFAULT_ATTR_DATA.clone(), this.savedCharset = r.DEFAULT_CHARSET, this.markers = [], this._nullCell = h.CellData.fromCharData([0, u.NULL_CELL_CHAR, u.NULL_CELL_WIDTH, u.NULL_CELL_CODE]), this._whitespaceCell = h.CellData.fromCharData([0, u.WHITESPACE_CELL_CHAR, u.WHITESPACE_CELL_WIDTH, u.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new _.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new d.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
1600
1655
|
}
|
1601
1656
|
getNullCell(i) {
|
1602
1657
|
return i ? (this._nullCell.fg = i.fg, this._nullCell.bg = i.bg, this._nullCell.extended = i.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new n.ExtendedAttrs()), this._nullCell;
|
@@ -1605,7 +1660,7 @@ function ke() {
|
|
1605
1660
|
return i ? (this._whitespaceCell.fg = i.fg, this._whitespaceCell.bg = i.bg, this._whitespaceCell.extended = i.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new n.ExtendedAttrs()), this._whitespaceCell;
|
1606
1661
|
}
|
1607
1662
|
getBlankLine(i, s) {
|
1608
|
-
return new
|
1663
|
+
return new c.BufferLine(this._bufferService.cols, this.getNullCell(i), s);
|
1609
1664
|
}
|
1610
1665
|
get hasScrollback() {
|
1611
1666
|
return this._hasScrollback && this.lines.maxLength > this._rows;
|
@@ -1621,7 +1676,7 @@ function ke() {
|
|
1621
1676
|
}
|
1622
1677
|
fillViewportRows(i) {
|
1623
1678
|
if (this.lines.length === 0) {
|
1624
|
-
i === void 0 && (i =
|
1679
|
+
i === void 0 && (i = c.DEFAULT_ATTR_DATA);
|
1625
1680
|
let s = this._rows;
|
1626
1681
|
for (; s--; ) this.lines.push(this.getBlankLine(i));
|
1627
1682
|
}
|
@@ -1630,13 +1685,13 @@ function ke() {
|
|
1630
1685
|
this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new d.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
1631
1686
|
}
|
1632
1687
|
resize(i, s) {
|
1633
|
-
const f = this.getNullCell(
|
1688
|
+
const f = this.getNullCell(c.DEFAULT_ATTR_DATA);
|
1634
1689
|
let p = 0;
|
1635
1690
|
const S = this._getCorrectBufferLength(s);
|
1636
1691
|
if (S > this.lines.maxLength && (this.lines.maxLength = S), this.lines.length > 0) {
|
1637
1692
|
if (this._cols < i) for (let C = 0; C < this.lines.length; C++) p += +this.lines.get(C).resize(i, f);
|
1638
1693
|
let y = 0;
|
1639
|
-
if (this._rows < s) for (let C = this._rows; C < s; C++) this.lines.length < s + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new
|
1694
|
+
if (this._rows < s) for (let C = this._rows; C < s; C++) this.lines.length < s + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new c.BufferLine(i, f)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + y + 1 ? (this.ybase--, y++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new c.BufferLine(i, f)));
|
1640
1695
|
else for (let C = this._rows; C > s; C--) this.lines.length > s + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
|
1641
1696
|
if (S < this.lines.maxLength) {
|
1642
1697
|
const C = this.lines.length - S;
|
@@ -1662,68 +1717,68 @@ function ke() {
|
|
1662
1717
|
this._cols !== i && (i > this._cols ? this._reflowLarger(i, s) : this._reflowSmaller(i, s));
|
1663
1718
|
}
|
1664
1719
|
_reflowLarger(i, s) {
|
1665
|
-
const f = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols, i, this.ybase + this.y, this.getNullCell(
|
1720
|
+
const f = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols, i, this.ybase + this.y, this.getNullCell(c.DEFAULT_ATTR_DATA));
|
1666
1721
|
if (f.length > 0) {
|
1667
1722
|
const p = (0, a.reflowLargerCreateNewLayout)(this.lines, f);
|
1668
1723
|
(0, a.reflowLargerApplyNewLayout)(this.lines, p.layout), this._reflowLargerAdjustViewport(i, s, p.countRemoved);
|
1669
1724
|
}
|
1670
1725
|
}
|
1671
1726
|
_reflowLargerAdjustViewport(i, s, f) {
|
1672
|
-
const p = this.getNullCell(
|
1727
|
+
const p = this.getNullCell(c.DEFAULT_ATTR_DATA);
|
1673
1728
|
let S = f;
|
1674
|
-
for (; S-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < s && this.lines.push(new
|
1729
|
+
for (; S-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < s && this.lines.push(new c.BufferLine(i, p))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
|
1675
1730
|
this.savedY = Math.max(this.savedY - f, 0);
|
1676
1731
|
}
|
1677
1732
|
_reflowSmaller(i, s) {
|
1678
|
-
const f = this.getNullCell(
|
1733
|
+
const f = this.getNullCell(c.DEFAULT_ATTR_DATA), p = [];
|
1679
1734
|
let S = 0;
|
1680
1735
|
for (let y = this.lines.length - 1; y >= 0; y--) {
|
1681
1736
|
let C = this.lines.get(y);
|
1682
1737
|
if (!C || !C.isWrapped && C.getTrimmedLength() <= i) continue;
|
1683
|
-
const
|
1684
|
-
for (; C.isWrapped && y > 0; ) C = this.lines.get(--y),
|
1738
|
+
const T = [C];
|
1739
|
+
for (; C.isWrapped && y > 0; ) C = this.lines.get(--y), T.unshift(C);
|
1685
1740
|
const $ = this.ybase + this.y;
|
1686
|
-
if ($ >= y && $ < y +
|
1687
|
-
const E =
|
1741
|
+
if ($ >= y && $ < y + T.length) continue;
|
1742
|
+
const E = T[T.length - 1].getTrimmedLength(), B = (0, a.reflowSmallerGetNewLineLengths)(T, this._cols, i), D = B.length - T.length;
|
1688
1743
|
let G;
|
1689
|
-
G = this.ybase === 0 && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength +
|
1744
|
+
G = this.ybase === 0 && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + D) : Math.max(0, this.lines.length - this.lines.maxLength + D);
|
1690
1745
|
const V = [];
|
1691
|
-
for (let g = 0; g <
|
1692
|
-
const b = this.getBlankLine(
|
1746
|
+
for (let g = 0; g < D; g++) {
|
1747
|
+
const b = this.getBlankLine(c.DEFAULT_ATTR_DATA, !0);
|
1693
1748
|
V.push(b);
|
1694
1749
|
}
|
1695
|
-
V.length > 0 && (p.push({ start: y +
|
1696
|
-
let
|
1697
|
-
|
1698
|
-
let H =
|
1750
|
+
V.length > 0 && (p.push({ start: y + T.length + S, newLines: V }), S += V.length), T.push(...V);
|
1751
|
+
let U = B.length - 1, X = B[U];
|
1752
|
+
X === 0 && (U--, X = B[U]);
|
1753
|
+
let H = T.length - D - 1, o = E;
|
1699
1754
|
for (; H >= 0; ) {
|
1700
|
-
const g = Math.min(o,
|
1701
|
-
if (
|
1702
|
-
if (
|
1755
|
+
const g = Math.min(o, X);
|
1756
|
+
if (T[U] === void 0) break;
|
1757
|
+
if (T[U].copyCellsFrom(T[H], o - g, X - g, g, !0), X -= g, X === 0 && (U--, X = B[U]), o -= g, o === 0) {
|
1703
1758
|
H--;
|
1704
1759
|
const b = Math.max(H, 0);
|
1705
|
-
o = (0, a.getWrappedLineTrimmedLength)(
|
1760
|
+
o = (0, a.getWrappedLineTrimmedLength)(T, b, this._cols);
|
1706
1761
|
}
|
1707
1762
|
}
|
1708
|
-
for (let g = 0; g <
|
1709
|
-
let m =
|
1763
|
+
for (let g = 0; g < T.length; g++) B[g] < i && T[g].setCell(B[g], f);
|
1764
|
+
let m = D - G;
|
1710
1765
|
for (; m-- > 0; ) this.ybase === 0 ? this.y < s - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + S) - s && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
|
1711
|
-
this.savedY = Math.min(this.savedY +
|
1766
|
+
this.savedY = Math.min(this.savedY + D, this.ybase + s - 1);
|
1712
1767
|
}
|
1713
1768
|
if (p.length > 0) {
|
1714
1769
|
const y = [], C = [];
|
1715
|
-
for (let
|
1716
|
-
const
|
1717
|
-
let $ =
|
1770
|
+
for (let U = 0; U < this.lines.length; U++) C.push(this.lines.get(U));
|
1771
|
+
const T = this.lines.length;
|
1772
|
+
let $ = T - 1, E = 0, B = p[E];
|
1718
1773
|
this.lines.length = Math.min(this.lines.maxLength, this.lines.length + S);
|
1719
|
-
let
|
1720
|
-
for (let
|
1721
|
-
for (let
|
1722
|
-
|
1723
|
-
} else this.lines.set(
|
1774
|
+
let D = 0;
|
1775
|
+
for (let U = Math.min(this.lines.maxLength - 1, T + S - 1); U >= 0; U--) if (B && B.start > $ + D) {
|
1776
|
+
for (let X = B.newLines.length - 1; X >= 0; X--) this.lines.set(U--, B.newLines[X]);
|
1777
|
+
U++, y.push({ index: $ + 1, amount: B.newLines.length }), D += B.newLines.length, B = p[++E];
|
1778
|
+
} else this.lines.set(U, C[$--]);
|
1724
1779
|
let G = 0;
|
1725
|
-
for (let
|
1726
|
-
const V = Math.max(0,
|
1780
|
+
for (let U = y.length - 1; U >= 0; U--) y[U].index += G, this.lines.onInsertEmitter.fire(y[U]), G += y[U].amount;
|
1781
|
+
const V = Math.max(0, T + S - this.lines.maxLength);
|
1727
1782
|
V > 0 && this.lines.onTrimEmitter.fire(V);
|
1728
1783
|
}
|
1729
1784
|
}
|
@@ -1774,10 +1829,10 @@ function ke() {
|
|
1774
1829
|
};
|
1775
1830
|
}, 437: (w, t, l) => {
|
1776
1831
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.BufferLine = t.DEFAULT_ATTR_DATA = void 0;
|
1777
|
-
const d = l(734), _ = l(511), n = l(643),
|
1832
|
+
const d = l(734), _ = l(511), n = l(643), c = l(482);
|
1778
1833
|
t.DEFAULT_ATTR_DATA = Object.freeze(new d.AttributeData());
|
1779
1834
|
let a = 0;
|
1780
|
-
class
|
1835
|
+
class h {
|
1781
1836
|
constructor(e, r, i = !1) {
|
1782
1837
|
this.isWrapped = i, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e);
|
1783
1838
|
const s = r || _.CellData.fromCharData([0, n.NULL_CELL_CHAR, n.NULL_CELL_WIDTH, n.NULL_CELL_CODE]);
|
@@ -1786,7 +1841,7 @@ function ke() {
|
|
1786
1841
|
}
|
1787
1842
|
get(e) {
|
1788
1843
|
const r = this._data[3 * e + 0], i = 2097151 & r;
|
1789
|
-
return [this._data[3 * e + 1], 2097152 & r ? this._combined[e] : i ? (0,
|
1844
|
+
return [this._data[3 * e + 1], 2097152 & r ? this._combined[e] : i ? (0, c.stringFromCodePoint)(i) : "", r >> 22, 2097152 & r ? this._combined[e].charCodeAt(this._combined[e].length - 1) : i];
|
1790
1845
|
}
|
1791
1846
|
set(e, r) {
|
1792
1847
|
this._data[3 * e + 1] = r[n.CHAR_DATA_ATTR_INDEX], r[n.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e] = r[1], this._data[3 * e + 0] = 2097152 | e | r[n.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e + 0] = r[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | r[n.CHAR_DATA_WIDTH_INDEX] << 22;
|
@@ -1815,7 +1870,7 @@ function ke() {
|
|
1815
1870
|
}
|
1816
1871
|
getString(e) {
|
1817
1872
|
const r = this._data[3 * e + 0];
|
1818
|
-
return 2097152 & r ? this._combined[e] : 2097151 & r ? (0,
|
1873
|
+
return 2097152 & r ? this._combined[e] : 2097151 & r ? (0, c.stringFromCodePoint)(2097151 & r) : "";
|
1819
1874
|
}
|
1820
1875
|
isProtected(e) {
|
1821
1876
|
return 536870912 & this._data[3 * e + 2];
|
@@ -1831,7 +1886,7 @@ function ke() {
|
|
1831
1886
|
}
|
1832
1887
|
addCodepointToCell(e, r, i) {
|
1833
1888
|
let s = this._data[3 * e + 0];
|
1834
|
-
2097152 & s ? this._combined[e] += (0,
|
1889
|
+
2097152 & s ? this._combined[e] += (0, c.stringFromCodePoint)(r) : 2097151 & s ? (this._combined[e] = (0, c.stringFromCodePoint)(2097151 & s) + (0, c.stringFromCodePoint)(r), s &= -2097152, s |= 2097152) : s = r | 4194304, i && (s &= -12582913, s |= i << 22), this._data[3 * e + 0] = s;
|
1835
1890
|
}
|
1836
1891
|
insertCells(e, r, i) {
|
1837
1892
|
if ((e %= this.length) && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1, i), r < this.length - e) {
|
@@ -1900,7 +1955,7 @@ function ke() {
|
|
1900
1955
|
this.isWrapped = e.isWrapped;
|
1901
1956
|
}
|
1902
1957
|
clone() {
|
1903
|
-
const e = new
|
1958
|
+
const e = new h(0);
|
1904
1959
|
e._data = new Uint32Array(this._data), e.length = this.length;
|
1905
1960
|
for (const r in this._combined) e._combined[r] = this._combined[r];
|
1906
1961
|
for (const r in this._extendedAttrs) e._extendedAttrs[r] = this._extendedAttrs[r];
|
@@ -1934,79 +1989,79 @@ function ke() {
|
|
1934
1989
|
r = r ?? 0, i = i ?? this.length, e && (i = Math.min(i, this.getTrimmedLength())), s && (s.length = 0);
|
1935
1990
|
let f = "";
|
1936
1991
|
for (; r < i; ) {
|
1937
|
-
const p = this._data[3 * r + 0], S = 2097151 & p, y = 2097152 & p ? this._combined[r] : S ? (0,
|
1992
|
+
const p = this._data[3 * r + 0], S = 2097151 & p, y = 2097152 & p ? this._combined[r] : S ? (0, c.stringFromCodePoint)(S) : n.WHITESPACE_CELL_CHAR;
|
1938
1993
|
if (f += y, s) for (let C = 0; C < y.length; ++C) s.push(r);
|
1939
1994
|
r += p >> 22 || 1;
|
1940
1995
|
}
|
1941
1996
|
return s && s.push(r), f;
|
1942
1997
|
}
|
1943
1998
|
}
|
1944
|
-
t.BufferLine =
|
1999
|
+
t.BufferLine = h;
|
1945
2000
|
}, 634: (w, t) => {
|
1946
2001
|
function l(d, _, n) {
|
1947
2002
|
if (_ === d.length - 1) return d[_].getTrimmedLength();
|
1948
|
-
const
|
1949
|
-
return
|
2003
|
+
const c = !d[_].hasContent(n - 1) && d[_].getWidth(n - 1) === 1, a = d[_ + 1].getWidth(0) === 2;
|
2004
|
+
return c && a ? n - 1 : n;
|
1950
2005
|
}
|
1951
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), t.getWrappedLineTrimmedLength = t.reflowSmallerGetNewLineLengths = t.reflowLargerApplyNewLayout = t.reflowLargerCreateNewLayout = t.reflowLargerGetLinesToRemove = void 0, t.reflowLargerGetLinesToRemove = function(d, _, n,
|
1952
|
-
const
|
2006
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.getWrappedLineTrimmedLength = t.reflowSmallerGetNewLineLengths = t.reflowLargerApplyNewLayout = t.reflowLargerCreateNewLayout = t.reflowLargerGetLinesToRemove = void 0, t.reflowLargerGetLinesToRemove = function(d, _, n, c, a) {
|
2007
|
+
const h = [];
|
1953
2008
|
for (let u = 0; u < d.length - 1; u++) {
|
1954
2009
|
let e = u, r = d.get(++e);
|
1955
2010
|
if (!r.isWrapped) continue;
|
1956
2011
|
const i = [d.get(u)];
|
1957
2012
|
for (; e < d.length && r.isWrapped; ) i.push(r), r = d.get(++e);
|
1958
|
-
if (
|
2013
|
+
if (c >= u && c < e) {
|
1959
2014
|
u += i.length - 1;
|
1960
2015
|
continue;
|
1961
2016
|
}
|
1962
2017
|
let s = 0, f = l(i, s, _), p = 1, S = 0;
|
1963
2018
|
for (; p < i.length; ) {
|
1964
|
-
const C = l(i, p, _),
|
2019
|
+
const C = l(i, p, _), T = C - S, $ = n - f, E = Math.min(T, $);
|
1965
2020
|
i[s].copyCellsFrom(i[p], S, f, E, !1), f += E, f === n && (s++, f = 0), S += E, S === C && (p++, S = 0), f === 0 && s !== 0 && i[s - 1].getWidth(n - 1) === 2 && (i[s].copyCellsFrom(i[s - 1], n - 1, f++, 1, !1), i[s - 1].setCell(n - 1, a));
|
1966
2021
|
}
|
1967
2022
|
i[s].replaceCells(f, n, a);
|
1968
2023
|
let y = 0;
|
1969
2024
|
for (let C = i.length - 1; C > 0 && (C > s || i[C].getTrimmedLength() === 0); C--) y++;
|
1970
|
-
y > 0 && (
|
2025
|
+
y > 0 && (h.push(u + i.length - y), h.push(y)), u += i.length - 1;
|
1971
2026
|
}
|
1972
|
-
return
|
2027
|
+
return h;
|
1973
2028
|
}, t.reflowLargerCreateNewLayout = function(d, _) {
|
1974
2029
|
const n = [];
|
1975
|
-
let
|
2030
|
+
let c = 0, a = _[c], h = 0;
|
1976
2031
|
for (let u = 0; u < d.length; u++) if (a === u) {
|
1977
|
-
const e = _[++
|
1978
|
-
d.onDeleteEmitter.fire({ index: u -
|
2032
|
+
const e = _[++c];
|
2033
|
+
d.onDeleteEmitter.fire({ index: u - h, amount: e }), u += e - 1, h += e, a = _[++c];
|
1979
2034
|
} else n.push(u);
|
1980
|
-
return { layout: n, countRemoved:
|
2035
|
+
return { layout: n, countRemoved: h };
|
1981
2036
|
}, t.reflowLargerApplyNewLayout = function(d, _) {
|
1982
2037
|
const n = [];
|
1983
|
-
for (let
|
1984
|
-
for (let
|
2038
|
+
for (let c = 0; c < _.length; c++) n.push(d.get(_[c]));
|
2039
|
+
for (let c = 0; c < n.length; c++) d.set(c, n[c]);
|
1985
2040
|
d.length = _.length;
|
1986
2041
|
}, t.reflowSmallerGetNewLineLengths = function(d, _, n) {
|
1987
|
-
const
|
1988
|
-
let
|
2042
|
+
const c = [], a = d.map((r, i) => l(d, i, _)).reduce((r, i) => r + i);
|
2043
|
+
let h = 0, u = 0, e = 0;
|
1989
2044
|
for (; e < a; ) {
|
1990
2045
|
if (a - e < n) {
|
1991
|
-
|
2046
|
+
c.push(a - e);
|
1992
2047
|
break;
|
1993
2048
|
}
|
1994
|
-
|
2049
|
+
h += n;
|
1995
2050
|
const r = l(d, u, _);
|
1996
|
-
|
1997
|
-
const i = d[u].getWidth(
|
1998
|
-
i &&
|
2051
|
+
h > r && (h -= r, u++);
|
2052
|
+
const i = d[u].getWidth(h - 1) === 2;
|
2053
|
+
i && h--;
|
1999
2054
|
const s = i ? n - 1 : n;
|
2000
|
-
|
2055
|
+
c.push(s), e += s;
|
2001
2056
|
}
|
2002
|
-
return
|
2057
|
+
return c;
|
2003
2058
|
}, t.getWrappedLineTrimmedLength = l;
|
2004
2059
|
}, 295: (w, t, l) => {
|
2005
2060
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.BufferSet = void 0;
|
2006
2061
|
const d = l(460), _ = l(844), n = l(92);
|
2007
|
-
class
|
2008
|
-
constructor(
|
2009
|
-
super(), this._optionsService =
|
2062
|
+
class c extends _.Disposable {
|
2063
|
+
constructor(h, u) {
|
2064
|
+
super(), this._optionsService = h, this._bufferService = u, this._onBufferActivate = this.register(new d.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
|
2010
2065
|
}
|
2011
2066
|
reset() {
|
2012
2067
|
this._normal = new n.Buffer(!0, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new n.Buffer(!1, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
|
@@ -2023,27 +2078,27 @@ function ke() {
|
|
2023
2078
|
activateNormalBuffer() {
|
2024
2079
|
this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }));
|
2025
2080
|
}
|
2026
|
-
activateAltBuffer(
|
2027
|
-
this._activeBuffer !== this._alt && (this._alt.fillViewportRows(
|
2081
|
+
activateAltBuffer(h) {
|
2082
|
+
this._activeBuffer !== this._alt && (this._alt.fillViewportRows(h), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({ activeBuffer: this._alt, inactiveBuffer: this._normal }));
|
2028
2083
|
}
|
2029
|
-
resize(
|
2030
|
-
this._normal.resize(
|
2084
|
+
resize(h, u) {
|
2085
|
+
this._normal.resize(h, u), this._alt.resize(h, u), this.setupTabStops(h);
|
2031
2086
|
}
|
2032
|
-
setupTabStops(
|
2033
|
-
this._normal.setupTabStops(
|
2087
|
+
setupTabStops(h) {
|
2088
|
+
this._normal.setupTabStops(h), this._alt.setupTabStops(h);
|
2034
2089
|
}
|
2035
2090
|
}
|
2036
|
-
t.BufferSet =
|
2091
|
+
t.BufferSet = c;
|
2037
2092
|
}, 511: (w, t, l) => {
|
2038
2093
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CellData = void 0;
|
2039
2094
|
const d = l(482), _ = l(643), n = l(734);
|
2040
|
-
class
|
2095
|
+
class c extends n.AttributeData {
|
2041
2096
|
constructor() {
|
2042
2097
|
super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new n.ExtendedAttrs(), this.combinedData = "";
|
2043
2098
|
}
|
2044
|
-
static fromCharData(
|
2045
|
-
const u = new
|
2046
|
-
return u.setFromCharData(
|
2099
|
+
static fromCharData(h) {
|
2100
|
+
const u = new c();
|
2101
|
+
return u.setFromCharData(h), u;
|
2047
2102
|
}
|
2048
2103
|
isCombined() {
|
2049
2104
|
return 2097152 & this.content;
|
@@ -2057,24 +2112,24 @@ function ke() {
|
|
2057
2112
|
getCode() {
|
2058
2113
|
return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
|
2059
2114
|
}
|
2060
|
-
setFromCharData(
|
2061
|
-
this.fg =
|
2115
|
+
setFromCharData(h) {
|
2116
|
+
this.fg = h[_.CHAR_DATA_ATTR_INDEX], this.bg = 0;
|
2062
2117
|
let u = !1;
|
2063
|
-
if (
|
2064
|
-
else if (
|
2065
|
-
const e =
|
2118
|
+
if (h[_.CHAR_DATA_CHAR_INDEX].length > 2) u = !0;
|
2119
|
+
else if (h[_.CHAR_DATA_CHAR_INDEX].length === 2) {
|
2120
|
+
const e = h[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
|
2066
2121
|
if (55296 <= e && e <= 56319) {
|
2067
|
-
const r =
|
2068
|
-
56320 <= r && r <= 57343 ? this.content = 1024 * (e - 55296) + r - 56320 + 65536 |
|
2122
|
+
const r = h[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
|
2123
|
+
56320 <= r && r <= 57343 ? this.content = 1024 * (e - 55296) + r - 56320 + 65536 | h[_.CHAR_DATA_WIDTH_INDEX] << 22 : u = !0;
|
2069
2124
|
} else u = !0;
|
2070
|
-
} else this.content =
|
2071
|
-
u && (this.combinedData =
|
2125
|
+
} else this.content = h[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | h[_.CHAR_DATA_WIDTH_INDEX] << 22;
|
2126
|
+
u && (this.combinedData = h[_.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | h[_.CHAR_DATA_WIDTH_INDEX] << 22);
|
2072
2127
|
}
|
2073
2128
|
getAsCharData() {
|
2074
2129
|
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
|
2075
2130
|
}
|
2076
2131
|
}
|
2077
|
-
t.CellData =
|
2132
|
+
t.CellData = c;
|
2078
2133
|
}, 643: (w, t) => {
|
2079
2134
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
|
2080
2135
|
}, 863: (w, t, l) => {
|
@@ -2112,8 +2167,8 @@ function ke() {
|
|
2112
2167
|
return l > 65535 ? (l -= 65536, String.fromCharCode(55296 + (l >> 10)) + String.fromCharCode(l % 1024 + 56320)) : String.fromCharCode(l);
|
2113
2168
|
}, t.utf32ToString = function(l, d = 0, _ = l.length) {
|
2114
2169
|
let n = "";
|
2115
|
-
for (let
|
2116
|
-
let a = l[
|
2170
|
+
for (let c = d; c < _; ++c) {
|
2171
|
+
let a = l[c];
|
2117
2172
|
a > 65535 ? (a -= 65536, n += String.fromCharCode(55296 + (a >> 10)) + String.fromCharCode(a % 1024 + 56320)) : n += String.fromCharCode(a);
|
2118
2173
|
}
|
2119
2174
|
return n;
|
@@ -2127,18 +2182,18 @@ function ke() {
|
|
2127
2182
|
decode(l, d) {
|
2128
2183
|
const _ = l.length;
|
2129
2184
|
if (!_) return 0;
|
2130
|
-
let n = 0,
|
2185
|
+
let n = 0, c = 0;
|
2131
2186
|
if (this._interim) {
|
2132
|
-
const a = l.charCodeAt(
|
2187
|
+
const a = l.charCodeAt(c++);
|
2133
2188
|
56320 <= a && a <= 57343 ? d[n++] = 1024 * (this._interim - 55296) + a - 56320 + 65536 : (d[n++] = this._interim, d[n++] = a), this._interim = 0;
|
2134
2189
|
}
|
2135
|
-
for (let a =
|
2136
|
-
const
|
2137
|
-
if (55296 <=
|
2138
|
-
if (++a >= _) return this._interim =
|
2190
|
+
for (let a = c; a < _; ++a) {
|
2191
|
+
const h = l.charCodeAt(a);
|
2192
|
+
if (55296 <= h && h <= 56319) {
|
2193
|
+
if (++a >= _) return this._interim = h, n;
|
2139
2194
|
const u = l.charCodeAt(a);
|
2140
|
-
56320 <= u && u <= 57343 ? d[n++] = 1024 * (
|
2141
|
-
} else
|
2195
|
+
56320 <= u && u <= 57343 ? d[n++] = 1024 * (h - 55296) + u - 56320 + 65536 : (d[n++] = h, d[n++] = u);
|
2196
|
+
} else h !== 65279 && (d[n++] = h);
|
2142
2197
|
}
|
2143
2198
|
return n;
|
2144
2199
|
}
|
@@ -2152,14 +2207,14 @@ function ke() {
|
|
2152
2207
|
decode(l, d) {
|
2153
2208
|
const _ = l.length;
|
2154
2209
|
if (!_) return 0;
|
2155
|
-
let n,
|
2210
|
+
let n, c, a, h, u = 0, e = 0, r = 0;
|
2156
2211
|
if (this.interim[0]) {
|
2157
2212
|
let f = !1, p = this.interim[0];
|
2158
2213
|
p &= (224 & p) == 192 ? 31 : (240 & p) == 224 ? 15 : 7;
|
2159
2214
|
let S, y = 0;
|
2160
2215
|
for (; (S = 63 & this.interim[++y]) && y < 4; ) p <<= 6, p |= S;
|
2161
|
-
const C = (224 & this.interim[0]) == 192 ? 2 : (240 & this.interim[0]) == 224 ? 3 : 4,
|
2162
|
-
for (; r <
|
2216
|
+
const C = (224 & this.interim[0]) == 192 ? 2 : (240 & this.interim[0]) == 224 ? 3 : 4, T = C - y;
|
2217
|
+
for (; r < T; ) {
|
2163
2218
|
if (r >= _) return 0;
|
2164
2219
|
if (S = l[r++], (192 & S) != 128) {
|
2165
2220
|
r--, f = !0;
|
@@ -2172,49 +2227,49 @@ function ke() {
|
|
2172
2227
|
const i = _ - 4;
|
2173
2228
|
let s = r;
|
2174
2229
|
for (; s < _; ) {
|
2175
|
-
for (; !(!(s < i) || 128 & (n = l[s]) || 128 & (
|
2230
|
+
for (; !(!(s < i) || 128 & (n = l[s]) || 128 & (c = l[s + 1]) || 128 & (a = l[s + 2]) || 128 & (h = l[s + 3])); ) d[u++] = n, d[u++] = c, d[u++] = a, d[u++] = h, s += 4;
|
2176
2231
|
if (n = l[s++], n < 128) d[u++] = n;
|
2177
2232
|
else if ((224 & n) == 192) {
|
2178
2233
|
if (s >= _) return this.interim[0] = n, u;
|
2179
|
-
if (
|
2234
|
+
if (c = l[s++], (192 & c) != 128) {
|
2180
2235
|
s--;
|
2181
2236
|
continue;
|
2182
2237
|
}
|
2183
|
-
if (e = (31 & n) << 6 | 63 &
|
2238
|
+
if (e = (31 & n) << 6 | 63 & c, e < 128) {
|
2184
2239
|
s--;
|
2185
2240
|
continue;
|
2186
2241
|
}
|
2187
2242
|
d[u++] = e;
|
2188
2243
|
} else if ((240 & n) == 224) {
|
2189
2244
|
if (s >= _) return this.interim[0] = n, u;
|
2190
|
-
if (
|
2245
|
+
if (c = l[s++], (192 & c) != 128) {
|
2191
2246
|
s--;
|
2192
2247
|
continue;
|
2193
2248
|
}
|
2194
|
-
if (s >= _) return this.interim[0] = n, this.interim[1] =
|
2249
|
+
if (s >= _) return this.interim[0] = n, this.interim[1] = c, u;
|
2195
2250
|
if (a = l[s++], (192 & a) != 128) {
|
2196
2251
|
s--;
|
2197
2252
|
continue;
|
2198
2253
|
}
|
2199
|
-
if (e = (15 & n) << 12 | (63 &
|
2254
|
+
if (e = (15 & n) << 12 | (63 & c) << 6 | 63 & a, e < 2048 || e >= 55296 && e <= 57343 || e === 65279) continue;
|
2200
2255
|
d[u++] = e;
|
2201
2256
|
} else if ((248 & n) == 240) {
|
2202
2257
|
if (s >= _) return this.interim[0] = n, u;
|
2203
|
-
if (
|
2258
|
+
if (c = l[s++], (192 & c) != 128) {
|
2204
2259
|
s--;
|
2205
2260
|
continue;
|
2206
2261
|
}
|
2207
|
-
if (s >= _) return this.interim[0] = n, this.interim[1] =
|
2262
|
+
if (s >= _) return this.interim[0] = n, this.interim[1] = c, u;
|
2208
2263
|
if (a = l[s++], (192 & a) != 128) {
|
2209
2264
|
s--;
|
2210
2265
|
continue;
|
2211
2266
|
}
|
2212
|
-
if (s >= _) return this.interim[0] = n, this.interim[1] =
|
2213
|
-
if (
|
2267
|
+
if (s >= _) return this.interim[0] = n, this.interim[1] = c, this.interim[2] = a, u;
|
2268
|
+
if (h = l[s++], (192 & h) != 128) {
|
2214
2269
|
s--;
|
2215
2270
|
continue;
|
2216
2271
|
}
|
2217
|
-
if (e = (7 & n) << 18 | (63 &
|
2272
|
+
if (e = (7 & n) << 18 | (63 & c) << 12 | (63 & a) << 6 | 63 & h, e < 65536 || e > 1114111) continue;
|
2218
2273
|
d[u++] = e;
|
2219
2274
|
}
|
2220
2275
|
}
|
@@ -2224,30 +2279,30 @@ function ke() {
|
|
2224
2279
|
}, 225: (w, t, l) => {
|
2225
2280
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.UnicodeV6 = void 0;
|
2226
2281
|
const d = l(480), _ = [[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]];
|
2227
|
-
let
|
2282
|
+
let c;
|
2228
2283
|
t.UnicodeV6 = class {
|
2229
2284
|
constructor() {
|
2230
|
-
if (this.version = "6", !
|
2231
|
-
|
2232
|
-
for (let a = 0; a < _.length; ++a)
|
2285
|
+
if (this.version = "6", !c) {
|
2286
|
+
c = new Uint8Array(65536), c.fill(1), c[0] = 0, c.fill(0, 1, 32), c.fill(0, 127, 160), c.fill(2, 4352, 4448), c[9001] = 2, c[9002] = 2, c.fill(2, 11904, 42192), c[12351] = 1, c.fill(2, 44032, 55204), c.fill(2, 63744, 64256), c.fill(2, 65040, 65050), c.fill(2, 65072, 65136), c.fill(2, 65280, 65377), c.fill(2, 65504, 65511);
|
2287
|
+
for (let a = 0; a < _.length; ++a) c.fill(0, _[a][0], _[a][1] + 1);
|
2233
2288
|
}
|
2234
2289
|
}
|
2235
2290
|
wcwidth(a) {
|
2236
|
-
return a < 32 ? 0 : a < 127 ? 1 : a < 65536 ?
|
2291
|
+
return a < 32 ? 0 : a < 127 ? 1 : a < 65536 ? c[a] : function(h, u) {
|
2237
2292
|
let e, r = 0, i = u.length - 1;
|
2238
|
-
if (
|
2239
|
-
for (; i >= r; ) if (e = r + i >> 1,
|
2293
|
+
if (h < u[0][0] || h > u[i][1]) return !1;
|
2294
|
+
for (; i >= r; ) if (e = r + i >> 1, h > u[e][1]) r = e + 1;
|
2240
2295
|
else {
|
2241
|
-
if (!(
|
2296
|
+
if (!(h < u[e][0])) return !0;
|
2242
2297
|
i = e - 1;
|
2243
2298
|
}
|
2244
2299
|
return !1;
|
2245
2300
|
}(a, n) ? 0 : a >= 131072 && a <= 196605 || a >= 196608 && a <= 262141 ? 2 : 1;
|
2246
2301
|
}
|
2247
|
-
charProperties(a,
|
2248
|
-
let u = this.wcwidth(a), e = u === 0 &&
|
2302
|
+
charProperties(a, h) {
|
2303
|
+
let u = this.wcwidth(a), e = u === 0 && h !== 0;
|
2249
2304
|
if (e) {
|
2250
|
-
const r = d.UnicodeService.extractWidth(
|
2305
|
+
const r = d.UnicodeService.extractWidth(h);
|
2251
2306
|
r === 0 ? e = !1 : r > u && (u = r);
|
2252
2307
|
}
|
2253
2308
|
return d.UnicodeService.createPropertyValue(0, u, e);
|
@@ -2263,8 +2318,8 @@ function ke() {
|
|
2263
2318
|
handleUserInput() {
|
2264
2319
|
this._didUserInput = !0;
|
2265
2320
|
}
|
2266
|
-
writeSync(a,
|
2267
|
-
if (
|
2321
|
+
writeSync(a, h) {
|
2322
|
+
if (h !== void 0 && this._syncCalls > h) return void (this._syncCalls = 0);
|
2268
2323
|
if (this._pendingData += a.length, this._writeBuffer.push(a), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
|
2269
2324
|
let u;
|
2270
2325
|
for (this._isSyncWriting = !0; u = this._writeBuffer.shift(); ) {
|
@@ -2274,18 +2329,18 @@ function ke() {
|
|
2274
2329
|
}
|
2275
2330
|
this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = !1, this._syncCalls = 0;
|
2276
2331
|
}
|
2277
|
-
write(a,
|
2332
|
+
write(a, h) {
|
2278
2333
|
if (this._pendingData > 5e7) throw new Error("write data discarded, use flow control to avoid losing data");
|
2279
2334
|
if (!this._writeBuffer.length) {
|
2280
|
-
if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = !1, this._pendingData += a.length, this._writeBuffer.push(a), this._callbacks.push(
|
2335
|
+
if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = !1, this._pendingData += a.length, this._writeBuffer.push(a), this._callbacks.push(h), void this._innerWrite();
|
2281
2336
|
setTimeout(() => this._innerWrite());
|
2282
2337
|
}
|
2283
|
-
this._pendingData += a.length, this._writeBuffer.push(a), this._callbacks.push(
|
2338
|
+
this._pendingData += a.length, this._writeBuffer.push(a), this._callbacks.push(h);
|
2284
2339
|
}
|
2285
|
-
_innerWrite(a = 0,
|
2340
|
+
_innerWrite(a = 0, h = !0) {
|
2286
2341
|
const u = a || Date.now();
|
2287
2342
|
for (; this._writeBuffer.length > this._bufferOffset; ) {
|
2288
|
-
const e = this._writeBuffer[this._bufferOffset], r = this._action(e,
|
2343
|
+
const e = this._writeBuffer[this._bufferOffset], r = this._action(e, h);
|
2289
2344
|
if (r) {
|
2290
2345
|
const s = (f) => Date.now() - u >= 12 ? setTimeout(() => this._innerWrite(0, f)) : this._innerWrite(u, f);
|
2291
2346
|
return void r.catch((f) => (queueMicrotask(() => {
|
@@ -2302,114 +2357,114 @@ function ke() {
|
|
2302
2357
|
}, 941: (w, t) => {
|
2303
2358
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.toRgbString = t.parseColor = void 0;
|
2304
2359
|
const l = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, d = /^[\da-f]+$/;
|
2305
|
-
function _(n,
|
2306
|
-
const a = n.toString(16),
|
2307
|
-
switch (
|
2360
|
+
function _(n, c) {
|
2361
|
+
const a = n.toString(16), h = a.length < 2 ? "0" + a : a;
|
2362
|
+
switch (c) {
|
2308
2363
|
case 4:
|
2309
2364
|
return a[0];
|
2310
2365
|
case 8:
|
2311
|
-
return
|
2366
|
+
return h;
|
2312
2367
|
case 12:
|
2313
|
-
return (
|
2368
|
+
return (h + h).slice(0, 3);
|
2314
2369
|
default:
|
2315
|
-
return
|
2370
|
+
return h + h;
|
2316
2371
|
}
|
2317
2372
|
}
|
2318
2373
|
t.parseColor = function(n) {
|
2319
2374
|
if (!n) return;
|
2320
|
-
let
|
2321
|
-
if (
|
2322
|
-
|
2323
|
-
const a = l.exec(
|
2375
|
+
let c = n.toLowerCase();
|
2376
|
+
if (c.indexOf("rgb:") === 0) {
|
2377
|
+
c = c.slice(4);
|
2378
|
+
const a = l.exec(c);
|
2324
2379
|
if (a) {
|
2325
|
-
const
|
2326
|
-
return [Math.round(parseInt(a[1] || a[4] || a[7] || a[10], 16) /
|
2380
|
+
const h = a[1] ? 15 : a[4] ? 255 : a[7] ? 4095 : 65535;
|
2381
|
+
return [Math.round(parseInt(a[1] || a[4] || a[7] || a[10], 16) / h * 255), Math.round(parseInt(a[2] || a[5] || a[8] || a[11], 16) / h * 255), Math.round(parseInt(a[3] || a[6] || a[9] || a[12], 16) / h * 255)];
|
2327
2382
|
}
|
2328
|
-
} else if (
|
2329
|
-
const a =
|
2383
|
+
} else if (c.indexOf("#") === 0 && (c = c.slice(1), d.exec(c) && [3, 6, 9, 12].includes(c.length))) {
|
2384
|
+
const a = c.length / 3, h = [0, 0, 0];
|
2330
2385
|
for (let u = 0; u < 3; ++u) {
|
2331
|
-
const e = parseInt(
|
2332
|
-
|
2386
|
+
const e = parseInt(c.slice(a * u, a * u + a), 16);
|
2387
|
+
h[u] = a === 1 ? e << 4 : a === 2 ? e : a === 3 ? e >> 4 : e >> 8;
|
2333
2388
|
}
|
2334
|
-
return
|
2389
|
+
return h;
|
2335
2390
|
}
|
2336
|
-
}, t.toRgbString = function(n,
|
2337
|
-
const [a,
|
2338
|
-
return `rgb:${_(a,
|
2391
|
+
}, t.toRgbString = function(n, c = 16) {
|
2392
|
+
const [a, h, u] = n;
|
2393
|
+
return `rgb:${_(a, c)}/${_(h, c)}/${_(u, c)}`;
|
2339
2394
|
};
|
2340
2395
|
}, 770: (w, t) => {
|
2341
2396
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.PAYLOAD_LIMIT = void 0, t.PAYLOAD_LIMIT = 1e7;
|
2342
2397
|
}, 351: (w, t, l) => {
|
2343
2398
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.DcsHandler = t.DcsParser = void 0;
|
2344
|
-
const d = l(482), _ = l(742), n = l(770),
|
2399
|
+
const d = l(482), _ = l(742), n = l(770), c = [];
|
2345
2400
|
t.DcsParser = class {
|
2346
2401
|
constructor() {
|
2347
|
-
this._handlers = /* @__PURE__ */ Object.create(null), this._active =
|
2402
|
+
this._handlers = /* @__PURE__ */ Object.create(null), this._active = c, this._ident = 0, this._handlerFb = () => {
|
2348
2403
|
}, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
|
2349
2404
|
}
|
2350
2405
|
dispose() {
|
2351
2406
|
this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
2352
|
-
}, this._active =
|
2407
|
+
}, this._active = c;
|
2353
2408
|
}
|
2354
|
-
registerHandler(
|
2355
|
-
this._handlers[
|
2356
|
-
const e = this._handlers[
|
2409
|
+
registerHandler(h, u) {
|
2410
|
+
this._handlers[h] === void 0 && (this._handlers[h] = []);
|
2411
|
+
const e = this._handlers[h];
|
2357
2412
|
return e.push(u), { dispose: () => {
|
2358
2413
|
const r = e.indexOf(u);
|
2359
2414
|
r !== -1 && e.splice(r, 1);
|
2360
2415
|
} };
|
2361
2416
|
}
|
2362
|
-
clearHandler(
|
2363
|
-
this._handlers[
|
2417
|
+
clearHandler(h) {
|
2418
|
+
this._handlers[h] && delete this._handlers[h];
|
2364
2419
|
}
|
2365
|
-
setHandlerFallback(
|
2366
|
-
this._handlerFb =
|
2420
|
+
setHandlerFallback(h) {
|
2421
|
+
this._handlerFb = h;
|
2367
2422
|
}
|
2368
2423
|
reset() {
|
2369
|
-
if (this._active.length) for (let
|
2370
|
-
this._stack.paused = !1, this._active =
|
2424
|
+
if (this._active.length) for (let h = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; h >= 0; --h) this._active[h].unhook(!1);
|
2425
|
+
this._stack.paused = !1, this._active = c, this._ident = 0;
|
2371
2426
|
}
|
2372
|
-
hook(
|
2373
|
-
if (this.reset(), this._ident =
|
2427
|
+
hook(h, u) {
|
2428
|
+
if (this.reset(), this._ident = h, this._active = this._handlers[h] || c, this._active.length) for (let e = this._active.length - 1; e >= 0; e--) this._active[e].hook(u);
|
2374
2429
|
else this._handlerFb(this._ident, "HOOK", u);
|
2375
2430
|
}
|
2376
|
-
put(
|
2377
|
-
if (this._active.length) for (let r = this._active.length - 1; r >= 0; r--) this._active[r].put(
|
2378
|
-
else this._handlerFb(this._ident, "PUT", (0, d.utf32ToString)(
|
2431
|
+
put(h, u, e) {
|
2432
|
+
if (this._active.length) for (let r = this._active.length - 1; r >= 0; r--) this._active[r].put(h, u, e);
|
2433
|
+
else this._handlerFb(this._ident, "PUT", (0, d.utf32ToString)(h, u, e));
|
2379
2434
|
}
|
2380
|
-
unhook(
|
2435
|
+
unhook(h, u = !0) {
|
2381
2436
|
if (this._active.length) {
|
2382
2437
|
let e = !1, r = this._active.length - 1, i = !1;
|
2383
2438
|
if (this._stack.paused && (r = this._stack.loopPosition - 1, e = u, i = this._stack.fallThrough, this._stack.paused = !1), !i && e === !1) {
|
2384
|
-
for (; r >= 0 && (e = this._active[r].unhook(
|
2439
|
+
for (; r >= 0 && (e = this._active[r].unhook(h), e !== !0); r--) if (e instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = r, this._stack.fallThrough = !1, e;
|
2385
2440
|
r--;
|
2386
2441
|
}
|
2387
2442
|
for (; r >= 0; r--) if (e = this._active[r].unhook(!1), e instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = r, this._stack.fallThrough = !0, e;
|
2388
|
-
} else this._handlerFb(this._ident, "UNHOOK",
|
2389
|
-
this._active =
|
2443
|
+
} else this._handlerFb(this._ident, "UNHOOK", h);
|
2444
|
+
this._active = c, this._ident = 0;
|
2390
2445
|
}
|
2391
2446
|
};
|
2392
2447
|
const a = new _.Params();
|
2393
2448
|
a.addParam(0), t.DcsHandler = class {
|
2394
|
-
constructor(
|
2395
|
-
this._handler =
|
2449
|
+
constructor(h) {
|
2450
|
+
this._handler = h, this._data = "", this._params = a, this._hitLimit = !1;
|
2396
2451
|
}
|
2397
|
-
hook(
|
2398
|
-
this._params =
|
2452
|
+
hook(h) {
|
2453
|
+
this._params = h.length > 1 || h.params[0] ? h.clone() : a, this._data = "", this._hitLimit = !1;
|
2399
2454
|
}
|
2400
|
-
put(
|
2401
|
-
this._hitLimit || (this._data += (0, d.utf32ToString)(
|
2455
|
+
put(h, u, e) {
|
2456
|
+
this._hitLimit || (this._data += (0, d.utf32ToString)(h, u, e), this._data.length > n.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
|
2402
2457
|
}
|
2403
|
-
unhook(
|
2458
|
+
unhook(h) {
|
2404
2459
|
let u = !1;
|
2405
2460
|
if (this._hitLimit) u = !1;
|
2406
|
-
else if (
|
2461
|
+
else if (h && (u = this._handler(this._data, this._params), u instanceof Promise)) return u.then((e) => (this._params = a, this._data = "", this._hitLimit = !1, e));
|
2407
2462
|
return this._params = a, this._data = "", this._hitLimit = !1, u;
|
2408
2463
|
}
|
2409
2464
|
};
|
2410
2465
|
}, 15: (w, t, l) => {
|
2411
2466
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.EscapeSequenceParser = t.VT500_TRANSITION_TABLE = t.TransitionTable = void 0;
|
2412
|
-
const d = l(844), _ = l(742), n = l(242),
|
2467
|
+
const d = l(844), _ = l(742), n = l(242), c = l(351);
|
2413
2468
|
class a {
|
2414
2469
|
constructor(r) {
|
2415
2470
|
this.table = new Uint8Array(r);
|
@@ -2425,14 +2480,14 @@ function ke() {
|
|
2425
2480
|
}
|
2426
2481
|
}
|
2427
2482
|
t.TransitionTable = a;
|
2428
|
-
const
|
2483
|
+
const h = 160;
|
2429
2484
|
t.VT500_TRANSITION_TABLE = function() {
|
2430
2485
|
const e = new a(4095), r = Array.apply(null, Array(256)).map((y, C) => C), i = (y, C) => r.slice(y, C), s = i(32, 127), f = i(0, 24);
|
2431
2486
|
f.push(25), f.push.apply(f, i(28, 32));
|
2432
2487
|
const p = i(0, 14);
|
2433
2488
|
let S;
|
2434
2489
|
for (S in e.setDefault(1, 0), e.addMany(s, 0, 2, 0), p) e.addMany([24, 26, 153, 154], S, 3, 0), e.addMany(i(128, 144), S, 3, 0), e.addMany(i(144, 152), S, 3, 0), e.add(156, S, 0, 0), e.add(27, S, 11, 1), e.add(157, S, 4, 8), e.addMany([152, 158, 159], S, 0, 7), e.add(155, S, 11, 3), e.add(144, S, 11, 9);
|
2435
|
-
return e.addMany(f, 0, 3, 0), e.addMany(f, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(f, 8, 0, 8), e.addMany(f, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(f, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(f, 6, 3, 6), e.addMany(f, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(f, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(s, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(s, 7, 0, 7), e.addMany(f, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(f, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(f, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(f, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(f, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(f, 13, 13, 13), e.addMany(s, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(
|
2490
|
+
return e.addMany(f, 0, 3, 0), e.addMany(f, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(f, 8, 0, 8), e.addMany(f, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(f, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(f, 6, 3, 6), e.addMany(f, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(f, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(s, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(s, 7, 0, 7), e.addMany(f, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(f, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(f, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(f, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(f, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(f, 13, 13, 13), e.addMany(s, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(h, 0, 2, 0), e.add(h, 8, 5, 8), e.add(h, 6, 0, 6), e.add(h, 11, 0, 11), e.add(h, 13, 13, 13), e;
|
2436
2491
|
}();
|
2437
2492
|
class u extends d.Disposable {
|
2438
2493
|
constructor(r = t.VT500_TRANSITION_TABLE) {
|
@@ -2442,7 +2497,7 @@ function ke() {
|
|
2442
2497
|
}, this._escHandlerFb = (i) => {
|
2443
2498
|
}, this._errorHandlerFb = (i) => i, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, d.toDisposable)(() => {
|
2444
2499
|
this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
|
2445
|
-
})), this._oscParser = this.register(new n.OscParser()), this._dcsParser = this.register(new
|
2500
|
+
})), this._oscParser = this.register(new n.OscParser()), this._dcsParser = this.register(new c.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => !0);
|
2446
2501
|
}
|
2447
2502
|
_identifier(r, i = [64, 126]) {
|
2448
2503
|
let s = 0;
|
@@ -2549,17 +2604,17 @@ function ke() {
|
|
2549
2604
|
else {
|
2550
2605
|
if (s === void 0 || this._parseStack.state === 1) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
|
2551
2606
|
const C = this._parseStack.handlers;
|
2552
|
-
let
|
2607
|
+
let T = this._parseStack.handlerPos - 1;
|
2553
2608
|
switch (this._parseStack.state) {
|
2554
2609
|
case 3:
|
2555
|
-
if (s === !1 &&
|
2556
|
-
for (;
|
2610
|
+
if (s === !1 && T > -1) {
|
2611
|
+
for (; T >= 0 && (f = C[T](this._params), f !== !0); T--) if (f instanceof Promise) return this._parseStack.handlerPos = T, f;
|
2557
2612
|
}
|
2558
2613
|
this._parseStack.handlers = [];
|
2559
2614
|
break;
|
2560
2615
|
case 4:
|
2561
|
-
if (s === !1 &&
|
2562
|
-
for (;
|
2616
|
+
if (s === !1 && T > -1) {
|
2617
|
+
for (; T >= 0 && (f = C[T](), f !== !0); T--) if (f instanceof Promise) return this._parseStack.handlerPos = T, f;
|
2563
2618
|
}
|
2564
2619
|
this._parseStack.handlers = [];
|
2565
2620
|
break;
|
@@ -2574,23 +2629,23 @@ function ke() {
|
|
2574
2629
|
this._parseStack.state = 0, y = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
|
2575
2630
|
}
|
2576
2631
|
for (let C = y; C < i; ++C) {
|
2577
|
-
switch (p = r[C], S = this._transitions.table[this.currentState << 8 | (p < 160 ? p :
|
2632
|
+
switch (p = r[C], S = this._transitions.table[this.currentState << 8 | (p < 160 ? p : h)], S >> 4) {
|
2578
2633
|
case 2:
|
2579
|
-
for (let
|
2580
|
-
if (
|
2581
|
-
this._printHandler(r, C,
|
2634
|
+
for (let D = C + 1; ; ++D) {
|
2635
|
+
if (D >= i || (p = r[D]) < 32 || p > 126 && p < h) {
|
2636
|
+
this._printHandler(r, C, D), C = D - 1;
|
2582
2637
|
break;
|
2583
2638
|
}
|
2584
|
-
if (++
|
2585
|
-
this._printHandler(r, C,
|
2639
|
+
if (++D >= i || (p = r[D]) < 32 || p > 126 && p < h) {
|
2640
|
+
this._printHandler(r, C, D), C = D - 1;
|
2586
2641
|
break;
|
2587
2642
|
}
|
2588
|
-
if (++
|
2589
|
-
this._printHandler(r, C,
|
2643
|
+
if (++D >= i || (p = r[D]) < 32 || p > 126 && p < h) {
|
2644
|
+
this._printHandler(r, C, D), C = D - 1;
|
2590
2645
|
break;
|
2591
2646
|
}
|
2592
|
-
if (++
|
2593
|
-
this._printHandler(r, C,
|
2647
|
+
if (++D >= i || (p = r[D]) < 32 || p > 126 && p < h) {
|
2648
|
+
this._printHandler(r, C, D), C = D - 1;
|
2594
2649
|
break;
|
2595
2650
|
}
|
2596
2651
|
}
|
@@ -2604,9 +2659,9 @@ function ke() {
|
|
2604
2659
|
if (this._errorHandler({ position: C, code: p, currentState: this.currentState, collect: this._collect, params: this._params, abort: !1 }).abort) return;
|
2605
2660
|
break;
|
2606
2661
|
case 7:
|
2607
|
-
const
|
2608
|
-
let $ =
|
2609
|
-
for (; $ >= 0 && (f =
|
2662
|
+
const T = this._csiHandlers[this._collect << 8 | p];
|
2663
|
+
let $ = T ? T.length - 1 : -1;
|
2664
|
+
for (; $ >= 0 && (f = T[$](this._params), f !== !0); $--) if (f instanceof Promise) return this._preserveStack(3, T, $, S, C), f;
|
2610
2665
|
$ < 0 && this._csiHandlerFb(this._collect << 8 | p, this._params), this.precedingJoinState = 0;
|
2611
2666
|
break;
|
2612
2667
|
case 8:
|
@@ -2640,8 +2695,8 @@ function ke() {
|
|
2640
2695
|
this._dcsParser.hook(this._collect << 8 | p, this._params);
|
2641
2696
|
break;
|
2642
2697
|
case 13:
|
2643
|
-
for (let
|
2644
|
-
this._dcsParser.put(r, C,
|
2698
|
+
for (let D = C + 1; ; ++D) if (D >= i || (p = r[D]) === 24 || p === 26 || p === 27 || p > 127 && p < h) {
|
2699
|
+
this._dcsParser.put(r, C, D), C = D - 1;
|
2645
2700
|
break;
|
2646
2701
|
}
|
2647
2702
|
break;
|
@@ -2653,8 +2708,8 @@ function ke() {
|
|
2653
2708
|
this._oscParser.start();
|
2654
2709
|
break;
|
2655
2710
|
case 5:
|
2656
|
-
for (let
|
2657
|
-
this._oscParser.put(r, C,
|
2711
|
+
for (let D = C + 1; ; D++) if (D >= i || (p = r[D]) < 32 || p > 127 && p < h) {
|
2712
|
+
this._oscParser.put(r, C, D), C = D - 1;
|
2658
2713
|
break;
|
2659
2714
|
}
|
2660
2715
|
break;
|
@@ -2675,43 +2730,43 @@ function ke() {
|
|
2675
2730
|
this._state = 0, this._active = n, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
2676
2731
|
}, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
|
2677
2732
|
}
|
2678
|
-
registerHandler(
|
2679
|
-
this._handlers[
|
2680
|
-
const
|
2681
|
-
return
|
2682
|
-
const u =
|
2683
|
-
u !== -1 &&
|
2733
|
+
registerHandler(c, a) {
|
2734
|
+
this._handlers[c] === void 0 && (this._handlers[c] = []);
|
2735
|
+
const h = this._handlers[c];
|
2736
|
+
return h.push(a), { dispose: () => {
|
2737
|
+
const u = h.indexOf(a);
|
2738
|
+
u !== -1 && h.splice(u, 1);
|
2684
2739
|
} };
|
2685
2740
|
}
|
2686
|
-
clearHandler(
|
2687
|
-
this._handlers[
|
2741
|
+
clearHandler(c) {
|
2742
|
+
this._handlers[c] && delete this._handlers[c];
|
2688
2743
|
}
|
2689
|
-
setHandlerFallback(
|
2690
|
-
this._handlerFb =
|
2744
|
+
setHandlerFallback(c) {
|
2745
|
+
this._handlerFb = c;
|
2691
2746
|
}
|
2692
2747
|
dispose() {
|
2693
2748
|
this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
2694
2749
|
}, this._active = n;
|
2695
2750
|
}
|
2696
2751
|
reset() {
|
2697
|
-
if (this._state === 2) for (let
|
2752
|
+
if (this._state === 2) for (let c = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; c >= 0; --c) this._active[c].end(!1);
|
2698
2753
|
this._stack.paused = !1, this._active = n, this._id = -1, this._state = 0;
|
2699
2754
|
}
|
2700
2755
|
_start() {
|
2701
|
-
if (this._active = this._handlers[this._id] || n, this._active.length) for (let
|
2756
|
+
if (this._active = this._handlers[this._id] || n, this._active.length) for (let c = this._active.length - 1; c >= 0; c--) this._active[c].start();
|
2702
2757
|
else this._handlerFb(this._id, "START");
|
2703
2758
|
}
|
2704
|
-
_put(
|
2705
|
-
if (this._active.length) for (let u = this._active.length - 1; u >= 0; u--) this._active[u].put(
|
2706
|
-
else this._handlerFb(this._id, "PUT", (0, _.utf32ToString)(
|
2759
|
+
_put(c, a, h) {
|
2760
|
+
if (this._active.length) for (let u = this._active.length - 1; u >= 0; u--) this._active[u].put(c, a, h);
|
2761
|
+
else this._handlerFb(this._id, "PUT", (0, _.utf32ToString)(c, a, h));
|
2707
2762
|
}
|
2708
2763
|
start() {
|
2709
2764
|
this.reset(), this._state = 1;
|
2710
2765
|
}
|
2711
|
-
put(
|
2766
|
+
put(c, a, h) {
|
2712
2767
|
if (this._state !== 3) {
|
2713
|
-
if (this._state === 1) for (; a <
|
2714
|
-
const u =
|
2768
|
+
if (this._state === 1) for (; a < h; ) {
|
2769
|
+
const u = c[a++];
|
2715
2770
|
if (u === 59) {
|
2716
2771
|
this._state = 2, this._start();
|
2717
2772
|
break;
|
@@ -2719,36 +2774,36 @@ function ke() {
|
|
2719
2774
|
if (u < 48 || 57 < u) return void (this._state = 3);
|
2720
2775
|
this._id === -1 && (this._id = 0), this._id = 10 * this._id + u - 48;
|
2721
2776
|
}
|
2722
|
-
this._state === 2 &&
|
2777
|
+
this._state === 2 && h - a > 0 && this._put(c, a, h);
|
2723
2778
|
}
|
2724
2779
|
}
|
2725
|
-
end(
|
2780
|
+
end(c, a = !0) {
|
2726
2781
|
if (this._state !== 0) {
|
2727
2782
|
if (this._state !== 3) if (this._state === 1 && this._start(), this._active.length) {
|
2728
|
-
let
|
2729
|
-
if (this._stack.paused && (u = this._stack.loopPosition - 1,
|
2730
|
-
for (; u >= 0 && (
|
2783
|
+
let h = !1, u = this._active.length - 1, e = !1;
|
2784
|
+
if (this._stack.paused && (u = this._stack.loopPosition - 1, h = a, e = this._stack.fallThrough, this._stack.paused = !1), !e && h === !1) {
|
2785
|
+
for (; u >= 0 && (h = this._active[u].end(c), h !== !0); u--) if (h instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = u, this._stack.fallThrough = !1, h;
|
2731
2786
|
u--;
|
2732
2787
|
}
|
2733
|
-
for (; u >= 0; u--) if (
|
2734
|
-
} else this._handlerFb(this._id, "END",
|
2788
|
+
for (; u >= 0; u--) if (h = this._active[u].end(!1), h instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = u, this._stack.fallThrough = !0, h;
|
2789
|
+
} else this._handlerFb(this._id, "END", c);
|
2735
2790
|
this._active = n, this._id = -1, this._state = 0;
|
2736
2791
|
}
|
2737
2792
|
}
|
2738
2793
|
}, t.OscHandler = class {
|
2739
|
-
constructor(
|
2740
|
-
this._handler =
|
2794
|
+
constructor(c) {
|
2795
|
+
this._handler = c, this._data = "", this._hitLimit = !1;
|
2741
2796
|
}
|
2742
2797
|
start() {
|
2743
2798
|
this._data = "", this._hitLimit = !1;
|
2744
2799
|
}
|
2745
|
-
put(
|
2746
|
-
this._hitLimit || (this._data += (0, _.utf32ToString)(
|
2800
|
+
put(c, a, h) {
|
2801
|
+
this._hitLimit || (this._data += (0, _.utf32ToString)(c, a, h), this._data.length > d.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
|
2747
2802
|
}
|
2748
|
-
end(
|
2803
|
+
end(c) {
|
2749
2804
|
let a = !1;
|
2750
2805
|
if (this._hitLimit) a = !1;
|
2751
|
-
else if (
|
2806
|
+
else if (c && (a = this._handler(this._data), a instanceof Promise)) return a.then((h) => (this._data = "", this._hitLimit = !1, h));
|
2752
2807
|
return this._data = "", this._hitLimit = !1, a;
|
2753
2808
|
}
|
2754
2809
|
};
|
@@ -2757,18 +2812,18 @@ function ke() {
|
|
2757
2812
|
const l = 2147483647;
|
2758
2813
|
class d {
|
2759
2814
|
static fromArray(n) {
|
2760
|
-
const
|
2761
|
-
if (!n.length) return
|
2815
|
+
const c = new d();
|
2816
|
+
if (!n.length) return c;
|
2762
2817
|
for (let a = Array.isArray(n[0]) ? 1 : 0; a < n.length; ++a) {
|
2763
|
-
const
|
2764
|
-
if (Array.isArray(
|
2765
|
-
else
|
2818
|
+
const h = n[a];
|
2819
|
+
if (Array.isArray(h)) for (let u = 0; u < h.length; ++u) c.addSubParam(h[u]);
|
2820
|
+
else c.addParam(h);
|
2766
2821
|
}
|
2767
|
-
return
|
2822
|
+
return c;
|
2768
2823
|
}
|
2769
|
-
constructor(n = 32,
|
2770
|
-
if (this.maxLength = n, this.maxSubParamsLength =
|
2771
|
-
this.params = new Int32Array(n), this.length = 0, this._subParams = new Int32Array(
|
2824
|
+
constructor(n = 32, c = 32) {
|
2825
|
+
if (this.maxLength = n, this.maxSubParamsLength = c, c > 256) throw new Error("maxSubParamsLength must not be greater than 256");
|
2826
|
+
this.params = new Int32Array(n), this.length = 0, this._subParams = new Int32Array(c), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(n), this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
|
2772
2827
|
}
|
2773
2828
|
clone() {
|
2774
2829
|
const n = new d(this.maxLength, this.maxSubParamsLength);
|
@@ -2776,10 +2831,10 @@ function ke() {
|
|
2776
2831
|
}
|
2777
2832
|
toArray() {
|
2778
2833
|
const n = [];
|
2779
|
-
for (let
|
2780
|
-
n.push(this.params[
|
2781
|
-
const a = this._subParamsIdx[
|
2782
|
-
|
2834
|
+
for (let c = 0; c < this.length; ++c) {
|
2835
|
+
n.push(this.params[c]);
|
2836
|
+
const a = this._subParamsIdx[c] >> 8, h = 255 & this._subParamsIdx[c];
|
2837
|
+
h - a > 0 && n.push(Array.prototype.slice.call(this._subParams, a, h));
|
2783
2838
|
}
|
2784
2839
|
return n;
|
2785
2840
|
}
|
@@ -2804,22 +2859,22 @@ function ke() {
|
|
2804
2859
|
return (255 & this._subParamsIdx[n]) - (this._subParamsIdx[n] >> 8) > 0;
|
2805
2860
|
}
|
2806
2861
|
getSubParams(n) {
|
2807
|
-
const
|
2808
|
-
return a -
|
2862
|
+
const c = this._subParamsIdx[n] >> 8, a = 255 & this._subParamsIdx[n];
|
2863
|
+
return a - c > 0 ? this._subParams.subarray(c, a) : null;
|
2809
2864
|
}
|
2810
2865
|
getSubParamsAll() {
|
2811
2866
|
const n = {};
|
2812
|
-
for (let
|
2813
|
-
const a = this._subParamsIdx[
|
2814
|
-
|
2867
|
+
for (let c = 0; c < this.length; ++c) {
|
2868
|
+
const a = this._subParamsIdx[c] >> 8, h = 255 & this._subParamsIdx[c];
|
2869
|
+
h - a > 0 && (n[c] = this._subParams.slice(a, h));
|
2815
2870
|
}
|
2816
2871
|
return n;
|
2817
2872
|
}
|
2818
2873
|
addDigit(n) {
|
2819
|
-
let
|
2820
|
-
if (this._rejectDigits || !(
|
2821
|
-
const a = this._digitIsSub ? this._subParams : this.params,
|
2822
|
-
a[
|
2874
|
+
let c;
|
2875
|
+
if (this._rejectDigits || !(c = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
|
2876
|
+
const a = this._digitIsSub ? this._subParams : this.params, h = a[c - 1];
|
2877
|
+
a[c - 1] = ~h ? Math.min(10 * h + n, l) : n;
|
2823
2878
|
}
|
2824
2879
|
}
|
2825
2880
|
t.Params = d;
|
@@ -2850,8 +2905,8 @@ function ke() {
|
|
2850
2905
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.BufferApiView = void 0;
|
2851
2906
|
const d = l(785), _ = l(511);
|
2852
2907
|
t.BufferApiView = class {
|
2853
|
-
constructor(n,
|
2854
|
-
this._buffer = n, this.type =
|
2908
|
+
constructor(n, c) {
|
2909
|
+
this._buffer = n, this.type = c;
|
2855
2910
|
}
|
2856
2911
|
init(n) {
|
2857
2912
|
return this._buffer = n, this;
|
@@ -2872,8 +2927,8 @@ function ke() {
|
|
2872
2927
|
return this._buffer.lines.length;
|
2873
2928
|
}
|
2874
2929
|
getLine(n) {
|
2875
|
-
const
|
2876
|
-
if (
|
2930
|
+
const c = this._buffer.lines.get(n);
|
2931
|
+
if (c) return new d.BufferLineApiView(c);
|
2877
2932
|
}
|
2878
2933
|
getNullCell() {
|
2879
2934
|
return new _.CellData();
|
@@ -2895,16 +2950,16 @@ function ke() {
|
|
2895
2950
|
getCell(_, n) {
|
2896
2951
|
if (!(_ < 0 || _ >= this._line.length)) return n ? (this._line.loadCell(_, n), n) : this._line.loadCell(_, new d.CellData());
|
2897
2952
|
}
|
2898
|
-
translateToString(_, n,
|
2899
|
-
return this._line.translateToString(_, n,
|
2953
|
+
translateToString(_, n, c) {
|
2954
|
+
return this._line.translateToString(_, n, c);
|
2900
2955
|
}
|
2901
2956
|
};
|
2902
2957
|
}, 285: (w, t, l) => {
|
2903
2958
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.BufferNamespaceApi = void 0;
|
2904
2959
|
const d = l(771), _ = l(460), n = l(844);
|
2905
|
-
class
|
2906
|
-
constructor(
|
2907
|
-
super(), this._core =
|
2960
|
+
class c extends n.Disposable {
|
2961
|
+
constructor(h) {
|
2962
|
+
super(), this._core = h, this._onBufferChange = this.register(new _.EventEmitter()), this.onBufferChange = this._onBufferChange.event, this._normal = new d.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new d.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
|
2908
2963
|
}
|
2909
2964
|
get active() {
|
2910
2965
|
if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
|
@@ -2918,7 +2973,7 @@ function ke() {
|
|
2918
2973
|
return this._alternate.init(this._core.buffers.alt);
|
2919
2974
|
}
|
2920
2975
|
}
|
2921
|
-
t.BufferNamespaceApi =
|
2976
|
+
t.BufferNamespaceApi = c;
|
2922
2977
|
}, 975: (w, t) => {
|
2923
2978
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.ParserApi = void 0, t.ParserApi = class {
|
2924
2979
|
constructor(l) {
|
@@ -2979,9 +3034,9 @@ function ke() {
|
|
2979
3034
|
};
|
2980
3035
|
};
|
2981
3036
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.BufferService = t.MINIMUM_ROWS = t.MINIMUM_COLS = void 0;
|
2982
|
-
const n = l(460),
|
3037
|
+
const n = l(460), c = l(844), a = l(295), h = l(585);
|
2983
3038
|
t.MINIMUM_COLS = 2, t.MINIMUM_ROWS = 1;
|
2984
|
-
let u = t.BufferService = class extends
|
3039
|
+
let u = t.BufferService = class extends c.Disposable {
|
2985
3040
|
get buffer() {
|
2986
3041
|
return this.buffers.active;
|
2987
3042
|
}
|
@@ -3018,7 +3073,7 @@ function ke() {
|
|
3018
3073
|
s.ydisp = Math.max(Math.min(s.ydisp + e, s.ybase), 0), f !== s.ydisp && (r || this._onScroll.fire(s.ydisp));
|
3019
3074
|
}
|
3020
3075
|
};
|
3021
|
-
t.BufferService = u = d([_(0,
|
3076
|
+
t.BufferService = u = d([_(0, h.IOptionsService)], u);
|
3022
3077
|
}, 994: (w, t) => {
|
3023
3078
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CharsetService = void 0, t.CharsetService = class {
|
3024
3079
|
constructor() {
|
@@ -3036,17 +3091,17 @@ function ke() {
|
|
3036
3091
|
};
|
3037
3092
|
}, 753: function(w, t, l) {
|
3038
3093
|
var d = this && this.__decorate || function(s, f, p, S) {
|
3039
|
-
var y, C = arguments.length,
|
3040
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
3041
|
-
else for (var $ = s.length - 1; $ >= 0; $--) (y = s[$]) && (
|
3042
|
-
return C > 3 &&
|
3094
|
+
var y, C = arguments.length, T = C < 3 ? f : S === null ? S = Object.getOwnPropertyDescriptor(f, p) : S;
|
3095
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") T = Reflect.decorate(s, f, p, S);
|
3096
|
+
else for (var $ = s.length - 1; $ >= 0; $--) (y = s[$]) && (T = (C < 3 ? y(T) : C > 3 ? y(f, p, T) : y(f, p)) || T);
|
3097
|
+
return C > 3 && T && Object.defineProperty(f, p, T), T;
|
3043
3098
|
}, _ = this && this.__param || function(s, f) {
|
3044
3099
|
return function(p, S) {
|
3045
3100
|
f(p, S, s);
|
3046
3101
|
};
|
3047
3102
|
};
|
3048
3103
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CoreMouseService = void 0;
|
3049
|
-
const n = l(585),
|
3104
|
+
const n = l(585), c = l(460), a = l(844), h = { NONE: { events: 0, restrict: () => !1 }, X10: { events: 1, restrict: (s) => s.button !== 4 && s.action === 1 && (s.ctrl = !1, s.alt = !1, s.shift = !1, !0) }, VT200: { events: 19, restrict: (s) => s.action !== 32 }, DRAG: { events: 23, restrict: (s) => s.action !== 32 || s.button !== 3 }, ANY: { events: 31, restrict: (s) => !0 } };
|
3050
3105
|
function u(s, f) {
|
3051
3106
|
let p = (s.ctrl ? 16 : 0) | (s.shift ? 4 : 0) | (s.alt ? 8 : 0);
|
3052
3107
|
return s.button === 4 ? (p |= 64, p |= s.action) : (p |= 3 & s.button, 4 & s.button && (p |= 64), 8 & s.button && (p |= 128), s.action === 32 ? p |= 32 : s.action !== 0 || f || (p |= 3)), p;
|
@@ -3063,8 +3118,8 @@ function ke() {
|
|
3063
3118
|
} };
|
3064
3119
|
let i = t.CoreMouseService = class extends a.Disposable {
|
3065
3120
|
constructor(s, f) {
|
3066
|
-
super(), this._bufferService = s, this._coreService = f, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new
|
3067
|
-
for (const p of Object.keys(
|
3121
|
+
super(), this._bufferService = s, this._coreService = f, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new c.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
|
3122
|
+
for (const p of Object.keys(h)) this.addProtocol(p, h[p]);
|
3068
3123
|
for (const p of Object.keys(r)) this.addEncoding(p, r[p]);
|
3069
3124
|
this.reset();
|
3070
3125
|
}
|
@@ -3114,7 +3169,7 @@ function ke() {
|
|
3114
3169
|
var d = this && this.__decorate || function(i, s, f, p) {
|
3115
3170
|
var S, y = arguments.length, C = y < 3 ? s : p === null ? p = Object.getOwnPropertyDescriptor(s, f) : p;
|
3116
3171
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") C = Reflect.decorate(i, s, f, p);
|
3117
|
-
else for (var
|
3172
|
+
else for (var T = i.length - 1; T >= 0; T--) (S = i[T]) && (C = (y < 3 ? S(C) : y > 3 ? S(s, f, C) : S(s, f)) || C);
|
3118
3173
|
return y > 3 && C && Object.defineProperty(s, f, C), C;
|
3119
3174
|
}, _ = this && this.__param || function(i, s) {
|
3120
3175
|
return function(f, p) {
|
@@ -3122,10 +3177,10 @@ function ke() {
|
|
3122
3177
|
};
|
3123
3178
|
};
|
3124
3179
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CoreService = void 0;
|
3125
|
-
const n = l(439),
|
3180
|
+
const n = l(439), c = l(460), a = l(844), h = l(585), u = Object.freeze({ insertMode: !1 }), e = Object.freeze({ applicationCursorKeys: !1, applicationKeypad: !1, bracketedPasteMode: !1, origin: !1, reverseWraparound: !1, sendFocus: !1, wraparound: !0 });
|
3126
3181
|
let r = t.CoreService = class extends a.Disposable {
|
3127
3182
|
constructor(i, s, f) {
|
3128
|
-
super(), this._bufferService = i, this._logService = s, this._optionsService = f, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new
|
3183
|
+
super(), this._bufferService = i, this._logService = s, this._optionsService = f, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new c.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new c.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new c.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new c.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, n.clone)(u), this.decPrivateModes = (0, n.clone)(e);
|
3129
3184
|
}
|
3130
3185
|
reset() {
|
3131
3186
|
this.modes = (0, n.clone)(u), this.decPrivateModes = (0, n.clone)(e);
|
@@ -3139,21 +3194,21 @@ function ke() {
|
|
3139
3194
|
this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${i}"`, () => i.split("").map((s) => s.charCodeAt(0))), this._onBinary.fire(i));
|
3140
3195
|
}
|
3141
3196
|
};
|
3142
|
-
t.CoreService = r = d([_(0,
|
3197
|
+
t.CoreService = r = d([_(0, h.IBufferService), _(1, h.ILogService), _(2, h.IOptionsService)], r);
|
3143
3198
|
}, 348: (w, t, l) => {
|
3144
3199
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.InstantiationService = t.ServiceCollection = void 0;
|
3145
3200
|
const d = l(585), _ = l(343);
|
3146
3201
|
class n {
|
3147
3202
|
constructor(...a) {
|
3148
3203
|
this._entries = /* @__PURE__ */ new Map();
|
3149
|
-
for (const [
|
3204
|
+
for (const [h, u] of a) this.set(h, u);
|
3150
3205
|
}
|
3151
|
-
set(a,
|
3206
|
+
set(a, h) {
|
3152
3207
|
const u = this._entries.get(a);
|
3153
|
-
return this._entries.set(a,
|
3208
|
+
return this._entries.set(a, h), u;
|
3154
3209
|
}
|
3155
3210
|
forEach(a) {
|
3156
|
-
for (const [
|
3211
|
+
for (const [h, u] of this._entries.entries()) a(h, u);
|
3157
3212
|
}
|
3158
3213
|
has(a) {
|
3159
3214
|
return this._entries.has(a);
|
@@ -3166,22 +3221,22 @@ function ke() {
|
|
3166
3221
|
constructor() {
|
3167
3222
|
this._services = new n(), this._services.set(d.IInstantiationService, this);
|
3168
3223
|
}
|
3169
|
-
setService(
|
3170
|
-
this._services.set(
|
3224
|
+
setService(c, a) {
|
3225
|
+
this._services.set(c, a);
|
3171
3226
|
}
|
3172
|
-
getService(
|
3173
|
-
return this._services.get(
|
3227
|
+
getService(c) {
|
3228
|
+
return this._services.get(c);
|
3174
3229
|
}
|
3175
|
-
createInstance(
|
3176
|
-
const
|
3177
|
-
for (const r of
|
3230
|
+
createInstance(c, ...a) {
|
3231
|
+
const h = (0, _.getServiceDependencies)(c).sort((r, i) => r.index - i.index), u = [];
|
3232
|
+
for (const r of h) {
|
3178
3233
|
const i = this._services.get(r.id);
|
3179
|
-
if (!i) throw new Error(`[createInstance] ${
|
3234
|
+
if (!i) throw new Error(`[createInstance] ${c.name} depends on UNKNOWN service ${r.id}.`);
|
3180
3235
|
u.push(i);
|
3181
3236
|
}
|
3182
|
-
const e =
|
3183
|
-
if (a.length !== e) throw new Error(`[createInstance] First service dependency of ${
|
3184
|
-
return new
|
3237
|
+
const e = h.length > 0 ? h[0].index : a.length;
|
3238
|
+
if (a.length !== e) throw new Error(`[createInstance] First service dependency of ${c.name} at position ${e + 1} conflicts with ${a.length} static arguments`);
|
3239
|
+
return new c(...a, ...u);
|
3185
3240
|
}
|
3186
3241
|
};
|
3187
3242
|
}, 866: function(w, t, l) {
|
@@ -3196,13 +3251,13 @@ function ke() {
|
|
3196
3251
|
};
|
3197
3252
|
};
|
3198
3253
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.traceCall = t.setTraceLogger = t.LogService = void 0;
|
3199
|
-
const n = l(844),
|
3200
|
-
let
|
3254
|
+
const n = l(844), c = l(585), a = { trace: c.LogLevelEnum.TRACE, debug: c.LogLevelEnum.DEBUG, info: c.LogLevelEnum.INFO, warn: c.LogLevelEnum.WARN, error: c.LogLevelEnum.ERROR, off: c.LogLevelEnum.OFF };
|
3255
|
+
let h, u = t.LogService = class extends n.Disposable {
|
3201
3256
|
get logLevel() {
|
3202
3257
|
return this._logLevel;
|
3203
3258
|
}
|
3204
3259
|
constructor(e) {
|
3205
|
-
super(), this._optionsService = e, this._logLevel =
|
3260
|
+
super(), this._optionsService = e, this._logLevel = c.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
|
3206
3261
|
}
|
3207
3262
|
_updateLogLevel() {
|
3208
3263
|
this._logLevel = a[this._optionsService.rawOptions.logLevel];
|
@@ -3214,38 +3269,38 @@ function ke() {
|
|
3214
3269
|
this._evalLazyOptionalParams(i), e.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + r, ...i);
|
3215
3270
|
}
|
3216
3271
|
trace(e, ...r) {
|
3217
|
-
this._logLevel <=
|
3272
|
+
this._logLevel <= c.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, r);
|
3218
3273
|
}
|
3219
3274
|
debug(e, ...r) {
|
3220
|
-
this._logLevel <=
|
3275
|
+
this._logLevel <= c.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e, r);
|
3221
3276
|
}
|
3222
3277
|
info(e, ...r) {
|
3223
|
-
this._logLevel <=
|
3278
|
+
this._logLevel <= c.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e, r);
|
3224
3279
|
}
|
3225
3280
|
warn(e, ...r) {
|
3226
|
-
this._logLevel <=
|
3281
|
+
this._logLevel <= c.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e, r);
|
3227
3282
|
}
|
3228
3283
|
error(e, ...r) {
|
3229
|
-
this._logLevel <=
|
3284
|
+
this._logLevel <= c.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, r);
|
3230
3285
|
}
|
3231
3286
|
};
|
3232
|
-
t.LogService = u = d([_(0,
|
3233
|
-
|
3287
|
+
t.LogService = u = d([_(0, c.IOptionsService)], u), t.setTraceLogger = function(e) {
|
3288
|
+
h = e;
|
3234
3289
|
}, t.traceCall = function(e, r, i) {
|
3235
3290
|
if (typeof i.value != "function") throw new Error("not supported");
|
3236
3291
|
const s = i.value;
|
3237
3292
|
i.value = function(...f) {
|
3238
|
-
if (
|
3239
|
-
|
3293
|
+
if (h.logLevel !== c.LogLevelEnum.TRACE) return s.apply(this, f);
|
3294
|
+
h.trace(`GlyphRenderer#${s.name}(${f.map((S) => JSON.stringify(S)).join(", ")})`);
|
3240
3295
|
const p = s.apply(this, f);
|
3241
|
-
return
|
3296
|
+
return h.trace(`GlyphRenderer#${s.name} return`, p), p;
|
3242
3297
|
};
|
3243
3298
|
};
|
3244
3299
|
}, 302: (w, t, l) => {
|
3245
3300
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.OptionsService = t.DEFAULT_OPTIONS = void 0;
|
3246
3301
|
const d = l(460), _ = l(844), n = l(114);
|
3247
3302
|
t.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: !1, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: !0, drawBoldTextInBrightColors: !0, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: !1, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: !0, scrollSensitivity: 1, screenReaderMode: !1, smoothScrollDuration: 0, macOptionIsMeta: !1, macOptionClickForcesSelection: !1, minimumContrastRatio: 1, disableStdin: !1, allowProposedApi: !1, allowTransparency: !1, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: !1, rightClickSelectsWord: n.isMac, windowOptions: {}, windowsMode: !1, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: !0, convertEol: !1, termName: "xterm", cancelEvents: !1, overviewRulerWidth: 0 };
|
3248
|
-
const
|
3303
|
+
const c = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
3249
3304
|
class a extends _.Disposable {
|
3250
3305
|
constructor(u) {
|
3251
3306
|
super(), this._onOptionChange = this.register(new d.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
|
@@ -3296,7 +3351,7 @@ function ke() {
|
|
3296
3351
|
case "fontWeight":
|
3297
3352
|
case "fontWeightBold":
|
3298
3353
|
if (typeof e == "number" && 1 <= e && e <= 1e3) break;
|
3299
|
-
e =
|
3354
|
+
e = c.includes(e) ? e : t.DEFAULT_OPTIONS[u];
|
3300
3355
|
break;
|
3301
3356
|
case "cursorWidth":
|
3302
3357
|
e = Math.floor(e);
|
@@ -3326,37 +3381,37 @@ function ke() {
|
|
3326
3381
|
}
|
3327
3382
|
t.OptionsService = a;
|
3328
3383
|
}, 660: function(w, t, l) {
|
3329
|
-
var d = this && this.__decorate || function(a,
|
3330
|
-
var r, i = arguments.length, s = i < 3 ?
|
3331
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(a,
|
3332
|
-
else for (var f = a.length - 1; f >= 0; f--) (r = a[f]) && (s = (i < 3 ? r(s) : i > 3 ? r(
|
3333
|
-
return i > 3 && s && Object.defineProperty(
|
3334
|
-
}, _ = this && this.__param || function(a,
|
3384
|
+
var d = this && this.__decorate || function(a, h, u, e) {
|
3385
|
+
var r, i = arguments.length, s = i < 3 ? h : e === null ? e = Object.getOwnPropertyDescriptor(h, u) : e;
|
3386
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(a, h, u, e);
|
3387
|
+
else for (var f = a.length - 1; f >= 0; f--) (r = a[f]) && (s = (i < 3 ? r(s) : i > 3 ? r(h, u, s) : r(h, u)) || s);
|
3388
|
+
return i > 3 && s && Object.defineProperty(h, u, s), s;
|
3389
|
+
}, _ = this && this.__param || function(a, h) {
|
3335
3390
|
return function(u, e) {
|
3336
|
-
|
3391
|
+
h(u, e, a);
|
3337
3392
|
};
|
3338
3393
|
};
|
3339
3394
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.OscLinkService = void 0;
|
3340
3395
|
const n = l(585);
|
3341
|
-
let
|
3396
|
+
let c = t.OscLinkService = class {
|
3342
3397
|
constructor(a) {
|
3343
3398
|
this._bufferService = a, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
|
3344
3399
|
}
|
3345
3400
|
registerLink(a) {
|
3346
|
-
const
|
3401
|
+
const h = this._bufferService.buffer;
|
3347
3402
|
if (a.id === void 0) {
|
3348
|
-
const f =
|
3403
|
+
const f = h.addMarker(h.ybase + h.y), p = { data: a, id: this._nextId++, lines: [f] };
|
3349
3404
|
return f.onDispose(() => this._removeMarkerFromLink(p, f)), this._dataByLinkId.set(p.id, p), p.id;
|
3350
3405
|
}
|
3351
3406
|
const u = a, e = this._getEntryIdKey(u), r = this._entriesWithId.get(e);
|
3352
|
-
if (r) return this.addLineToLink(r.id,
|
3353
|
-
const i =
|
3407
|
+
if (r) return this.addLineToLink(r.id, h.ybase + h.y), r.id;
|
3408
|
+
const i = h.addMarker(h.ybase + h.y), s = { id: this._nextId++, key: this._getEntryIdKey(u), data: u, lines: [i] };
|
3354
3409
|
return i.onDispose(() => this._removeMarkerFromLink(s, i)), this._entriesWithId.set(s.key, s), this._dataByLinkId.set(s.id, s), s.id;
|
3355
3410
|
}
|
3356
|
-
addLineToLink(a,
|
3411
|
+
addLineToLink(a, h) {
|
3357
3412
|
const u = this._dataByLinkId.get(a);
|
3358
|
-
if (u && u.lines.every((e) => e.line !==
|
3359
|
-
const e = this._bufferService.buffer.addMarker(
|
3413
|
+
if (u && u.lines.every((e) => e.line !== h)) {
|
3414
|
+
const e = this._bufferService.buffer.addMarker(h);
|
3360
3415
|
u.lines.push(e), e.onDispose(() => this._removeMarkerFromLink(u, e));
|
3361
3416
|
}
|
3362
3417
|
}
|
@@ -3366,12 +3421,12 @@ function ke() {
|
|
3366
3421
|
_getEntryIdKey(a) {
|
3367
3422
|
return `${a.id};;${a.uri}`;
|
3368
3423
|
}
|
3369
|
-
_removeMarkerFromLink(a,
|
3370
|
-
const u = a.lines.indexOf(
|
3424
|
+
_removeMarkerFromLink(a, h) {
|
3425
|
+
const u = a.lines.indexOf(h);
|
3371
3426
|
u !== -1 && (a.lines.splice(u, 1), a.lines.length === 0 && (a.data.id !== void 0 && this._entriesWithId.delete(a.key), this._dataByLinkId.delete(a.id)));
|
3372
3427
|
}
|
3373
3428
|
};
|
3374
|
-
t.OscLinkService =
|
3429
|
+
t.OscLinkService = c = d([_(0, n.IBufferService)], c);
|
3375
3430
|
}, 343: (w, t) => {
|
3376
3431
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0;
|
3377
3432
|
const l = "di$target", d = "di$dependencies";
|
@@ -3379,11 +3434,11 @@ function ke() {
|
|
3379
3434
|
return _[d] || [];
|
3380
3435
|
}, t.createDecorator = function(_) {
|
3381
3436
|
if (t.serviceRegistry.has(_)) return t.serviceRegistry.get(_);
|
3382
|
-
const n = function(
|
3437
|
+
const n = function(c, a, h) {
|
3383
3438
|
if (arguments.length !== 3) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
|
3384
3439
|
(function(u, e, r) {
|
3385
3440
|
e[l] === e ? e[d].push({ id: u, index: r }) : (e[d] = [{ id: u, index: r }], e[l] = e);
|
3386
|
-
})(n,
|
3441
|
+
})(n, c, h);
|
3387
3442
|
};
|
3388
3443
|
return n.toString = () => _, t.serviceRegistry.set(_, n), n;
|
3389
3444
|
};
|
@@ -3407,8 +3462,8 @@ function ke() {
|
|
3407
3462
|
static extractCharKind(a) {
|
3408
3463
|
return a >> 3;
|
3409
3464
|
}
|
3410
|
-
static createPropertyValue(a,
|
3411
|
-
return (16777215 & a) << 3 | (3 &
|
3465
|
+
static createPropertyValue(a, h, u = !1) {
|
3466
|
+
return (16777215 & a) << 3 | (3 & h) << 1 | (u ? 1 : 0);
|
3412
3467
|
}
|
3413
3468
|
constructor() {
|
3414
3469
|
this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new d.EventEmitter(), this.onChange = this._onChange.event;
|
@@ -3435,32 +3490,32 @@ function ke() {
|
|
3435
3490
|
return this._activeProvider.wcwidth(a);
|
3436
3491
|
}
|
3437
3492
|
getStringCellWidth(a) {
|
3438
|
-
let
|
3493
|
+
let h = 0, u = 0;
|
3439
3494
|
const e = a.length;
|
3440
3495
|
for (let r = 0; r < e; ++r) {
|
3441
3496
|
let i = a.charCodeAt(r);
|
3442
3497
|
if (55296 <= i && i <= 56319) {
|
3443
|
-
if (++r >= e) return
|
3498
|
+
if (++r >= e) return h + this.wcwidth(i);
|
3444
3499
|
const p = a.charCodeAt(r);
|
3445
|
-
56320 <= p && p <= 57343 ? i = 1024 * (i - 55296) + p - 56320 + 65536 :
|
3500
|
+
56320 <= p && p <= 57343 ? i = 1024 * (i - 55296) + p - 56320 + 65536 : h += this.wcwidth(p);
|
3446
3501
|
}
|
3447
3502
|
const s = this.charProperties(i, u);
|
3448
3503
|
let f = n.extractWidth(s);
|
3449
|
-
n.extractShouldJoin(s) && (f -= n.extractWidth(u)),
|
3504
|
+
n.extractShouldJoin(s) && (f -= n.extractWidth(u)), h += f, u = s;
|
3450
3505
|
}
|
3451
|
-
return
|
3506
|
+
return h;
|
3452
3507
|
}
|
3453
|
-
charProperties(a,
|
3454
|
-
return this._activeProvider.charProperties(a,
|
3508
|
+
charProperties(a, h) {
|
3509
|
+
return this._activeProvider.charProperties(a, h);
|
3455
3510
|
}
|
3456
3511
|
}
|
3457
3512
|
t.UnicodeService = n;
|
3458
3513
|
}, 781: (w, t, l) => {
|
3459
3514
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.Terminal = void 0;
|
3460
3515
|
const d = l(437), _ = l(969), n = l(460);
|
3461
|
-
class
|
3462
|
-
constructor(
|
3463
|
-
super(
|
3516
|
+
class c extends _.CoreTerminal {
|
3517
|
+
constructor(h = {}) {
|
3518
|
+
super(h), this._onBell = this.register(new n.EventEmitter()), this.onBell = this._onBell.event, this._onCursorMove = this.register(new n.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onTitleChange = this.register(new n.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onA11yCharEmitter = this.register(new n.EventEmitter()), this.onA11yChar = this._onA11yCharEmitter.event, this._onA11yTabEmitter = this.register(new n.EventEmitter()), this.onA11yTab = this._onA11yTabEmitter.event, this._setup(), this.register(this._inputHandler.onRequestBell(() => this.bell())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register((0, n.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, n.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, n.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, n.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter));
|
3464
3519
|
}
|
3465
3520
|
get buffer() {
|
3466
3521
|
return this.buffers.active;
|
@@ -3468,22 +3523,22 @@ function ke() {
|
|
3468
3523
|
get markers() {
|
3469
3524
|
return this.buffer.markers;
|
3470
3525
|
}
|
3471
|
-
addMarker(
|
3472
|
-
if (this.buffer === this.buffers.normal) return this.buffer.addMarker(this.buffer.ybase + this.buffer.y +
|
3526
|
+
addMarker(h) {
|
3527
|
+
if (this.buffer === this.buffers.normal) return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + h);
|
3473
3528
|
}
|
3474
3529
|
bell() {
|
3475
3530
|
this._onBell.fire();
|
3476
3531
|
}
|
3477
|
-
input(
|
3478
|
-
this.coreService.triggerDataEvent(
|
3532
|
+
input(h, u = !0) {
|
3533
|
+
this.coreService.triggerDataEvent(h, u);
|
3479
3534
|
}
|
3480
|
-
resize(
|
3481
|
-
|
3535
|
+
resize(h, u) {
|
3536
|
+
h === this.cols && u === this.rows || super.resize(h, u);
|
3482
3537
|
}
|
3483
3538
|
clear() {
|
3484
3539
|
if (this.buffer.ybase !== 0 || this.buffer.y !== 0) {
|
3485
3540
|
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;
|
3486
|
-
for (let
|
3541
|
+
for (let h = 1; h < this.rows; h++) this.buffer.lines.push(this.buffer.getBlankLine(d.DEFAULT_ATTR_DATA));
|
3487
3542
|
this._onScroll.fire({ position: this.buffer.ydisp, source: 0 });
|
3488
3543
|
}
|
3489
3544
|
}
|
@@ -3491,20 +3546,20 @@ function ke() {
|
|
3491
3546
|
this.options.rows = this.rows, this.options.cols = this.cols, this._setup(), super.reset();
|
3492
3547
|
}
|
3493
3548
|
}
|
3494
|
-
t.Terminal =
|
3495
|
-
} },
|
3496
|
-
function
|
3497
|
-
var t =
|
3549
|
+
t.Terminal = c;
|
3550
|
+
} }, I = {};
|
3551
|
+
function k(w) {
|
3552
|
+
var t = I[w];
|
3498
3553
|
if (t !== void 0) return t.exports;
|
3499
|
-
var l =
|
3500
|
-
return
|
3554
|
+
var l = I[w] = { exports: {} };
|
3555
|
+
return O[w].call(l.exports, l, l.exports, k), l.exports;
|
3501
3556
|
}
|
3502
|
-
var
|
3557
|
+
var R = {};
|
3503
3558
|
(() => {
|
3504
|
-
var w =
|
3559
|
+
var w = R;
|
3505
3560
|
Object.defineProperty(w, "__esModule", { value: !0 }), w.Terminal = void 0;
|
3506
|
-
const t =
|
3507
|
-
class
|
3561
|
+
const t = k(285), l = k(975), d = k(90), _ = k(781), n = k(741), c = k(844), a = ["cols", "rows"];
|
3562
|
+
class h extends c.Disposable {
|
3508
3563
|
constructor(e) {
|
3509
3564
|
super(), this._core = this.register(new _.Terminal(e)), this._addonManager = this.register(new n.AddonManager()), this._publicOptions = { ...this._core.options };
|
3510
3565
|
const r = (s) => this._core.options[s], i = (s, f) => {
|
@@ -3640,17 +3695,17 @@ function ke() {
|
|
3640
3695
|
for (const r of e) if (r === 1 / 0 || isNaN(r) || r % 1 != 0) throw new Error("This API only accepts integers");
|
3641
3696
|
}
|
3642
3697
|
}
|
3643
|
-
w.Terminal =
|
3698
|
+
w.Terminal = h;
|
3644
3699
|
})();
|
3645
|
-
var
|
3646
|
-
for (var
|
3647
|
-
|
3700
|
+
var q = L;
|
3701
|
+
for (var N in R) q[N] = R[N];
|
3702
|
+
R.__esModule && Object.defineProperty(q, "__esModule", { value: !0 });
|
3648
3703
|
})();
|
3649
3704
|
}(ie)), ie;
|
3650
3705
|
}
|
3651
|
-
var
|
3652
|
-
function
|
3653
|
-
return new
|
3706
|
+
var De = Le();
|
3707
|
+
function xe() {
|
3708
|
+
return new De.Terminal({
|
3654
3709
|
cols: 1e3,
|
3655
3710
|
rows: 500,
|
3656
3711
|
allowProposedApi: !0,
|
@@ -3659,61 +3714,61 @@ function Le() {
|
|
3659
3714
|
cursorBlink: !1
|
3660
3715
|
});
|
3661
3716
|
}
|
3662
|
-
const
|
3663
|
-
maxCharacterLength:
|
3717
|
+
const Pe = {
|
3718
|
+
maxCharacterLength: ge
|
3664
3719
|
};
|
3665
|
-
function
|
3666
|
-
const
|
3667
|
-
for (let
|
3668
|
-
const w =
|
3720
|
+
function He(L, O = Pe) {
|
3721
|
+
const I = L.buffer.active, k = [], R = Math.max(0, O.maxCharacterLength);
|
3722
|
+
for (let N = 0; N < I.length; N++) {
|
3723
|
+
const w = I.getLine(N);
|
3669
3724
|
if (!w)
|
3670
3725
|
continue;
|
3671
3726
|
const t = w.translateToString(!1).trimEnd();
|
3672
|
-
t.trim().length === 0 &&
|
3727
|
+
t.trim().length === 0 && k.at(-1)?.trim().length === 0 || k.push(t);
|
3673
3728
|
}
|
3674
|
-
let
|
3675
|
-
for (let
|
3676
|
-
const w =
|
3677
|
-
if (
|
3678
|
-
const l =
|
3729
|
+
let q = 0;
|
3730
|
+
for (let N = k.length - 1; N > 0; N--) {
|
3731
|
+
const w = k[N];
|
3732
|
+
if (q += w.length, q > R) {
|
3733
|
+
const l = N, d = `Truncated ${l} ${ve(l, "line")} above this point`, _ = k.length - N - 1, n = _ === 1 ? "Below is the last line of the output" : `Below are the last ${_} lines of the output`;
|
3679
3734
|
return {
|
3680
3735
|
output: [
|
3681
3736
|
`--- ${d}. ${n}. ---`,
|
3682
|
-
...
|
3737
|
+
...k.slice(N)
|
3683
3738
|
].join(`
|
3684
3739
|
`),
|
3685
|
-
hidden_truncatedOutput:
|
3740
|
+
hidden_truncatedOutput: k.slice(0, N).join(`
|
3686
3741
|
`)
|
3687
3742
|
};
|
3688
3743
|
}
|
3689
3744
|
}
|
3690
3745
|
return {
|
3691
|
-
output:
|
3746
|
+
output: k.join(`
|
3692
3747
|
`)
|
3693
3748
|
};
|
3694
3749
|
}
|
3695
|
-
function
|
3696
|
-
const
|
3697
|
-
return
|
3698
|
-
|
3699
|
-
|
3750
|
+
function Re(L, O, I) {
|
3751
|
+
const k = xe();
|
3752
|
+
return Ce(
|
3753
|
+
L,
|
3754
|
+
O.settings["terminal.commands.nodeSpawn.loadProfile"]
|
3700
3755
|
).pipe(
|
3701
|
-
|
3702
|
-
(
|
3703
|
-
shell:
|
3704
|
-
cwd:
|
3756
|
+
oe(
|
3757
|
+
(R) => me(I.cmd, [], {
|
3758
|
+
shell: le.userInfo().shell || !0,
|
3759
|
+
cwd: L,
|
3705
3760
|
stdio: ["ignore", "pipe", "pipe"],
|
3706
|
-
env:
|
3761
|
+
env: R
|
3707
3762
|
})
|
3708
3763
|
),
|
3709
|
-
|
3764
|
+
oe(({ lastData: R, exitCode: q, exited: N }) => be(
|
3710
3765
|
new Promise((w) => {
|
3711
|
-
const t =
|
3712
|
-
|
3713
|
-
const { output: l } =
|
3714
|
-
w(
|
3766
|
+
const t = R?.subarray() ?? new Uint8Array();
|
3767
|
+
k.write(t, () => {
|
3768
|
+
const { output: l } = He(k);
|
3769
|
+
w(N ? {
|
3715
3770
|
status: "done",
|
3716
|
-
result: { output: l, exitCode:
|
3771
|
+
result: { output: l, exitCode: q ?? -1 }
|
3717
3772
|
} : {
|
3718
3773
|
status: "in-progress",
|
3719
3774
|
progress: { output: l }
|
@@ -3723,50 +3778,50 @@ function Pe(x, j, O) {
|
|
3723
3778
|
))
|
3724
3779
|
);
|
3725
3780
|
}
|
3726
|
-
const
|
3727
|
-
|
3728
|
-
const
|
3781
|
+
const Ne = ({ args: L, userInput: O }, { dir: I, dirs: k, config: R, toolMessages: q }) => {
|
3782
|
+
Se(I);
|
3783
|
+
const N = fe(I.fsPath, L.cwd ? Me(L.cwd) : "."), w = (c) => ({
|
3729
3784
|
status: "done",
|
3730
3785
|
result: {
|
3731
|
-
output: `Error: ${
|
3786
|
+
output: `Error: ${c}`,
|
3732
3787
|
exitCode: 1
|
3733
3788
|
}
|
3734
|
-
}), t =
|
3789
|
+
}), t = Oe(L.cmd);
|
3735
3790
|
if (t)
|
3736
3791
|
return se.of(w(t));
|
3737
|
-
const l =
|
3792
|
+
const l = Ie(N);
|
3738
3793
|
if (l)
|
3739
3794
|
return se.of(w(l));
|
3740
|
-
const d = [
|
3741
|
-
config:
|
3795
|
+
const d = [N, ...k.map((c) => c.fsPath)], _ = ke(L.cmd, d, {
|
3796
|
+
config: R.settings
|
3742
3797
|
}), n = _.parts.flatMap(
|
3743
|
-
(
|
3798
|
+
(c) => (
|
3744
3799
|
// Only offer adding program to allowlist when parsable, non-dynamic, non-concatenated, and within cwd.
|
3745
|
-
|
3746
|
-
(a) => a === ne || typeof a == "string" &&
|
3747
|
-
) ? [] : [
|
3800
|
+
c.requiresConfirmation ? typeof c.command == "string" || c.command.program === ne || Array.isArray(c.command.program) || c.command.arguments.some(
|
3801
|
+
(a) => a === ne || typeof a == "string" && ue(a, d)
|
3802
|
+
) ? [] : [c.command.program] : []
|
3748
3803
|
)
|
3749
3804
|
);
|
3750
3805
|
if (_.requiresConfirmation) {
|
3751
|
-
if (
|
3806
|
+
if (O && !O.accepted)
|
3752
3807
|
return se.of({ status: "rejected-by-user", toAllow: n });
|
3753
|
-
if (!
|
3808
|
+
if (!O?.accepted)
|
3754
3809
|
return se.of({ status: "blocked-on-user", toAllow: n });
|
3755
3810
|
}
|
3756
|
-
return
|
3757
|
-
},
|
3758
|
-
function
|
3759
|
-
return
|
3811
|
+
return R.settings["terminal.commands.environment"], Re(N, R, L);
|
3812
|
+
}, ce = le.homedir();
|
3813
|
+
function Me(L) {
|
3814
|
+
return ce ? L.replace(/^~(?=$|\/|\\)/, ce) : L;
|
3760
3815
|
}
|
3761
|
-
function
|
3762
|
-
if (typeof
|
3816
|
+
function Oe(L) {
|
3817
|
+
if (typeof L != "string")
|
3763
3818
|
return "`cmd` must be a string representing a command.";
|
3764
3819
|
}
|
3765
|
-
function
|
3766
|
-
if (
|
3820
|
+
function Ie(L) {
|
3821
|
+
if (L !== void 0 && typeof L != "string")
|
3767
3822
|
return "`cwd` must be a string representing a relative path within the workspace.";
|
3768
3823
|
}
|
3769
3824
|
export {
|
3770
|
-
|
3825
|
+
Ne as nodeBashTool
|
3771
3826
|
};
|
3772
|
-
//# sourceMappingURL=node-
|
3827
|
+
//# sourceMappingURL=node-BOIz1I5S.js.map
|