@dpuse/dpuse-development 0.3.489 → 0.3.494
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 +6 -6
- package/dist/dpuse-development.es.js +1182 -1191
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +14 -14
- package/tsconfig.json +2 -3
|
@@ -36,7 +36,7 @@ function m(e, t, n) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-
|
|
39
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-CpjcH9JV.js
|
|
40
40
|
var h;
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
function g(e) {
|
|
@@ -276,11 +276,11 @@ function C(e, t) {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
/* @__NO_SIDE_EFFECTS__ */
|
|
279
|
-
function
|
|
279
|
+
function fe(e, t) {
|
|
280
280
|
return {
|
|
281
281
|
kind: "schema",
|
|
282
282
|
type: "optional",
|
|
283
|
-
reference:
|
|
283
|
+
reference: fe,
|
|
284
284
|
expects: `(${e.expects} | undefined)`,
|
|
285
285
|
async: !1,
|
|
286
286
|
wrapped: e,
|
|
@@ -294,11 +294,11 @@ function w(e, t) {
|
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
/* @__NO_SIDE_EFFECTS__ */
|
|
297
|
-
function
|
|
297
|
+
function pe(e, t, n) {
|
|
298
298
|
return {
|
|
299
299
|
kind: "schema",
|
|
300
300
|
type: "record",
|
|
301
|
-
reference:
|
|
301
|
+
reference: pe,
|
|
302
302
|
expects: "Object",
|
|
303
303
|
async: !1,
|
|
304
304
|
key: e,
|
|
@@ -350,11 +350,11 @@ function fe(e, t, n) {
|
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
/* @__NO_SIDE_EFFECTS__ */
|
|
353
|
-
function
|
|
353
|
+
function w(e) {
|
|
354
354
|
return {
|
|
355
355
|
kind: "schema",
|
|
356
356
|
type: "string",
|
|
357
|
-
reference:
|
|
357
|
+
reference: w,
|
|
358
358
|
expects: "string",
|
|
359
359
|
async: !1,
|
|
360
360
|
message: e,
|
|
@@ -367,17 +367,17 @@ function T(e) {
|
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
/* @__NO_SIDE_EFFECTS__ */
|
|
370
|
-
function
|
|
370
|
+
function me(e) {
|
|
371
371
|
let t;
|
|
372
372
|
if (e) for (let n of e) t ? t.push(...n.issues) : t = n.issues;
|
|
373
373
|
return t;
|
|
374
374
|
}
|
|
375
375
|
/* @__NO_SIDE_EFFECTS__ */
|
|
376
|
-
function
|
|
376
|
+
function he(e, t) {
|
|
377
377
|
return {
|
|
378
378
|
kind: "schema",
|
|
379
379
|
type: "union",
|
|
380
|
-
reference:
|
|
380
|
+
reference: he,
|
|
381
381
|
expects: /* @__PURE__ */ ae(e.map((e) => e.expects), "|"),
|
|
382
382
|
async: !1,
|
|
383
383
|
options: e,
|
|
@@ -399,40 +399,21 @@ function me(e, t) {
|
|
|
399
399
|
if (n) return n;
|
|
400
400
|
if (r) {
|
|
401
401
|
if (r.length === 1) return r[0];
|
|
402
|
-
y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
402
|
+
y(this, "type", e, t, { issues: /* @__PURE__ */ me(r) }), e.typed = !0;
|
|
403
403
|
} else if (i?.length === 1) return i[0];
|
|
404
|
-
else y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
404
|
+
else y(this, "type", e, t, { issues: /* @__PURE__ */ me(i) });
|
|
405
405
|
return e;
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
"en-us": /* @__PURE__ */ w(/* @__PURE__ */ T()),
|
|
418
|
-
"es-es": /* @__PURE__ */ w(/* @__PURE__ */ T())
|
|
419
|
-
}), _e = E([
|
|
420
|
-
"amber",
|
|
421
|
-
"green",
|
|
422
|
-
"red",
|
|
423
|
-
"other"
|
|
424
|
-
]), ve = E([
|
|
425
|
-
"alpha",
|
|
426
|
-
"beta",
|
|
427
|
-
"generalAvailability",
|
|
428
|
-
"notApplicable",
|
|
429
|
-
"preAlpha",
|
|
430
|
-
"proposed",
|
|
431
|
-
"releaseCandidate",
|
|
432
|
-
"unavailable",
|
|
433
|
-
"underReview"
|
|
434
|
-
]);
|
|
435
|
-
E([
|
|
409
|
+
var T = (e) => /* @__PURE__ */ he(e.map((e) => /* @__PURE__ */ ue(e))), ge = /* @__PURE__ */ C({
|
|
410
|
+
en: /* @__PURE__ */ w(),
|
|
411
|
+
es: /* @__PURE__ */ w()
|
|
412
|
+
}), _e = /* @__PURE__ */ C({
|
|
413
|
+
en: /* @__PURE__ */ fe(/* @__PURE__ */ w()),
|
|
414
|
+
es: /* @__PURE__ */ fe(/* @__PURE__ */ w())
|
|
415
|
+
});
|
|
416
|
+
T([
|
|
436
417
|
"app",
|
|
437
418
|
"connector",
|
|
438
419
|
"connectorConnection",
|
|
@@ -457,32 +438,44 @@ E([
|
|
|
457
438
|
"presenterPresentation",
|
|
458
439
|
"tool"
|
|
459
440
|
]);
|
|
460
|
-
var
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
441
|
+
var ve = T([
|
|
442
|
+
"amber",
|
|
443
|
+
"green",
|
|
444
|
+
"red",
|
|
445
|
+
"other"
|
|
446
|
+
]), ye = T([
|
|
447
|
+
"alpha",
|
|
448
|
+
"beta",
|
|
449
|
+
"generalAvailability",
|
|
450
|
+
"notApplicable",
|
|
451
|
+
"preAlpha",
|
|
452
|
+
"proposed",
|
|
453
|
+
"releaseCandidate",
|
|
454
|
+
"unavailable",
|
|
455
|
+
"underReview"
|
|
456
|
+
]), be = /* @__PURE__ */ C({
|
|
457
|
+
color: ve,
|
|
458
|
+
label: /* @__PURE__ */ w()
|
|
459
|
+
}), xe = /* @__PURE__ */ C({
|
|
460
|
+
id: /* @__PURE__ */ w(),
|
|
461
|
+
label: _e,
|
|
462
|
+
description: _e,
|
|
463
|
+
icon: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
464
|
+
iconDark: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
465
|
+
order: /* @__PURE__ */ de(),
|
|
466
|
+
path: /* @__PURE__ */ w()
|
|
467
|
+
}), Se = {
|
|
468
|
+
id: /* @__PURE__ */ w(),
|
|
469
|
+
label: _e,
|
|
470
|
+
description: _e,
|
|
471
|
+
firstCreatedAt: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
472
|
+
icon: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
473
|
+
iconDark: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
467
474
|
lastUpdatedAt: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
468
|
-
status: /* @__PURE__ */ S(
|
|
469
|
-
|
|
470
|
-
color: _e,
|
|
471
|
-
label: /* @__PURE__ */ T()
|
|
472
|
-
})),
|
|
473
|
-
statusId: ve
|
|
475
|
+
status: /* @__PURE__ */ S(be),
|
|
476
|
+
statusId: /* @__PURE__ */ S(ye)
|
|
474
477
|
};
|
|
475
|
-
({ ...
|
|
476
|
-
var be = /* @__PURE__ */ C({
|
|
477
|
-
id: /* @__PURE__ */ T(),
|
|
478
|
-
label: ge,
|
|
479
|
-
description: ge,
|
|
480
|
-
icon: /* @__PURE__ */ S(/* @__PURE__ */ T()),
|
|
481
|
-
iconDark: /* @__PURE__ */ S(/* @__PURE__ */ T()),
|
|
482
|
-
order: /* @__PURE__ */ de(),
|
|
483
|
-
path: /* @__PURE__ */ T()
|
|
484
|
-
});
|
|
485
|
-
E([
|
|
478
|
+
({ ...Se }), T([
|
|
486
479
|
"app",
|
|
487
480
|
"engine",
|
|
488
481
|
"connector",
|
|
@@ -490,35 +483,36 @@ E([
|
|
|
490
483
|
"presenter",
|
|
491
484
|
"tool"
|
|
492
485
|
]);
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-DE8ldb7c.js
|
|
488
|
+
var Ce = {
|
|
489
|
+
...Se,
|
|
490
|
+
version: /* @__PURE__ */ w()
|
|
496
491
|
};
|
|
497
|
-
({ ...
|
|
492
|
+
({ ...Ce });
|
|
498
493
|
//#endregion
|
|
499
|
-
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-
|
|
500
|
-
var
|
|
501
|
-
|
|
494
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
495
|
+
var we = T([
|
|
496
|
+
"application",
|
|
497
|
+
"curatedDataset",
|
|
498
|
+
"database",
|
|
499
|
+
"fileStore"
|
|
500
|
+
]), Te = /* @__PURE__ */ C({ label: ge }), Ee = /* @__PURE__ */ C({
|
|
501
|
+
authMethodId: T([
|
|
502
502
|
"apiKey",
|
|
503
503
|
"disabled",
|
|
504
504
|
"oAuth2",
|
|
505
505
|
"none"
|
|
506
506
|
]),
|
|
507
|
-
activeConnectionCount: /* @__PURE__ */
|
|
508
|
-
canDescribe: /* @__PURE__ */
|
|
509
|
-
id: /* @__PURE__ */
|
|
510
|
-
label: /* @__PURE__ */
|
|
507
|
+
activeConnectionCount: /* @__PURE__ */ fe(/* @__PURE__ */ de()),
|
|
508
|
+
canDescribe: /* @__PURE__ */ fe(/* @__PURE__ */ le()),
|
|
509
|
+
id: /* @__PURE__ */ fe(/* @__PURE__ */ w()),
|
|
510
|
+
label: /* @__PURE__ */ fe(ge),
|
|
511
511
|
maxConnectionCount: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
512
|
-
params: /* @__PURE__ */
|
|
513
|
-
}),
|
|
514
|
-
"application",
|
|
515
|
-
"curatedDataset",
|
|
516
|
-
"database",
|
|
517
|
-
"fileStore"
|
|
518
|
-
]), we = E([
|
|
512
|
+
params: /* @__PURE__ */ fe(/* @__PURE__ */ ce(/* @__PURE__ */ pe(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
513
|
+
}), De = T([
|
|
519
514
|
"abortOperation",
|
|
520
515
|
"auditObjectContent",
|
|
521
|
-
"authenticateConnection",
|
|
522
516
|
"createObject",
|
|
523
517
|
"describeConnection",
|
|
524
518
|
"dropObject",
|
|
@@ -531,68 +525,65 @@ var Se = /* @__PURE__ */ C({
|
|
|
531
525
|
"retrieveChunks",
|
|
532
526
|
"retrieveRecords",
|
|
533
527
|
"upsertRecords"
|
|
534
|
-
]),
|
|
528
|
+
]), Oe = T([
|
|
535
529
|
"bidirectional",
|
|
536
530
|
"destination",
|
|
537
531
|
"source",
|
|
538
532
|
"unknown"
|
|
539
|
-
]),
|
|
540
|
-
|
|
541
|
-
label: ge
|
|
542
|
-
}), De = /* @__PURE__ */ C({
|
|
543
|
-
...xe,
|
|
533
|
+
]), ke = /* @__PURE__ */ C({
|
|
534
|
+
...Ce,
|
|
544
535
|
typeId: /* @__PURE__ */ ue("connector"),
|
|
545
|
-
category: /* @__PURE__ */ S(
|
|
546
|
-
categoryId:
|
|
547
|
-
implementations: /* @__PURE__ */
|
|
548
|
-
operations: /* @__PURE__ */ ce(
|
|
549
|
-
usageId:
|
|
550
|
-
vendorAccountURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
551
|
-
vendorDocumentationURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
552
|
-
vendorHomeURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
553
|
-
}),
|
|
554
|
-
...
|
|
536
|
+
category: /* @__PURE__ */ S(Te),
|
|
537
|
+
categoryId: we,
|
|
538
|
+
implementations: /* @__PURE__ */ pe(/* @__PURE__ */ w(), Ee),
|
|
539
|
+
operations: /* @__PURE__ */ ce(De),
|
|
540
|
+
usageId: Oe,
|
|
541
|
+
vendorAccountURL: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
542
|
+
vendorDocumentationURL: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
543
|
+
vendorHomeURL: /* @__PURE__ */ S(/* @__PURE__ */ w())
|
|
544
|
+
}), Ae = /* @__PURE__ */ C({
|
|
545
|
+
...Se,
|
|
555
546
|
typeId: /* @__PURE__ */ ue("contextModelGroup"),
|
|
556
|
-
modelRefs: /* @__PURE__ */ ce(
|
|
547
|
+
modelRefs: /* @__PURE__ */ ce(xe),
|
|
557
548
|
order: /* @__PURE__ */ de()
|
|
558
|
-
}),
|
|
559
|
-
...
|
|
549
|
+
}), je = T(["listContextFocuses"]), Me = /* @__PURE__ */ C({
|
|
550
|
+
...Ce,
|
|
560
551
|
typeId: /* @__PURE__ */ ue("context"),
|
|
561
|
-
models: /* @__PURE__ */ ce(
|
|
562
|
-
operations: /* @__PURE__ */ ce(
|
|
563
|
-
}),
|
|
552
|
+
models: /* @__PURE__ */ ce(Ae),
|
|
553
|
+
operations: /* @__PURE__ */ ce(je)
|
|
554
|
+
}), Ne = T([
|
|
564
555
|
"list",
|
|
565
556
|
"render",
|
|
566
557
|
"setColorMode"
|
|
567
|
-
]),
|
|
568
|
-
...
|
|
558
|
+
]), Pe = /* @__PURE__ */ C({
|
|
559
|
+
...Ce,
|
|
569
560
|
typeId: /* @__PURE__ */ ue("presenter"),
|
|
570
|
-
presentations: /* @__PURE__ */ ce(
|
|
571
|
-
operations: /* @__PURE__ */ ce(
|
|
572
|
-
}),
|
|
573
|
-
Node: () =>
|
|
574
|
-
Parser: () =>
|
|
575
|
-
Position: () =>
|
|
576
|
-
SourceLocation: () =>
|
|
577
|
-
TokContext: () =>
|
|
578
|
-
Token: () =>
|
|
579
|
-
TokenType: () =>
|
|
580
|
-
defaultOptions: () =>
|
|
581
|
-
getLineInfo: () =>
|
|
582
|
-
isIdentifierChar: () =>
|
|
583
|
-
isIdentifierStart: () =>
|
|
584
|
-
isNewLine: () =>
|
|
585
|
-
keywordTypes: () =>
|
|
586
|
-
lineBreak: () =>
|
|
587
|
-
lineBreakG: () =>
|
|
588
|
-
nonASCIIwhitespace: () =>
|
|
589
|
-
parse: () =>
|
|
590
|
-
parseExpressionAt: () =>
|
|
591
|
-
tokContexts: () =>
|
|
592
|
-
tokTypes: () =>
|
|
593
|
-
tokenizer: () =>
|
|
594
|
-
version: () =>
|
|
595
|
-
}),
|
|
561
|
+
presentations: /* @__PURE__ */ ce(xe),
|
|
562
|
+
operations: /* @__PURE__ */ ce(Ne)
|
|
563
|
+
}), Fe = /* @__PURE__ */ l({
|
|
564
|
+
Node: () => Zt,
|
|
565
|
+
Parser: () => F,
|
|
566
|
+
Position: () => ct,
|
|
567
|
+
SourceLocation: () => lt,
|
|
568
|
+
TokContext: () => B,
|
|
569
|
+
Token: () => Vn,
|
|
570
|
+
TokenType: () => D,
|
|
571
|
+
defaultOptions: () => dt,
|
|
572
|
+
getLineInfo: () => ut,
|
|
573
|
+
isIdentifierChar: () => qe,
|
|
574
|
+
isIdentifierStart: () => E,
|
|
575
|
+
isNewLine: () => Xe,
|
|
576
|
+
keywordTypes: () => Je,
|
|
577
|
+
lineBreak: () => N,
|
|
578
|
+
lineBreakG: () => Ye,
|
|
579
|
+
nonASCIIwhitespace: () => Qe,
|
|
580
|
+
parse: () => Kn,
|
|
581
|
+
parseExpressionAt: () => qn,
|
|
582
|
+
tokContexts: () => V,
|
|
583
|
+
tokTypes: () => M,
|
|
584
|
+
tokenizer: () => Jn,
|
|
585
|
+
version: () => Gn
|
|
586
|
+
}), Ie = [
|
|
596
587
|
509,
|
|
597
588
|
0,
|
|
598
589
|
227,
|
|
@@ -923,7 +914,7 @@ var Se = /* @__PURE__ */ C({
|
|
|
923
914
|
9,
|
|
924
915
|
787719,
|
|
925
916
|
239
|
|
926
|
-
],
|
|
917
|
+
], Le = [
|
|
927
918
|
0,
|
|
928
919
|
11,
|
|
929
920
|
2,
|
|
@@ -1542,216 +1533,216 @@ var Se = /* @__PURE__ */ C({
|
|
|
1542
1533
|
4938,
|
|
1543
1534
|
6,
|
|
1544
1535
|
8489
|
|
1545
|
-
],
|
|
1536
|
+
], Re = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", ze = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Be = {
|
|
1546
1537
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
1547
1538
|
5: "class enum extends super const export import",
|
|
1548
1539
|
6: "enum",
|
|
1549
1540
|
strict: "implements interface let package private protected public static yield",
|
|
1550
1541
|
strictBind: "eval arguments"
|
|
1551
|
-
},
|
|
1552
|
-
5:
|
|
1553
|
-
"5module":
|
|
1554
|
-
6:
|
|
1555
|
-
},
|
|
1556
|
-
function
|
|
1542
|
+
}, Ve = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", He = {
|
|
1543
|
+
5: Ve,
|
|
1544
|
+
"5module": Ve + " export import",
|
|
1545
|
+
6: Ve + " const class extends export import super"
|
|
1546
|
+
}, Ue = /^in(stanceof)?$/, We = RegExp("[" + ze + "]"), Ge = RegExp("[" + ze + Re + "]");
|
|
1547
|
+
function Ke(e, t) {
|
|
1557
1548
|
for (var n = 65536, r = 0; r < t.length; r += 2) {
|
|
1558
1549
|
if (n += t[r], n > e) return !1;
|
|
1559
1550
|
if (n += t[r + 1], n >= e) return !0;
|
|
1560
1551
|
}
|
|
1561
1552
|
return !1;
|
|
1562
1553
|
}
|
|
1563
|
-
function
|
|
1564
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1554
|
+
function E(e, t) {
|
|
1555
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && We.test(String.fromCharCode(e)) : t === !1 ? !1 : Ke(e, Le);
|
|
1565
1556
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1557
|
+
function qe(e, t) {
|
|
1558
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Ge.test(String.fromCharCode(e)) : t === !1 ? !1 : Ke(e, Le) || Ke(e, Ie);
|
|
1568
1559
|
}
|
|
1569
|
-
var
|
|
1560
|
+
var D = function(e, t) {
|
|
1570
1561
|
t === void 0 && (t = {}), this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop || null, this.updateContext = null;
|
|
1571
1562
|
};
|
|
1572
|
-
function
|
|
1573
|
-
return new
|
|
1563
|
+
function O(e, t) {
|
|
1564
|
+
return new D(e, {
|
|
1574
1565
|
beforeExpr: !0,
|
|
1575
1566
|
binop: t
|
|
1576
1567
|
});
|
|
1577
1568
|
}
|
|
1578
|
-
var
|
|
1579
|
-
function
|
|
1580
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
1581
|
-
}
|
|
1582
|
-
var
|
|
1583
|
-
num: new
|
|
1584
|
-
regexp: new
|
|
1585
|
-
string: new
|
|
1586
|
-
name: new
|
|
1587
|
-
privateId: new
|
|
1588
|
-
eof: new
|
|
1589
|
-
bracketL: new
|
|
1569
|
+
var k = { beforeExpr: !0 }, A = { startsExpr: !0 }, Je = {};
|
|
1570
|
+
function j(e, t) {
|
|
1571
|
+
return t === void 0 && (t = {}), t.keyword = e, Je[e] = new D(e, t);
|
|
1572
|
+
}
|
|
1573
|
+
var M = {
|
|
1574
|
+
num: new D("num", A),
|
|
1575
|
+
regexp: new D("regexp", A),
|
|
1576
|
+
string: new D("string", A),
|
|
1577
|
+
name: new D("name", A),
|
|
1578
|
+
privateId: new D("privateId", A),
|
|
1579
|
+
eof: new D("eof"),
|
|
1580
|
+
bracketL: new D("[", {
|
|
1590
1581
|
beforeExpr: !0,
|
|
1591
1582
|
startsExpr: !0
|
|
1592
1583
|
}),
|
|
1593
|
-
bracketR: new
|
|
1594
|
-
braceL: new
|
|
1584
|
+
bracketR: new D("]"),
|
|
1585
|
+
braceL: new D("{", {
|
|
1595
1586
|
beforeExpr: !0,
|
|
1596
1587
|
startsExpr: !0
|
|
1597
1588
|
}),
|
|
1598
|
-
braceR: new
|
|
1599
|
-
parenL: new
|
|
1589
|
+
braceR: new D("}"),
|
|
1590
|
+
parenL: new D("(", {
|
|
1600
1591
|
beforeExpr: !0,
|
|
1601
1592
|
startsExpr: !0
|
|
1602
1593
|
}),
|
|
1603
|
-
parenR: new
|
|
1604
|
-
comma: new
|
|
1605
|
-
semi: new
|
|
1606
|
-
colon: new
|
|
1607
|
-
dot: new
|
|
1608
|
-
question: new
|
|
1609
|
-
questionDot: new
|
|
1610
|
-
arrow: new
|
|
1611
|
-
template: new
|
|
1612
|
-
invalidTemplate: new
|
|
1613
|
-
ellipsis: new
|
|
1614
|
-
backQuote: new
|
|
1615
|
-
dollarBraceL: new
|
|
1594
|
+
parenR: new D(")"),
|
|
1595
|
+
comma: new D(",", k),
|
|
1596
|
+
semi: new D(";", k),
|
|
1597
|
+
colon: new D(":", k),
|
|
1598
|
+
dot: new D("."),
|
|
1599
|
+
question: new D("?", k),
|
|
1600
|
+
questionDot: new D("?."),
|
|
1601
|
+
arrow: new D("=>", k),
|
|
1602
|
+
template: new D("template"),
|
|
1603
|
+
invalidTemplate: new D("invalidTemplate"),
|
|
1604
|
+
ellipsis: new D("...", k),
|
|
1605
|
+
backQuote: new D("`", A),
|
|
1606
|
+
dollarBraceL: new D("${", {
|
|
1616
1607
|
beforeExpr: !0,
|
|
1617
1608
|
startsExpr: !0
|
|
1618
1609
|
}),
|
|
1619
|
-
eq: new
|
|
1610
|
+
eq: new D("=", {
|
|
1620
1611
|
beforeExpr: !0,
|
|
1621
1612
|
isAssign: !0
|
|
1622
1613
|
}),
|
|
1623
|
-
assign: new
|
|
1614
|
+
assign: new D("_=", {
|
|
1624
1615
|
beforeExpr: !0,
|
|
1625
1616
|
isAssign: !0
|
|
1626
1617
|
}),
|
|
1627
|
-
incDec: new
|
|
1618
|
+
incDec: new D("++/--", {
|
|
1628
1619
|
prefix: !0,
|
|
1629
1620
|
postfix: !0,
|
|
1630
1621
|
startsExpr: !0
|
|
1631
1622
|
}),
|
|
1632
|
-
prefix: new
|
|
1623
|
+
prefix: new D("!/~", {
|
|
1633
1624
|
beforeExpr: !0,
|
|
1634
1625
|
prefix: !0,
|
|
1635
1626
|
startsExpr: !0
|
|
1636
1627
|
}),
|
|
1637
|
-
logicalOR:
|
|
1638
|
-
logicalAND:
|
|
1639
|
-
bitwiseOR:
|
|
1640
|
-
bitwiseXOR:
|
|
1641
|
-
bitwiseAND:
|
|
1642
|
-
equality:
|
|
1643
|
-
relational:
|
|
1644
|
-
bitShift:
|
|
1645
|
-
plusMin: new
|
|
1628
|
+
logicalOR: O("||", 1),
|
|
1629
|
+
logicalAND: O("&&", 2),
|
|
1630
|
+
bitwiseOR: O("|", 3),
|
|
1631
|
+
bitwiseXOR: O("^", 4),
|
|
1632
|
+
bitwiseAND: O("&", 5),
|
|
1633
|
+
equality: O("==/!=/===/!==", 6),
|
|
1634
|
+
relational: O("</>/<=/>=", 7),
|
|
1635
|
+
bitShift: O("<</>>/>>>", 8),
|
|
1636
|
+
plusMin: new D("+/-", {
|
|
1646
1637
|
beforeExpr: !0,
|
|
1647
1638
|
binop: 9,
|
|
1648
1639
|
prefix: !0,
|
|
1649
1640
|
startsExpr: !0
|
|
1650
1641
|
}),
|
|
1651
|
-
modulo:
|
|
1652
|
-
star:
|
|
1653
|
-
slash:
|
|
1654
|
-
starstar: new
|
|
1655
|
-
coalesce:
|
|
1656
|
-
_break:
|
|
1657
|
-
_case:
|
|
1658
|
-
_catch:
|
|
1659
|
-
_continue:
|
|
1660
|
-
_debugger:
|
|
1661
|
-
_default:
|
|
1662
|
-
_do:
|
|
1642
|
+
modulo: O("%", 10),
|
|
1643
|
+
star: O("*", 10),
|
|
1644
|
+
slash: O("/", 10),
|
|
1645
|
+
starstar: new D("**", { beforeExpr: !0 }),
|
|
1646
|
+
coalesce: O("??", 1),
|
|
1647
|
+
_break: j("break"),
|
|
1648
|
+
_case: j("case", k),
|
|
1649
|
+
_catch: j("catch"),
|
|
1650
|
+
_continue: j("continue"),
|
|
1651
|
+
_debugger: j("debugger"),
|
|
1652
|
+
_default: j("default", k),
|
|
1653
|
+
_do: j("do", {
|
|
1663
1654
|
isLoop: !0,
|
|
1664
1655
|
beforeExpr: !0
|
|
1665
1656
|
}),
|
|
1666
|
-
_else:
|
|
1667
|
-
_finally:
|
|
1668
|
-
_for:
|
|
1669
|
-
_function:
|
|
1670
|
-
_if:
|
|
1671
|
-
_return:
|
|
1672
|
-
_switch:
|
|
1673
|
-
_throw:
|
|
1674
|
-
_try:
|
|
1675
|
-
_var:
|
|
1676
|
-
_const:
|
|
1677
|
-
_while:
|
|
1678
|
-
_with:
|
|
1679
|
-
_new:
|
|
1657
|
+
_else: j("else", k),
|
|
1658
|
+
_finally: j("finally"),
|
|
1659
|
+
_for: j("for", { isLoop: !0 }),
|
|
1660
|
+
_function: j("function", A),
|
|
1661
|
+
_if: j("if"),
|
|
1662
|
+
_return: j("return", k),
|
|
1663
|
+
_switch: j("switch"),
|
|
1664
|
+
_throw: j("throw", k),
|
|
1665
|
+
_try: j("try"),
|
|
1666
|
+
_var: j("var"),
|
|
1667
|
+
_const: j("const"),
|
|
1668
|
+
_while: j("while", { isLoop: !0 }),
|
|
1669
|
+
_with: j("with"),
|
|
1670
|
+
_new: j("new", {
|
|
1680
1671
|
beforeExpr: !0,
|
|
1681
1672
|
startsExpr: !0
|
|
1682
1673
|
}),
|
|
1683
|
-
_this:
|
|
1684
|
-
_super:
|
|
1685
|
-
_class:
|
|
1686
|
-
_extends:
|
|
1687
|
-
_export:
|
|
1688
|
-
_import:
|
|
1689
|
-
_null:
|
|
1690
|
-
_true:
|
|
1691
|
-
_false:
|
|
1692
|
-
_in:
|
|
1674
|
+
_this: j("this", A),
|
|
1675
|
+
_super: j("super", A),
|
|
1676
|
+
_class: j("class", A),
|
|
1677
|
+
_extends: j("extends", k),
|
|
1678
|
+
_export: j("export"),
|
|
1679
|
+
_import: j("import", A),
|
|
1680
|
+
_null: j("null", A),
|
|
1681
|
+
_true: j("true", A),
|
|
1682
|
+
_false: j("false", A),
|
|
1683
|
+
_in: j("in", {
|
|
1693
1684
|
beforeExpr: !0,
|
|
1694
1685
|
binop: 7
|
|
1695
1686
|
}),
|
|
1696
|
-
_instanceof:
|
|
1687
|
+
_instanceof: j("instanceof", {
|
|
1697
1688
|
beforeExpr: !0,
|
|
1698
1689
|
binop: 7
|
|
1699
1690
|
}),
|
|
1700
|
-
_typeof:
|
|
1691
|
+
_typeof: j("typeof", {
|
|
1701
1692
|
beforeExpr: !0,
|
|
1702
1693
|
prefix: !0,
|
|
1703
1694
|
startsExpr: !0
|
|
1704
1695
|
}),
|
|
1705
|
-
_void:
|
|
1696
|
+
_void: j("void", {
|
|
1706
1697
|
beforeExpr: !0,
|
|
1707
1698
|
prefix: !0,
|
|
1708
1699
|
startsExpr: !0
|
|
1709
1700
|
}),
|
|
1710
|
-
_delete:
|
|
1701
|
+
_delete: j("delete", {
|
|
1711
1702
|
beforeExpr: !0,
|
|
1712
1703
|
prefix: !0,
|
|
1713
1704
|
startsExpr: !0
|
|
1714
1705
|
})
|
|
1715
|
-
},
|
|
1716
|
-
function
|
|
1706
|
+
}, N = /\r\n?|\n|\u2028|\u2029/, Ye = new RegExp(N.source, "g");
|
|
1707
|
+
function Xe(e) {
|
|
1717
1708
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
1718
1709
|
}
|
|
1719
|
-
function
|
|
1710
|
+
function Ze(e, t, n) {
|
|
1720
1711
|
n === void 0 && (n = e.length);
|
|
1721
1712
|
for (var r = t; r < n; r++) {
|
|
1722
1713
|
var i = e.charCodeAt(r);
|
|
1723
|
-
if (
|
|
1714
|
+
if (Xe(i)) return r < n - 1 && i === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1;
|
|
1724
1715
|
}
|
|
1725
1716
|
return -1;
|
|
1726
1717
|
}
|
|
1727
|
-
var
|
|
1728
|
-
return
|
|
1729
|
-
}),
|
|
1730
|
-
return
|
|
1731
|
-
}),
|
|
1732
|
-
function
|
|
1733
|
-
return
|
|
1718
|
+
var Qe = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, P = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, $e = Object.prototype, et = $e.hasOwnProperty, tt = $e.toString, nt = Object.hasOwn || (function(e, t) {
|
|
1719
|
+
return et.call(e, t);
|
|
1720
|
+
}), rt = Array.isArray || (function(e) {
|
|
1721
|
+
return tt.call(e) === "[object Array]";
|
|
1722
|
+
}), it = Object.create(null);
|
|
1723
|
+
function at(e) {
|
|
1724
|
+
return it[e] || (it[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1734
1725
|
}
|
|
1735
|
-
function
|
|
1726
|
+
function ot(e) {
|
|
1736
1727
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
1737
1728
|
}
|
|
1738
|
-
var
|
|
1729
|
+
var st = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ct = function(e, t) {
|
|
1739
1730
|
this.line = e, this.column = t;
|
|
1740
1731
|
};
|
|
1741
|
-
|
|
1742
|
-
return new
|
|
1732
|
+
ct.prototype.offset = function(e) {
|
|
1733
|
+
return new ct(this.line, this.column + e);
|
|
1743
1734
|
};
|
|
1744
|
-
var
|
|
1735
|
+
var lt = function(e, t, n) {
|
|
1745
1736
|
this.start = t, this.end = n, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
1746
1737
|
};
|
|
1747
|
-
function
|
|
1738
|
+
function ut(e, t) {
|
|
1748
1739
|
for (var n = 1, r = 0;;) {
|
|
1749
|
-
var i =
|
|
1750
|
-
if (i < 0) return new
|
|
1740
|
+
var i = Ze(e, r, t);
|
|
1741
|
+
if (i < 0) return new ct(n, t - r);
|
|
1751
1742
|
++n, r = i;
|
|
1752
1743
|
}
|
|
1753
1744
|
}
|
|
1754
|
-
var
|
|
1745
|
+
var dt = {
|
|
1755
1746
|
ecmaVersion: null,
|
|
1756
1747
|
sourceType: "script",
|
|
1757
1748
|
onInsertedSemicolon: null,
|
|
@@ -1771,20 +1762,20 @@ var lt = {
|
|
|
1771
1762
|
sourceFile: null,
|
|
1772
1763
|
directSourceFile: null,
|
|
1773
1764
|
preserveParens: !1
|
|
1774
|
-
},
|
|
1775
|
-
function
|
|
1765
|
+
}, ft = !1;
|
|
1766
|
+
function pt(e) {
|
|
1776
1767
|
var t = {};
|
|
1777
|
-
for (var n in
|
|
1778
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
1768
|
+
for (var n in dt) t[n] = e && nt(e, n) ? e[n] : dt[n];
|
|
1769
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!ft && typeof console == "object" && console.warn && (ft = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), rt(t.onToken)) {
|
|
1779
1770
|
var r = t.onToken;
|
|
1780
1771
|
t.onToken = function(e) {
|
|
1781
1772
|
return r.push(e);
|
|
1782
1773
|
};
|
|
1783
1774
|
}
|
|
1784
|
-
if (
|
|
1775
|
+
if (rt(t.onComment) && (t.onComment = mt(t, t.onComment)), t.sourceType === "commonjs" && t.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
|
|
1785
1776
|
return t;
|
|
1786
1777
|
}
|
|
1787
|
-
function
|
|
1778
|
+
function mt(e, t) {
|
|
1788
1779
|
return function(n, r, i, a, o, s) {
|
|
1789
1780
|
var c = {
|
|
1790
1781
|
type: n ? "Block" : "Line",
|
|
@@ -1792,20 +1783,20 @@ function ft(e, t) {
|
|
|
1792
1783
|
start: i,
|
|
1793
1784
|
end: a
|
|
1794
1785
|
};
|
|
1795
|
-
e.locations && (c.loc = new
|
|
1786
|
+
e.locations && (c.loc = new lt(this, o, s)), e.ranges && (c.range = [i, a]), t.push(c);
|
|
1796
1787
|
};
|
|
1797
1788
|
}
|
|
1798
|
-
var
|
|
1799
|
-
function
|
|
1800
|
-
return
|
|
1789
|
+
var ht = 1, gt = 2, _t = 4, vt = 8, yt = 16, bt = 32, xt = 64, St = 128, Ct = 256, wt = 512, Tt = 1024, Et = ht | gt | Ct;
|
|
1790
|
+
function Dt(e, t) {
|
|
1791
|
+
return gt | (e ? _t : 0) | (t ? vt : 0);
|
|
1801
1792
|
}
|
|
1802
|
-
var
|
|
1803
|
-
this.options = e =
|
|
1793
|
+
var Ot = 0, kt = 1, At = 2, jt = 3, Mt = 4, Nt = 5, F = function(e, t, n) {
|
|
1794
|
+
this.options = e = pt(e), this.sourceFile = e.sourceFile, this.keywords = at(He[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
1804
1795
|
var r = "";
|
|
1805
|
-
e.allowReserved !== !0 && (r =
|
|
1806
|
-
var i = (r ? r + " " : "") +
|
|
1807
|
-
this.reservedWordsStrict =
|
|
1808
|
-
},
|
|
1796
|
+
e.allowReserved !== !0 && (r = Be[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (r += " await")), this.reservedWords = at(r);
|
|
1797
|
+
var i = (r ? r + " " : "") + Be.strict;
|
|
1798
|
+
this.reservedWordsStrict = at(i), this.reservedWordsStrictBind = at(i + " " + Be.strictBind), this.input = String(t), this.containsEsc = !1, n ? (this.pos = n, this.lineStart = this.input.lastIndexOf("\n", n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(N).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = M.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? gt : ht), this.regexpState = null, this.privateNameStack = [];
|
|
1799
|
+
}, I = {
|
|
1809
1800
|
inFunction: { configurable: !0 },
|
|
1810
1801
|
inGenerator: { configurable: !0 },
|
|
1811
1802
|
inAsync: { configurable: !0 },
|
|
@@ -1818,111 +1809,111 @@ var Et = 0, Dt = 1, Ot = 2, kt = 3, At = 4, jt = 5, I = function(e, t, n) {
|
|
|
1818
1809
|
allowUsing: { configurable: !0 },
|
|
1819
1810
|
inClassStaticBlock: { configurable: !0 }
|
|
1820
1811
|
};
|
|
1821
|
-
|
|
1812
|
+
F.prototype.parse = function() {
|
|
1822
1813
|
var e = this.options.program || this.startNode();
|
|
1823
1814
|
return this.nextToken(), this.parseTopLevel(e);
|
|
1824
|
-
},
|
|
1825
|
-
return (this.currentVarScope().flags & mt) > 0;
|
|
1826
|
-
}, L.inGenerator.get = function() {
|
|
1815
|
+
}, I.inFunction.get = function() {
|
|
1827
1816
|
return (this.currentVarScope().flags & gt) > 0;
|
|
1828
|
-
},
|
|
1829
|
-
return (this.currentVarScope().flags &
|
|
1830
|
-
},
|
|
1817
|
+
}, I.inGenerator.get = function() {
|
|
1818
|
+
return (this.currentVarScope().flags & vt) > 0;
|
|
1819
|
+
}, I.inAsync.get = function() {
|
|
1820
|
+
return (this.currentVarScope().flags & _t) > 0;
|
|
1821
|
+
}, I.canAwait.get = function() {
|
|
1831
1822
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1832
1823
|
var t = this.scopeStack[e].flags;
|
|
1833
|
-
if (t & (
|
|
1834
|
-
if (t &
|
|
1824
|
+
if (t & (Ct | wt)) return !1;
|
|
1825
|
+
if (t & gt) return (t & _t) > 0;
|
|
1835
1826
|
}
|
|
1836
1827
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1837
|
-
},
|
|
1838
|
-
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags &
|
|
1839
|
-
},
|
|
1840
|
-
return (this.currentThisScope().flags &
|
|
1841
|
-
},
|
|
1842
|
-
return (this.currentThisScope().flags &
|
|
1843
|
-
},
|
|
1828
|
+
}, I.allowReturn.get = function() {
|
|
1829
|
+
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags & ht);
|
|
1830
|
+
}, I.allowSuper.get = function() {
|
|
1831
|
+
return (this.currentThisScope().flags & xt) > 0 || this.options.allowSuperOutsideMethod;
|
|
1832
|
+
}, I.allowDirectSuper.get = function() {
|
|
1833
|
+
return (this.currentThisScope().flags & St) > 0;
|
|
1834
|
+
}, I.treatFunctionsAsVar.get = function() {
|
|
1844
1835
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
1845
|
-
},
|
|
1836
|
+
}, I.allowNewDotTarget.get = function() {
|
|
1846
1837
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1847
1838
|
var t = this.scopeStack[e].flags;
|
|
1848
|
-
if (t & (
|
|
1839
|
+
if (t & (Ct | wt) || t & gt && !(t & yt)) return !0;
|
|
1849
1840
|
}
|
|
1850
1841
|
return !1;
|
|
1851
|
-
},
|
|
1842
|
+
}, I.allowUsing.get = function() {
|
|
1852
1843
|
var e = this.currentScope().flags;
|
|
1853
|
-
return !(e &
|
|
1854
|
-
},
|
|
1855
|
-
return (this.currentVarScope().flags &
|
|
1856
|
-
},
|
|
1844
|
+
return !(e & Tt || !this.inModule && e & ht);
|
|
1845
|
+
}, I.inClassStaticBlock.get = function() {
|
|
1846
|
+
return (this.currentVarScope().flags & Ct) > 0;
|
|
1847
|
+
}, F.extend = function() {
|
|
1857
1848
|
for (var e = [], t = arguments.length; t--;) e[t] = arguments[t];
|
|
1858
1849
|
for (var n = this, r = 0; r < e.length; r++) n = e[r](n);
|
|
1859
1850
|
return n;
|
|
1860
|
-
},
|
|
1851
|
+
}, F.parse = function(e, t) {
|
|
1861
1852
|
return new this(t, e).parse();
|
|
1862
|
-
},
|
|
1853
|
+
}, F.parseExpressionAt = function(e, t, n) {
|
|
1863
1854
|
var r = new this(n, e, t);
|
|
1864
1855
|
return r.nextToken(), r.parseExpression();
|
|
1865
|
-
},
|
|
1856
|
+
}, F.tokenizer = function(e, t) {
|
|
1866
1857
|
return new this(t, e);
|
|
1867
|
-
}, Object.defineProperties(
|
|
1868
|
-
var
|
|
1869
|
-
|
|
1858
|
+
}, Object.defineProperties(F.prototype, I);
|
|
1859
|
+
var L = F.prototype, Pt = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1860
|
+
L.strictDirective = function(e) {
|
|
1870
1861
|
if (this.options.ecmaVersion < 5) return !1;
|
|
1871
1862
|
for (;;) {
|
|
1872
|
-
|
|
1873
|
-
var t =
|
|
1863
|
+
P.lastIndex = e, e += P.exec(this.input)[0].length;
|
|
1864
|
+
var t = Pt.exec(this.input.slice(e));
|
|
1874
1865
|
if (!t) return !1;
|
|
1875
1866
|
if ((t[1] || t[2]) === "use strict") {
|
|
1876
|
-
|
|
1877
|
-
var n =
|
|
1878
|
-
return i === ";" || i === "}" ||
|
|
1867
|
+
P.lastIndex = e + t[0].length;
|
|
1868
|
+
var n = P.exec(this.input), r = n.index + n[0].length, i = this.input.charAt(r);
|
|
1869
|
+
return i === ";" || i === "}" || N.test(n[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(i) || i === "!" && this.input.charAt(r + 1) === "=");
|
|
1879
1870
|
}
|
|
1880
|
-
e += t[0].length,
|
|
1871
|
+
e += t[0].length, P.lastIndex = e, e += P.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
1881
1872
|
}
|
|
1882
|
-
},
|
|
1873
|
+
}, L.eat = function(e) {
|
|
1883
1874
|
return this.type === e ? (this.next(), !0) : !1;
|
|
1884
|
-
},
|
|
1885
|
-
return this.type ===
|
|
1886
|
-
},
|
|
1875
|
+
}, L.isContextual = function(e) {
|
|
1876
|
+
return this.type === M.name && this.value === e && !this.containsEsc;
|
|
1877
|
+
}, L.eatContextual = function(e) {
|
|
1887
1878
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
1888
|
-
},
|
|
1879
|
+
}, L.expectContextual = function(e) {
|
|
1889
1880
|
this.eatContextual(e) || this.unexpected();
|
|
1890
|
-
},
|
|
1891
|
-
return this.type ===
|
|
1892
|
-
},
|
|
1881
|
+
}, L.canInsertSemicolon = function() {
|
|
1882
|
+
return this.type === M.eof || this.type === M.braceR || N.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1883
|
+
}, L.insertSemicolon = function() {
|
|
1893
1884
|
if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
1894
|
-
},
|
|
1895
|
-
!this.eat(
|
|
1896
|
-
},
|
|
1885
|
+
}, L.semicolon = function() {
|
|
1886
|
+
!this.eat(M.semi) && !this.insertSemicolon() && this.unexpected();
|
|
1887
|
+
}, L.afterTrailingComma = function(e, t) {
|
|
1897
1888
|
if (this.type === e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
1898
|
-
},
|
|
1889
|
+
}, L.expect = function(e) {
|
|
1899
1890
|
this.eat(e) || this.unexpected();
|
|
1900
|
-
},
|
|
1891
|
+
}, L.unexpected = function(e) {
|
|
1901
1892
|
this.raise(e ?? this.start, "Unexpected token");
|
|
1902
1893
|
};
|
|
1903
|
-
var
|
|
1894
|
+
var Ft = function() {
|
|
1904
1895
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1905
1896
|
};
|
|
1906
|
-
|
|
1897
|
+
L.checkPatternErrors = function(e, t) {
|
|
1907
1898
|
if (e) {
|
|
1908
1899
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
1909
1900
|
var n = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
1910
1901
|
n > -1 && this.raiseRecoverable(n, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
1911
1902
|
}
|
|
1912
|
-
},
|
|
1903
|
+
}, L.checkExpressionErrors = function(e, t) {
|
|
1913
1904
|
if (!e) return !1;
|
|
1914
1905
|
var n = e.shorthandAssign, r = e.doubleProto;
|
|
1915
1906
|
if (!t) return n >= 0 || r >= 0;
|
|
1916
1907
|
n >= 0 && this.raise(n, "Shorthand property assignments are valid only in destructuring patterns"), r >= 0 && this.raiseRecoverable(r, "Redefinition of __proto__ property");
|
|
1917
|
-
},
|
|
1908
|
+
}, L.checkYieldAwaitInDefaultParams = function() {
|
|
1918
1909
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
1919
|
-
},
|
|
1910
|
+
}, L.isSimpleAssignTarget = function(e) {
|
|
1920
1911
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
1921
1912
|
};
|
|
1922
|
-
var
|
|
1923
|
-
|
|
1913
|
+
var R = F.prototype;
|
|
1914
|
+
R.parseTopLevel = function(e) {
|
|
1924
1915
|
var t = Object.create(null);
|
|
1925
|
-
for (e.body ||= []; this.type !==
|
|
1916
|
+
for (e.body ||= []; this.type !== M.eof;) {
|
|
1926
1917
|
var n = this.parseStatement(null, !0, t);
|
|
1927
1918
|
e.body.push(n);
|
|
1928
1919
|
}
|
|
@@ -1932,108 +1923,108 @@ z.parseTopLevel = function(e) {
|
|
|
1932
1923
|
}
|
|
1933
1924
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e, "Program");
|
|
1934
1925
|
};
|
|
1935
|
-
var
|
|
1936
|
-
|
|
1926
|
+
var It = { kind: "loop" }, Lt = { kind: "switch" };
|
|
1927
|
+
R.isLet = function(e) {
|
|
1937
1928
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
|
|
1938
|
-
|
|
1939
|
-
var t =
|
|
1929
|
+
P.lastIndex = this.pos;
|
|
1930
|
+
var t = P.exec(this.input), n = this.pos + t[0].length, r = this.fullCharCodeAt(n);
|
|
1940
1931
|
if (r === 91 || r === 92) return !0;
|
|
1941
1932
|
if (e) return !1;
|
|
1942
1933
|
if (r === 123) return !0;
|
|
1943
|
-
if (
|
|
1934
|
+
if (E(r)) {
|
|
1944
1935
|
var i = n;
|
|
1945
1936
|
do
|
|
1946
1937
|
n += r <= 65535 ? 1 : 2;
|
|
1947
|
-
while (
|
|
1938
|
+
while (qe(r = this.fullCharCodeAt(n)));
|
|
1948
1939
|
if (r === 92) return !0;
|
|
1949
1940
|
var a = this.input.slice(i, n);
|
|
1950
|
-
if (!
|
|
1941
|
+
if (!Ue.test(a)) return !0;
|
|
1951
1942
|
}
|
|
1952
1943
|
return !1;
|
|
1953
|
-
},
|
|
1944
|
+
}, R.isAsyncFunction = function() {
|
|
1954
1945
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
|
|
1955
|
-
|
|
1956
|
-
var e =
|
|
1957
|
-
return !
|
|
1958
|
-
},
|
|
1946
|
+
P.lastIndex = this.pos;
|
|
1947
|
+
var e = P.exec(this.input), t = this.pos + e[0].length, n;
|
|
1948
|
+
return !N.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(qe(n = this.fullCharCodeAt(t + 8)) || n === 92));
|
|
1949
|
+
}, R.isUsingKeyword = function(e, t) {
|
|
1959
1950
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return !1;
|
|
1960
|
-
|
|
1961
|
-
var n =
|
|
1962
|
-
if (
|
|
1951
|
+
P.lastIndex = this.pos;
|
|
1952
|
+
var n = P.exec(this.input), r = this.pos + n[0].length;
|
|
1953
|
+
if (N.test(this.input.slice(this.pos, r))) return !1;
|
|
1963
1954
|
if (e) {
|
|
1964
1955
|
var i = r + 5, a;
|
|
1965
|
-
if (this.input.slice(r, i) !== "using" || i === this.input.length ||
|
|
1966
|
-
|
|
1967
|
-
var o =
|
|
1968
|
-
if (r = i + o[0].length, o &&
|
|
1956
|
+
if (this.input.slice(r, i) !== "using" || i === this.input.length || qe(a = this.fullCharCodeAt(i)) || a === 92) return !1;
|
|
1957
|
+
P.lastIndex = i;
|
|
1958
|
+
var o = P.exec(this.input);
|
|
1959
|
+
if (r = i + o[0].length, o && N.test(this.input.slice(i, r))) return !1;
|
|
1969
1960
|
}
|
|
1970
1961
|
var s = this.fullCharCodeAt(r);
|
|
1971
|
-
if (!
|
|
1962
|
+
if (!E(s) && s !== 92) return !1;
|
|
1972
1963
|
var c = r;
|
|
1973
1964
|
do
|
|
1974
1965
|
r += s <= 65535 ? 1 : 2;
|
|
1975
|
-
while (
|
|
1966
|
+
while (qe(s = this.fullCharCodeAt(r)));
|
|
1976
1967
|
if (s === 92) return !0;
|
|
1977
1968
|
var l = this.input.slice(c, r);
|
|
1978
|
-
return !(
|
|
1979
|
-
},
|
|
1969
|
+
return !(Ue.test(l) || t && l === "of");
|
|
1970
|
+
}, R.isAwaitUsing = function(e) {
|
|
1980
1971
|
return this.isUsingKeyword(!0, e);
|
|
1981
|
-
},
|
|
1972
|
+
}, R.isUsing = function(e) {
|
|
1982
1973
|
return this.isUsingKeyword(!1, e);
|
|
1983
|
-
},
|
|
1974
|
+
}, R.parseStatement = function(e, t, n) {
|
|
1984
1975
|
var r = this.type, i = this.startNode(), a;
|
|
1985
|
-
switch (this.isLet(e) && (r =
|
|
1986
|
-
case
|
|
1987
|
-
case
|
|
1988
|
-
case
|
|
1989
|
-
case
|
|
1990
|
-
case
|
|
1991
|
-
case
|
|
1992
|
-
case
|
|
1993
|
-
case
|
|
1994
|
-
case
|
|
1995
|
-
case
|
|
1996
|
-
case
|
|
1997
|
-
case
|
|
1998
|
-
case
|
|
1999
|
-
case
|
|
2000
|
-
case
|
|
2001
|
-
case
|
|
2002
|
-
case
|
|
2003
|
-
case
|
|
2004
|
-
case
|
|
2005
|
-
case
|
|
2006
|
-
if (this.options.ecmaVersion > 10 && r ===
|
|
2007
|
-
|
|
2008
|
-
var o =
|
|
1976
|
+
switch (this.isLet(e) && (r = M._var, a = "let"), r) {
|
|
1977
|
+
case M._break:
|
|
1978
|
+
case M._continue: return this.parseBreakContinueStatement(i, r.keyword);
|
|
1979
|
+
case M._debugger: return this.parseDebuggerStatement(i);
|
|
1980
|
+
case M._do: return this.parseDoStatement(i);
|
|
1981
|
+
case M._for: return this.parseForStatement(i);
|
|
1982
|
+
case M._function: return e && (this.strict || e !== "if" && e !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(i, !1, !e);
|
|
1983
|
+
case M._class: return e && this.unexpected(), this.parseClass(i, !0);
|
|
1984
|
+
case M._if: return this.parseIfStatement(i);
|
|
1985
|
+
case M._return: return this.parseReturnStatement(i);
|
|
1986
|
+
case M._switch: return this.parseSwitchStatement(i);
|
|
1987
|
+
case M._throw: return this.parseThrowStatement(i);
|
|
1988
|
+
case M._try: return this.parseTryStatement(i);
|
|
1989
|
+
case M._const:
|
|
1990
|
+
case M._var: return a ||= this.value, e && a !== "var" && this.unexpected(), this.parseVarStatement(i, a);
|
|
1991
|
+
case M._while: return this.parseWhileStatement(i);
|
|
1992
|
+
case M._with: return this.parseWithStatement(i);
|
|
1993
|
+
case M.braceL: return this.parseBlock(!0, i);
|
|
1994
|
+
case M.semi: return this.parseEmptyStatement(i);
|
|
1995
|
+
case M._export:
|
|
1996
|
+
case M._import:
|
|
1997
|
+
if (this.options.ecmaVersion > 10 && r === M._import) {
|
|
1998
|
+
P.lastIndex = this.pos;
|
|
1999
|
+
var o = P.exec(this.input), s = this.pos + o[0].length, c = this.input.charCodeAt(s);
|
|
2009
2000
|
if (c === 40 || c === 46) return this.parseExpressionStatement(i, this.parseExpression());
|
|
2010
2001
|
}
|
|
2011
|
-
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), r ===
|
|
2002
|
+
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), r === M._import ? this.parseImport(i) : this.parseExport(i, n);
|
|
2012
2003
|
default:
|
|
2013
2004
|
if (this.isAsyncFunction()) return e && this.unexpected(), this.next(), this.parseFunctionStatement(i, !0, !e);
|
|
2014
2005
|
var l = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
2015
2006
|
if (l) return this.allowUsing || this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"), l === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(i, !1, l), this.semicolon(), this.finishNode(i, "VariableDeclaration");
|
|
2016
2007
|
var u = this.value, d = this.parseExpression();
|
|
2017
|
-
return r ===
|
|
2008
|
+
return r === M.name && d.type === "Identifier" && this.eat(M.colon) ? this.parseLabeledStatement(i, u, d, e) : this.parseExpressionStatement(i, d);
|
|
2018
2009
|
}
|
|
2019
|
-
},
|
|
2010
|
+
}, R.parseBreakContinueStatement = function(e, t) {
|
|
2020
2011
|
var n = t === "break";
|
|
2021
|
-
this.next(), this.eat(
|
|
2012
|
+
this.next(), this.eat(M.semi) || this.insertSemicolon() ? e.label = null : this.type === M.name ? (e.label = this.parseIdent(), this.semicolon()) : this.unexpected();
|
|
2022
2013
|
for (var r = 0; r < this.labels.length; ++r) {
|
|
2023
2014
|
var i = this.labels[r];
|
|
2024
2015
|
if ((e.label == null || i.name === e.label.name) && (i.kind != null && (n || i.kind === "loop") || e.label && n)) break;
|
|
2025
2016
|
}
|
|
2026
2017
|
return r === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, n ? "BreakStatement" : "ContinueStatement");
|
|
2027
|
-
},
|
|
2018
|
+
}, R.parseDebuggerStatement = function(e) {
|
|
2028
2019
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
2029
|
-
},
|
|
2030
|
-
return this.next(), this.labels.push(
|
|
2031
|
-
},
|
|
2020
|
+
}, R.parseDoStatement = function(e) {
|
|
2021
|
+
return this.next(), this.labels.push(It), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(M._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(M.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
2022
|
+
}, R.parseForStatement = function(e) {
|
|
2032
2023
|
this.next();
|
|
2033
2024
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
2034
|
-
if (this.labels.push(
|
|
2025
|
+
if (this.labels.push(It), this.enterScope(0), this.expect(M.parenL), this.type === M.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
2035
2026
|
var n = this.isLet();
|
|
2036
|
-
if (this.type ===
|
|
2027
|
+
if (this.type === M._var || this.type === M._const || n) {
|
|
2037
2028
|
var r = this.startNode(), i = n ? "let" : this.value;
|
|
2038
2029
|
return this.next(), this.parseVar(r, !0, i), this.finishNode(r, "VariableDeclaration"), this.parseForAfterInit(e, r, t);
|
|
2039
2030
|
}
|
|
@@ -2042,47 +2033,47 @@ z.isLet = function(e) {
|
|
|
2042
2033
|
var c = this.startNode();
|
|
2043
2034
|
return this.next(), s === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(c, !0, s), this.finishNode(c, "VariableDeclaration"), this.parseForAfterInit(e, c, t);
|
|
2044
2035
|
}
|
|
2045
|
-
var l = this.containsEsc, u = new
|
|
2046
|
-
return this.type ===
|
|
2047
|
-
},
|
|
2048
|
-
return (this.type ===
|
|
2049
|
-
},
|
|
2050
|
-
return this.next(), this.parseFunction(e,
|
|
2051
|
-
},
|
|
2052
|
-
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(
|
|
2053
|
-
},
|
|
2054
|
-
return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(
|
|
2055
|
-
},
|
|
2056
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(
|
|
2057
|
-
for (var t, n = !1; this.type !==
|
|
2058
|
-
var r = this.type ===
|
|
2059
|
-
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), n = !0, t.test = null), this.expect(
|
|
2036
|
+
var l = this.containsEsc, u = new Ft(), d = this.start, f = t > -1 ? this.parseExprSubscripts(u, "await") : this.parseExpression(!0, u);
|
|
2037
|
+
return this.type === M._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === M._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (f.start === d && !l && f.type === "Identifier" && f.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), a && o && this.raise(f.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(f, !1, u), this.checkLValPattern(f), this.parseForIn(e, f)) : (this.checkExpressionErrors(u, !0), t > -1 && this.unexpected(t), this.parseFor(e, f));
|
|
2038
|
+
}, R.parseForAfterInit = function(e, t, n) {
|
|
2039
|
+
return (this.type === M._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === M._in ? n > -1 && this.unexpected(n) : e.await = n > -1), this.parseForIn(e, t)) : (n > -1 && this.unexpected(n), this.parseFor(e, t));
|
|
2040
|
+
}, R.parseFunctionStatement = function(e, t, n) {
|
|
2041
|
+
return this.next(), this.parseFunction(e, zt | (n ? 0 : Bt), !1, t);
|
|
2042
|
+
}, R.parseIfStatement = function(e) {
|
|
2043
|
+
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(M._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
2044
|
+
}, R.parseReturnStatement = function(e) {
|
|
2045
|
+
return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(M.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
2046
|
+
}, R.parseSwitchStatement = function(e) {
|
|
2047
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(M.braceL), this.labels.push(Lt), this.enterScope(Tt);
|
|
2048
|
+
for (var t, n = !1; this.type !== M.braceR;) if (this.type === M._case || this.type === M._default) {
|
|
2049
|
+
var r = this.type === M._case;
|
|
2050
|
+
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), n = !0, t.test = null), this.expect(M.colon);
|
|
2060
2051
|
} else t || this.unexpected(), t.consequent.push(this.parseStatement(null));
|
|
2061
2052
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
2062
|
-
},
|
|
2063
|
-
return this.next(),
|
|
2053
|
+
}, R.parseThrowStatement = function(e) {
|
|
2054
|
+
return this.next(), N.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
2064
2055
|
};
|
|
2065
|
-
var
|
|
2066
|
-
|
|
2056
|
+
var Rt = [];
|
|
2057
|
+
R.parseCatchClauseParam = function() {
|
|
2067
2058
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
2068
|
-
return this.enterScope(t ?
|
|
2069
|
-
},
|
|
2070
|
-
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type ===
|
|
2059
|
+
return this.enterScope(t ? bt : 0), this.checkLValPattern(e, t ? Mt : At), this.expect(M.parenR), e;
|
|
2060
|
+
}, R.parseTryStatement = function(e) {
|
|
2061
|
+
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === M._catch) {
|
|
2071
2062
|
var t = this.startNode();
|
|
2072
|
-
this.next(), this.eat(
|
|
2063
|
+
this.next(), this.eat(M.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause");
|
|
2073
2064
|
}
|
|
2074
|
-
return e.finalizer = this.eat(
|
|
2075
|
-
},
|
|
2065
|
+
return e.finalizer = this.eat(M._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement");
|
|
2066
|
+
}, R.parseVarStatement = function(e, t, n) {
|
|
2076
2067
|
return this.next(), this.parseVar(e, !1, t, n), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
2077
|
-
},
|
|
2078
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
2079
|
-
},
|
|
2068
|
+
}, R.parseWhileStatement = function(e) {
|
|
2069
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(It), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
2070
|
+
}, R.parseWithStatement = function(e) {
|
|
2080
2071
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
2081
|
-
},
|
|
2072
|
+
}, R.parseEmptyStatement = function(e) {
|
|
2082
2073
|
return this.next(), this.finishNode(e, "EmptyStatement");
|
|
2083
|
-
},
|
|
2074
|
+
}, R.parseLabeledStatement = function(e, t, n, r) {
|
|
2084
2075
|
for (var i = 0, a = this.labels; i < a.length; i += 1) a[i].name === t && this.raise(n.start, "Label '" + t + "' is already declared");
|
|
2085
|
-
for (var o = this.type.isLoop ? "loop" : this.type ===
|
|
2076
|
+
for (var o = this.type.isLoop ? "loop" : this.type === M._switch ? "switch" : null, s = this.labels.length - 1; s >= 0; s--) {
|
|
2086
2077
|
var c = this.labels[s];
|
|
2087
2078
|
if (c.statementStart === e.start) c.statementStart = this.start, c.kind = o;
|
|
2088
2079
|
else break;
|
|
@@ -2092,113 +2083,113 @@ z.parseCatchClauseParam = function() {
|
|
|
2092
2083
|
kind: o,
|
|
2093
2084
|
statementStart: this.start
|
|
2094
2085
|
}), e.body = this.parseStatement(r ? r.indexOf("label") === -1 ? r + "label" : r : "label"), this.labels.pop(), e.label = n, this.finishNode(e, "LabeledStatement");
|
|
2095
|
-
},
|
|
2086
|
+
}, R.parseExpressionStatement = function(e, t) {
|
|
2096
2087
|
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
|
|
2097
|
-
},
|
|
2098
|
-
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(
|
|
2088
|
+
}, R.parseBlock = function(e, t, n) {
|
|
2089
|
+
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(M.braceL), e && this.enterScope(0); this.type !== M.braceR;) {
|
|
2099
2090
|
var r = this.parseStatement(null);
|
|
2100
2091
|
t.body.push(r);
|
|
2101
2092
|
}
|
|
2102
2093
|
return n && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement");
|
|
2103
|
-
},
|
|
2104
|
-
return e.init = t, this.expect(
|
|
2105
|
-
},
|
|
2106
|
-
var n = this.type ===
|
|
2107
|
-
return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!n || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(t.start, (n ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e.left = t, e.right = n ? this.parseExpression() : this.parseMaybeAssign(), this.expect(
|
|
2108
|
-
},
|
|
2094
|
+
}, R.parseFor = function(e, t) {
|
|
2095
|
+
return e.init = t, this.expect(M.semi), e.test = this.type === M.semi ? null : this.parseExpression(), this.expect(M.semi), e.update = this.type === M.parenR ? null : this.parseExpression(), this.expect(M.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement");
|
|
2096
|
+
}, R.parseForIn = function(e, t) {
|
|
2097
|
+
var n = this.type === M._in;
|
|
2098
|
+
return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!n || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(t.start, (n ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e.left = t, e.right = n ? this.parseExpression() : this.parseMaybeAssign(), this.expect(M.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, n ? "ForInStatement" : "ForOfStatement");
|
|
2099
|
+
}, R.parseVar = function(e, t, n, r) {
|
|
2109
2100
|
for (e.declarations = [], e.kind = n;;) {
|
|
2110
2101
|
var i = this.startNode();
|
|
2111
|
-
if (this.parseVarId(i, n), this.eat(
|
|
2102
|
+
if (this.parseVarId(i, n), this.eat(M.eq) ? i.init = this.parseMaybeAssign(t) : !r && n === "const" && !(this.type === M._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !r && (n === "using" || n === "await using") && this.options.ecmaVersion >= 17 && this.type !== M._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + n + " declaration") : !r && i.id.type !== "Identifier" && !(t && (this.type === M._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : i.init = null, e.declarations.push(this.finishNode(i, "VariableDeclarator")), !this.eat(M.comma)) break;
|
|
2112
2103
|
}
|
|
2113
2104
|
return e;
|
|
2114
|
-
},
|
|
2115
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
2105
|
+
}, R.parseVarId = function(e, t) {
|
|
2106
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? kt : At, !1);
|
|
2116
2107
|
};
|
|
2117
|
-
var
|
|
2118
|
-
|
|
2119
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type ===
|
|
2108
|
+
var zt = 1, Bt = 2, Vt = 4;
|
|
2109
|
+
R.parseFunction = function(e, t, n, r, i) {
|
|
2110
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === M.star && t & Bt && this.unexpected(), e.generator = this.eat(M.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & zt && (e.id = t & Vt && this.type !== M.name ? null : this.parseIdent(), e.id && !(t & Bt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? kt : At : jt));
|
|
2120
2111
|
var a = this.yieldPos, o = this.awaitPos, s = this.awaitIdentPos;
|
|
2121
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2122
|
-
},
|
|
2123
|
-
this.expect(
|
|
2124
|
-
},
|
|
2112
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Dt(e.async, e.generator)), t & zt || (e.id = this.type === M.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, n, !1, i), this.yieldPos = a, this.awaitPos = o, this.awaitIdentPos = s, this.finishNode(e, t & zt ? "FunctionDeclaration" : "FunctionExpression");
|
|
2113
|
+
}, R.parseFunctionParams = function(e) {
|
|
2114
|
+
this.expect(M.parenL), e.params = this.parseBindingList(M.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
2115
|
+
}, R.parseClass = function(e, t) {
|
|
2125
2116
|
this.next();
|
|
2126
2117
|
var n = this.strict;
|
|
2127
2118
|
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
2128
2119
|
var r = this.enterClassBody(), i = this.startNode(), a = !1;
|
|
2129
|
-
for (i.body = [], this.expect(
|
|
2120
|
+
for (i.body = [], this.expect(M.braceL); this.type !== M.braceR;) {
|
|
2130
2121
|
var o = this.parseClassElement(e.superClass !== null);
|
|
2131
|
-
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" &&
|
|
2122
|
+
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" && Ht(r, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared"));
|
|
2132
2123
|
}
|
|
2133
2124
|
return this.strict = n, this.next(), e.body = this.finishNode(i, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
2134
|
-
},
|
|
2135
|
-
if (this.eat(
|
|
2125
|
+
}, R.parseClassElement = function(e) {
|
|
2126
|
+
if (this.eat(M.semi)) return null;
|
|
2136
2127
|
var t = this.options.ecmaVersion, n = this.startNode(), r = "", i = !1, a = !1, o = "method", s = !1;
|
|
2137
2128
|
if (this.eatContextual("static")) {
|
|
2138
|
-
if (t >= 13 && this.eat(
|
|
2139
|
-
this.isClassElementNameStart() || this.type ===
|
|
2129
|
+
if (t >= 13 && this.eat(M.braceL)) return this.parseClassStaticBlock(n), n;
|
|
2130
|
+
this.isClassElementNameStart() || this.type === M.star ? s = !0 : r = "static";
|
|
2140
2131
|
}
|
|
2141
|
-
if (n.static = s, !r && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type ===
|
|
2132
|
+
if (n.static = s, !r && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === M.star) && !this.canInsertSemicolon() ? a = !0 : r = "async"), !r && (t >= 9 || !a) && this.eat(M.star) && (i = !0), !r && !a && !i) {
|
|
2142
2133
|
var c = this.value;
|
|
2143
2134
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = c : r = c);
|
|
2144
2135
|
}
|
|
2145
|
-
if (r ? (n.computed = !1, n.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), n.key.name = r, this.finishNode(n.key, "Identifier")) : this.parseClassElementName(n), t < 13 || this.type ===
|
|
2146
|
-
var l = !n.static &&
|
|
2136
|
+
if (r ? (n.computed = !1, n.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), n.key.name = r, this.finishNode(n.key, "Identifier")) : this.parseClassElementName(n), t < 13 || this.type === M.parenL || o !== "method" || i || a) {
|
|
2137
|
+
var l = !n.static && Ut(n, "constructor"), u = l && e;
|
|
2147
2138
|
l && o !== "method" && this.raise(n.key.start, "Constructor can't have get/set modifier"), n.kind = l ? "constructor" : o, this.parseClassMethod(n, i, a, u);
|
|
2148
2139
|
} else this.parseClassField(n);
|
|
2149
2140
|
return n;
|
|
2150
|
-
},
|
|
2151
|
-
return this.type ===
|
|
2152
|
-
},
|
|
2153
|
-
this.type ===
|
|
2154
|
-
},
|
|
2141
|
+
}, R.isClassElementNameStart = function() {
|
|
2142
|
+
return this.type === M.name || this.type === M.privateId || this.type === M.num || this.type === M.string || this.type === M.bracketL || this.type.keyword;
|
|
2143
|
+
}, R.parseClassElementName = function(e) {
|
|
2144
|
+
this.type === M.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
2145
|
+
}, R.parseClassMethod = function(e, t, n, r) {
|
|
2155
2146
|
var i = e.key;
|
|
2156
|
-
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static &&
|
|
2147
|
+
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static && Ut(e, "prototype") && this.raise(i.start, "Classes may not have a static property named prototype");
|
|
2157
2148
|
var a = e.value = this.parseMethod(t, n, r);
|
|
2158
2149
|
return e.kind === "get" && a.params.length !== 0 && this.raiseRecoverable(a.start, "getter should have no params"), e.kind === "set" && a.params.length !== 1 && this.raiseRecoverable(a.start, "setter should have exactly one param"), e.kind === "set" && a.params[0].type === "RestElement" && this.raiseRecoverable(a.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
2159
|
-
},
|
|
2160
|
-
return
|
|
2161
|
-
},
|
|
2150
|
+
}, R.parseClassField = function(e) {
|
|
2151
|
+
return Ut(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && Ut(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(M.eq) ? (this.enterScope(wt | xt), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
2152
|
+
}, R.parseClassStaticBlock = function(e) {
|
|
2162
2153
|
e.body = [];
|
|
2163
2154
|
var t = this.labels;
|
|
2164
|
-
for (this.labels = [], this.enterScope(
|
|
2155
|
+
for (this.labels = [], this.enterScope(Ct | xt); this.type !== M.braceR;) {
|
|
2165
2156
|
var n = this.parseStatement(null);
|
|
2166
2157
|
e.body.push(n);
|
|
2167
2158
|
}
|
|
2168
2159
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
2169
|
-
},
|
|
2170
|
-
this.type ===
|
|
2171
|
-
},
|
|
2172
|
-
e.superClass = this.eat(
|
|
2173
|
-
},
|
|
2160
|
+
}, R.parseClassId = function(e, t) {
|
|
2161
|
+
this.type === M.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, At, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
2162
|
+
}, R.parseClassSuper = function(e) {
|
|
2163
|
+
e.superClass = this.eat(M._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
2164
|
+
}, R.enterClassBody = function() {
|
|
2174
2165
|
var e = {
|
|
2175
2166
|
declared: Object.create(null),
|
|
2176
2167
|
used: []
|
|
2177
2168
|
};
|
|
2178
2169
|
return this.privateNameStack.push(e), e.declared;
|
|
2179
|
-
},
|
|
2170
|
+
}, R.exitClassBody = function() {
|
|
2180
2171
|
var e = this.privateNameStack.pop(), t = e.declared, n = e.used;
|
|
2181
2172
|
if (this.options.checkPrivateFields) for (var r = this.privateNameStack.length, i = r === 0 ? null : this.privateNameStack[r - 1], a = 0; a < n.length; ++a) {
|
|
2182
2173
|
var o = n[a];
|
|
2183
|
-
|
|
2174
|
+
nt(t, o.name) || (i ? i.used.push(o) : this.raiseRecoverable(o.start, "Private field '#" + o.name + "' must be declared in an enclosing class"));
|
|
2184
2175
|
}
|
|
2185
2176
|
};
|
|
2186
|
-
function
|
|
2177
|
+
function Ht(e, t) {
|
|
2187
2178
|
var n = t.key.name, r = e[n], i = "true";
|
|
2188
2179
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : r ? !0 : (e[n] = i, !1);
|
|
2189
2180
|
}
|
|
2190
|
-
function
|
|
2181
|
+
function Ut(e, t) {
|
|
2191
2182
|
var n = e.computed, r = e.key;
|
|
2192
2183
|
return !n && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t);
|
|
2193
2184
|
}
|
|
2194
|
-
|
|
2195
|
-
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !==
|
|
2196
|
-
},
|
|
2197
|
-
if (this.next(), this.eat(
|
|
2198
|
-
if (this.eat(
|
|
2185
|
+
R.parseExportAllDeclaration = function(e, t) {
|
|
2186
|
+
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== M.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
|
|
2187
|
+
}, R.parseExport = function(e, t) {
|
|
2188
|
+
if (this.next(), this.eat(M.star)) return this.parseExportAllDeclaration(e, t);
|
|
2189
|
+
if (this.eat(M._default)) return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration");
|
|
2199
2190
|
if (this.shouldParseExportStatement()) e.declaration = this.parseExportDeclaration(e), e.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
|
|
2200
2191
|
else {
|
|
2201
|
-
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !==
|
|
2192
|
+
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== M.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause());
|
|
2202
2193
|
else {
|
|
2203
2194
|
for (var n = 0, r = e.specifiers; n < r.length; n += 1) {
|
|
2204
2195
|
var i = r[n];
|
|
@@ -2209,23 +2200,23 @@ z.parseExportAllDeclaration = function(e, t) {
|
|
|
2209
2200
|
this.semicolon();
|
|
2210
2201
|
}
|
|
2211
2202
|
return this.finishNode(e, "ExportNamedDeclaration");
|
|
2212
|
-
},
|
|
2203
|
+
}, R.parseExportDeclaration = function(e) {
|
|
2213
2204
|
return this.parseStatement(null);
|
|
2214
|
-
},
|
|
2205
|
+
}, R.parseExportDefaultDeclaration = function() {
|
|
2215
2206
|
var e;
|
|
2216
|
-
if (this.type ===
|
|
2207
|
+
if (this.type === M._function || (e = this.isAsyncFunction())) {
|
|
2217
2208
|
var t = this.startNode();
|
|
2218
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
2219
|
-
} else if (this.type ===
|
|
2209
|
+
return this.next(), e && this.next(), this.parseFunction(t, zt | Vt, !1, e);
|
|
2210
|
+
} else if (this.type === M._class) {
|
|
2220
2211
|
var n = this.startNode();
|
|
2221
2212
|
return this.parseClass(n, "nullableID");
|
|
2222
2213
|
} else {
|
|
2223
2214
|
var r = this.parseMaybeAssign();
|
|
2224
2215
|
return this.semicolon(), r;
|
|
2225
2216
|
}
|
|
2226
|
-
},
|
|
2227
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
2228
|
-
},
|
|
2217
|
+
}, R.checkExport = function(e, t, n) {
|
|
2218
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), nt(e, t) && this.raiseRecoverable(n, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
2219
|
+
}, R.checkPatternExport = function(e, t) {
|
|
2229
2220
|
var n = t.type;
|
|
2230
2221
|
if (n === "Identifier") this.checkExport(e, t, t.start);
|
|
2231
2222
|
else if (n === "ObjectPattern") for (var r = 0, i = t.properties; r < i.length; r += 1) {
|
|
@@ -2237,72 +2228,72 @@ z.parseExportAllDeclaration = function(e, t) {
|
|
|
2237
2228
|
c && this.checkPatternExport(e, c);
|
|
2238
2229
|
}
|
|
2239
2230
|
else n === "Property" ? this.checkPatternExport(e, t.value) : n === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : n === "RestElement" && this.checkPatternExport(e, t.argument);
|
|
2240
|
-
},
|
|
2231
|
+
}, R.checkVariableExport = function(e, t) {
|
|
2241
2232
|
if (e) for (var n = 0, r = t; n < r.length; n += 1) {
|
|
2242
2233
|
var i = r[n];
|
|
2243
2234
|
this.checkPatternExport(e, i.id);
|
|
2244
2235
|
}
|
|
2245
|
-
},
|
|
2236
|
+
}, R.shouldParseExportStatement = function() {
|
|
2246
2237
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
2247
|
-
},
|
|
2238
|
+
}, R.parseExportSpecifier = function(e) {
|
|
2248
2239
|
var t = this.startNode();
|
|
2249
2240
|
return t.local = this.parseModuleExportName(), t.exported = this.eatContextual("as") ? this.parseModuleExportName() : t.local, this.checkExport(e, t.exported, t.exported.start), this.finishNode(t, "ExportSpecifier");
|
|
2250
|
-
},
|
|
2241
|
+
}, R.parseExportSpecifiers = function(e) {
|
|
2251
2242
|
var t = [], n = !0;
|
|
2252
|
-
for (this.expect(
|
|
2243
|
+
for (this.expect(M.braceL); !this.eat(M.braceR);) {
|
|
2253
2244
|
if (n) n = !1;
|
|
2254
|
-
else if (this.expect(
|
|
2245
|
+
else if (this.expect(M.comma), this.afterTrailingComma(M.braceR)) break;
|
|
2255
2246
|
t.push(this.parseExportSpecifier(e));
|
|
2256
2247
|
}
|
|
2257
2248
|
return t;
|
|
2258
|
-
},
|
|
2259
|
-
return this.next(), this.type ===
|
|
2260
|
-
},
|
|
2249
|
+
}, R.parseImport = function(e) {
|
|
2250
|
+
return this.next(), this.type === M.string ? (e.specifiers = Rt, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === M.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
2251
|
+
}, R.parseImportSpecifier = function() {
|
|
2261
2252
|
var e = this.startNode();
|
|
2262
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
2263
|
-
},
|
|
2253
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportSpecifier");
|
|
2254
|
+
}, R.parseImportDefaultSpecifier = function() {
|
|
2264
2255
|
var e = this.startNode();
|
|
2265
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
2266
|
-
},
|
|
2256
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportDefaultSpecifier");
|
|
2257
|
+
}, R.parseImportNamespaceSpecifier = function() {
|
|
2267
2258
|
var e = this.startNode();
|
|
2268
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
2269
|
-
},
|
|
2259
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
2260
|
+
}, R.parseImportSpecifiers = function() {
|
|
2270
2261
|
var e = [], t = !0;
|
|
2271
|
-
if (this.type ===
|
|
2272
|
-
if (this.type ===
|
|
2273
|
-
for (this.expect(
|
|
2262
|
+
if (this.type === M.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(M.comma))) return e;
|
|
2263
|
+
if (this.type === M.star) return e.push(this.parseImportNamespaceSpecifier()), e;
|
|
2264
|
+
for (this.expect(M.braceL); !this.eat(M.braceR);) {
|
|
2274
2265
|
if (t) t = !1;
|
|
2275
|
-
else if (this.expect(
|
|
2266
|
+
else if (this.expect(M.comma), this.afterTrailingComma(M.braceR)) break;
|
|
2276
2267
|
e.push(this.parseImportSpecifier());
|
|
2277
2268
|
}
|
|
2278
2269
|
return e;
|
|
2279
|
-
},
|
|
2270
|
+
}, R.parseWithClause = function() {
|
|
2280
2271
|
var e = [];
|
|
2281
|
-
if (!this.eat(
|
|
2282
|
-
this.expect(
|
|
2283
|
-
for (var t = {}, n = !0; !this.eat(
|
|
2272
|
+
if (!this.eat(M._with)) return e;
|
|
2273
|
+
this.expect(M.braceL);
|
|
2274
|
+
for (var t = {}, n = !0; !this.eat(M.braceR);) {
|
|
2284
2275
|
if (n) n = !1;
|
|
2285
|
-
else if (this.expect(
|
|
2276
|
+
else if (this.expect(M.comma), this.afterTrailingComma(M.braceR)) break;
|
|
2286
2277
|
var r = this.parseImportAttribute(), i = r.key.type === "Identifier" ? r.key.name : r.key.value;
|
|
2287
|
-
|
|
2278
|
+
nt(t, i) && this.raiseRecoverable(r.key.start, "Duplicate attribute key '" + i + "'"), t[i] = !0, e.push(r);
|
|
2288
2279
|
}
|
|
2289
2280
|
return e;
|
|
2290
|
-
},
|
|
2281
|
+
}, R.parseImportAttribute = function() {
|
|
2291
2282
|
var e = this.startNode();
|
|
2292
|
-
return e.key = this.type ===
|
|
2293
|
-
},
|
|
2294
|
-
if (this.options.ecmaVersion >= 13 && this.type ===
|
|
2283
|
+
return e.key = this.type === M.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(M.colon), this.type !== M.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute");
|
|
2284
|
+
}, R.parseModuleExportName = function() {
|
|
2285
|
+
if (this.options.ecmaVersion >= 13 && this.type === M.string) {
|
|
2295
2286
|
var e = this.parseLiteral(this.value);
|
|
2296
|
-
return
|
|
2287
|
+
return st.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
2297
2288
|
}
|
|
2298
2289
|
return this.parseIdent(!0);
|
|
2299
|
-
},
|
|
2290
|
+
}, R.adaptDirectivePrologue = function(e) {
|
|
2300
2291
|
for (var t = 0; t < e.length && this.isDirectiveCandidate(e[t]); ++t) e[t].directive = e[t].expression.raw.slice(1, -1);
|
|
2301
|
-
},
|
|
2292
|
+
}, R.isDirectiveCandidate = function(e) {
|
|
2302
2293
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && (this.input[e.start] === "\"" || this.input[e.start] === "'");
|
|
2303
2294
|
};
|
|
2304
|
-
var
|
|
2305
|
-
|
|
2295
|
+
var z = F.prototype;
|
|
2296
|
+
z.toAssignable = function(e, t, n) {
|
|
2306
2297
|
if (this.options.ecmaVersion >= 6 && e) switch (e.type) {
|
|
2307
2298
|
case "Identifier":
|
|
2308
2299
|
this.inAsync && e.name === "await" && this.raise(e.start, "Cannot use 'await' as identifier inside an async function");
|
|
@@ -2341,7 +2332,7 @@ B.toAssignable = function(e, t, n) {
|
|
|
2341
2332
|
}
|
|
2342
2333
|
else n && this.checkPatternErrors(n, !0);
|
|
2343
2334
|
return e;
|
|
2344
|
-
},
|
|
2335
|
+
}, z.toAssignableList = function(e, t) {
|
|
2345
2336
|
for (var n = e.length, r = 0; r < n; r++) {
|
|
2346
2337
|
var i = e[r];
|
|
2347
2338
|
i && this.toAssignable(i, t);
|
|
@@ -2351,44 +2342,44 @@ B.toAssignable = function(e, t, n) {
|
|
|
2351
2342
|
this.options.ecmaVersion === 6 && t && a && a.type === "RestElement" && a.argument.type !== "Identifier" && this.unexpected(a.argument.start);
|
|
2352
2343
|
}
|
|
2353
2344
|
return e;
|
|
2354
|
-
},
|
|
2345
|
+
}, z.parseSpread = function(e) {
|
|
2355
2346
|
var t = this.startNode();
|
|
2356
2347
|
return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement");
|
|
2357
|
-
},
|
|
2348
|
+
}, z.parseRestBinding = function() {
|
|
2358
2349
|
var e = this.startNode();
|
|
2359
|
-
return this.next(), this.options.ecmaVersion === 6 && this.type !==
|
|
2360
|
-
},
|
|
2350
|
+
return this.next(), this.options.ecmaVersion === 6 && this.type !== M.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
2351
|
+
}, z.parseBindingAtom = function() {
|
|
2361
2352
|
if (this.options.ecmaVersion >= 6) switch (this.type) {
|
|
2362
|
-
case
|
|
2353
|
+
case M.bracketL:
|
|
2363
2354
|
var e = this.startNode();
|
|
2364
|
-
return this.next(), e.elements = this.parseBindingList(
|
|
2365
|
-
case
|
|
2355
|
+
return this.next(), e.elements = this.parseBindingList(M.bracketR, !0, !0), this.finishNode(e, "ArrayPattern");
|
|
2356
|
+
case M.braceL: return this.parseObj(!0);
|
|
2366
2357
|
}
|
|
2367
2358
|
return this.parseIdent();
|
|
2368
|
-
},
|
|
2369
|
-
for (var i = [], a = !0; !this.eat(e);) if (a ? a = !1 : this.expect(
|
|
2359
|
+
}, z.parseBindingList = function(e, t, n, r) {
|
|
2360
|
+
for (var i = [], a = !0; !this.eat(e);) if (a ? a = !1 : this.expect(M.comma), t && this.type === M.comma) i.push(null);
|
|
2370
2361
|
else if (n && this.afterTrailingComma(e)) break;
|
|
2371
|
-
else if (this.type ===
|
|
2362
|
+
else if (this.type === M.ellipsis) {
|
|
2372
2363
|
var o = this.parseRestBinding();
|
|
2373
|
-
this.parseBindingListItem(o), i.push(o), this.type ===
|
|
2364
|
+
this.parseBindingListItem(o), i.push(o), this.type === M.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e);
|
|
2374
2365
|
break;
|
|
2375
2366
|
} else i.push(this.parseAssignableListItem(r));
|
|
2376
2367
|
return i;
|
|
2377
|
-
},
|
|
2368
|
+
}, z.parseAssignableListItem = function(e) {
|
|
2378
2369
|
var t = this.parseMaybeDefault(this.start, this.startLoc);
|
|
2379
2370
|
return this.parseBindingListItem(t), t;
|
|
2380
|
-
},
|
|
2371
|
+
}, z.parseBindingListItem = function(e) {
|
|
2381
2372
|
return e;
|
|
2382
|
-
},
|
|
2383
|
-
if (n ||= this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(
|
|
2373
|
+
}, z.parseMaybeDefault = function(e, t, n) {
|
|
2374
|
+
if (n ||= this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(M.eq)) return n;
|
|
2384
2375
|
var r = this.startNodeAt(e, t);
|
|
2385
2376
|
return r.left = n, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
2386
|
-
},
|
|
2387
|
-
t === void 0 && (t =
|
|
2388
|
-
var r = t !==
|
|
2377
|
+
}, z.checkLValSimple = function(e, t, n) {
|
|
2378
|
+
t === void 0 && (t = Ot);
|
|
2379
|
+
var r = t !== Ot;
|
|
2389
2380
|
switch (e.type) {
|
|
2390
2381
|
case "Identifier":
|
|
2391
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t ===
|
|
2382
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === At && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), n && (nt(n, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), n[e.name] = !0), t !== Nt && this.declareName(e.name, t, e.start));
|
|
2392
2383
|
break;
|
|
2393
2384
|
case "ChainExpression":
|
|
2394
2385
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -2399,8 +2390,8 @@ B.toAssignable = function(e, t, n) {
|
|
|
2399
2390
|
case "ParenthesizedExpression": return r && this.raiseRecoverable(e.start, "Binding parenthesized expression"), this.checkLValSimple(e.expression, t, n);
|
|
2400
2391
|
default: this.raise(e.start, (r ? "Binding" : "Assigning to") + " rvalue");
|
|
2401
2392
|
}
|
|
2402
|
-
},
|
|
2403
|
-
switch (t === void 0 && (t =
|
|
2393
|
+
}, z.checkLValPattern = function(e, t, n) {
|
|
2394
|
+
switch (t === void 0 && (t = Ot), e.type) {
|
|
2404
2395
|
case "ObjectPattern":
|
|
2405
2396
|
for (var r = 0, i = e.properties; r < i.length; r += 1) {
|
|
2406
2397
|
var a = i[r];
|
|
@@ -2415,8 +2406,8 @@ B.toAssignable = function(e, t, n) {
|
|
|
2415
2406
|
break;
|
|
2416
2407
|
default: this.checkLValSimple(e, t, n);
|
|
2417
2408
|
}
|
|
2418
|
-
},
|
|
2419
|
-
switch (t === void 0 && (t =
|
|
2409
|
+
}, z.checkLValInnerPattern = function(e, t, n) {
|
|
2410
|
+
switch (t === void 0 && (t = Ot), e.type) {
|
|
2420
2411
|
case "Property":
|
|
2421
2412
|
this.checkLValInnerPattern(e.value, t, n);
|
|
2422
2413
|
break;
|
|
@@ -2429,72 +2420,72 @@ B.toAssignable = function(e, t, n) {
|
|
|
2429
2420
|
default: this.checkLValPattern(e, t, n);
|
|
2430
2421
|
}
|
|
2431
2422
|
};
|
|
2432
|
-
var
|
|
2423
|
+
var B = function(e, t, n, r, i) {
|
|
2433
2424
|
this.token = e, this.isExpr = !!t, this.preserveSpace = !!n, this.override = r, this.generator = !!i;
|
|
2434
|
-
},
|
|
2435
|
-
b_stat: new
|
|
2436
|
-
b_expr: new
|
|
2437
|
-
b_tmpl: new
|
|
2438
|
-
p_stat: new
|
|
2439
|
-
p_expr: new
|
|
2440
|
-
q_tmpl: new
|
|
2425
|
+
}, V = {
|
|
2426
|
+
b_stat: new B("{", !1),
|
|
2427
|
+
b_expr: new B("{", !0),
|
|
2428
|
+
b_tmpl: new B("${", !1),
|
|
2429
|
+
p_stat: new B("(", !1),
|
|
2430
|
+
p_expr: new B("(", !0),
|
|
2431
|
+
q_tmpl: new B("`", !0, !0, function(e) {
|
|
2441
2432
|
return e.tryReadTemplateToken();
|
|
2442
2433
|
}),
|
|
2443
|
-
f_stat: new
|
|
2444
|
-
f_expr: new
|
|
2445
|
-
f_expr_gen: new
|
|
2446
|
-
f_gen: new
|
|
2447
|
-
},
|
|
2448
|
-
|
|
2449
|
-
return [
|
|
2450
|
-
},
|
|
2434
|
+
f_stat: new B("function", !1),
|
|
2435
|
+
f_expr: new B("function", !0),
|
|
2436
|
+
f_expr_gen: new B("function", !0, !1, null, !0),
|
|
2437
|
+
f_gen: new B("function", !1, !1, null, !0)
|
|
2438
|
+
}, Wt = F.prototype;
|
|
2439
|
+
Wt.initialContext = function() {
|
|
2440
|
+
return [V.b_stat];
|
|
2441
|
+
}, Wt.curContext = function() {
|
|
2451
2442
|
return this.context[this.context.length - 1];
|
|
2452
|
-
},
|
|
2443
|
+
}, Wt.braceIsBlock = function(e) {
|
|
2453
2444
|
var t = this.curContext();
|
|
2454
|
-
return t ===
|
|
2455
|
-
},
|
|
2445
|
+
return t === V.f_expr || t === V.f_stat ? !0 : e === M.colon && (t === V.b_stat || t === V.b_expr) ? !t.isExpr : e === M._return || e === M.name && this.exprAllowed ? N.test(this.input.slice(this.lastTokEnd, this.start)) : e === M._else || e === M.semi || e === M.eof || e === M.parenR || e === M.arrow ? !0 : e === M.braceL ? t === V.b_stat : e === M._var || e === M._const || e === M.name ? !1 : !this.exprAllowed;
|
|
2446
|
+
}, Wt.inGeneratorContext = function() {
|
|
2456
2447
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
2457
2448
|
var t = this.context[e];
|
|
2458
2449
|
if (t.token === "function") return t.generator;
|
|
2459
2450
|
}
|
|
2460
2451
|
return !1;
|
|
2461
|
-
},
|
|
2452
|
+
}, Wt.updateContext = function(e) {
|
|
2462
2453
|
var t, n = this.type;
|
|
2463
|
-
n.keyword && e ===
|
|
2464
|
-
},
|
|
2454
|
+
n.keyword && e === M.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr;
|
|
2455
|
+
}, Wt.overrideContext = function(e) {
|
|
2465
2456
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
2466
|
-
},
|
|
2457
|
+
}, M.parenR.updateContext = M.braceR.updateContext = function() {
|
|
2467
2458
|
if (this.context.length === 1) {
|
|
2468
2459
|
this.exprAllowed = !0;
|
|
2469
2460
|
return;
|
|
2470
2461
|
}
|
|
2471
2462
|
var e = this.context.pop();
|
|
2472
|
-
e ===
|
|
2473
|
-
},
|
|
2474
|
-
this.context.push(this.braceIsBlock(e) ?
|
|
2475
|
-
},
|
|
2476
|
-
this.context.push(
|
|
2477
|
-
},
|
|
2478
|
-
var t = e ===
|
|
2479
|
-
this.context.push(t ?
|
|
2480
|
-
},
|
|
2481
|
-
e.beforeExpr && e !==
|
|
2482
|
-
},
|
|
2463
|
+
e === V.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
2464
|
+
}, M.braceL.updateContext = function(e) {
|
|
2465
|
+
this.context.push(this.braceIsBlock(e) ? V.b_stat : V.b_expr), this.exprAllowed = !0;
|
|
2466
|
+
}, M.dollarBraceL.updateContext = function() {
|
|
2467
|
+
this.context.push(V.b_tmpl), this.exprAllowed = !0;
|
|
2468
|
+
}, M.parenL.updateContext = function(e) {
|
|
2469
|
+
var t = e === M._if || e === M._for || e === M._with || e === M._while;
|
|
2470
|
+
this.context.push(t ? V.p_stat : V.p_expr), this.exprAllowed = !0;
|
|
2471
|
+
}, M.incDec.updateContext = function() {}, M._function.updateContext = M._class.updateContext = function(e) {
|
|
2472
|
+
e.beforeExpr && e !== M._else && !(e === M.semi && this.curContext() !== V.p_stat) && !(e === M._return && N.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === M.colon || e === M.braceL) && this.curContext() === V.b_stat) ? this.context.push(V.f_expr) : this.context.push(V.f_stat), this.exprAllowed = !1;
|
|
2473
|
+
}, M.colon.updateContext = function() {
|
|
2483
2474
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
2484
|
-
},
|
|
2485
|
-
this.curContext() ===
|
|
2486
|
-
},
|
|
2487
|
-
if (e ===
|
|
2475
|
+
}, M.backQuote.updateContext = function() {
|
|
2476
|
+
this.curContext() === V.q_tmpl ? this.context.pop() : this.context.push(V.q_tmpl), this.exprAllowed = !1;
|
|
2477
|
+
}, M.star.updateContext = function(e) {
|
|
2478
|
+
if (e === M._function) {
|
|
2488
2479
|
var t = this.context.length - 1;
|
|
2489
|
-
this.context[t] ===
|
|
2480
|
+
this.context[t] === V.f_expr ? this.context[t] = V.f_expr_gen : this.context[t] = V.f_gen;
|
|
2490
2481
|
}
|
|
2491
2482
|
this.exprAllowed = !0;
|
|
2492
|
-
},
|
|
2483
|
+
}, M.name.updateContext = function(e) {
|
|
2493
2484
|
var t = !1;
|
|
2494
|
-
this.options.ecmaVersion >= 6 && e !==
|
|
2485
|
+
this.options.ecmaVersion >= 6 && e !== M.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
2495
2486
|
};
|
|
2496
|
-
var
|
|
2497
|
-
|
|
2487
|
+
var H = F.prototype;
|
|
2488
|
+
H.checkPropClash = function(e, t, n) {
|
|
2498
2489
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
2499
2490
|
var r = e.key, i;
|
|
2500
2491
|
switch (r.type) {
|
|
@@ -2519,62 +2510,62 @@ U.checkPropClash = function(e, t, n) {
|
|
|
2519
2510
|
set: !1
|
|
2520
2511
|
}, o[a] = !0;
|
|
2521
2512
|
}
|
|
2522
|
-
},
|
|
2513
|
+
}, H.parseExpression = function(e, t) {
|
|
2523
2514
|
var n = this.start, r = this.startLoc, i = this.parseMaybeAssign(e, t);
|
|
2524
|
-
if (this.type ===
|
|
2515
|
+
if (this.type === M.comma) {
|
|
2525
2516
|
var a = this.startNodeAt(n, r);
|
|
2526
|
-
for (a.expressions = [i]; this.eat(
|
|
2517
|
+
for (a.expressions = [i]; this.eat(M.comma);) a.expressions.push(this.parseMaybeAssign(e, t));
|
|
2527
2518
|
return this.finishNode(a, "SequenceExpression");
|
|
2528
2519
|
}
|
|
2529
2520
|
return i;
|
|
2530
|
-
},
|
|
2521
|
+
}, H.parseMaybeAssign = function(e, t, n) {
|
|
2531
2522
|
if (this.isContextual("yield")) {
|
|
2532
2523
|
if (this.inGenerator) return this.parseYield(e);
|
|
2533
2524
|
this.exprAllowed = !1;
|
|
2534
2525
|
}
|
|
2535
2526
|
var r = !1, i = -1, a = -1, o = -1;
|
|
2536
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
2527
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Ft(), r = !0);
|
|
2537
2528
|
var s = this.start, c = this.startLoc;
|
|
2538
|
-
(this.type ===
|
|
2529
|
+
(this.type === M.parenL || this.type === M.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
2539
2530
|
var l = this.parseMaybeConditional(e, t);
|
|
2540
2531
|
if (n && (l = n.call(this, l, s, c)), this.type.isAssign) {
|
|
2541
2532
|
var u = this.startNodeAt(s, c);
|
|
2542
|
-
return u.operator = this.value, this.type ===
|
|
2533
|
+
return u.operator = this.value, this.type === M.eq && (l = this.toAssignable(l, !1, t)), r || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= l.start && (t.shorthandAssign = -1), this.type === M.eq ? this.checkLValPattern(l) : this.checkLValSimple(l), u.left = l, this.next(), u.right = this.parseMaybeAssign(e), o > -1 && (t.doubleProto = o), this.finishNode(u, "AssignmentExpression");
|
|
2543
2534
|
} else r && this.checkExpressionErrors(t, !0);
|
|
2544
2535
|
return i > -1 && (t.parenthesizedAssign = i), a > -1 && (t.trailingComma = a), l;
|
|
2545
|
-
},
|
|
2536
|
+
}, H.parseMaybeConditional = function(e, t) {
|
|
2546
2537
|
var n = this.start, r = this.startLoc, i = this.parseExprOps(e, t);
|
|
2547
2538
|
if (this.checkExpressionErrors(t)) return i;
|
|
2548
|
-
if (this.eat(
|
|
2539
|
+
if (this.eat(M.question)) {
|
|
2549
2540
|
var a = this.startNodeAt(n, r);
|
|
2550
|
-
return a.test = i, a.consequent = this.parseMaybeAssign(), this.expect(
|
|
2541
|
+
return a.test = i, a.consequent = this.parseMaybeAssign(), this.expect(M.colon), a.alternate = this.parseMaybeAssign(e), this.finishNode(a, "ConditionalExpression");
|
|
2551
2542
|
}
|
|
2552
2543
|
return i;
|
|
2553
|
-
},
|
|
2544
|
+
}, H.parseExprOps = function(e, t) {
|
|
2554
2545
|
var n = this.start, r = this.startLoc, i = this.parseMaybeUnary(t, !1, !1, e);
|
|
2555
2546
|
return this.checkExpressionErrors(t) || i.start === n && i.type === "ArrowFunctionExpression" ? i : this.parseExprOp(i, n, r, -1, e);
|
|
2556
|
-
},
|
|
2547
|
+
}, H.parseExprOp = function(e, t, n, r, i) {
|
|
2557
2548
|
var a = this.type.binop;
|
|
2558
|
-
if (a != null && (!i || this.type !==
|
|
2559
|
-
var o = this.type ===
|
|
2560
|
-
s && (a =
|
|
2549
|
+
if (a != null && (!i || this.type !== M._in) && a > r) {
|
|
2550
|
+
var o = this.type === M.logicalOR || this.type === M.logicalAND, s = this.type === M.coalesce;
|
|
2551
|
+
s && (a = M.logicalAND.binop);
|
|
2561
2552
|
var c = this.value;
|
|
2562
2553
|
this.next();
|
|
2563
2554
|
var l = this.start, u = this.startLoc, d = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, i), l, u, a, i), f = this.buildBinary(t, n, e, d, c, o || s);
|
|
2564
|
-
return (o && this.type ===
|
|
2555
|
+
return (o && this.type === M.coalesce || s && (this.type === M.logicalOR || this.type === M.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(f, t, n, r, i);
|
|
2565
2556
|
}
|
|
2566
2557
|
return e;
|
|
2567
|
-
},
|
|
2558
|
+
}, H.buildBinary = function(e, t, n, r, i, a) {
|
|
2568
2559
|
r.type === "PrivateIdentifier" && this.raise(r.start, "Private identifier can only be left side of binary expression");
|
|
2569
2560
|
var o = this.startNodeAt(e, t);
|
|
2570
2561
|
return o.left = n, o.operator = i, o.right = r, this.finishNode(o, a ? "LogicalExpression" : "BinaryExpression");
|
|
2571
|
-
},
|
|
2562
|
+
}, H.parseMaybeUnary = function(e, t, n, r) {
|
|
2572
2563
|
var i = this.start, a = this.startLoc, o;
|
|
2573
2564
|
if (this.isContextual("await") && this.canAwait) o = this.parseAwait(r), t = !0;
|
|
2574
2565
|
else if (this.type.prefix) {
|
|
2575
|
-
var s = this.startNode(), c = this.type ===
|
|
2576
|
-
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" &&
|
|
2577
|
-
} else if (!t && this.type ===
|
|
2566
|
+
var s = this.startNode(), c = this.type === M.incDec;
|
|
2567
|
+
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" && Gt(s.argument) ? this.raiseRecoverable(s.start, "Deleting local variable in strict mode") : s.operator === "delete" && Kt(s.argument) ? this.raiseRecoverable(s.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(s, c ? "UpdateExpression" : "UnaryExpression");
|
|
2568
|
+
} else if (!t && this.type === M.privateId) (r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== M._in && this.unexpected();
|
|
2578
2569
|
else {
|
|
2579
2570
|
if (o = this.parseExprSubscripts(e, r), this.checkExpressionErrors(e)) return o;
|
|
2580
2571
|
for (; this.type.postfix && !this.canInsertSemicolon();) {
|
|
@@ -2582,22 +2573,22 @@ U.checkPropClash = function(e, t, n) {
|
|
|
2582
2573
|
l.operator = this.value, l.prefix = !1, l.argument = o, this.checkLValSimple(o), this.next(), o = this.finishNode(l, "UpdateExpression");
|
|
2583
2574
|
}
|
|
2584
2575
|
}
|
|
2585
|
-
if (!n && this.eat(
|
|
2576
|
+
if (!n && this.eat(M.starstar)) if (t) this.unexpected(this.lastTokStart);
|
|
2586
2577
|
else return this.buildBinary(i, a, o, this.parseMaybeUnary(null, !1, !1, r), "**", !1);
|
|
2587
2578
|
else return o;
|
|
2588
2579
|
};
|
|
2589
|
-
function
|
|
2590
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
2580
|
+
function Gt(e) {
|
|
2581
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Gt(e.expression);
|
|
2591
2582
|
}
|
|
2592
|
-
function
|
|
2593
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
2583
|
+
function Kt(e) {
|
|
2584
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Kt(e.expression) || e.type === "ParenthesizedExpression" && Kt(e.expression);
|
|
2594
2585
|
}
|
|
2595
|
-
|
|
2586
|
+
H.parseExprSubscripts = function(e, t) {
|
|
2596
2587
|
var n = this.start, r = this.startLoc, i = this.parseExprAtom(e, t);
|
|
2597
2588
|
if (i.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") return i;
|
|
2598
2589
|
var a = this.parseSubscripts(i, n, r, !1, t);
|
|
2599
2590
|
return e && a.type === "MemberExpression" && (e.parenthesizedAssign >= a.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= a.start && (e.parenthesizedBind = -1), e.trailingComma >= a.start && (e.trailingComma = -1)), a;
|
|
2600
|
-
},
|
|
2591
|
+
}, H.parseSubscripts = function(e, t, n, r, i) {
|
|
2601
2592
|
for (var a = this.options.ecmaVersion >= 8 && e.type === "Identifier" && e.name === "async" && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, o = !1;;) {
|
|
2602
2593
|
var s = this.parseSubscript(e, t, n, r, a, o, i);
|
|
2603
2594
|
if (s.optional && (o = !0), s === e || s.type === "ArrowFunctionExpression") {
|
|
@@ -2609,170 +2600,170 @@ U.parseExprSubscripts = function(e, t) {
|
|
|
2609
2600
|
}
|
|
2610
2601
|
e = s;
|
|
2611
2602
|
}
|
|
2612
|
-
},
|
|
2613
|
-
return !this.canInsertSemicolon() && this.eat(
|
|
2614
|
-
},
|
|
2603
|
+
}, H.shouldParseAsyncArrow = function() {
|
|
2604
|
+
return !this.canInsertSemicolon() && this.eat(M.arrow);
|
|
2605
|
+
}, H.parseSubscriptAsyncArrow = function(e, t, n, r) {
|
|
2615
2606
|
return this.parseArrowExpression(this.startNodeAt(e, t), n, !0, r);
|
|
2616
|
-
},
|
|
2617
|
-
var s = this.options.ecmaVersion >= 11, c = s && this.eat(
|
|
2607
|
+
}, H.parseSubscript = function(e, t, n, r, i, a, o) {
|
|
2608
|
+
var s = this.options.ecmaVersion >= 11, c = s && this.eat(M.questionDot);
|
|
2618
2609
|
r && c && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
2619
|
-
var l = this.eat(
|
|
2620
|
-
if (l || c && this.type !==
|
|
2610
|
+
var l = this.eat(M.bracketL);
|
|
2611
|
+
if (l || c && this.type !== M.parenL && this.type !== M.backQuote || this.eat(M.dot)) {
|
|
2621
2612
|
var u = this.startNodeAt(t, n);
|
|
2622
|
-
u.object = e, l ? (u.property = this.parseExpression(), this.expect(
|
|
2623
|
-
} else if (!r && this.eat(
|
|
2624
|
-
var d = new
|
|
2613
|
+
u.object = e, l ? (u.property = this.parseExpression(), this.expect(M.bracketR)) : this.type === M.privateId && e.type !== "Super" ? u.property = this.parsePrivateIdent() : u.property = this.parseIdent(this.options.allowReserved !== "never"), u.computed = !!l, s && (u.optional = c), e = this.finishNode(u, "MemberExpression");
|
|
2614
|
+
} else if (!r && this.eat(M.parenL)) {
|
|
2615
|
+
var d = new Ft(), f = this.yieldPos, p = this.awaitPos, m = this.awaitIdentPos;
|
|
2625
2616
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2626
|
-
var h = this.parseExprList(
|
|
2617
|
+
var h = this.parseExprList(M.parenR, this.options.ecmaVersion >= 8, !1, d);
|
|
2627
2618
|
if (i && !c && this.shouldParseAsyncArrow()) return this.checkPatternErrors(d, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = f, this.awaitPos = p, this.awaitIdentPos = m, this.parseSubscriptAsyncArrow(t, n, h, o);
|
|
2628
2619
|
this.checkExpressionErrors(d, !0), this.yieldPos = f || this.yieldPos, this.awaitPos = p || this.awaitPos, this.awaitIdentPos = m || this.awaitIdentPos;
|
|
2629
2620
|
var g = this.startNodeAt(t, n);
|
|
2630
2621
|
g.callee = e, g.arguments = h, s && (g.optional = c), e = this.finishNode(g, "CallExpression");
|
|
2631
|
-
} else if (this.type ===
|
|
2622
|
+
} else if (this.type === M.backQuote) {
|
|
2632
2623
|
(c || a) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
2633
2624
|
var ee = this.startNodeAt(t, n);
|
|
2634
2625
|
ee.tag = e, ee.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(ee, "TaggedTemplateExpression");
|
|
2635
2626
|
}
|
|
2636
2627
|
return e;
|
|
2637
|
-
},
|
|
2638
|
-
this.type ===
|
|
2628
|
+
}, H.parseExprAtom = function(e, t, n) {
|
|
2629
|
+
this.type === M.slash && this.readRegexp();
|
|
2639
2630
|
var r, i = this.potentialArrowAt === this.start;
|
|
2640
2631
|
switch (this.type) {
|
|
2641
|
-
case
|
|
2642
|
-
case
|
|
2643
|
-
case
|
|
2632
|
+
case M._super: return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), r = this.startNode(), this.next(), this.type === M.parenL && !this.allowDirectSuper && this.raise(r.start, "super() call outside constructor of a subclass"), this.type !== M.dot && this.type !== M.bracketL && this.type !== M.parenL && this.unexpected(), this.finishNode(r, "Super");
|
|
2633
|
+
case M._this: return r = this.startNode(), this.next(), this.finishNode(r, "ThisExpression");
|
|
2634
|
+
case M.name:
|
|
2644
2635
|
var a = this.start, o = this.startLoc, s = this.containsEsc, c = this.parseIdent(!1);
|
|
2645
|
-
if (this.options.ecmaVersion >= 8 && !s && c.name === "async" && !this.canInsertSemicolon() && this.eat(
|
|
2636
|
+
if (this.options.ecmaVersion >= 8 && !s && c.name === "async" && !this.canInsertSemicolon() && this.eat(M._function)) return this.overrideContext(V.f_expr), this.parseFunction(this.startNodeAt(a, o), 0, !1, !0, t);
|
|
2646
2637
|
if (i && !this.canInsertSemicolon()) {
|
|
2647
|
-
if (this.eat(
|
|
2648
|
-
if (this.options.ecmaVersion >= 8 && c.name === "async" && this.type ===
|
|
2638
|
+
if (this.eat(M.arrow)) return this.parseArrowExpression(this.startNodeAt(a, o), [c], !1, t);
|
|
2639
|
+
if (this.options.ecmaVersion >= 8 && c.name === "async" && this.type === M.name && !s && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return c = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(M.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(a, o), [c], !0, t);
|
|
2649
2640
|
}
|
|
2650
2641
|
return c;
|
|
2651
|
-
case
|
|
2642
|
+
case M.regexp:
|
|
2652
2643
|
var l = this.value;
|
|
2653
2644
|
return r = this.parseLiteral(l.value), r.regex = {
|
|
2654
2645
|
pattern: l.pattern,
|
|
2655
2646
|
flags: l.flags
|
|
2656
2647
|
}, r;
|
|
2657
|
-
case
|
|
2658
|
-
case
|
|
2659
|
-
case
|
|
2660
|
-
case
|
|
2661
|
-
case
|
|
2662
|
-
case
|
|
2648
|
+
case M.num:
|
|
2649
|
+
case M.string: return this.parseLiteral(this.value);
|
|
2650
|
+
case M._null:
|
|
2651
|
+
case M._true:
|
|
2652
|
+
case M._false: return r = this.startNode(), r.value = this.type === M._null ? null : this.type === M._true, r.raw = this.type.keyword, this.next(), this.finishNode(r, "Literal");
|
|
2653
|
+
case M.parenL:
|
|
2663
2654
|
var u = this.start, d = this.parseParenAndDistinguishExpression(i, t);
|
|
2664
2655
|
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(d) && (e.parenthesizedAssign = u), e.parenthesizedBind < 0 && (e.parenthesizedBind = u)), d;
|
|
2665
|
-
case
|
|
2666
|
-
case
|
|
2667
|
-
case
|
|
2668
|
-
case
|
|
2669
|
-
case
|
|
2670
|
-
case
|
|
2671
|
-
case
|
|
2656
|
+
case M.bracketL: return r = this.startNode(), this.next(), r.elements = this.parseExprList(M.bracketR, !0, !0, e), this.finishNode(r, "ArrayExpression");
|
|
2657
|
+
case M.braceL: return this.overrideContext(V.b_expr), this.parseObj(!1, e);
|
|
2658
|
+
case M._function: return r = this.startNode(), this.next(), this.parseFunction(r, 0);
|
|
2659
|
+
case M._class: return this.parseClass(this.startNode(), !1);
|
|
2660
|
+
case M._new: return this.parseNew();
|
|
2661
|
+
case M.backQuote: return this.parseTemplate();
|
|
2662
|
+
case M._import: return this.options.ecmaVersion >= 11 ? this.parseExprImport(n) : this.unexpected();
|
|
2672
2663
|
default: return this.parseExprAtomDefault();
|
|
2673
2664
|
}
|
|
2674
|
-
},
|
|
2665
|
+
}, H.parseExprAtomDefault = function() {
|
|
2675
2666
|
this.unexpected();
|
|
2676
|
-
},
|
|
2667
|
+
}, H.parseExprImport = function(e) {
|
|
2677
2668
|
var t = this.startNode();
|
|
2678
|
-
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type ===
|
|
2679
|
-
if (this.type ===
|
|
2669
|
+
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === M.parenL && !e) return this.parseDynamicImport(t);
|
|
2670
|
+
if (this.type === M.dot) {
|
|
2680
2671
|
var n = this.startNodeAt(t.start, t.loc && t.loc.start);
|
|
2681
2672
|
return n.name = "import", t.meta = this.finishNode(n, "Identifier"), this.parseImportMeta(t);
|
|
2682
2673
|
} else this.unexpected();
|
|
2683
|
-
},
|
|
2684
|
-
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(
|
|
2685
|
-
else if (!this.eat(
|
|
2674
|
+
}, H.parseDynamicImport = function(e) {
|
|
2675
|
+
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(M.parenR) ? e.options = null : (this.expect(M.comma), this.afterTrailingComma(M.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(M.parenR) || (this.expect(M.comma), this.afterTrailingComma(M.parenR) || this.unexpected())));
|
|
2676
|
+
else if (!this.eat(M.parenR)) {
|
|
2686
2677
|
var t = this.start;
|
|
2687
|
-
this.eat(
|
|
2678
|
+
this.eat(M.comma) && this.eat(M.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t);
|
|
2688
2679
|
}
|
|
2689
2680
|
return this.finishNode(e, "ImportExpression");
|
|
2690
|
-
},
|
|
2681
|
+
}, H.parseImportMeta = function(e) {
|
|
2691
2682
|
this.next();
|
|
2692
2683
|
var t = this.containsEsc;
|
|
2693
2684
|
return e.property = this.parseIdent(!0), e.property.name !== "meta" && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty");
|
|
2694
|
-
},
|
|
2685
|
+
}, H.parseLiteral = function(e) {
|
|
2695
2686
|
var t = this.startNode();
|
|
2696
2687
|
return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value == null ? t.raw.slice(0, -1).replace(/_/g, "") : t.value.toString()), this.next(), this.finishNode(t, "Literal");
|
|
2697
|
-
},
|
|
2698
|
-
this.expect(
|
|
2688
|
+
}, H.parseParenExpression = function() {
|
|
2689
|
+
this.expect(M.parenL);
|
|
2699
2690
|
var e = this.parseExpression();
|
|
2700
|
-
return this.expect(
|
|
2701
|
-
},
|
|
2691
|
+
return this.expect(M.parenR), e;
|
|
2692
|
+
}, H.shouldParseArrow = function(e) {
|
|
2702
2693
|
return !this.canInsertSemicolon();
|
|
2703
|
-
},
|
|
2694
|
+
}, H.parseParenAndDistinguishExpression = function(e, t) {
|
|
2704
2695
|
var n = this.start, r = this.startLoc, i, a = this.options.ecmaVersion >= 8;
|
|
2705
2696
|
if (this.options.ecmaVersion >= 6) {
|
|
2706
2697
|
this.next();
|
|
2707
|
-
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new
|
|
2708
|
-
for (this.yieldPos = 0, this.awaitPos = 0; this.type !==
|
|
2698
|
+
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new Ft(), f = this.yieldPos, p = this.awaitPos, m;
|
|
2699
|
+
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== M.parenR;) if (l ? l = !1 : this.expect(M.comma), a && this.afterTrailingComma(M.parenR, !0)) {
|
|
2709
2700
|
u = !0;
|
|
2710
2701
|
break;
|
|
2711
|
-
} else if (this.type ===
|
|
2712
|
-
m = this.start, c.push(this.parseParenItem(this.parseRestBinding())), this.type ===
|
|
2702
|
+
} else if (this.type === M.ellipsis) {
|
|
2703
|
+
m = this.start, c.push(this.parseParenItem(this.parseRestBinding())), this.type === M.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
|
|
2713
2704
|
break;
|
|
2714
2705
|
} else c.push(this.parseMaybeAssign(!1, d, this.parseParenItem));
|
|
2715
2706
|
var h = this.lastTokEnd, g = this.lastTokEndLoc;
|
|
2716
|
-
if (this.expect(
|
|
2707
|
+
if (this.expect(M.parenR), e && this.shouldParseArrow(c) && this.eat(M.arrow)) return this.checkPatternErrors(d, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = f, this.awaitPos = p, this.parseParenArrowList(n, r, c, t);
|
|
2717
2708
|
(!c.length || u) && this.unexpected(this.lastTokStart), m && this.unexpected(m), this.checkExpressionErrors(d, !0), this.yieldPos = f || this.yieldPos, this.awaitPos = p || this.awaitPos, c.length > 1 ? (i = this.startNodeAt(o, s), i.expressions = c, this.finishNodeAt(i, "SequenceExpression", h, g)) : i = c[0];
|
|
2718
2709
|
} else i = this.parseParenExpression();
|
|
2719
2710
|
if (this.options.preserveParens) {
|
|
2720
2711
|
var ee = this.startNodeAt(n, r);
|
|
2721
2712
|
return ee.expression = i, this.finishNode(ee, "ParenthesizedExpression");
|
|
2722
2713
|
} else return i;
|
|
2723
|
-
},
|
|
2714
|
+
}, H.parseParenItem = function(e) {
|
|
2724
2715
|
return e;
|
|
2725
|
-
},
|
|
2716
|
+
}, H.parseParenArrowList = function(e, t, n, r) {
|
|
2726
2717
|
return this.parseArrowExpression(this.startNodeAt(e, t), n, !1, r);
|
|
2727
2718
|
};
|
|
2728
|
-
var
|
|
2729
|
-
|
|
2719
|
+
var qt = [];
|
|
2720
|
+
H.parseNew = function() {
|
|
2730
2721
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2731
2722
|
var e = this.startNode();
|
|
2732
|
-
if (this.next(), this.options.ecmaVersion >= 6 && this.type ===
|
|
2723
|
+
if (this.next(), this.options.ecmaVersion >= 6 && this.type === M.dot) {
|
|
2733
2724
|
var t = this.startNodeAt(e.start, e.loc && e.loc.start);
|
|
2734
2725
|
t.name = "new", e.meta = this.finishNode(t, "Identifier"), this.next();
|
|
2735
2726
|
var n = this.containsEsc;
|
|
2736
2727
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), n && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
2737
2728
|
}
|
|
2738
2729
|
var r = this.start, i = this.startLoc;
|
|
2739
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), this.eat(
|
|
2740
|
-
},
|
|
2730
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), this.eat(M.parenL) ? e.arguments = this.parseExprList(M.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = qt, this.finishNode(e, "NewExpression");
|
|
2731
|
+
}, H.parseTemplateElement = function(e) {
|
|
2741
2732
|
var t = e.isTagged, n = this.startNode();
|
|
2742
|
-
return this.type ===
|
|
2733
|
+
return this.type === M.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), n.value = {
|
|
2743
2734
|
raw: this.value.replace(/\r\n?/g, "\n"),
|
|
2744
2735
|
cooked: null
|
|
2745
2736
|
}) : n.value = {
|
|
2746
2737
|
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
|
|
2747
2738
|
cooked: this.value
|
|
2748
|
-
}, this.next(), n.tail = this.type ===
|
|
2749
|
-
},
|
|
2739
|
+
}, this.next(), n.tail = this.type === M.backQuote, this.finishNode(n, "TemplateElement");
|
|
2740
|
+
}, H.parseTemplate = function(e) {
|
|
2750
2741
|
e === void 0 && (e = {});
|
|
2751
2742
|
var t = e.isTagged;
|
|
2752
2743
|
t === void 0 && (t = !1);
|
|
2753
2744
|
var n = this.startNode();
|
|
2754
2745
|
this.next(), n.expressions = [];
|
|
2755
2746
|
var r = this.parseTemplateElement({ isTagged: t });
|
|
2756
|
-
for (n.quasis = [r]; !r.tail;) this.type ===
|
|
2747
|
+
for (n.quasis = [r]; !r.tail;) this.type === M.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(M.dollarBraceL), n.expressions.push(this.parseExpression()), this.expect(M.braceR), n.quasis.push(r = this.parseTemplateElement({ isTagged: t }));
|
|
2757
2748
|
return this.next(), this.finishNode(n, "TemplateLiteral");
|
|
2758
|
-
},
|
|
2759
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type ===
|
|
2760
|
-
},
|
|
2749
|
+
}, H.isAsyncProp = function(e) {
|
|
2750
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === M.name || this.type === M.num || this.type === M.string || this.type === M.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === M.star) && !N.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2751
|
+
}, H.parseObj = function(e, t) {
|
|
2761
2752
|
var n = this.startNode(), r = !0, i = {};
|
|
2762
|
-
for (n.properties = [], this.next(); !this.eat(
|
|
2753
|
+
for (n.properties = [], this.next(); !this.eat(M.braceR);) {
|
|
2763
2754
|
if (r) r = !1;
|
|
2764
|
-
else if (this.expect(
|
|
2755
|
+
else if (this.expect(M.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(M.braceR)) break;
|
|
2765
2756
|
var a = this.parseProperty(e, t);
|
|
2766
2757
|
e || this.checkPropClash(a, i, t), n.properties.push(a);
|
|
2767
2758
|
}
|
|
2768
2759
|
return this.finishNode(n, e ? "ObjectPattern" : "ObjectExpression");
|
|
2769
|
-
},
|
|
2760
|
+
}, H.parseProperty = function(e, t) {
|
|
2770
2761
|
var n = this.startNode(), r, i, a, o;
|
|
2771
|
-
if (this.options.ecmaVersion >= 9 && this.eat(
|
|
2772
|
-
this.options.ecmaVersion >= 6 && (n.method = !1, n.shorthand = !1, (e || t) && (a = this.start, o = this.startLoc), e || (r = this.eat(
|
|
2762
|
+
if (this.options.ecmaVersion >= 9 && this.eat(M.ellipsis)) return e ? (n.argument = this.parseIdent(!1), this.type === M.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(n, "RestElement")) : (n.argument = this.parseMaybeAssign(!1, t), this.type === M.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(n, "SpreadElement"));
|
|
2763
|
+
this.options.ecmaVersion >= 6 && (n.method = !1, n.shorthand = !1, (e || t) && (a = this.start, o = this.startLoc), e || (r = this.eat(M.star)));
|
|
2773
2764
|
var s = this.containsEsc;
|
|
2774
|
-
return this.parsePropertyName(n), !e && !s && this.options.ecmaVersion >= 8 && !r && this.isAsyncProp(n) ? (i = !0, r = this.options.ecmaVersion >= 9 && this.eat(
|
|
2775
|
-
},
|
|
2765
|
+
return this.parsePropertyName(n), !e && !s && this.options.ecmaVersion >= 8 && !r && this.isAsyncProp(n) ? (i = !0, r = this.options.ecmaVersion >= 9 && this.eat(M.star), this.parsePropertyName(n)) : i = !1, this.parsePropertyValue(n, e, r, i, a, o, t, s), this.finishNode(n, "Property");
|
|
2766
|
+
}, H.parseGetterSetter = function(e) {
|
|
2776
2767
|
var t = e.key.name;
|
|
2777
2768
|
this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
|
|
2778
2769
|
var n = e.kind === "get" ? 0 : 1;
|
|
@@ -2780,202 +2771,202 @@ U.parseNew = function() {
|
|
|
2780
2771
|
var r = e.value.start;
|
|
2781
2772
|
e.kind === "get" ? this.raiseRecoverable(r, "getter should have no params") : this.raiseRecoverable(r, "setter should have exactly one param");
|
|
2782
2773
|
} else e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
2783
|
-
},
|
|
2784
|
-
(n || r) && this.type ===
|
|
2785
|
-
},
|
|
2774
|
+
}, H.parsePropertyValue = function(e, t, n, r, i, a, o, s) {
|
|
2775
|
+
(n || r) && this.type === M.colon && this.unexpected(), this.eat(M.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, o), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === M.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(n, r), e.kind = "init") : !t && !s && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== M.comma && this.type !== M.braceR && this.type !== M.eq ? ((n || r) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((n || r) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = i), t ? e.value = this.parseMaybeDefault(i, a, this.copyNode(e.key)) : this.type === M.eq && o ? (o.shorthandAssign < 0 && (o.shorthandAssign = this.start), e.value = this.parseMaybeDefault(i, a, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected();
|
|
2776
|
+
}, H.parsePropertyName = function(e) {
|
|
2786
2777
|
if (this.options.ecmaVersion >= 6) {
|
|
2787
|
-
if (this.eat(
|
|
2778
|
+
if (this.eat(M.bracketL)) return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(M.bracketR), e.key;
|
|
2788
2779
|
e.computed = !1;
|
|
2789
2780
|
}
|
|
2790
|
-
return e.key = this.type ===
|
|
2791
|
-
},
|
|
2781
|
+
return e.key = this.type === M.num || this.type === M.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
2782
|
+
}, H.initFunction = function(e) {
|
|
2792
2783
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
2793
|
-
},
|
|
2784
|
+
}, H.parseMethod = function(e, t, n) {
|
|
2794
2785
|
var r = this.startNode(), i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2795
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2796
|
-
},
|
|
2786
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Dt(t, r.generator) | xt | (n ? St : 0)), this.expect(M.parenL), r.params = this.parseBindingList(M.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(r, "FunctionExpression");
|
|
2787
|
+
}, H.parseArrowExpression = function(e, t, n, r) {
|
|
2797
2788
|
var i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2798
|
-
return this.enterScope(
|
|
2799
|
-
},
|
|
2800
|
-
var i = t && this.type !==
|
|
2789
|
+
return this.enterScope(Dt(n, !1) | yt), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
|
|
2790
|
+
}, H.parseFunctionBody = function(e, t, n, r) {
|
|
2791
|
+
var i = t && this.type !== M.braceL, a = this.strict, o = !1;
|
|
2801
2792
|
if (i) e.body = this.parseMaybeAssign(r), e.expression = !0, this.checkParams(e, !1);
|
|
2802
2793
|
else {
|
|
2803
2794
|
var s = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2804
2795
|
(!a || s) && (o = this.strictDirective(this.end), o && s && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
2805
2796
|
var c = this.labels;
|
|
2806
|
-
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
2797
|
+
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Nt), e.body = this.parseBlock(!1, void 0, o && !a), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = c;
|
|
2807
2798
|
}
|
|
2808
2799
|
this.exitScope();
|
|
2809
|
-
},
|
|
2800
|
+
}, H.isSimpleParamList = function(e) {
|
|
2810
2801
|
for (var t = 0, n = e; t < n.length; t += 1) if (n[t].type !== "Identifier") return !1;
|
|
2811
2802
|
return !0;
|
|
2812
|
-
},
|
|
2803
|
+
}, H.checkParams = function(e, t) {
|
|
2813
2804
|
for (var n = Object.create(null), r = 0, i = e.params; r < i.length; r += 1) {
|
|
2814
2805
|
var a = i[r];
|
|
2815
|
-
this.checkLValInnerPattern(a,
|
|
2806
|
+
this.checkLValInnerPattern(a, kt, t ? null : n);
|
|
2816
2807
|
}
|
|
2817
|
-
},
|
|
2808
|
+
}, H.parseExprList = function(e, t, n, r) {
|
|
2818
2809
|
for (var i = [], a = !0; !this.eat(e);) {
|
|
2819
2810
|
if (a) a = !1;
|
|
2820
|
-
else if (this.expect(
|
|
2811
|
+
else if (this.expect(M.comma), t && this.afterTrailingComma(e)) break;
|
|
2821
2812
|
var o = void 0;
|
|
2822
|
-
n && this.type ===
|
|
2813
|
+
n && this.type === M.comma ? o = null : this.type === M.ellipsis ? (o = this.parseSpread(r), r && this.type === M.comma && r.trailingComma < 0 && (r.trailingComma = this.start)) : o = this.parseMaybeAssign(!1, r), i.push(o);
|
|
2823
2814
|
}
|
|
2824
2815
|
return i;
|
|
2825
|
-
},
|
|
2816
|
+
}, H.checkUnreserved = function(e) {
|
|
2826
2817
|
var t = e.start, n = e.end, r = e.name;
|
|
2827
|
-
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
2828
|
-
},
|
|
2818
|
+
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Et) && r === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (r === "arguments" || r === "await") && this.raise(t, "Cannot use " + r + " in class static initialization block"), this.keywords.test(r) && this.raise(t, "Unexpected keyword '" + r + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, n).indexOf("\\") !== -1) && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(r) && (!this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + r + "' is reserved"));
|
|
2819
|
+
}, H.parseIdent = function(e) {
|
|
2829
2820
|
var t = this.parseIdentNode();
|
|
2830
2821
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
2831
|
-
},
|
|
2822
|
+
}, H.parseIdentNode = function() {
|
|
2832
2823
|
var e = this.startNode();
|
|
2833
|
-
return this.type ===
|
|
2834
|
-
},
|
|
2824
|
+
return this.type === M.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = M.name) : this.unexpected(), e;
|
|
2825
|
+
}, H.parsePrivateIdent = function() {
|
|
2835
2826
|
var e = this.startNode();
|
|
2836
|
-
return this.type ===
|
|
2837
|
-
},
|
|
2827
|
+
return this.type === M.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
|
|
2828
|
+
}, H.parseYield = function(e) {
|
|
2838
2829
|
this.yieldPos ||= this.start;
|
|
2839
2830
|
var t = this.startNode();
|
|
2840
|
-
return this.next(), this.type ===
|
|
2841
|
-
},
|
|
2831
|
+
return this.next(), this.type === M.semi || this.canInsertSemicolon() || this.type !== M.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(M.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
2832
|
+
}, H.parseAwait = function(e) {
|
|
2842
2833
|
this.awaitPos ||= this.start;
|
|
2843
2834
|
var t = this.startNode();
|
|
2844
2835
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2845
2836
|
};
|
|
2846
|
-
var
|
|
2847
|
-
|
|
2848
|
-
var n =
|
|
2837
|
+
var Jt = F.prototype;
|
|
2838
|
+
Jt.raise = function(e, t) {
|
|
2839
|
+
var n = ut(this.input, e);
|
|
2849
2840
|
t += " (" + n.line + ":" + n.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2850
2841
|
var r = SyntaxError(t);
|
|
2851
2842
|
throw r.pos = e, r.loc = n, r.raisedAt = this.pos, r;
|
|
2852
|
-
},
|
|
2853
|
-
if (this.options.locations) return new
|
|
2843
|
+
}, Jt.raiseRecoverable = Jt.raise, Jt.curPosition = function() {
|
|
2844
|
+
if (this.options.locations) return new ct(this.curLine, this.pos - this.lineStart);
|
|
2854
2845
|
};
|
|
2855
|
-
var
|
|
2846
|
+
var Yt = F.prototype, Xt = function(e) {
|
|
2856
2847
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
2857
2848
|
};
|
|
2858
|
-
|
|
2859
|
-
this.scopeStack.push(new
|
|
2860
|
-
},
|
|
2849
|
+
Yt.enterScope = function(e) {
|
|
2850
|
+
this.scopeStack.push(new Xt(e));
|
|
2851
|
+
}, Yt.exitScope = function() {
|
|
2861
2852
|
this.scopeStack.pop();
|
|
2862
|
-
},
|
|
2863
|
-
return e.flags &
|
|
2864
|
-
},
|
|
2853
|
+
}, Yt.treatFunctionsAsVarInScope = function(e) {
|
|
2854
|
+
return e.flags & gt || !this.inModule && e.flags & ht;
|
|
2855
|
+
}, Yt.declareName = function(e, t, n) {
|
|
2865
2856
|
var r = !1;
|
|
2866
|
-
if (t ===
|
|
2857
|
+
if (t === At) {
|
|
2867
2858
|
var i = this.currentScope();
|
|
2868
|
-
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags &
|
|
2869
|
-
} else if (t ===
|
|
2870
|
-
else if (t ===
|
|
2859
|
+
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags & ht && delete this.undefinedExports[e];
|
|
2860
|
+
} else if (t === Mt) this.currentScope().lexical.push(e);
|
|
2861
|
+
else if (t === jt) {
|
|
2871
2862
|
var a = this.currentScope();
|
|
2872
2863
|
r = this.treatFunctionsAsVar ? a.lexical.indexOf(e) > -1 : a.lexical.indexOf(e) > -1 || a.var.indexOf(e) > -1, a.functions.push(e);
|
|
2873
2864
|
} else for (var o = this.scopeStack.length - 1; o >= 0; --o) {
|
|
2874
2865
|
var s = this.scopeStack[o];
|
|
2875
|
-
if (s.lexical.indexOf(e) > -1 && !(s.flags &
|
|
2866
|
+
if (s.lexical.indexOf(e) > -1 && !(s.flags & bt && s.lexical[0] === e) || !this.treatFunctionsAsVarInScope(s) && s.functions.indexOf(e) > -1) {
|
|
2876
2867
|
r = !0;
|
|
2877
2868
|
break;
|
|
2878
2869
|
}
|
|
2879
|
-
if (s.var.push(e), this.inModule && s.flags &
|
|
2870
|
+
if (s.var.push(e), this.inModule && s.flags & ht && delete this.undefinedExports[e], s.flags & Et) break;
|
|
2880
2871
|
}
|
|
2881
2872
|
r && this.raiseRecoverable(n, "Identifier '" + e + "' has already been declared");
|
|
2882
|
-
},
|
|
2873
|
+
}, Yt.checkLocalExport = function(e) {
|
|
2883
2874
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
2884
|
-
},
|
|
2875
|
+
}, Yt.currentScope = function() {
|
|
2885
2876
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
2886
|
-
},
|
|
2877
|
+
}, Yt.currentVarScope = function() {
|
|
2887
2878
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2888
2879
|
var t = this.scopeStack[e];
|
|
2889
|
-
if (t.flags & (
|
|
2880
|
+
if (t.flags & (Et | wt | Ct)) return t;
|
|
2890
2881
|
}
|
|
2891
|
-
},
|
|
2882
|
+
}, Yt.currentThisScope = function() {
|
|
2892
2883
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2893
2884
|
var t = this.scopeStack[e];
|
|
2894
|
-
if (t.flags & (
|
|
2885
|
+
if (t.flags & (Et | wt | Ct) && !(t.flags & yt)) return t;
|
|
2895
2886
|
}
|
|
2896
2887
|
};
|
|
2897
|
-
var
|
|
2898
|
-
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
return new
|
|
2902
|
-
},
|
|
2903
|
-
return new
|
|
2888
|
+
var Zt = function(e, t, n) {
|
|
2889
|
+
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new lt(e, n)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [t, 0]);
|
|
2890
|
+
}, Qt = F.prototype;
|
|
2891
|
+
Qt.startNode = function() {
|
|
2892
|
+
return new Zt(this, this.start, this.startLoc);
|
|
2893
|
+
}, Qt.startNodeAt = function(e, t) {
|
|
2894
|
+
return new Zt(this, e, t);
|
|
2904
2895
|
};
|
|
2905
|
-
function
|
|
2896
|
+
function $t(e, t, n, r) {
|
|
2906
2897
|
return e.type = t, e.end = n, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = n), e;
|
|
2907
2898
|
}
|
|
2908
|
-
|
|
2909
|
-
return
|
|
2910
|
-
},
|
|
2911
|
-
return
|
|
2912
|
-
},
|
|
2913
|
-
var t = new
|
|
2899
|
+
Qt.finishNode = function(e, t) {
|
|
2900
|
+
return $t.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2901
|
+
}, Qt.finishNodeAt = function(e, t, n, r) {
|
|
2902
|
+
return $t.call(this, e, t, n, r);
|
|
2903
|
+
}, Qt.copyNode = function(e) {
|
|
2904
|
+
var t = new Zt(this, e.start, this.startLoc);
|
|
2914
2905
|
for (var n in e) t[n] = e[n];
|
|
2915
2906
|
return t;
|
|
2916
2907
|
};
|
|
2917
|
-
var
|
|
2918
|
-
9:
|
|
2919
|
-
10:
|
|
2920
|
-
11:
|
|
2921
|
-
12:
|
|
2922
|
-
13:
|
|
2923
|
-
14:
|
|
2924
|
-
},
|
|
2908
|
+
var en = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", tn = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", nn = tn + " Extended_Pictographic", rn = nn, an = rn + " EBase EComp EMod EPres ExtPict", on = an, sn = {
|
|
2909
|
+
9: tn,
|
|
2910
|
+
10: nn,
|
|
2911
|
+
11: rn,
|
|
2912
|
+
12: an,
|
|
2913
|
+
13: on,
|
|
2914
|
+
14: on
|
|
2915
|
+
}, cn = {
|
|
2925
2916
|
9: "",
|
|
2926
2917
|
10: "",
|
|
2927
2918
|
11: "",
|
|
2928
2919
|
12: "",
|
|
2929
2920
|
13: "",
|
|
2930
|
-
14:
|
|
2931
|
-
}, ln = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", un = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", dn = un + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", fn = dn + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", pn = fn + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", mn = pn + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", hn =
|
|
2921
|
+
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
2922
|
+
}, ln = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", un = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", dn = un + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", fn = dn + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", pn = fn + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", mn = pn + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", hn = {
|
|
2932
2923
|
9: un,
|
|
2933
2924
|
10: dn,
|
|
2934
2925
|
11: fn,
|
|
2935
2926
|
12: pn,
|
|
2936
2927
|
13: mn,
|
|
2937
|
-
14:
|
|
2938
|
-
},
|
|
2939
|
-
function
|
|
2940
|
-
var t =
|
|
2941
|
-
binary:
|
|
2942
|
-
binaryOfStrings:
|
|
2928
|
+
14: mn + " " + en
|
|
2929
|
+
}, gn = {};
|
|
2930
|
+
function _n(e) {
|
|
2931
|
+
var t = gn[e] = {
|
|
2932
|
+
binary: at(sn[e] + " " + ln),
|
|
2933
|
+
binaryOfStrings: at(cn[e]),
|
|
2943
2934
|
nonBinary: {
|
|
2944
|
-
General_Category:
|
|
2945
|
-
Script:
|
|
2935
|
+
General_Category: at(ln),
|
|
2936
|
+
Script: at(hn[e])
|
|
2946
2937
|
}
|
|
2947
2938
|
};
|
|
2948
2939
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
2949
2940
|
}
|
|
2950
|
-
for (var
|
|
2941
|
+
for (var vn = 0, yn = [
|
|
2951
2942
|
9,
|
|
2952
2943
|
10,
|
|
2953
2944
|
11,
|
|
2954
2945
|
12,
|
|
2955
2946
|
13,
|
|
2956
2947
|
14
|
|
2957
|
-
];
|
|
2958
|
-
var
|
|
2959
|
-
|
|
2948
|
+
]; vn < yn.length; vn += 1) {
|
|
2949
|
+
var bn = yn[vn];
|
|
2950
|
+
_n(bn);
|
|
2960
2951
|
}
|
|
2961
|
-
var
|
|
2952
|
+
var U = F.prototype, xn = function(e, t) {
|
|
2962
2953
|
this.parent = e, this.base = t || this;
|
|
2963
2954
|
};
|
|
2964
|
-
|
|
2955
|
+
xn.prototype.separatedFrom = function(e) {
|
|
2965
2956
|
for (var t = this; t; t = t.parent) for (var n = e; n; n = n.parent) if (t.base === n.base && t !== n) return !0;
|
|
2966
2957
|
return !1;
|
|
2967
|
-
},
|
|
2968
|
-
return new
|
|
2958
|
+
}, xn.prototype.sibling = function() {
|
|
2959
|
+
return new xn(this.parent, this.base);
|
|
2969
2960
|
};
|
|
2970
|
-
var
|
|
2971
|
-
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
2961
|
+
var W = function(e) {
|
|
2962
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = gn[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2972
2963
|
};
|
|
2973
|
-
|
|
2964
|
+
W.prototype.reset = function(e, t, n) {
|
|
2974
2965
|
var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
|
|
2975
2966
|
this.start = e | 0, this.source = t + "", this.flags = n, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = i && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = i && this.parser.options.ecmaVersion >= 9);
|
|
2976
|
-
},
|
|
2967
|
+
}, W.prototype.raise = function(e) {
|
|
2977
2968
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
2978
|
-
},
|
|
2969
|
+
}, W.prototype.at = function(e, t) {
|
|
2979
2970
|
t === void 0 && (t = !1);
|
|
2980
2971
|
var n = this.source, r = n.length;
|
|
2981
2972
|
if (e >= r) return -1;
|
|
@@ -2983,21 +2974,21 @@ Cn.prototype.reset = function(e, t, n) {
|
|
|
2983
2974
|
if (!(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r) return i;
|
|
2984
2975
|
var a = n.charCodeAt(e + 1);
|
|
2985
2976
|
return a >= 56320 && a <= 57343 ? (i << 10) + a - 56613888 : i;
|
|
2986
|
-
},
|
|
2977
|
+
}, W.prototype.nextIndex = function(e, t) {
|
|
2987
2978
|
t === void 0 && (t = !1);
|
|
2988
2979
|
var n = this.source, r = n.length;
|
|
2989
2980
|
if (e >= r) return r;
|
|
2990
2981
|
var i = n.charCodeAt(e), a;
|
|
2991
2982
|
return !(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r || (a = n.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
|
|
2992
|
-
},
|
|
2983
|
+
}, W.prototype.current = function(e) {
|
|
2993
2984
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
2994
|
-
},
|
|
2985
|
+
}, W.prototype.lookahead = function(e) {
|
|
2995
2986
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
2996
|
-
},
|
|
2987
|
+
}, W.prototype.advance = function(e) {
|
|
2997
2988
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
2998
|
-
},
|
|
2989
|
+
}, W.prototype.eat = function(e, t) {
|
|
2999
2990
|
return t === void 0 && (t = !1), this.current(t) === e ? (this.advance(t), !0) : !1;
|
|
3000
|
-
},
|
|
2991
|
+
}, W.prototype.eatChars = function(e, t) {
|
|
3001
2992
|
t === void 0 && (t = !1);
|
|
3002
2993
|
for (var n = this.pos, r = 0, i = e; r < i.length; r += 1) {
|
|
3003
2994
|
var a = i[r], o = this.at(n, t);
|
|
@@ -3005,34 +2996,34 @@ Cn.prototype.reset = function(e, t, n) {
|
|
|
3005
2996
|
n = this.nextIndex(n, t);
|
|
3006
2997
|
}
|
|
3007
2998
|
return this.pos = n, !0;
|
|
3008
|
-
},
|
|
2999
|
+
}, U.validateRegExpFlags = function(e) {
|
|
3009
3000
|
for (var t = e.validFlags, n = e.flags, r = !1, i = !1, a = 0; a < n.length; a++) {
|
|
3010
3001
|
var o = n.charAt(a);
|
|
3011
3002
|
t.indexOf(o) === -1 && this.raise(e.start, "Invalid regular expression flag"), n.indexOf(o, a + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), o === "u" && (r = !0), o === "v" && (i = !0);
|
|
3012
3003
|
}
|
|
3013
3004
|
this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
|
|
3014
3005
|
};
|
|
3015
|
-
function
|
|
3006
|
+
function Sn(e) {
|
|
3016
3007
|
for (var t in e) return !0;
|
|
3017
3008
|
return !1;
|
|
3018
3009
|
}
|
|
3019
|
-
|
|
3020
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
3021
|
-
},
|
|
3010
|
+
U.validateRegExpPattern = function(e) {
|
|
3011
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Sn(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
3012
|
+
}, U.regexp_pattern = function(e) {
|
|
3022
3013
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
3023
3014
|
for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
|
|
3024
3015
|
var r = n[t];
|
|
3025
3016
|
e.groupNames[r] || e.raise("Invalid named capture referenced");
|
|
3026
3017
|
}
|
|
3027
|
-
},
|
|
3018
|
+
}, U.regexp_disjunction = function(e) {
|
|
3028
3019
|
var t = this.options.ecmaVersion >= 16;
|
|
3029
|
-
for (t && (e.branchID = new
|
|
3020
|
+
for (t && (e.branchID = new xn(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
|
|
3030
3021
|
t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
|
|
3031
|
-
},
|
|
3022
|
+
}, U.regexp_alternative = function(e) {
|
|
3032
3023
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e););
|
|
3033
|
-
},
|
|
3024
|
+
}, U.regexp_eatTerm = function(e) {
|
|
3034
3025
|
return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), !0) : (e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) ? (this.regexp_eatQuantifier(e), !0) : !1;
|
|
3035
|
-
},
|
|
3026
|
+
}, U.regexp_eatAssertion = function(e) {
|
|
3036
3027
|
var t = e.pos;
|
|
3037
3028
|
if (e.lastAssertionIsQuantifiable = !1, e.eat(94) || e.eat(36)) return !0;
|
|
3038
3029
|
if (e.eat(92)) {
|
|
@@ -3044,11 +3035,11 @@ W.validateRegExpPattern = function(e) {
|
|
|
3044
3035
|
if (this.options.ecmaVersion >= 9 && (n = e.eat(60)), e.eat(61) || e.eat(33)) return this.regexp_disjunction(e), e.eat(41) || e.raise("Unterminated group"), e.lastAssertionIsQuantifiable = !n, !0;
|
|
3045
3036
|
}
|
|
3046
3037
|
return e.pos = t, !1;
|
|
3047
|
-
},
|
|
3038
|
+
}, U.regexp_eatQuantifier = function(e, t) {
|
|
3048
3039
|
return t === void 0 && (t = !1), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(63), !0) : !1;
|
|
3049
|
-
},
|
|
3040
|
+
}, U.regexp_eatQuantifierPrefix = function(e, t) {
|
|
3050
3041
|
return e.eat(42) || e.eat(43) || e.eat(63) || this.regexp_eatBracedQuantifier(e, t);
|
|
3051
|
-
},
|
|
3042
|
+
}, U.regexp_eatBracedQuantifier = function(e, t) {
|
|
3052
3043
|
var n = e.pos;
|
|
3053
3044
|
if (e.eat(123)) {
|
|
3054
3045
|
var r = 0, i = -1;
|
|
@@ -3056,16 +3047,16 @@ W.validateRegExpPattern = function(e) {
|
|
|
3056
3047
|
e.switchU && !t && e.raise("Incomplete quantifier"), e.pos = n;
|
|
3057
3048
|
}
|
|
3058
3049
|
return !1;
|
|
3059
|
-
},
|
|
3050
|
+
}, U.regexp_eatAtom = function(e) {
|
|
3060
3051
|
return this.regexp_eatPatternCharacters(e) || e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
|
|
3061
|
-
},
|
|
3052
|
+
}, U.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
3062
3053
|
var t = e.pos;
|
|
3063
3054
|
if (e.eat(92)) {
|
|
3064
3055
|
if (this.regexp_eatAtomEscape(e)) return !0;
|
|
3065
3056
|
e.pos = t;
|
|
3066
3057
|
}
|
|
3067
3058
|
return !1;
|
|
3068
|
-
},
|
|
3059
|
+
}, U.regexp_eatUncapturingGroup = function(e) {
|
|
3069
3060
|
var t = e.pos;
|
|
3070
3061
|
if (e.eat(40)) {
|
|
3071
3062
|
if (e.eat(63)) {
|
|
@@ -3094,37 +3085,37 @@ W.validateRegExpPattern = function(e) {
|
|
|
3094
3085
|
e.pos = t;
|
|
3095
3086
|
}
|
|
3096
3087
|
return !1;
|
|
3097
|
-
},
|
|
3088
|
+
}, U.regexp_eatCapturingGroup = function(e) {
|
|
3098
3089
|
if (e.eat(40)) {
|
|
3099
3090
|
if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e) : e.current() === 63 && e.raise("Invalid group"), this.regexp_disjunction(e), e.eat(41)) return e.numCapturingParens += 1, !0;
|
|
3100
3091
|
e.raise("Unterminated group");
|
|
3101
3092
|
}
|
|
3102
3093
|
return !1;
|
|
3103
|
-
},
|
|
3104
|
-
for (var t = "", n = 0; (n = e.current()) !== -1 &&
|
|
3094
|
+
}, U.regexp_eatModifiers = function(e) {
|
|
3095
|
+
for (var t = "", n = 0; (n = e.current()) !== -1 && Cn(n);) t += ot(n), e.advance();
|
|
3105
3096
|
return t;
|
|
3106
3097
|
};
|
|
3107
|
-
function
|
|
3098
|
+
function Cn(e) {
|
|
3108
3099
|
return e === 105 || e === 109 || e === 115;
|
|
3109
3100
|
}
|
|
3110
|
-
|
|
3101
|
+
U.regexp_eatExtendedAtom = function(e) {
|
|
3111
3102
|
return e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
|
|
3112
|
-
},
|
|
3103
|
+
}, U.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
3113
3104
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
3114
|
-
},
|
|
3105
|
+
}, U.regexp_eatSyntaxCharacter = function(e) {
|
|
3115
3106
|
var t = e.current();
|
|
3116
|
-
return
|
|
3107
|
+
return wn(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3117
3108
|
};
|
|
3118
|
-
function
|
|
3109
|
+
function wn(e) {
|
|
3119
3110
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
3120
3111
|
}
|
|
3121
|
-
|
|
3122
|
-
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !
|
|
3112
|
+
U.regexp_eatPatternCharacters = function(e) {
|
|
3113
|
+
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !wn(n);) e.advance();
|
|
3123
3114
|
return e.pos !== t;
|
|
3124
|
-
},
|
|
3115
|
+
}, U.regexp_eatExtendedPatternCharacter = function(e) {
|
|
3125
3116
|
var t = e.current();
|
|
3126
3117
|
return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 ? (e.advance(), !0) : !1;
|
|
3127
|
-
},
|
|
3118
|
+
}, U.regexp_groupSpecifier = function(e) {
|
|
3128
3119
|
if (e.eat(63)) {
|
|
3129
3120
|
this.regexp_eatGroupName(e) || e.raise("Invalid group");
|
|
3130
3121
|
var t = this.options.ecmaVersion >= 16, n = e.groupNames[e.lastStringValue];
|
|
@@ -3132,35 +3123,35 @@ W.regexp_eatPatternCharacters = function(e) {
|
|
|
3132
3123
|
else e.raise("Duplicate capture group name");
|
|
3133
3124
|
t ? (n || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0;
|
|
3134
3125
|
}
|
|
3135
|
-
},
|
|
3126
|
+
}, U.regexp_eatGroupName = function(e) {
|
|
3136
3127
|
if (e.lastStringValue = "", e.eat(60)) {
|
|
3137
3128
|
if (this.regexp_eatRegExpIdentifierName(e) && e.eat(62)) return !0;
|
|
3138
3129
|
e.raise("Invalid capture group name");
|
|
3139
3130
|
}
|
|
3140
3131
|
return !1;
|
|
3141
|
-
},
|
|
3132
|
+
}, U.regexp_eatRegExpIdentifierName = function(e) {
|
|
3142
3133
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
3143
|
-
for (e.lastStringValue +=
|
|
3134
|
+
for (e.lastStringValue += ot(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += ot(e.lastIntValue);
|
|
3144
3135
|
return !0;
|
|
3145
3136
|
}
|
|
3146
3137
|
return !1;
|
|
3147
|
-
},
|
|
3138
|
+
}, U.regexp_eatRegExpIdentifierStart = function(e) {
|
|
3148
3139
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
3149
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
3140
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Tn(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
3150
3141
|
};
|
|
3151
|
-
function
|
|
3152
|
-
return
|
|
3142
|
+
function Tn(e) {
|
|
3143
|
+
return E(e, !0) || e === 36 || e === 95;
|
|
3153
3144
|
}
|
|
3154
|
-
|
|
3145
|
+
U.regexp_eatRegExpIdentifierPart = function(e) {
|
|
3155
3146
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
3156
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
3147
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), En(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
3157
3148
|
};
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3149
|
+
function En(e) {
|
|
3150
|
+
return qe(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
3160
3151
|
}
|
|
3161
|
-
|
|
3152
|
+
U.regexp_eatAtomEscape = function(e) {
|
|
3162
3153
|
return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
|
|
3163
|
-
},
|
|
3154
|
+
}, U.regexp_eatBackReference = function(e) {
|
|
3164
3155
|
var t = e.pos;
|
|
3165
3156
|
if (this.regexp_eatDecimalEscape(e)) {
|
|
3166
3157
|
var n = e.lastIntValue;
|
|
@@ -3169,34 +3160,34 @@ W.regexp_eatAtomEscape = function(e) {
|
|
|
3169
3160
|
e.pos = t;
|
|
3170
3161
|
}
|
|
3171
3162
|
return !1;
|
|
3172
|
-
},
|
|
3163
|
+
}, U.regexp_eatKGroupName = function(e) {
|
|
3173
3164
|
if (e.eat(107)) {
|
|
3174
3165
|
if (this.regexp_eatGroupName(e)) return e.backReferenceNames.push(e.lastStringValue), !0;
|
|
3175
3166
|
e.raise("Invalid named reference");
|
|
3176
3167
|
}
|
|
3177
3168
|
return !1;
|
|
3178
|
-
},
|
|
3169
|
+
}, U.regexp_eatCharacterEscape = function(e) {
|
|
3179
3170
|
return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, !1) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e);
|
|
3180
|
-
},
|
|
3171
|
+
}, U.regexp_eatCControlLetter = function(e) {
|
|
3181
3172
|
var t = e.pos;
|
|
3182
3173
|
if (e.eat(99)) {
|
|
3183
3174
|
if (this.regexp_eatControlLetter(e)) return !0;
|
|
3184
3175
|
e.pos = t;
|
|
3185
3176
|
}
|
|
3186
3177
|
return !1;
|
|
3187
|
-
},
|
|
3188
|
-
return e.current() === 48 && !
|
|
3189
|
-
},
|
|
3178
|
+
}, U.regexp_eatZero = function(e) {
|
|
3179
|
+
return e.current() === 48 && !Ln(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
3180
|
+
}, U.regexp_eatControlEscape = function(e) {
|
|
3190
3181
|
var t = e.current();
|
|
3191
3182
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 ? (e.lastIntValue = 13, e.advance(), !0) : !1;
|
|
3192
|
-
},
|
|
3183
|
+
}, U.regexp_eatControlLetter = function(e) {
|
|
3193
3184
|
var t = e.current();
|
|
3194
|
-
return
|
|
3185
|
+
return Dn(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3195
3186
|
};
|
|
3196
|
-
function
|
|
3187
|
+
function Dn(e) {
|
|
3197
3188
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
3198
3189
|
}
|
|
3199
|
-
|
|
3190
|
+
U.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
3200
3191
|
t === void 0 && (t = !1);
|
|
3201
3192
|
var n = e.pos, r = t || e.switchU;
|
|
3202
3193
|
if (e.eat(117)) {
|
|
@@ -3212,19 +3203,19 @@ W.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
3212
3203
|
}
|
|
3213
3204
|
return !0;
|
|
3214
3205
|
}
|
|
3215
|
-
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
3206
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && On(e.lastIntValue)) return !0;
|
|
3216
3207
|
r && e.raise("Invalid unicode escape"), e.pos = n;
|
|
3217
3208
|
}
|
|
3218
3209
|
return !1;
|
|
3219
3210
|
};
|
|
3220
|
-
function
|
|
3211
|
+
function On(e) {
|
|
3221
3212
|
return e >= 0 && e <= 1114111;
|
|
3222
3213
|
}
|
|
3223
|
-
|
|
3214
|
+
U.regexp_eatIdentityEscape = function(e) {
|
|
3224
3215
|
if (e.switchU) return this.regexp_eatSyntaxCharacter(e) ? !0 : e.eat(47) ? (e.lastIntValue = 47, !0) : !1;
|
|
3225
3216
|
var t = e.current();
|
|
3226
3217
|
return t !== 99 && (!e.switchN || t !== 107) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3227
|
-
},
|
|
3218
|
+
}, U.regexp_eatDecimalEscape = function(e) {
|
|
3228
3219
|
e.lastIntValue = 0;
|
|
3229
3220
|
var t = e.current();
|
|
3230
3221
|
if (t >= 49 && t <= 57) {
|
|
@@ -3235,10 +3226,10 @@ W.regexp_eatIdentityEscape = function(e) {
|
|
|
3235
3226
|
}
|
|
3236
3227
|
return !1;
|
|
3237
3228
|
};
|
|
3238
|
-
var
|
|
3239
|
-
|
|
3229
|
+
var kn = 0, An = 1, G = 2;
|
|
3230
|
+
U.regexp_eatCharacterClassEscape = function(e) {
|
|
3240
3231
|
var t = e.current();
|
|
3241
|
-
if (
|
|
3232
|
+
if (jn(t)) return e.lastIntValue = -1, e.advance(), An;
|
|
3242
3233
|
var n = !1;
|
|
3243
3234
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
|
|
3244
3235
|
e.lastIntValue = -1, e.advance();
|
|
@@ -3246,58 +3237,58 @@ W.regexp_eatCharacterClassEscape = function(e) {
|
|
|
3246
3237
|
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === G && e.raise("Invalid property name"), r;
|
|
3247
3238
|
e.raise("Invalid property name");
|
|
3248
3239
|
}
|
|
3249
|
-
return
|
|
3240
|
+
return kn;
|
|
3250
3241
|
};
|
|
3251
|
-
function
|
|
3242
|
+
function jn(e) {
|
|
3252
3243
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
3253
3244
|
}
|
|
3254
|
-
|
|
3245
|
+
U.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
3255
3246
|
var t = e.pos;
|
|
3256
3247
|
if (this.regexp_eatUnicodePropertyName(e) && e.eat(61)) {
|
|
3257
3248
|
var n = e.lastStringValue;
|
|
3258
3249
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
3259
3250
|
var r = e.lastStringValue;
|
|
3260
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r),
|
|
3251
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), An;
|
|
3261
3252
|
}
|
|
3262
3253
|
}
|
|
3263
3254
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
3264
3255
|
var i = e.lastStringValue;
|
|
3265
3256
|
return this.regexp_validateUnicodePropertyNameOrValue(e, i);
|
|
3266
3257
|
}
|
|
3267
|
-
return
|
|
3268
|
-
},
|
|
3269
|
-
|
|
3270
|
-
},
|
|
3271
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
3258
|
+
return kn;
|
|
3259
|
+
}, U.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
|
|
3260
|
+
nt(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
|
|
3261
|
+
}, U.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
3262
|
+
if (e.unicodeProperties.binary.test(t)) return An;
|
|
3272
3263
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return G;
|
|
3273
3264
|
e.raise("Invalid property name");
|
|
3274
|
-
},
|
|
3265
|
+
}, U.regexp_eatUnicodePropertyName = function(e) {
|
|
3275
3266
|
var t = 0;
|
|
3276
|
-
for (e.lastStringValue = "";
|
|
3267
|
+
for (e.lastStringValue = ""; Mn(t = e.current());) e.lastStringValue += ot(t), e.advance();
|
|
3277
3268
|
return e.lastStringValue !== "";
|
|
3278
3269
|
};
|
|
3279
|
-
function
|
|
3280
|
-
return
|
|
3270
|
+
function Mn(e) {
|
|
3271
|
+
return Dn(e) || e === 95;
|
|
3281
3272
|
}
|
|
3282
|
-
|
|
3273
|
+
U.regexp_eatUnicodePropertyValue = function(e) {
|
|
3283
3274
|
var t = 0;
|
|
3284
|
-
for (e.lastStringValue = "";
|
|
3275
|
+
for (e.lastStringValue = ""; Nn(t = e.current());) e.lastStringValue += ot(t), e.advance();
|
|
3285
3276
|
return e.lastStringValue !== "";
|
|
3286
3277
|
};
|
|
3287
|
-
function
|
|
3288
|
-
return
|
|
3278
|
+
function Nn(e) {
|
|
3279
|
+
return Mn(e) || Ln(e);
|
|
3289
3280
|
}
|
|
3290
|
-
|
|
3281
|
+
U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
3291
3282
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
3292
|
-
},
|
|
3283
|
+
}, U.regexp_eatCharacterClass = function(e) {
|
|
3293
3284
|
if (e.eat(91)) {
|
|
3294
3285
|
var t = e.eat(94), n = this.regexp_classContents(e);
|
|
3295
3286
|
return e.eat(93) || e.raise("Unterminated character class"), t && n === G && e.raise("Negated character class may contain strings"), !0;
|
|
3296
3287
|
}
|
|
3297
3288
|
return !1;
|
|
3298
|
-
},
|
|
3299
|
-
return e.current() === 93 ?
|
|
3300
|
-
},
|
|
3289
|
+
}, U.regexp_classContents = function(e) {
|
|
3290
|
+
return e.current() === 93 ? An : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), An);
|
|
3291
|
+
}, U.regexp_nonEmptyClassRanges = function(e) {
|
|
3301
3292
|
for (; this.regexp_eatClassAtom(e);) {
|
|
3302
3293
|
var t = e.lastIntValue;
|
|
3303
3294
|
if (e.eat(45) && this.regexp_eatClassAtom(e)) {
|
|
@@ -3305,19 +3296,19 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3305
3296
|
e.switchU && (t === -1 || n === -1) && e.raise("Invalid character class"), t !== -1 && n !== -1 && t > n && e.raise("Range out of order in character class");
|
|
3306
3297
|
}
|
|
3307
3298
|
}
|
|
3308
|
-
},
|
|
3299
|
+
}, U.regexp_eatClassAtom = function(e) {
|
|
3309
3300
|
var t = e.pos;
|
|
3310
3301
|
if (e.eat(92)) {
|
|
3311
3302
|
if (this.regexp_eatClassEscape(e)) return !0;
|
|
3312
3303
|
if (e.switchU) {
|
|
3313
3304
|
var n = e.current();
|
|
3314
|
-
(n === 99 ||
|
|
3305
|
+
(n === 99 || Bn(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
3315
3306
|
}
|
|
3316
3307
|
e.pos = t;
|
|
3317
3308
|
}
|
|
3318
3309
|
var r = e.current();
|
|
3319
3310
|
return r === 93 ? !1 : (e.lastIntValue = r, e.advance(), !0);
|
|
3320
|
-
},
|
|
3311
|
+
}, U.regexp_eatClassEscape = function(e) {
|
|
3321
3312
|
var t = e.pos;
|
|
3322
3313
|
if (e.eat(98)) return e.lastIntValue = 8, !0;
|
|
3323
3314
|
if (e.switchU && e.eat(45)) return e.lastIntValue = 45, !0;
|
|
@@ -3326,13 +3317,13 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3326
3317
|
e.pos = t;
|
|
3327
3318
|
}
|
|
3328
3319
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
3329
|
-
},
|
|
3330
|
-
var t =
|
|
3320
|
+
}, U.regexp_classSetExpression = function(e) {
|
|
3321
|
+
var t = An, n;
|
|
3331
3322
|
if (!this.regexp_eatClassSetRange(e)) if (n = this.regexp_eatClassSetOperand(e)) {
|
|
3332
3323
|
n === G && (t = G);
|
|
3333
3324
|
for (var r = e.pos; e.eatChars([38, 38]);) {
|
|
3334
3325
|
if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
|
|
3335
|
-
n !== G && (t =
|
|
3326
|
+
n !== G && (t = An);
|
|
3336
3327
|
continue;
|
|
3337
3328
|
}
|
|
3338
3329
|
e.raise("Invalid character in character class");
|
|
@@ -3345,7 +3336,7 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3345
3336
|
if (n = this.regexp_eatClassSetOperand(e), !n) return t;
|
|
3346
3337
|
n === G && (t = G);
|
|
3347
3338
|
}
|
|
3348
|
-
},
|
|
3339
|
+
}, U.regexp_eatClassSetRange = function(e) {
|
|
3349
3340
|
var t = e.pos;
|
|
3350
3341
|
if (this.regexp_eatClassSetCharacter(e)) {
|
|
3351
3342
|
var n = e.lastIntValue;
|
|
@@ -3356,9 +3347,9 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3356
3347
|
e.pos = t;
|
|
3357
3348
|
}
|
|
3358
3349
|
return !1;
|
|
3359
|
-
},
|
|
3360
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
3361
|
-
},
|
|
3350
|
+
}, U.regexp_eatClassSetOperand = function(e) {
|
|
3351
|
+
return this.regexp_eatClassSetCharacter(e) ? An : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
3352
|
+
}, U.regexp_eatNestedClass = function(e) {
|
|
3362
3353
|
var t = e.pos;
|
|
3363
3354
|
if (e.eat(91)) {
|
|
3364
3355
|
var n = e.eat(94), r = this.regexp_classContents(e);
|
|
@@ -3371,7 +3362,7 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3371
3362
|
e.pos = t;
|
|
3372
3363
|
}
|
|
3373
3364
|
return null;
|
|
3374
|
-
},
|
|
3365
|
+
}, U.regexp_eatClassStringDisjunction = function(e) {
|
|
3375
3366
|
var t = e.pos;
|
|
3376
3367
|
if (e.eatChars([92, 113])) {
|
|
3377
3368
|
if (e.eat(123)) {
|
|
@@ -3381,61 +3372,61 @@ W.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3381
3372
|
e.pos = t;
|
|
3382
3373
|
}
|
|
3383
3374
|
return null;
|
|
3384
|
-
},
|
|
3375
|
+
}, U.regexp_classStringDisjunctionContents = function(e) {
|
|
3385
3376
|
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === G && (t = G);
|
|
3386
3377
|
return t;
|
|
3387
|
-
},
|
|
3378
|
+
}, U.regexp_classString = function(e) {
|
|
3388
3379
|
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
3389
|
-
return t === 1 ?
|
|
3390
|
-
},
|
|
3380
|
+
return t === 1 ? An : G;
|
|
3381
|
+
}, U.regexp_eatClassSetCharacter = function(e) {
|
|
3391
3382
|
var t = e.pos;
|
|
3392
3383
|
if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
3393
3384
|
var n = e.current();
|
|
3394
|
-
return n < 0 || n === e.lookahead() &&
|
|
3385
|
+
return n < 0 || n === e.lookahead() && Pn(n) || Fn(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
|
|
3395
3386
|
};
|
|
3396
|
-
function
|
|
3387
|
+
function Pn(e) {
|
|
3397
3388
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
3398
3389
|
}
|
|
3399
|
-
function
|
|
3390
|
+
function Fn(e) {
|
|
3400
3391
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
3401
3392
|
}
|
|
3402
|
-
|
|
3393
|
+
U.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
3403
3394
|
var t = e.current();
|
|
3404
|
-
return
|
|
3395
|
+
return In(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3405
3396
|
};
|
|
3406
|
-
function
|
|
3397
|
+
function In(e) {
|
|
3407
3398
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
3408
3399
|
}
|
|
3409
|
-
|
|
3400
|
+
U.regexp_eatClassControlLetter = function(e) {
|
|
3410
3401
|
var t = e.current();
|
|
3411
|
-
return
|
|
3412
|
-
},
|
|
3402
|
+
return Ln(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3403
|
+
}, U.regexp_eatHexEscapeSequence = function(e) {
|
|
3413
3404
|
var t = e.pos;
|
|
3414
3405
|
if (e.eat(120)) {
|
|
3415
3406
|
if (this.regexp_eatFixedHexDigits(e, 2)) return !0;
|
|
3416
3407
|
e.switchU && e.raise("Invalid escape"), e.pos = t;
|
|
3417
3408
|
}
|
|
3418
3409
|
return !1;
|
|
3419
|
-
},
|
|
3410
|
+
}, U.regexp_eatDecimalDigits = function(e) {
|
|
3420
3411
|
var t = e.pos, n = 0;
|
|
3421
|
-
for (e.lastIntValue = 0;
|
|
3412
|
+
for (e.lastIntValue = 0; Ln(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
|
|
3422
3413
|
return e.pos !== t;
|
|
3423
3414
|
};
|
|
3424
|
-
function
|
|
3415
|
+
function Ln(e) {
|
|
3425
3416
|
return e >= 48 && e <= 57;
|
|
3426
3417
|
}
|
|
3427
|
-
|
|
3418
|
+
U.regexp_eatHexDigits = function(e) {
|
|
3428
3419
|
var t = e.pos, n = 0;
|
|
3429
|
-
for (e.lastIntValue = 0;
|
|
3420
|
+
for (e.lastIntValue = 0; Rn(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + zn(n), e.advance();
|
|
3430
3421
|
return e.pos !== t;
|
|
3431
3422
|
};
|
|
3432
|
-
function
|
|
3423
|
+
function Rn(e) {
|
|
3433
3424
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
3434
3425
|
}
|
|
3435
|
-
function
|
|
3426
|
+
function zn(e) {
|
|
3436
3427
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
3437
3428
|
}
|
|
3438
|
-
|
|
3429
|
+
U.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
3439
3430
|
if (this.regexp_eatOctalDigit(e)) {
|
|
3440
3431
|
var t = e.lastIntValue;
|
|
3441
3432
|
if (this.regexp_eatOctalDigit(e)) {
|
|
@@ -3445,46 +3436,46 @@ W.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
3445
3436
|
return !0;
|
|
3446
3437
|
}
|
|
3447
3438
|
return !1;
|
|
3448
|
-
},
|
|
3439
|
+
}, U.regexp_eatOctalDigit = function(e) {
|
|
3449
3440
|
var t = e.current();
|
|
3450
|
-
return
|
|
3441
|
+
return Bn(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
3451
3442
|
};
|
|
3452
|
-
function
|
|
3443
|
+
function Bn(e) {
|
|
3453
3444
|
return e >= 48 && e <= 55;
|
|
3454
3445
|
}
|
|
3455
|
-
|
|
3446
|
+
U.regexp_eatFixedHexDigits = function(e, t) {
|
|
3456
3447
|
var n = e.pos;
|
|
3457
3448
|
e.lastIntValue = 0;
|
|
3458
3449
|
for (var r = 0; r < t; ++r) {
|
|
3459
3450
|
var i = e.current();
|
|
3460
|
-
if (!
|
|
3461
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3451
|
+
if (!Rn(i)) return e.pos = n, !1;
|
|
3452
|
+
e.lastIntValue = 16 * e.lastIntValue + zn(i), e.advance();
|
|
3462
3453
|
}
|
|
3463
3454
|
return !0;
|
|
3464
3455
|
};
|
|
3465
|
-
var
|
|
3466
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
3467
|
-
}, K =
|
|
3456
|
+
var Vn = function(e) {
|
|
3457
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new lt(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
3458
|
+
}, K = F.prototype;
|
|
3468
3459
|
K.next = function(e) {
|
|
3469
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
3460
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Vn(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
3470
3461
|
}, K.getToken = function() {
|
|
3471
|
-
return this.next(), new
|
|
3462
|
+
return this.next(), new Vn(this);
|
|
3472
3463
|
}, typeof Symbol < "u" && (K[Symbol.iterator] = function() {
|
|
3473
3464
|
var e = this;
|
|
3474
3465
|
return { next: function() {
|
|
3475
3466
|
var t = e.getToken();
|
|
3476
3467
|
return {
|
|
3477
|
-
done: t.type ===
|
|
3468
|
+
done: t.type === M.eof,
|
|
3478
3469
|
value: t
|
|
3479
3470
|
};
|
|
3480
3471
|
} };
|
|
3481
3472
|
}), K.nextToken = function() {
|
|
3482
3473
|
var e = this.curContext();
|
|
3483
|
-
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(
|
|
3474
|
+
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(M.eof);
|
|
3484
3475
|
if (e.override) return e.override(this);
|
|
3485
3476
|
this.readToken(this.fullCharCodeAtPos());
|
|
3486
3477
|
}, K.readToken = function(e) {
|
|
3487
|
-
return
|
|
3478
|
+
return E(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
3488
3479
|
}, K.fullCharCodeAt = function(e) {
|
|
3489
3480
|
var t = this.input.charCodeAt(e);
|
|
3490
3481
|
if (t <= 55295 || t >= 56320) return t;
|
|
@@ -3494,10 +3485,10 @@ K.next = function(e) {
|
|
|
3494
3485
|
return this.fullCharCodeAt(this.pos);
|
|
3495
3486
|
}, K.skipBlockComment = function() {
|
|
3496
3487
|
var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
3497
|
-
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r =
|
|
3488
|
+
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r = Ze(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
|
|
3498
3489
|
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
3499
3490
|
}, K.skipLineComment = function(e) {
|
|
3500
|
-
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
3491
|
+
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Xe(r);) r = this.input.charCodeAt(++this.pos);
|
|
3501
3492
|
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
|
|
3502
3493
|
}, K.skipSpace = function() {
|
|
3503
3494
|
loop: for (; this.pos < this.input.length;) {
|
|
@@ -3524,7 +3515,7 @@ K.next = function(e) {
|
|
|
3524
3515
|
default: break loop;
|
|
3525
3516
|
}
|
|
3526
3517
|
break;
|
|
3527
|
-
default: if (e > 8 && e < 14 || e >= 5760 &&
|
|
3518
|
+
default: if (e > 8 && e < 14 || e >= 5760 && Qe.test(String.fromCharCode(e))) ++this.pos;
|
|
3528
3519
|
else break loop;
|
|
3529
3520
|
}
|
|
3530
3521
|
}
|
|
@@ -3536,57 +3527,57 @@ K.next = function(e) {
|
|
|
3536
3527
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3537
3528
|
if (e >= 48 && e <= 57) return this.readNumber(!0);
|
|
3538
3529
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
3539
|
-
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(
|
|
3530
|
+
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(M.ellipsis)) : (++this.pos, this.finishToken(M.dot));
|
|
3540
3531
|
}, K.readToken_slash = function() {
|
|
3541
3532
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3542
|
-
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(
|
|
3533
|
+
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.slash, 1);
|
|
3543
3534
|
}, K.readToken_mult_modulo_exp = function(e) {
|
|
3544
|
-
var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ?
|
|
3545
|
-
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++n, r =
|
|
3535
|
+
var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ? M.star : M.modulo;
|
|
3536
|
+
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++n, r = M.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(M.assign, n + 1) : this.finishOp(r, n);
|
|
3546
3537
|
}, K.readToken_pipe_amp = function(e) {
|
|
3547
3538
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3548
|
-
return t === e ? this.options.ecmaVersion >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(
|
|
3539
|
+
return t === e ? this.options.ecmaVersion >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(M.assign, 3) : this.finishOp(e === 124 ? M.logicalOR : M.logicalAND, 2) : t === 61 ? this.finishOp(M.assign, 2) : this.finishOp(e === 124 ? M.bitwiseOR : M.bitwiseAND, 1);
|
|
3549
3540
|
}, K.readToken_caret = function() {
|
|
3550
|
-
return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(
|
|
3541
|
+
return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.bitwiseXOR, 1);
|
|
3551
3542
|
}, K.readToken_plus_min = function(e) {
|
|
3552
3543
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3553
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
3544
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || N.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(M.incDec, 2) : t === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.plusMin, 1);
|
|
3554
3545
|
}, K.readToken_lt_gt = function(e) {
|
|
3555
3546
|
var t = this.input.charCodeAt(this.pos + 1), n = 1;
|
|
3556
|
-
return t === e ? (n = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + n) === 61 ? this.finishOp(
|
|
3547
|
+
return t === e ? (n = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + n) === 61 ? this.finishOp(M.assign, n + 1) : this.finishOp(M.bitShift, n)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (n = 2), this.finishOp(M.relational, n));
|
|
3557
3548
|
}, K.readToken_eq_excl = function(e) {
|
|
3558
3549
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3559
|
-
return t === 61 ? this.finishOp(
|
|
3550
|
+
return t === 61 ? this.finishOp(M.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(M.arrow)) : this.finishOp(e === 61 ? M.eq : M.prefix, 1);
|
|
3560
3551
|
}, K.readToken_question = function() {
|
|
3561
3552
|
var e = this.options.ecmaVersion;
|
|
3562
3553
|
if (e >= 11) {
|
|
3563
3554
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3564
3555
|
if (t === 46) {
|
|
3565
3556
|
var n = this.input.charCodeAt(this.pos + 2);
|
|
3566
|
-
if (n < 48 || n > 57) return this.finishOp(
|
|
3557
|
+
if (n < 48 || n > 57) return this.finishOp(M.questionDot, 2);
|
|
3567
3558
|
}
|
|
3568
|
-
if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(
|
|
3559
|
+
if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(M.assign, 3) : this.finishOp(M.coalesce, 2);
|
|
3569
3560
|
}
|
|
3570
|
-
return this.finishOp(
|
|
3561
|
+
return this.finishOp(M.question, 1);
|
|
3571
3562
|
}, K.readToken_numberSign = function() {
|
|
3572
3563
|
var e = this.options.ecmaVersion, t = 35;
|
|
3573
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
3574
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3564
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), E(t, !0) || t === 92)) return this.finishToken(M.privateId, this.readWord1());
|
|
3565
|
+
this.raise(this.pos, "Unexpected character '" + ot(t) + "'");
|
|
3575
3566
|
}, K.getTokenFromCode = function(e) {
|
|
3576
3567
|
switch (e) {
|
|
3577
3568
|
case 46: return this.readToken_dot();
|
|
3578
|
-
case 40: return ++this.pos, this.finishToken(
|
|
3579
|
-
case 41: return ++this.pos, this.finishToken(
|
|
3580
|
-
case 59: return ++this.pos, this.finishToken(
|
|
3581
|
-
case 44: return ++this.pos, this.finishToken(
|
|
3582
|
-
case 91: return ++this.pos, this.finishToken(
|
|
3583
|
-
case 93: return ++this.pos, this.finishToken(
|
|
3584
|
-
case 123: return ++this.pos, this.finishToken(
|
|
3585
|
-
case 125: return ++this.pos, this.finishToken(
|
|
3586
|
-
case 58: return ++this.pos, this.finishToken(
|
|
3569
|
+
case 40: return ++this.pos, this.finishToken(M.parenL);
|
|
3570
|
+
case 41: return ++this.pos, this.finishToken(M.parenR);
|
|
3571
|
+
case 59: return ++this.pos, this.finishToken(M.semi);
|
|
3572
|
+
case 44: return ++this.pos, this.finishToken(M.comma);
|
|
3573
|
+
case 91: return ++this.pos, this.finishToken(M.bracketL);
|
|
3574
|
+
case 93: return ++this.pos, this.finishToken(M.bracketR);
|
|
3575
|
+
case 123: return ++this.pos, this.finishToken(M.braceL);
|
|
3576
|
+
case 125: return ++this.pos, this.finishToken(M.braceR);
|
|
3577
|
+
case 58: return ++this.pos, this.finishToken(M.colon);
|
|
3587
3578
|
case 96:
|
|
3588
3579
|
if (this.options.ecmaVersion < 6) break;
|
|
3589
|
-
return ++this.pos, this.finishToken(
|
|
3580
|
+
return ++this.pos, this.finishToken(M.backQuote);
|
|
3590
3581
|
case 48:
|
|
3591
3582
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3592
3583
|
if (t === 120 || t === 88) return this.readRadixNumber(16);
|
|
@@ -3618,10 +3609,10 @@ K.next = function(e) {
|
|
|
3618
3609
|
case 61:
|
|
3619
3610
|
case 33: return this.readToken_eq_excl(e);
|
|
3620
3611
|
case 63: return this.readToken_question();
|
|
3621
|
-
case 126: return this.finishOp(
|
|
3612
|
+
case 126: return this.finishOp(M.prefix, 1);
|
|
3622
3613
|
case 35: return this.readToken_numberSign();
|
|
3623
3614
|
}
|
|
3624
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3615
|
+
this.raise(this.pos, "Unexpected character '" + ot(e) + "'");
|
|
3625
3616
|
}, K.finishOp = function(e, t) {
|
|
3626
3617
|
var n = this.input.slice(this.pos, this.pos + t);
|
|
3627
3618
|
return this.pos += t, this.finishToken(e, n);
|
|
@@ -3629,7 +3620,7 @@ K.next = function(e) {
|
|
|
3629
3620
|
for (var e, t, n = this.pos;;) {
|
|
3630
3621
|
this.pos >= this.input.length && this.raise(n, "Unterminated regular expression");
|
|
3631
3622
|
var r = this.input.charAt(this.pos);
|
|
3632
|
-
if (
|
|
3623
|
+
if (N.test(r) && this.raise(n, "Unterminated regular expression"), e) e = !1;
|
|
3633
3624
|
else {
|
|
3634
3625
|
if (r === "[") t = !0;
|
|
3635
3626
|
else if (r === "]" && t) t = !1;
|
|
@@ -3642,13 +3633,13 @@ K.next = function(e) {
|
|
|
3642
3633
|
++this.pos;
|
|
3643
3634
|
var a = this.pos, o = this.readWord1();
|
|
3644
3635
|
this.containsEsc && this.unexpected(a);
|
|
3645
|
-
var s = this.regexpState ||= new
|
|
3636
|
+
var s = this.regexpState ||= new W(this);
|
|
3646
3637
|
s.reset(n, i, o), this.validateRegExpFlags(s), this.validateRegExpPattern(s);
|
|
3647
3638
|
var c = null;
|
|
3648
3639
|
try {
|
|
3649
3640
|
c = new RegExp(i, o);
|
|
3650
3641
|
} catch {}
|
|
3651
|
-
return this.finishToken(
|
|
3642
|
+
return this.finishToken(M.regexp, {
|
|
3652
3643
|
pattern: i,
|
|
3653
3644
|
flags: o,
|
|
3654
3645
|
value: c
|
|
@@ -3665,17 +3656,17 @@ K.next = function(e) {
|
|
|
3665
3656
|
}
|
|
3666
3657
|
return r && s === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === a || t != null && this.pos - a !== t ? null : o;
|
|
3667
3658
|
};
|
|
3668
|
-
function
|
|
3659
|
+
function Hn(e, t) {
|
|
3669
3660
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3670
3661
|
}
|
|
3671
|
-
function
|
|
3662
|
+
function Un(e) {
|
|
3672
3663
|
return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
|
|
3673
3664
|
}
|
|
3674
3665
|
K.readRadixNumber = function(e) {
|
|
3675
3666
|
var t = this.pos;
|
|
3676
3667
|
this.pos += 2;
|
|
3677
3668
|
var n = this.readInt(e);
|
|
3678
|
-
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n =
|
|
3669
|
+
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = Un(this.input.slice(t, this.pos)), ++this.pos) : E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(M.num, n);
|
|
3679
3670
|
}, K.readNumber = function(e) {
|
|
3680
3671
|
var t = this.pos;
|
|
3681
3672
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
@@ -3683,12 +3674,12 @@ K.readRadixNumber = function(e) {
|
|
|
3683
3674
|
n && this.strict && this.raise(t, "Invalid number");
|
|
3684
3675
|
var r = this.input.charCodeAt(this.pos);
|
|
3685
3676
|
if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3686
|
-
var i =
|
|
3687
|
-
return ++this.pos,
|
|
3677
|
+
var i = Un(this.input.slice(t, this.pos));
|
|
3678
|
+
return ++this.pos, E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(M.num, i);
|
|
3688
3679
|
}
|
|
3689
|
-
n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")),
|
|
3690
|
-
var a =
|
|
3691
|
-
return this.finishToken(
|
|
3680
|
+
n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3681
|
+
var a = Hn(this.input.slice(t, this.pos), n);
|
|
3682
|
+
return this.finishToken(M.num, a);
|
|
3692
3683
|
}, K.readCodePoint = function() {
|
|
3693
3684
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3694
3685
|
if (e === 123) {
|
|
@@ -3702,30 +3693,30 @@ K.readRadixNumber = function(e) {
|
|
|
3702
3693
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3703
3694
|
var r = this.input.charCodeAt(this.pos);
|
|
3704
3695
|
if (r === e) break;
|
|
3705
|
-
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3696
|
+
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Xe(r) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3706
3697
|
}
|
|
3707
|
-
return t += this.input.slice(n, this.pos++), this.finishToken(
|
|
3698
|
+
return t += this.input.slice(n, this.pos++), this.finishToken(M.string, t);
|
|
3708
3699
|
};
|
|
3709
|
-
var
|
|
3700
|
+
var Wn = {};
|
|
3710
3701
|
K.tryReadTemplateToken = function() {
|
|
3711
3702
|
this.inTemplateElement = !0;
|
|
3712
3703
|
try {
|
|
3713
3704
|
this.readTmplToken();
|
|
3714
3705
|
} catch (e) {
|
|
3715
|
-
if (e ===
|
|
3706
|
+
if (e === Wn) this.readInvalidTemplateToken();
|
|
3716
3707
|
else throw e;
|
|
3717
3708
|
}
|
|
3718
3709
|
this.inTemplateElement = !1;
|
|
3719
3710
|
}, K.invalidStringToken = function(e, t) {
|
|
3720
|
-
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw
|
|
3711
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw Wn;
|
|
3721
3712
|
this.raise(e, t);
|
|
3722
3713
|
}, K.readTmplToken = function() {
|
|
3723
3714
|
for (var e = "", t = this.pos;;) {
|
|
3724
3715
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3725
3716
|
var n = this.input.charCodeAt(this.pos);
|
|
3726
|
-
if (n === 96 || n === 36 && this.input.charCodeAt(this.pos + 1) === 123) return this.pos === this.start && (this.type ===
|
|
3717
|
+
if (n === 96 || n === 36 && this.input.charCodeAt(this.pos + 1) === 123) return this.pos === this.start && (this.type === M.template || this.type === M.invalidTemplate) ? n === 36 ? (this.pos += 2, this.finishToken(M.dollarBraceL)) : (++this.pos, this.finishToken(M.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(M.template, e));
|
|
3727
3718
|
if (n === 92) e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3728
|
-
else if (
|
|
3719
|
+
else if (Xe(n)) {
|
|
3729
3720
|
switch (e += this.input.slice(t, this.pos), ++this.pos, n) {
|
|
3730
3721
|
case 13: this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
3731
3722
|
case 10:
|
|
@@ -3744,7 +3735,7 @@ K.tryReadTemplateToken = function() {
|
|
|
3744
3735
|
++this.pos;
|
|
3745
3736
|
break;
|
|
3746
3737
|
case "$": if (this.input[this.pos + 1] !== "{") break;
|
|
3747
|
-
case "`": return this.finishToken(
|
|
3738
|
+
case "`": return this.finishToken(M.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
3748
3739
|
case "\r": this.input[this.pos + 1] === "\n" && ++this.pos;
|
|
3749
3740
|
case "\n":
|
|
3750
3741
|
case "\u2028":
|
|
@@ -3759,7 +3750,7 @@ K.tryReadTemplateToken = function() {
|
|
|
3759
3750
|
case 110: return "\n";
|
|
3760
3751
|
case 114: return "\r";
|
|
3761
3752
|
case 120: return String.fromCharCode(this.readHexChar(2));
|
|
3762
|
-
case 117: return
|
|
3753
|
+
case 117: return ot(this.readCodePoint());
|
|
3763
3754
|
case 116: return " ";
|
|
3764
3755
|
case 98: return "\b";
|
|
3765
3756
|
case 118: return "\v";
|
|
@@ -3776,7 +3767,7 @@ K.tryReadTemplateToken = function() {
|
|
|
3776
3767
|
var r = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], i = parseInt(r, 8);
|
|
3777
3768
|
return i > 255 && (r = r.slice(0, -1), i = parseInt(r, 8)), this.pos += r.length - 1, t = this.input.charCodeAt(this.pos), (r !== "0" || t === 56 || t === 57) && (this.strict || e) && this.invalidStringToken(this.pos - 1 - r.length, e ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(i);
|
|
3778
3769
|
}
|
|
3779
|
-
return
|
|
3770
|
+
return Xe(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3780
3771
|
}
|
|
3781
3772
|
}, K.readHexChar = function(e) {
|
|
3782
3773
|
var t = this.pos, n = this.readInt(16, e);
|
|
@@ -3785,55 +3776,55 @@ K.tryReadTemplateToken = function() {
|
|
|
3785
3776
|
this.containsEsc = !1;
|
|
3786
3777
|
for (var e = "", t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3787
3778
|
var i = this.fullCharCodeAtPos();
|
|
3788
|
-
if (
|
|
3779
|
+
if (qe(i, r)) this.pos += i <= 65535 ? 1 : 2;
|
|
3789
3780
|
else if (i === 92) {
|
|
3790
3781
|
this.containsEsc = !0, e += this.input.slice(n, this.pos);
|
|
3791
3782
|
var a = this.pos;
|
|
3792
3783
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3793
3784
|
var o = this.readCodePoint();
|
|
3794
|
-
(t ?
|
|
3785
|
+
(t ? E : qe)(o, r) || this.invalidStringToken(a, "Invalid Unicode escape"), e += ot(o), n = this.pos;
|
|
3795
3786
|
} else break;
|
|
3796
3787
|
t = !1;
|
|
3797
3788
|
}
|
|
3798
3789
|
return e + this.input.slice(n, this.pos);
|
|
3799
3790
|
}, K.readWord = function() {
|
|
3800
|
-
var e = this.readWord1(), t =
|
|
3801
|
-
return this.keywords.test(e) && (t =
|
|
3791
|
+
var e = this.readWord1(), t = M.name;
|
|
3792
|
+
return this.keywords.test(e) && (t = Je[e]), this.finishToken(t, e);
|
|
3802
3793
|
};
|
|
3803
|
-
var
|
|
3804
|
-
|
|
3805
|
-
Parser:
|
|
3806
|
-
version:
|
|
3807
|
-
defaultOptions:
|
|
3808
|
-
Position:
|
|
3809
|
-
SourceLocation:
|
|
3810
|
-
getLineInfo:
|
|
3811
|
-
Node:
|
|
3812
|
-
TokenType:
|
|
3813
|
-
tokTypes:
|
|
3814
|
-
keywordTypes:
|
|
3815
|
-
TokContext:
|
|
3816
|
-
tokContexts:
|
|
3817
|
-
isIdentifierChar:
|
|
3818
|
-
isIdentifierStart:
|
|
3819
|
-
Token:
|
|
3820
|
-
isNewLine:
|
|
3821
|
-
lineBreak:
|
|
3822
|
-
lineBreakG:
|
|
3823
|
-
nonASCIIwhitespace:
|
|
3794
|
+
var Gn = "8.16.0";
|
|
3795
|
+
F.acorn = {
|
|
3796
|
+
Parser: F,
|
|
3797
|
+
version: Gn,
|
|
3798
|
+
defaultOptions: dt,
|
|
3799
|
+
Position: ct,
|
|
3800
|
+
SourceLocation: lt,
|
|
3801
|
+
getLineInfo: ut,
|
|
3802
|
+
Node: Zt,
|
|
3803
|
+
TokenType: D,
|
|
3804
|
+
tokTypes: M,
|
|
3805
|
+
keywordTypes: Je,
|
|
3806
|
+
TokContext: B,
|
|
3807
|
+
tokContexts: V,
|
|
3808
|
+
isIdentifierChar: qe,
|
|
3809
|
+
isIdentifierStart: E,
|
|
3810
|
+
Token: Vn,
|
|
3811
|
+
isNewLine: Xe,
|
|
3812
|
+
lineBreak: N,
|
|
3813
|
+
lineBreakG: Ye,
|
|
3814
|
+
nonASCIIwhitespace: Qe
|
|
3824
3815
|
};
|
|
3825
|
-
function
|
|
3826
|
-
return
|
|
3816
|
+
function Kn(e, t) {
|
|
3817
|
+
return F.parse(e, t);
|
|
3827
3818
|
}
|
|
3828
|
-
function
|
|
3829
|
-
return
|
|
3819
|
+
function qn(e, t, n) {
|
|
3820
|
+
return F.parseExpressionAt(e, t, n);
|
|
3830
3821
|
}
|
|
3831
|
-
function
|
|
3832
|
-
return
|
|
3822
|
+
function Jn(e, t) {
|
|
3823
|
+
return F.tokenizer(e, t);
|
|
3833
3824
|
}
|
|
3834
3825
|
//#endregion
|
|
3835
3826
|
//#region node_modules/acorn-typescript/lib/index.mjs
|
|
3836
|
-
function
|
|
3827
|
+
function Yn(e, t) {
|
|
3837
3828
|
for (var n = 0; n < t.length; n++) {
|
|
3838
3829
|
var r = t[n];
|
|
3839
3830
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (i = function(e, t) {
|
|
@@ -3849,36 +3840,36 @@ function Zn(e, t) {
|
|
|
3849
3840
|
}
|
|
3850
3841
|
var i;
|
|
3851
3842
|
}
|
|
3852
|
-
function
|
|
3853
|
-
return
|
|
3843
|
+
function Xn() {
|
|
3844
|
+
return Xn = Object.assign ? Object.assign.bind() : function(e) {
|
|
3854
3845
|
for (var t = 1; t < arguments.length; t++) {
|
|
3855
3846
|
var n = arguments[t];
|
|
3856
3847
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3857
3848
|
}
|
|
3858
3849
|
return e;
|
|
3859
|
-
},
|
|
3850
|
+
}, Xn.apply(this, arguments);
|
|
3860
3851
|
}
|
|
3861
|
-
function
|
|
3862
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
3852
|
+
function Zn(e, t) {
|
|
3853
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Qn(e, t);
|
|
3863
3854
|
}
|
|
3864
|
-
function
|
|
3865
|
-
return
|
|
3855
|
+
function Qn(e, t) {
|
|
3856
|
+
return Qn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
3866
3857
|
return e.__proto__ = t, e;
|
|
3867
|
-
},
|
|
3858
|
+
}, Qn(e, t);
|
|
3868
3859
|
}
|
|
3869
|
-
function
|
|
3860
|
+
function $n(e, t) {
|
|
3870
3861
|
(t == null || t > e.length) && (t = e.length);
|
|
3871
3862
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
3872
3863
|
return r;
|
|
3873
3864
|
}
|
|
3874
|
-
function
|
|
3865
|
+
function er(e, t) {
|
|
3875
3866
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3876
3867
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
3877
3868
|
if (Array.isArray(e) || (n = function(e, t) {
|
|
3878
3869
|
if (e) {
|
|
3879
|
-
if (typeof e == "string") return
|
|
3870
|
+
if (typeof e == "string") return $n(e, t);
|
|
3880
3871
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3881
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
3872
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? $n(e, t) : void 0;
|
|
3882
3873
|
}
|
|
3883
3874
|
}(e)) || t && e && typeof e.length == "number") {
|
|
3884
3875
|
n && (e = n);
|
|
@@ -3894,11 +3885,11 @@ function nr(e, t) {
|
|
|
3894
3885
|
}
|
|
3895
3886
|
var q = !0;
|
|
3896
3887
|
function J(e, t) {
|
|
3897
|
-
return t === void 0 && (t = {}), new
|
|
3888
|
+
return t === void 0 && (t = {}), new D("name", t);
|
|
3898
3889
|
}
|
|
3899
|
-
var
|
|
3900
|
-
function
|
|
3901
|
-
var t =
|
|
3890
|
+
var tr = /* @__PURE__ */ new WeakMap();
|
|
3891
|
+
function nr(e) {
|
|
3892
|
+
var t = tr.get(e.Parser.acorn || e);
|
|
3902
3893
|
if (!t) {
|
|
3903
3894
|
var n = {
|
|
3904
3895
|
assert: J(0, { startsExpr: q }),
|
|
@@ -3915,37 +3906,37 @@ function ir(e) {
|
|
|
3915
3906
|
interface: J(0, { startsExpr: q }),
|
|
3916
3907
|
type: J(0, { startsExpr: q })
|
|
3917
3908
|
}, r = {
|
|
3918
|
-
at: new
|
|
3919
|
-
jsxName: new
|
|
3920
|
-
jsxText: new
|
|
3921
|
-
jsxTagStart: new
|
|
3922
|
-
jsxTagEnd: new
|
|
3909
|
+
at: new D("@"),
|
|
3910
|
+
jsxName: new D("jsxName"),
|
|
3911
|
+
jsxText: new D("jsxText", { beforeExpr: !0 }),
|
|
3912
|
+
jsxTagStart: new D("jsxTagStart", { startsExpr: !0 }),
|
|
3913
|
+
jsxTagEnd: new D("jsxTagEnd")
|
|
3923
3914
|
}, i = {
|
|
3924
|
-
tc_oTag: new
|
|
3925
|
-
tc_cTag: new
|
|
3926
|
-
tc_expr: new
|
|
3915
|
+
tc_oTag: new B("<tag", !1, !1),
|
|
3916
|
+
tc_cTag: new B("</tag", !1, !1),
|
|
3917
|
+
tc_expr: new B("<tag>...</tag>", !0, !0)
|
|
3927
3918
|
}, a = RegExp("^(?:" + Object.keys(n).join("|") + ")$");
|
|
3928
3919
|
r.jsxTagStart.updateContext = function() {
|
|
3929
3920
|
this.context.push(i.tc_expr), this.context.push(i.tc_oTag), this.exprAllowed = !1;
|
|
3930
3921
|
}, r.jsxTagEnd.updateContext = function(e) {
|
|
3931
3922
|
var t = this.context.pop();
|
|
3932
|
-
t === i.tc_oTag && e ===
|
|
3923
|
+
t === i.tc_oTag && e === M.slash || t === i.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === i.tc_expr) : this.exprAllowed = !0;
|
|
3933
3924
|
}, t = {
|
|
3934
|
-
tokTypes:
|
|
3935
|
-
tokContexts:
|
|
3925
|
+
tokTypes: Xn({}, n, r),
|
|
3926
|
+
tokContexts: Xn({}, i),
|
|
3936
3927
|
keywordsRegExp: a,
|
|
3937
3928
|
tokenIsLiteralPropertyName: function(e) {
|
|
3938
3929
|
return [
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
].concat(Object.values(
|
|
3930
|
+
M.name,
|
|
3931
|
+
M.string,
|
|
3932
|
+
M.num
|
|
3933
|
+
].concat(Object.values(Je), Object.values(n)).includes(e);
|
|
3943
3934
|
},
|
|
3944
3935
|
tokenIsKeywordOrIdentifier: function(e) {
|
|
3945
|
-
return [
|
|
3936
|
+
return [M.name].concat(Object.values(Je), Object.values(n)).includes(e);
|
|
3946
3937
|
},
|
|
3947
3938
|
tokenIsIdentifier: function(e) {
|
|
3948
|
-
return [].concat(Object.values(n), [
|
|
3939
|
+
return [].concat(Object.values(n), [M.name]).includes(e);
|
|
3949
3940
|
},
|
|
3950
3941
|
tokenIsTSDeclarationStart: function(e) {
|
|
3951
3942
|
return [
|
|
@@ -3966,20 +3957,20 @@ function ir(e) {
|
|
|
3966
3957
|
].includes(e);
|
|
3967
3958
|
},
|
|
3968
3959
|
tokenIsTemplate: function(e) {
|
|
3969
|
-
return e ===
|
|
3960
|
+
return e === M.invalidTemplate;
|
|
3970
3961
|
}
|
|
3971
3962
|
};
|
|
3972
3963
|
}
|
|
3973
3964
|
return t;
|
|
3974
3965
|
}
|
|
3975
|
-
var
|
|
3966
|
+
var rr = 1024, ir = RegExp("(?=(" + (/* @__PURE__ */ RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y")).source + "))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)", "y"), ar = function() {
|
|
3976
3967
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3977
3968
|
};
|
|
3978
|
-
function
|
|
3969
|
+
function or(e, t) {
|
|
3979
3970
|
var n = t.key.name, r = e[n], i = "true";
|
|
3980
3971
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : !!r || (e[n] = i, !1);
|
|
3981
3972
|
}
|
|
3982
|
-
function
|
|
3973
|
+
function sr(e, t) {
|
|
3983
3974
|
var n = e.key;
|
|
3984
3975
|
return !e.computed && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
3985
3976
|
}
|
|
@@ -4084,7 +4075,7 @@ var Y = {
|
|
|
4084
4075
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
4085
4076
|
},
|
|
4086
4077
|
LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."
|
|
4087
|
-
},
|
|
4078
|
+
}, cr = {
|
|
4088
4079
|
quot: "\"",
|
|
4089
4080
|
amp: "&",
|
|
4090
4081
|
apos: "'",
|
|
@@ -4338,38 +4329,38 @@ var Y = {
|
|
|
4338
4329
|
clubs: "♣",
|
|
4339
4330
|
hearts: "♥",
|
|
4340
4331
|
diams: "♦"
|
|
4341
|
-
},
|
|
4342
|
-
function
|
|
4343
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
4332
|
+
}, lr = /^[\da-fA-F]+$/, ur = /^\d+$/;
|
|
4333
|
+
function dr(e) {
|
|
4334
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? dr(e.object) + "." + dr(e.property) : void 0);
|
|
4344
4335
|
}
|
|
4345
|
-
var
|
|
4346
|
-
function
|
|
4336
|
+
var fr = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
4337
|
+
function pr(e) {
|
|
4347
4338
|
if (!e) throw Error("Assert fail");
|
|
4348
4339
|
}
|
|
4349
|
-
function
|
|
4340
|
+
function mr(e) {
|
|
4350
4341
|
return e === "accessor";
|
|
4351
4342
|
}
|
|
4352
|
-
function
|
|
4343
|
+
function hr(e) {
|
|
4353
4344
|
return e === "in" || e === "out";
|
|
4354
4345
|
}
|
|
4355
|
-
function
|
|
4346
|
+
function gr(e, t) {
|
|
4356
4347
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
4357
4348
|
}
|
|
4358
|
-
function
|
|
4349
|
+
function _r(e) {
|
|
4359
4350
|
if (e.type !== "MemberExpression") return !1;
|
|
4360
4351
|
var t = e.property;
|
|
4361
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
4352
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && vr(e.object);
|
|
4362
4353
|
}
|
|
4363
|
-
function
|
|
4364
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
4354
|
+
function vr(e) {
|
|
4355
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && vr(e.object);
|
|
4365
4356
|
}
|
|
4366
|
-
function
|
|
4357
|
+
function yr(e) {
|
|
4367
4358
|
return e === "private" || e === "public" || e === "protected";
|
|
4368
4359
|
}
|
|
4369
|
-
function
|
|
4360
|
+
function br(e) {
|
|
4370
4361
|
var t = e || {}, n = t.dts, r = n !== void 0 && n, i = t.allowSatisfies, a = i !== void 0 && i;
|
|
4371
4362
|
return function(t) {
|
|
4372
|
-
var n = t.acorn ||
|
|
4363
|
+
var n = t.acorn || Fe, i = nr(n), o = n.tokTypes, s = n.keywordTypes, c = n.isIdentifierStart, l = n.lineBreak, u = n.isNewLine, d = n.tokContexts, f = n.isIdentifierChar, p = i.tokTypes, m = i.tokContexts, h = i.keywordsRegExp, g = i.tokenIsLiteralPropertyName, ee = i.tokenIsTemplate, _ = i.tokenIsTSDeclarationStart, v = i.tokenIsIdentifier, te = i.tokenIsKeywordOrIdentifier, ne = i.tokenIsTSTypeOperator;
|
|
4373
4364
|
function re(e, t, n) {
|
|
4374
4365
|
n === void 0 && (n = e.length);
|
|
4375
4366
|
for (var r = t; r < n; r++) {
|
|
@@ -4380,11 +4371,11 @@ function Sr(e) {
|
|
|
4380
4371
|
}
|
|
4381
4372
|
return t = function(e, t, n) {
|
|
4382
4373
|
var r = n.tokTypes, i = t.tokTypes;
|
|
4383
|
-
return function(e) {
|
|
4374
|
+
/*#__PURE__*/ return function(e) {
|
|
4384
4375
|
function t() {
|
|
4385
4376
|
return e.apply(this, arguments) || this;
|
|
4386
4377
|
}
|
|
4387
|
-
|
|
4378
|
+
Zn(t, e);
|
|
4388
4379
|
var n = t.prototype;
|
|
4389
4380
|
return n.takeDecorators = function(e) {
|
|
4390
4381
|
var t = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -4423,11 +4414,11 @@ function Sr(e) {
|
|
|
4423
4414
|
allowNamespaces: !0,
|
|
4424
4415
|
allowNamespacedObjects: !0
|
|
4425
4416
|
}, r || {});
|
|
4426
|
-
return function(e) {
|
|
4417
|
+
/*#__PURE__*/ return function(e) {
|
|
4427
4418
|
function t() {
|
|
4428
4419
|
return e.apply(this, arguments) || this;
|
|
4429
4420
|
}
|
|
4430
|
-
|
|
4421
|
+
Zn(t, e);
|
|
4431
4422
|
var n = t.prototype;
|
|
4432
4423
|
return n.jsx_readToken = function() {
|
|
4433
4424
|
for (var e = "", t = this.pos;;) {
|
|
@@ -4460,7 +4451,7 @@ function Sr(e) {
|
|
|
4460
4451
|
r !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
4461
4452
|
for (var i = ++this.pos; this.pos < this.input.length && n++ < 10;) {
|
|
4462
4453
|
if ((r = this.input[this.pos++]) === ";") {
|
|
4463
|
-
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2),
|
|
4454
|
+
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2), lr.test(t) && (e = String.fromCharCode(parseInt(t, 16)))) : (t = t.substr(1), ur.test(t) && (e = String.fromCharCode(parseInt(t, 10)))) : e = cr[t];
|
|
4464
4455
|
break;
|
|
4465
4456
|
}
|
|
4466
4457
|
t += r;
|
|
@@ -4534,7 +4525,7 @@ function Sr(e) {
|
|
|
4534
4525
|
break;
|
|
4535
4526
|
default: this.unexpected();
|
|
4536
4527
|
}
|
|
4537
|
-
|
|
4528
|
+
dr(s.name) !== dr(o.name) && this.raise(s.start, "Expected corresponding JSX closing tag for <" + dr(o.name) + ">");
|
|
4538
4529
|
}
|
|
4539
4530
|
var c = o.name ? "Element" : "Fragment";
|
|
4540
4531
|
return n["opening" + c] = o, n["closing" + c] = s, n.children = r, this.type === i.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(n, "JSX" + c);
|
|
@@ -4548,11 +4539,11 @@ function Sr(e) {
|
|
|
4548
4539
|
}(n);
|
|
4549
4540
|
}(n, i, t, e?.jsx), t = function(e, t, n) {
|
|
4550
4541
|
var r = t.tokTypes, i = n.tokTypes;
|
|
4551
|
-
return function(e) {
|
|
4542
|
+
/*#__PURE__*/ return function(e) {
|
|
4552
4543
|
function t() {
|
|
4553
4544
|
return e.apply(this, arguments) || this;
|
|
4554
4545
|
}
|
|
4555
|
-
|
|
4546
|
+
Zn(t, e);
|
|
4556
4547
|
var n = t.prototype;
|
|
4557
4548
|
return n.parseMaybeImportAttributes = function(e) {
|
|
4558
4549
|
if (this.type === i._with || this.type === r.assert) {
|
|
@@ -4586,7 +4577,7 @@ function Sr(e) {
|
|
|
4586
4577
|
errorTemplate: Y.InvalidModifierOnTypeParameterPositions
|
|
4587
4578
|
}), i;
|
|
4588
4579
|
}
|
|
4589
|
-
|
|
4580
|
+
Zn(t, e);
|
|
4590
4581
|
var ie, y, b, x = t.prototype;
|
|
4591
4582
|
return x.getTokenFromCodeInType = function(t) {
|
|
4592
4583
|
return t === 62 || t === 60 ? this.finishOp(o.relational, 1) : e.prototype.getTokenFromCode.call(this, t);
|
|
@@ -4654,7 +4645,7 @@ function Sr(e) {
|
|
|
4654
4645
|
return this.nextTokenStartSince(this.pos);
|
|
4655
4646
|
}, x.tsHasSomeModifiers = function(e, t) {
|
|
4656
4647
|
return t.some(function(t) {
|
|
4657
|
-
return
|
|
4648
|
+
return yr(t) ? e.accessibility === t : !!e[t];
|
|
4658
4649
|
});
|
|
4659
4650
|
}, x.tsIsStartOfStaticBlocks = function() {
|
|
4660
4651
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
@@ -4702,7 +4693,7 @@ function Sr(e) {
|
|
|
4702
4693
|
}, x.isAbstractConstructorSignature = function() {
|
|
4703
4694
|
return this.ts_isContextual(p.abstract) && this.lookahead().type === o._new;
|
|
4704
4695
|
}, x.nextTokenStartSince = function(e) {
|
|
4705
|
-
return
|
|
4696
|
+
return fr.lastIndex = e, fr.test(this.input) ? fr.lastIndex : e;
|
|
4706
4697
|
}, x.lookaheadCharCode = function() {
|
|
4707
4698
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4708
4699
|
}, x.compareLookaheadState = function(e, t) {
|
|
@@ -4786,7 +4777,7 @@ function Sr(e) {
|
|
|
4786
4777
|
}, x.isLineTerminator = function() {
|
|
4787
4778
|
return this.eat(o.semi) || e.prototype.canInsertSemicolon.call(this);
|
|
4788
4779
|
}, x.hasFollowingLineBreak = function() {
|
|
4789
|
-
return
|
|
4780
|
+
return ir.lastIndex = this.end, ir.test(this.input);
|
|
4790
4781
|
}, x.addExtra = function(e, t, n, r) {
|
|
4791
4782
|
if (r === void 0 && (r = !0), e) {
|
|
4792
4783
|
var i = e.extra = e.extra || {};
|
|
@@ -4878,7 +4869,7 @@ function Sr(e) {
|
|
|
4878
4869
|
}
|
|
4879
4870
|
return this.next(), e.prototype.exitScope.call(this), this.finishNode(t, "TSModuleBlock");
|
|
4880
4871
|
}, x.tsParseAmbientExternalModuleDeclaration = function(t) {
|
|
4881
|
-
return this.ts_isContextual(p.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this,
|
|
4872
|
+
return this.ts_isContextual(p.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this, rr), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this)) : e.prototype.semicolon.call(this), this.finishNode(t, "TSModuleDeclaration");
|
|
4882
4873
|
}, x.tsTryParseDeclare = function(e) {
|
|
4883
4874
|
var t = this;
|
|
4884
4875
|
if (!this.isLineTerminator()) {
|
|
@@ -5194,7 +5185,7 @@ function Sr(e) {
|
|
|
5194
5185
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
5195
5186
|
}, x.tsParseType = function() {
|
|
5196
5187
|
var e = this;
|
|
5197
|
-
|
|
5188
|
+
pr(this.inType);
|
|
5198
5189
|
var t = this.tsParseNonConditionalType();
|
|
5199
5190
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return t;
|
|
5200
5191
|
var n = this.startNodeAtNode(t);
|
|
@@ -5269,7 +5260,7 @@ function Sr(e) {
|
|
|
5269
5260
|
};;) {
|
|
5270
5261
|
var d = this.startLoc, f = this.tsParseModifier(r.concat(i ?? []), a);
|
|
5271
5262
|
if (!f) break;
|
|
5272
|
-
|
|
5263
|
+
yr(f) ? n.accessibility ? this.raise(this.start, Y.DuplicateAccessibilityModifier()) : (l(d, f, f, "override"), l(d, f, f, "static"), l(d, f, f, "readonly"), l(d, f, f, "accessor"), c.accessibility = f, n.accessibility = f) : hr(f) ? n[f] ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (l(d, f, "in", "out"), c[f] = f, n[f] = !0) : mr(f) ? n[f] ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (u(d, f, "accessor", "readonly"), u(d, f, "accessor", "static"), u(d, f, "accessor", "override"), c[f] = f, n[f] = !0) : Object.hasOwnProperty.call(n, f) ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (l(d, f, "static", "readonly"), l(d, f, "static", "override"), l(d, f, "override", "readonly"), l(d, f, "abstract", "override"), u(d, f, "declare", "override"), u(d, f, "static", "abstract"), c[f] = f, n[f] = !0), i != null && i.includes(f) && this.raise(this.start, s);
|
|
5273
5264
|
}
|
|
5274
5265
|
return c;
|
|
5275
5266
|
}, x.tsParseInOutModifiers = function(e) {
|
|
@@ -5379,7 +5370,7 @@ function Sr(e) {
|
|
|
5379
5370
|
break;
|
|
5380
5371
|
case "global":
|
|
5381
5372
|
if (this.match(o.braceL)) {
|
|
5382
|
-
e.prototype.enterScope.call(this,
|
|
5373
|
+
e.prototype.enterScope.call(this, rr);
|
|
5383
5374
|
var i = t;
|
|
5384
5375
|
return i.global = !0, i.id = n, i.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
5385
5376
|
}
|
|
@@ -5418,7 +5409,7 @@ function Sr(e) {
|
|
|
5418
5409
|
if (n === void 0 && (n = !1), t.id = this.parseIdent(), n || this.checkLValSimple(t.id, 8), this.eat(o.dot)) {
|
|
5419
5410
|
var r = this.startNode();
|
|
5420
5411
|
this.tsParseModuleOrNamespaceDeclaration(r, !0), t.body = r;
|
|
5421
|
-
} else e.prototype.enterScope.call(this,
|
|
5412
|
+
} else e.prototype.enterScope.call(this, rr), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this);
|
|
5422
5413
|
return this.finishNode(t, "TSModuleDeclaration");
|
|
5423
5414
|
}, x.checkLValSimple = function(t, n, r) {
|
|
5424
5415
|
return n === void 0 && (n = 0), e.prototype.checkLValSimple.call(this, t, n, r);
|
|
@@ -5479,7 +5470,7 @@ function Sr(e) {
|
|
|
5479
5470
|
}, x.parseFunction = function(e, t, n, r, i) {
|
|
5480
5471
|
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && 2 & t && this.unexpected(), e.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), 1 & t && (e.id = 4 & t && this.type !== o.name ? null : this.parseIdent());
|
|
5481
5472
|
var a = this.yieldPos, s = this.awaitPos, c = this.awaitIdentPos, l = this.maybeInArrowParameters;
|
|
5482
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
5473
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(gr(e.async, e.generator)), 1 & t || (e.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(e);
|
|
5483
5474
|
var u = 1 & t;
|
|
5484
5475
|
return this.parseFunctionBody(e, n, !1, i, { isFunctionDeclaration: u }), this.yieldPos = a, this.awaitPos = s, this.awaitIdentPos = c, 1 & t && e.id && !(2 & t) && this.checkLValSimple(e.id, e.body ? this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = l, this.finishNode(e, u ? "FunctionDeclaration" : "FunctionExpression");
|
|
5485
5476
|
}, x.parseFunctionBody = function(t, n, r, i, a) {
|
|
@@ -5566,7 +5557,7 @@ function Sr(e) {
|
|
|
5566
5557
|
else {
|
|
5567
5558
|
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== o.string && this.unexpected(), e.source = this.parseExprAtom(), this.parseMaybeImportAttributes(e);
|
|
5568
5559
|
else {
|
|
5569
|
-
for (var s, c =
|
|
5560
|
+
for (var s, c = er(e.specifiers); !(s = c()).done;) {
|
|
5570
5561
|
var l = s.value;
|
|
5571
5562
|
this.checkUnreserved(l.local), this.checkLocalExport(l.local), l.local.type === "Literal" && this.raise(l.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5572
5563
|
}
|
|
@@ -5628,9 +5619,9 @@ function Sr(e) {
|
|
|
5628
5619
|
this.next(), e.prototype.parseVar.call(this, t, !1, n, r || i), this.semicolon();
|
|
5629
5620
|
var a = this.finishNode(t, "VariableDeclaration");
|
|
5630
5621
|
if (!i) return a;
|
|
5631
|
-
for (var o, s =
|
|
5622
|
+
for (var o, s = er(a.declarations); !(o = s()).done;) {
|
|
5632
5623
|
var c = o.value, l = c.init;
|
|
5633
|
-
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, Y.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !
|
|
5624
|
+
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, Y.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !_r(l) && this.raise(l.start, Y.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
5634
5625
|
}
|
|
5635
5626
|
return a;
|
|
5636
5627
|
}, x.parseStatement = function(t, n, r) {
|
|
@@ -5709,7 +5700,7 @@ function Sr(e) {
|
|
|
5709
5700
|
var s = e.declare, c = e.kind;
|
|
5710
5701
|
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start, Y.DeclareAccessor({ kind: c })), o && (e.typeParameters = o);
|
|
5711
5702
|
var l = e.key;
|
|
5712
|
-
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static &&
|
|
5703
|
+
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static && sr(e, "prototype") && this.raise(l.start, "Classes may not have a static property named prototype");
|
|
5713
5704
|
var u = e.value = this.parseMethod(t, n, r, !0, e);
|
|
5714
5705
|
return e.kind === "get" && u.params.length !== 0 && this.raiseRecoverable(u.start, "getter should have no params"), e.kind === "set" && u.params.length !== 1 && this.raiseRecoverable(u.start, "setter should have exactly one param"), e.kind === "set" && u.params[0].type === "RestElement" && this.raiseRecoverable(u.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
5715
5706
|
}, x.isClassMethod = function() {
|
|
@@ -5744,7 +5735,7 @@ function Sr(e) {
|
|
|
5744
5735
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? u = p : s = p);
|
|
5745
5736
|
}
|
|
5746
5737
|
if (s ? (a.computed = !1, a.key = n.startNodeAt(n.lastTokStart, n.lastTokStartLoc), a.key.name = s, n.finishNode(a.key, "Identifier")) : n.parseClassElementName(a), n.parsePostMemberNameModifiers(a), n.isClassMethod() || i < 13 || n.type === o.parenL || u !== "method" || c || l) {
|
|
5747
|
-
var m = !a.static &&
|
|
5738
|
+
var m = !a.static && sr(a, "constructor"), h = m && t;
|
|
5748
5739
|
m && u !== "method" && n.raise(a.key.start, "Constructor can't have get/set modifier"), a.kind = m ? "constructor" : u, n.parseClassMethod(a, c, l, h);
|
|
5749
5740
|
} else n.parseClassField(a);
|
|
5750
5741
|
return a;
|
|
@@ -5766,7 +5757,7 @@ function Sr(e) {
|
|
|
5766
5757
|
}, x.parseArrowExpression = function(e, t, n, r) {
|
|
5767
5758
|
this.match(o.colon) && (e.returnType = this.tsParseTypeAnnotation());
|
|
5768
5759
|
var i = this.yieldPos, a = this.awaitPos, s = this.awaitIdentPos;
|
|
5769
|
-
this.enterScope(16 |
|
|
5760
|
+
this.enterScope(16 | gr(n, !1)), this.initFunction(e);
|
|
5770
5761
|
var c = this.maybeInArrowParameters;
|
|
5771
5762
|
return this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, e.params = this.toAssignableList(t, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = s, this.maybeInArrowParameters = c, this.finishNode(e, "ArrowFunctionExpression");
|
|
5772
5763
|
}, x.parseMaybeAssignOrigin = function(e, t, n) {
|
|
@@ -5775,7 +5766,7 @@ function Sr(e) {
|
|
|
5775
5766
|
this.exprAllowed = !1;
|
|
5776
5767
|
}
|
|
5777
5768
|
var r = !1, i = -1, a = -1, s = -1;
|
|
5778
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
5769
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new ar(), r = !0);
|
|
5779
5770
|
var c = this.start, l = this.startLoc;
|
|
5780
5771
|
(this.type === o.parenL || v(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
5781
5772
|
var u = this.parseMaybeConditional(e, t);
|
|
@@ -5802,7 +5793,7 @@ function Sr(e) {
|
|
|
5802
5793
|
return (a.type !== "ArrowFunctionExpression" || (i = a.extra) != null && i.parenthesized) && r(), f?.params.length !== 0 && p.resetStartLocationFromNode(a, f), a.typeParameters = f, a;
|
|
5803
5794
|
}, l);
|
|
5804
5795
|
if (!g.error && !g.aborted) return f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5805
|
-
if (!u && (
|
|
5796
|
+
if (!u && (pr(!0), !(d = this.tryParse(function() {
|
|
5806
5797
|
return p.parseMaybeAssignOrigin(e, t, n);
|
|
5807
5798
|
}, l)).error)) return d.node;
|
|
5808
5799
|
if ((a = u) != null && a.node) return this.setLookaheadState(u.failState), u.node;
|
|
@@ -5867,7 +5858,7 @@ function Sr(e) {
|
|
|
5867
5858
|
default: return !1;
|
|
5868
5859
|
}
|
|
5869
5860
|
}, x.toAssignable = function(t, n, r) {
|
|
5870
|
-
switch (n === void 0 && (n = !1), r === void 0 && (r = new
|
|
5861
|
+
switch (n === void 0 && (n = !1), r === void 0 && (r = new ar()), t.type) {
|
|
5871
5862
|
case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(t, n, r);
|
|
5872
5863
|
case "TSAsExpression":
|
|
5873
5864
|
case "TSSatisfiesExpression":
|
|
@@ -5924,7 +5915,7 @@ function Sr(e) {
|
|
|
5924
5915
|
if (this.options.ecmaVersion >= 6) {
|
|
5925
5916
|
var s = this.maybeInArrowParameters;
|
|
5926
5917
|
this.maybeInArrowParameters = !0, this.next();
|
|
5927
|
-
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new
|
|
5918
|
+
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new ar(), h = this.yieldPos, g = this.awaitPos;
|
|
5928
5919
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR;) {
|
|
5929
5920
|
if (f ? f = !1 : this.expect(o.comma), a && this.afterTrailingComma(o.parenR, !0)) {
|
|
5930
5921
|
p = !0;
|
|
@@ -5993,7 +5984,7 @@ function Sr(e) {
|
|
|
5993
5984
|
return u.typeParameters = a, u;
|
|
5994
5985
|
}
|
|
5995
5986
|
if (!r && c.eat(o.parenL)) {
|
|
5996
|
-
var p = new
|
|
5987
|
+
var p = new ar(), m = c.startNodeAt(t, n);
|
|
5997
5988
|
return m.callee = e, m.arguments = c.parseExprList(o.parenR, c.options.ecmaVersion >= 8, !1, p), c.tsCheckForInvalidTypeCasts(m.arguments), m.typeParameters = a, l && (m.optional = d), c.checkExpressionErrors(p, !0), e = c.finishNode(m, "CallExpression");
|
|
5998
5989
|
}
|
|
5999
5990
|
var h = c.type;
|
|
@@ -6013,7 +6004,7 @@ function Sr(e) {
|
|
|
6013
6004
|
} else if (!r && this.eat(o.parenL)) {
|
|
6014
6005
|
var v = this.maybeInArrowParameters;
|
|
6015
6006
|
this.maybeInArrowParameters = !0;
|
|
6016
|
-
var te = new
|
|
6007
|
+
var te = new ar(), ne = this.yieldPos, re = this.awaitPos, ie = this.awaitIdentPos;
|
|
6017
6008
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
6018
6009
|
var y = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, te);
|
|
6019
6010
|
if (i && !h && this.shouldParseAsyncArrow()) this.checkPatternErrors(te, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = ne, this.awaitPos = re, this.awaitIdentPos = ie, e = this.parseSubscriptAsyncArrow(t, n, y, s);
|
|
@@ -6059,7 +6050,7 @@ function Sr(e) {
|
|
|
6059
6050
|
for (this.expect(o.braceL); this.type !== o.braceR;) if (this.match(p.at)) c.push(this.parseDecorator());
|
|
6060
6051
|
else {
|
|
6061
6052
|
var l = this.parseClassElement(e.superClass !== null);
|
|
6062
|
-
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" &&
|
|
6053
|
+
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" && or(i, l) && this.raiseRecoverable(l.key.start, "Identifier '#" + l.key.name + "' has already been declared"));
|
|
6063
6054
|
}
|
|
6064
6055
|
return this.strict = r, this.next(), c.length && this.raise(this.start, "Decorators must be attached to a class element."), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
6065
6056
|
} finally {
|
|
@@ -6070,7 +6061,7 @@ function Sr(e) {
|
|
|
6070
6061
|
return e && (t.typeParameters = e), t;
|
|
6071
6062
|
}, x.parseMethod = function(e, t, n, r, i) {
|
|
6072
6063
|
var a = this.startNode(), s = this.yieldPos, c = this.awaitPos, l = this.awaitIdentPos;
|
|
6073
|
-
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
6064
|
+
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | gr(t, a.generator) | (n ? 128 : 0)), this.expect(o.parenL), a.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1, { isClassMethod: r }), this.yieldPos = s, this.awaitPos = c, this.awaitIdentPos = l, i && i.abstract && a.body) {
|
|
6074
6065
|
var u = i.key;
|
|
6075
6066
|
this.raise(i.start, Y.AbstractMethodHasImplementation({ methodName: u.type !== "Identifier" || i.computed ? "[" + this.input.slice(u.start, u.end) + "]" : u.name }));
|
|
6076
6067
|
}
|
|
@@ -6136,11 +6127,11 @@ function Sr(e) {
|
|
|
6136
6127
|
for (r.attributes = []; this.type !== o.slash && this.type !== p.jsxTagEnd;) r.attributes.push(this.jsx_parseAttribute());
|
|
6137
6128
|
return r.selfClosing = this.eat(o.slash), this.expect(p.jsxTagEnd), this.finishNode(r, i ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
6138
6129
|
}, x.enterScope = function(t) {
|
|
6139
|
-
t ===
|
|
6130
|
+
t === rr && this.importsStack.push([]), e.prototype.enterScope.call(this, t);
|
|
6140
6131
|
var n = e.prototype.currentScope.call(this);
|
|
6141
6132
|
n.types = [], n.enums = [], n.constEnums = [], n.classes = [], n.exportOnlyBindings = [];
|
|
6142
6133
|
}, x.exitScope = function() {
|
|
6143
|
-
e.prototype.currentScope.call(this).flags ===
|
|
6134
|
+
e.prototype.currentScope.call(this).flags === rr && this.importsStack.pop(), e.prototype.exitScope.call(this);
|
|
6144
6135
|
}, x.hasImport = function(e, t) {
|
|
6145
6136
|
var n = this.importsStack.length;
|
|
6146
6137
|
if (this.importsStack[n - 1].indexOf(e) > -1) return !0;
|
|
@@ -6178,13 +6169,13 @@ function Sr(e) {
|
|
|
6178
6169
|
get: function() {
|
|
6179
6170
|
return i;
|
|
6180
6171
|
}
|
|
6181
|
-
}]) &&
|
|
6172
|
+
}]) && Yn(ie.prototype, y), b && Yn(ie, b), Object.defineProperty(ie, "prototype", { writable: !1 }), t;
|
|
6182
6173
|
}(t);
|
|
6183
6174
|
};
|
|
6184
6175
|
}
|
|
6185
6176
|
//#endregion
|
|
6186
6177
|
//#region src/utilities/index.ts
|
|
6187
|
-
var
|
|
6178
|
+
var xr = [
|
|
6188
6179
|
{
|
|
6189
6180
|
idPrefix: "dpuse-app",
|
|
6190
6181
|
typeId: "app",
|
|
@@ -6251,8 +6242,8 @@ var Cr = [
|
|
|
6251
6242
|
isPublished: !0,
|
|
6252
6243
|
uploadGroupName: void 0
|
|
6253
6244
|
}
|
|
6254
|
-
],
|
|
6255
|
-
async function
|
|
6245
|
+
], Sr = r(i);
|
|
6246
|
+
async function Cr(e) {
|
|
6256
6247
|
let r;
|
|
6257
6248
|
try {
|
|
6258
6249
|
r = await t.readdir(e, { withFileTypes: !0 });
|
|
@@ -6272,13 +6263,13 @@ async function Tr(e) {
|
|
|
6272
6263
|
}
|
|
6273
6264
|
}));
|
|
6274
6265
|
}
|
|
6275
|
-
async function
|
|
6266
|
+
async function wr(e, n) {
|
|
6276
6267
|
return t.readdir(e, n);
|
|
6277
6268
|
}
|
|
6278
6269
|
async function X(e, n, r = [], i) {
|
|
6279
6270
|
let a = `${n} ${r.join(" ")}`;
|
|
6280
6271
|
e !== void 0 && $(`${e} - exec(${a})`);
|
|
6281
|
-
let { stdout: o, stderr: s } = await
|
|
6272
|
+
let { stdout: o, stderr: s } = await Sr(a);
|
|
6282
6273
|
i === void 0 ? o.trim() && console.log(o.trim()) : await t.writeFile(i, o.trim(), "utf8"), s.trim() && console.error(s.trim());
|
|
6283
6274
|
}
|
|
6284
6275
|
async function Z(e, t, n = [], r = !1, i = !1) {
|
|
@@ -6294,44 +6285,44 @@ async function Z(e, t, n = [], r = !1, i = !1) {
|
|
|
6294
6285
|
async function Q(e) {
|
|
6295
6286
|
return JSON.parse(await t.readFile(e, "utf8"));
|
|
6296
6287
|
}
|
|
6297
|
-
async function
|
|
6288
|
+
async function Tr(e) {
|
|
6298
6289
|
return await t.readFile(e, "utf8");
|
|
6299
6290
|
}
|
|
6300
|
-
async function
|
|
6291
|
+
async function Er(e) {
|
|
6301
6292
|
try {
|
|
6302
6293
|
await t.unlink(e);
|
|
6303
6294
|
} catch (e) {
|
|
6304
6295
|
if (e.code !== "ENOENT") throw e;
|
|
6305
6296
|
}
|
|
6306
6297
|
}
|
|
6307
|
-
async function
|
|
6298
|
+
async function Dr(e, n) {
|
|
6308
6299
|
await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
|
|
6309
6300
|
}
|
|
6310
|
-
async function
|
|
6301
|
+
async function Or(e, n) {
|
|
6311
6302
|
await t.writeFile(e, n, "utf8");
|
|
6312
6303
|
}
|
|
6313
|
-
function
|
|
6304
|
+
function kr(e) {
|
|
6314
6305
|
let t = "─".repeat(Math.max(e.length + 60, 60));
|
|
6315
6306
|
console.info(`\n[36m${t}`), console.info(`▶️ ${e}`), console.info(`${t}[0m`);
|
|
6316
6307
|
}
|
|
6317
|
-
function
|
|
6308
|
+
function Ar(e) {
|
|
6318
6309
|
console.info(`\n✅ ${e}\n`);
|
|
6319
6310
|
}
|
|
6320
6311
|
function $(e) {
|
|
6321
6312
|
console.info(`\n${e}\n`);
|
|
6322
6313
|
}
|
|
6323
|
-
function
|
|
6324
|
-
let t =
|
|
6314
|
+
function jr(e) {
|
|
6315
|
+
let t = xr.find((t) => e.startsWith(t.idPrefix));
|
|
6325
6316
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
6326
6317
|
return t;
|
|
6327
6318
|
}
|
|
6328
|
-
function
|
|
6329
|
-
let t =
|
|
6319
|
+
function Mr(e) {
|
|
6320
|
+
let t = F.extend(br()).parse(e, {
|
|
6330
6321
|
ecmaVersion: "latest",
|
|
6331
6322
|
sourceType: "module",
|
|
6332
6323
|
locations: !0
|
|
6333
6324
|
}), n = [];
|
|
6334
|
-
return
|
|
6325
|
+
return Nr(t, (e) => {
|
|
6335
6326
|
if (e.type !== "MethodDefinition") return;
|
|
6336
6327
|
let t = e, r = t.key;
|
|
6337
6328
|
if (r.type !== "Identifier") return;
|
|
@@ -6339,7 +6330,7 @@ function Pr(e) {
|
|
|
6339
6330
|
i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
|
|
6340
6331
|
}), n;
|
|
6341
6332
|
}
|
|
6342
|
-
function
|
|
6333
|
+
function Nr(e, t) {
|
|
6343
6334
|
t(e);
|
|
6344
6335
|
for (let [n, r] of Object.entries(e)) {
|
|
6345
6336
|
if ([
|
|
@@ -6352,19 +6343,19 @@ function Fr(e, t) {
|
|
|
6352
6343
|
let e = r;
|
|
6353
6344
|
if (Array.isArray(e)) for (let n of e) {
|
|
6354
6345
|
let e = n;
|
|
6355
|
-
e && typeof e.type == "string" &&
|
|
6346
|
+
e && typeof e.type == "string" && Nr(e, t);
|
|
6356
6347
|
}
|
|
6357
|
-
else e && typeof e == "object" && typeof e.type == "string" &&
|
|
6348
|
+
else e && typeof e == "object" && typeof e.type == "string" && Nr(e, t);
|
|
6358
6349
|
}
|
|
6359
6350
|
}
|
|
6360
|
-
function
|
|
6351
|
+
function Pr(e, t, n, r) {
|
|
6361
6352
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
6362
6353
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
6363
6354
|
return `${e.slice(0, Math.max(0, i + n.length))}\n${t}\n${e.slice(Math.max(0, a))}`;
|
|
6364
6355
|
}
|
|
6365
6356
|
//#endregion
|
|
6366
6357
|
//#region src/utilities/cloudflare.ts
|
|
6367
|
-
async function
|
|
6358
|
+
async function Fr() {
|
|
6368
6359
|
let e = await Q("config.json"), t = {
|
|
6369
6360
|
body: JSON.stringify(e),
|
|
6370
6361
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6372,7 +6363,7 @@ async function Lr() {
|
|
|
6372
6363
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6373
6364
|
if (!n.ok) throw Error(await n.text());
|
|
6374
6365
|
}
|
|
6375
|
-
async function
|
|
6366
|
+
async function Ir(e) {
|
|
6376
6367
|
let t = e.id, n = {
|
|
6377
6368
|
body: JSON.stringify(e),
|
|
6378
6369
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6380,10 +6371,10 @@ async function Rr(e) {
|
|
|
6380
6371
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6381
6372
|
if (!r.ok) throw Error(await r.text());
|
|
6382
6373
|
}
|
|
6383
|
-
async function
|
|
6374
|
+
async function Lr(e, t) {
|
|
6384
6375
|
let n = `v${e.version}`;
|
|
6385
6376
|
async function r(e, r = "") {
|
|
6386
|
-
let i = await
|
|
6377
|
+
let i = await wr(e, { withFileTypes: !0 });
|
|
6387
6378
|
for (let a of i) {
|
|
6388
6379
|
let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name;
|
|
6389
6380
|
if (a.isDirectory()) continue;
|
|
@@ -6395,12 +6386,12 @@ async function zr(e, t) {
|
|
|
6395
6386
|
}
|
|
6396
6387
|
//#endregion
|
|
6397
6388
|
//#region src/operations/manageProject.ts
|
|
6398
|
-
var
|
|
6389
|
+
var Rr = new Set([
|
|
6399
6390
|
"createObject",
|
|
6400
6391
|
"dropObject",
|
|
6401
6392
|
"removeRecords",
|
|
6402
6393
|
"upsertRecords"
|
|
6403
|
-
]),
|
|
6394
|
+
]), zr = new Set([
|
|
6404
6395
|
"auditObjectContent",
|
|
6405
6396
|
"findObjectFolderPath",
|
|
6406
6397
|
"getReadableStream",
|
|
@@ -6410,30 +6401,30 @@ var Br = new Set([
|
|
|
6410
6401
|
"retrieveChunks",
|
|
6411
6402
|
"retrieveRecords"
|
|
6412
6403
|
]);
|
|
6413
|
-
async function
|
|
6404
|
+
async function Br() {
|
|
6414
6405
|
try {
|
|
6415
|
-
|
|
6406
|
+
kr("Build Project"), await Z("1️⃣ Bundle project", "vite", ["build"]), Ar("Project built.");
|
|
6416
6407
|
} catch (e) {
|
|
6417
6408
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
6418
6409
|
}
|
|
6419
6410
|
}
|
|
6420
|
-
async function
|
|
6411
|
+
async function Vr() {
|
|
6421
6412
|
try {
|
|
6422
|
-
|
|
6413
|
+
kr("Release Project");
|
|
6423
6414
|
let e = await Q("package.json"), t = await Q("config.json");
|
|
6424
|
-
await
|
|
6425
|
-
let n =
|
|
6415
|
+
await Xr("1️⃣", e);
|
|
6416
|
+
let n = jr(t.id);
|
|
6426
6417
|
switch (n.typeId) {
|
|
6427
6418
|
case "connector":
|
|
6428
|
-
t = await
|
|
6419
|
+
t = await Ur("2️⃣", e);
|
|
6429
6420
|
break;
|
|
6430
6421
|
case "context":
|
|
6431
|
-
t = await
|
|
6422
|
+
t = await Wr("2️⃣", e);
|
|
6432
6423
|
break;
|
|
6433
6424
|
case "presenter":
|
|
6434
|
-
t = await
|
|
6425
|
+
t = await Gr("2️⃣", e);
|
|
6435
6426
|
break;
|
|
6436
|
-
default: t = await
|
|
6427
|
+
default: t = await Hr("2️⃣", e);
|
|
6437
6428
|
}
|
|
6438
6429
|
if (await Z("3️⃣ Bundle project", "vite", ["build"]), await X("4️⃣ Stage changes", "git", ["add", "."]), await X("5️⃣ Commit changes", "git", [
|
|
6439
6430
|
"commit",
|
|
@@ -6443,78 +6434,78 @@ async function Ur() {
|
|
|
6443
6434
|
"push",
|
|
6444
6435
|
"origin",
|
|
6445
6436
|
"main:main"
|
|
6446
|
-
]), n.typeId === "app") $("7️⃣ Register module"), await
|
|
6447
|
-
else if (n.typeId === "engine") $("7️⃣ Register module"), await
|
|
6437
|
+
]), n.typeId === "app") $("7️⃣ Register module"), await Fr();
|
|
6438
|
+
else if (n.typeId === "engine") $("7️⃣ Register module"), await Lr(e, `dpuse-engine-eu/${n.uploadGroupName}`), await Ir(t);
|
|
6448
6439
|
else if (n.uploadGroupName === void 0) $("7️⃣ Registration NOT required.");
|
|
6449
6440
|
else {
|
|
6450
6441
|
$("7️⃣ Register module");
|
|
6451
6442
|
let r = t.id.split("-").slice(2).join("-");
|
|
6452
|
-
await
|
|
6443
|
+
await Lr(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Ir(t);
|
|
6453
6444
|
}
|
|
6454
6445
|
if (n.isPublished) {
|
|
6455
6446
|
let e = ".npmrc";
|
|
6456
6447
|
try {
|
|
6457
|
-
await
|
|
6448
|
+
await Or(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Z("8️⃣ Publish to npm", "npm", [
|
|
6458
6449
|
"publish",
|
|
6459
6450
|
"--access",
|
|
6460
6451
|
"public"
|
|
6461
6452
|
]);
|
|
6462
6453
|
} finally {
|
|
6463
|
-
await
|
|
6454
|
+
await Er(e);
|
|
6464
6455
|
}
|
|
6465
6456
|
} else $(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
6466
|
-
|
|
6457
|
+
Ar(`Project version '${e.version}' released.`);
|
|
6467
6458
|
} catch (e) {
|
|
6468
6459
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
6469
6460
|
}
|
|
6470
6461
|
}
|
|
6471
|
-
async function
|
|
6462
|
+
async function Hr(e, t) {
|
|
6472
6463
|
$(`${e} Build project configuration`);
|
|
6473
6464
|
let n = await Q("config.json");
|
|
6474
|
-
return t.name != null && (n.id = t.name.replace("@dpuse/", "").replace("@dpuse/", "")), t.version != null && (n.version = t.version), await
|
|
6465
|
+
return t.name != null && (n.id = t.name.replace("@dpuse/", "").replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Dr("config.json", n), n;
|
|
6475
6466
|
}
|
|
6476
|
-
async function
|
|
6467
|
+
async function Ur(e, t) {
|
|
6477
6468
|
$(`${e} Build connector project configuration`);
|
|
6478
|
-
let [n, r] = await Promise.all([Q("config.json"),
|
|
6469
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(ke, n);
|
|
6479
6470
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6480
|
-
let a =
|
|
6481
|
-
return await
|
|
6471
|
+
let a = Mr(r);
|
|
6472
|
+
return await qr(t, n, a, Kr(a));
|
|
6482
6473
|
}
|
|
6483
|
-
async function
|
|
6474
|
+
async function Wr(e, t) {
|
|
6484
6475
|
$(`${e} Build context project configuration`);
|
|
6485
|
-
let [n, r] = await Promise.all([Q("config.json"),
|
|
6476
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(Me, n);
|
|
6486
6477
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6487
|
-
return await
|
|
6478
|
+
return await qr(t, n, Mr(r));
|
|
6488
6479
|
}
|
|
6489
|
-
async function
|
|
6480
|
+
async function Gr(e, t) {
|
|
6490
6481
|
$(`${e} Build presenter project configuration`);
|
|
6491
|
-
let [n, r] = await Promise.all([Q("config.json"),
|
|
6482
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(Pe, n);
|
|
6492
6483
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6493
|
-
return await
|
|
6484
|
+
return await qr(t, n, Mr(r));
|
|
6494
6485
|
}
|
|
6495
|
-
function
|
|
6486
|
+
function Kr(e) {
|
|
6496
6487
|
let t = !1, n = !1;
|
|
6497
|
-
for (let r of e)
|
|
6488
|
+
for (let r of e) zr.has(r) && (t = !0), Rr.has(r) && (n = !0);
|
|
6498
6489
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6499
6490
|
}
|
|
6500
|
-
async function
|
|
6501
|
-
return n.length > 0 ? (console.info(`ℹ️ Implements ${n.length} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await
|
|
6491
|
+
async function qr(e, t, n, r) {
|
|
6492
|
+
return n.length > 0 ? (console.info(`ℹ️ Implements ${n.length} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Dr("config.json", t), t;
|
|
6502
6493
|
}
|
|
6503
|
-
async function
|
|
6494
|
+
async function Jr() {
|
|
6504
6495
|
try {
|
|
6505
|
-
|
|
6496
|
+
kr("Synchronise Project with GitHub");
|
|
6506
6497
|
let e = await Q("package.json"), t = await Q("config.json");
|
|
6507
|
-
switch (await
|
|
6498
|
+
switch (await Xr("1️⃣", e), jr(t.id).typeId) {
|
|
6508
6499
|
case "connector":
|
|
6509
|
-
await
|
|
6500
|
+
await Ur("2️⃣", e);
|
|
6510
6501
|
break;
|
|
6511
6502
|
case "context":
|
|
6512
|
-
await
|
|
6503
|
+
await Wr("2️⃣", e);
|
|
6513
6504
|
break;
|
|
6514
6505
|
case "presenter":
|
|
6515
|
-
await
|
|
6506
|
+
await Gr("2️⃣", e);
|
|
6516
6507
|
break;
|
|
6517
|
-
default: await
|
|
6508
|
+
default: await Hr("2️⃣", e);
|
|
6518
6509
|
}
|
|
6519
6510
|
await X("3️⃣ Stage changes", "git", ["add", "."]), await X("4️⃣ Commit changes", "git", [
|
|
6520
6511
|
"commit",
|
|
@@ -6524,28 +6515,28 @@ async function Xr() {
|
|
|
6524
6515
|
"push",
|
|
6525
6516
|
"origin",
|
|
6526
6517
|
"main:main"
|
|
6527
|
-
]),
|
|
6518
|
+
]), Ar(`Project version '${e.version}' synchronised with GitHub.`);
|
|
6528
6519
|
} catch (e) {
|
|
6529
6520
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
6530
6521
|
}
|
|
6531
6522
|
}
|
|
6532
|
-
function
|
|
6523
|
+
function Yr() {
|
|
6533
6524
|
try {
|
|
6534
|
-
|
|
6525
|
+
kr("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
6535
6526
|
} catch (e) {
|
|
6536
6527
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
6537
6528
|
}
|
|
6538
6529
|
}
|
|
6539
|
-
async function
|
|
6540
|
-
if ($(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await
|
|
6530
|
+
async function Xr(e, t, n = "./") {
|
|
6531
|
+
if ($(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await Dr(`${n}package.json`, t);
|
|
6541
6532
|
else {
|
|
6542
6533
|
let e = t.version, r = t.version.split(".");
|
|
6543
|
-
t.version = `${r[0]}.${r[1]}.${Number(r[2]) + 1}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`), await
|
|
6534
|
+
t.version = `${r[0]}.${r[1]}.${Number(r[2]) + 1}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`), await Dr(`${n}package.json`, t);
|
|
6544
6535
|
}
|
|
6545
6536
|
}
|
|
6546
6537
|
//#endregion
|
|
6547
6538
|
//#region src/operations/auditDependencies.ts
|
|
6548
|
-
var
|
|
6539
|
+
var Zr = {
|
|
6549
6540
|
critical: {
|
|
6550
6541
|
color: "D32F2F",
|
|
6551
6542
|
label: "critical"
|
|
@@ -6566,13 +6557,13 @@ var $r = {
|
|
|
6566
6557
|
color: "616161",
|
|
6567
6558
|
label: "unknown"
|
|
6568
6559
|
}
|
|
6569
|
-
},
|
|
6570
|
-
async function
|
|
6560
|
+
}, Qr = "<!-- OWASP_BADGES_START -->", $r = "<!-- OWASP_BADGES_END -->";
|
|
6561
|
+
async function ei() {
|
|
6571
6562
|
try {
|
|
6572
|
-
|
|
6563
|
+
kr("Audit Dependencies");
|
|
6573
6564
|
let e = await Q("package.json"), t = [];
|
|
6574
6565
|
try {
|
|
6575
|
-
let e = (await
|
|
6566
|
+
let e = (await wr("dependency-check-bin")).toSorted((e, t) => e.localeCompare(t)).at(-1);
|
|
6576
6567
|
e != null && e !== "" && t.push("--owasp-bin", `dependency-check-bin/${e}/dependency-check/bin/dependency-check.sh`);
|
|
6577
6568
|
} catch {}
|
|
6578
6569
|
await Z("1️⃣", "owasp-dependency-check", [
|
|
@@ -6585,12 +6576,12 @@ async function ni() {
|
|
|
6585
6576
|
"--nodePackageSkipDevDependencies",
|
|
6586
6577
|
"--nvdApiKey",
|
|
6587
6578
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
6588
|
-
]), await
|
|
6579
|
+
]), await ti("2️⃣"), await Z("3️⃣ Check using 'npm audit'", "npm", ["audit"]), Ar("Dependencies audited.");
|
|
6589
6580
|
} catch (e) {
|
|
6590
6581
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
6591
6582
|
}
|
|
6592
6583
|
}
|
|
6593
|
-
async function
|
|
6584
|
+
async function ti(e) {
|
|
6594
6585
|
$(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
6595
6586
|
let t = await Q("dependency-check-reports/dependency-check-report.json"), n = {
|
|
6596
6587
|
critical: 0,
|
|
@@ -6603,14 +6594,14 @@ async function ri(e) {
|
|
|
6603
6594
|
let e = t.severity?.toLowerCase() ?? "unknown";
|
|
6604
6595
|
e in n ? n[e]++ : n.unknown++;
|
|
6605
6596
|
}
|
|
6606
|
-
let r = await
|
|
6607
|
-
await
|
|
6597
|
+
let r = await ni(n);
|
|
6598
|
+
await Or("README.md", Pr(await Tr("./README.md"), r.join(" "), Qr, $r)), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
6608
6599
|
}
|
|
6609
|
-
async function
|
|
6600
|
+
async function ni(e) {
|
|
6610
6601
|
let t = await Q("config.json"), n = [];
|
|
6611
6602
|
if (Object.values(e).reduce((e, t) => e + t, 0) === 0) console.info("No vulnerabilities found."), n.push(`[](https://dpuse.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
6612
6603
|
else for (let [r, i] of Object.entries(e)) {
|
|
6613
|
-
let e =
|
|
6604
|
+
let e = Zr[r];
|
|
6614
6605
|
if (console.warn(`⚠️ ${i} ${e.label} vulnerability(ies) found.`), i === 0) continue;
|
|
6615
6606
|
let a = `https://img.shields.io/badge/OWASP-${i}%20${e.label}-${e.color}`;
|
|
6616
6607
|
n.push(`[](https://dpuse.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
@@ -6619,23 +6610,23 @@ async function ii(e) {
|
|
|
6619
6610
|
}
|
|
6620
6611
|
//#endregion
|
|
6621
6612
|
//#region src/operations/checkDependencies.ts
|
|
6622
|
-
async function
|
|
6613
|
+
async function ri() {
|
|
6623
6614
|
try {
|
|
6624
|
-
|
|
6615
|
+
kr("Check Dependencies"), await Z("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Z("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", [
|
|
6625
6616
|
"-i",
|
|
6626
6617
|
"--dep",
|
|
6627
6618
|
"dev,prod,peer,optional"
|
|
6628
|
-
]),
|
|
6619
|
+
]), Ar("Dependencies checked.");
|
|
6629
6620
|
} catch (e) {
|
|
6630
6621
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
6631
6622
|
}
|
|
6632
6623
|
}
|
|
6633
6624
|
//#endregion
|
|
6634
6625
|
//#region src/operations/documentDependencies.ts
|
|
6635
|
-
var
|
|
6636
|
-
async function
|
|
6626
|
+
var ii = "<!-- DEPENDENCY_LICENSES_START -->", ai = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
6627
|
+
async function oi(e = [], t = !0) {
|
|
6637
6628
|
try {
|
|
6638
|
-
|
|
6629
|
+
kr("Document Dependencies");
|
|
6639
6630
|
let n = e.flatMap((e) => ["--allowed", `'${e}'`]);
|
|
6640
6631
|
await X("1️⃣ Generate 'licenses.json' file", "license-report", [
|
|
6641
6632
|
"--config",
|
|
@@ -6663,7 +6654,7 @@ async function ci(e = [], t = !0) {
|
|
|
6663
6654
|
])) : ($("3️⃣ Skip 'licenses/licenseTree.json' file generate"), $("4️⃣ Skip 'licenses/licenseTree.json' file check"));
|
|
6664
6655
|
let r = process.env.GITHUB_TOKEN;
|
|
6665
6656
|
if (r == null || r === "" || r.startsWith("op://")) throw Error("GITHUB_TOKEN is not resolved. Run the script via \"npm run document\" to use 1Password resolution.");
|
|
6666
|
-
await
|
|
6657
|
+
await Cr("licenses/downloads"), await X("5️⃣ Download license files", "license-downloader", [
|
|
6667
6658
|
"--source",
|
|
6668
6659
|
"licenses/licenses.json",
|
|
6669
6660
|
"--licDir",
|
|
@@ -6671,12 +6662,12 @@ async function ci(e = [], t = !0) {
|
|
|
6671
6662
|
"--githubToken.tokenEnvVar",
|
|
6672
6663
|
"GITHUB_TOKEN",
|
|
6673
6664
|
"--download"
|
|
6674
|
-
]), await
|
|
6665
|
+
]), await si("6️⃣", t), Ar("Dependencies documented.");
|
|
6675
6666
|
} catch (e) {
|
|
6676
6667
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6677
6668
|
}
|
|
6678
6669
|
}
|
|
6679
|
-
async function
|
|
6670
|
+
async function si(e, t) {
|
|
6680
6671
|
$(`${e} Insert licenses into 'README.md'`);
|
|
6681
6672
|
let n = await Q("licenses/licenses.json"), r = await Q("licenses/downloads/licenses.ext.json"), i = [];
|
|
6682
6673
|
t && (i = await Q("licenses/licenseTree.json"));
|
|
@@ -6700,13 +6691,13 @@ async function li(e, t) {
|
|
|
6700
6691
|
return e.values();
|
|
6701
6692
|
})()], o = "|Name|Type|Installed|Latest|Latest Released|Deps|Document|\n|:-|:-|:-:|:-:|:-|-:|:-|\n";
|
|
6702
6693
|
for (let e of a) {
|
|
6703
|
-
let t = e.installedVersion === e.remoteVersion ? e.installedVersion : `${e.installedVersion} ⚠️`, n = e.latestRemoteModified ?
|
|
6694
|
+
let t = e.installedVersion === e.remoteVersion ? e.installedVersion : `${e.installedVersion} ⚠️`, n = e.latestRemoteModified ? ci(e.latestRemoteModified.split("T")[0]) : "n/a", r = e.dependencyCount != null && e.dependencyCount >= 0 ? e.dependencyCount : "n/a", i;
|
|
6704
6695
|
i = e.licenseFileLink == null || e.licenseFileLink == "" ? "⚠️ No license file" : `[${e.licenseFileLink.slice(Math.max(0, e.licenseFileLink.lastIndexOf("/") + 1))}](${e.licenseFileLink})`, o += `|${e.name}|${e.licenseType}|${t}|${e.remoteVersion}|${n}|${r}|${i}|\n`;
|
|
6705
6696
|
}
|
|
6706
|
-
let s =
|
|
6707
|
-
await
|
|
6697
|
+
let s = Pr(await Tr("./README.md"), o, ii, ai);
|
|
6698
|
+
await Or("README.md", s), console.info("OWASP audit badge(s) inserted into 'README.md'"), await Or("README.md", s);
|
|
6708
6699
|
}
|
|
6709
|
-
function
|
|
6700
|
+
function ci(e) {
|
|
6710
6701
|
if (e == null || e === "") return "n/a";
|
|
6711
6702
|
let t = e.split("T")[0];
|
|
6712
6703
|
if (t == null || t === "") return "n/a";
|
|
@@ -6715,31 +6706,31 @@ function ui(e) {
|
|
|
6715
6706
|
}
|
|
6716
6707
|
//#endregion
|
|
6717
6708
|
//#region src/operations/formatCode.ts
|
|
6718
|
-
async function
|
|
6709
|
+
async function li() {
|
|
6719
6710
|
try {
|
|
6720
|
-
|
|
6711
|
+
kr("Format Code"), await Z("1️⃣ Format", "prettier", [
|
|
6721
6712
|
"--write",
|
|
6722
6713
|
"*.json",
|
|
6723
6714
|
"*.md",
|
|
6724
6715
|
"*.ts",
|
|
6725
6716
|
...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
|
|
6726
|
-
]),
|
|
6717
|
+
]), Ar("Code formatted.");
|
|
6727
6718
|
} catch (e) {
|
|
6728
6719
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
6729
6720
|
}
|
|
6730
6721
|
}
|
|
6731
6722
|
//#endregion
|
|
6732
6723
|
//#region src/operations/lintCode.ts
|
|
6733
|
-
async function
|
|
6724
|
+
async function ui() {
|
|
6734
6725
|
try {
|
|
6735
|
-
|
|
6726
|
+
kr("Lint Code"), await Z("1️⃣ Lint", "eslint", ["."]), Ar("Code linted.");
|
|
6736
6727
|
} catch (e) {
|
|
6737
6728
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
6738
6729
|
}
|
|
6739
6730
|
}
|
|
6740
6731
|
//#endregion
|
|
6741
6732
|
//#region src/operations/updateDPUseDependencies.ts
|
|
6742
|
-
var
|
|
6733
|
+
var di = [
|
|
6743
6734
|
"1️⃣",
|
|
6744
6735
|
"2️⃣",
|
|
6745
6736
|
"3️⃣",
|
|
@@ -6750,26 +6741,26 @@ var pi = [
|
|
|
6750
6741
|
"8️⃣",
|
|
6751
6742
|
"9️⃣"
|
|
6752
6743
|
];
|
|
6753
|
-
async function
|
|
6744
|
+
async function fi(e = []) {
|
|
6754
6745
|
try {
|
|
6755
|
-
|
|
6746
|
+
kr("Update '@dpuse/dpuse' Dependencies");
|
|
6756
6747
|
for (let [t, n] of e.entries()) {
|
|
6757
|
-
let e =
|
|
6758
|
-
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await
|
|
6748
|
+
let e = di.at(t) ?? "🔢";
|
|
6749
|
+
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await pi(jr((await Q("config.json")).id)));
|
|
6759
6750
|
}
|
|
6760
|
-
|
|
6751
|
+
Ar("'@dpuse/dpuse' dependencies updated.");
|
|
6761
6752
|
} catch (e) {
|
|
6762
6753
|
console.error("❌ Error updating '@dpuse/dpuse' dependencies.", e), process.exit(1);
|
|
6763
6754
|
}
|
|
6764
6755
|
}
|
|
6765
|
-
async function
|
|
6756
|
+
async function pi(e) {
|
|
6766
6757
|
let t = n.dirname(s(import.meta.url));
|
|
6767
|
-
await
|
|
6758
|
+
await mi(t, "../", ".editorconfig"), await mi(t, "../", ".gitattributes"), await (e.isPublished ? mi(t, "../", ".gitignore_published", ".gitignore2") : mi(t, "../", ".gitignore_unpublished", ".gitignore2")), await mi(t, "../", ".markdownlint.json"), await mi(t, "../", "LICENSE"), await mi(t, "../", "tsconfig.json", "tsconfig2.json"), e.typeId === "eslint" || (await mi(t, "../", "eslint.config.ts", "eslint.config2.ts"), await mi(t, "../", "vite.config.ts", "vite.config2.ts"), await mi(t, "../", "vitest.config.ts", "vitest.config2.ts"));
|
|
6768
6759
|
}
|
|
6769
|
-
async function
|
|
6770
|
-
let a = await
|
|
6760
|
+
async function mi(e, t, r, i) {
|
|
6761
|
+
let a = await Tr(n.resolve(e, `${t}${r}`)), o = n.resolve(process.cwd(), r.split("_")[0] ?? r), s = n.resolve(process.cwd(), i ?? r), c;
|
|
6771
6762
|
try {
|
|
6772
|
-
c = await
|
|
6763
|
+
c = await Tr(o);
|
|
6773
6764
|
} catch (e) {
|
|
6774
6765
|
if (e.code !== "ENOENT") throw e;
|
|
6775
6766
|
}
|
|
@@ -6777,11 +6768,11 @@ async function gi(e, t, r, i) {
|
|
|
6777
6768
|
console.info(`ℹ️ File '${r.split("_")[0] ?? r}' is already up to date.`);
|
|
6778
6769
|
return;
|
|
6779
6770
|
}
|
|
6780
|
-
await
|
|
6771
|
+
await Or(s, a), console.info(`ℹ️ File '${i ?? r}' synchronised.`);
|
|
6781
6772
|
}
|
|
6782
6773
|
//#endregion
|
|
6783
6774
|
//#region src/index.ts
|
|
6784
|
-
async function
|
|
6775
|
+
async function hi(e) {
|
|
6785
6776
|
try {
|
|
6786
6777
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
6787
6778
|
let n = {};
|
|
@@ -6826,6 +6817,6 @@ async function _i(e) {
|
|
|
6826
6817
|
}
|
|
6827
6818
|
}
|
|
6828
6819
|
//#endregion
|
|
6829
|
-
export {
|
|
6820
|
+
export { ei as auditDependencies, hi as buildDirectoryIndex, Br as buildProject, ri as checkDependencies, oi as documentDependencies, li as formatCode, ui as lintCode, Vr as releaseProject, Jr as syncProjectWithGitHub, Yr as testProject, fi as updateDPUseDependencies };
|
|
6830
6821
|
|
|
6831
6822
|
//# sourceMappingURL=dpuse-development.es.js.map
|