elrh-cosca 0.2.3 → 0.2.5
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/README.md +22 -20
- package/dist/elrh-cosca.mjs +1024 -995
- package/dist/types/functions/create-file-from-template.d.ts +1 -1
- package/dist/types/functions/create-file-from-web-template.d.ts +1 -1
- package/dist/types/functions/update-config-file.d.ts +1 -1
- package/dist/types/functions/update-json-file.d.ts +1 -1
- package/dist/types/functions/update-text-file.d.ts +1 -1
- package/dist/types/main.d.ts +4 -1
- package/dist/types/terminal/show-error.d.ts +1 -0
- package/dist/types/terminal/show-message.d.ts +1 -0
- package/dist/types/utils/get-env-value.d.ts +1 -0
- package/package.json +1 -1
- package/test/cosca-test.js +9 -1
package/dist/elrh-cosca.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { join as
|
|
2
|
-
import { readFileSync as
|
|
1
|
+
import { join as Ps, resolve as Qe } from "node:path";
|
|
2
|
+
import { readFileSync as ss, access as Sa, constants as Ea, existsSync as ut, copyFileSync as Aa, writeFileSync as is, promises as wa } from "node:fs";
|
|
3
3
|
import va from "node:readline";
|
|
4
4
|
import Ca from "node:https";
|
|
5
5
|
import "fs";
|
|
6
|
-
async function
|
|
6
|
+
async function Ye(a) {
|
|
7
7
|
const l = va.createInterface({
|
|
8
8
|
input: process.stdin,
|
|
9
9
|
output: process.stdout
|
|
@@ -28,14 +28,14 @@ function Ia(a) {
|
|
|
28
28
|
function Na(a) {
|
|
29
29
|
const l = process.cwd();
|
|
30
30
|
try {
|
|
31
|
-
const i =
|
|
31
|
+
const i = Ps(l, "package.json"), r = ss(i, "utf8");
|
|
32
32
|
if (JSON.parse(r)?.name === a)
|
|
33
33
|
return l;
|
|
34
34
|
} catch (i) {
|
|
35
35
|
console.error(i);
|
|
36
36
|
}
|
|
37
37
|
try {
|
|
38
|
-
const i =
|
|
38
|
+
const i = Ps(l, "node_modules", ...a.split("/")), r = Ps(i, "package.json");
|
|
39
39
|
return Sa(r, Ea.R_OK, (o) => {
|
|
40
40
|
if (o)
|
|
41
41
|
throw new Error(`Cannot access "${r}"`);
|
|
@@ -45,20 +45,20 @@ function Na(a) {
|
|
|
45
45
|
}
|
|
46
46
|
throw new Error(`Cannot find package "${a}" from ${process.cwd()}. Make sure it's installed or linked in this project.`);
|
|
47
47
|
}
|
|
48
|
-
async function Il(a, l, i = !1) {
|
|
49
|
-
if (i || await
|
|
50
|
-
`This will create '${l}' file. Continue?`
|
|
48
|
+
async function Il(a, l, i = !1, r = "") {
|
|
49
|
+
if (i || await Ye(
|
|
50
|
+
r || `This will create '${l}' file. Continue?`
|
|
51
51
|
)) {
|
|
52
|
-
const { pkg:
|
|
53
|
-
if (!
|
|
54
|
-
throw new Error(`Template file not found at ${
|
|
55
|
-
if (
|
|
52
|
+
const { pkg: u, file: h } = Ia(a), d = Na(u), g = Qe(d, h), b = Qe(process.cwd(), l);
|
|
53
|
+
if (!ut(g))
|
|
54
|
+
throw new Error(`Template file not found at ${g}`);
|
|
55
|
+
if (ut(b) && !(i || await Ye(
|
|
56
56
|
`File '${l}' already exists. Overwrite?`
|
|
57
57
|
))) {
|
|
58
58
|
console.log("Aborted.");
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
-
Aa(
|
|
61
|
+
Aa(g, b), console.log(`New file '${l}' successfully created.`);
|
|
62
62
|
} else
|
|
63
63
|
console.log(`Creation of '${l}' skipped.`);
|
|
64
64
|
}
|
|
@@ -74,32 +74,32 @@ async function ka(a) {
|
|
|
74
74
|
}).on("error", i);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
async function Nl(a, l, i = !1) {
|
|
78
|
-
if (i || await
|
|
79
|
-
`This will create '${l}' file. Continue?`
|
|
77
|
+
async function Nl(a, l, i = !1, r = "") {
|
|
78
|
+
if (i || await Ye(
|
|
79
|
+
r || `This will create '${l}' file. Continue?`
|
|
80
80
|
)) {
|
|
81
|
-
let
|
|
81
|
+
let u;
|
|
82
82
|
try {
|
|
83
|
-
|
|
84
|
-
} catch (
|
|
83
|
+
u = await ka(a);
|
|
84
|
+
} catch (d) {
|
|
85
85
|
throw new Error(`Failed to fetch template from external source ${a}:
|
|
86
|
-
${
|
|
86
|
+
${d}`);
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
88
|
+
const h = Qe(process.cwd(), l);
|
|
89
|
+
if (ut(h) && !(i || await Ye(
|
|
90
90
|
`File '${l}' already exists. Overwrite?`
|
|
91
91
|
))) {
|
|
92
92
|
console.log("Aborted.");
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
is(h, u, "utf8"), console.log(`New file '${l}' successfully created.`);
|
|
96
96
|
} else
|
|
97
97
|
console.log(`Creation of '${l}' skipped.`);
|
|
98
98
|
}
|
|
99
99
|
function La(a) {
|
|
100
100
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
101
101
|
}
|
|
102
|
-
var
|
|
102
|
+
var yt = {}, Ts = {}, qt = {}, zt = {}, Hi;
|
|
103
103
|
function Oa() {
|
|
104
104
|
if (Hi) return zt;
|
|
105
105
|
Hi = 1;
|
|
@@ -109,8 +109,8 @@ function Oa() {
|
|
|
109
109
|
return a[l];
|
|
110
110
|
throw new TypeError("Must be between 0 and 63: " + l);
|
|
111
111
|
}, zt.decode = function(l) {
|
|
112
|
-
var i = 65, r = 90, o = 97, u = 122, h = 48, d = 57, g = 43,
|
|
113
|
-
return i <= l && l <= r ? l - i : o <= l && l <= u ? l - o + S : h <= l && l <= d ? l - h +
|
|
112
|
+
var i = 65, r = 90, o = 97, u = 122, h = 48, d = 57, g = 43, b = 47, S = 26, w = 52;
|
|
113
|
+
return i <= l && l <= r ? l - i : o <= l && l <= u ? l - o + S : h <= l && l <= d ? l - h + w : l == g ? 62 : l == b ? 63 : -1;
|
|
114
114
|
}, zt;
|
|
115
115
|
}
|
|
116
116
|
var Ki;
|
|
@@ -122,28 +122,28 @@ function Er() {
|
|
|
122
122
|
return d < 0 ? (-d << 1) + 1 : (d << 1) + 0;
|
|
123
123
|
}
|
|
124
124
|
function h(d) {
|
|
125
|
-
var g = (d & 1) === 1,
|
|
126
|
-
return g ? -
|
|
125
|
+
var g = (d & 1) === 1, b = d >> 1;
|
|
126
|
+
return g ? -b : b;
|
|
127
127
|
}
|
|
128
128
|
return qt.encode = function(g) {
|
|
129
|
-
var
|
|
129
|
+
var b = "", S, w = u(g);
|
|
130
130
|
do
|
|
131
|
-
S =
|
|
132
|
-
while (
|
|
133
|
-
return
|
|
134
|
-
}, qt.decode = function(g,
|
|
135
|
-
var
|
|
131
|
+
S = w & r, w >>>= l, w > 0 && (S |= o), b += a.encode(S);
|
|
132
|
+
while (w > 0);
|
|
133
|
+
return b;
|
|
134
|
+
}, qt.decode = function(g, b, S) {
|
|
135
|
+
var w = g.length, v = 0, I = 0, T, A;
|
|
136
136
|
do {
|
|
137
|
-
if (
|
|
137
|
+
if (b >= w)
|
|
138
138
|
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
139
|
-
if (A = a.decode(g.charCodeAt(
|
|
140
|
-
throw new Error("Invalid base64 digit: " + g.charAt(
|
|
141
|
-
T = !!(A & o), A &= r,
|
|
139
|
+
if (A = a.decode(g.charCodeAt(b++)), A === -1)
|
|
140
|
+
throw new Error("Invalid base64 digit: " + g.charAt(b - 1));
|
|
141
|
+
T = !!(A & o), A &= r, v = v + (A << I), I += l;
|
|
142
142
|
} while (T);
|
|
143
|
-
S.value = h(
|
|
143
|
+
S.value = h(v), S.rest = b;
|
|
144
144
|
}, qt;
|
|
145
145
|
}
|
|
146
|
-
var
|
|
146
|
+
var Ss = {}, Xi;
|
|
147
147
|
function kt() {
|
|
148
148
|
return Xi || (Xi = 1, (function(a) {
|
|
149
149
|
function l(M, k, _) {
|
|
@@ -206,7 +206,7 @@ function kt() {
|
|
|
206
206
|
return _ = ce.join("/"), _ === "" && (_ = me ? "/" : "."), N ? (N.path = _, u(N)) : _;
|
|
207
207
|
});
|
|
208
208
|
a.normalize = g;
|
|
209
|
-
function
|
|
209
|
+
function b(M, k) {
|
|
210
210
|
M === "" && (M = "."), k === "" && (k = ".");
|
|
211
211
|
var _ = o(k), N = o(M);
|
|
212
212
|
if (N && (M = N.path || "/"), _ && !_.scheme)
|
|
@@ -218,7 +218,7 @@ function kt() {
|
|
|
218
218
|
var me = k.charAt(0) === "/" ? k : g(M.replace(/\/+$/, "") + "/" + k);
|
|
219
219
|
return N ? (N.path = me, u(N)) : me;
|
|
220
220
|
}
|
|
221
|
-
a.join =
|
|
221
|
+
a.join = b, a.isAbsolute = function(M) {
|
|
222
222
|
return M.charAt(0) === "/" || i.test(M);
|
|
223
223
|
};
|
|
224
224
|
function S(M, k) {
|
|
@@ -232,21 +232,21 @@ function kt() {
|
|
|
232
232
|
return Array(_ + 1).join("../") + k.substr(M.length + 1);
|
|
233
233
|
}
|
|
234
234
|
a.relative = S;
|
|
235
|
-
var
|
|
235
|
+
var w = (function() {
|
|
236
236
|
var M = /* @__PURE__ */ Object.create(null);
|
|
237
237
|
return !("__proto__" in M);
|
|
238
238
|
})();
|
|
239
|
-
function
|
|
239
|
+
function v(M) {
|
|
240
240
|
return M;
|
|
241
241
|
}
|
|
242
242
|
function I(M) {
|
|
243
243
|
return A(M) ? "$" + M : M;
|
|
244
244
|
}
|
|
245
|
-
a.toSetString =
|
|
245
|
+
a.toSetString = w ? v : I;
|
|
246
246
|
function T(M) {
|
|
247
247
|
return A(M) ? M.slice(1) : M;
|
|
248
248
|
}
|
|
249
|
-
a.fromSetString =
|
|
249
|
+
a.fromSetString = w ? v : T;
|
|
250
250
|
function A(M) {
|
|
251
251
|
if (!M)
|
|
252
252
|
return !1;
|
|
@@ -258,11 +258,11 @@ function kt() {
|
|
|
258
258
|
return !1;
|
|
259
259
|
return !0;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function P(M, k, _) {
|
|
262
262
|
var N = D(M.source, k.source);
|
|
263
263
|
return N !== 0 || (N = M.originalLine - k.originalLine, N !== 0) || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N : D(M.name, k.name);
|
|
264
264
|
}
|
|
265
|
-
a.compareByOriginalPositions =
|
|
265
|
+
a.compareByOriginalPositions = P;
|
|
266
266
|
function m(M, k, _) {
|
|
267
267
|
var N;
|
|
268
268
|
return N = M.originalLine - k.originalLine, N !== 0 || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N : D(M.name, k.name);
|
|
@@ -299,30 +299,30 @@ function kt() {
|
|
|
299
299
|
var me = N.path.lastIndexOf("/");
|
|
300
300
|
me >= 0 && (N.path = N.path.substring(0, me + 1));
|
|
301
301
|
}
|
|
302
|
-
k =
|
|
302
|
+
k = b(u(N), k);
|
|
303
303
|
}
|
|
304
304
|
return g(k);
|
|
305
305
|
}
|
|
306
306
|
a.computeSourceURL = q;
|
|
307
|
-
})(
|
|
307
|
+
})(Ss)), Ss;
|
|
308
308
|
}
|
|
309
|
-
var
|
|
309
|
+
var Es = {}, Gi;
|
|
310
310
|
function Ar() {
|
|
311
|
-
if (Gi) return
|
|
311
|
+
if (Gi) return Es;
|
|
312
312
|
Gi = 1;
|
|
313
313
|
var a = kt(), l = Object.prototype.hasOwnProperty, i = typeof Map < "u";
|
|
314
314
|
function r() {
|
|
315
315
|
this._array = [], this._set = i ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
316
316
|
}
|
|
317
317
|
return r.fromArray = function(u, h) {
|
|
318
|
-
for (var d = new r(), g = 0,
|
|
318
|
+
for (var d = new r(), g = 0, b = u.length; g < b; g++)
|
|
319
319
|
d.add(u[g], h);
|
|
320
320
|
return d;
|
|
321
321
|
}, r.prototype.size = function() {
|
|
322
322
|
return i ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
323
323
|
}, r.prototype.add = function(u, h) {
|
|
324
|
-
var d = i ? u : a.toSetString(u), g = i ? this.has(u) : l.call(this._set, d),
|
|
325
|
-
(!g || h) && this._array.push(u), g || (i ? this._set.set(u,
|
|
324
|
+
var d = i ? u : a.toSetString(u), g = i ? this.has(u) : l.call(this._set, d), b = this._array.length;
|
|
325
|
+
(!g || h) && this._array.push(u), g || (i ? this._set.set(u, b) : this._set[d] = b);
|
|
326
326
|
}, r.prototype.has = function(u) {
|
|
327
327
|
if (i)
|
|
328
328
|
return this._set.has(u);
|
|
@@ -345,11 +345,11 @@ function Ar() {
|
|
|
345
345
|
throw new Error("No element indexed by " + u);
|
|
346
346
|
}, r.prototype.toArray = function() {
|
|
347
347
|
return this._array.slice();
|
|
348
|
-
},
|
|
348
|
+
}, Es.ArraySet = r, Es;
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var As = {}, Qi;
|
|
351
351
|
function Da() {
|
|
352
|
-
if (Qi) return
|
|
352
|
+
if (Qi) return As;
|
|
353
353
|
Qi = 1;
|
|
354
354
|
var a = kt();
|
|
355
355
|
function l(r, o) {
|
|
@@ -365,65 +365,65 @@ function Da() {
|
|
|
365
365
|
l(this._last, o) ? (this._last = o, this._array.push(o)) : (this._sorted = !1, this._array.push(o));
|
|
366
366
|
}, i.prototype.toArray = function() {
|
|
367
367
|
return this._sorted || (this._array.sort(a.compareByGeneratedPositionsInflated), this._sorted = !0), this._array;
|
|
368
|
-
},
|
|
368
|
+
}, As.MappingList = i, As;
|
|
369
369
|
}
|
|
370
370
|
var Yi;
|
|
371
371
|
function wr() {
|
|
372
|
-
if (Yi) return
|
|
372
|
+
if (Yi) return Ts;
|
|
373
373
|
Yi = 1;
|
|
374
374
|
var a = Er(), l = kt(), i = Ar().ArraySet, r = Da().MappingList;
|
|
375
375
|
function o(u) {
|
|
376
376
|
u || (u = {}), this._file = l.getArg(u, "file", null), this._sourceRoot = l.getArg(u, "sourceRoot", null), this._skipValidation = l.getArg(u, "skipValidation", !1), this._ignoreInvalidMapping = l.getArg(u, "ignoreInvalidMapping", !1), this._sources = new i(), this._names = new i(), this._mappings = new r(), this._sourcesContents = null;
|
|
377
377
|
}
|
|
378
378
|
return o.prototype._version = 3, o.fromSourceMap = function(h, d) {
|
|
379
|
-
var g = h.sourceRoot,
|
|
379
|
+
var g = h.sourceRoot, b = new o(Object.assign(d || {}, {
|
|
380
380
|
file: h.file,
|
|
381
381
|
sourceRoot: g
|
|
382
382
|
}));
|
|
383
383
|
return h.eachMapping(function(S) {
|
|
384
|
-
var
|
|
384
|
+
var w = {
|
|
385
385
|
generated: {
|
|
386
386
|
line: S.generatedLine,
|
|
387
387
|
column: S.generatedColumn
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
S.source != null && (
|
|
390
|
+
S.source != null && (w.source = S.source, g != null && (w.source = l.relative(g, w.source)), w.original = {
|
|
391
391
|
line: S.originalLine,
|
|
392
392
|
column: S.originalColumn
|
|
393
|
-
}, S.name != null && (
|
|
393
|
+
}, S.name != null && (w.name = S.name)), b.addMapping(w);
|
|
394
394
|
}), h.sources.forEach(function(S) {
|
|
395
|
-
var
|
|
396
|
-
g !== null && (
|
|
397
|
-
var
|
|
398
|
-
|
|
399
|
-
}),
|
|
395
|
+
var w = S;
|
|
396
|
+
g !== null && (w = l.relative(g, S)), b._sources.has(w) || b._sources.add(w);
|
|
397
|
+
var v = h.sourceContentFor(S);
|
|
398
|
+
v != null && b.setSourceContent(S, v);
|
|
399
|
+
}), b;
|
|
400
400
|
}, o.prototype.addMapping = function(h) {
|
|
401
|
-
var d = l.getArg(h, "generated"), g = l.getArg(h, "original", null),
|
|
402
|
-
!this._skipValidation && this._validateMapping(d, g,
|
|
401
|
+
var d = l.getArg(h, "generated"), g = l.getArg(h, "original", null), b = l.getArg(h, "source", null), S = l.getArg(h, "name", null);
|
|
402
|
+
!this._skipValidation && this._validateMapping(d, g, b, S) === !1 || (b != null && (b = String(b), this._sources.has(b) || this._sources.add(b)), S != null && (S = String(S), this._names.has(S) || this._names.add(S)), this._mappings.add({
|
|
403
403
|
generatedLine: d.line,
|
|
404
404
|
generatedColumn: d.column,
|
|
405
405
|
originalLine: g != null && g.line,
|
|
406
406
|
originalColumn: g != null && g.column,
|
|
407
|
-
source:
|
|
407
|
+
source: b,
|
|
408
408
|
name: S
|
|
409
409
|
}));
|
|
410
410
|
}, o.prototype.setSourceContent = function(h, d) {
|
|
411
411
|
var g = h;
|
|
412
412
|
this._sourceRoot != null && (g = l.relative(this._sourceRoot, g)), d != null ? (this._sourcesContents || (this._sourcesContents = /* @__PURE__ */ Object.create(null)), this._sourcesContents[l.toSetString(g)] = d) : this._sourcesContents && (delete this._sourcesContents[l.toSetString(g)], Object.keys(this._sourcesContents).length === 0 && (this._sourcesContents = null));
|
|
413
413
|
}, o.prototype.applySourceMap = function(h, d, g) {
|
|
414
|
-
var
|
|
414
|
+
var b = d;
|
|
415
415
|
if (d == null) {
|
|
416
416
|
if (h.file == null)
|
|
417
417
|
throw new Error(
|
|
418
418
|
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
|
419
419
|
);
|
|
420
|
-
|
|
420
|
+
b = h.file;
|
|
421
421
|
}
|
|
422
422
|
var S = this._sourceRoot;
|
|
423
|
-
S != null && (
|
|
424
|
-
var
|
|
423
|
+
S != null && (b = l.relative(S, b));
|
|
424
|
+
var w = new i(), v = new i();
|
|
425
425
|
this._mappings.unsortedForEach(function(I) {
|
|
426
|
-
if (I.source ===
|
|
426
|
+
if (I.source === b && I.originalLine != null) {
|
|
427
427
|
var T = h.originalPositionFor({
|
|
428
428
|
line: I.originalLine,
|
|
429
429
|
column: I.originalColumn
|
|
@@ -431,35 +431,35 @@ function wr() {
|
|
|
431
431
|
T.source != null && (I.source = T.source, g != null && (I.source = l.join(g, I.source)), S != null && (I.source = l.relative(S, I.source)), I.originalLine = T.line, I.originalColumn = T.column, T.name != null && (I.name = T.name));
|
|
432
432
|
}
|
|
433
433
|
var A = I.source;
|
|
434
|
-
A != null && !
|
|
435
|
-
var
|
|
436
|
-
|
|
437
|
-
}, this), this._sources =
|
|
434
|
+
A != null && !w.has(A) && w.add(A);
|
|
435
|
+
var P = I.name;
|
|
436
|
+
P != null && !v.has(P) && v.add(P);
|
|
437
|
+
}, this), this._sources = w, this._names = v, h.sources.forEach(function(I) {
|
|
438
438
|
var T = h.sourceContentFor(I);
|
|
439
439
|
T != null && (g != null && (I = l.join(g, I)), S != null && (I = l.relative(S, I)), this.setSourceContent(I, T));
|
|
440
440
|
}, this);
|
|
441
|
-
}, o.prototype._validateMapping = function(h, d, g,
|
|
441
|
+
}, o.prototype._validateMapping = function(h, d, g, b) {
|
|
442
442
|
if (d && typeof d.line != "number" && typeof d.column != "number") {
|
|
443
443
|
var S = "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";
|
|
444
444
|
if (this._ignoreInvalidMapping)
|
|
445
445
|
return typeof console < "u" && console.warn && console.warn(S), !1;
|
|
446
446
|
throw new Error(S);
|
|
447
447
|
}
|
|
448
|
-
if (!(h && "line" in h && "column" in h && h.line > 0 && h.column >= 0 && !d && !g && !
|
|
448
|
+
if (!(h && "line" in h && "column" in h && h.line > 0 && h.column >= 0 && !d && !g && !b)) {
|
|
449
449
|
if (h && "line" in h && "column" in h && d && "line" in d && "column" in d && h.line > 0 && h.column >= 0 && d.line > 0 && d.column >= 0 && g)
|
|
450
450
|
return;
|
|
451
451
|
var S = "Invalid mapping: " + JSON.stringify({
|
|
452
452
|
generated: h,
|
|
453
453
|
source: g,
|
|
454
454
|
original: d,
|
|
455
|
-
name:
|
|
455
|
+
name: b
|
|
456
456
|
});
|
|
457
457
|
if (this._ignoreInvalidMapping)
|
|
458
458
|
return typeof console < "u" && console.warn && console.warn(S), !1;
|
|
459
459
|
throw new Error(S);
|
|
460
460
|
}
|
|
461
461
|
}, o.prototype._serializeMappings = function() {
|
|
462
|
-
for (var h = 0, d = 1, g = 0,
|
|
462
|
+
for (var h = 0, d = 1, g = 0, b = 0, S = 0, w = 0, v = "", I, T, A, P, m = this._mappings.toArray(), O = 0, U = m.length; O < U; O++) {
|
|
463
463
|
if (T = m[O], I = "", T.generatedLine !== d)
|
|
464
464
|
for (h = 0; T.generatedLine !== d; )
|
|
465
465
|
I += ";", d++;
|
|
@@ -468,16 +468,16 @@ function wr() {
|
|
|
468
468
|
continue;
|
|
469
469
|
I += ",";
|
|
470
470
|
}
|
|
471
|
-
I += a.encode(T.generatedColumn - h), h = T.generatedColumn, T.source != null && (
|
|
471
|
+
I += a.encode(T.generatedColumn - h), h = T.generatedColumn, T.source != null && (P = this._sources.indexOf(T.source), I += a.encode(P - w), w = P, I += a.encode(T.originalLine - 1 - b), b = T.originalLine - 1, I += a.encode(T.originalColumn - g), g = T.originalColumn, T.name != null && (A = this._names.indexOf(T.name), I += a.encode(A - S), S = A)), v += I;
|
|
472
472
|
}
|
|
473
|
-
return
|
|
473
|
+
return v;
|
|
474
474
|
}, o.prototype._generateSourcesContent = function(h, d) {
|
|
475
475
|
return h.map(function(g) {
|
|
476
476
|
if (!this._sourcesContents)
|
|
477
477
|
return null;
|
|
478
478
|
d != null && (g = l.relative(d, g));
|
|
479
|
-
var
|
|
480
|
-
return Object.prototype.hasOwnProperty.call(this._sourcesContents,
|
|
479
|
+
var b = l.toSetString(g);
|
|
480
|
+
return Object.prototype.hasOwnProperty.call(this._sourcesContents, b) ? this._sourcesContents[b] : null;
|
|
481
481
|
}, this);
|
|
482
482
|
}, o.prototype.toJSON = function() {
|
|
483
483
|
var h = {
|
|
@@ -489,15 +489,15 @@ function wr() {
|
|
|
489
489
|
return this._file != null && (h.file = this._file), this._sourceRoot != null && (h.sourceRoot = this._sourceRoot), this._sourcesContents && (h.sourcesContent = this._generateSourcesContent(h.sources, h.sourceRoot)), h;
|
|
490
490
|
}, o.prototype.toString = function() {
|
|
491
491
|
return JSON.stringify(this.toJSON());
|
|
492
|
-
},
|
|
492
|
+
}, Ts.SourceMapGenerator = o, Ts;
|
|
493
493
|
}
|
|
494
|
-
var
|
|
494
|
+
var gt = {}, ws = {}, Zi;
|
|
495
495
|
function Ma() {
|
|
496
496
|
return Zi || (Zi = 1, (function(a) {
|
|
497
497
|
a.GREATEST_LOWER_BOUND = 1, a.LEAST_UPPER_BOUND = 2;
|
|
498
498
|
function l(i, r, o, u, h, d) {
|
|
499
|
-
var g = Math.floor((r - i) / 2) + i,
|
|
500
|
-
return
|
|
499
|
+
var g = Math.floor((r - i) / 2) + i, b = h(o, u[g], !0);
|
|
500
|
+
return b === 0 ? g : b > 0 ? r - g > 1 ? l(g, r, o, u, h, d) : d == a.LEAST_UPPER_BOUND ? r < u.length ? r : -1 : g : g - i > 1 ? l(i, g, o, u, h, d) : d == a.LEAST_UPPER_BOUND ? g : i < 0 ? -1 : i;
|
|
501
501
|
}
|
|
502
502
|
a.search = function(r, o, u, h) {
|
|
503
503
|
if (o.length === 0)
|
|
@@ -516,29 +516,29 @@ function Ma() {
|
|
|
516
516
|
--d;
|
|
517
517
|
return d;
|
|
518
518
|
};
|
|
519
|
-
})(
|
|
519
|
+
})(ws)), ws;
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var vs = {}, er;
|
|
522
522
|
function Fa() {
|
|
523
|
-
if (er) return
|
|
523
|
+
if (er) return vs;
|
|
524
524
|
er = 1;
|
|
525
525
|
function a(r) {
|
|
526
|
-
function o(d, g,
|
|
526
|
+
function o(d, g, b) {
|
|
527
527
|
var S = d[g];
|
|
528
|
-
d[g] = d[
|
|
528
|
+
d[g] = d[b], d[b] = S;
|
|
529
529
|
}
|
|
530
530
|
function u(d, g) {
|
|
531
531
|
return Math.round(d + Math.random() * (g - d));
|
|
532
532
|
}
|
|
533
|
-
function h(d, g,
|
|
534
|
-
if (
|
|
535
|
-
var
|
|
536
|
-
o(d,
|
|
537
|
-
for (var I = d[S], T =
|
|
538
|
-
g(d[T], I, !1) <= 0 && (
|
|
539
|
-
o(d,
|
|
540
|
-
var A =
|
|
541
|
-
h(d, g,
|
|
533
|
+
function h(d, g, b, S) {
|
|
534
|
+
if (b < S) {
|
|
535
|
+
var w = u(b, S), v = b - 1;
|
|
536
|
+
o(d, w, S);
|
|
537
|
+
for (var I = d[S], T = b; T < S; T++)
|
|
538
|
+
g(d[T], I, !1) <= 0 && (v += 1, o(d, v, T));
|
|
539
|
+
o(d, v + 1, T);
|
|
540
|
+
var A = v + 1;
|
|
541
|
+
h(d, g, b, A - 1), h(d, g, A + 1, S);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
return h;
|
|
@@ -548,22 +548,22 @@ function Fa() {
|
|
|
548
548
|
return new Function(`return ${o}`)()(r);
|
|
549
549
|
}
|
|
550
550
|
let i = /* @__PURE__ */ new WeakMap();
|
|
551
|
-
return
|
|
551
|
+
return vs.quickSort = function(r, o, u = 0) {
|
|
552
552
|
let h = i.get(o);
|
|
553
553
|
h === void 0 && (h = l(o), i.set(o, h)), h(r, o, u, r.length - 1);
|
|
554
|
-
},
|
|
554
|
+
}, vs;
|
|
555
555
|
}
|
|
556
556
|
var tr;
|
|
557
557
|
function Ba() {
|
|
558
|
-
if (tr) return
|
|
558
|
+
if (tr) return gt;
|
|
559
559
|
tr = 1;
|
|
560
560
|
var a = kt(), l = Ma(), i = Ar().ArraySet, r = Er(), o = Fa().quickSort;
|
|
561
|
-
function u(
|
|
562
|
-
var I =
|
|
563
|
-
return typeof
|
|
561
|
+
function u(w, v) {
|
|
562
|
+
var I = w;
|
|
563
|
+
return typeof w == "string" && (I = a.parseSourceMapInput(w)), I.sections != null ? new S(I, v) : new h(I, v);
|
|
564
564
|
}
|
|
565
|
-
u.fromSourceMap = function(
|
|
566
|
-
return h.fromSourceMap(
|
|
565
|
+
u.fromSourceMap = function(w, v) {
|
|
566
|
+
return h.fromSourceMap(w, v);
|
|
567
567
|
}, u.prototype._version = 3, u.prototype.__generatedMappings = null, Object.defineProperty(u.prototype, "_generatedMappings", {
|
|
568
568
|
configurable: !0,
|
|
569
569
|
enumerable: !0,
|
|
@@ -576,14 +576,14 @@ function Ba() {
|
|
|
576
576
|
get: function() {
|
|
577
577
|
return this.__originalMappings || this._parseMappings(this._mappings, this.sourceRoot), this.__originalMappings;
|
|
578
578
|
}
|
|
579
|
-
}), u.prototype._charIsMappingSeparator = function(
|
|
580
|
-
var T =
|
|
579
|
+
}), u.prototype._charIsMappingSeparator = function(v, I) {
|
|
580
|
+
var T = v.charAt(I);
|
|
581
581
|
return T === ";" || T === ",";
|
|
582
|
-
}, u.prototype._parseMappings = function(
|
|
582
|
+
}, u.prototype._parseMappings = function(v, I) {
|
|
583
583
|
throw new Error("Subclasses must implement _parseMappings");
|
|
584
|
-
}, u.GENERATED_ORDER = 1, u.ORIGINAL_ORDER = 2, u.GREATEST_LOWER_BOUND = 1, u.LEAST_UPPER_BOUND = 2, u.prototype.eachMapping = function(
|
|
585
|
-
var A = I || null,
|
|
586
|
-
switch (
|
|
584
|
+
}, u.GENERATED_ORDER = 1, u.ORIGINAL_ORDER = 2, u.GREATEST_LOWER_BOUND = 1, u.LEAST_UPPER_BOUND = 2, u.prototype.eachMapping = function(v, I, T) {
|
|
585
|
+
var A = I || null, P = T || u.GENERATED_ORDER, m;
|
|
586
|
+
switch (P) {
|
|
587
587
|
case u.GENERATED_ORDER:
|
|
588
588
|
m = this._generatedMappings;
|
|
589
589
|
break;
|
|
@@ -593,7 +593,7 @@ function Ba() {
|
|
|
593
593
|
default:
|
|
594
594
|
throw new Error("Unknown order of iteration.");
|
|
595
595
|
}
|
|
596
|
-
for (var O = this.sourceRoot, U =
|
|
596
|
+
for (var O = this.sourceRoot, U = v.bind(A), D = this._names, B = this._sources, R = this._sourceMapURL, q = 0, M = m.length; q < M; q++) {
|
|
597
597
|
var k = m[q], _ = k.source === null ? null : B.at(k.source);
|
|
598
598
|
_ !== null && (_ = a.computeSourceURL(O, _, R)), U({
|
|
599
599
|
source: _,
|
|
@@ -604,15 +604,15 @@ function Ba() {
|
|
|
604
604
|
name: k.name === null ? null : D.at(k.name)
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
-
}, u.prototype.allGeneratedPositionsFor = function(
|
|
608
|
-
var I = a.getArg(
|
|
609
|
-
source: a.getArg(
|
|
607
|
+
}, u.prototype.allGeneratedPositionsFor = function(v) {
|
|
608
|
+
var I = a.getArg(v, "line"), T = {
|
|
609
|
+
source: a.getArg(v, "source"),
|
|
610
610
|
originalLine: I,
|
|
611
|
-
originalColumn: a.getArg(
|
|
611
|
+
originalColumn: a.getArg(v, "column", 0)
|
|
612
612
|
};
|
|
613
613
|
if (T.source = this._findSourceIndex(T.source), T.source < 0)
|
|
614
614
|
return [];
|
|
615
|
-
var A = [],
|
|
615
|
+
var A = [], P = this._findMapping(
|
|
616
616
|
T,
|
|
617
617
|
this._originalMappings,
|
|
618
618
|
"originalLine",
|
|
@@ -620,57 +620,57 @@ function Ba() {
|
|
|
620
620
|
a.compareByOriginalPositions,
|
|
621
621
|
l.LEAST_UPPER_BOUND
|
|
622
622
|
);
|
|
623
|
-
if (
|
|
624
|
-
var m = this._originalMappings[
|
|
625
|
-
if (
|
|
623
|
+
if (P >= 0) {
|
|
624
|
+
var m = this._originalMappings[P];
|
|
625
|
+
if (v.column === void 0)
|
|
626
626
|
for (var O = m.originalLine; m && m.originalLine === O; )
|
|
627
627
|
A.push({
|
|
628
628
|
line: a.getArg(m, "generatedLine", null),
|
|
629
629
|
column: a.getArg(m, "generatedColumn", null),
|
|
630
630
|
lastColumn: a.getArg(m, "lastGeneratedColumn", null)
|
|
631
|
-
}), m = this._originalMappings[++
|
|
631
|
+
}), m = this._originalMappings[++P];
|
|
632
632
|
else
|
|
633
633
|
for (var U = m.originalColumn; m && m.originalLine === I && m.originalColumn == U; )
|
|
634
634
|
A.push({
|
|
635
635
|
line: a.getArg(m, "generatedLine", null),
|
|
636
636
|
column: a.getArg(m, "generatedColumn", null),
|
|
637
637
|
lastColumn: a.getArg(m, "lastGeneratedColumn", null)
|
|
638
|
-
}), m = this._originalMappings[++
|
|
638
|
+
}), m = this._originalMappings[++P];
|
|
639
639
|
}
|
|
640
640
|
return A;
|
|
641
|
-
},
|
|
642
|
-
function h(
|
|
643
|
-
var I =
|
|
644
|
-
typeof
|
|
645
|
-
var T = a.getArg(I, "version"), A = a.getArg(I, "sources"),
|
|
641
|
+
}, gt.SourceMapConsumer = u;
|
|
642
|
+
function h(w, v) {
|
|
643
|
+
var I = w;
|
|
644
|
+
typeof w == "string" && (I = a.parseSourceMapInput(w));
|
|
645
|
+
var T = a.getArg(I, "version"), A = a.getArg(I, "sources"), P = a.getArg(I, "names", []), m = a.getArg(I, "sourceRoot", null), O = a.getArg(I, "sourcesContent", null), U = a.getArg(I, "mappings"), D = a.getArg(I, "file", null);
|
|
646
646
|
if (T != this._version)
|
|
647
647
|
throw new Error("Unsupported version: " + T);
|
|
648
648
|
m && (m = a.normalize(m)), A = A.map(String).map(a.normalize).map(function(B) {
|
|
649
649
|
return m && a.isAbsolute(m) && a.isAbsolute(B) ? a.relative(m, B) : B;
|
|
650
|
-
}), this._names = i.fromArray(
|
|
651
|
-
return a.computeSourceURL(m, B,
|
|
652
|
-
}), this.sourceRoot = m, this.sourcesContent = O, this._mappings = U, this._sourceMapURL =
|
|
653
|
-
}
|
|
654
|
-
h.prototype = Object.create(u.prototype), h.prototype.consumer = u, h.prototype._findSourceIndex = function(
|
|
655
|
-
var
|
|
656
|
-
if (this.sourceRoot != null && (
|
|
657
|
-
return this._sources.indexOf(
|
|
650
|
+
}), this._names = i.fromArray(P.map(String), !0), this._sources = i.fromArray(A, !0), this._absoluteSources = this._sources.toArray().map(function(B) {
|
|
651
|
+
return a.computeSourceURL(m, B, v);
|
|
652
|
+
}), this.sourceRoot = m, this.sourcesContent = O, this._mappings = U, this._sourceMapURL = v, this.file = D;
|
|
653
|
+
}
|
|
654
|
+
h.prototype = Object.create(u.prototype), h.prototype.consumer = u, h.prototype._findSourceIndex = function(w) {
|
|
655
|
+
var v = w;
|
|
656
|
+
if (this.sourceRoot != null && (v = a.relative(this.sourceRoot, v)), this._sources.has(v))
|
|
657
|
+
return this._sources.indexOf(v);
|
|
658
658
|
var I;
|
|
659
659
|
for (I = 0; I < this._absoluteSources.length; ++I)
|
|
660
|
-
if (this._absoluteSources[I] ==
|
|
660
|
+
if (this._absoluteSources[I] == w)
|
|
661
661
|
return I;
|
|
662
662
|
return -1;
|
|
663
|
-
}, h.fromSourceMap = function(
|
|
664
|
-
var T = Object.create(h.prototype), A = T._names = i.fromArray(
|
|
665
|
-
T.sourceRoot =
|
|
663
|
+
}, h.fromSourceMap = function(v, I) {
|
|
664
|
+
var T = Object.create(h.prototype), A = T._names = i.fromArray(v._names.toArray(), !0), P = T._sources = i.fromArray(v._sources.toArray(), !0);
|
|
665
|
+
T.sourceRoot = v._sourceRoot, T.sourcesContent = v._generateSourcesContent(
|
|
666
666
|
T._sources.toArray(),
|
|
667
667
|
T.sourceRoot
|
|
668
|
-
), T.file =
|
|
668
|
+
), T.file = v._file, T._sourceMapURL = I, T._absoluteSources = T._sources.toArray().map(function(M) {
|
|
669
669
|
return a.computeSourceURL(T.sourceRoot, M, I);
|
|
670
670
|
});
|
|
671
|
-
for (var m =
|
|
671
|
+
for (var m = v._mappings.toArray().slice(), O = T.__generatedMappings = [], U = T.__originalMappings = [], D = 0, B = m.length; D < B; D++) {
|
|
672
672
|
var R = m[D], q = new d();
|
|
673
|
-
q.generatedLine = R.generatedLine, q.generatedColumn = R.generatedColumn, R.source && (q.source =
|
|
673
|
+
q.generatedLine = R.generatedLine, q.generatedColumn = R.generatedColumn, R.source && (q.source = P.indexOf(R.source), q.originalLine = R.originalLine, q.originalColumn = R.originalColumn, R.name && (q.name = A.indexOf(R.name)), U.push(q)), O.push(q);
|
|
674
674
|
}
|
|
675
675
|
return o(T.__originalMappings, a.compareByOriginalPositions), T;
|
|
676
676
|
}, h.prototype._version = 3, Object.defineProperty(h.prototype, "sources", {
|
|
@@ -682,62 +682,62 @@ function Ba() {
|
|
|
682
682
|
this.generatedLine = 0, this.generatedColumn = 0, this.source = null, this.originalLine = null, this.originalColumn = null, this.name = null;
|
|
683
683
|
}
|
|
684
684
|
const g = a.compareByGeneratedPositionsDeflatedNoLine;
|
|
685
|
-
function
|
|
686
|
-
let I =
|
|
685
|
+
function b(w, v) {
|
|
686
|
+
let I = w.length, T = w.length - v;
|
|
687
687
|
if (!(T <= 1))
|
|
688
688
|
if (T == 2) {
|
|
689
|
-
let A = v
|
|
690
|
-
g(A,
|
|
689
|
+
let A = w[v], P = w[v + 1];
|
|
690
|
+
g(A, P) > 0 && (w[v] = P, w[v + 1] = A);
|
|
691
691
|
} else if (T < 20)
|
|
692
|
-
for (let A =
|
|
693
|
-
for (let
|
|
694
|
-
let m =
|
|
692
|
+
for (let A = v; A < I; A++)
|
|
693
|
+
for (let P = A; P > v; P--) {
|
|
694
|
+
let m = w[P - 1], O = w[P];
|
|
695
695
|
if (g(m, O) <= 0)
|
|
696
696
|
break;
|
|
697
|
-
|
|
697
|
+
w[P - 1] = O, w[P] = m;
|
|
698
698
|
}
|
|
699
699
|
else
|
|
700
|
-
o(
|
|
700
|
+
o(w, g, v);
|
|
701
701
|
}
|
|
702
|
-
h.prototype._parseMappings = function(
|
|
703
|
-
var T = 1, A = 0,
|
|
702
|
+
h.prototype._parseMappings = function(v, I) {
|
|
703
|
+
var T = 1, A = 0, P = 0, m = 0, O = 0, U = 0, D = v.length, B = 0, R = {}, q = [], M = [], k, _, N, me;
|
|
704
704
|
let ce = 0;
|
|
705
705
|
for (; B < D; )
|
|
706
|
-
if (
|
|
707
|
-
T++, B++, A = 0,
|
|
708
|
-
else if (
|
|
706
|
+
if (v.charAt(B) === ";")
|
|
707
|
+
T++, B++, A = 0, b(M, ce), ce = M.length;
|
|
708
|
+
else if (v.charAt(B) === ",")
|
|
709
709
|
B++;
|
|
710
710
|
else {
|
|
711
|
-
for (k = new d(), k.generatedLine = T, N = B; N < D && !this._charIsMappingSeparator(
|
|
711
|
+
for (k = new d(), k.generatedLine = T, N = B; N < D && !this._charIsMappingSeparator(v, N); N++)
|
|
712
712
|
;
|
|
713
|
-
for (
|
|
714
|
-
r.decode(
|
|
713
|
+
for (v.slice(B, N), _ = []; B < N; )
|
|
714
|
+
r.decode(v, B, R), me = R.value, B = R.rest, _.push(me);
|
|
715
715
|
if (_.length === 2)
|
|
716
716
|
throw new Error("Found a source, but no line and column");
|
|
717
717
|
if (_.length === 3)
|
|
718
718
|
throw new Error("Found a source and line, but no column");
|
|
719
|
-
if (k.generatedColumn = A + _[0], A = k.generatedColumn, _.length > 1 && (k.source = O + _[1], O += _[1], k.originalLine =
|
|
719
|
+
if (k.generatedColumn = A + _[0], A = k.generatedColumn, _.length > 1 && (k.source = O + _[1], O += _[1], k.originalLine = P + _[2], P = k.originalLine, k.originalLine += 1, k.originalColumn = m + _[3], m = k.originalColumn, _.length > 4 && (k.name = U + _[4], U += _[4])), M.push(k), typeof k.originalLine == "number") {
|
|
720
720
|
let he = k.source;
|
|
721
721
|
for (; q.length <= he; )
|
|
722
722
|
q.push(null);
|
|
723
723
|
q[he] === null && (q[he] = []), q[he].push(k);
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
|
|
726
|
+
b(M, ce), this.__generatedMappings = M;
|
|
727
727
|
for (var ye = 0; ye < q.length; ye++)
|
|
728
728
|
q[ye] != null && o(q[ye], a.compareByOriginalPositionsNoSource);
|
|
729
729
|
this.__originalMappings = [].concat(...q);
|
|
730
|
-
}, h.prototype._findMapping = function(
|
|
731
|
-
if (
|
|
732
|
-
throw new TypeError("Line must be greater than or equal to 1, got " +
|
|
733
|
-
if (
|
|
734
|
-
throw new TypeError("Column must be greater than or equal to 0, got " +
|
|
735
|
-
return l.search(
|
|
730
|
+
}, h.prototype._findMapping = function(v, I, T, A, P, m) {
|
|
731
|
+
if (v[T] <= 0)
|
|
732
|
+
throw new TypeError("Line must be greater than or equal to 1, got " + v[T]);
|
|
733
|
+
if (v[A] < 0)
|
|
734
|
+
throw new TypeError("Column must be greater than or equal to 0, got " + v[A]);
|
|
735
|
+
return l.search(v, I, P, m);
|
|
736
736
|
}, h.prototype.computeColumnSpans = function() {
|
|
737
|
-
for (var
|
|
738
|
-
var I = this._generatedMappings[
|
|
739
|
-
if (
|
|
740
|
-
var T = this._generatedMappings[
|
|
737
|
+
for (var v = 0; v < this._generatedMappings.length; ++v) {
|
|
738
|
+
var I = this._generatedMappings[v];
|
|
739
|
+
if (v + 1 < this._generatedMappings.length) {
|
|
740
|
+
var T = this._generatedMappings[v + 1];
|
|
741
741
|
if (I.generatedLine === T.generatedLine) {
|
|
742
742
|
I.lastGeneratedColumn = T.generatedColumn - 1;
|
|
743
743
|
continue;
|
|
@@ -745,26 +745,26 @@ function Ba() {
|
|
|
745
745
|
}
|
|
746
746
|
I.lastGeneratedColumn = 1 / 0;
|
|
747
747
|
}
|
|
748
|
-
}, h.prototype.originalPositionFor = function(
|
|
748
|
+
}, h.prototype.originalPositionFor = function(v) {
|
|
749
749
|
var I = {
|
|
750
|
-
generatedLine: a.getArg(
|
|
751
|
-
generatedColumn: a.getArg(
|
|
750
|
+
generatedLine: a.getArg(v, "line"),
|
|
751
|
+
generatedColumn: a.getArg(v, "column")
|
|
752
752
|
}, T = this._findMapping(
|
|
753
753
|
I,
|
|
754
754
|
this._generatedMappings,
|
|
755
755
|
"generatedLine",
|
|
756
756
|
"generatedColumn",
|
|
757
757
|
a.compareByGeneratedPositionsDeflated,
|
|
758
|
-
a.getArg(
|
|
758
|
+
a.getArg(v, "bias", u.GREATEST_LOWER_BOUND)
|
|
759
759
|
);
|
|
760
760
|
if (T >= 0) {
|
|
761
761
|
var A = this._generatedMappings[T];
|
|
762
762
|
if (A.generatedLine === I.generatedLine) {
|
|
763
|
-
var
|
|
764
|
-
|
|
763
|
+
var P = a.getArg(A, "source", null);
|
|
764
|
+
P !== null && (P = this._sources.at(P), P = a.computeSourceURL(this.sourceRoot, P, this._sourceMapURL));
|
|
765
765
|
var m = a.getArg(A, "name", null);
|
|
766
766
|
return m !== null && (m = this._names.at(m)), {
|
|
767
|
-
source:
|
|
767
|
+
source: P,
|
|
768
768
|
line: a.getArg(A, "originalLine", null),
|
|
769
769
|
column: a.getArg(A, "originalColumn", null),
|
|
770
770
|
name: m
|
|
@@ -778,30 +778,30 @@ function Ba() {
|
|
|
778
778
|
name: null
|
|
779
779
|
};
|
|
780
780
|
}, h.prototype.hasContentsOfAllSources = function() {
|
|
781
|
-
return this.sourcesContent ? this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(
|
|
782
|
-
return
|
|
781
|
+
return this.sourcesContent ? this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(v) {
|
|
782
|
+
return v == null;
|
|
783
783
|
}) : !1;
|
|
784
|
-
}, h.prototype.sourceContentFor = function(
|
|
784
|
+
}, h.prototype.sourceContentFor = function(v, I) {
|
|
785
785
|
if (!this.sourcesContent)
|
|
786
786
|
return null;
|
|
787
|
-
var T = this._findSourceIndex(
|
|
787
|
+
var T = this._findSourceIndex(v);
|
|
788
788
|
if (T >= 0)
|
|
789
789
|
return this.sourcesContent[T];
|
|
790
|
-
var A =
|
|
790
|
+
var A = v;
|
|
791
791
|
this.sourceRoot != null && (A = a.relative(this.sourceRoot, A));
|
|
792
|
-
var
|
|
793
|
-
if (this.sourceRoot != null && (
|
|
792
|
+
var P;
|
|
793
|
+
if (this.sourceRoot != null && (P = a.urlParse(this.sourceRoot))) {
|
|
794
794
|
var m = A.replace(/^file:\/\//, "");
|
|
795
|
-
if (
|
|
795
|
+
if (P.scheme == "file" && this._sources.has(m))
|
|
796
796
|
return this.sourcesContent[this._sources.indexOf(m)];
|
|
797
|
-
if ((!
|
|
797
|
+
if ((!P.path || P.path == "/") && this._sources.has("/" + A))
|
|
798
798
|
return this.sourcesContent[this._sources.indexOf("/" + A)];
|
|
799
799
|
}
|
|
800
800
|
if (I)
|
|
801
801
|
return null;
|
|
802
802
|
throw new Error('"' + A + '" is not in the SourceMap.');
|
|
803
|
-
}, h.prototype.generatedPositionFor = function(
|
|
804
|
-
var I = a.getArg(
|
|
803
|
+
}, h.prototype.generatedPositionFor = function(v) {
|
|
804
|
+
var I = a.getArg(v, "source");
|
|
805
805
|
if (I = this._findSourceIndex(I), I < 0)
|
|
806
806
|
return {
|
|
807
807
|
line: null,
|
|
@@ -810,23 +810,23 @@ function Ba() {
|
|
|
810
810
|
};
|
|
811
811
|
var T = {
|
|
812
812
|
source: I,
|
|
813
|
-
originalLine: a.getArg(
|
|
814
|
-
originalColumn: a.getArg(
|
|
813
|
+
originalLine: a.getArg(v, "line"),
|
|
814
|
+
originalColumn: a.getArg(v, "column")
|
|
815
815
|
}, A = this._findMapping(
|
|
816
816
|
T,
|
|
817
817
|
this._originalMappings,
|
|
818
818
|
"originalLine",
|
|
819
819
|
"originalColumn",
|
|
820
820
|
a.compareByOriginalPositions,
|
|
821
|
-
a.getArg(
|
|
821
|
+
a.getArg(v, "bias", u.GREATEST_LOWER_BOUND)
|
|
822
822
|
);
|
|
823
823
|
if (A >= 0) {
|
|
824
|
-
var
|
|
825
|
-
if (
|
|
824
|
+
var P = this._originalMappings[A];
|
|
825
|
+
if (P.source === T.source)
|
|
826
826
|
return {
|
|
827
|
-
line: a.getArg(
|
|
828
|
-
column: a.getArg(
|
|
829
|
-
lastColumn: a.getArg(
|
|
827
|
+
line: a.getArg(P, "generatedLine", null),
|
|
828
|
+
column: a.getArg(P, "generatedColumn", null),
|
|
829
|
+
lastColumn: a.getArg(P, "lastGeneratedColumn", null)
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
832
|
return {
|
|
@@ -834,15 +834,15 @@ function Ba() {
|
|
|
834
834
|
column: null,
|
|
835
835
|
lastColumn: null
|
|
836
836
|
};
|
|
837
|
-
},
|
|
838
|
-
function S(
|
|
839
|
-
var I =
|
|
840
|
-
typeof
|
|
837
|
+
}, gt.BasicSourceMapConsumer = h;
|
|
838
|
+
function S(w, v) {
|
|
839
|
+
var I = w;
|
|
840
|
+
typeof w == "string" && (I = a.parseSourceMapInput(w));
|
|
841
841
|
var T = a.getArg(I, "version"), A = a.getArg(I, "sections");
|
|
842
842
|
if (T != this._version)
|
|
843
843
|
throw new Error("Unsupported version: " + T);
|
|
844
844
|
this._sources = new i(), this._names = new i();
|
|
845
|
-
var
|
|
845
|
+
var P = {
|
|
846
846
|
line: -1,
|
|
847
847
|
column: 0
|
|
848
848
|
};
|
|
@@ -850,42 +850,42 @@ function Ba() {
|
|
|
850
850
|
if (m.url)
|
|
851
851
|
throw new Error("Support for url field in sections not implemented.");
|
|
852
852
|
var O = a.getArg(m, "offset"), U = a.getArg(O, "line"), D = a.getArg(O, "column");
|
|
853
|
-
if (U <
|
|
853
|
+
if (U < P.line || U === P.line && D < P.column)
|
|
854
854
|
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
855
|
-
return
|
|
855
|
+
return P = O, {
|
|
856
856
|
generatedOffset: {
|
|
857
857
|
// The offset fields are 0-based, but we use 1-based indices when
|
|
858
858
|
// encoding/decoding from VLQ.
|
|
859
859
|
generatedLine: U + 1,
|
|
860
860
|
generatedColumn: D + 1
|
|
861
861
|
},
|
|
862
|
-
consumer: new u(a.getArg(m, "map"),
|
|
862
|
+
consumer: new u(a.getArg(m, "map"), v)
|
|
863
863
|
};
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
866
|
return S.prototype = Object.create(u.prototype), S.prototype.constructor = u, S.prototype._version = 3, Object.defineProperty(S.prototype, "sources", {
|
|
867
867
|
get: function() {
|
|
868
|
-
for (var
|
|
869
|
-
for (var I = 0; I < this._sections[
|
|
870
|
-
|
|
871
|
-
return
|
|
868
|
+
for (var w = [], v = 0; v < this._sections.length; v++)
|
|
869
|
+
for (var I = 0; I < this._sections[v].consumer.sources.length; I++)
|
|
870
|
+
w.push(this._sections[v].consumer.sources[I]);
|
|
871
|
+
return w;
|
|
872
872
|
}
|
|
873
|
-
}), S.prototype.originalPositionFor = function(
|
|
873
|
+
}), S.prototype.originalPositionFor = function(v) {
|
|
874
874
|
var I = {
|
|
875
|
-
generatedLine: a.getArg(
|
|
876
|
-
generatedColumn: a.getArg(
|
|
875
|
+
generatedLine: a.getArg(v, "line"),
|
|
876
|
+
generatedColumn: a.getArg(v, "column")
|
|
877
877
|
}, T = l.search(
|
|
878
878
|
I,
|
|
879
879
|
this._sections,
|
|
880
|
-
function(
|
|
881
|
-
var O =
|
|
882
|
-
return O ||
|
|
880
|
+
function(P, m) {
|
|
881
|
+
var O = P.generatedLine - m.generatedOffset.generatedLine;
|
|
882
|
+
return O || P.generatedColumn - m.generatedOffset.generatedColumn;
|
|
883
883
|
}
|
|
884
884
|
), A = this._sections[T];
|
|
885
885
|
return A ? A.consumer.originalPositionFor({
|
|
886
886
|
line: I.generatedLine - (A.generatedOffset.generatedLine - 1),
|
|
887
887
|
column: I.generatedColumn - (A.generatedOffset.generatedLine === I.generatedLine ? A.generatedOffset.generatedColumn - 1 : 0),
|
|
888
|
-
bias:
|
|
888
|
+
bias: v.bias
|
|
889
889
|
}) : {
|
|
890
890
|
source: null,
|
|
891
891
|
line: null,
|
|
@@ -893,29 +893,29 @@ function Ba() {
|
|
|
893
893
|
name: null
|
|
894
894
|
};
|
|
895
895
|
}, S.prototype.hasContentsOfAllSources = function() {
|
|
896
|
-
return this._sections.every(function(
|
|
897
|
-
return
|
|
896
|
+
return this._sections.every(function(v) {
|
|
897
|
+
return v.consumer.hasContentsOfAllSources();
|
|
898
898
|
});
|
|
899
|
-
}, S.prototype.sourceContentFor = function(
|
|
899
|
+
}, S.prototype.sourceContentFor = function(v, I) {
|
|
900
900
|
for (var T = 0; T < this._sections.length; T++) {
|
|
901
|
-
var A = this._sections[T],
|
|
902
|
-
if (
|
|
903
|
-
return
|
|
901
|
+
var A = this._sections[T], P = A.consumer.sourceContentFor(v, !0);
|
|
902
|
+
if (P || P === "")
|
|
903
|
+
return P;
|
|
904
904
|
}
|
|
905
905
|
if (I)
|
|
906
906
|
return null;
|
|
907
|
-
throw new Error('"' +
|
|
908
|
-
}, S.prototype.generatedPositionFor = function(
|
|
907
|
+
throw new Error('"' + v + '" is not in the SourceMap.');
|
|
908
|
+
}, S.prototype.generatedPositionFor = function(v) {
|
|
909
909
|
for (var I = 0; I < this._sections.length; I++) {
|
|
910
910
|
var T = this._sections[I];
|
|
911
|
-
if (T.consumer._findSourceIndex(a.getArg(
|
|
912
|
-
var A = T.consumer.generatedPositionFor(
|
|
911
|
+
if (T.consumer._findSourceIndex(a.getArg(v, "source")) !== -1) {
|
|
912
|
+
var A = T.consumer.generatedPositionFor(v);
|
|
913
913
|
if (A) {
|
|
914
|
-
var
|
|
914
|
+
var P = {
|
|
915
915
|
line: A.line + (T.generatedOffset.generatedLine - 1),
|
|
916
916
|
column: A.column + (T.generatedOffset.generatedLine === A.line ? T.generatedOffset.generatedColumn - 1 : 0)
|
|
917
917
|
};
|
|
918
|
-
return
|
|
918
|
+
return P;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
921
|
}
|
|
@@ -923,11 +923,11 @@ function Ba() {
|
|
|
923
923
|
line: null,
|
|
924
924
|
column: null
|
|
925
925
|
};
|
|
926
|
-
}, S.prototype._parseMappings = function(
|
|
926
|
+
}, S.prototype._parseMappings = function(v, I) {
|
|
927
927
|
this.__generatedMappings = [], this.__originalMappings = [];
|
|
928
928
|
for (var T = 0; T < this._sections.length; T++)
|
|
929
|
-
for (var A = this._sections[T],
|
|
930
|
-
var O =
|
|
929
|
+
for (var A = this._sections[T], P = A.consumer._generatedMappings, m = 0; m < P.length; m++) {
|
|
930
|
+
var O = P[m], U = A.consumer._sources.at(O.source);
|
|
931
931
|
U !== null && (U = a.computeSourceURL(A.consumer.sourceRoot, U, this._sourceMapURL)), this._sources.add(U), U = this._sources.indexOf(U);
|
|
932
932
|
var D = null;
|
|
933
933
|
O.name && (D = A.consumer._names.at(O.name), this._names.add(D), D = this._names.indexOf(D));
|
|
@@ -942,49 +942,49 @@ function Ba() {
|
|
|
942
942
|
this.__generatedMappings.push(B), typeof B.originalLine == "number" && this.__originalMappings.push(B);
|
|
943
943
|
}
|
|
944
944
|
o(this.__generatedMappings, a.compareByGeneratedPositionsDeflated), o(this.__originalMappings, a.compareByOriginalPositions);
|
|
945
|
-
},
|
|
945
|
+
}, gt.IndexedSourceMapConsumer = S, gt;
|
|
946
946
|
}
|
|
947
|
-
var
|
|
947
|
+
var Cs = {}, sr;
|
|
948
948
|
function _a() {
|
|
949
|
-
if (sr) return
|
|
949
|
+
if (sr) return Cs;
|
|
950
950
|
sr = 1;
|
|
951
951
|
var a = wr().SourceMapGenerator, l = kt(), i = /(\r?\n)/, r = 10, o = "$$$isSourceNode$$$";
|
|
952
|
-
function u(h, d, g,
|
|
953
|
-
this.children = [], this.sourceContents = {}, this.line = h ?? null, this.column = d ?? null, this.source = g ?? null, this.name = S ?? null, this[o] = !0,
|
|
952
|
+
function u(h, d, g, b, S) {
|
|
953
|
+
this.children = [], this.sourceContents = {}, this.line = h ?? null, this.column = d ?? null, this.source = g ?? null, this.name = S ?? null, this[o] = !0, b != null && this.add(b);
|
|
954
954
|
}
|
|
955
|
-
return u.fromStringWithSourceMap = function(d, g,
|
|
956
|
-
var S = new u(),
|
|
955
|
+
return u.fromStringWithSourceMap = function(d, g, b) {
|
|
956
|
+
var S = new u(), w = d.split(i), v = 0, I = function() {
|
|
957
957
|
var O = D(), U = D() || "";
|
|
958
958
|
return O + U;
|
|
959
959
|
function D() {
|
|
960
|
-
return
|
|
960
|
+
return v < w.length ? w[v++] : void 0;
|
|
961
961
|
}
|
|
962
|
-
}, T = 1, A = 0,
|
|
962
|
+
}, T = 1, A = 0, P = null;
|
|
963
963
|
return g.eachMapping(function(O) {
|
|
964
|
-
if (
|
|
964
|
+
if (P !== null)
|
|
965
965
|
if (T < O.generatedLine)
|
|
966
|
-
m(
|
|
966
|
+
m(P, I()), T++, A = 0;
|
|
967
967
|
else {
|
|
968
|
-
var U = v
|
|
969
|
-
v
|
|
968
|
+
var U = w[v] || "", D = U.substr(0, O.generatedColumn - A);
|
|
969
|
+
w[v] = U.substr(O.generatedColumn - A), A = O.generatedColumn, m(P, D), P = O;
|
|
970
970
|
return;
|
|
971
971
|
}
|
|
972
972
|
for (; T < O.generatedLine; )
|
|
973
973
|
S.add(I()), T++;
|
|
974
974
|
if (A < O.generatedColumn) {
|
|
975
|
-
var U = v
|
|
976
|
-
S.add(U.substr(0, O.generatedColumn)), v
|
|
975
|
+
var U = w[v] || "";
|
|
976
|
+
S.add(U.substr(0, O.generatedColumn)), w[v] = U.substr(O.generatedColumn), A = O.generatedColumn;
|
|
977
977
|
}
|
|
978
|
-
|
|
979
|
-
}, this),
|
|
978
|
+
P = O;
|
|
979
|
+
}, this), v < w.length && (P && m(P, I()), S.add(w.splice(v).join(""))), g.sources.forEach(function(O) {
|
|
980
980
|
var U = g.sourceContentFor(O);
|
|
981
|
-
U != null && (
|
|
981
|
+
U != null && (b != null && (O = l.join(b, O)), S.setSourceContent(O, U));
|
|
982
982
|
}), S;
|
|
983
983
|
function m(O, U) {
|
|
984
984
|
if (O === null || O.source === void 0)
|
|
985
985
|
S.add(U);
|
|
986
986
|
else {
|
|
987
|
-
var D =
|
|
987
|
+
var D = b ? l.join(b, O.source) : O.source;
|
|
988
988
|
S.add(new u(
|
|
989
989
|
O.originalLine,
|
|
990
990
|
O.originalColumn,
|
|
@@ -1018,30 +1018,30 @@ function _a() {
|
|
|
1018
1018
|
);
|
|
1019
1019
|
return this;
|
|
1020
1020
|
}, u.prototype.walk = function(d) {
|
|
1021
|
-
for (var g,
|
|
1022
|
-
g = this.children[
|
|
1021
|
+
for (var g, b = 0, S = this.children.length; b < S; b++)
|
|
1022
|
+
g = this.children[b], g[o] ? g.walk(d) : g !== "" && d(g, {
|
|
1023
1023
|
source: this.source,
|
|
1024
1024
|
line: this.line,
|
|
1025
1025
|
column: this.column,
|
|
1026
1026
|
name: this.name
|
|
1027
1027
|
});
|
|
1028
1028
|
}, u.prototype.join = function(d) {
|
|
1029
|
-
var g,
|
|
1029
|
+
var g, b, S = this.children.length;
|
|
1030
1030
|
if (S > 0) {
|
|
1031
|
-
for (g = [],
|
|
1032
|
-
g.push(this.children[
|
|
1033
|
-
g.push(this.children[
|
|
1031
|
+
for (g = [], b = 0; b < S - 1; b++)
|
|
1032
|
+
g.push(this.children[b]), g.push(d);
|
|
1033
|
+
g.push(this.children[b]), this.children = g;
|
|
1034
1034
|
}
|
|
1035
1035
|
return this;
|
|
1036
1036
|
}, u.prototype.replaceRight = function(d, g) {
|
|
1037
|
-
var
|
|
1038
|
-
return
|
|
1037
|
+
var b = this.children[this.children.length - 1];
|
|
1038
|
+
return b[o] ? b.replaceRight(d, g) : typeof b == "string" ? this.children[this.children.length - 1] = b.replace(d, g) : this.children.push("".replace(d, g)), this;
|
|
1039
1039
|
}, u.prototype.setSourceContent = function(d, g) {
|
|
1040
1040
|
this.sourceContents[l.toSetString(d)] = g;
|
|
1041
1041
|
}, u.prototype.walkSourceContents = function(d) {
|
|
1042
|
-
for (var g = 0,
|
|
1042
|
+
for (var g = 0, b = this.children.length; g < b; g++)
|
|
1043
1043
|
this.children[g][o] && this.children[g].walkSourceContents(d);
|
|
1044
|
-
for (var S = Object.keys(this.sourceContents), g = 0,
|
|
1044
|
+
for (var S = Object.keys(this.sourceContents), g = 0, b = S.length; g < b; g++)
|
|
1045
1045
|
d(l.fromSetString(S[g]), this.sourceContents[S[g]]);
|
|
1046
1046
|
}, u.prototype.toString = function() {
|
|
1047
1047
|
var d = "";
|
|
@@ -1053,53 +1053,53 @@ function _a() {
|
|
|
1053
1053
|
code: "",
|
|
1054
1054
|
line: 1,
|
|
1055
1055
|
column: 0
|
|
1056
|
-
},
|
|
1057
|
-
return this.walk(function(A,
|
|
1058
|
-
g.code += A,
|
|
1059
|
-
source:
|
|
1056
|
+
}, b = new a(d), S = !1, w = null, v = null, I = null, T = null;
|
|
1057
|
+
return this.walk(function(A, P) {
|
|
1058
|
+
g.code += A, P.source !== null && P.line !== null && P.column !== null ? ((w !== P.source || v !== P.line || I !== P.column || T !== P.name) && b.addMapping({
|
|
1059
|
+
source: P.source,
|
|
1060
1060
|
original: {
|
|
1061
|
-
line:
|
|
1062
|
-
column:
|
|
1061
|
+
line: P.line,
|
|
1062
|
+
column: P.column
|
|
1063
1063
|
},
|
|
1064
1064
|
generated: {
|
|
1065
1065
|
line: g.line,
|
|
1066
1066
|
column: g.column
|
|
1067
1067
|
},
|
|
1068
|
-
name:
|
|
1069
|
-
}),
|
|
1068
|
+
name: P.name
|
|
1069
|
+
}), w = P.source, v = P.line, I = P.column, T = P.name, S = !0) : S && (b.addMapping({
|
|
1070
1070
|
generated: {
|
|
1071
1071
|
line: g.line,
|
|
1072
1072
|
column: g.column
|
|
1073
1073
|
}
|
|
1074
|
-
}),
|
|
1074
|
+
}), w = null, S = !1);
|
|
1075
1075
|
for (var m = 0, O = A.length; m < O; m++)
|
|
1076
|
-
A.charCodeAt(m) === r ? (g.line++, g.column = 0, m + 1 === O ? (
|
|
1077
|
-
source:
|
|
1076
|
+
A.charCodeAt(m) === r ? (g.line++, g.column = 0, m + 1 === O ? (w = null, S = !1) : S && b.addMapping({
|
|
1077
|
+
source: P.source,
|
|
1078
1078
|
original: {
|
|
1079
|
-
line:
|
|
1080
|
-
column:
|
|
1079
|
+
line: P.line,
|
|
1080
|
+
column: P.column
|
|
1081
1081
|
},
|
|
1082
1082
|
generated: {
|
|
1083
1083
|
line: g.line,
|
|
1084
1084
|
column: g.column
|
|
1085
1085
|
},
|
|
1086
|
-
name:
|
|
1086
|
+
name: P.name
|
|
1087
1087
|
})) : g.column++;
|
|
1088
|
-
}), this.walkSourceContents(function(A,
|
|
1089
|
-
|
|
1090
|
-
}), { code: g.code, map:
|
|
1091
|
-
},
|
|
1088
|
+
}), this.walkSourceContents(function(A, P) {
|
|
1089
|
+
b.setSourceContent(A, P);
|
|
1090
|
+
}), { code: g.code, map: b };
|
|
1091
|
+
}, Cs.SourceNode = u, Cs;
|
|
1092
1092
|
}
|
|
1093
1093
|
var ir;
|
|
1094
1094
|
function ja() {
|
|
1095
|
-
return ir || (ir = 1,
|
|
1095
|
+
return ir || (ir = 1, yt.SourceMapGenerator = wr().SourceMapGenerator, yt.SourceMapConsumer = Ba().SourceMapConsumer, yt.SourceNode = _a().SourceNode), yt;
|
|
1096
1096
|
}
|
|
1097
1097
|
var Ra = ja();
|
|
1098
1098
|
const Us = /* @__PURE__ */ La(Ra);
|
|
1099
|
-
var
|
|
1099
|
+
var it = {}, rr;
|
|
1100
1100
|
function Ua() {
|
|
1101
|
-
if (rr) return
|
|
1102
|
-
rr = 1, Object.defineProperty(
|
|
1101
|
+
if (rr) return it;
|
|
1102
|
+
rr = 1, Object.defineProperty(it, "__esModule", {
|
|
1103
1103
|
value: !0
|
|
1104
1104
|
});
|
|
1105
1105
|
function a(p, t) {
|
|
@@ -1383,7 +1383,7 @@ function Ua() {
|
|
|
1383
1383
|
YieldInParameter: "Yield expression is not allowed in formal parameters.",
|
|
1384
1384
|
YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.",
|
|
1385
1385
|
ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
|
|
1386
|
-
},
|
|
1386
|
+
}, b = {
|
|
1387
1387
|
StrictDelete: "Deleting local variable in strict mode.",
|
|
1388
1388
|
StrictEvalArguments: ({
|
|
1389
1389
|
referenceName: p
|
|
@@ -1401,8 +1401,8 @@ function Ua() {
|
|
|
1401
1401
|
unexpected: p
|
|
1402
1402
|
}) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(p)}\`.`
|
|
1403
1403
|
};
|
|
1404
|
-
const
|
|
1405
|
-
var
|
|
1404
|
+
const w = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
|
|
1405
|
+
var v = Object.assign({
|
|
1406
1406
|
PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
|
|
1407
1407
|
PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
|
|
1408
1408
|
PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
|
|
@@ -1474,9 +1474,9 @@ function Ua() {
|
|
|
1474
1474
|
}), x;
|
|
1475
1475
|
};
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function P(p, t) {
|
|
1478
1478
|
if (Array.isArray(p))
|
|
1479
|
-
return (s) =>
|
|
1479
|
+
return (s) => P(s, p[0]);
|
|
1480
1480
|
const e = {};
|
|
1481
1481
|
for (const s of Object.keys(p)) {
|
|
1482
1482
|
const n = p[s], c = typeof n == "string" ? {
|
|
@@ -1496,7 +1496,7 @@ function Ua() {
|
|
|
1496
1496
|
}
|
|
1497
1497
|
return e;
|
|
1498
1498
|
}
|
|
1499
|
-
const m = Object.assign({},
|
|
1499
|
+
const m = Object.assign({}, P(u), P(g), P(b), P(S), P`pipelineOperator`(v));
|
|
1500
1500
|
function O() {
|
|
1501
1501
|
return {
|
|
1502
1502
|
sourceType: "script",
|
|
@@ -1838,7 +1838,7 @@ function Ua() {
|
|
|
1838
1838
|
var e, s, n, c;
|
|
1839
1839
|
return ++z, Ne.set(p, z), X.push(p), Y.push((e = t.binop) != null ? e : -1), re.push((s = t.beforeExpr) != null ? s : !1), ne.push((n = t.startsExpr) != null ? n : !1), oe.push((c = t.prefix) != null ? c : !1), V.push(new Fe("name", t)), z;
|
|
1840
1840
|
}
|
|
1841
|
-
const
|
|
1841
|
+
const Ze = {
|
|
1842
1842
|
bracketL: J("[", {
|
|
1843
1843
|
beforeExpr: _,
|
|
1844
1844
|
startsExpr: N
|
|
@@ -2248,7 +2248,7 @@ function Ua() {
|
|
|
2248
2248
|
function rn(p) {
|
|
2249
2249
|
return re[p];
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function pt(p) {
|
|
2252
2252
|
return ne[p];
|
|
2253
2253
|
}
|
|
2254
2254
|
function nn(p) {
|
|
@@ -2260,7 +2260,7 @@ function Ua() {
|
|
|
2260
2260
|
function an(p) {
|
|
2261
2261
|
return p >= 90 && p <= 92;
|
|
2262
2262
|
}
|
|
2263
|
-
function
|
|
2263
|
+
function os(p) {
|
|
2264
2264
|
return p >= 58 && p <= 92;
|
|
2265
2265
|
}
|
|
2266
2266
|
function on(p) {
|
|
@@ -2302,11 +2302,11 @@ function Ua() {
|
|
|
2302
2302
|
}, V[143].updateContext = (p) => {
|
|
2303
2303
|
p.push(k.j_expr, k.j_oTag);
|
|
2304
2304
|
};
|
|
2305
|
-
let
|
|
2306
|
-
const fn = new RegExp("[" +
|
|
2307
|
-
|
|
2305
|
+
let ls = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Hs = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
|
|
2306
|
+
const fn = new RegExp("[" + ls + "]"), dn = new RegExp("[" + ls + Hs + "]");
|
|
2307
|
+
ls = Hs = null;
|
|
2308
2308
|
const Ks = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], mn = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
2309
|
-
function
|
|
2309
|
+
function cs(p, t) {
|
|
2310
2310
|
let e = 65536;
|
|
2311
2311
|
for (let s = 0, n = t.length; s < n; s += 2) {
|
|
2312
2312
|
if (e += t[s], e > p) return !1;
|
|
@@ -2315,16 +2315,16 @@ function Ua() {
|
|
|
2315
2315
|
return !1;
|
|
2316
2316
|
}
|
|
2317
2317
|
function _e(p) {
|
|
2318
|
-
return p < 65 ? p === 36 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && fn.test(String.fromCharCode(p)) :
|
|
2318
|
+
return p < 65 ? p === 36 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && fn.test(String.fromCharCode(p)) : cs(p, Ks);
|
|
2319
2319
|
}
|
|
2320
|
-
function
|
|
2321
|
-
return p < 48 ? p === 36 : p < 58 ? !0 : p < 65 ? !1 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && dn.test(String.fromCharCode(p)) :
|
|
2320
|
+
function et(p) {
|
|
2321
|
+
return p < 48 ? p === 36 : p < 58 ? !0 : p < 65 ? !1 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && dn.test(String.fromCharCode(p)) : cs(p, Ks) || cs(p, mn);
|
|
2322
2322
|
}
|
|
2323
|
-
const
|
|
2323
|
+
const us = {
|
|
2324
2324
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
2325
2325
|
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
|
2326
2326
|
strictBind: ["eval", "arguments"]
|
|
2327
|
-
}, yn = new Set(
|
|
2327
|
+
}, yn = new Set(us.keyword), gn = new Set(us.strict), xn = new Set(us.strictBind);
|
|
2328
2328
|
function Xs(p, t) {
|
|
2329
2329
|
return t && p === "await" || p === "enum";
|
|
2330
2330
|
}
|
|
@@ -2347,12 +2347,12 @@ function Ua() {
|
|
|
2347
2347
|
function Sn(p) {
|
|
2348
2348
|
return Tn.has(p);
|
|
2349
2349
|
}
|
|
2350
|
-
class
|
|
2350
|
+
class hs {
|
|
2351
2351
|
constructor(t) {
|
|
2352
2352
|
this.flags = 0, this.names = /* @__PURE__ */ new Map(), this.firstLexicalName = "", this.flags = t;
|
|
2353
2353
|
}
|
|
2354
2354
|
}
|
|
2355
|
-
class
|
|
2355
|
+
class ps {
|
|
2356
2356
|
constructor(t, e) {
|
|
2357
2357
|
this.parser = void 0, this.scopeStack = [], this.inModule = void 0, this.undefinedExports = /* @__PURE__ */ new Map(), this.parser = t, this.inModule = e;
|
|
2358
2358
|
}
|
|
@@ -2399,7 +2399,7 @@ function Ua() {
|
|
|
2399
2399
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
2400
2400
|
}
|
|
2401
2401
|
createScope(t) {
|
|
2402
|
-
return new
|
|
2402
|
+
return new hs(t);
|
|
2403
2403
|
}
|
|
2404
2404
|
enter(t) {
|
|
2405
2405
|
this.scopeStack.push(this.createScope(t));
|
|
@@ -2464,12 +2464,12 @@ function Ua() {
|
|
|
2464
2464
|
}
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
|
-
class En extends
|
|
2467
|
+
class En extends hs {
|
|
2468
2468
|
constructor(...t) {
|
|
2469
2469
|
super(...t), this.declareFunctions = /* @__PURE__ */ new Set();
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
|
-
class An extends
|
|
2472
|
+
class An extends ps {
|
|
2473
2473
|
createScope(t) {
|
|
2474
2474
|
return new En(t);
|
|
2475
2475
|
}
|
|
@@ -2493,7 +2493,7 @@ function Ua() {
|
|
|
2493
2493
|
this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t);
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
|
-
const wn = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), G =
|
|
2496
|
+
const wn = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), G = P`flow`({
|
|
2497
2497
|
AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
|
|
2498
2498
|
AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
|
|
2499
2499
|
AssignReservedType: ({
|
|
@@ -3043,7 +3043,7 @@ function Ua() {
|
|
|
3043
3043
|
case 87:
|
|
3044
3044
|
return this.flowParseTypeofType();
|
|
3045
3045
|
default:
|
|
3046
|
-
if (
|
|
3046
|
+
if (os(this.state.type)) {
|
|
3047
3047
|
const x = Re(this.state.type);
|
|
3048
3048
|
return this.next(), super.createIdentifier(s, x);
|
|
3049
3049
|
} else if (se(this.state.type))
|
|
@@ -4144,7 +4144,7 @@ function Ua() {
|
|
|
4144
4144
|
hearts: "♥",
|
|
4145
4145
|
diams: "♦"
|
|
4146
4146
|
}, On = /\r\n|[\r\n\u2028\u2029]/, _t = new RegExp(On.source, "g");
|
|
4147
|
-
function
|
|
4147
|
+
function tt(p) {
|
|
4148
4148
|
switch (p) {
|
|
4149
4149
|
case 10:
|
|
4150
4150
|
case 13:
|
|
@@ -4157,11 +4157,11 @@ function Ua() {
|
|
|
4157
4157
|
}
|
|
4158
4158
|
function ei(p, t, e) {
|
|
4159
4159
|
for (let s = t; s < e; s++)
|
|
4160
|
-
if (
|
|
4160
|
+
if (tt(p.charCodeAt(s)))
|
|
4161
4161
|
return !0;
|
|
4162
4162
|
return !1;
|
|
4163
4163
|
}
|
|
4164
|
-
const
|
|
4164
|
+
const fs = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ds = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
|
|
4165
4165
|
function Dn(p) {
|
|
4166
4166
|
switch (p) {
|
|
4167
4167
|
case 9:
|
|
@@ -4190,7 +4190,7 @@ function Ua() {
|
|
|
4190
4190
|
return !1;
|
|
4191
4191
|
}
|
|
4192
4192
|
}
|
|
4193
|
-
const He =
|
|
4193
|
+
const He = P`jsx`({
|
|
4194
4194
|
AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
|
|
4195
4195
|
MissingClosingTagElement: ({
|
|
4196
4196
|
openingTagName: p
|
|
@@ -4208,13 +4208,13 @@ function Ua() {
|
|
|
4208
4208
|
function Ue(p) {
|
|
4209
4209
|
return p ? p.type === "JSXOpeningFragment" || p.type === "JSXClosingFragment" : !1;
|
|
4210
4210
|
}
|
|
4211
|
-
function
|
|
4211
|
+
function st(p) {
|
|
4212
4212
|
if (p.type === "JSXIdentifier")
|
|
4213
4213
|
return p.name;
|
|
4214
4214
|
if (p.type === "JSXNamespacedName")
|
|
4215
4215
|
return p.namespace.name + ":" + p.name.name;
|
|
4216
4216
|
if (p.type === "JSXMemberExpression")
|
|
4217
|
-
return
|
|
4217
|
+
return st(p.object) + "." + st(p.property);
|
|
4218
4218
|
throw new Error("Node had unexpected type: " + p.type);
|
|
4219
4219
|
}
|
|
4220
4220
|
var Mn = (p) => class extends p {
|
|
@@ -4239,7 +4239,7 @@ function Ua() {
|
|
|
4239
4239
|
case 62:
|
|
4240
4240
|
case 125:
|
|
4241
4241
|
default:
|
|
4242
|
-
|
|
4242
|
+
tt(n) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(!0), s = this.state.pos) : ++this.state.pos;
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
4245
|
}
|
|
@@ -4257,7 +4257,7 @@ function Ua() {
|
|
|
4257
4257
|
throw this.raise(m.UnterminatedString, this.state.startLoc);
|
|
4258
4258
|
const c = this.input.charCodeAt(this.state.pos);
|
|
4259
4259
|
if (c === e) break;
|
|
4260
|
-
c === 38 ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadEntity(), n = this.state.pos) :
|
|
4260
|
+
c === 38 ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadEntity(), n = this.state.pos) : tt(c) ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadNewLine(!1), n = this.state.pos) : ++this.state.pos;
|
|
4261
4261
|
}
|
|
4262
4262
|
s += this.input.slice(n, this.state.pos++), this.finishToken(134, s);
|
|
4263
4263
|
}
|
|
@@ -4287,12 +4287,12 @@ function Ua() {
|
|
|
4287
4287
|
const s = this.state.pos;
|
|
4288
4288
|
do
|
|
4289
4289
|
e = this.input.charCodeAt(++this.state.pos);
|
|
4290
|
-
while (
|
|
4290
|
+
while (et(e) || e === 45);
|
|
4291
4291
|
this.finishToken(141, this.input.slice(s, this.state.pos));
|
|
4292
4292
|
}
|
|
4293
4293
|
jsxParseIdentifier() {
|
|
4294
4294
|
const e = this.startNode();
|
|
4295
|
-
return this.match(141) ? e.name = this.state.value :
|
|
4295
|
+
return this.match(141) ? e.name = this.state.value : os(this.state.type) ? e.name = Re(this.state.type) : this.unexpected(), this.next(), this.finishNode(e, "JSXIdentifier");
|
|
4296
4296
|
}
|
|
4297
4297
|
jsxParseNamespacedName() {
|
|
4298
4298
|
const e = this.state.startLoc, s = this.jsxParseIdentifier();
|
|
@@ -4382,9 +4382,9 @@ function Ua() {
|
|
|
4382
4382
|
this.unexpected();
|
|
4383
4383
|
}
|
|
4384
4384
|
Ue(c) && !Ue(f) && f !== null ? this.raise(He.MissingClosingTagFragment, f) : !Ue(c) && Ue(f) ? this.raise(He.MissingClosingTagElement, f, {
|
|
4385
|
-
openingTagName:
|
|
4386
|
-
}) : !Ue(c) && !Ue(f) &&
|
|
4387
|
-
openingTagName:
|
|
4385
|
+
openingTagName: st(c.name)
|
|
4386
|
+
}) : !Ue(c) && !Ue(f) && st(f.name) !== st(c.name) && this.raise(He.MissingClosingTagElement, f, {
|
|
4387
|
+
openingTagName: st(c.name)
|
|
4388
4388
|
});
|
|
4389
4389
|
}
|
|
4390
4390
|
if (Ue(c) ? (s.openingFragment = c, s.closingFragment = f) : (s.openingElement = c, s.closingElement = f), s.children = n, this.match(47))
|
|
@@ -4449,12 +4449,12 @@ function Ua() {
|
|
|
4449
4449
|
this.state.canStartJSXElement = rn(n);
|
|
4450
4450
|
}
|
|
4451
4451
|
};
|
|
4452
|
-
class Fn extends
|
|
4452
|
+
class Fn extends hs {
|
|
4453
4453
|
constructor(...t) {
|
|
4454
4454
|
super(...t), this.tsNames = /* @__PURE__ */ new Map();
|
|
4455
4455
|
}
|
|
4456
4456
|
}
|
|
4457
|
-
class Bn extends
|
|
4457
|
+
class Bn extends ps {
|
|
4458
4458
|
constructor(...t) {
|
|
4459
4459
|
super(...t), this.importsStack = [];
|
|
4460
4460
|
}
|
|
@@ -4582,14 +4582,14 @@ function Ua() {
|
|
|
4582
4582
|
function Rn(p, t) {
|
|
4583
4583
|
p.leadingComments === void 0 ? p.leadingComments = t : p.leadingComments.unshift(...t);
|
|
4584
4584
|
}
|
|
4585
|
-
function
|
|
4585
|
+
function ft(p, t) {
|
|
4586
4586
|
p.innerComments === void 0 ? p.innerComments = t : p.innerComments.unshift(...t);
|
|
4587
4587
|
}
|
|
4588
4588
|
function $e(p, t, e) {
|
|
4589
4589
|
let s = null, n = t.length;
|
|
4590
4590
|
for (; s === null && n > 0; )
|
|
4591
4591
|
s = t[--n];
|
|
4592
|
-
s === null || s.start > e.start ?
|
|
4592
|
+
s === null || s.start > e.start ? ft(p, e.comments) : ti(s, e.comments);
|
|
4593
4593
|
}
|
|
4594
4594
|
class Un extends jn {
|
|
4595
4595
|
addComment(t) {
|
|
@@ -4670,10 +4670,10 @@ function Ua() {
|
|
|
4670
4670
|
$e(n, n.members, t);
|
|
4671
4671
|
break;
|
|
4672
4672
|
default:
|
|
4673
|
-
|
|
4673
|
+
ft(n, s);
|
|
4674
4674
|
}
|
|
4675
4675
|
else
|
|
4676
|
-
|
|
4676
|
+
ft(n, s);
|
|
4677
4677
|
}
|
|
4678
4678
|
}
|
|
4679
4679
|
finalizeRemainingComments() {
|
|
@@ -4711,7 +4711,7 @@ function Ua() {
|
|
|
4711
4711
|
}
|
|
4712
4712
|
}
|
|
4713
4713
|
}
|
|
4714
|
-
class
|
|
4714
|
+
class ms {
|
|
4715
4715
|
constructor() {
|
|
4716
4716
|
this.flags = 1024, this.startIndex = void 0, this.curLine = void 0, this.lineStart = void 0, this.startLoc = void 0, this.endLoc = void 0, this.errors = [], this.potentialArrowAt = -1, this.noArrowAt = [], this.noArrowParamsConversionAt = [], this.topicContext = {
|
|
4717
4717
|
maxNumOfResolvableTopics: 0,
|
|
@@ -4809,7 +4809,7 @@ function Ua() {
|
|
|
4809
4809
|
return new l(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
4810
4810
|
}
|
|
4811
4811
|
clone() {
|
|
4812
|
-
const t = new
|
|
4812
|
+
const t = new ms();
|
|
4813
4813
|
return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value = this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors, t.tokensLength = this.tokensLength, t;
|
|
4814
4814
|
}
|
|
4815
4815
|
}
|
|
@@ -4888,7 +4888,7 @@ function Ua() {
|
|
|
4888
4888
|
return {
|
|
4889
4889
|
code: E,
|
|
4890
4890
|
pos: t
|
|
4891
|
-
} =
|
|
4891
|
+
} = ys(p, t, e, s, 2, !1, f, c), y(E === null ? null : String.fromCharCode(E));
|
|
4892
4892
|
}
|
|
4893
4893
|
case 117: {
|
|
4894
4894
|
let E;
|
|
@@ -4933,7 +4933,7 @@ function Ua() {
|
|
|
4933
4933
|
return y(String.fromCharCode(x));
|
|
4934
4934
|
}
|
|
4935
4935
|
}
|
|
4936
|
-
function
|
|
4936
|
+
function ys(p, t, e, s, n, c, f, y) {
|
|
4937
4937
|
const x = t;
|
|
4938
4938
|
let E;
|
|
4939
4939
|
return {
|
|
@@ -5000,7 +5000,7 @@ function Ua() {
|
|
|
5000
5000
|
if (++t, {
|
|
5001
5001
|
code: y,
|
|
5002
5002
|
pos: t
|
|
5003
|
-
} =
|
|
5003
|
+
} = ys(p, t, e, s, p.indexOf("}", t) - t, !0, n, c), ++t, y !== null && y > 1114111)
|
|
5004
5004
|
if (n)
|
|
5005
5005
|
c.invalidCodePoint(t, e, s);
|
|
5006
5006
|
else
|
|
@@ -5012,13 +5012,13 @@ function Ua() {
|
|
|
5012
5012
|
({
|
|
5013
5013
|
code: y,
|
|
5014
5014
|
pos: t
|
|
5015
|
-
} =
|
|
5015
|
+
} = ys(p, t, e, s, 4, !1, n, c));
|
|
5016
5016
|
return {
|
|
5017
5017
|
code: y,
|
|
5018
5018
|
pos: t
|
|
5019
5019
|
};
|
|
5020
5020
|
}
|
|
5021
|
-
function
|
|
5021
|
+
function dt(p, t, e) {
|
|
5022
5022
|
return new l(e, p - t, p);
|
|
5023
5023
|
}
|
|
5024
5024
|
const zn = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
|
|
@@ -5031,7 +5031,7 @@ function Ua() {
|
|
|
5031
5031
|
class Wn extends Un {
|
|
5032
5032
|
constructor(t, e) {
|
|
5033
5033
|
super(), this.isLookahead = void 0, this.tokens = [], this.errorHandlers_readInt = {
|
|
5034
|
-
invalidDigit: (s, n, c, f) => this.optionFlags & 2048 ? (this.raise(m.InvalidDigit,
|
|
5034
|
+
invalidDigit: (s, n, c, f) => this.optionFlags & 2048 ? (this.raise(m.InvalidDigit, dt(s, n, c), {
|
|
5035
5035
|
radix: f
|
|
5036
5036
|
}), !0) : !1,
|
|
5037
5037
|
numericSeparatorInEscapeSequence: this.errorBuilder(m.NumericSeparatorInEscapeSequence),
|
|
@@ -5041,17 +5041,17 @@ function Ua() {
|
|
|
5041
5041
|
invalidCodePoint: this.errorBuilder(m.InvalidCodePoint)
|
|
5042
5042
|
}), this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
5043
5043
|
strictNumericEscape: (s, n, c) => {
|
|
5044
|
-
this.recordStrictModeErrors(m.StrictNumericEscape,
|
|
5044
|
+
this.recordStrictModeErrors(m.StrictNumericEscape, dt(s, n, c));
|
|
5045
5045
|
},
|
|
5046
5046
|
unterminated: (s, n, c) => {
|
|
5047
|
-
throw this.raise(m.UnterminatedString,
|
|
5047
|
+
throw this.raise(m.UnterminatedString, dt(s - 1, n, c));
|
|
5048
5048
|
}
|
|
5049
5049
|
}), this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
5050
5050
|
strictNumericEscape: this.errorBuilder(m.StrictNumericEscape),
|
|
5051
5051
|
unterminated: (s, n, c) => {
|
|
5052
|
-
throw this.raise(m.UnterminatedTemplate,
|
|
5052
|
+
throw this.raise(m.UnterminatedTemplate, dt(s, n, c));
|
|
5053
5053
|
}
|
|
5054
|
-
}), this.state = new
|
|
5054
|
+
}), this.state = new ms(), this.state.init(t), this.input = e, this.length = e.length, this.comments = [], this.isLookahead = !1;
|
|
5055
5055
|
}
|
|
5056
5056
|
pushToken(t) {
|
|
5057
5057
|
this.tokens.length = this.state.tokensLength, this.tokens.push(t), ++this.state.tokensLength;
|
|
@@ -5091,7 +5091,7 @@ function Ua() {
|
|
|
5091
5091
|
return this.nextTokenStartSince(this.state.pos);
|
|
5092
5092
|
}
|
|
5093
5093
|
nextTokenStartSince(t) {
|
|
5094
|
-
return
|
|
5094
|
+
return fs.lastIndex = t, fs.test(this.input) ? fs.lastIndex : t;
|
|
5095
5095
|
}
|
|
5096
5096
|
lookaheadCharCode() {
|
|
5097
5097
|
return this.lookaheadCharCodeSince(this.state.pos);
|
|
@@ -5103,7 +5103,7 @@ function Ua() {
|
|
|
5103
5103
|
return this.nextTokenInLineStartSince(this.state.pos);
|
|
5104
5104
|
}
|
|
5105
5105
|
nextTokenInLineStartSince(t) {
|
|
5106
|
-
return
|
|
5106
|
+
return ds.lastIndex = t, ds.test(this.input) ? ds.lastIndex : t;
|
|
5107
5107
|
}
|
|
5108
5108
|
lookaheadInLineCharCode() {
|
|
5109
5109
|
return this.input.charCodeAt(this.nextTokenInLineStart());
|
|
@@ -5153,7 +5153,7 @@ function Ua() {
|
|
|
5153
5153
|
this.isLookahead || (s = this.state.curPosition());
|
|
5154
5154
|
let n = this.input.charCodeAt(this.state.pos += t);
|
|
5155
5155
|
if (this.state.pos < this.length)
|
|
5156
|
-
for (; !
|
|
5156
|
+
for (; !tt(n) && ++this.state.pos < this.length; )
|
|
5157
5157
|
n = this.input.charCodeAt(this.state.pos);
|
|
5158
5158
|
if (this.isLookahead) return;
|
|
5159
5159
|
const c = this.state.pos, y = {
|
|
@@ -5267,7 +5267,7 @@ function Ua() {
|
|
|
5267
5267
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
5268
5268
|
if (t !== 33) return !1;
|
|
5269
5269
|
const e = this.state.pos;
|
|
5270
|
-
for (this.state.pos += 1; !
|
|
5270
|
+
for (this.state.pos += 1; !tt(t) && ++this.state.pos < this.length; )
|
|
5271
5271
|
t = this.input.charCodeAt(this.state.pos);
|
|
5272
5272
|
const s = this.input.slice(e + 2, this.state.pos);
|
|
5273
5273
|
return this.finishToken(28, s), !0;
|
|
@@ -5521,7 +5521,7 @@ function Ua() {
|
|
|
5521
5521
|
if (c >= this.length)
|
|
5522
5522
|
throw this.raise(m.UnterminatedRegExp, r(t, 1));
|
|
5523
5523
|
const E = this.input.charCodeAt(c);
|
|
5524
|
-
if (
|
|
5524
|
+
if (tt(E))
|
|
5525
5525
|
throw this.raise(m.UnterminatedRegExp, r(t, 1));
|
|
5526
5526
|
if (s)
|
|
5527
5527
|
s = !1;
|
|
@@ -5543,7 +5543,7 @@ function Ua() {
|
|
|
5543
5543
|
const E = this.codePointAtPos(c), C = String.fromCharCode(E);
|
|
5544
5544
|
if (zn.has(E))
|
|
5545
5545
|
E === 118 ? y.includes("u") && this.raise(m.IncompatibleRegExpUVFlags, x()) : E === 117 && y.includes("v") && this.raise(m.IncompatibleRegExpUVFlags, x()), y.includes(C) && this.raise(m.DuplicateRegExpFlags, x());
|
|
5546
|
-
else if (
|
|
5546
|
+
else if (et(E) || E === 92)
|
|
5547
5547
|
this.raise(m.MalformedRegExpFlags, x());
|
|
5548
5548
|
else
|
|
5549
5549
|
break;
|
|
@@ -5655,11 +5655,11 @@ function Ua() {
|
|
|
5655
5655
|
let n = this.state.pos;
|
|
5656
5656
|
for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length; ) {
|
|
5657
5657
|
const c = this.codePointAtPos(this.state.pos);
|
|
5658
|
-
if (
|
|
5658
|
+
if (et(c))
|
|
5659
5659
|
this.state.pos += c <= 65535 ? 1 : 2;
|
|
5660
5660
|
else if (c === 92) {
|
|
5661
5661
|
this.state.containsEsc = !0, e += this.input.slice(n, this.state.pos);
|
|
5662
|
-
const f = this.state.curPosition(), y = this.state.pos === s ? _e :
|
|
5662
|
+
const f = this.state.curPosition(), y = this.state.pos === s ? _e : et;
|
|
5663
5663
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
5664
5664
|
this.raise(m.MissingUnicodeEscape, this.state.curPosition()), n = this.state.pos - 1;
|
|
5665
5665
|
continue;
|
|
@@ -5680,7 +5680,7 @@ function Ua() {
|
|
|
5680
5680
|
const {
|
|
5681
5681
|
type: t
|
|
5682
5682
|
} = this.state;
|
|
5683
|
-
|
|
5683
|
+
os(t) && this.state.containsEsc && this.raise(m.InvalidEscapedReservedWord, this.state.startLoc, {
|
|
5684
5684
|
reservedWord: Re(t)
|
|
5685
5685
|
});
|
|
5686
5686
|
}
|
|
@@ -5721,7 +5721,7 @@ function Ua() {
|
|
|
5721
5721
|
}
|
|
5722
5722
|
errorBuilder(t) {
|
|
5723
5723
|
return (e, s, n) => {
|
|
5724
|
-
this.raise(t,
|
|
5724
|
+
this.raise(t, dt(e, s, n));
|
|
5725
5725
|
};
|
|
5726
5726
|
}
|
|
5727
5727
|
}
|
|
@@ -5884,7 +5884,7 @@ function Ua() {
|
|
|
5884
5884
|
isUnparsedContextual(t, e) {
|
|
5885
5885
|
if (this.input.startsWith(e, t)) {
|
|
5886
5886
|
const s = this.input.charCodeAt(t + e.length);
|
|
5887
|
-
return !(
|
|
5887
|
+
return !(et(s) || (s & 64512) === 55296);
|
|
5888
5888
|
}
|
|
5889
5889
|
return !1;
|
|
5890
5890
|
}
|
|
@@ -6040,8 +6040,8 @@ function Ua() {
|
|
|
6040
6040
|
this.type = "", this.start = e, this.end = 0, this.loc = new i(s), t?.optionFlags & 128 && (this.range = [e, 0]), t != null && t.filename && (this.loc.filename = t.filename);
|
|
6041
6041
|
}
|
|
6042
6042
|
}
|
|
6043
|
-
const
|
|
6044
|
-
|
|
6043
|
+
const gs = Vt.prototype;
|
|
6044
|
+
gs.__clone = function() {
|
|
6045
6045
|
const p = new Vt(void 0, this.start, this.loc.start), t = Object.keys(this);
|
|
6046
6046
|
for (let e = 0, s = t.length; e < s; e++) {
|
|
6047
6047
|
const n = t[e];
|
|
@@ -6086,7 +6086,7 @@ function Ua() {
|
|
|
6086
6086
|
loc: c,
|
|
6087
6087
|
range: f,
|
|
6088
6088
|
name: y
|
|
6089
|
-
} = t, x = Object.create(
|
|
6089
|
+
} = t, x = Object.create(gs);
|
|
6090
6090
|
return x.type = e, x.start = s, x.end = n, x.loc = c, x.range = f, x.name = y, t.extra && (x.extra = t.extra), x;
|
|
6091
6091
|
}
|
|
6092
6092
|
cloneStringLiteral(t) {
|
|
@@ -6097,7 +6097,7 @@ function Ua() {
|
|
|
6097
6097
|
loc: c,
|
|
6098
6098
|
range: f,
|
|
6099
6099
|
extra: y
|
|
6100
|
-
} = t, x = Object.create(
|
|
6100
|
+
} = t, x = Object.create(gs);
|
|
6101
6101
|
return x.type = e, x.start = s, x.end = n, x.loc = c, x.range = f, x.extra = y, x.value = t.value, x;
|
|
6102
6102
|
}
|
|
6103
6103
|
}
|
|
@@ -6378,7 +6378,7 @@ function Ua() {
|
|
|
6378
6378
|
if (!p)
|
|
6379
6379
|
throw new Error("Assert fail");
|
|
6380
6380
|
}
|
|
6381
|
-
const H =
|
|
6381
|
+
const H = P`typescript`({
|
|
6382
6382
|
AbstractMethodHasImplementation: ({
|
|
6383
6383
|
methodName: p
|
|
6384
6384
|
}) => `Method '${p}' cannot have an implementation because it is marked abstract.`,
|
|
@@ -7393,7 +7393,7 @@ function Ua() {
|
|
|
7393
7393
|
return $.callee = e, $.arguments = this.parseCallExpressionArguments(), this.tsCheckForInvalidTypeCasts($.arguments), $.typeParameters = E, c.optionalChainMember && ($.optional = f), this.finishCallExpression($, c.optionalChainMember);
|
|
7394
7394
|
}
|
|
7395
7395
|
const C = this.state.type;
|
|
7396
|
-
if (C === 48 || C === 52 || C !== 10 &&
|
|
7396
|
+
if (C === 48 || C === 52 || C !== 10 && pt(C) && !this.hasPrecedingLineBreak())
|
|
7397
7397
|
return;
|
|
7398
7398
|
const F = this.startNodeAt(s);
|
|
7399
7399
|
return F.expression = e, F.typeParameters = E, this.finishNode(F, "TSInstantiationExpression");
|
|
@@ -8050,7 +8050,7 @@ function Ua() {
|
|
|
8050
8050
|
function pi(p) {
|
|
8051
8051
|
return p.type === "Identifier" ? !0 : p.type !== "MemberExpression" || p.computed ? !1 : pi(p.object);
|
|
8052
8052
|
}
|
|
8053
|
-
const fi =
|
|
8053
|
+
const fi = P`placeholders`({
|
|
8054
8054
|
ClassNameIsRequired: "A class name is required.",
|
|
8055
8055
|
UnexpectedSpace: "Unexpected space in placeholder."
|
|
8056
8056
|
});
|
|
@@ -8338,7 +8338,7 @@ function Ua() {
|
|
|
8338
8338
|
const {
|
|
8339
8339
|
type: x
|
|
8340
8340
|
} = this.state;
|
|
8341
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
8341
|
+
if ((this.hasPlugin("v8intrinsic") ? pt(x) : pt(x) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
8342
8342
|
return this.raiseOverwrite(m.YieldNotInGeneratorFunction, s), this.parseYield(s);
|
|
8343
8343
|
}
|
|
8344
8344
|
return y;
|
|
@@ -8422,7 +8422,7 @@ function Ua() {
|
|
|
8422
8422
|
const {
|
|
8423
8423
|
startLoc: e
|
|
8424
8424
|
} = this.state, s = this.parseMaybeAssign();
|
|
8425
|
-
return
|
|
8425
|
+
return w.has(s.type) && !((t = s.extra) != null && t.parenthesized) && this.raise(m.PipeUnparenthesizedBody, e, {
|
|
8426
8426
|
type: s.type
|
|
8427
8427
|
}), this.topicReferenceWasUsedInCurrentContext() || this.raise(m.PipeTopicUnused, e), s;
|
|
8428
8428
|
}
|
|
@@ -8452,7 +8452,7 @@ function Ua() {
|
|
|
8452
8452
|
const {
|
|
8453
8453
|
type: x
|
|
8454
8454
|
} = this.state;
|
|
8455
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
8455
|
+
if ((this.hasPlugin("v8intrinsic") ? pt(x) : pt(x) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
8456
8456
|
return this.raiseOverwrite(m.AwaitNotInAsyncContext, s), this.parseAwait(s);
|
|
8457
8457
|
}
|
|
8458
8458
|
return y;
|
|
@@ -8571,7 +8571,7 @@ function Ua() {
|
|
|
8571
8571
|
}
|
|
8572
8572
|
parseAsyncArrowFromCallExpression(t, e) {
|
|
8573
8573
|
var s;
|
|
8574
|
-
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, !0, (s = e.extra) == null ? void 0 : s.trailingCommaLoc), e.innerComments &&
|
|
8574
|
+
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, !0, (s = e.extra) == null ? void 0 : s.trailingCommaLoc), e.innerComments && ft(t, e.innerComments), e.callee.trailingComments && ft(t, e.callee.trailingComments), t;
|
|
8575
8575
|
}
|
|
8576
8576
|
parseNoCallExpr() {
|
|
8577
8577
|
const t = this.state.startLoc;
|
|
@@ -9338,11 +9338,11 @@ function Ua() {
|
|
|
9338
9338
|
parsePropertyNamePrefixOperator(t) {
|
|
9339
9339
|
}
|
|
9340
9340
|
}
|
|
9341
|
-
const
|
|
9341
|
+
const xs = {
|
|
9342
9342
|
kind: 1
|
|
9343
9343
|
}, fa = {
|
|
9344
9344
|
kind: 2
|
|
9345
|
-
}, da = /[\uD800-\uDFFF]/u,
|
|
9345
|
+
}, da = /[\uD800-\uDFFF]/u, bs = /in(?:stanceof)?/y;
|
|
9346
9346
|
function ma(p, t, e) {
|
|
9347
9347
|
for (let s = 0; s < p.length; s++) {
|
|
9348
9348
|
const n = p[s], {
|
|
@@ -9488,9 +9488,9 @@ function Ua() {
|
|
|
9488
9488
|
}
|
|
9489
9489
|
chStartsBindingIdentifier(t, e) {
|
|
9490
9490
|
if (_e(t)) {
|
|
9491
|
-
if (
|
|
9492
|
-
const s = this.codePointAtPos(
|
|
9493
|
-
if (!
|
|
9491
|
+
if (bs.lastIndex = e, bs.test(this.input)) {
|
|
9492
|
+
const s = this.codePointAtPos(bs.lastIndex);
|
|
9493
|
+
if (!et(s) && s !== 92)
|
|
9494
9494
|
return !1;
|
|
9495
9495
|
}
|
|
9496
9496
|
return !0;
|
|
@@ -9683,10 +9683,10 @@ function Ua() {
|
|
|
9683
9683
|
return this.expect(11), t;
|
|
9684
9684
|
}
|
|
9685
9685
|
parseDoWhileStatement(t) {
|
|
9686
|
-
return this.next(), this.state.labels.push(
|
|
9686
|
+
return this.next(), this.state.labels.push(xs), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
|
|
9687
9687
|
}
|
|
9688
9688
|
parseForStatement(t) {
|
|
9689
|
-
this.next(), this.state.labels.push(
|
|
9689
|
+
this.next(), this.state.labels.push(xs);
|
|
9690
9690
|
let e = null;
|
|
9691
9691
|
if (this.isContextual(96) && this.recordAwaitIfAllowed() && (e = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13))
|
|
9692
9692
|
return e !== null && this.unexpected(e), this.parseFor(t, null);
|
|
@@ -9754,7 +9754,7 @@ function Ua() {
|
|
|
9754
9754
|
return this.next(), this.parseVar(t, !1, e, s), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
9755
9755
|
}
|
|
9756
9756
|
parseWhileStatement(t) {
|
|
9757
|
-
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(
|
|
9757
|
+
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(xs), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
9758
9758
|
}
|
|
9759
9759
|
parseWithStatement(t) {
|
|
9760
9760
|
return this.state.strict && this.raise(m.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement");
|
|
@@ -10408,7 +10408,7 @@ function Ua() {
|
|
|
10408
10408
|
t.allowAwaitOutsideFunction && (n |= 1), t.allowReturnOutsideFunction && (n |= 2), t.allowImportExportEverywhere && (n |= 8), t.allowSuperOutsideMethod && (n |= 16), t.allowUndeclaredExports && (n |= 64), t.allowNewTargetOutsideFunction && (n |= 4), t.allowYieldOutsideFunction && (n |= 32), t.ranges && (n |= 128), t.tokens && (n |= 256), t.createImportExpressions && (n |= 512), t.createParenthesizedExpressions && (n |= 1024), t.errorRecovery && (n |= 2048), t.attachComment && (n |= 4096), t.annexB && (n |= 8192), this.optionFlags = n;
|
|
10409
10409
|
}
|
|
10410
10410
|
getScopeHandler() {
|
|
10411
|
-
return
|
|
10411
|
+
return ps;
|
|
10412
10412
|
}
|
|
10413
10413
|
parse() {
|
|
10414
10414
|
this.enterInitialScopes();
|
|
@@ -10422,12 +10422,12 @@ function Ua() {
|
|
|
10422
10422
|
t = Object.assign({}, t);
|
|
10423
10423
|
try {
|
|
10424
10424
|
t.sourceType = "module";
|
|
10425
|
-
const s =
|
|
10425
|
+
const s = mt(t, p), n = s.parse();
|
|
10426
10426
|
if (s.sawUnambiguousESM)
|
|
10427
10427
|
return n;
|
|
10428
10428
|
if (s.ambiguousScriptDifferentAst)
|
|
10429
10429
|
try {
|
|
10430
|
-
return t.sourceType = "script",
|
|
10430
|
+
return t.sourceType = "script", mt(t, p).parse();
|
|
10431
10431
|
} catch {
|
|
10432
10432
|
}
|
|
10433
10433
|
else
|
|
@@ -10435,16 +10435,16 @@ function Ua() {
|
|
|
10435
10435
|
return n;
|
|
10436
10436
|
} catch (s) {
|
|
10437
10437
|
try {
|
|
10438
|
-
return t.sourceType = "script",
|
|
10438
|
+
return t.sourceType = "script", mt(t, p).parse();
|
|
10439
10439
|
} catch {
|
|
10440
10440
|
}
|
|
10441
10441
|
throw s;
|
|
10442
10442
|
}
|
|
10443
10443
|
} else
|
|
10444
|
-
return
|
|
10444
|
+
return mt(t, p).parse();
|
|
10445
10445
|
}
|
|
10446
10446
|
function xa(p, t) {
|
|
10447
|
-
const e =
|
|
10447
|
+
const e = mt(t, p);
|
|
10448
10448
|
return e.options.strictMode && (e.state.strict = !0), e.getExpression();
|
|
10449
10449
|
}
|
|
10450
10450
|
function ba(p) {
|
|
@@ -10453,8 +10453,8 @@ function Ua() {
|
|
|
10453
10453
|
t[e] = Be(p[e]);
|
|
10454
10454
|
return t;
|
|
10455
10455
|
}
|
|
10456
|
-
const Pa = ba(
|
|
10457
|
-
function
|
|
10456
|
+
const Pa = ba(Ze);
|
|
10457
|
+
function mt(p, t) {
|
|
10458
10458
|
let e = gi;
|
|
10459
10459
|
const s = /* @__PURE__ */ new Map();
|
|
10460
10460
|
if (p != null && p.plugins) {
|
|
@@ -10481,15 +10481,15 @@ function Ua() {
|
|
|
10481
10481
|
}
|
|
10482
10482
|
return s;
|
|
10483
10483
|
}
|
|
10484
|
-
return
|
|
10484
|
+
return it.parse = ga, it.parseExpression = xa, it.tokTypes = Pa, it;
|
|
10485
10485
|
}
|
|
10486
10486
|
var $a = Ua();
|
|
10487
10487
|
function we(a) {
|
|
10488
10488
|
var l = a.use(pe), i = l.Type, r = l.builtInTypes, o = r.number;
|
|
10489
|
-
function u(
|
|
10489
|
+
function u(b) {
|
|
10490
10490
|
return i.from(
|
|
10491
|
-
(S) => o.check(S) && S >=
|
|
10492
|
-
o + " >= " +
|
|
10491
|
+
(S) => o.check(S) && S >= b,
|
|
10492
|
+
o + " >= " + b
|
|
10493
10493
|
);
|
|
10494
10494
|
}
|
|
10495
10495
|
const h = {
|
|
@@ -10522,10 +10522,10 @@ function we(a) {
|
|
|
10522
10522
|
r.undefined
|
|
10523
10523
|
);
|
|
10524
10524
|
const g = i.from(
|
|
10525
|
-
(
|
|
10526
|
-
if (
|
|
10525
|
+
(b) => {
|
|
10526
|
+
if (b === null)
|
|
10527
10527
|
return !0;
|
|
10528
|
-
var S = typeof
|
|
10528
|
+
var S = typeof b;
|
|
10529
10529
|
return !(S === "object" || S === "function");
|
|
10530
10530
|
},
|
|
10531
10531
|
d.toString()
|
|
@@ -10556,10 +10556,10 @@ class Lt {
|
|
|
10556
10556
|
}
|
|
10557
10557
|
arrayOf() {
|
|
10558
10558
|
const l = this;
|
|
10559
|
-
return new
|
|
10559
|
+
return new Ls(l);
|
|
10560
10560
|
}
|
|
10561
10561
|
}
|
|
10562
|
-
class
|
|
10562
|
+
class Ls extends Lt {
|
|
10563
10563
|
constructor(l) {
|
|
10564
10564
|
super(), this.elemType = l, Pe(this, "kind", "ArrayType");
|
|
10565
10565
|
}
|
|
@@ -10604,7 +10604,7 @@ class or extends Lt {
|
|
|
10604
10604
|
return this.types.some((r) => r.check(l, !!i)) ? !0 : (typeof i == "function" && i(this, l), !1);
|
|
10605
10605
|
}
|
|
10606
10606
|
}
|
|
10607
|
-
class
|
|
10607
|
+
class xt extends Lt {
|
|
10608
10608
|
constructor(l, i) {
|
|
10609
10609
|
super(), this.name = l, this.predicate = i, Pe(this, "kind", "PredicateType");
|
|
10610
10610
|
}
|
|
@@ -10616,12 +10616,12 @@ class gt extends Lt {
|
|
|
10616
10616
|
return !r && typeof i == "function" && i(this, l), r;
|
|
10617
10617
|
}
|
|
10618
10618
|
}
|
|
10619
|
-
class
|
|
10619
|
+
class wt {
|
|
10620
10620
|
constructor(l, i) {
|
|
10621
10621
|
this.type = l, this.typeName = i, Pe(this, "baseNames", []), Pe(this, "ownFields", /* @__PURE__ */ Object.create(null)), Pe(this, "allSupertypes", /* @__PURE__ */ Object.create(null)), Pe(this, "supertypeList", []), Pe(this, "allFields", /* @__PURE__ */ Object.create(null)), Pe(this, "fieldNames", []), Pe(this, "finalized", !1), Pe(this, "buildable", !1), Pe(this, "buildParams", []);
|
|
10622
10622
|
}
|
|
10623
10623
|
isSupertypeOf(l) {
|
|
10624
|
-
if (l instanceof
|
|
10624
|
+
if (l instanceof wt) {
|
|
10625
10625
|
if (this.finalized !== !0 || l.finalized !== !0)
|
|
10626
10626
|
throw new Error("");
|
|
10627
10627
|
return ve.call(l.allSupertypes, this.typeName);
|
|
@@ -10676,14 +10676,14 @@ function pe(a) {
|
|
|
10676
10676
|
return new or(z.map((V) => l.from(V)));
|
|
10677
10677
|
},
|
|
10678
10678
|
from(z, V) {
|
|
10679
|
-
if (z instanceof
|
|
10679
|
+
if (z instanceof Ls || z instanceof nr || z instanceof ar || z instanceof or || z instanceof xt)
|
|
10680
10680
|
return z;
|
|
10681
|
-
if (z instanceof
|
|
10681
|
+
if (z instanceof wt)
|
|
10682
10682
|
return z.type;
|
|
10683
10683
|
if (d.check(z)) {
|
|
10684
10684
|
if (z.length !== 1)
|
|
10685
10685
|
throw new Error("only one element type is permitted for typed arrays");
|
|
10686
|
-
return new
|
|
10686
|
+
return new Ls(l.from(z[0]));
|
|
10687
10687
|
}
|
|
10688
10688
|
if (g.check(z))
|
|
10689
10689
|
return new ar(Object.keys(z).map((Y) => new lr(Y, l.from(z[Y], Y))));
|
|
@@ -10693,7 +10693,7 @@ function pe(a) {
|
|
|
10693
10693
|
return r[X];
|
|
10694
10694
|
if (typeof V != "string")
|
|
10695
10695
|
throw new Error("missing name");
|
|
10696
|
-
return new
|
|
10696
|
+
return new xt(V, z);
|
|
10697
10697
|
}
|
|
10698
10698
|
return new nr(z);
|
|
10699
10699
|
},
|
|
@@ -10711,22 +10711,22 @@ function pe(a) {
|
|
|
10711
10711
|
};
|
|
10712
10712
|
var i = [], r = [];
|
|
10713
10713
|
function o(z, V) {
|
|
10714
|
-
const X = Zt.call(V), Y = new
|
|
10714
|
+
const X = Zt.call(V), Y = new xt(
|
|
10715
10715
|
z,
|
|
10716
10716
|
(re) => Zt.call(re) === X
|
|
10717
10717
|
);
|
|
10718
10718
|
return V && typeof V.constructor == "function" && (i.push(V.constructor), r.push(Y)), Y;
|
|
10719
10719
|
}
|
|
10720
10720
|
const u = o("string", "truthy"), h = o("function", function() {
|
|
10721
|
-
}), d = o("array", []), g = o("object", {}),
|
|
10721
|
+
}), d = o("array", []), g = o("object", {}), b = o("RegExp", /./), S = o("Date", /* @__PURE__ */ new Date()), w = o("number", 3), v = o("boolean", !0), I = o("null", null), T = o("undefined", void 0), A = typeof BigInt == "function" ? o("BigInt", BigInt(1234)) : new xt("BigInt", () => !1), P = {
|
|
10722
10722
|
string: u,
|
|
10723
10723
|
function: h,
|
|
10724
10724
|
array: d,
|
|
10725
10725
|
object: g,
|
|
10726
|
-
RegExp:
|
|
10726
|
+
RegExp: b,
|
|
10727
10727
|
Date: S,
|
|
10728
|
-
number:
|
|
10729
|
-
boolean:
|
|
10728
|
+
number: w,
|
|
10729
|
+
boolean: v,
|
|
10730
10730
|
null: I,
|
|
10731
10731
|
undefined: T,
|
|
10732
10732
|
BigInt: A
|
|
@@ -10743,10 +10743,10 @@ function pe(a) {
|
|
|
10743
10743
|
}
|
|
10744
10744
|
return null;
|
|
10745
10745
|
}
|
|
10746
|
-
class U extends
|
|
10746
|
+
class U extends wt {
|
|
10747
10747
|
constructor(V) {
|
|
10748
10748
|
super(
|
|
10749
|
-
new
|
|
10749
|
+
new xt(V, (X, Y) => this.check(X, Y)),
|
|
10750
10750
|
V
|
|
10751
10751
|
);
|
|
10752
10752
|
}
|
|
@@ -10769,11 +10769,11 @@ function pe(a) {
|
|
|
10769
10769
|
var Q = this.allFields;
|
|
10770
10770
|
if (!ve.call(Q, ne))
|
|
10771
10771
|
throw new Error("" + ne);
|
|
10772
|
-
var
|
|
10772
|
+
var Ze = Q[ne], se = Ze.type, Je;
|
|
10773
10773
|
if (J)
|
|
10774
10774
|
Je = oe;
|
|
10775
|
-
else if (
|
|
10776
|
-
Je =
|
|
10775
|
+
else if (Ze.defaultFn)
|
|
10776
|
+
Je = Ze.defaultFn.call(re);
|
|
10777
10777
|
else {
|
|
10778
10778
|
var Se = "no value or default function given for field " + JSON.stringify(ne) + " of " + this.typeName + "(" + this.buildParams.map(function(Mt) {
|
|
10779
10779
|
return Q[Mt];
|
|
@@ -10782,7 +10782,7 @@ function pe(a) {
|
|
|
10782
10782
|
}
|
|
10783
10783
|
if (!se.check(Je))
|
|
10784
10784
|
throw new Error(
|
|
10785
|
-
$s(Je) + " does not match field " +
|
|
10785
|
+
$s(Je) + " does not match field " + Ze + " of type " + this.typeName
|
|
10786
10786
|
);
|
|
10787
10787
|
re[ne] = Je;
|
|
10788
10788
|
}
|
|
@@ -10829,7 +10829,7 @@ function pe(a) {
|
|
|
10829
10829
|
var V = this.allFields, X = this.allSupertypes;
|
|
10830
10830
|
this.baseNames.forEach((re) => {
|
|
10831
10831
|
var ne = m[re];
|
|
10832
|
-
if (ne instanceof
|
|
10832
|
+
if (ne instanceof wt)
|
|
10833
10833
|
ne.finalize(), Z(V, ne.allFields), Z(X, ne.allSupertypes);
|
|
10834
10834
|
else {
|
|
10835
10835
|
var oe = "unknown supertype name " + JSON.stringify(re) + " for subtype " + JSON.stringify(this.typeName);
|
|
@@ -10967,7 +10967,7 @@ function pe(a) {
|
|
|
10967
10967
|
}
|
|
10968
10968
|
return {
|
|
10969
10969
|
Type: l,
|
|
10970
|
-
builtInTypes:
|
|
10970
|
+
builtInTypes: P,
|
|
10971
10971
|
getSupertypeNames: D,
|
|
10972
10972
|
computeSupertypeLookupTable: B,
|
|
10973
10973
|
builders: R,
|
|
@@ -10986,67 +10986,67 @@ ae(() => module);
|
|
|
10986
10986
|
var za = Object.prototype, Wt = za.hasOwnProperty;
|
|
10987
10987
|
function Cr(a) {
|
|
10988
10988
|
var l = a.use(pe), i = l.builtInTypes.array, r = l.builtInTypes.number;
|
|
10989
|
-
const o = function v
|
|
10990
|
-
if (!(this instanceof
|
|
10989
|
+
const o = function w(v, I, T) {
|
|
10990
|
+
if (!(this instanceof w))
|
|
10991
10991
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
10992
10992
|
if (I) {
|
|
10993
|
-
if (!(I instanceof
|
|
10993
|
+
if (!(I instanceof w))
|
|
10994
10994
|
throw new Error("");
|
|
10995
10995
|
} else
|
|
10996
10996
|
I = null, T = null;
|
|
10997
|
-
this.value =
|
|
10997
|
+
this.value = v, this.parentPath = I, this.name = T, this.__childCache = null;
|
|
10998
10998
|
};
|
|
10999
10999
|
var u = o.prototype;
|
|
11000
|
-
function h(
|
|
11001
|
-
return
|
|
11000
|
+
function h(w) {
|
|
11001
|
+
return w.__childCache || (w.__childCache = /* @__PURE__ */ Object.create(null));
|
|
11002
11002
|
}
|
|
11003
|
-
function d(
|
|
11004
|
-
var I = h(
|
|
11005
|
-
return (!Wt.call(I,
|
|
11006
|
-
A.value !== T) && (A = I[
|
|
11003
|
+
function d(w, v) {
|
|
11004
|
+
var I = h(w), T = w.getValueProperty(v), A = I[v];
|
|
11005
|
+
return (!Wt.call(I, v) || // Ensure consistency between cache and reality.
|
|
11006
|
+
A.value !== T) && (A = I[v] = new w.constructor(
|
|
11007
11007
|
T,
|
|
11008
|
-
|
|
11009
|
-
|
|
11008
|
+
w,
|
|
11009
|
+
v
|
|
11010
11010
|
)), A;
|
|
11011
11011
|
}
|
|
11012
|
-
u.getValueProperty = function(
|
|
11013
|
-
return this.value[
|
|
11014
|
-
}, u.get = function(...
|
|
11015
|
-
for (var I = this, T =
|
|
11016
|
-
I = d(I,
|
|
11012
|
+
u.getValueProperty = function(v) {
|
|
11013
|
+
return this.value[v];
|
|
11014
|
+
}, u.get = function(...v) {
|
|
11015
|
+
for (var I = this, T = v.length, A = 0; A < T; ++A)
|
|
11016
|
+
I = d(I, v[A]);
|
|
11017
11017
|
return I;
|
|
11018
|
-
}, u.each = function(
|
|
11019
|
-
for (var T = [], A = this.value.length,
|
|
11020
|
-
Wt.call(this.value,
|
|
11021
|
-
for (I = I || this,
|
|
11022
|
-
Wt.call(T,
|
|
11023
|
-
}, u.map = function(
|
|
11018
|
+
}, u.each = function(v, I) {
|
|
11019
|
+
for (var T = [], A = this.value.length, P = 0, P = 0; P < A; ++P)
|
|
11020
|
+
Wt.call(this.value, P) && (T[P] = this.get(P));
|
|
11021
|
+
for (I = I || this, P = 0; P < A; ++P)
|
|
11022
|
+
Wt.call(T, P) && v.call(I, T[P]);
|
|
11023
|
+
}, u.map = function(v, I) {
|
|
11024
11024
|
var T = [];
|
|
11025
11025
|
return this.each(function(A) {
|
|
11026
|
-
T.push(
|
|
11026
|
+
T.push(v.call(this, A));
|
|
11027
11027
|
}, I), T;
|
|
11028
|
-
}, u.filter = function(
|
|
11028
|
+
}, u.filter = function(v, I) {
|
|
11029
11029
|
var T = [];
|
|
11030
11030
|
return this.each(function(A) {
|
|
11031
|
-
|
|
11031
|
+
v.call(this, A) && T.push(A);
|
|
11032
11032
|
}, I), T;
|
|
11033
11033
|
};
|
|
11034
11034
|
function g() {
|
|
11035
11035
|
}
|
|
11036
|
-
function
|
|
11037
|
-
if (i.assert(
|
|
11036
|
+
function b(w, v, I, T) {
|
|
11037
|
+
if (i.assert(w.value), v === 0)
|
|
11038
11038
|
return g;
|
|
11039
|
-
var A =
|
|
11039
|
+
var A = w.value.length;
|
|
11040
11040
|
if (A < 1)
|
|
11041
11041
|
return g;
|
|
11042
|
-
var
|
|
11043
|
-
|
|
11044
|
-
for (var m = /* @__PURE__ */ Object.create(null), O = h(
|
|
11045
|
-
if (Wt.call(
|
|
11046
|
-
var D =
|
|
11042
|
+
var P = arguments.length;
|
|
11043
|
+
P === 2 ? (I = 0, T = A) : P === 3 ? (I = Math.max(I, 0), T = A) : (I = Math.max(I, 0), T = Math.min(T, A)), r.assert(I), r.assert(T);
|
|
11044
|
+
for (var m = /* @__PURE__ */ Object.create(null), O = h(w), U = I; U < T; ++U)
|
|
11045
|
+
if (Wt.call(w.value, U)) {
|
|
11046
|
+
var D = w.get(U);
|
|
11047
11047
|
if (D.name !== U)
|
|
11048
11048
|
throw new Error("");
|
|
11049
|
-
var B = U +
|
|
11049
|
+
var B = U + v;
|
|
11050
11050
|
D.name = B, m[B] = D, delete O[U];
|
|
11051
11051
|
}
|
|
11052
11052
|
return delete O.length, function() {
|
|
@@ -11054,82 +11054,82 @@ function Cr(a) {
|
|
|
11054
11054
|
var q = m[R];
|
|
11055
11055
|
if (q.name !== +R)
|
|
11056
11056
|
throw new Error("");
|
|
11057
|
-
O[R] = q,
|
|
11057
|
+
O[R] = q, w.value[R] = q.value;
|
|
11058
11058
|
}
|
|
11059
11059
|
};
|
|
11060
11060
|
}
|
|
11061
11061
|
u.shift = function() {
|
|
11062
|
-
var
|
|
11063
|
-
return
|
|
11064
|
-
}, u.unshift = function(...
|
|
11065
|
-
var I =
|
|
11062
|
+
var v = b(this, -1), I = this.value.shift();
|
|
11063
|
+
return v(), I;
|
|
11064
|
+
}, u.unshift = function(...v) {
|
|
11065
|
+
var I = b(this, v.length), T = this.value.unshift.apply(this.value, v);
|
|
11066
11066
|
return I(), T;
|
|
11067
|
-
}, u.push = function(...
|
|
11068
|
-
return i.assert(this.value), delete h(this).length, this.value.push.apply(this.value,
|
|
11067
|
+
}, u.push = function(...v) {
|
|
11068
|
+
return i.assert(this.value), delete h(this).length, this.value.push.apply(this.value, v);
|
|
11069
11069
|
}, u.pop = function() {
|
|
11070
11070
|
i.assert(this.value);
|
|
11071
|
-
var
|
|
11072
|
-
return delete
|
|
11073
|
-
}, u.insertAt = function(
|
|
11074
|
-
var I = arguments.length, T =
|
|
11071
|
+
var v = h(this);
|
|
11072
|
+
return delete v[this.value.length - 1], delete v.length, this.value.pop();
|
|
11073
|
+
}, u.insertAt = function(v) {
|
|
11074
|
+
var I = arguments.length, T = b(this, I - 1, v);
|
|
11075
11075
|
if (T === g && I <= 1)
|
|
11076
11076
|
return this;
|
|
11077
|
-
|
|
11077
|
+
v = Math.max(v, 0);
|
|
11078
11078
|
for (var A = 1; A < I; ++A)
|
|
11079
|
-
this.value[
|
|
11079
|
+
this.value[v + A - 1] = arguments[A];
|
|
11080
11080
|
return T(), this;
|
|
11081
|
-
}, u.insertBefore = function(...
|
|
11082
|
-
for (var I = this.parentPath, T =
|
|
11083
|
-
A.push(
|
|
11081
|
+
}, u.insertBefore = function(...v) {
|
|
11082
|
+
for (var I = this.parentPath, T = v.length, A = [this.name], P = 0; P < T; ++P)
|
|
11083
|
+
A.push(v[P]);
|
|
11084
11084
|
return I.insertAt.apply(I, A);
|
|
11085
|
-
}, u.insertAfter = function(...
|
|
11086
|
-
for (var I = this.parentPath, T =
|
|
11087
|
-
A.push(
|
|
11085
|
+
}, u.insertAfter = function(...v) {
|
|
11086
|
+
for (var I = this.parentPath, T = v.length, A = [this.name + 1], P = 0; P < T; ++P)
|
|
11087
|
+
A.push(v[P]);
|
|
11088
11088
|
return I.insertAt.apply(I, A);
|
|
11089
11089
|
};
|
|
11090
|
-
function S(
|
|
11091
|
-
if (!(
|
|
11090
|
+
function S(w) {
|
|
11091
|
+
if (!(w instanceof o))
|
|
11092
11092
|
throw new Error("");
|
|
11093
|
-
var
|
|
11094
|
-
if (!
|
|
11095
|
-
return
|
|
11096
|
-
var I =
|
|
11097
|
-
if (I[
|
|
11098
|
-
T[
|
|
11093
|
+
var v = w.parentPath;
|
|
11094
|
+
if (!v)
|
|
11095
|
+
return w;
|
|
11096
|
+
var I = v.value, T = h(v);
|
|
11097
|
+
if (I[w.name] === w.value)
|
|
11098
|
+
T[w.name] = w;
|
|
11099
11099
|
else if (i.check(I)) {
|
|
11100
|
-
var A = I.indexOf(
|
|
11101
|
-
A >= 0 && (T[
|
|
11100
|
+
var A = I.indexOf(w.value);
|
|
11101
|
+
A >= 0 && (T[w.name = A] = w);
|
|
11102
11102
|
} else
|
|
11103
|
-
I[
|
|
11104
|
-
if (I[
|
|
11103
|
+
I[w.name] = w.value, T[w.name] = w;
|
|
11104
|
+
if (I[w.name] !== w.value)
|
|
11105
11105
|
throw new Error("");
|
|
11106
|
-
if (
|
|
11106
|
+
if (w.parentPath.get(w.name) !== w)
|
|
11107
11107
|
throw new Error("");
|
|
11108
|
-
return
|
|
11108
|
+
return w;
|
|
11109
11109
|
}
|
|
11110
|
-
return u.replace = function(
|
|
11111
|
-
var I = [], T = this.parentPath.value, A = h(this.parentPath),
|
|
11110
|
+
return u.replace = function(v) {
|
|
11111
|
+
var I = [], T = this.parentPath.value, A = h(this.parentPath), P = arguments.length;
|
|
11112
11112
|
if (S(this), i.check(T)) {
|
|
11113
|
-
for (var m = T.length, O =
|
|
11113
|
+
for (var m = T.length, O = b(this.parentPath, P - 1, this.name + 1), U = [this.name, 1], D = 0; D < P; ++D)
|
|
11114
11114
|
U.push(arguments[D]);
|
|
11115
11115
|
var B = T.splice.apply(T, U);
|
|
11116
11116
|
if (B[0] !== this.value)
|
|
11117
11117
|
throw new Error("");
|
|
11118
|
-
if (T.length !== m - 1 +
|
|
11118
|
+
if (T.length !== m - 1 + P)
|
|
11119
11119
|
throw new Error("");
|
|
11120
|
-
if (O(),
|
|
11120
|
+
if (O(), P === 0)
|
|
11121
11121
|
delete this.value, delete A[this.name], this.__childCache = null;
|
|
11122
11122
|
else {
|
|
11123
|
-
if (T[this.name] !==
|
|
11123
|
+
if (T[this.name] !== v)
|
|
11124
11124
|
throw new Error("");
|
|
11125
|
-
for (this.value !==
|
|
11125
|
+
for (this.value !== v && (this.value = v, this.__childCache = null), D = 0; D < P; ++D)
|
|
11126
11126
|
I.push(this.parentPath.get(this.name + D));
|
|
11127
11127
|
if (I[0] !== this)
|
|
11128
11128
|
throw new Error("");
|
|
11129
11129
|
}
|
|
11130
|
-
} else if (
|
|
11131
|
-
this.value !==
|
|
11132
|
-
else if (
|
|
11130
|
+
} else if (P === 1)
|
|
11131
|
+
this.value !== v && (this.__childCache = null), this.value = T[this.name] = v, I.push(this);
|
|
11132
|
+
else if (P === 0)
|
|
11133
11133
|
delete T[this.name], delete this.value, this.__childCache = null;
|
|
11134
11134
|
else
|
|
11135
11135
|
throw new Error("Could not replace path");
|
|
@@ -11137,13 +11137,13 @@ function Cr(a) {
|
|
|
11137
11137
|
}, o;
|
|
11138
11138
|
}
|
|
11139
11139
|
ae(() => module);
|
|
11140
|
-
var
|
|
11140
|
+
var rt = Object.prototype.hasOwnProperty;
|
|
11141
11141
|
function Wa(a) {
|
|
11142
11142
|
var l = a.use(pe), i = l.Type, r = l.namedTypes, o = r.Node, u = r.Expression, h = l.builtInTypes.array, d = l.builders;
|
|
11143
11143
|
const g = function D(B, R) {
|
|
11144
11144
|
if (!(this instanceof D))
|
|
11145
11145
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
11146
|
-
S.check(B.value) ||
|
|
11146
|
+
S.check(B.value) || b.assert(B.value);
|
|
11147
11147
|
var q;
|
|
11148
11148
|
if (R) {
|
|
11149
11149
|
if (!(R instanceof D))
|
|
@@ -11161,7 +11161,7 @@ function Wa(a) {
|
|
|
11161
11161
|
types: { value: {} }
|
|
11162
11162
|
});
|
|
11163
11163
|
};
|
|
11164
|
-
var
|
|
11164
|
+
var b = i.or(
|
|
11165
11165
|
// Program nodes introduce global scopes.
|
|
11166
11166
|
r.Program,
|
|
11167
11167
|
// Function is the supertype of FunctionExpression,
|
|
@@ -11178,19 +11178,19 @@ function Wa(a) {
|
|
|
11178
11178
|
r.TSInterfaceDeclaration,
|
|
11179
11179
|
r.TypeAlias,
|
|
11180
11180
|
r.TSTypeAliasDeclaration
|
|
11181
|
-
),
|
|
11181
|
+
), w = i.or(
|
|
11182
11182
|
r.TypeParameter,
|
|
11183
11183
|
r.TSTypeParameter
|
|
11184
11184
|
);
|
|
11185
11185
|
g.isEstablishedBy = function(D) {
|
|
11186
|
-
return
|
|
11186
|
+
return b.check(D) || S.check(D);
|
|
11187
11187
|
};
|
|
11188
|
-
var
|
|
11189
|
-
|
|
11190
|
-
return this.scan(),
|
|
11191
|
-
},
|
|
11192
|
-
return this.scan(),
|
|
11193
|
-
},
|
|
11188
|
+
var v = g.prototype;
|
|
11189
|
+
v.didScan = !1, v.declares = function(D) {
|
|
11190
|
+
return this.scan(), rt.call(this.bindings, D);
|
|
11191
|
+
}, v.declaresType = function(D) {
|
|
11192
|
+
return this.scan(), rt.call(this.types, D);
|
|
11193
|
+
}, v.declareTemporary = function(D) {
|
|
11194
11194
|
if (D) {
|
|
11195
11195
|
if (!/^[a-z$_]/i.test(D))
|
|
11196
11196
|
throw new Error("");
|
|
@@ -11201,7 +11201,7 @@ function Wa(a) {
|
|
|
11201
11201
|
++B;
|
|
11202
11202
|
var R = D + B;
|
|
11203
11203
|
return this.bindings[R] = l.builders.identifier(R);
|
|
11204
|
-
},
|
|
11204
|
+
}, v.injectTemporary = function(D, B) {
|
|
11205
11205
|
D || (D = this.declareTemporary());
|
|
11206
11206
|
var R = this.path.get("body");
|
|
11207
11207
|
return r.BlockStatement.check(R.value) && (R = R.get("body")), R.unshift(
|
|
@@ -11210,7 +11210,7 @@ function Wa(a) {
|
|
|
11210
11210
|
[d.variableDeclarator(D, B || null)]
|
|
11211
11211
|
)
|
|
11212
11212
|
), D;
|
|
11213
|
-
},
|
|
11213
|
+
}, v.scan = function(D) {
|
|
11214
11214
|
if (D || !this.didScan) {
|
|
11215
11215
|
for (var B in this.bindings)
|
|
11216
11216
|
delete this.bindings[B];
|
|
@@ -11218,9 +11218,9 @@ function Wa(a) {
|
|
|
11218
11218
|
delete this.types[B];
|
|
11219
11219
|
I(this.path, this.bindings, this.types), this.didScan = !0;
|
|
11220
11220
|
}
|
|
11221
|
-
},
|
|
11221
|
+
}, v.getBindings = function() {
|
|
11222
11222
|
return this.scan(), this.bindings;
|
|
11223
|
-
},
|
|
11223
|
+
}, v.getTypes = function() {
|
|
11224
11224
|
return this.scan(), this.types;
|
|
11225
11225
|
};
|
|
11226
11226
|
function I(D, B, R) {
|
|
@@ -11231,15 +11231,15 @@ function Wa(a) {
|
|
|
11231
11231
|
U(k, R);
|
|
11232
11232
|
});
|
|
11233
11233
|
}
|
|
11234
|
-
|
|
11234
|
+
b.check(q) && (r.CatchClause.check(q) ? m(D.get("param"), B) : T(D, B, R));
|
|
11235
11235
|
}
|
|
11236
11236
|
function T(D, B, R) {
|
|
11237
11237
|
var q = D.value;
|
|
11238
11238
|
D.parent && r.FunctionExpression.check(D.parent.node) && D.parent.node.id && m(D.parent.get("id"), B), q && (h.check(q) ? D.each((M) => {
|
|
11239
|
-
|
|
11239
|
+
P(M, B, R);
|
|
11240
11240
|
}) : r.Function.check(q) ? (D.get("params").each((M) => {
|
|
11241
11241
|
m(M, B);
|
|
11242
|
-
}),
|
|
11242
|
+
}), P(D.get("body"), B, R), T(D.get("typeParameters"), B, R)) : r.TypeAlias && r.TypeAlias.check(q) || r.InterfaceDeclaration && r.InterfaceDeclaration.check(q) || r.TSTypeAliasDeclaration && r.TSTypeAliasDeclaration.check(q) || r.TSInterfaceDeclaration && r.TSInterfaceDeclaration.check(q) ? O(D.get("id"), R) : r.VariableDeclarator.check(q) ? (m(D.get("id"), B), P(D.get("init"), B, R)) : q.type === "ImportSpecifier" || q.type === "ImportNamespaceSpecifier" || q.type === "ImportDefaultSpecifier" ? m(
|
|
11243
11243
|
// Esprima used to use the .name field to refer to the local
|
|
11244
11244
|
// binding identifier for ImportSpecifier nodes, but .id for
|
|
11245
11245
|
// ImportNamespaceSpecifier and ImportDefaultSpecifier nodes.
|
|
@@ -11250,13 +11250,13 @@ function Wa(a) {
|
|
|
11250
11250
|
var _ = D.get(M);
|
|
11251
11251
|
if (!A(_, k))
|
|
11252
11252
|
throw new Error("");
|
|
11253
|
-
|
|
11253
|
+
P(_, B, R);
|
|
11254
11254
|
}));
|
|
11255
11255
|
}
|
|
11256
11256
|
function A(D, B) {
|
|
11257
11257
|
return !!(D.value === B || Array.isArray(D.value) && D.value.length === 0 && Array.isArray(B) && B.length === 0);
|
|
11258
11258
|
}
|
|
11259
|
-
function
|
|
11259
|
+
function P(D, B, R) {
|
|
11260
11260
|
var q = D.value;
|
|
11261
11261
|
if (!(!q || u.check(q))) if (r.FunctionDeclaration.check(q) && q.id !== null)
|
|
11262
11262
|
m(D.get("id"), B);
|
|
@@ -11264,10 +11264,10 @@ function Wa(a) {
|
|
|
11264
11264
|
m(D.get("id"), B), T(D.get("typeParameters"), B, R);
|
|
11265
11265
|
else if (r.InterfaceDeclaration && r.InterfaceDeclaration.check(q) || r.TSInterfaceDeclaration && r.TSInterfaceDeclaration.check(q))
|
|
11266
11266
|
O(D.get("id"), R);
|
|
11267
|
-
else if (
|
|
11267
|
+
else if (b.check(q)) {
|
|
11268
11268
|
if (r.CatchClause.check(q) && // TODO Broaden this to accept any pattern.
|
|
11269
11269
|
r.Identifier.check(q.param)) {
|
|
11270
|
-
var M = q.param.name, k =
|
|
11270
|
+
var M = q.param.name, k = rt.call(B, M);
|
|
11271
11271
|
T(D.get("body"), B, R), k || delete B[M];
|
|
11272
11272
|
}
|
|
11273
11273
|
} else
|
|
@@ -11275,7 +11275,7 @@ function Wa(a) {
|
|
|
11275
11275
|
}
|
|
11276
11276
|
function m(D, B) {
|
|
11277
11277
|
var R = D.value;
|
|
11278
|
-
r.Pattern.assert(R), r.Identifier.check(R) ?
|
|
11278
|
+
r.Pattern.assert(R), r.Identifier.check(R) ? rt.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D] : r.AssignmentPattern && r.AssignmentPattern.check(R) ? m(D.get("left"), B) : r.ObjectPattern && r.ObjectPattern.check(R) ? D.get("properties").each(function(q) {
|
|
11279
11279
|
var M = q.value;
|
|
11280
11280
|
r.Pattern.check(M) ? m(q, B) : r.Property.check(M) || r.ObjectProperty && r.ObjectProperty.check(M) ? m(q.get("value"), B) : r.SpreadProperty && r.SpreadProperty.check(M) && m(q.get("argument"), B);
|
|
11281
11281
|
}) : r.ArrayPattern && r.ArrayPattern.check(R) ? D.get("elements").each(function(q) {
|
|
@@ -11285,21 +11285,21 @@ function Wa(a) {
|
|
|
11285
11285
|
}
|
|
11286
11286
|
function O(D, B) {
|
|
11287
11287
|
var R = D.value;
|
|
11288
|
-
r.Pattern.assert(R), r.Identifier.check(R) && (
|
|
11288
|
+
r.Pattern.assert(R), r.Identifier.check(R) && (rt.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D]);
|
|
11289
11289
|
}
|
|
11290
11290
|
function U(D, B) {
|
|
11291
11291
|
var R = D.value;
|
|
11292
|
-
|
|
11292
|
+
w.assert(R), rt.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D];
|
|
11293
11293
|
}
|
|
11294
|
-
return
|
|
11294
|
+
return v.lookup = function(D) {
|
|
11295
11295
|
for (var B = this; B && !B.declares(D); B = B.parent)
|
|
11296
11296
|
;
|
|
11297
11297
|
return B;
|
|
11298
|
-
},
|
|
11298
|
+
}, v.lookupType = function(D) {
|
|
11299
11299
|
for (var B = this; B && !B.declaresType(D); B = B.parent)
|
|
11300
11300
|
;
|
|
11301
11301
|
return B;
|
|
11302
|
-
},
|
|
11302
|
+
}, v.getGlobalScope = function() {
|
|
11303
11303
|
for (var D = this; !D.isGlobal; )
|
|
11304
11304
|
D = D.parent;
|
|
11305
11305
|
return D;
|
|
@@ -11308,12 +11308,12 @@ function Wa(a) {
|
|
|
11308
11308
|
ae(() => module);
|
|
11309
11309
|
function Ir(a) {
|
|
11310
11310
|
var l = a.use(pe), i = l.namedTypes, r = l.builders, o = l.builtInTypes.number, u = l.builtInTypes.array, h = a.use(Cr), d = a.use(Wa);
|
|
11311
|
-
const g = function
|
|
11312
|
-
if (!(this instanceof
|
|
11311
|
+
const g = function P(m, O, U) {
|
|
11312
|
+
if (!(this instanceof P))
|
|
11313
11313
|
throw new Error("NodePath constructor cannot be invoked without 'new'");
|
|
11314
11314
|
h.call(this, m, O, U);
|
|
11315
11315
|
};
|
|
11316
|
-
var
|
|
11316
|
+
var b = g.prototype = Object.create(h.prototype, {
|
|
11317
11317
|
constructor: {
|
|
11318
11318
|
value: g,
|
|
11319
11319
|
enumerable: !1,
|
|
@@ -11321,7 +11321,7 @@ function Ir(a) {
|
|
|
11321
11321
|
configurable: !0
|
|
11322
11322
|
}
|
|
11323
11323
|
});
|
|
11324
|
-
Object.defineProperties(
|
|
11324
|
+
Object.defineProperties(b, {
|
|
11325
11325
|
node: {
|
|
11326
11326
|
get: function() {
|
|
11327
11327
|
return Object.defineProperty(this, "node", {
|
|
@@ -11349,20 +11349,20 @@ function Ir(a) {
|
|
|
11349
11349
|
}), this.scope;
|
|
11350
11350
|
}
|
|
11351
11351
|
}
|
|
11352
|
-
}),
|
|
11352
|
+
}), b.replace = function() {
|
|
11353
11353
|
return delete this.node, delete this.parent, delete this.scope, h.prototype.replace.apply(this, arguments);
|
|
11354
|
-
},
|
|
11355
|
-
var
|
|
11356
|
-
return this.replace(), T(
|
|
11357
|
-
},
|
|
11358
|
-
var
|
|
11359
|
-
if (i.Node.check(
|
|
11360
|
-
return
|
|
11354
|
+
}, b.prune = function() {
|
|
11355
|
+
var P = this.parent;
|
|
11356
|
+
return this.replace(), T(P);
|
|
11357
|
+
}, b._computeNode = function() {
|
|
11358
|
+
var P = this.value;
|
|
11359
|
+
if (i.Node.check(P))
|
|
11360
|
+
return P;
|
|
11361
11361
|
var m = this.parentPath;
|
|
11362
11362
|
return m && m.node || null;
|
|
11363
|
-
},
|
|
11364
|
-
var
|
|
11365
|
-
if (!i.Node.check(
|
|
11363
|
+
}, b._computeParent = function() {
|
|
11364
|
+
var P = this.value, m = this.parentPath;
|
|
11365
|
+
if (!i.Node.check(P)) {
|
|
11366
11366
|
for (; m && !i.Node.check(m.value); )
|
|
11367
11367
|
m = m.parentPath;
|
|
11368
11368
|
m && (m = m.parentPath);
|
|
@@ -11370,12 +11370,12 @@ function Ir(a) {
|
|
|
11370
11370
|
for (; m && !i.Node.check(m.value); )
|
|
11371
11371
|
m = m.parentPath;
|
|
11372
11372
|
return m || null;
|
|
11373
|
-
},
|
|
11374
|
-
var
|
|
11375
|
-
return i.Node.check(
|
|
11376
|
-
},
|
|
11377
|
-
return l.getFieldValue(this.value,
|
|
11378
|
-
},
|
|
11373
|
+
}, b._computeScope = function() {
|
|
11374
|
+
var P = this.value, m = this.parentPath, O = m && m.scope;
|
|
11375
|
+
return i.Node.check(P) && d.isEstablishedBy(P) && (O = new d(this, O)), O || null;
|
|
11376
|
+
}, b.getValueProperty = function(P) {
|
|
11377
|
+
return l.getFieldValue(this.value, P);
|
|
11378
|
+
}, b.needsParens = function(P) {
|
|
11379
11379
|
var m = this.parentPath;
|
|
11380
11380
|
if (!m)
|
|
11381
11381
|
return !1;
|
|
@@ -11404,7 +11404,7 @@ function Ir(a) {
|
|
|
11404
11404
|
return this.name === "object" && U.object === O;
|
|
11405
11405
|
case "BinaryExpression":
|
|
11406
11406
|
case "LogicalExpression": {
|
|
11407
|
-
const D = O, B = U.operator, R =
|
|
11407
|
+
const D = O, B = U.operator, R = w[B], q = D.operator, M = w[q];
|
|
11408
11408
|
if (R > M)
|
|
11409
11409
|
return !0;
|
|
11410
11410
|
if (R === M && this.name === "right") {
|
|
@@ -11463,14 +11463,14 @@ function Ir(a) {
|
|
|
11463
11463
|
}
|
|
11464
11464
|
default:
|
|
11465
11465
|
if (U.type === "NewExpression" && this.name === "callee" && U.callee === O)
|
|
11466
|
-
return
|
|
11466
|
+
return v(O);
|
|
11467
11467
|
}
|
|
11468
|
-
return !!(
|
|
11468
|
+
return !!(P !== !0 && !this.canBeFirstInStatement() && this.firstInStatement());
|
|
11469
11469
|
};
|
|
11470
|
-
function S(
|
|
11471
|
-
return i.BinaryExpression.check(
|
|
11470
|
+
function S(P) {
|
|
11471
|
+
return i.BinaryExpression.check(P) || i.LogicalExpression.check(P);
|
|
11472
11472
|
}
|
|
11473
|
-
var
|
|
11473
|
+
var w = {};
|
|
11474
11474
|
[
|
|
11475
11475
|
["||"],
|
|
11476
11476
|
["&&"],
|
|
@@ -11482,60 +11482,60 @@ function Ir(a) {
|
|
|
11482
11482
|
[">>", "<<", ">>>"],
|
|
11483
11483
|
["+", "-"],
|
|
11484
11484
|
["*", "/", "%"]
|
|
11485
|
-
].forEach(function(
|
|
11486
|
-
|
|
11487
|
-
|
|
11485
|
+
].forEach(function(P, m) {
|
|
11486
|
+
P.forEach(function(O) {
|
|
11487
|
+
w[O] = m;
|
|
11488
11488
|
});
|
|
11489
11489
|
});
|
|
11490
|
-
function
|
|
11491
|
-
return i.CallExpression.check(
|
|
11492
|
-
return
|
|
11490
|
+
function v(P) {
|
|
11491
|
+
return i.CallExpression.check(P) ? !0 : u.check(P) ? P.some(v) : i.Node.check(P) ? l.someField(P, function(m, O) {
|
|
11492
|
+
return v(O);
|
|
11493
11493
|
}) : !1;
|
|
11494
11494
|
}
|
|
11495
|
-
|
|
11496
|
-
var
|
|
11497
|
-
return !i.FunctionExpression.check(
|
|
11498
|
-
},
|
|
11495
|
+
b.canBeFirstInStatement = function() {
|
|
11496
|
+
var P = this.node;
|
|
11497
|
+
return !i.FunctionExpression.check(P) && !i.ObjectExpression.check(P);
|
|
11498
|
+
}, b.firstInStatement = function() {
|
|
11499
11499
|
return I(this);
|
|
11500
11500
|
};
|
|
11501
|
-
function I(
|
|
11502
|
-
for (var m, O;
|
|
11503
|
-
if (m =
|
|
11501
|
+
function I(P) {
|
|
11502
|
+
for (var m, O; P.parent; P = P.parent) {
|
|
11503
|
+
if (m = P.node, O = P.parent.node, i.BlockStatement.check(O) && P.parent.name === "body" && P.name === 0) {
|
|
11504
11504
|
if (O.body[0] !== m)
|
|
11505
11505
|
throw new Error("Nodes must be equal");
|
|
11506
11506
|
return !0;
|
|
11507
11507
|
}
|
|
11508
|
-
if (i.ExpressionStatement.check(O) &&
|
|
11508
|
+
if (i.ExpressionStatement.check(O) && P.name === "expression") {
|
|
11509
11509
|
if (O.expression !== m)
|
|
11510
11510
|
throw new Error("Nodes must be equal");
|
|
11511
11511
|
return !0;
|
|
11512
11512
|
}
|
|
11513
|
-
if (i.SequenceExpression.check(O) &&
|
|
11513
|
+
if (i.SequenceExpression.check(O) && P.parent.name === "expressions" && P.name === 0) {
|
|
11514
11514
|
if (O.expressions[0] !== m)
|
|
11515
11515
|
throw new Error("Nodes must be equal");
|
|
11516
11516
|
continue;
|
|
11517
11517
|
}
|
|
11518
|
-
if (i.CallExpression.check(O) &&
|
|
11518
|
+
if (i.CallExpression.check(O) && P.name === "callee") {
|
|
11519
11519
|
if (O.callee !== m)
|
|
11520
11520
|
throw new Error("Nodes must be equal");
|
|
11521
11521
|
continue;
|
|
11522
11522
|
}
|
|
11523
|
-
if (i.MemberExpression.check(O) &&
|
|
11523
|
+
if (i.MemberExpression.check(O) && P.name === "object") {
|
|
11524
11524
|
if (O.object !== m)
|
|
11525
11525
|
throw new Error("Nodes must be equal");
|
|
11526
11526
|
continue;
|
|
11527
11527
|
}
|
|
11528
|
-
if (i.ConditionalExpression.check(O) &&
|
|
11528
|
+
if (i.ConditionalExpression.check(O) && P.name === "test") {
|
|
11529
11529
|
if (O.test !== m)
|
|
11530
11530
|
throw new Error("Nodes must be equal");
|
|
11531
11531
|
continue;
|
|
11532
11532
|
}
|
|
11533
|
-
if (S(O) &&
|
|
11533
|
+
if (S(O) && P.name === "left") {
|
|
11534
11534
|
if (O.left !== m)
|
|
11535
11535
|
throw new Error("Nodes must be equal");
|
|
11536
11536
|
continue;
|
|
11537
11537
|
}
|
|
11538
|
-
if (i.UnaryExpression.check(O) && !O.prefix &&
|
|
11538
|
+
if (i.UnaryExpression.check(O) && !O.prefix && P.name === "argument") {
|
|
11539
11539
|
if (O.argument !== m)
|
|
11540
11540
|
throw new Error("Nodes must be equal");
|
|
11541
11541
|
continue;
|
|
@@ -11544,25 +11544,25 @@ function Ir(a) {
|
|
|
11544
11544
|
}
|
|
11545
11545
|
return !0;
|
|
11546
11546
|
}
|
|
11547
|
-
function T(
|
|
11548
|
-
if (i.VariableDeclaration.check(
|
|
11549
|
-
var m =
|
|
11547
|
+
function T(P) {
|
|
11548
|
+
if (i.VariableDeclaration.check(P.node)) {
|
|
11549
|
+
var m = P.get("declarations").value;
|
|
11550
11550
|
if (!m || m.length === 0)
|
|
11551
|
-
return
|
|
11552
|
-
} else if (i.ExpressionStatement.check(
|
|
11553
|
-
if (!
|
|
11554
|
-
return
|
|
11555
|
-
} else i.IfStatement.check(
|
|
11556
|
-
return
|
|
11551
|
+
return P.prune();
|
|
11552
|
+
} else if (i.ExpressionStatement.check(P.node)) {
|
|
11553
|
+
if (!P.get("expression").value)
|
|
11554
|
+
return P.prune();
|
|
11555
|
+
} else i.IfStatement.check(P.node) && A(P);
|
|
11556
|
+
return P;
|
|
11557
11557
|
}
|
|
11558
|
-
function A(
|
|
11559
|
-
var m =
|
|
11558
|
+
function A(P) {
|
|
11559
|
+
var m = P.get("test").value, O = P.get("alternate").value, U = P.get("consequent").value;
|
|
11560
11560
|
if (!U && !O) {
|
|
11561
11561
|
var D = r.expressionStatement(m);
|
|
11562
|
-
|
|
11562
|
+
P.replace(D);
|
|
11563
11563
|
} else if (!U && O) {
|
|
11564
11564
|
var B = r.unaryExpression("!", m, !0);
|
|
11565
|
-
i.UnaryExpression.check(m) && m.operator === "!" && (B = m.argument),
|
|
11565
|
+
i.UnaryExpression.check(m) && m.operator === "!" && (B = m.argument), P.get("test").replace(B), P.get("consequent").replace(O), P.get("alternate").replace();
|
|
11566
11566
|
}
|
|
11567
11567
|
}
|
|
11568
11568
|
return g;
|
|
@@ -11576,15 +11576,15 @@ function Ja(a) {
|
|
|
11576
11576
|
throw new Error(
|
|
11577
11577
|
"PathVisitor constructor cannot be invoked without 'new'"
|
|
11578
11578
|
);
|
|
11579
|
-
this._reusableContextStack = [], this._methodNameTable = g(this), this._shouldVisitComments = Jt.call(this._methodNameTable, "Block") || Jt.call(this._methodNameTable, "Line"), this.Context =
|
|
11579
|
+
this._reusableContextStack = [], this._methodNameTable = g(this), this._shouldVisitComments = Jt.call(this._methodNameTable, "Block") || Jt.call(this._methodNameTable, "Line"), this.Context = v(this), this._visiting = !1, this._changeReported = !1;
|
|
11580
11580
|
};
|
|
11581
11581
|
function g(T) {
|
|
11582
11582
|
var A = /* @__PURE__ */ Object.create(null);
|
|
11583
|
-
for (var
|
|
11584
|
-
/^visit[A-Z]/.test(
|
|
11583
|
+
for (var P in T)
|
|
11584
|
+
/^visit[A-Z]/.test(P) && (A[P.slice(5)] = !0);
|
|
11585
11585
|
for (var m = l.computeSupertypeLookupTable(A), O = /* @__PURE__ */ Object.create(null), U = Object.keys(m), D = U.length, B = 0; B < D; ++B) {
|
|
11586
11586
|
var R = U[B];
|
|
11587
|
-
|
|
11587
|
+
P = "visit" + m[R], u.check(T[P]) && (O[R] = P);
|
|
11588
11588
|
}
|
|
11589
11589
|
return O;
|
|
11590
11590
|
}
|
|
@@ -11593,23 +11593,23 @@ function Ja(a) {
|
|
|
11593
11593
|
return A;
|
|
11594
11594
|
if (!o.check(A))
|
|
11595
11595
|
return new d();
|
|
11596
|
-
const
|
|
11596
|
+
const P = function O() {
|
|
11597
11597
|
if (!(this instanceof O))
|
|
11598
11598
|
throw new Error(
|
|
11599
11599
|
"Visitor constructor cannot be invoked without 'new'"
|
|
11600
11600
|
);
|
|
11601
11601
|
d.call(this);
|
|
11602
11602
|
};
|
|
11603
|
-
var m =
|
|
11604
|
-
return m.constructor =
|
|
11603
|
+
var m = P.prototype = Object.create(S);
|
|
11604
|
+
return m.constructor = P, b(m, A), b(P, d), u.assert(P.fromMethodsObject), u.assert(P.visit), new P();
|
|
11605
11605
|
};
|
|
11606
|
-
function
|
|
11607
|
-
for (var
|
|
11608
|
-
Jt.call(A,
|
|
11606
|
+
function b(T, A) {
|
|
11607
|
+
for (var P in A)
|
|
11608
|
+
Jt.call(A, P) && (T[P] = A[P]);
|
|
11609
11609
|
return T;
|
|
11610
11610
|
}
|
|
11611
|
-
d.visit = function(A,
|
|
11612
|
-
return d.fromMethodsObject(
|
|
11611
|
+
d.visit = function(A, P) {
|
|
11612
|
+
return d.fromMethodsObject(P).visit(A);
|
|
11613
11613
|
};
|
|
11614
11614
|
var S = d.prototype;
|
|
11615
11615
|
S.visit = function() {
|
|
@@ -11618,8 +11618,8 @@ function Ja(a) {
|
|
|
11618
11618
|
"Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead."
|
|
11619
11619
|
);
|
|
11620
11620
|
this._visiting = !0, this._changeReported = !1, this._abortRequested = !1;
|
|
11621
|
-
for (var T = arguments.length, A = new Array(T),
|
|
11622
|
-
A[
|
|
11621
|
+
for (var T = arguments.length, A = new Array(T), P = 0; P < T; ++P)
|
|
11622
|
+
A[P] = arguments[P];
|
|
11623
11623
|
A[0] instanceof i || (A[0] = new i({ root: A[0] }).get("root")), this.reset.apply(this, A);
|
|
11624
11624
|
var m;
|
|
11625
11625
|
try {
|
|
@@ -11644,31 +11644,31 @@ function Ja(a) {
|
|
|
11644
11644
|
return this.visitor.visitWithoutReset(T);
|
|
11645
11645
|
if (!(T instanceof i))
|
|
11646
11646
|
throw new Error("");
|
|
11647
|
-
var A = T.value,
|
|
11648
|
-
if (
|
|
11647
|
+
var A = T.value, P = A && typeof A == "object" && typeof A.type == "string" && this._methodNameTable[A.type];
|
|
11648
|
+
if (P) {
|
|
11649
11649
|
var m = this.acquireContext(T);
|
|
11650
11650
|
try {
|
|
11651
|
-
return m.invokeVisitorMethod(
|
|
11651
|
+
return m.invokeVisitorMethod(P);
|
|
11652
11652
|
} finally {
|
|
11653
11653
|
this.releaseContext(m);
|
|
11654
11654
|
}
|
|
11655
11655
|
} else
|
|
11656
|
-
return
|
|
11656
|
+
return w(T, this);
|
|
11657
11657
|
};
|
|
11658
|
-
function
|
|
11658
|
+
function w(T, A) {
|
|
11659
11659
|
if (!(T instanceof i))
|
|
11660
11660
|
throw new Error("");
|
|
11661
11661
|
if (!(A instanceof d))
|
|
11662
11662
|
throw new Error("");
|
|
11663
|
-
var
|
|
11664
|
-
if (r.check(
|
|
11663
|
+
var P = T.value;
|
|
11664
|
+
if (r.check(P))
|
|
11665
11665
|
T.each(A.visitWithoutReset, A);
|
|
11666
|
-
else if (o.check(
|
|
11667
|
-
var m = l.getFieldNames(
|
|
11668
|
-
A._shouldVisitComments &&
|
|
11666
|
+
else if (o.check(P)) {
|
|
11667
|
+
var m = l.getFieldNames(P);
|
|
11668
|
+
A._shouldVisitComments && P.comments && m.indexOf("comments") < 0 && m.push("comments");
|
|
11669
11669
|
for (var O = m.length, U = [], D = 0; D < O; ++D) {
|
|
11670
11670
|
var B = m[D];
|
|
11671
|
-
Jt.call(
|
|
11671
|
+
Jt.call(P, B) || (P[B] = l.getFieldValue(P, B)), U.push(T.get(B));
|
|
11672
11672
|
}
|
|
11673
11673
|
for (var D = 0; D < O; ++D)
|
|
11674
11674
|
A.visitWithoutReset(U[D]);
|
|
@@ -11686,7 +11686,7 @@ function Ja(a) {
|
|
|
11686
11686
|
}, S.wasChangeReported = function() {
|
|
11687
11687
|
return this._changeReported;
|
|
11688
11688
|
};
|
|
11689
|
-
function
|
|
11689
|
+
function v(T) {
|
|
11690
11690
|
function A(m) {
|
|
11691
11691
|
if (!(this instanceof A))
|
|
11692
11692
|
throw new Error("");
|
|
@@ -11703,8 +11703,8 @@ function Ja(a) {
|
|
|
11703
11703
|
}
|
|
11704
11704
|
if (!(T instanceof d))
|
|
11705
11705
|
throw new Error("");
|
|
11706
|
-
var
|
|
11707
|
-
return
|
|
11706
|
+
var P = A.prototype = Object.create(T);
|
|
11707
|
+
return P.constructor = A, b(P, I), A;
|
|
11708
11708
|
}
|
|
11709
11709
|
var I = /* @__PURE__ */ Object.create(null);
|
|
11710
11710
|
return I.reset = function(A) {
|
|
@@ -11718,24 +11718,24 @@ function Ja(a) {
|
|
|
11718
11718
|
throw new Error("");
|
|
11719
11719
|
if (!(this.currentPath instanceof i))
|
|
11720
11720
|
throw new Error("");
|
|
11721
|
-
var
|
|
11722
|
-
if (
|
|
11721
|
+
var P = this.visitor[A].call(this, this.currentPath);
|
|
11722
|
+
if (P === !1 ? this.needToCallTraverse = !1 : P !== h && (this.currentPath = this.currentPath.replace(P)[0], this.needToCallTraverse && this.traverse(this.currentPath)), this.needToCallTraverse !== !1)
|
|
11723
11723
|
throw new Error(
|
|
11724
11724
|
"Must either call this.traverse or return false in " + A
|
|
11725
11725
|
);
|
|
11726
11726
|
var m = this.currentPath;
|
|
11727
11727
|
return m && m.value;
|
|
11728
|
-
}, I.traverse = function(A,
|
|
11728
|
+
}, I.traverse = function(A, P) {
|
|
11729
11729
|
if (!(this instanceof this.Context))
|
|
11730
11730
|
throw new Error("");
|
|
11731
11731
|
if (!(A instanceof i))
|
|
11732
11732
|
throw new Error("");
|
|
11733
11733
|
if (!(this.currentPath instanceof i))
|
|
11734
11734
|
throw new Error("");
|
|
11735
|
-
return this.needToCallTraverse = !1,
|
|
11736
|
-
|
|
11735
|
+
return this.needToCallTraverse = !1, w(A, d.fromMethodsObject(
|
|
11736
|
+
P || this.visitor
|
|
11737
11737
|
));
|
|
11738
|
-
}, I.visit = function(A,
|
|
11738
|
+
}, I.visit = function(A, P) {
|
|
11739
11739
|
if (!(this instanceof this.Context))
|
|
11740
11740
|
throw new Error("");
|
|
11741
11741
|
if (!(A instanceof i))
|
|
@@ -11743,7 +11743,7 @@ function Ja(a) {
|
|
|
11743
11743
|
if (!(this.currentPath instanceof i))
|
|
11744
11744
|
throw new Error("");
|
|
11745
11745
|
return this.needToCallTraverse = !1, d.fromMethodsObject(
|
|
11746
|
-
|
|
11746
|
+
P || this.visitor
|
|
11747
11747
|
).visitWithoutReset(A);
|
|
11748
11748
|
}, I.reportChanged = function() {
|
|
11749
11749
|
this.visitor.reportChanged();
|
|
@@ -11754,78 +11754,78 @@ function Ja(a) {
|
|
|
11754
11754
|
ae(() => module);
|
|
11755
11755
|
function Ha(a) {
|
|
11756
11756
|
var l = a.use(pe), i = l.getFieldNames, r = l.getFieldValue, o = l.builtInTypes.array, u = l.builtInTypes.object, h = l.builtInTypes.Date, d = l.builtInTypes.RegExp, g = Object.prototype.hasOwnProperty;
|
|
11757
|
-
function
|
|
11758
|
-
return o.check(
|
|
11757
|
+
function b(T, A, P) {
|
|
11758
|
+
return o.check(P) ? P.length = 0 : P = null, w(T, A, P);
|
|
11759
11759
|
}
|
|
11760
|
-
|
|
11761
|
-
var
|
|
11762
|
-
if (!
|
|
11763
|
-
if (
|
|
11760
|
+
b.assert = function(T, A) {
|
|
11761
|
+
var P = [];
|
|
11762
|
+
if (!b(T, A, P))
|
|
11763
|
+
if (P.length === 0) {
|
|
11764
11764
|
if (T !== A)
|
|
11765
11765
|
throw new Error("Nodes must be equal");
|
|
11766
11766
|
} else
|
|
11767
11767
|
throw new Error(
|
|
11768
|
-
"Nodes differ in the following path: " +
|
|
11768
|
+
"Nodes differ in the following path: " + P.map(S).join("")
|
|
11769
11769
|
);
|
|
11770
11770
|
};
|
|
11771
11771
|
function S(T) {
|
|
11772
11772
|
return /[_$a-z][_$a-z0-9]*/i.test(T) ? "." + T : "[" + JSON.stringify(T) + "]";
|
|
11773
11773
|
}
|
|
11774
|
-
function
|
|
11775
|
-
return T === A ? !0 : o.check(T) ?
|
|
11774
|
+
function w(T, A, P) {
|
|
11775
|
+
return T === A ? !0 : o.check(T) ? v(T, A, P) : u.check(T) ? I(T, A, P) : h.check(T) ? h.check(A) && +T == +A : d.check(T) ? d.check(A) && T.source === A.source && T.global === A.global && T.multiline === A.multiline && T.ignoreCase === A.ignoreCase : T == A;
|
|
11776
11776
|
}
|
|
11777
|
-
function
|
|
11777
|
+
function v(T, A, P) {
|
|
11778
11778
|
o.assert(T);
|
|
11779
11779
|
var m = T.length;
|
|
11780
11780
|
if (!o.check(A) || A.length !== m)
|
|
11781
|
-
return
|
|
11781
|
+
return P && P.push("length"), !1;
|
|
11782
11782
|
for (var O = 0; O < m; ++O) {
|
|
11783
|
-
if (
|
|
11783
|
+
if (P && P.push(O), O in T != O in A || !w(T[O], A[O], P))
|
|
11784
11784
|
return !1;
|
|
11785
|
-
if (
|
|
11786
|
-
var U =
|
|
11785
|
+
if (P) {
|
|
11786
|
+
var U = P.pop();
|
|
11787
11787
|
if (U !== O)
|
|
11788
11788
|
throw new Error("" + U);
|
|
11789
11789
|
}
|
|
11790
11790
|
}
|
|
11791
11791
|
return !0;
|
|
11792
11792
|
}
|
|
11793
|
-
function I(T, A,
|
|
11793
|
+
function I(T, A, P) {
|
|
11794
11794
|
if (u.assert(T), !u.check(A))
|
|
11795
11795
|
return !1;
|
|
11796
11796
|
if (T.type !== A.type)
|
|
11797
|
-
return
|
|
11797
|
+
return P && P.push("type"), !1;
|
|
11798
11798
|
var m = i(T), O = m.length, U = i(A), D = U.length;
|
|
11799
11799
|
if (O === D) {
|
|
11800
11800
|
for (var B = 0; B < O; ++B) {
|
|
11801
11801
|
var R = m[B], q = r(T, R), M = r(A, R);
|
|
11802
|
-
if (
|
|
11802
|
+
if (P && P.push(R), !w(q, M, P))
|
|
11803
11803
|
return !1;
|
|
11804
|
-
if (
|
|
11805
|
-
var k =
|
|
11804
|
+
if (P) {
|
|
11805
|
+
var k = P.pop();
|
|
11806
11806
|
if (k !== R)
|
|
11807
11807
|
throw new Error("" + k);
|
|
11808
11808
|
}
|
|
11809
11809
|
}
|
|
11810
11810
|
return !0;
|
|
11811
11811
|
}
|
|
11812
|
-
if (!
|
|
11812
|
+
if (!P)
|
|
11813
11813
|
return !1;
|
|
11814
11814
|
var _ = /* @__PURE__ */ Object.create(null);
|
|
11815
11815
|
for (B = 0; B < O; ++B)
|
|
11816
11816
|
_[m[B]] = !0;
|
|
11817
11817
|
for (B = 0; B < D; ++B) {
|
|
11818
11818
|
if (R = U[B], !g.call(_, R))
|
|
11819
|
-
return
|
|
11819
|
+
return P.push(R), !1;
|
|
11820
11820
|
delete _[R];
|
|
11821
11821
|
}
|
|
11822
11822
|
for (R in _) {
|
|
11823
|
-
|
|
11823
|
+
P.push(R);
|
|
11824
11824
|
break;
|
|
11825
11825
|
}
|
|
11826
11826
|
return !1;
|
|
11827
11827
|
}
|
|
11828
|
-
return
|
|
11828
|
+
return b;
|
|
11829
11829
|
}
|
|
11830
11830
|
ae(() => module);
|
|
11831
11831
|
function Ka(a) {
|
|
@@ -11931,7 +11931,7 @@ function Qa(a) {
|
|
|
11931
11931
|
var l = a.use(pe), i = l.Type, r = i.def, o = i.or, u = a.use(we), h = u.defaults, d = u.geq;
|
|
11932
11932
|
const {
|
|
11933
11933
|
BinaryOperators: g,
|
|
11934
|
-
AssignmentOperators:
|
|
11934
|
+
AssignmentOperators: b,
|
|
11935
11935
|
LogicalOperators: S
|
|
11936
11936
|
} = a.use(Nr);
|
|
11937
11937
|
r("Printable").field("loc", o(
|
|
@@ -11952,7 +11952,7 @@ function Qa(a) {
|
|
|
11952
11952
|
r("VariableDeclaration"),
|
|
11953
11953
|
r("Expression")
|
|
11954
11954
|
)).field("right", r("Expression")).field("body", r("Statement")), r("DebuggerStatement").bases("Statement").build(), r("Declaration").bases("Statement"), r("FunctionDeclaration").bases("Function", "Declaration").build("id", "params", "body").field("id", r("Identifier")), r("FunctionExpression").bases("Function", "Expression").build("id", "params", "body"), r("VariableDeclaration").bases("Declaration").build("kind", "declarations").field("kind", o("var", "let", "const")).field("declarations", [r("VariableDeclarator")]), r("VariableDeclarator").bases("Node").build("id", "init").field("id", r("Pattern")).field("init", o(r("Expression"), null), h.null), r("Expression").bases("Node"), r("ThisExpression").bases("Expression").build(), r("ArrayExpression").bases("Expression").build("elements").field("elements", [o(r("Expression"), null)]), r("ObjectExpression").bases("Expression").build("properties").field("properties", [r("Property")]), r("Property").bases("Node").build("kind", "key", "value").field("kind", o("init", "get", "set")).field("key", o(r("Literal"), r("Identifier"))).field("value", r("Expression")), r("SequenceExpression").bases("Expression").build("expressions").field("expressions", [r("Expression")]);
|
|
11955
|
-
var
|
|
11955
|
+
var w = o(
|
|
11956
11956
|
"-",
|
|
11957
11957
|
"+",
|
|
11958
11958
|
"!",
|
|
@@ -11961,17 +11961,17 @@ function Qa(a) {
|
|
|
11961
11961
|
"void",
|
|
11962
11962
|
"delete"
|
|
11963
11963
|
);
|
|
11964
|
-
r("UnaryExpression").bases("Expression").build("operator", "argument", "prefix").field("operator",
|
|
11965
|
-
const
|
|
11966
|
-
r("BinaryExpression").bases("Expression").build("operator", "left", "right").field("operator",
|
|
11967
|
-
const I = o(...
|
|
11964
|
+
r("UnaryExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", w).field("argument", r("Expression")).field("prefix", Boolean, h.true);
|
|
11965
|
+
const v = o(...g);
|
|
11966
|
+
r("BinaryExpression").bases("Expression").build("operator", "left", "right").field("operator", v).field("left", r("Expression")).field("right", r("Expression"));
|
|
11967
|
+
const I = o(...b);
|
|
11968
11968
|
r("AssignmentExpression").bases("Expression").build("operator", "left", "right").field("operator", I).field("left", o(r("Pattern"), r("MemberExpression"))).field("right", r("Expression"));
|
|
11969
11969
|
var T = o("++", "--");
|
|
11970
11970
|
r("UpdateExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", T).field("argument", r("Expression")).field("prefix", Boolean);
|
|
11971
11971
|
var A = o(...S);
|
|
11972
11972
|
r("LogicalExpression").bases("Expression").build("operator", "left", "right").field("operator", A).field("left", r("Expression")).field("right", r("Expression")), r("ConditionalExpression").bases("Expression").build("test", "consequent", "alternate").field("test", r("Expression")).field("consequent", r("Expression")).field("alternate", r("Expression")), r("NewExpression").bases("Expression").build("callee", "arguments").field("callee", r("Expression")).field("arguments", [r("Expression")]), r("CallExpression").bases("Expression").build("callee", "arguments").field("callee", r("Expression")).field("arguments", [r("Expression")]), r("MemberExpression").bases("Expression").build("object", "property", "computed").field("object", r("Expression")).field("property", o(r("Identifier"), r("Expression"))).field("computed", Boolean, function() {
|
|
11973
|
-
var
|
|
11974
|
-
return
|
|
11973
|
+
var P = this.property.type;
|
|
11974
|
+
return P === "Literal" || P === "MemberExpression" || P === "BinaryExpression";
|
|
11975
11975
|
}), r("Pattern").bases("Node"), r("SwitchCase").bases("Node").build("test", "consequent").field("test", o(r("Expression"), null)).field("consequent", [r("Statement")]), r("Identifier").bases("Expression", "Pattern").build("name").field("name", String).field("optional", Boolean, h.false), r("Literal").bases("Expression").build("value").field("value", o(String, Boolean, null, Number, RegExp, BigInt)), r("Comment").bases("Printable").field("value", String).field("leading", Boolean, h.true).field("trailing", Boolean, h.false);
|
|
11976
11976
|
}
|
|
11977
11977
|
ae(() => module);
|
|
@@ -12308,7 +12308,7 @@ function Mr(a) {
|
|
|
12308
12308
|
"leading",
|
|
12309
12309
|
"trailing"
|
|
12310
12310
|
), r("Directive").bases("Node").build("value").field("value", r("DirectiveLiteral")), r("DirectiveLiteral").bases("Node", "Expression").build("value").field("value", String, i["use strict"]), r("InterpreterDirective").bases("Node").build("value").field("value", String), r("BlockStatement").bases("Statement").build("body").field("body", [r("Statement")]).field("directives", [r("Directive")], i.emptyArray), r("Program").bases("Node").build("body").field("body", [r("Statement")]).field("directives", [r("Directive")], i.emptyArray).field("interpreter", o(r("InterpreterDirective"), null), i.null);
|
|
12311
|
-
function h(S = String,
|
|
12311
|
+
function h(S = String, w) {
|
|
12312
12312
|
return [
|
|
12313
12313
|
"extra",
|
|
12314
12314
|
{
|
|
@@ -12319,7 +12319,7 @@ function Mr(a) {
|
|
|
12319
12319
|
const I = l.getFieldValue(this, "value");
|
|
12320
12320
|
return {
|
|
12321
12321
|
rawValue: I,
|
|
12322
|
-
raw:
|
|
12322
|
+
raw: w ? w(I) : String(I)
|
|
12323
12323
|
};
|
|
12324
12324
|
}
|
|
12325
12325
|
];
|
|
@@ -12389,7 +12389,7 @@ function Mr(a) {
|
|
|
12389
12389
|
].forEach((S) => {
|
|
12390
12390
|
r(S).field("computed", Boolean, i.false).field("static", Boolean, i.false).field("abstract", Boolean, i.false).field("accessibility", o("public", "private", "protected", null), i.null).field("decorators", o([r("Decorator")], null), i.null).field("definite", Boolean, i.false).field("optional", Boolean, i.false).field("override", Boolean, i.false).field("readonly", Boolean, i.false);
|
|
12391
12391
|
});
|
|
12392
|
-
var
|
|
12392
|
+
var b = o(
|
|
12393
12393
|
r("Property"),
|
|
12394
12394
|
r("PropertyPattern"),
|
|
12395
12395
|
r("SpreadPropertyPattern"),
|
|
@@ -12402,7 +12402,7 @@ function Mr(a) {
|
|
|
12402
12402
|
r("RestElement")
|
|
12403
12403
|
// Babel 6
|
|
12404
12404
|
);
|
|
12405
|
-
r("ObjectPattern").bases("Pattern").build("properties").field("properties", [
|
|
12405
|
+
r("ObjectPattern").bases("Pattern").build("properties").field("properties", [b]).field(
|
|
12406
12406
|
"decorators",
|
|
12407
12407
|
o([r("Decorator")], null),
|
|
12408
12408
|
i.null
|
|
@@ -12419,8 +12419,8 @@ function lo(a) {
|
|
|
12419
12419
|
ae(() => module);
|
|
12420
12420
|
function co(a) {
|
|
12421
12421
|
a.use(Mr), a.use(Or);
|
|
12422
|
-
var l = a.use(pe), i = l.namedTypes, r = l.Type.def, o = l.Type.or, u = a.use(we).defaults, h = l.Type.from(function(S,
|
|
12423
|
-
return !!(i.StringLiteral && i.StringLiteral.check(S,
|
|
12422
|
+
var l = a.use(pe), i = l.namedTypes, r = l.Type.def, o = l.Type.or, u = a.use(we).defaults, h = l.Type.from(function(S, w) {
|
|
12423
|
+
return !!(i.StringLiteral && i.StringLiteral.check(S, w) || i.Literal && i.Literal.check(S, w) && typeof S.value == "string");
|
|
12424
12424
|
}, "StringLiteral");
|
|
12425
12425
|
r("TSType").bases("Node");
|
|
12426
12426
|
var d = o(
|
|
@@ -12580,14 +12580,14 @@ function co(a) {
|
|
|
12580
12580
|
o(r("Expression"), null),
|
|
12581
12581
|
u.null
|
|
12582
12582
|
), r("TSTypeQuery").bases("TSType").build("exprName").field("exprName", o(d, r("TSImportType")));
|
|
12583
|
-
var
|
|
12583
|
+
var b = o(
|
|
12584
12584
|
r("TSCallSignatureDeclaration"),
|
|
12585
12585
|
r("TSConstructSignatureDeclaration"),
|
|
12586
12586
|
r("TSIndexSignature"),
|
|
12587
12587
|
r("TSMethodSignature"),
|
|
12588
12588
|
r("TSPropertySignature")
|
|
12589
12589
|
);
|
|
12590
|
-
r("TSTypeLiteral").bases("TSType").build("members").field("members", [
|
|
12590
|
+
r("TSTypeLiteral").bases("TSType").build("members").field("members", [b]), r("TSTypeParameter").bases("Identifier").build("name", "constraint", "default").field("name", o(r("Identifier"), String)).field("constraint", o(r("TSType"), void 0), u.undefined).field("default", o(r("TSType"), void 0), u.undefined), r("TSTypeAssertion").bases("Expression", "Pattern").build("typeAnnotation", "expression").field("typeAnnotation", r("TSType")).field("expression", r("Expression")).field(
|
|
12591
12591
|
"extra",
|
|
12592
12592
|
o({ parenthesized: Boolean }, null),
|
|
12593
12593
|
u.null
|
|
@@ -12609,7 +12609,7 @@ function co(a) {
|
|
|
12609
12609
|
d,
|
|
12610
12610
|
r("TSExternalModuleReference")
|
|
12611
12611
|
)
|
|
12612
|
-
), r("TSExternalModuleReference").bases("Declaration").build("expression").field("expression", h), r("TSExportAssignment").bases("Statement").build("expression").field("expression", r("Expression")), r("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id", r("Identifier")), r("TSInterfaceBody").bases("Node").build("body").field("body", [
|
|
12612
|
+
), r("TSExternalModuleReference").bases("Declaration").build("expression").field("expression", h), r("TSExportAssignment").bases("Statement").build("expression").field("expression", r("Expression")), r("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id", r("Identifier")), r("TSInterfaceBody").bases("Node").build("body").field("body", [b]), r("TSExpressionWithTypeArguments").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("expression", "typeParameters").field("expression", d), r("TSInterfaceDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "body").field("id", d).field("declare", Boolean, u.false).field(
|
|
12613
12613
|
"extends",
|
|
12614
12614
|
o([r("TSExpressionWithTypeArguments")], null),
|
|
12615
12615
|
u.null
|
|
@@ -12637,7 +12637,7 @@ function co(a) {
|
|
|
12637
12637
|
r("StaticBlock"),
|
|
12638
12638
|
// Just need to add these types:
|
|
12639
12639
|
r("TSDeclareMethod"),
|
|
12640
|
-
|
|
12640
|
+
b
|
|
12641
12641
|
)]);
|
|
12642
12642
|
}
|
|
12643
12643
|
ae(() => module);
|
|
@@ -12714,8 +12714,8 @@ function xo(a, l) {
|
|
|
12714
12714
|
},
|
|
12715
12715
|
name: h.name
|
|
12716
12716
|
});
|
|
12717
|
-
const
|
|
12718
|
-
|
|
12717
|
+
const b = i.sourceContentFor(g);
|
|
12718
|
+
b && !Fr.call(u, g) && (u[g] = b, o.setSourceContent(g, b));
|
|
12719
12719
|
}), o.toJSON();
|
|
12720
12720
|
}
|
|
12721
12721
|
function Br(a, l) {
|
|
@@ -12726,24 +12726,24 @@ function Br(a, l) {
|
|
|
12726
12726
|
end: a.loc.end
|
|
12727
12727
|
};
|
|
12728
12728
|
function r(o) {
|
|
12729
|
-
|
|
12729
|
+
Os(i, o.loc);
|
|
12730
12730
|
}
|
|
12731
|
-
return a.declaration && a.declaration.decorators &&
|
|
12731
|
+
return a.declaration && a.declaration.decorators && rs(a) && a.declaration.decorators.forEach(r), ie(i.start, i.end) < 0 && (i.start = We(i.start), l.skipSpaces(i.start, !1, !0), ie(i.start, i.end) < 0 && (i.end = We(i.end), l.skipSpaces(i.end, !0, !0))), a.comments && a.comments.forEach(r), i;
|
|
12732
12732
|
}
|
|
12733
|
-
function
|
|
12733
|
+
function Os(a, l) {
|
|
12734
12734
|
a && l && (ie(l.start, a.start) < 0 && (a.start = l.start), ie(a.end, l.end) < 0 && (a.end = l.end));
|
|
12735
12735
|
}
|
|
12736
12736
|
function Vs(a, l) {
|
|
12737
12737
|
const i = a.loc;
|
|
12738
12738
|
if (i && (i.start.line < 1 && (i.start.line = 1), i.end.line < 1 && (i.end.line = 1)), a.type === "File" && (i.start = l.firstPos(), i.end = l.lastPos()), bo(a, l), Po(a, l), i && a.decorators)
|
|
12739
12739
|
a.decorators.forEach(function(r) {
|
|
12740
|
-
|
|
12740
|
+
Os(i, r.loc);
|
|
12741
12741
|
});
|
|
12742
|
-
else if (a.declaration &&
|
|
12742
|
+
else if (a.declaration && rs(a)) {
|
|
12743
12743
|
a.declaration.loc = null;
|
|
12744
12744
|
const r = a.declaration.decorators;
|
|
12745
12745
|
r && r.forEach(function(o) {
|
|
12746
|
-
|
|
12746
|
+
Os(i, o.loc);
|
|
12747
12747
|
});
|
|
12748
12748
|
} else if (Ht.MethodDefinition && Ht.MethodDefinition.check(a) || Ht.Property.check(a) && (a.method || a.shorthand))
|
|
12749
12749
|
a.value.loc = null, Ht.FunctionExpression.check(a.value) && (a.value.id = null);
|
|
@@ -12785,7 +12785,7 @@ function Po(a, l) {
|
|
|
12785
12785
|
});
|
|
12786
12786
|
}
|
|
12787
12787
|
}
|
|
12788
|
-
function
|
|
12788
|
+
function rs(a) {
|
|
12789
12789
|
if (a)
|
|
12790
12790
|
switch (a.type) {
|
|
12791
12791
|
case "ExportDeclaration":
|
|
@@ -12800,13 +12800,13 @@ function is(a) {
|
|
|
12800
12800
|
}
|
|
12801
12801
|
function _r(a) {
|
|
12802
12802
|
const l = a.getParentNode();
|
|
12803
|
-
return a.getName() === "declaration" &&
|
|
12803
|
+
return a.getName() === "declaration" && rs(l) ? l : null;
|
|
12804
12804
|
}
|
|
12805
|
-
function
|
|
12805
|
+
function vt(a, l) {
|
|
12806
12806
|
const i = a.trailingComma;
|
|
12807
12807
|
return typeof i == "object" ? !!i[l] : !!i;
|
|
12808
12808
|
}
|
|
12809
|
-
const
|
|
12809
|
+
const Ds = {
|
|
12810
12810
|
tabWidth: 4,
|
|
12811
12811
|
useTabs: !1,
|
|
12812
12812
|
reuseWhitespace: !0,
|
|
@@ -12826,11 +12826,11 @@ const Os = {
|
|
|
12826
12826
|
arrowParensAlways: !1,
|
|
12827
12827
|
flowObjectCommas: !0,
|
|
12828
12828
|
tokens: !0
|
|
12829
|
-
}, To =
|
|
12830
|
-
function
|
|
12831
|
-
const l = a ||
|
|
12829
|
+
}, To = Ds.hasOwnProperty;
|
|
12830
|
+
function ns(a) {
|
|
12831
|
+
const l = a || Ds;
|
|
12832
12832
|
function i(r) {
|
|
12833
|
-
return To.call(l, r) ? l[r] :
|
|
12833
|
+
return To.call(l, r) ? l[r] : Ds[r];
|
|
12834
12834
|
}
|
|
12835
12835
|
return {
|
|
12836
12836
|
tabWidth: +i("tabWidth"),
|
|
@@ -12854,7 +12854,7 @@ function rs(a) {
|
|
|
12854
12854
|
tokens: !!i("tokens")
|
|
12855
12855
|
};
|
|
12856
12856
|
}
|
|
12857
|
-
class
|
|
12857
|
+
class ct {
|
|
12858
12858
|
constructor(l, i, r = i) {
|
|
12859
12859
|
this.sourceLines = l, this.sourceLoc = i, this.targetLoc = r;
|
|
12860
12860
|
}
|
|
@@ -12862,14 +12862,14 @@ class lt {
|
|
|
12862
12862
|
const o = this.sourceLines;
|
|
12863
12863
|
let u = this.sourceLoc, h = this.targetLoc;
|
|
12864
12864
|
function d(g) {
|
|
12865
|
-
const
|
|
12866
|
-
let
|
|
12867
|
-
return g === "end" && (
|
|
12865
|
+
const b = u[g], S = h[g];
|
|
12866
|
+
let w = i;
|
|
12867
|
+
return g === "end" && (w = r), So(
|
|
12868
12868
|
o,
|
|
12869
|
-
|
|
12869
|
+
b,
|
|
12870
12870
|
l,
|
|
12871
12871
|
S,
|
|
12872
|
-
|
|
12872
|
+
w
|
|
12873
12873
|
);
|
|
12874
12874
|
}
|
|
12875
12875
|
if (ie(i, h.start) <= 0)
|
|
@@ -12908,16 +12908,16 @@ class lt {
|
|
|
12908
12908
|
end: ze(r, i.line, i.column)
|
|
12909
12909
|
});
|
|
12910
12910
|
}
|
|
12911
|
-
return new
|
|
12911
|
+
return new ct(this.sourceLines, u, h);
|
|
12912
12912
|
}
|
|
12913
12913
|
add(l, i) {
|
|
12914
|
-
return new
|
|
12914
|
+
return new ct(this.sourceLines, this.sourceLoc, {
|
|
12915
12915
|
start: hr(this.targetLoc.start, l, i),
|
|
12916
12916
|
end: hr(this.targetLoc.end, l, i)
|
|
12917
12917
|
});
|
|
12918
12918
|
}
|
|
12919
12919
|
subtract(l, i) {
|
|
12920
|
-
return new
|
|
12920
|
+
return new ct(this.sourceLines, this.sourceLoc, {
|
|
12921
12921
|
start: ze(this.targetLoc.start, l, i),
|
|
12922
12922
|
end: ze(this.targetLoc.end, l, i)
|
|
12923
12923
|
});
|
|
@@ -12946,7 +12946,7 @@ class lt {
|
|
|
12946
12946
|
column: r ? Math.max(0, d) : d
|
|
12947
12947
|
};
|
|
12948
12948
|
}
|
|
12949
|
-
return new
|
|
12949
|
+
return new ct(this.sourceLines, this.sourceLoc, o);
|
|
12950
12950
|
}
|
|
12951
12951
|
}
|
|
12952
12952
|
function hr(a, l, i) {
|
|
@@ -12979,11 +12979,11 @@ function So(a, l, i, r, o) {
|
|
|
12979
12979
|
}
|
|
12980
12980
|
return h;
|
|
12981
12981
|
}
|
|
12982
|
-
var Eo = Object.defineProperty, Ao = (a, l, i) => l in a ? Eo(a, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[l] = i,
|
|
12982
|
+
var Eo = Object.defineProperty, Ao = (a, l, i) => l in a ? Eo(a, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[l] = i, bt = (a, l, i) => (Ao(a, typeof l != "symbol" ? l + "" : l, i), i);
|
|
12983
12983
|
class ke {
|
|
12984
12984
|
constructor(l, i = null) {
|
|
12985
|
-
this.infos = l,
|
|
12986
|
-
new
|
|
12985
|
+
this.infos = l, bt(this, "length"), bt(this, "name"), bt(this, "mappings", []), bt(this, "cachedSourceMap", null), bt(this, "cachedTabWidth"), this.length = l.length, this.name = i || null, this.name && this.mappings.push(
|
|
12986
|
+
new ct(this, {
|
|
12987
12987
|
start: this.firstPos(),
|
|
12988
12988
|
end: this.lastPos()
|
|
12989
12989
|
})
|
|
@@ -13003,24 +13003,24 @@ class ke {
|
|
|
13003
13003
|
return o(r.cachedSourceMap.toJSON());
|
|
13004
13004
|
const u = new Us.SourceMapGenerator(o()), h = {};
|
|
13005
13005
|
return r.mappings.forEach(function(d) {
|
|
13006
|
-
const g = d.sourceLines.skipSpaces(d.sourceLoc.start) || d.sourceLines.lastPos(),
|
|
13007
|
-
for (; ie(g, d.sourceLoc.end) < 0 && ie(
|
|
13008
|
-
d.sourceLines.charAt(g), r.charAt(
|
|
13006
|
+
const g = d.sourceLines.skipSpaces(d.sourceLoc.start) || d.sourceLines.lastPos(), b = r.skipSpaces(d.targetLoc.start) || r.lastPos();
|
|
13007
|
+
for (; ie(g, d.sourceLoc.end) < 0 && ie(b, d.targetLoc.end) < 0; ) {
|
|
13008
|
+
d.sourceLines.charAt(g), r.charAt(b);
|
|
13009
13009
|
const S = d.sourceLines.name;
|
|
13010
13010
|
if (u.addMapping({
|
|
13011
13011
|
source: S,
|
|
13012
13012
|
original: { line: g.line, column: g.column },
|
|
13013
|
-
generated: { line:
|
|
13014
|
-
}), !
|
|
13015
|
-
const
|
|
13016
|
-
u.setSourceContent(S,
|
|
13013
|
+
generated: { line: b.line, column: b.column }
|
|
13014
|
+
}), !Ms.call(h, S)) {
|
|
13015
|
+
const w = d.sourceLines.toString();
|
|
13016
|
+
u.setSourceContent(S, w), h[S] = w;
|
|
13017
13017
|
}
|
|
13018
|
-
r.nextPos(
|
|
13018
|
+
r.nextPos(b, !0), d.sourceLines.nextPos(g, !0);
|
|
13019
13019
|
}
|
|
13020
13020
|
}), r.cachedSourceMap = u, u.toJSON();
|
|
13021
13021
|
}
|
|
13022
13022
|
bootstrapCharAt(l) {
|
|
13023
|
-
const i = l.line, r = l.column, o = this.toString().split(
|
|
13023
|
+
const i = l.line, r = l.column, o = this.toString().split(Fs), u = o[i - 1];
|
|
13024
13024
|
return typeof u > "u" ? "" : r === u.length && i < o.length ? `
|
|
13025
13025
|
` : r >= u.length ? "" : u.charAt(r);
|
|
13026
13026
|
}
|
|
@@ -13111,14 +13111,14 @@ class ke {
|
|
|
13111
13111
|
let i = 0;
|
|
13112
13112
|
for (let u = 1, h = this.length; u <= h; ++u) {
|
|
13113
13113
|
const d = this.infos[u - 1], g = d.line.slice(d.sliceStart, d.sliceEnd);
|
|
13114
|
-
if (
|
|
13114
|
+
if (nt(g))
|
|
13115
13115
|
continue;
|
|
13116
|
-
const
|
|
13117
|
-
l[
|
|
13116
|
+
const b = Math.abs(d.indent - i);
|
|
13117
|
+
l[b] = ~~l[b] + 1, i = d.indent;
|
|
13118
13118
|
}
|
|
13119
13119
|
let r = -1, o = 2;
|
|
13120
13120
|
for (let u = 1; u < l.length; u += 1)
|
|
13121
|
-
|
|
13121
|
+
Ms.call(l, u) && l[u] > r && (r = l[u], o = u);
|
|
13122
13122
|
return this.cachedTabWidth = o;
|
|
13123
13123
|
}
|
|
13124
13124
|
// Determine if the list of lines has a first line that starts with a //
|
|
@@ -13131,14 +13131,14 @@ class ke {
|
|
|
13131
13131
|
return o.length === 0 || o.slice(0, 2) === "//" || o.slice(0, 2) === "/*";
|
|
13132
13132
|
}
|
|
13133
13133
|
isOnlyWhitespace() {
|
|
13134
|
-
return
|
|
13134
|
+
return nt(this.toString());
|
|
13135
13135
|
}
|
|
13136
13136
|
isPrecededOnlyByWhitespace(l) {
|
|
13137
13137
|
const i = this.infos[l.line - 1], r = Math.max(i.indent, 0), o = l.column - r;
|
|
13138
13138
|
if (o <= 0)
|
|
13139
13139
|
return !0;
|
|
13140
13140
|
const u = i.sliceStart, h = Math.min(u + o, i.sliceEnd), d = i.line.slice(u, h);
|
|
13141
|
-
return
|
|
13141
|
+
return nt(d);
|
|
13142
13142
|
}
|
|
13143
13143
|
getLineLength(l) {
|
|
13144
13144
|
const i = this.infos[l - 1];
|
|
@@ -13173,11 +13173,11 @@ class ke {
|
|
|
13173
13173
|
column: l.column
|
|
13174
13174
|
} : i ? l = this.lastPos() : l = this.firstPos(), i) {
|
|
13175
13175
|
for (; this.prevPos(l); )
|
|
13176
|
-
if (!
|
|
13176
|
+
if (!nt(this.charAt(l)) && this.nextPos(l))
|
|
13177
13177
|
return l;
|
|
13178
13178
|
return null;
|
|
13179
13179
|
} else {
|
|
13180
|
-
for (;
|
|
13180
|
+
for (; nt(this.charAt(l)); )
|
|
13181
13181
|
if (!this.nextPos(l))
|
|
13182
13182
|
return null;
|
|
13183
13183
|
return l;
|
|
@@ -13206,7 +13206,7 @@ class ke {
|
|
|
13206
13206
|
while (this.nextPos(o, r));
|
|
13207
13207
|
}
|
|
13208
13208
|
bootstrapSlice(l, i) {
|
|
13209
|
-
const r = this.toString().split(
|
|
13209
|
+
const r = this.toString().split(Fs).slice(l.line - 1, i.line);
|
|
13210
13210
|
return r.length > 0 && (r.push(r.pop().slice(0, i.column)), r[0] = r[0].slice(l.column)), j(r.join(`
|
|
13211
13211
|
`));
|
|
13212
13212
|
}
|
|
@@ -13219,7 +13219,7 @@ class ke {
|
|
|
13219
13219
|
if (!l)
|
|
13220
13220
|
throw new Error("cannot slice with end but not start");
|
|
13221
13221
|
const r = this.infos.slice(l.line - 1, i.line);
|
|
13222
|
-
l.line === i.line ? r[0] =
|
|
13222
|
+
l.line === i.line ? r[0] = at(r[0], l.column, i.column) : (r[0] = at(r[0], l.column), r.push(at(r.pop(), 0, i.column)));
|
|
13223
13223
|
const o = new ke(r);
|
|
13224
13224
|
if (this.mappings.length > 0) {
|
|
13225
13225
|
const u = o.mappings;
|
|
@@ -13234,17 +13234,17 @@ class ke {
|
|
|
13234
13234
|
return this.slice(l, i).toString(r);
|
|
13235
13235
|
}
|
|
13236
13236
|
sliceString(l = this.firstPos(), i = this.lastPos(), r) {
|
|
13237
|
-
const { tabWidth: o, useTabs: u, reuseWhitespace: h, lineTerminator: d } =
|
|
13238
|
-
for (let
|
|
13239
|
-
let S = this.infos[
|
|
13240
|
-
|
|
13241
|
-
const
|
|
13242
|
-
if (h &&
|
|
13237
|
+
const { tabWidth: o, useTabs: u, reuseWhitespace: h, lineTerminator: d } = ns(r), g = [];
|
|
13238
|
+
for (let b = l.line; b <= i.line; ++b) {
|
|
13239
|
+
let S = this.infos[b - 1];
|
|
13240
|
+
b === l.line ? b === i.line ? S = at(S, l.column, i.column) : S = at(S, l.column) : b === i.line && (S = at(S, 0, i.column));
|
|
13241
|
+
const w = Math.max(S.indent, 0), v = S.line.slice(0, S.sliceStart);
|
|
13242
|
+
if (h && nt(v) && jr(v, o) === w) {
|
|
13243
13243
|
g.push(S.line.slice(0, S.sliceEnd));
|
|
13244
13244
|
continue;
|
|
13245
13245
|
}
|
|
13246
|
-
let I = 0, T =
|
|
13247
|
-
u && (I = Math.floor(
|
|
13246
|
+
let I = 0, T = w;
|
|
13247
|
+
u && (I = Math.floor(w / o), T -= I * o);
|
|
13248
13248
|
let A = "";
|
|
13249
13249
|
I > 0 && (A += new Array(I + 1).join(" ")), T > 0 && (A += new Array(T + 1).join(" ")), A += S.line.slice(S.sliceStart, S.sliceEnd), g.push(A);
|
|
13250
13250
|
}
|
|
@@ -13256,27 +13256,27 @@ class ke {
|
|
|
13256
13256
|
join(l) {
|
|
13257
13257
|
const i = this, r = [], o = [];
|
|
13258
13258
|
let u;
|
|
13259
|
-
function h(
|
|
13260
|
-
if (
|
|
13259
|
+
function h(b) {
|
|
13260
|
+
if (b !== null) {
|
|
13261
13261
|
if (u) {
|
|
13262
|
-
const S =
|
|
13263
|
-
u.line = u.line.slice(0, u.sliceEnd) +
|
|
13264
|
-
o.push(T.add(
|
|
13262
|
+
const S = b.infos[0], w = new Array(S.indent + 1).join(" "), v = r.length, I = Math.max(u.indent, 0) + u.sliceEnd - u.sliceStart;
|
|
13263
|
+
u.line = u.line.slice(0, u.sliceEnd) + w + S.line.slice(S.sliceStart, S.sliceEnd), u.locked = u.locked || S.locked, u.sliceEnd = u.line.length, b.mappings.length > 0 && b.mappings.forEach(function(T) {
|
|
13264
|
+
o.push(T.add(v, I));
|
|
13265
13265
|
});
|
|
13266
|
-
} else
|
|
13267
|
-
|
|
13268
|
-
(!u ||
|
|
13266
|
+
} else b.mappings.length > 0 && o.push.apply(o, b.mappings);
|
|
13267
|
+
b.infos.forEach(function(S, w) {
|
|
13268
|
+
(!u || w > 0) && (u = { ...S }, r.push(u));
|
|
13269
13269
|
});
|
|
13270
13270
|
}
|
|
13271
13271
|
}
|
|
13272
|
-
function d(
|
|
13273
|
-
S > 0 && h(i), h(
|
|
13272
|
+
function d(b, S) {
|
|
13273
|
+
S > 0 && h(i), h(b);
|
|
13274
13274
|
}
|
|
13275
|
-
if (l.map(function(
|
|
13276
|
-
const S = j(
|
|
13275
|
+
if (l.map(function(b) {
|
|
13276
|
+
const S = j(b);
|
|
13277
13277
|
return S.isEmpty() ? null : S;
|
|
13278
|
-
}).forEach((
|
|
13279
|
-
i.isEmpty() ? h(
|
|
13278
|
+
}).forEach((b, S) => {
|
|
13279
|
+
i.isEmpty() ? h(b) : d(b, S);
|
|
13280
13280
|
}), r.length < 1)
|
|
13281
13281
|
return Ge;
|
|
13282
13282
|
const g = new ke(r);
|
|
@@ -13287,7 +13287,7 @@ class ke {
|
|
|
13287
13287
|
return i.push.apply(i, l), Ge.join(i);
|
|
13288
13288
|
}
|
|
13289
13289
|
}
|
|
13290
|
-
const Qt = {},
|
|
13290
|
+
const Qt = {}, Ms = Qt.hasOwnProperty, wo = 10;
|
|
13291
13291
|
function jr(a, l) {
|
|
13292
13292
|
let i = 0;
|
|
13293
13293
|
const r = a.length;
|
|
@@ -13310,16 +13310,16 @@ function jr(a, l) {
|
|
|
13310
13310
|
}
|
|
13311
13311
|
return i;
|
|
13312
13312
|
}
|
|
13313
|
-
const vo = /^\s*/,
|
|
13313
|
+
const vo = /^\s*/, Fs = /\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;
|
|
13314
13314
|
function j(a, l) {
|
|
13315
13315
|
if (a instanceof ke)
|
|
13316
13316
|
return a;
|
|
13317
13317
|
a += "";
|
|
13318
13318
|
const i = l && l.tabWidth, r = a.indexOf(" ") < 0, o = !l && r && a.length <= wo;
|
|
13319
|
-
if (o &&
|
|
13319
|
+
if (o && Ms.call(Qt, a))
|
|
13320
13320
|
return Qt[a];
|
|
13321
13321
|
const u = new ke(
|
|
13322
|
-
a.split(
|
|
13322
|
+
a.split(Fs).map(function(h) {
|
|
13323
13323
|
const d = vo.exec(h)[0];
|
|
13324
13324
|
return {
|
|
13325
13325
|
line: h,
|
|
@@ -13330,14 +13330,14 @@ function j(a, l) {
|
|
|
13330
13330
|
sliceEnd: h.length
|
|
13331
13331
|
};
|
|
13332
13332
|
}),
|
|
13333
|
-
|
|
13333
|
+
ns(l).sourceFileName
|
|
13334
13334
|
);
|
|
13335
13335
|
return o && (Qt[a] = u), u;
|
|
13336
13336
|
}
|
|
13337
|
-
function
|
|
13337
|
+
function nt(a) {
|
|
13338
13338
|
return !/\S/.test(a);
|
|
13339
13339
|
}
|
|
13340
|
-
function
|
|
13340
|
+
function at(a, l, i) {
|
|
13341
13341
|
let r = a.sliceStart, o = a.sliceEnd, u = Math.max(a.indent, 0), h = u + o - r;
|
|
13342
13342
|
return typeof i > "u" && (i = h), l = Math.max(l, 0), i = Math.min(i, h), i = Math.max(i, l), i < u ? (u = i, o = r) : o -= h - i, h = i, h -= l, l < u ? u -= l : (l -= u, u = 0, r += l), a.indent === u && a.sliceStart === r && a.sliceEnd === o ? a : {
|
|
13343
13343
|
line: a.line,
|
|
@@ -13351,12 +13351,12 @@ function nt(a, l, i) {
|
|
|
13351
13351
|
function L(a) {
|
|
13352
13352
|
return Ge.join(a);
|
|
13353
13353
|
}
|
|
13354
|
-
const Ge = j(""),
|
|
13354
|
+
const Ge = j(""), ht = Oe, Rr = De.array, Co = De.object, pr = /* @__PURE__ */ new WeakMap();
|
|
13355
13355
|
function Ur(a, l, i) {
|
|
13356
13356
|
if (!a)
|
|
13357
13357
|
return i;
|
|
13358
13358
|
if (Vs(a, l), i) {
|
|
13359
|
-
if (
|
|
13359
|
+
if (ht.Node.check(a) && ht.SourceLocation.check(a.loc)) {
|
|
13360
13360
|
let o = i.length - 1;
|
|
13361
13361
|
for (; o >= 0; --o) {
|
|
13362
13362
|
const u = i[o];
|
|
@@ -13386,17 +13386,17 @@ function $r(a, l, i) {
|
|
|
13386
13386
|
const r = Ur(a, i);
|
|
13387
13387
|
let o = 0, u = r && r.length, h, d;
|
|
13388
13388
|
for (; typeof u == "number" && o < u; ) {
|
|
13389
|
-
const g = o + u >> 1,
|
|
13390
|
-
if (ie(
|
|
13391
|
-
$r(l.enclosingNode =
|
|
13389
|
+
const g = o + u >> 1, b = r[g];
|
|
13390
|
+
if (ie(b.loc.start, l.loc.start) <= 0 && ie(l.loc.end, b.loc.end) <= 0) {
|
|
13391
|
+
$r(l.enclosingNode = b, l, i);
|
|
13392
13392
|
return;
|
|
13393
13393
|
}
|
|
13394
|
-
if (ie(
|
|
13395
|
-
h =
|
|
13394
|
+
if (ie(b.loc.end, l.loc.start) <= 0) {
|
|
13395
|
+
h = b, o = g + 1;
|
|
13396
13396
|
continue;
|
|
13397
13397
|
}
|
|
13398
|
-
if (ie(l.loc.end,
|
|
13399
|
-
d =
|
|
13398
|
+
if (ie(l.loc.end, b.loc.start) <= 0) {
|
|
13399
|
+
d = b, u = g;
|
|
13400
13400
|
continue;
|
|
13401
13401
|
}
|
|
13402
13402
|
throw new Error("Comment location overlaps with node location");
|
|
@@ -13412,20 +13412,20 @@ function Io(a, l, i) {
|
|
|
13412
13412
|
const u = o.precedingNode, h = o.enclosingNode, d = o.followingNode;
|
|
13413
13413
|
if (u && d) {
|
|
13414
13414
|
const g = r.length;
|
|
13415
|
-
g > 0 && r[g - 1].followingNode !== o.followingNode &&
|
|
13415
|
+
g > 0 && r[g - 1].followingNode !== o.followingNode && Pt(r, i), r.push(o);
|
|
13416
13416
|
} else if (u)
|
|
13417
|
-
|
|
13417
|
+
Pt(r, i), qr(u, o);
|
|
13418
13418
|
else if (d)
|
|
13419
|
-
|
|
13419
|
+
Pt(r, i), Vr(d, o);
|
|
13420
13420
|
else if (h)
|
|
13421
|
-
|
|
13421
|
+
Pt(r, i), No(h, o);
|
|
13422
13422
|
else
|
|
13423
13423
|
throw new Error("AST contains no nodes at all?");
|
|
13424
|
-
}),
|
|
13424
|
+
}), Pt(r, i), a.forEach(function(o) {
|
|
13425
13425
|
delete o.precedingNode, delete o.enclosingNode, delete o.followingNode;
|
|
13426
13426
|
});
|
|
13427
13427
|
}
|
|
13428
|
-
function
|
|
13428
|
+
function Pt(a, l) {
|
|
13429
13429
|
const i = a.length;
|
|
13430
13430
|
if (i === 0)
|
|
13431
13431
|
return;
|
|
@@ -13446,8 +13446,8 @@ function bt(a, l) {
|
|
|
13446
13446
|
const { enclosingNode: g } = a[h - 1];
|
|
13447
13447
|
g?.type === "CallExpression" && --h;
|
|
13448
13448
|
}
|
|
13449
|
-
a.forEach(function(g,
|
|
13450
|
-
|
|
13449
|
+
a.forEach(function(g, b) {
|
|
13450
|
+
b < h ? qr(r, g) : Vr(o, g);
|
|
13451
13451
|
}), a.length = 0;
|
|
13452
13452
|
}
|
|
13453
13453
|
function qs(a, l) {
|
|
@@ -13464,7 +13464,7 @@ function qr(a, l) {
|
|
|
13464
13464
|
}
|
|
13465
13465
|
function ko(a, l) {
|
|
13466
13466
|
const i = a.getValue();
|
|
13467
|
-
|
|
13467
|
+
ht.Comment.assert(i);
|
|
13468
13468
|
const r = i.loc, o = r && r.lines, u = [l(a)];
|
|
13469
13469
|
if (i.trailing)
|
|
13470
13470
|
u.push(`
|
|
@@ -13483,7 +13483,7 @@ function ko(a, l) {
|
|
|
13483
13483
|
}
|
|
13484
13484
|
function Lo(a, l) {
|
|
13485
13485
|
const i = a.getValue(a);
|
|
13486
|
-
|
|
13486
|
+
ht.Comment.assert(i);
|
|
13487
13487
|
const r = i.loc, o = r && r.lines, u = [];
|
|
13488
13488
|
if (o instanceof ke) {
|
|
13489
13489
|
const h = o.skipSpaces(r.start, !0) || o.firstPos(), d = o.slice(h, r.start);
|
|
@@ -13493,18 +13493,18 @@ function Lo(a, l) {
|
|
|
13493
13493
|
return u.push(l(a)), L(u);
|
|
13494
13494
|
}
|
|
13495
13495
|
function fr(a, l) {
|
|
13496
|
-
const i = a.getValue(), r = l(a), o =
|
|
13496
|
+
const i = a.getValue(), r = l(a), o = ht.Node.check(i) && je(i, "comments");
|
|
13497
13497
|
if (!o || o.length === 0)
|
|
13498
13498
|
return r;
|
|
13499
13499
|
const u = [], h = [r];
|
|
13500
13500
|
return a.each(function(d) {
|
|
13501
|
-
const g = d.getValue(),
|
|
13502
|
-
|
|
13501
|
+
const g = d.getValue(), b = je(g, "leading"), S = je(g, "trailing");
|
|
13502
|
+
b || S && !(ht.Statement.check(i) || g.type === "Block" || g.type === "CommentBlock") ? u.push(ko(d, l)) : S && h.push(Lo(d, l));
|
|
13503
13503
|
}, "comments"), u.push.apply(u, h), L(u);
|
|
13504
13504
|
}
|
|
13505
13505
|
const Oo = Dt, Do = De.object, Mo = De.array;
|
|
13506
13506
|
function Fo(a, l) {
|
|
13507
|
-
l =
|
|
13507
|
+
l = ns(l);
|
|
13508
13508
|
const i = j(a, l), r = i.toString({
|
|
13509
13509
|
tabWidth: l.tabWidth,
|
|
13510
13510
|
reuseWhitespace: !1,
|
|
@@ -13535,7 +13535,7 @@ function Fo(a, l) {
|
|
|
13535
13535
|
lines: i,
|
|
13536
13536
|
indent: 0
|
|
13537
13537
|
}) : u.type === "File" && (d = u, g = d.program), l.tokens && (d.tokens = h);
|
|
13538
|
-
const
|
|
13538
|
+
const b = Br(
|
|
13539
13539
|
{
|
|
13540
13540
|
type: g.type,
|
|
13541
13541
|
loc: g.loc,
|
|
@@ -13543,7 +13543,7 @@ function Fo(a, l) {
|
|
|
13543
13543
|
},
|
|
13544
13544
|
i
|
|
13545
13545
|
);
|
|
13546
|
-
return g.loc.start =
|
|
13546
|
+
return g.loc.start = b.start, g.loc.end = b.end, Io(o, g.body.length ? d.program : d, i), new zr(i, h).copy(d);
|
|
13547
13547
|
}
|
|
13548
13548
|
const zr = function(l, i) {
|
|
13549
13549
|
this.lines = l, this.tokens = i, this.startTokenIndex = 0, this.endTokenIndex = i.length, this.indent = 0, this.seen = /* @__PURE__ */ new Map();
|
|
@@ -13552,10 +13552,10 @@ Wr.copy = function(a) {
|
|
|
13552
13552
|
if (this.seen.has(a))
|
|
13553
13553
|
return this.seen.get(a);
|
|
13554
13554
|
if (Mo.check(a)) {
|
|
13555
|
-
const
|
|
13556
|
-
return this.seen.set(a,
|
|
13557
|
-
|
|
13558
|
-
}, this),
|
|
13555
|
+
const b = new Array(a.length);
|
|
13556
|
+
return this.seen.set(a, b), a.forEach(function(S, w) {
|
|
13557
|
+
b[w] = this.copy(S);
|
|
13558
|
+
}, this), b;
|
|
13559
13559
|
}
|
|
13560
13560
|
if (!Do.check(a))
|
|
13561
13561
|
return a;
|
|
@@ -13575,8 +13575,8 @@ Wr.copy = function(a) {
|
|
|
13575
13575
|
const u = this.startTokenIndex, h = this.endTokenIndex;
|
|
13576
13576
|
i && ((a.type === "Block" || a.type === "Line" || a.type === "CommentBlock" || a.type === "CommentLine" || this.lines.isPrecededOnlyByWhitespace(i.start)) && (o = this.indent = i.start.column), i.lines = this.lines, i.tokens = this.tokens, i.indent = o, this.findTokenRange(i));
|
|
13577
13577
|
const d = Object.keys(a), g = d.length;
|
|
13578
|
-
for (let
|
|
13579
|
-
const S = d[
|
|
13578
|
+
for (let b = 0; b < g; ++b) {
|
|
13579
|
+
const S = d[b];
|
|
13580
13580
|
S === "loc" || S === "tokens" && a.type === "File" ? l[S] = a[S] : l[S] = this.copy(a[S]);
|
|
13581
13581
|
}
|
|
13582
13582
|
return this.indent = r, this.startTokenIndex = u, this.endTokenIndex = h, l;
|
|
@@ -13612,7 +13612,7 @@ Wr.findTokenRange = function(a) {
|
|
|
13612
13612
|
}
|
|
13613
13613
|
a.end.token = this.endTokenIndex;
|
|
13614
13614
|
};
|
|
13615
|
-
const ue = Oe, Bo = De.array, _o = De.number,
|
|
13615
|
+
const ue = Oe, Bo = De.array, _o = De.number, Bs = {};
|
|
13616
13616
|
[
|
|
13617
13617
|
["??"],
|
|
13618
13618
|
["||"],
|
|
@@ -13628,7 +13628,7 @@ const ue = Oe, Bo = De.array, _o = De.number, Fs = {};
|
|
|
13628
13628
|
["**"]
|
|
13629
13629
|
].forEach(function(a, l) {
|
|
13630
13630
|
a.forEach(function(i) {
|
|
13631
|
-
|
|
13631
|
+
Bs[i] = l;
|
|
13632
13632
|
});
|
|
13633
13633
|
});
|
|
13634
13634
|
const Le = function(l) {
|
|
@@ -13780,7 +13780,7 @@ be.needsParens = function(a) {
|
|
|
13780
13780
|
return r === "object" && i.object === l;
|
|
13781
13781
|
case "BinaryExpression":
|
|
13782
13782
|
case "LogicalExpression": {
|
|
13783
|
-
const o = i.operator, u =
|
|
13783
|
+
const o = i.operator, u = Bs[o], h = l.operator, d = Bs[h];
|
|
13784
13784
|
if (u > d || u === d && r === "right")
|
|
13785
13785
|
return !0;
|
|
13786
13786
|
break;
|
|
@@ -13844,15 +13844,15 @@ be.needsParens = function(a) {
|
|
|
13844
13844
|
if (r === "declaration" && ue.ExportDefaultDeclaration.check(i) && ue.FunctionExpression.check(l.callee))
|
|
13845
13845
|
return !0;
|
|
13846
13846
|
}
|
|
13847
|
-
return i.type === "NewExpression" && r === "callee" && i.callee === l ?
|
|
13847
|
+
return i.type === "NewExpression" && r === "callee" && i.callee === l ? _s(l) : !!(a !== !0 && !this.canBeFirstInStatement() && this.firstInStatement());
|
|
13848
13848
|
};
|
|
13849
13849
|
function Hr(a) {
|
|
13850
13850
|
return ue.BinaryExpression.check(a) || ue.LogicalExpression.check(a);
|
|
13851
13851
|
}
|
|
13852
|
-
function
|
|
13853
|
-
return ue.CallExpression.check(a) ? !0 : Bo.check(a) ? a.some(
|
|
13852
|
+
function _s(a) {
|
|
13853
|
+
return ue.CallExpression.check(a) ? !0 : Bo.check(a) ? a.some(_s) : ue.Node.check(a) ? fo(
|
|
13854
13854
|
a,
|
|
13855
|
-
(l, i) =>
|
|
13855
|
+
(l, i) => _s(i)
|
|
13856
13856
|
) : !1;
|
|
13857
13857
|
}
|
|
13858
13858
|
be.canBeFirstInStatement = function() {
|
|
@@ -13871,7 +13871,7 @@ be.firstInStatement = function() {
|
|
|
13871
13871
|
}
|
|
13872
13872
|
return !0;
|
|
13873
13873
|
};
|
|
13874
|
-
const Ct = Oe.Printable, dr = Oe.Expression, jo = Oe.ReturnStatement, Ro = Oe.SourceLocation, It = De.object,
|
|
13874
|
+
const Ct = Oe.Printable, dr = Oe.Expression, jo = Oe.ReturnStatement, Ro = Oe.SourceLocation, It = De.object, js = De.array, Uo = De.string, es = /[0-9a-z_$]/i, Kr = function(l) {
|
|
13875
13875
|
const i = this, r = [];
|
|
13876
13876
|
i.replace = function(o, u) {
|
|
13877
13877
|
Uo.check(u) && (u = j(u)), r.push({
|
|
@@ -13885,10 +13885,10 @@ const Ct = Oe.Printable, dr = Oe.Expression, jo = Oe.ReturnStatement, Ro = Oe.So
|
|
|
13885
13885
|
end: { line: l.length, column: l.getLineLength(l.length) }
|
|
13886
13886
|
};
|
|
13887
13887
|
let u = o.start, h = [];
|
|
13888
|
-
function d(g,
|
|
13889
|
-
h.push(l.slice(g,
|
|
13888
|
+
function d(g, b) {
|
|
13889
|
+
h.push(l.slice(g, b));
|
|
13890
13890
|
}
|
|
13891
|
-
return r.sort((g,
|
|
13891
|
+
return r.sort((g, b) => ie(g.start, b.start)).forEach(function(g) {
|
|
13892
13892
|
ie(u, g.start) > 0 || (d(u, g.start), h.push(g.lines), u = g.end);
|
|
13893
13893
|
}), d(u, o.end), L(h);
|
|
13894
13894
|
};
|
|
@@ -13901,12 +13901,12 @@ Xr.tryToReprintComments = function(a, l, i) {
|
|
|
13901
13901
|
o.stack.push("comments", mr(a)), u.stack.push("comments", mr(l));
|
|
13902
13902
|
const h = [], d = Qr(o, u, h);
|
|
13903
13903
|
return d && h.length > 0 && h.forEach(function(g) {
|
|
13904
|
-
const
|
|
13904
|
+
const b = g.oldPath.getValue();
|
|
13905
13905
|
r.replace(
|
|
13906
|
-
|
|
13906
|
+
b.loc,
|
|
13907
13907
|
// Comments can't have .comments, so it doesn't matter whether we
|
|
13908
13908
|
// print with comments or without.
|
|
13909
|
-
i(g.newPath).indentTail(
|
|
13909
|
+
i(g.newPath).indentTail(b.loc.indent)
|
|
13910
13910
|
);
|
|
13911
13911
|
}), d;
|
|
13912
13912
|
};
|
|
@@ -13944,30 +13944,30 @@ function $o(a) {
|
|
|
13944
13944
|
if (!(!o || !zo(a, u)))
|
|
13945
13945
|
return function(h) {
|
|
13946
13946
|
const d = new Kr(o);
|
|
13947
|
-
u.forEach(function(
|
|
13948
|
-
const S =
|
|
13949
|
-
Ro.assert(
|
|
13950
|
-
const
|
|
13947
|
+
u.forEach(function(b) {
|
|
13948
|
+
const S = b.newPath.getValue(), w = b.oldPath.getValue();
|
|
13949
|
+
Ro.assert(w.loc, !0);
|
|
13950
|
+
const v = !d.tryToReprintComments(
|
|
13951
13951
|
S,
|
|
13952
|
-
|
|
13952
|
+
w,
|
|
13953
13953
|
h
|
|
13954
13954
|
);
|
|
13955
|
-
|
|
13956
|
-
let I = h(
|
|
13957
|
-
includeComments:
|
|
13955
|
+
v && d.deleteComments(w);
|
|
13956
|
+
let I = h(b.newPath, {
|
|
13957
|
+
includeComments: v,
|
|
13958
13958
|
// If the oldNode we're replacing already had parentheses, we may
|
|
13959
13959
|
// not need to print the new node with any extra parentheses,
|
|
13960
13960
|
// because the existing parentheses will suffice. However, if the
|
|
13961
13961
|
// newNode has a different type than the oldNode, let the printer
|
|
13962
13962
|
// decide if reprint.newPath needs parentheses, as usual.
|
|
13963
|
-
avoidRootParens:
|
|
13964
|
-
}).indentTail(
|
|
13965
|
-
const T = Vo(o,
|
|
13963
|
+
avoidRootParens: w.type === S.type && b.oldPath.hasParens()
|
|
13964
|
+
}).indentTail(w.loc.indent);
|
|
13965
|
+
const T = Vo(o, w.loc, I), A = qo(o, w.loc, I);
|
|
13966
13966
|
if (T || A) {
|
|
13967
|
-
const
|
|
13968
|
-
T &&
|
|
13967
|
+
const P = [];
|
|
13968
|
+
T && P.push(" "), P.push(I), A && P.push(" "), I = L(P);
|
|
13969
13969
|
}
|
|
13970
|
-
d.replace(
|
|
13970
|
+
d.replace(w.loc, I);
|
|
13971
13971
|
});
|
|
13972
13972
|
const g = d.get(r).indentTail(-i.loc.indent);
|
|
13973
13973
|
return a.needsParens() ? L(["(", g, ")"]) : g;
|
|
@@ -13987,20 +13987,20 @@ function zo(a, l) {
|
|
|
13987
13987
|
const r = i.original;
|
|
13988
13988
|
if (Ct.assert(r), i.type !== r.type)
|
|
13989
13989
|
return !1;
|
|
13990
|
-
const o = new Le(r), u =
|
|
13990
|
+
const o = new Le(r), u = Rs(a, o, l);
|
|
13991
13991
|
return u || (l.length = 0), u;
|
|
13992
13992
|
}
|
|
13993
13993
|
function Gr(a, l, i) {
|
|
13994
13994
|
const r = a.getValue(), o = l.getValue();
|
|
13995
|
-
return r === o ? !0 :
|
|
13995
|
+
return r === o ? !0 : js.check(r) ? Qr(a, l, i) : It.check(r) ? Wo(a, l, i) : !1;
|
|
13996
13996
|
}
|
|
13997
13997
|
function Qr(a, l, i) {
|
|
13998
13998
|
const r = a.getValue(), o = l.getValue();
|
|
13999
13999
|
if (r === o || a.valueIsDuplicate() || l.valueIsDuplicate())
|
|
14000
14000
|
return !0;
|
|
14001
|
-
|
|
14001
|
+
js.assert(r);
|
|
14002
14002
|
const u = r.length;
|
|
14003
|
-
if (!(
|
|
14003
|
+
if (!(js.check(o) && o.length === u))
|
|
14004
14004
|
return !1;
|
|
14005
14005
|
for (let h = 0; h < u; ++h) {
|
|
14006
14006
|
a.stack.push(h, r[h]), l.stack.push(h, o[h]);
|
|
@@ -14030,7 +14030,7 @@ function Wo(a, l, i) {
|
|
|
14030
14030
|
}
|
|
14031
14031
|
if (r.type === o.type) {
|
|
14032
14032
|
const d = [];
|
|
14033
|
-
if (
|
|
14033
|
+
if (Rs(a, l, d))
|
|
14034
14034
|
i.push.apply(i, d);
|
|
14035
14035
|
else if (o.loc)
|
|
14036
14036
|
i.push({
|
|
@@ -14048,9 +14048,9 @@ function Wo(a, l, i) {
|
|
|
14048
14048
|
newPath: a.copy()
|
|
14049
14049
|
}), !0) : !1;
|
|
14050
14050
|
}
|
|
14051
|
-
return
|
|
14051
|
+
return Rs(a, l, i);
|
|
14052
14052
|
}
|
|
14053
|
-
function
|
|
14053
|
+
function Rs(a, l, i) {
|
|
14054
14054
|
const r = a.getValue(), o = l.getValue();
|
|
14055
14055
|
if (It.assert(r), It.assert(o), r.original === null || a.needsParens() && !l.hasParens())
|
|
14056
14056
|
return !1;
|
|
@@ -14078,7 +14078,7 @@ Ho.toString = function() {
|
|
|
14078
14078
|
};
|
|
14079
14079
|
const gr = new ts(""), Ko = function(l) {
|
|
14080
14080
|
const i = l && l.tabWidth;
|
|
14081
|
-
l =
|
|
14081
|
+
l = ns(l), l.sourceFileName = null;
|
|
14082
14082
|
function r(u, h) {
|
|
14083
14083
|
return u = Object.assign({}, u, h), (d) => o(d, u);
|
|
14084
14084
|
}
|
|
@@ -14095,7 +14095,7 @@ const gr = new ts(""), Ko = function(l) {
|
|
|
14095
14095
|
const S = u.getNode().loc;
|
|
14096
14096
|
S && S.lines && S.lines.guessTabWidth && (l.tabWidth = S.lines.guessTabWidth());
|
|
14097
14097
|
}
|
|
14098
|
-
const g = $o(u),
|
|
14098
|
+
const g = $o(u), b = g ? (
|
|
14099
14099
|
// Since the print function that we pass to the reprinter will
|
|
14100
14100
|
// be used to print "new" nodes, it's tempting to think we
|
|
14101
14101
|
// should pass printRootGenerically instead of print, to avoid
|
|
@@ -14114,7 +14114,7 @@ const gr = new ts(""), Ko = function(l) {
|
|
|
14114
14114
|
avoidRootParens: !1
|
|
14115
14115
|
})
|
|
14116
14116
|
);
|
|
14117
|
-
return l.tabWidth = d,
|
|
14117
|
+
return l.tabWidth = d, b;
|
|
14118
14118
|
}
|
|
14119
14119
|
this.print = function(u) {
|
|
14120
14120
|
if (!u)
|
|
@@ -14136,8 +14136,8 @@ const gr = new ts(""), Ko = function(l) {
|
|
|
14136
14136
|
function h(S) {
|
|
14137
14137
|
return fr(
|
|
14138
14138
|
S,
|
|
14139
|
-
(
|
|
14140
|
-
|
|
14139
|
+
(w) => xr(
|
|
14140
|
+
w,
|
|
14141
14141
|
l,
|
|
14142
14142
|
{
|
|
14143
14143
|
avoidRootParens: !1
|
|
@@ -14148,8 +14148,8 @@ const gr = new ts(""), Ko = function(l) {
|
|
|
14148
14148
|
}
|
|
14149
14149
|
const d = Le.from(u), g = l.reuseWhitespace;
|
|
14150
14150
|
l.reuseWhitespace = !1;
|
|
14151
|
-
const
|
|
14152
|
-
return l.reuseWhitespace = g,
|
|
14151
|
+
const b = new ts(h(d).toString(l));
|
|
14152
|
+
return l.reuseWhitespace = g, b;
|
|
14153
14153
|
};
|
|
14154
14154
|
};
|
|
14155
14155
|
function xr(a, l, i, r) {
|
|
@@ -14177,7 +14177,7 @@ function Xo(a, l, i) {
|
|
|
14177
14177
|
`);
|
|
14178
14178
|
}, "directives"), r.interpreter && o.push(a.call(i, "interpreter")), o.push(
|
|
14179
14179
|
a.call(
|
|
14180
|
-
(u) =>
|
|
14180
|
+
(u) => ot(u, l, i),
|
|
14181
14181
|
"body"
|
|
14182
14182
|
)
|
|
14183
14183
|
), L(o);
|
|
@@ -14259,7 +14259,7 @@ function Xo(a, l, i) {
|
|
|
14259
14259
|
a.call(i, "returnType")
|
|
14260
14260
|
), o.push(" => ", a.call(i, "body")), L(o);
|
|
14261
14261
|
case "MethodDefinition":
|
|
14262
|
-
return
|
|
14262
|
+
return Is(a, l, i);
|
|
14263
14263
|
case "YieldExpression":
|
|
14264
14264
|
return o.push("yield"), r.delegate && o.push("*"), r.argument && o.push(" ", a.call(i, "argument")), L(o);
|
|
14265
14265
|
case "AwaitExpression":
|
|
@@ -14334,7 +14334,7 @@ function Xo(a, l, i) {
|
|
|
14334
14334
|
o.push("static ");
|
|
14335
14335
|
case "BlockStatement": {
|
|
14336
14336
|
const u = a.call(
|
|
14337
|
-
(h) =>
|
|
14337
|
+
(h) => ot(h, l, i),
|
|
14338
14338
|
"body"
|
|
14339
14339
|
);
|
|
14340
14340
|
return u.isEmpty() && (!r.directives || r.directives.length === 0) ? (o.push("{}"), L(o)) : (o.push(`{
|
|
@@ -14367,33 +14367,33 @@ function Xo(a, l, i) {
|
|
|
14367
14367
|
const u = r.type === "ObjectTypeAnnotation", h = l.flowObjectCommas ? "," : u ? ";" : ",", d = [];
|
|
14368
14368
|
let g = !1;
|
|
14369
14369
|
u && (d.push("indexers", "callProperties"), r.internalSlots != null && d.push("internalSlots")), d.push("properties");
|
|
14370
|
-
let
|
|
14370
|
+
let b = 0;
|
|
14371
14371
|
d.forEach(function(A) {
|
|
14372
|
-
|
|
14372
|
+
b += r[A].length;
|
|
14373
14373
|
});
|
|
14374
|
-
const S = u &&
|
|
14375
|
-
o.push(S ?
|
|
14374
|
+
const S = u && b === 1 || b === 0, w = r.exact ? "{|" : "{", v = r.exact ? "|}" : "}";
|
|
14375
|
+
o.push(S ? w : w + `
|
|
14376
14376
|
`);
|
|
14377
14377
|
const I = o.length - 1;
|
|
14378
14378
|
let T = 0;
|
|
14379
14379
|
if (d.forEach(function(A) {
|
|
14380
|
-
a.each(function(
|
|
14381
|
-
let m = i(
|
|
14380
|
+
a.each(function(P) {
|
|
14381
|
+
let m = i(P);
|
|
14382
14382
|
S || (m = m.indent(l.tabWidth));
|
|
14383
14383
|
const O = !u && m.length > 1;
|
|
14384
14384
|
O && g && o.push(`
|
|
14385
|
-
`), o.push(m), T <
|
|
14385
|
+
`), o.push(m), T < b - 1 ? (o.push(h + (O ? `
|
|
14386
14386
|
|
|
14387
14387
|
` : `
|
|
14388
|
-
`)), g = !O) : (
|
|
14388
|
+
`)), g = !O) : (b !== 1 && u || !S && vt(l, "objects") && P.getValue().type !== "RestElement") && o.push(h), T++;
|
|
14389
14389
|
}, A);
|
|
14390
14390
|
}), r.inexact) {
|
|
14391
14391
|
const A = j("...", l);
|
|
14392
|
-
S ? (
|
|
14392
|
+
S ? (b > 0 && o.push(h, " "), o.push(A)) : o.push(`
|
|
14393
14393
|
`, A.indent(l.tabWidth));
|
|
14394
14394
|
}
|
|
14395
|
-
return o.push(S ?
|
|
14396
|
-
` +
|
|
14395
|
+
return o.push(S ? v : `
|
|
14396
|
+
` + v), T !== 0 && S && l.objectCurlySpacing && (o[I] = w + " ", o[o.length - 1] = " " + v), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), L(o);
|
|
14397
14397
|
}
|
|
14398
14398
|
case "PropertyPattern":
|
|
14399
14399
|
return L([
|
|
@@ -14404,7 +14404,7 @@ function Xo(a, l, i) {
|
|
|
14404
14404
|
case "ObjectProperty":
|
|
14405
14405
|
case "Property": {
|
|
14406
14406
|
if (r.method || r.kind === "get" || r.kind === "set")
|
|
14407
|
-
return
|
|
14407
|
+
return Is(a, l, i);
|
|
14408
14408
|
if (r.shorthand && r.value.type === "AssignmentPattern")
|
|
14409
14409
|
return a.call(i, "value");
|
|
14410
14410
|
const u = a.call(i, "key");
|
|
@@ -14414,7 +14414,7 @@ function Xo(a, l, i) {
|
|
|
14414
14414
|
case "ObjectMethod":
|
|
14415
14415
|
case "ClassPrivateMethod":
|
|
14416
14416
|
case "TSDeclareMethod":
|
|
14417
|
-
return
|
|
14417
|
+
return Is(a, l, i);
|
|
14418
14418
|
case "PrivateName":
|
|
14419
14419
|
return L(["#", a.call(i, "id")]);
|
|
14420
14420
|
case "Decorator":
|
|
@@ -14423,18 +14423,18 @@ function Xo(a, l, i) {
|
|
|
14423
14423
|
o.push("#");
|
|
14424
14424
|
case "ArrayExpression":
|
|
14425
14425
|
case "ArrayPattern": {
|
|
14426
|
-
const h = r.elements.length, d = a.map(i, "elements"),
|
|
14427
|
-
return
|
|
14426
|
+
const h = r.elements.length, d = a.map(i, "elements"), b = j(", ").join(d).getLineLength(1) <= l.wrapColumn;
|
|
14427
|
+
return b ? l.arrayBracketSpacing ? o.push("[ ") : o.push("[") : o.push(`[
|
|
14428
14428
|
`), a.each(function(S) {
|
|
14429
|
-
const
|
|
14429
|
+
const w = S.getName();
|
|
14430
14430
|
if (!S.getValue())
|
|
14431
14431
|
o.push(",");
|
|
14432
14432
|
else {
|
|
14433
|
-
let I = d[
|
|
14434
|
-
|
|
14433
|
+
let I = d[w];
|
|
14434
|
+
b ? w > 0 && o.push(" ") : I = I.indent(l.tabWidth), o.push(I), (w < h - 1 || !b && vt(l, "arrays")) && o.push(","), b || o.push(`
|
|
14435
14435
|
`);
|
|
14436
14436
|
}
|
|
14437
|
-
}, "elements"),
|
|
14437
|
+
}, "elements"), b && l.arrayBracketSpacing ? o.push(" ]") : o.push("]"), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), L(o);
|
|
14438
14438
|
}
|
|
14439
14439
|
case "SequenceExpression":
|
|
14440
14440
|
return j(", ").join(a.map(i, "expressions"));
|
|
@@ -14446,28 +14446,28 @@ function Xo(a, l, i) {
|
|
|
14446
14446
|
return j("null");
|
|
14447
14447
|
case "RegExpLiteral":
|
|
14448
14448
|
return j(
|
|
14449
|
-
|
|
14449
|
+
lt(r) || `/${r.pattern}/${r.flags || ""}`,
|
|
14450
14450
|
l
|
|
14451
14451
|
);
|
|
14452
14452
|
case "BigIntLiteral":
|
|
14453
|
-
return j(
|
|
14453
|
+
return j(lt(r) || r.value + "n", l);
|
|
14454
14454
|
case "NumericLiteral":
|
|
14455
|
-
return j(
|
|
14455
|
+
return j(lt(r) || r.value, l);
|
|
14456
14456
|
case "DecimalLiteral":
|
|
14457
|
-
return j(
|
|
14457
|
+
return j(lt(r) || r.value + "m", l);
|
|
14458
14458
|
case "StringLiteral":
|
|
14459
|
-
return j(
|
|
14459
|
+
return j(Et(r.value, l));
|
|
14460
14460
|
case "BooleanLiteral":
|
|
14461
14461
|
case "Literal":
|
|
14462
14462
|
return j(
|
|
14463
|
-
|
|
14463
|
+
lt(r) || (typeof r.value == "string" ? Et(r.value, l) : r.value),
|
|
14464
14464
|
l
|
|
14465
14465
|
);
|
|
14466
14466
|
case "Directive":
|
|
14467
14467
|
return a.call(i, "value");
|
|
14468
14468
|
case "DirectiveLiteral":
|
|
14469
14469
|
return j(
|
|
14470
|
-
|
|
14470
|
+
lt(r) || Et(r.value, l),
|
|
14471
14471
|
l
|
|
14472
14472
|
);
|
|
14473
14473
|
case "InterpreterDirective":
|
|
@@ -14476,7 +14476,7 @@ function Xo(a, l, i) {
|
|
|
14476
14476
|
case "ModuleSpecifier":
|
|
14477
14477
|
if (r.local)
|
|
14478
14478
|
throw new Error("The ESTree ModuleSpecifier type should be abstract");
|
|
14479
|
-
return j(
|
|
14479
|
+
return j(Et(r.value, l), l);
|
|
14480
14480
|
case "UnaryExpression":
|
|
14481
14481
|
return o.push(r.operator), /[a-z]$/.test(r.operator) && o.push(" "), o.push(a.call(i, "argument")), L(o);
|
|
14482
14482
|
case "UpdateExpression":
|
|
@@ -14495,8 +14495,8 @@ function Xo(a, l, i) {
|
|
|
14495
14495
|
r.declare && o.push("declare "), o.push(r.kind, " ");
|
|
14496
14496
|
let u = 0;
|
|
14497
14497
|
const h = a.map(function(g) {
|
|
14498
|
-
const
|
|
14499
|
-
return u = Math.max(
|
|
14498
|
+
const b = i(g);
|
|
14499
|
+
return u = Math.max(b.length, u), b;
|
|
14500
14500
|
}, "declarations");
|
|
14501
14501
|
u === 1 ? o.push(j(", ").join(h)) : h.length > 1 ? o.push(
|
|
14502
14502
|
j(`,
|
|
@@ -14527,9 +14527,9 @@ else`,
|
|
|
14527
14527
|
}
|
|
14528
14528
|
case "ForStatement": {
|
|
14529
14529
|
const u = a.call(i, "init"), h = u.length > 1 ? `;
|
|
14530
|
-
` : "; ", d = "for (", g = j(h).join([u, a.call(i, "test"), a.call(i, "update")]).indentTail(d.length),
|
|
14530
|
+
` : "; ", d = "for (", g = j(h).join([u, a.call(i, "test"), a.call(i, "update")]).indentTail(d.length), b = L([d, g, ")"]);
|
|
14531
14531
|
let S = Xe(a.call(i, "body"), l);
|
|
14532
|
-
return o.push(
|
|
14532
|
+
return o.push(b), b.length > 1 && (o.push(`
|
|
14533
14533
|
`), S = S.trimLeft()), o.push(S), L(o);
|
|
14534
14534
|
}
|
|
14535
14535
|
case "WhileStatement":
|
|
@@ -14568,7 +14568,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14568
14568
|
}
|
|
14569
14569
|
case "DoExpression": {
|
|
14570
14570
|
const u = a.call(
|
|
14571
|
-
(h) =>
|
|
14571
|
+
(h) => ot(h, l, i),
|
|
14572
14572
|
"body"
|
|
14573
14573
|
);
|
|
14574
14574
|
return L([`do {
|
|
@@ -14610,7 +14610,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14610
14610
|
`
|
|
14611
14611
|
`,
|
|
14612
14612
|
a.call(
|
|
14613
|
-
(u) =>
|
|
14613
|
+
(u) => ot(u, l, i),
|
|
14614
14614
|
"consequent"
|
|
14615
14615
|
).indent(l.tabWidth)
|
|
14616
14616
|
), L(o);
|
|
@@ -14643,18 +14643,18 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14643
14643
|
return d;
|
|
14644
14644
|
const g = L(
|
|
14645
14645
|
a.map(function(S) {
|
|
14646
|
-
const
|
|
14647
|
-
if (de.Literal.check(
|
|
14648
|
-
if (/\S/.test(
|
|
14649
|
-
return
|
|
14650
|
-
if (/\n/.test(
|
|
14646
|
+
const w = S.getValue();
|
|
14647
|
+
if (de.Literal.check(w) && typeof w.value == "string") {
|
|
14648
|
+
if (/\S/.test(w.value))
|
|
14649
|
+
return w.value.replace(/^\s+|\s+$/g, "");
|
|
14650
|
+
if (/\n/.test(w.value))
|
|
14651
14651
|
return `
|
|
14652
14652
|
`;
|
|
14653
14653
|
}
|
|
14654
14654
|
return i(S);
|
|
14655
14655
|
}, "children")
|
|
14656
|
-
).indentTail(l.tabWidth),
|
|
14657
|
-
return L([d, g,
|
|
14656
|
+
).indentTail(l.tabWidth), b = a.call(i, h);
|
|
14657
|
+
return L([d, g, b]);
|
|
14658
14658
|
}
|
|
14659
14659
|
case "JSXOpeningElement": {
|
|
14660
14660
|
o.push("<", a.call(i, "name"));
|
|
@@ -14663,8 +14663,8 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14663
14663
|
u.push(" ", i(g));
|
|
14664
14664
|
}, "attributes");
|
|
14665
14665
|
let h = L(u);
|
|
14666
|
-
return (h.length > 1 || h.getLineLength(1) > l.wrapColumn) && (u.forEach(function(g,
|
|
14667
|
-
g === " " && (u[
|
|
14666
|
+
return (h.length > 1 || h.getLineLength(1) > l.wrapColumn) && (u.forEach(function(g, b) {
|
|
14667
|
+
g === " " && (u[b] = `
|
|
14668
14668
|
`);
|
|
14669
14669
|
}), h = L(u).indentTail(l.tabWidth)), o.push(h, r.selfClosing ? " />" : ">"), L(o);
|
|
14670
14670
|
}
|
|
@@ -14689,7 +14689,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14689
14689
|
`{
|
|
14690
14690
|
`,
|
|
14691
14691
|
a.call(
|
|
14692
|
-
(u) =>
|
|
14692
|
+
(u) => ot(u, l, i),
|
|
14693
14693
|
"body"
|
|
14694
14694
|
).indent(l.tabWidth),
|
|
14695
14695
|
`
|
|
@@ -14702,7 +14702,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14702
14702
|
const u = r.accessibility || r.access;
|
|
14703
14703
|
typeof u == "string" && o.push(u, " "), r.static && o.push("static "), r.abstract && o.push("abstract "), r.readonly && o.push("readonly ");
|
|
14704
14704
|
let h = a.call(i, "key");
|
|
14705
|
-
return r.computed && (h = L(["[", h, "]"])), r.variance && (h = L([
|
|
14705
|
+
return r.computed && (h = L(["[", h, "]"])), r.variance && (h = L([St(a, i), h])), o.push(h), r.optional && o.push("?"), r.definite && o.push("!"), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), r.value && o.push(" = ", a.call(i, "value")), o.push(";"), L(o);
|
|
14706
14706
|
}
|
|
14707
14707
|
case "ClassPrivateProperty":
|
|
14708
14708
|
return r.static && o.push("static "), o.push(a.call(i, "key")), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), r.value && o.push(" = ", a.call(i, "value")), o.push(";"), L(o);
|
|
@@ -14724,7 +14724,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14724
14724
|
), r.implements && r.implements.length > 0 && o.push(
|
|
14725
14725
|
" implements ",
|
|
14726
14726
|
j(", ").join(a.map(i, "implements"))
|
|
14727
|
-
), o.push(" ", a.call(i, "body")), r.type === "DeclareClass" ?
|
|
14727
|
+
), o.push(" ", a.call(i, "body")), r.type === "DeclareClass" ? Tt(a, o) : L(o);
|
|
14728
14728
|
case "TemplateElement":
|
|
14729
14729
|
return j(r.value.raw, l).lockIndentTail();
|
|
14730
14730
|
case "TemplateLiteral": {
|
|
@@ -14781,12 +14781,12 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14781
14781
|
const u = a.map(i, "types"), d = j(", ").join(u).getLineLength(1) <= l.wrapColumn;
|
|
14782
14782
|
return d ? l.arrayBracketSpacing ? o.push("[ ") : o.push("[") : o.push(`[
|
|
14783
14783
|
`), a.each(function(g) {
|
|
14784
|
-
const
|
|
14784
|
+
const b = g.getName();
|
|
14785
14785
|
if (!g.getValue())
|
|
14786
14786
|
o.push(",");
|
|
14787
14787
|
else {
|
|
14788
|
-
let
|
|
14789
|
-
d ?
|
|
14788
|
+
let w = u[b];
|
|
14789
|
+
d ? b > 0 && o.push(" ") : w = w.indent(l.tabWidth), o.push(w), (b < r.types.length - 1 || !d && vt(l, "arrays")) && o.push(","), d || o.push(`
|
|
14790
14790
|
`);
|
|
14791
14791
|
}
|
|
14792
14792
|
}, "types"), d && l.arrayBracketSpacing ? o.push(" ]") : o.push("]"), L(o);
|
|
@@ -14801,25 +14801,25 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14801
14801
|
j(", ").join(a.map(i, "extends"))
|
|
14802
14802
|
), o.push(" ", a.call(i, "body")), L(o);
|
|
14803
14803
|
case "DeclareFunction":
|
|
14804
|
-
return
|
|
14804
|
+
return Tt(a, [
|
|
14805
14805
|
"function ",
|
|
14806
14806
|
a.call(i, "id"),
|
|
14807
14807
|
";"
|
|
14808
14808
|
]);
|
|
14809
14809
|
case "DeclareModule":
|
|
14810
|
-
return
|
|
14810
|
+
return Tt(a, [
|
|
14811
14811
|
"module ",
|
|
14812
14812
|
a.call(i, "id"),
|
|
14813
14813
|
" ",
|
|
14814
14814
|
a.call(i, "body")
|
|
14815
14815
|
]);
|
|
14816
14816
|
case "DeclareModuleExports":
|
|
14817
|
-
return
|
|
14817
|
+
return Tt(a, [
|
|
14818
14818
|
"module.exports",
|
|
14819
14819
|
a.call(i, "typeAnnotation")
|
|
14820
14820
|
]);
|
|
14821
14821
|
case "DeclareVariable":
|
|
14822
|
-
return
|
|
14822
|
+
return Tt(a, ["var ", a.call(i, "id"), ";"]);
|
|
14823
14823
|
case "DeclareExportDeclaration":
|
|
14824
14824
|
case "DeclareExportAllDeclaration":
|
|
14825
14825
|
return L(["declare ", Pr(a, l, i)]);
|
|
@@ -14863,12 +14863,12 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14863
14863
|
case "FunctionTypeAnnotation": {
|
|
14864
14864
|
const u = a.getParentNode(0), h = !(de.ObjectTypeCallProperty.check(u) || de.ObjectTypeInternalSlot.check(u) && u.method || de.DeclareFunction.check(a.getParentNode(2)));
|
|
14865
14865
|
h && !de.FunctionTypeParam.check(u) && !de.TypeAlias.check(u) && o.push(": ");
|
|
14866
|
-
const g = !!r.typeParameters,
|
|
14866
|
+
const g = !!r.typeParameters, b = g || r.params.length !== 1 || r.params[0].name;
|
|
14867
14867
|
return o.push(
|
|
14868
14868
|
g ? a.call(i, "typeParameters") : "",
|
|
14869
|
-
|
|
14869
|
+
b ? "(" : "",
|
|
14870
14870
|
Me(a, l, i),
|
|
14871
|
-
|
|
14871
|
+
b ? ")" : ""
|
|
14872
14872
|
), r.returnType && o.push(
|
|
14873
14873
|
h ? " => " : ": ",
|
|
14874
14874
|
a.call(i, "returnType")
|
|
@@ -14916,10 +14916,10 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14916
14916
|
case "ObjectTypeCallProperty":
|
|
14917
14917
|
return a.call(i, "value");
|
|
14918
14918
|
case "ObjectTypeIndexer":
|
|
14919
|
-
return r.static && o.push("static "), o.push(
|
|
14919
|
+
return r.static && o.push("static "), o.push(St(a, i), "["), r.id && o.push(a.call(i, "id"), ": "), o.push(a.call(i, "key"), "]: ", a.call(i, "value")), L(o);
|
|
14920
14920
|
case "ObjectTypeProperty":
|
|
14921
14921
|
return L([
|
|
14922
|
-
|
|
14922
|
+
St(a, i),
|
|
14923
14923
|
a.call(i, "key"),
|
|
14924
14924
|
r.optional ? "?" : "",
|
|
14925
14925
|
": ",
|
|
@@ -14942,7 +14942,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14942
14942
|
a.call(i, "id")
|
|
14943
14943
|
]);
|
|
14944
14944
|
case "StringLiteralTypeAnnotation":
|
|
14945
|
-
return j(
|
|
14945
|
+
return j(Et(r.value, l), l);
|
|
14946
14946
|
case "NumberLiteralTypeAnnotation":
|
|
14947
14947
|
case "NumericLiteralTypeAnnotation":
|
|
14948
14948
|
return j(JSON.stringify(r.value), l);
|
|
@@ -14986,7 +14986,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14986
14986
|
case "Variance":
|
|
14987
14987
|
return r.kind === "plus" ? j("+") : r.kind === "minus" ? j("-") : j("");
|
|
14988
14988
|
case "TypeParameter":
|
|
14989
|
-
return r.variance && o.push(
|
|
14989
|
+
return r.variance && o.push(St(a, i)), o.push(a.call(i, "name")), r.bound && o.push(a.call(i, "bound")), r.default && o.push("=", a.call(i, "default")), L(o);
|
|
14990
14990
|
case "TypeofTypeAnnotation":
|
|
14991
14991
|
return L([
|
|
14992
14992
|
j("typeof ", l),
|
|
@@ -15164,7 +15164,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15164
15164
|
a.call(i, "typeAnnotation")
|
|
15165
15165
|
]);
|
|
15166
15166
|
case "TSPropertySignature":
|
|
15167
|
-
return o.push(
|
|
15167
|
+
return o.push(St(a, i), r.readonly ? "readonly " : ""), r.computed ? o.push("[", a.call(i, "key"), "]") : o.push(a.call(i, "key")), o.push(r.optional ? "?" : "", a.call(i, "typeAnnotation")), L(o);
|
|
15168
15168
|
case "TSMethodSignature":
|
|
15169
15169
|
return r.computed ? o.push("[", a.call(i, "key"), "]") : o.push(a.call(i, "key")), r.optional && o.push("?"), o.push(
|
|
15170
15170
|
a.call(i, "typeParameters"),
|
|
@@ -15267,7 +15267,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15267
15267
|
return a.getParentNode().type === "TSModuleDeclaration" ? o.push(".") : (r.declare && o.push("declare "), r.global || (r.id.type === "StringLiteral" || r.id.type === "Literal" && typeof r.id.value == "string" || r.loc && r.loc.lines && r.id.loc && r.loc.lines.sliceString(r.loc.start, r.id.loc.start).indexOf("module") >= 0 ? o.push("module ") : o.push("namespace "))), o.push(a.call(i, "id")), r.body && (o.push(" "), o.push(a.call(i, "body"))), L(o);
|
|
15268
15268
|
case "TSModuleBlock": {
|
|
15269
15269
|
const u = a.call(
|
|
15270
|
-
(h) =>
|
|
15270
|
+
(h) => ot(h, l, i),
|
|
15271
15271
|
"body"
|
|
15272
15272
|
);
|
|
15273
15273
|
return u.isEmpty() ? o.push("{}") : o.push(`{
|
|
@@ -15323,7 +15323,7 @@ function Go(a, l) {
|
|
|
15323
15323
|
!_r(a) ? a.each(function(o) {
|
|
15324
15324
|
i.push(l(o), `
|
|
15325
15325
|
`);
|
|
15326
|
-
}, "decorators") :
|
|
15326
|
+
}, "decorators") : rs(r) && r.declaration && r.declaration.decorators && a.each(
|
|
15327
15327
|
function(o) {
|
|
15328
15328
|
i.push(l(o), `
|
|
15329
15329
|
`);
|
|
@@ -15332,7 +15332,7 @@ function Go(a, l) {
|
|
|
15332
15332
|
"decorators"
|
|
15333
15333
|
), L(i);
|
|
15334
15334
|
}
|
|
15335
|
-
function
|
|
15335
|
+
function ot(a, l, i) {
|
|
15336
15336
|
const r = [];
|
|
15337
15337
|
a.each(function(d) {
|
|
15338
15338
|
const g = d.getValue();
|
|
@@ -15344,16 +15344,16 @@ function at(a, l, i) {
|
|
|
15344
15344
|
let o = null;
|
|
15345
15345
|
const u = r.length, h = [];
|
|
15346
15346
|
return r.forEach(function(d, g) {
|
|
15347
|
-
const
|
|
15347
|
+
const b = d.printed, S = d.node, w = b.length > 1, v = g > 0, I = g < u - 1;
|
|
15348
15348
|
let T, A;
|
|
15349
|
-
const
|
|
15350
|
-
if (
|
|
15349
|
+
const P = S && S.loc && S.loc.lines, m = P && l.reuseWhitespace && Br(S, P);
|
|
15350
|
+
if (v)
|
|
15351
15351
|
if (m) {
|
|
15352
|
-
const O =
|
|
15352
|
+
const O = P.skipSpaces(m.start, !0), U = O ? O.line : 1, D = m.start.line - U;
|
|
15353
15353
|
T = Array(D + 1).join(`
|
|
15354
15354
|
`);
|
|
15355
15355
|
} else
|
|
15356
|
-
T =
|
|
15356
|
+
T = w ? `
|
|
15357
15357
|
|
|
15358
15358
|
` : `
|
|
15359
15359
|
`;
|
|
@@ -15361,17 +15361,17 @@ function at(a, l, i) {
|
|
|
15361
15361
|
T = "";
|
|
15362
15362
|
if (I)
|
|
15363
15363
|
if (m) {
|
|
15364
|
-
const O =
|
|
15364
|
+
const O = P.skipSpaces(m.end), D = (O ? O.line : P.length) - m.end.line;
|
|
15365
15365
|
A = Array(D + 1).join(`
|
|
15366
15366
|
`);
|
|
15367
15367
|
} else
|
|
15368
|
-
A =
|
|
15368
|
+
A = w ? `
|
|
15369
15369
|
|
|
15370
15370
|
` : `
|
|
15371
15371
|
`;
|
|
15372
15372
|
else
|
|
15373
15373
|
A = "";
|
|
15374
|
-
h.push(Qo(o, T),
|
|
15374
|
+
h.push(Qo(o, T), b), I ? o = A : A && h.push(A);
|
|
15375
15375
|
}), L(h);
|
|
15376
15376
|
}
|
|
15377
15377
|
function Qo(a, l) {
|
|
@@ -15390,7 +15390,7 @@ function Yr(a) {
|
|
|
15390
15390
|
const i = a.accessibility || a.access;
|
|
15391
15391
|
return typeof i == "string" && l.push(i, " "), a.static && l.push("static "), a.override && l.push("override "), a.abstract && l.push("abstract "), a.readonly && l.push("readonly "), l;
|
|
15392
15392
|
}
|
|
15393
|
-
function
|
|
15393
|
+
function Is(a, l, i) {
|
|
15394
15394
|
const r = a.getNode(), o = r.kind, u = [];
|
|
15395
15395
|
let h = r.value;
|
|
15396
15396
|
de.FunctionExpression.check(h) || (h = r), u.push(...Yr(r)), h.async && u.push("async "), h.generator && u.push("*"), (o === "get" || o === "set") && u.push(o, " ");
|
|
@@ -15413,7 +15413,7 @@ function Cs(a, l, i) {
|
|
|
15413
15413
|
), h.body ? u.push(" ", a.call(i, "value", "body")) : u.push(";")), L(u);
|
|
15414
15414
|
}
|
|
15415
15415
|
function br(a, l, i) {
|
|
15416
|
-
const r = a.map(i, "arguments"), o =
|
|
15416
|
+
const r = a.map(i, "arguments"), o = vt(l, "parameters");
|
|
15417
15417
|
let u = j(", ").join(r);
|
|
15418
15418
|
return u.getLineLength(1) > l.wrapColumn ? (u = j(`,
|
|
15419
15419
|
`).join(r), L([
|
|
@@ -15429,12 +15429,12 @@ function Me(a, l, i) {
|
|
|
15429
15429
|
const r = a.getValue();
|
|
15430
15430
|
let o, u = [];
|
|
15431
15431
|
r.params ? (o = r.params, u = a.map(i, "params")) : r.parameters && (o = r.parameters, u = a.map(i, "parameters")), r.defaults && a.each(function(d) {
|
|
15432
|
-
const g = d.getName(),
|
|
15433
|
-
|
|
15432
|
+
const g = d.getName(), b = u[g];
|
|
15433
|
+
b && d.getValue() && (u[g] = L([b, " = ", i(d)]));
|
|
15434
15434
|
}, "defaults"), r.rest && u.push(L(["...", a.call(i, "rest")]));
|
|
15435
15435
|
let h = j(", ").join(u);
|
|
15436
15436
|
return h.length > 1 || h.getLineLength(1) > l.wrapColumn ? (h = j(`,
|
|
15437
|
-
`).join(u),
|
|
15437
|
+
`).join(u), vt(l, "parameters") && !r.rest && o[o.length - 1].type !== "RestElement" ? h = L([h, `,
|
|
15438
15438
|
`]) : h = L([h, `
|
|
15439
15439
|
`]), L([`
|
|
15440
15440
|
`, h.indent(l.tabWidth)])) : h;
|
|
@@ -15467,19 +15467,19 @@ function Pr(a, l, i) {
|
|
|
15467
15467
|
o.push("{}");
|
|
15468
15468
|
else if (r.specifiers[0].type === "ExportDefaultSpecifier") {
|
|
15469
15469
|
const d = [], g = [];
|
|
15470
|
-
if (a.each(function(
|
|
15471
|
-
|
|
15472
|
-
}, "specifiers"), d.forEach((
|
|
15473
|
-
S > 0 && o.push(", "), o.push(
|
|
15470
|
+
if (a.each(function(b) {
|
|
15471
|
+
b.getValue().type === "ExportDefaultSpecifier" ? d.push(i(b)) : g.push(i(b));
|
|
15472
|
+
}, "specifiers"), d.forEach((b, S) => {
|
|
15473
|
+
S > 0 && o.push(", "), o.push(b);
|
|
15474
15474
|
}), g.length > 0) {
|
|
15475
|
-
let
|
|
15476
|
-
|
|
15475
|
+
let b = j(", ").join(g);
|
|
15476
|
+
b.getLineLength(1) > l.wrapColumn && (b = L([
|
|
15477
15477
|
j(`,
|
|
15478
15478
|
`).join(g).indent(l.tabWidth),
|
|
15479
15479
|
","
|
|
15480
|
-
])), d.length > 0 && o.push(", "),
|
|
15481
|
-
`,
|
|
15482
|
-
}`) : l.objectCurlySpacing ? o.push("{ ",
|
|
15480
|
+
])), d.length > 0 && o.push(", "), b.length > 1 ? o.push(`{
|
|
15481
|
+
`, b, `
|
|
15482
|
+
}`) : l.objectCurlySpacing ? o.push("{ ", b, " }") : o.push("{", b, "}");
|
|
15483
15483
|
}
|
|
15484
15484
|
} else
|
|
15485
15485
|
o.push(
|
|
@@ -15496,10 +15496,10 @@ function Pr(a, l, i) {
|
|
|
15496
15496
|
let h = L(o);
|
|
15497
15497
|
return Nt(h) !== ";" && !(r.declaration && (r.declaration.type === "FunctionDeclaration" || r.declaration.type === "ClassDeclaration" || r.declaration.type === "TSModuleDeclaration" || r.declaration.type === "TSInterfaceDeclaration" || r.declaration.type === "TSEnumDeclaration")) && (h = L([h, ";"])), h;
|
|
15498
15498
|
}
|
|
15499
|
-
function
|
|
15499
|
+
function Tt(a, l) {
|
|
15500
15500
|
return _r(a) || l.unshift("declare "), L(l);
|
|
15501
15501
|
}
|
|
15502
|
-
function
|
|
15502
|
+
function St(a, l) {
|
|
15503
15503
|
return a.call(function(i) {
|
|
15504
15504
|
const r = i.getValue();
|
|
15505
15505
|
return r ? r === "plus" ? j("+") : r === "minus" ? j("-") : l(i) : j("");
|
|
@@ -15523,7 +15523,7 @@ function Tr(a) {
|
|
|
15523
15523
|
function Kt(a) {
|
|
15524
15524
|
return a.replace(/['"]/g, (l) => l === '"' ? "'" : '"');
|
|
15525
15525
|
}
|
|
15526
|
-
function
|
|
15526
|
+
function lt(a) {
|
|
15527
15527
|
const l = je(a, "value"), i = je(a, "extra");
|
|
15528
15528
|
if (i && typeof i.raw == "string" && l == i.rawValue)
|
|
15529
15529
|
return i.raw;
|
|
@@ -15538,7 +15538,7 @@ function Xt(a) {
|
|
|
15538
15538
|
return "\\u" + l.charCodeAt(0).toString(16);
|
|
15539
15539
|
});
|
|
15540
15540
|
}
|
|
15541
|
-
function
|
|
15541
|
+
function Et(a, l) {
|
|
15542
15542
|
switch (zs.assert(a), l.quote) {
|
|
15543
15543
|
case "auto": {
|
|
15544
15544
|
const i = Xt(a), r = Kt(Xt(Kt(a)));
|
|
@@ -15629,8 +15629,8 @@ class Ae extends Error {
|
|
|
15629
15629
|
constructor(l, i) {
|
|
15630
15630
|
if (super(""), Sr(this, "rawMessage"), Sr(this, "options"), this.name = "MagicastError", this.rawMessage = l, this.options = i, i?.ast && i?.code && i.ast.loc) {
|
|
15631
15631
|
const { line: r, column: o } = i.ast.loc.start, u = i.code.split(`
|
|
15632
|
-
`), h = Math.max(0, r - 3), d = Math.min(u.length, r + 3), g = u.slice(h, d).map((
|
|
15633
|
-
${" ".repeat(6 + o)}^`),
|
|
15632
|
+
`), h = Math.max(0, r - 3), d = Math.min(u.length, r + 3), g = u.slice(h, d).map((b, S) => (b = `${(h + S + 1).toString().padStart(3, " ")} | ${b}`, h + S === r - 1 && (b += `
|
|
15633
|
+
${" ".repeat(6 + o)}^`), b));
|
|
15634
15634
|
l += `
|
|
15635
15635
|
|
|
15636
15636
|
${g.join(`
|
|
@@ -15733,10 +15733,10 @@ function Ie(a, l, i) {
|
|
|
15733
15733
|
}
|
|
15734
15734
|
);
|
|
15735
15735
|
}
|
|
15736
|
-
const Ee = Dt,
|
|
15736
|
+
const Ee = Dt, Ns = /* @__PURE__ */ new WeakMap();
|
|
15737
15737
|
function ol(a, l, i) {
|
|
15738
|
-
if (
|
|
15739
|
-
return
|
|
15738
|
+
if (Ns.has(l))
|
|
15739
|
+
return Ns.get(l);
|
|
15740
15740
|
const r = Ie(
|
|
15741
15741
|
l,
|
|
15742
15742
|
{
|
|
@@ -15790,7 +15790,7 @@ function ol(a, l, i) {
|
|
|
15790
15790
|
}
|
|
15791
15791
|
}
|
|
15792
15792
|
);
|
|
15793
|
-
return
|
|
15793
|
+
return Ns.set(l, r), r;
|
|
15794
15794
|
}
|
|
15795
15795
|
function ll(a, l) {
|
|
15796
15796
|
const i = () => {
|
|
@@ -15801,27 +15801,27 @@ function ll(a, l) {
|
|
|
15801
15801
|
h.push(ol(d, g, a));
|
|
15802
15802
|
return h;
|
|
15803
15803
|
}, r = (h, d, g) => {
|
|
15804
|
-
const
|
|
15804
|
+
const b = i(), S = b.find((T) => T.local === h), w = d.local || h;
|
|
15805
15805
|
if (S)
|
|
15806
|
-
return S.imported = d.imported, S.local =
|
|
15807
|
-
const
|
|
15806
|
+
return S.imported = d.imported, S.local = w, S.from = d.from, !0;
|
|
15807
|
+
const v = d.imported === "default" ? Ee.importDefaultSpecifier(Ee.identifier(w)) : d.imported === "*" ? Ee.importNamespaceSpecifier(Ee.identifier(w)) : Ee.importSpecifier(
|
|
15808
15808
|
Ee.identifier(d.imported),
|
|
15809
|
-
Ee.identifier(
|
|
15810
|
-
), I =
|
|
15809
|
+
Ee.identifier(w)
|
|
15810
|
+
), I = b.find(
|
|
15811
15811
|
(T) => T.from === d.from
|
|
15812
15812
|
)?.$declaration;
|
|
15813
15813
|
if (I)
|
|
15814
|
-
I.specifiers.push(
|
|
15815
|
-
else if (g === "prepend" ||
|
|
15814
|
+
I.specifiers.push(v);
|
|
15815
|
+
else if (g === "prepend" || b.length === 0)
|
|
15816
15816
|
a.body.unshift(
|
|
15817
|
-
Ee.importDeclaration([
|
|
15817
|
+
Ee.importDeclaration([v], Ee.stringLiteral(d.from))
|
|
15818
15818
|
);
|
|
15819
15819
|
else {
|
|
15820
|
-
const T =
|
|
15820
|
+
const T = b.at(-1).$declaration, A = a.body.indexOf(T);
|
|
15821
15821
|
a.body.splice(
|
|
15822
15822
|
A + 1,
|
|
15823
15823
|
0,
|
|
15824
|
-
Ee.importDeclaration([
|
|
15824
|
+
Ee.importDeclaration([v], Ee.stringLiteral(d.from))
|
|
15825
15825
|
);
|
|
15826
15826
|
}
|
|
15827
15827
|
return !0;
|
|
@@ -15829,8 +15829,8 @@ function ll(a, l) {
|
|
|
15829
15829
|
const d = i().find((S) => S.local === h);
|
|
15830
15830
|
if (!d)
|
|
15831
15831
|
return !1;
|
|
15832
|
-
const g = d.$declaration,
|
|
15833
|
-
return g.specifiers = g.specifiers.filter((S) => S !==
|
|
15832
|
+
const g = d.$declaration, b = d.$ast;
|
|
15833
|
+
return g.specifiers = g.specifiers.filter((S) => S !== b), g.specifiers.length === 0 && (a.body = a.body.filter((S) => S !== g)), !0;
|
|
15834
15834
|
};
|
|
15835
15835
|
return Ie(
|
|
15836
15836
|
a,
|
|
@@ -15871,7 +15871,7 @@ function ll(a, l) {
|
|
|
15871
15871
|
}
|
|
15872
15872
|
);
|
|
15873
15873
|
}
|
|
15874
|
-
function
|
|
15874
|
+
function as(a, l, i) {
|
|
15875
15875
|
const r = (u) => l[u], o = (u, h) => {
|
|
15876
15876
|
l[u] = h;
|
|
15877
15877
|
};
|
|
@@ -15895,8 +15895,8 @@ function ns(a, l, i) {
|
|
|
15895
15895
|
return l.splice(
|
|
15896
15896
|
u,
|
|
15897
15897
|
h,
|
|
15898
|
-
...d.map((
|
|
15899
|
-
).map((
|
|
15898
|
+
...d.map((b) => Ce(b))
|
|
15899
|
+
).map((b) => Te(b, i));
|
|
15900
15900
|
},
|
|
15901
15901
|
find(u) {
|
|
15902
15902
|
return l.map((h) => Te(h, i)).find(u);
|
|
@@ -15917,8 +15917,8 @@ function ns(a, l, i) {
|
|
|
15917
15917
|
return l.length;
|
|
15918
15918
|
if (h === Symbol.iterator)
|
|
15919
15919
|
return function* () {
|
|
15920
|
-
for (const
|
|
15921
|
-
yield Te(
|
|
15920
|
+
for (const b of l)
|
|
15921
|
+
yield Te(b, i);
|
|
15922
15922
|
};
|
|
15923
15923
|
if (typeof h == "symbol")
|
|
15924
15924
|
return;
|
|
@@ -15949,7 +15949,7 @@ function ns(a, l, i) {
|
|
|
15949
15949
|
}
|
|
15950
15950
|
function cl(a, l) {
|
|
15951
15951
|
if ("elements" in a)
|
|
15952
|
-
return
|
|
15952
|
+
return as(a, a.elements, l);
|
|
15953
15953
|
}
|
|
15954
15954
|
function ul(a, l) {
|
|
15955
15955
|
if (a.type !== "CallExpression")
|
|
@@ -15963,7 +15963,7 @@ function ul(a, l) {
|
|
|
15963
15963
|
)}`;
|
|
15964
15964
|
throw new Ae("Not implemented");
|
|
15965
15965
|
}
|
|
15966
|
-
const r =
|
|
15966
|
+
const r = as(a, a.arguments, l);
|
|
15967
15967
|
return Ie(
|
|
15968
15968
|
a,
|
|
15969
15969
|
{
|
|
@@ -15977,7 +15977,7 @@ function ul(a, l) {
|
|
|
15977
15977
|
function hl(a, l) {
|
|
15978
15978
|
if (a.type !== "ArrowFunctionExpression")
|
|
15979
15979
|
throw new Ae("Not an arrow function expression");
|
|
15980
|
-
const i =
|
|
15980
|
+
const i = as(a, a.params, l);
|
|
15981
15981
|
return Ie(
|
|
15982
15982
|
a,
|
|
15983
15983
|
{
|
|
@@ -16068,7 +16068,7 @@ function dl(a, l) {
|
|
|
16068
16068
|
)}`;
|
|
16069
16069
|
throw new Ae("Not implemented");
|
|
16070
16070
|
}
|
|
16071
|
-
const r =
|
|
16071
|
+
const r = as(a, a.arguments, l);
|
|
16072
16072
|
return Ie(
|
|
16073
16073
|
a,
|
|
16074
16074
|
{
|
|
@@ -16113,14 +16113,14 @@ function gl(a) {
|
|
|
16113
16113
|
{}
|
|
16114
16114
|
);
|
|
16115
16115
|
}
|
|
16116
|
-
const
|
|
16116
|
+
const ks = /* @__PURE__ */ new WeakMap();
|
|
16117
16117
|
function Te(a, l) {
|
|
16118
16118
|
if (en.has(typeof a))
|
|
16119
16119
|
return a;
|
|
16120
16120
|
if (il.has(a.type))
|
|
16121
16121
|
return a.value;
|
|
16122
|
-
if (
|
|
16123
|
-
return
|
|
16122
|
+
if (ks.has(a))
|
|
16123
|
+
return ks.get(a);
|
|
16124
16124
|
let i;
|
|
16125
16125
|
switch (a.type) {
|
|
16126
16126
|
case "ObjectExpression": {
|
|
@@ -16166,9 +16166,9 @@ function Te(a, l) {
|
|
|
16166
16166
|
code: l?.$code
|
|
16167
16167
|
});
|
|
16168
16168
|
}
|
|
16169
|
-
return
|
|
16169
|
+
return ks.set(a, i), i;
|
|
16170
16170
|
}
|
|
16171
|
-
const
|
|
16171
|
+
const At = Dt;
|
|
16172
16172
|
function xl(a, l) {
|
|
16173
16173
|
const i = (o) => {
|
|
16174
16174
|
const u = o === "default" ? "ExportDefaultDeclaration" : "ExportNamedDeclaration";
|
|
@@ -16191,17 +16191,17 @@ function xl(a, l) {
|
|
|
16191
16191
|
return;
|
|
16192
16192
|
}
|
|
16193
16193
|
if (g.declaration && "declarations" in g.declaration) {
|
|
16194
|
-
const
|
|
16195
|
-
if ("name" in
|
|
16196
|
-
|
|
16194
|
+
const b = g.declaration.declarations[0];
|
|
16195
|
+
if ("name" in b.id && b.id.name === o) {
|
|
16196
|
+
b.init = d;
|
|
16197
16197
|
return;
|
|
16198
16198
|
}
|
|
16199
16199
|
}
|
|
16200
16200
|
}
|
|
16201
16201
|
a.body.push(
|
|
16202
|
-
o === "default" ?
|
|
16203
|
-
|
|
16204
|
-
|
|
16202
|
+
o === "default" ? At.exportDefaultDeclaration(d) : At.exportNamedDeclaration(
|
|
16203
|
+
At.variableDeclaration("const", [
|
|
16204
|
+
At.variableDeclarator(At.identifier(o), d)
|
|
16205
16205
|
])
|
|
16206
16206
|
)
|
|
16207
16207
|
);
|
|
@@ -16233,8 +16233,8 @@ function xl(a, l) {
|
|
|
16233
16233
|
if (u === "default")
|
|
16234
16234
|
return a.body.splice(d, 1), !0;
|
|
16235
16235
|
if (g.declaration && "declarations" in g.declaration) {
|
|
16236
|
-
const
|
|
16237
|
-
if ("name" in
|
|
16236
|
+
const b = g.declaration.declarations[0];
|
|
16237
|
+
if ("name" in b.id && b.id.name === u)
|
|
16238
16238
|
return a.body.splice(d, 1), !0;
|
|
16239
16239
|
}
|
|
16240
16240
|
}
|
|
@@ -16267,38 +16267,38 @@ function Pl(a, l = {}) {
|
|
|
16267
16267
|
trailingComma: l.trailingComma === void 0
|
|
16268
16268
|
};
|
|
16269
16269
|
let r = 2, o = 0, u = 0, h = 0, d = 0;
|
|
16270
|
-
const g = /(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,
|
|
16270
|
+
const g = /(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g, b = {
|
|
16271
16271
|
doubleQuote: 0,
|
|
16272
16272
|
singleQuote: 0,
|
|
16273
16273
|
singleParam: 0,
|
|
16274
16274
|
trailingComma: 0
|
|
16275
16275
|
}, S = (a || "").split(`
|
|
16276
16276
|
`);
|
|
16277
|
-
let
|
|
16278
|
-
for (const
|
|
16279
|
-
const I =
|
|
16277
|
+
let w = !1;
|
|
16278
|
+
for (const v of S) {
|
|
16279
|
+
const I = v.trim();
|
|
16280
16280
|
if (I.length !== 0) {
|
|
16281
|
-
if (i.wrapColumn &&
|
|
16282
|
-
const T =
|
|
16281
|
+
if (i.wrapColumn && v.length > h && (h = v.length), i.indent) {
|
|
16282
|
+
const T = v.match(/^\s+/)?.[0] || "";
|
|
16283
16283
|
T.length > 0 && (T.length > 0 && T.length < r && (r = T.length), T[0] === " " ? o++ : T.length > 0 && o--);
|
|
16284
16284
|
}
|
|
16285
16285
|
if (I.at(-1) === ";" ? u++ : I.length > 0 && u--, i.quote || i.arrowParens) {
|
|
16286
16286
|
const T = I.matchAll(g);
|
|
16287
16287
|
for (const A of T)
|
|
16288
16288
|
if (A.groups)
|
|
16289
|
-
for (const
|
|
16290
|
-
A.groups[
|
|
16289
|
+
for (const P in b)
|
|
16290
|
+
A.groups[P] && b[P]++;
|
|
16291
16291
|
}
|
|
16292
|
-
i.trailingComma && ((
|
|
16292
|
+
i.trailingComma && ((v.startsWith("}") || v.startsWith("]")) && (w ? d++ : d--), w = I.endsWith(","));
|
|
16293
16293
|
}
|
|
16294
16294
|
}
|
|
16295
16295
|
return {
|
|
16296
16296
|
wrapColumn: h,
|
|
16297
16297
|
useTabs: o > 0,
|
|
16298
16298
|
tabWidth: r,
|
|
16299
|
-
quote:
|
|
16300
|
-
arrowParensAlways:
|
|
16301
|
-
trailingComma: d > 0 ||
|
|
16299
|
+
quote: b.singleQuote > b.doubleQuote ? "single" : "double",
|
|
16300
|
+
arrowParensAlways: b.singleParam > 0,
|
|
16301
|
+
trailingComma: d > 0 || b.trailingComma > 0,
|
|
16302
16302
|
useSemi: u > 0,
|
|
16303
16303
|
arrayBracketSpacing: void 0,
|
|
16304
16304
|
// TODO
|
|
@@ -16332,81 +16332,110 @@ function sn(a, l) {
|
|
|
16332
16332
|
r && !o ? sn(a[i], l[i]) : o ? a[i] = a[i] ? [.../* @__PURE__ */ new Set([...a[i], ...l[i]])] : l[i] : a[i] = l[i];
|
|
16333
16333
|
}
|
|
16334
16334
|
}
|
|
16335
|
-
async function Bl(a, l, i = !1) {
|
|
16336
|
-
if (i || await
|
|
16337
|
-
`This will update '${a}' file. Continue?`
|
|
16335
|
+
async function Bl(a, l, i = !1, r = "") {
|
|
16336
|
+
if (i || await Ye(
|
|
16337
|
+
r || `This will update '${a}' file. Continue?`
|
|
16338
16338
|
)) {
|
|
16339
|
-
const
|
|
16340
|
-
let
|
|
16341
|
-
if (!
|
|
16342
|
-
const
|
|
16343
|
-
|
|
16339
|
+
const u = Qe(process.cwd(), a), h = await Sl(u);
|
|
16340
|
+
let d = h.exports?.default;
|
|
16341
|
+
if (!d) {
|
|
16342
|
+
const w = Object.keys(h.exports);
|
|
16343
|
+
w.length === 1 && (d = h.exports[w[0]]);
|
|
16344
16344
|
}
|
|
16345
|
-
if (!
|
|
16345
|
+
if (!d && typeof h.exports == "object" && h.exports !== null)
|
|
16346
16346
|
throw new Error(`It is currently not possible to handle CommonJS module.exports syntax of ${a}`);
|
|
16347
|
-
if (!
|
|
16347
|
+
if (!d)
|
|
16348
16348
|
throw new Error(`No suitable config export found in ${a}`);
|
|
16349
|
-
const
|
|
16350
|
-
if (!
|
|
16349
|
+
const g = d.$type === "function-call" ? d.$args?.[0] : d;
|
|
16350
|
+
if (!g || typeof g != "object")
|
|
16351
16351
|
throw new Error(`Could not access config object in ${a}`);
|
|
16352
|
-
const
|
|
16353
|
-
sn(
|
|
16354
|
-
const
|
|
16355
|
-
if (
|
|
16356
|
-
const { code:
|
|
16357
|
-
|
|
16352
|
+
const b = JSON.stringify(g);
|
|
16353
|
+
sn(g, l);
|
|
16354
|
+
const S = JSON.stringify(g);
|
|
16355
|
+
if (b !== S) {
|
|
16356
|
+
const { code: w } = tn(h);
|
|
16357
|
+
is(u, w, "utf8"), console.log(`'${a}' file updated.`);
|
|
16358
16358
|
} else
|
|
16359
16359
|
console.log(`'${a}' file already up to date.`);
|
|
16360
16360
|
} else
|
|
16361
16361
|
console.log(`Updating '${a}' skipped.`);
|
|
16362
16362
|
}
|
|
16363
|
-
async function _l(a, l, i, r = !1) {
|
|
16364
|
-
if (r || await
|
|
16365
|
-
`This will update '${a}' file. Continue?`
|
|
16363
|
+
async function _l(a, l, i, r = !1, o = "") {
|
|
16364
|
+
if (r || await Ye(
|
|
16365
|
+
o || `This will update '${a}' file. Continue?`
|
|
16366
16366
|
)) {
|
|
16367
|
-
const
|
|
16368
|
-
if (!
|
|
16367
|
+
const h = Qe(process.cwd(), a);
|
|
16368
|
+
if (!ut(h))
|
|
16369
16369
|
throw new Error(`No '${a}' found in project root — skipping updates.`);
|
|
16370
|
-
const
|
|
16371
|
-
let
|
|
16370
|
+
const d = ss(h, "utf8");
|
|
16371
|
+
let g;
|
|
16372
16372
|
try {
|
|
16373
|
-
|
|
16374
|
-
} catch (
|
|
16373
|
+
g = JSON.parse(d);
|
|
16374
|
+
} catch (S) {
|
|
16375
16375
|
throw new Error(`Could not parse '${a}' — skipping updates.
|
|
16376
|
-
${
|
|
16376
|
+
${S}`);
|
|
16377
16377
|
}
|
|
16378
|
-
|
|
16379
|
-
let
|
|
16380
|
-
for (const [
|
|
16381
|
-
|
|
16382
|
-
|
|
16378
|
+
g[l] = g[l] || {};
|
|
16379
|
+
let b = !1;
|
|
16380
|
+
for (const [S, w] of Object.entries(i))
|
|
16381
|
+
g[l][S] !== w && (g[l][S] = w, b = !0);
|
|
16382
|
+
b ? (is(h, JSON.stringify(g, null, 2) + `
|
|
16383
16383
|
`, "utf8"), console.log(`'${a}' file updated.`)) : console.log(`'${a}' file already up to date.`);
|
|
16384
16384
|
} else
|
|
16385
16385
|
console.log(`Updating '${a}' skipped.`);
|
|
16386
16386
|
}
|
|
16387
|
-
async function jl(a, l, i = !1) {
|
|
16388
|
-
if (i || await
|
|
16389
|
-
`This will update '${a}' file. Continue?`
|
|
16387
|
+
async function jl(a, l, i = !1, r = "") {
|
|
16388
|
+
if (i || await Ye(
|
|
16389
|
+
r || `This will update '${a}' file. Continue?`
|
|
16390
16390
|
)) {
|
|
16391
|
-
const
|
|
16392
|
-
if (!
|
|
16391
|
+
const u = Qe(process.cwd(), a);
|
|
16392
|
+
if (!ut(u))
|
|
16393
16393
|
throw new Error(`No '${a}' found in project root — skipping updates.`);
|
|
16394
|
-
const
|
|
16395
|
-
let
|
|
16396
|
-
for (const
|
|
16397
|
-
|
|
16398
|
-
|
|
16394
|
+
const d = ss(u, "utf8").split(/\r?\n/);
|
|
16395
|
+
let g = !1;
|
|
16396
|
+
for (const b of l)
|
|
16397
|
+
d.includes(b) || (d.push(b), g = !0);
|
|
16398
|
+
g ? (is(u, d.join(`
|
|
16399
16399
|
`) + `
|
|
16400
16400
|
`, "utf8"), console.log(`'${a}' file updated.`)) : console.log(`'${a}' file already up to date.`);
|
|
16401
16401
|
} else
|
|
16402
16402
|
console.log(`Updating '${a}' skipped.`);
|
|
16403
16403
|
}
|
|
16404
|
+
function Rl(a, l = 1) {
|
|
16405
|
+
process.stderr.write(a);
|
|
16406
|
+
for (let i = 0; i < l; i++)
|
|
16407
|
+
process.stderr.write(`
|
|
16408
|
+
`);
|
|
16409
|
+
}
|
|
16410
|
+
function Ul(a, l = 1) {
|
|
16411
|
+
process.stdout.write(a);
|
|
16412
|
+
for (let i = 0; i < l; i++)
|
|
16413
|
+
process.stdout.write(`
|
|
16414
|
+
`);
|
|
16415
|
+
}
|
|
16416
|
+
function $l(a, l = Qe(process.cwd(), ".env")) {
|
|
16417
|
+
if (!ut(l))
|
|
16418
|
+
return;
|
|
16419
|
+
const i = ss(l, "utf-8");
|
|
16420
|
+
for (const r of i.split(/\r?\n/)) {
|
|
16421
|
+
const o = r.trim();
|
|
16422
|
+
if (!o || o.startsWith("#")) continue;
|
|
16423
|
+
const u = o.indexOf("=");
|
|
16424
|
+
if (u === -1) continue;
|
|
16425
|
+
const h = o.substring(0, u).trim(), d = o.substring(u + 1).trim();
|
|
16426
|
+
if (h === a)
|
|
16427
|
+
return d.replace(/^['"]|['"]$/g, "");
|
|
16428
|
+
}
|
|
16429
|
+
}
|
|
16404
16430
|
export {
|
|
16405
16431
|
Il as createFileFromTemplate,
|
|
16406
16432
|
Nl as createFileFromWebTemplate,
|
|
16433
|
+
$l as getEnvValue,
|
|
16407
16434
|
Ia as parseQualifiedPath,
|
|
16408
|
-
|
|
16435
|
+
Ye as promptUser,
|
|
16409
16436
|
Na as resolvePackagePath,
|
|
16437
|
+
Rl as showError,
|
|
16438
|
+
Ul as showMessage,
|
|
16410
16439
|
Bl as updateConfigFile,
|
|
16411
16440
|
_l as updateJsonFile,
|
|
16412
16441
|
jl as updateTextFile
|