eddyter 1.3.64 → 1.3.65

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.
@@ -1,23 +1,17 @@
1
1
  var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, $r = Object.getOwnPropertyNames, qr = Object.getPrototypeOf, Kr = Object.prototype.hasOwnProperty, Jr = (h, c) => () => (c || h((c = { exports: {} }).exports, c), c.exports), rt = (h, c) => {
2
- for (var m in c)
3
- st(h, m, { get: c[m], enumerable: !0 });
2
+ for (var m in c) st(h, m, { get: c[m], enumerable: !0 });
4
3
  }, Wr = (h, c, m, f) => {
5
- if (c && typeof c == "object" || typeof c == "function")
6
- for (let x of $r(c))
7
- !Kr.call(h, x) && x !== m && st(h, x, { get: () => c[x], enumerable: !(f = Vr(c, x)) || f.enumerable });
4
+ if (c && typeof c == "object" || typeof c == "function") for (let x of $r(c)) !Kr.call(h, x) && x !== m && st(h, x, { get: () => c[x], enumerable: !(f = Vr(c, x)) || f.enumerable });
8
5
  return h;
9
6
  }, Xt = (h, c, m) => (m = h != null ? zr(qr(h)) : {}, Wr(st(m, "default", { value: h, enumerable: !0 }), h)), Gt = Jr((h) => {
10
7
  Object.defineProperty(h, "__esModule", { value: !0 });
11
8
  function c(t, e) {
12
- if (t == null)
13
- return {};
9
+ if (t == null) return {};
14
10
  var s = {};
15
- for (var r in t)
16
- if ({}.hasOwnProperty.call(t, r)) {
17
- if (e.indexOf(r) !== -1)
18
- continue;
19
- s[r] = t[r];
20
- }
11
+ for (var r in t) if ({}.hasOwnProperty.call(t, r)) {
12
+ if (e.indexOf(r) !== -1) continue;
13
+ s[r] = t[r];
14
+ }
21
15
  return s;
22
16
  }
23
17
  var m = class {
@@ -60,8 +54,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
60
54
  };
61
55
  }
62
56
  function $(t, e) {
63
- if (Array.isArray(t))
64
- return (r) => $(r, t[0]);
57
+ if (Array.isArray(t)) return (r) => $(r, t[0]);
65
58
  let s = {};
66
59
  for (let r of Object.keys(t)) {
67
60
  let i = t[r], a = typeof i == "string" ? { message: () => i } : typeof i == "function" ? { message: i } : i, { message: n } = a, o = c(a, fs), p = typeof n == "string" ? () => n : n;
@@ -75,16 +68,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
75
68
  }
76
69
  function Ps(t) {
77
70
  let e = xs();
78
- if (t == null)
79
- return e;
80
- if (t.annexB != null && t.annexB !== !1)
81
- throw new Error("The `annexB` option can only be set to `false`.");
82
- for (let s of Object.keys(e))
83
- t[s] != null && (e[s] = t[s]);
84
- if (e.startLine === 1)
85
- t.startIndex == null && e.startColumn > 0 ? e.startIndex = e.startColumn : t.startColumn == null && e.startIndex > 0 && (e.startColumn = e.startIndex);
86
- else if ((t.startColumn == null || t.startIndex == null) && t.startIndex != null)
87
- throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");
71
+ if (t == null) return e;
72
+ if (t.annexB != null && t.annexB !== !1) throw new Error("The `annexB` option can only be set to `false`.");
73
+ for (let s of Object.keys(e)) t[s] != null && (e[s] = t[s]);
74
+ if (e.startLine === 1) t.startIndex == null && e.startColumn > 0 ? e.startIndex = e.startColumn : t.startColumn == null && e.startIndex > 0 && (e.startColumn = e.startIndex);
75
+ else if ((t.startColumn == null || t.startIndex == null) && t.startIndex != null) throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");
88
76
  return e;
89
77
  }
90
78
  var { defineProperty: As } = Object, ot = (t, e) => {
@@ -231,8 +219,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
231
219
  if (e != null && this.isObjectProperty(e)) {
232
220
  let { key: r, value: i } = e;
233
221
  this.isPrivateName(r) && this.classScope.usePrivateName(this.getPrivateNameSV(r), r.loc.start), this.toAssignable(i, s);
234
- } else
235
- super.toAssignable(e, s);
222
+ } else super.toAssignable(e, s);
236
223
  }
237
224
  toAssignableObjectExpressionProp(e, s, r) {
238
225
  e.type === "Property" && (e.kind === "get" || e.kind === "set") ? this.raise(u.PatternHasAccessor, e.key) : e.type === "Property" && e.method ? this.raise(u.PatternHasMethod, e.key) : super.toAssignableObjectExpressionProp(e, s, r);
@@ -242,8 +229,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
242
229
  if (r.callee.type === "Import") {
243
230
  var i, a;
244
231
  this.castNodeTo(r, "ImportExpression"), r.source = r.arguments[0], r.options = (i = r.arguments[1]) != null ? i : null, r.attributes = (a = r.arguments[1]) != null ? a : null, delete r.arguments, delete r.callee;
245
- } else
246
- r.type === "OptionalCallExpression" ? this.castNodeTo(r, "CallExpression") : r.optional = !1;
232
+ } else r.type === "OptionalCallExpression" ? this.castNodeTo(r, "CallExpression") : r.optional = !1;
247
233
  return r;
248
234
  }
249
235
  toReferencedArguments(e) {
@@ -415,10 +401,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
415
401
  function _e(t, e) {
416
402
  let s = 65536;
417
403
  for (let r = 0, i = e.length; r < i; r += 2) {
418
- if (s += e[r], s > t)
419
- return !1;
420
- if (s += e[r + 1], s >= t)
421
- return !0;
404
+ if (s += e[r], s > t) return !1;
405
+ if (s += e[r + 1], s >= t) return !0;
422
406
  }
423
407
  return !1;
424
408
  }
@@ -484,10 +468,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
484
468
  get inStaticBlock() {
485
469
  for (let t = this.scopeStack.length - 1; ; t--) {
486
470
  let { flags: e } = this.scopeStack[t];
487
- if (e & 128)
488
- return !0;
489
- if (e & 1731)
490
- return !1;
471
+ if (e & 128) return !0;
472
+ if (e & 1731) return !1;
491
473
  }
492
474
  }
493
475
  get inNonArrowFunction() {
@@ -517,9 +499,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
517
499
  this.checkRedeclarationInScope(r, t, e, s);
518
500
  let i = r.names.get(t) || 0;
519
501
  e & 16 ? i = i | 4 : (r.firstLexicalName || (r.firstLexicalName = t), i = i | 2), r.names.set(t, i), e & 8 && this.maybeExportDefined(r, t);
520
- } else if (e & 4)
521
- for (let i = this.scopeStack.length - 1; i >= 0 && (r = this.scopeStack[i], this.checkRedeclarationInScope(r, t, e, s), r.names.set(t, (r.names.get(t) || 0) | 1), this.maybeExportDefined(r, t), !(r.flags & 1667)); --i)
522
- ;
502
+ } else if (e & 4) for (let i = this.scopeStack.length - 1; i >= 0 && (r = this.scopeStack[i], this.checkRedeclarationInScope(r, t, e, s), r.names.set(t, (r.names.get(t) || 0) | 1), this.maybeExportDefined(r, t), !(r.flags & 1667)); --i) ;
523
503
  this.parser.inModule && r.flags & 1 && this.undefinedExports.delete(t);
524
504
  }
525
505
  maybeExportDefined(t, e) {
@@ -529,10 +509,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
529
509
  this.isRedeclaredInScope(t, e, s) && this.parser.raise(u.VarRedeclaration, r, { identifierName: e });
530
510
  }
531
511
  isRedeclaredInScope(t, e, s) {
532
- if (!(s & 1))
533
- return !1;
534
- if (s & 8)
535
- return t.names.has(e);
512
+ if (!(s & 1)) return !1;
513
+ if (s & 8) return t.names.has(e);
536
514
  let r = t.names.get(e);
537
515
  return s & 16 ? (r & 2) > 0 || !this.treatFunctionsAsVarInScope(t) && (r & 1) > 0 : (r & 2) > 0 && !(t.flags & 8 && t.firstLexicalName === e) || !this.treatFunctionsAsVarInScope(t) && (r & 4) > 0;
538
516
  }
@@ -546,15 +524,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
546
524
  currentVarScopeFlags() {
547
525
  for (let t = this.scopeStack.length - 1; ; t--) {
548
526
  let { flags: e } = this.scopeStack[t];
549
- if (e & 1667)
550
- return e;
527
+ if (e & 1667) return e;
551
528
  }
552
529
  }
553
530
  currentThisScopeFlags() {
554
531
  for (let t = this.scopeStack.length - 1; ; t--) {
555
532
  let { flags: e } = this.scopeStack[t];
556
- if (e & 1731 && !(e & 4))
557
- return e;
533
+ if (e & 1731 && !(e & 4)) return e;
558
534
  }
559
535
  }
560
536
  }, Vs = class extends ze {
@@ -574,8 +550,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
574
550
  super.declareName(t, e, s);
575
551
  }
576
552
  isRedeclaredInScope(t, e, s) {
577
- if (super.isRedeclaredInScope(t, e, s))
578
- return !0;
553
+ if (super.isRedeclaredInScope(t, e, s)) return !0;
579
554
  if (s & 2048 && !t.declareFunctions.has(e)) {
580
555
  let r = t.names.get(e);
581
556
  return (r & 4) > 0 || (r & 2) > 0;
@@ -595,8 +570,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
595
570
  var Js = { const: "declare export var", let: "declare export var", type: "export type", interface: "export interface" };
596
571
  function Ws(t, e) {
597
572
  let s = [], r = [];
598
- for (let i = 0; i < t.length; i++)
599
- (e(t[i], i, t) ? s : r).push(t[i]);
573
+ for (let i = 0; i < t.length; i++) (e(t[i], i, t) ? s : r).push(t[i]);
600
574
  return [s, r];
601
575
  }
602
576
  var Xs = /\*?\s*@((?:no)?flow)\b/, Gs = (t) => class extends t {
@@ -615,13 +589,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
615
589
  addComment(e) {
616
590
  if (this.flowPragma === void 0) {
617
591
  let s = Xs.exec(e.value);
618
- if (s)
619
- if (s[1] === "flow")
620
- this.flowPragma = "flow";
621
- else if (s[1] === "noflow")
622
- this.flowPragma = "noflow";
623
- else
624
- throw new Error("Unexpected flow pragma");
592
+ if (s) if (s[1] === "flow") this.flowPragma = "flow";
593
+ else if (s[1] === "noflow") this.flowPragma = "noflow";
594
+ else throw new Error("Unexpected flow pragma");
625
595
  }
626
596
  super.addComment(e);
627
597
  }
@@ -652,22 +622,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
652
622
  return r.params = a.params, r.rest = a.rest, r.this = a._this, this.expect(11), [r.returnType, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), i.typeAnnotation = this.finishNode(r, "FunctionTypeAnnotation"), s.typeAnnotation = this.finishNode(i, "TypeAnnotation"), this.resetEndLocation(s), this.semicolon(), this.scope.declareName(e.id.name, 2048, e.id.loc.start), this.finishNode(e, "DeclareFunction");
653
623
  }
654
624
  flowParseDeclare(e, s) {
655
- if (this.match(80))
656
- return this.flowParseDeclareClass(e);
657
- if (this.match(68))
658
- return this.flowParseDeclareFunction(e);
659
- if (this.match(74))
660
- return this.flowParseDeclareVariable(e);
661
- if (this.eatContextual(127))
662
- return this.match(16) ? this.flowParseDeclareModuleExports(e) : (s && this.raise(E.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
663
- if (this.isContextual(130))
664
- return this.flowParseDeclareTypeAlias(e);
665
- if (this.isContextual(131))
666
- return this.flowParseDeclareOpaqueType(e);
667
- if (this.isContextual(129))
668
- return this.flowParseDeclareInterface(e);
669
- if (this.match(82))
670
- return this.flowParseDeclareExportDeclaration(e, s);
625
+ if (this.match(80)) return this.flowParseDeclareClass(e);
626
+ if (this.match(68)) return this.flowParseDeclareFunction(e);
627
+ if (this.match(74)) return this.flowParseDeclareVariable(e);
628
+ if (this.eatContextual(127)) return this.match(16) ? this.flowParseDeclareModuleExports(e) : (s && this.raise(E.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
629
+ if (this.isContextual(130)) return this.flowParseDeclareTypeAlias(e);
630
+ if (this.isContextual(131)) return this.flowParseDeclareOpaqueType(e);
631
+ if (this.isContextual(129)) return this.flowParseDeclareInterface(e);
632
+ if (this.match(82)) return this.flowParseDeclareExportDeclaration(e, s);
671
633
  this.unexpected();
672
634
  }
673
635
  flowParseDeclareVariable(e) {
@@ -687,16 +649,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
687
649
  }), e.kind = i || "CommonJS", this.finishNode(e, "DeclareModule");
688
650
  }
689
651
  flowParseDeclareExportDeclaration(e, s) {
690
- if (this.expect(82), this.eat(65))
691
- return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = !0, this.finishNode(e, "DeclareExportDeclaration");
652
+ if (this.expect(82), this.eat(65)) return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = !0, this.finishNode(e, "DeclareExportDeclaration");
692
653
  if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !s) {
693
654
  let r = this.state.value;
694
655
  throw this.raise(E.UnsupportedDeclareExportKind, this.state.startLoc, { unsupportedExportKind: r, suggestion: Js[r] });
695
656
  }
696
- if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131))
697
- return e.declaration = this.flowParseDeclare(this.startNode()), e.default = !1, this.finishNode(e, "DeclareExportDeclaration");
698
- if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131))
699
- return e = this.parseExport(e, null), e.type === "ExportNamedDeclaration" ? (e.default = !1, delete e.exportKind, this.castNodeTo(e, "DeclareExportDeclaration")) : this.castNodeTo(e, "DeclareExportAllDeclaration");
657
+ if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) return e.declaration = this.flowParseDeclare(this.startNode()), e.default = !1, this.finishNode(e, "DeclareExportDeclaration");
658
+ if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) return e = this.parseExport(e, null), e.type === "ExportNamedDeclaration" ? (e.default = !1, delete e.exportKind, this.castNodeTo(e, "DeclareExportDeclaration")) : this.castNodeTo(e, "DeclareExportAllDeclaration");
700
659
  this.unexpected();
701
660
  }
702
661
  flowParseDeclareModuleExports(e) {
@@ -716,19 +675,16 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
716
675
  return this.next(), this.flowParseInterfaceish(e, !1), this.finishNode(e, "DeclareInterface");
717
676
  }
718
677
  flowParseInterfaceish(e, s) {
719
- if (e.id = this.flowParseRestrictedIdentifier(!s, !0), this.scope.declareName(e.id.name, s ? 17 : 8201, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.extends = [], this.eat(81))
720
- do
721
- e.extends.push(this.flowParseInterfaceExtends());
722
- while (!s && this.eat(12));
678
+ if (e.id = this.flowParseRestrictedIdentifier(!s, !0), this.scope.declareName(e.id.name, s ? 17 : 8201, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.extends = [], this.eat(81)) do
679
+ e.extends.push(this.flowParseInterfaceExtends());
680
+ while (!s && this.eat(12));
723
681
  if (s) {
724
- if (e.implements = [], e.mixins = [], this.eatContextual(117))
725
- do
726
- e.mixins.push(this.flowParseInterfaceExtends());
727
- while (this.eat(12));
728
- if (this.eatContextual(113))
729
- do
730
- e.implements.push(this.flowParseInterfaceExtends());
731
- while (this.eat(12));
682
+ if (e.implements = [], e.mixins = [], this.eatContextual(117)) do
683
+ e.mixins.push(this.flowParseInterfaceExtends());
684
+ while (this.eat(12));
685
+ if (this.eatContextual(113)) do
686
+ e.implements.push(this.flowParseInterfaceExtends());
687
+ while (this.eat(12));
732
688
  }
733
689
  e.body = this.flowParseObjectType({ allowStatic: s, allowExact: !1, allowSpread: !1, allowProto: s, allowInexact: !1 });
734
690
  }
@@ -777,37 +733,31 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
777
733
  } finally {
778
734
  this.state.context = s;
779
735
  }
780
- } else
781
- return e();
736
+ } else return e();
782
737
  }
783
738
  flowParseTypeParameterInstantiationInExpression() {
784
- if (this.reScan_lt() === 47)
785
- return this.flowParseTypeParameterInstantiation();
739
+ if (this.reScan_lt() === 47) return this.flowParseTypeParameterInstantiation();
786
740
  }
787
741
  flowParseTypeParameterInstantiation() {
788
742
  let e = this.startNode(), s = this.state.inType;
789
743
  return this.state.inType = !0, e.params = [], this.flowInTopLevelContext(() => {
790
744
  this.expect(47);
791
745
  let r = this.state.noAnonFunctionType;
792
- for (this.state.noAnonFunctionType = !1; !this.match(48); )
793
- e.params.push(this.flowParseType()), this.match(48) || this.expect(12);
746
+ for (this.state.noAnonFunctionType = !1; !this.match(48); ) e.params.push(this.flowParseType()), this.match(48) || this.expect(12);
794
747
  this.state.noAnonFunctionType = r;
795
748
  }), this.state.inType = s, !this.state.inType && this.curContext() === D.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation");
796
749
  }
797
750
  flowParseTypeParameterInstantiationCallOrNew() {
798
- if (this.reScan_lt() !== 47)
799
- return;
751
+ if (this.reScan_lt() !== 47) return;
800
752
  let e = this.startNode(), s = this.state.inType;
801
- for (e.params = [], this.state.inType = !0, this.expect(47); !this.match(48); )
802
- e.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12);
753
+ for (e.params = [], this.state.inType = !0, this.expect(47); !this.match(48); ) e.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12);
803
754
  return this.expect(48), this.state.inType = s, this.finishNode(e, "TypeParameterInstantiation");
804
755
  }
805
756
  flowParseInterfaceType() {
806
757
  let e = this.startNode();
807
- if (this.expectContextual(129), e.extends = [], this.eat(81))
808
- do
809
- e.extends.push(this.flowParseInterfaceExtends());
810
- while (this.eat(12));
758
+ if (this.expectContextual(129), e.extends = [], this.eat(81)) do
759
+ e.extends.push(this.flowParseInterfaceExtends());
760
+ while (this.eat(12));
811
761
  return e.body = this.flowParseObjectType({ allowStatic: !1, allowExact: !1, allowSpread: !1, allowProto: !1, allowInexact: !1 }), this.finishNode(e, "InterfaceTypeAnnotation");
812
762
  }
813
763
  flowParseObjectPropertyKey() {
@@ -820,8 +770,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
820
770
  return e.static = s, e.id = this.flowParseObjectPropertyKey(), this.expect(3), this.expect(3), this.match(47) || this.match(10) ? (e.method = !0, e.optional = !1, e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))) : (e.method = !1, this.eat(17) && (e.optional = !0), e.value = this.flowParseTypeInitialiser()), this.finishNode(e, "ObjectTypeInternalSlot");
821
771
  }
822
772
  flowParseObjectTypeMethodish(e) {
823
- for (e.params = [], e.rest = null, e.typeParameters = null, e.this = null, this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(10), this.match(78) && (e.this = this.flowParseFunctionTypeParam(!0), e.this.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21); )
824
- e.params.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
773
+ for (e.params = [], e.rest = null, e.typeParameters = null, e.this = null, this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(10), this.match(78) && (e.this = this.flowParseFunctionTypeParam(!0), e.this.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21); ) e.params.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
825
774
  return this.eat(21) && (e.rest = this.flowParseFunctionTypeParam(!1)), this.expect(11), e.returnType = this.flowParseTypeInitialiser(), this.finishNode(e, "FunctionTypeAnnotation");
826
775
  }
827
776
  flowParseObjectTypeCallProperty(e, s) {
@@ -845,10 +794,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
845
794
  U.type !== 14 && U.type !== 17 && (this.next(), A = !0);
846
795
  }
847
796
  let L = this.flowParseVariance();
848
- if (this.eat(0))
849
- T != null && this.unexpected(T), this.eat(0) ? (L && this.unexpected(L.loc.start), o.internalSlots.push(this.flowParseObjectTypeInternalSlot(R, A))) : o.indexers.push(this.flowParseObjectTypeIndexer(R, A, L));
850
- else if (this.match(10) || this.match(47))
851
- T != null && this.unexpected(T), L && this.unexpected(L.loc.start), o.callProperties.push(this.flowParseObjectTypeCallProperty(R, A));
797
+ if (this.eat(0)) T != null && this.unexpected(T), this.eat(0) ? (L && this.unexpected(L.loc.start), o.internalSlots.push(this.flowParseObjectTypeInternalSlot(R, A))) : o.indexers.push(this.flowParseObjectTypeIndexer(R, A, L));
798
+ else if (this.match(10) || this.match(47)) T != null && this.unexpected(T), L && this.unexpected(L.loc.start), o.callProperties.push(this.flowParseObjectTypeCallProperty(R, A));
852
799
  else {
853
800
  let U = "init";
854
801
  if (this.isContextual(99) || this.isContextual(104)) {
@@ -865,8 +812,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
865
812
  return this.state.inType = n, y;
866
813
  }
867
814
  flowParseObjectTypeProperty(e, s, r, i, a, n, o) {
868
- if (this.eat(21))
869
- return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (n ? o || this.raise(E.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(E.InexactInsideNonObject, this.state.lastTokStartLoc), i && this.raise(E.InexactVariance, i), null) : (n || this.raise(E.UnexpectedSpreadType, this.state.lastTokStartLoc), r != null && this.unexpected(r), i && this.raise(E.SpreadVariance, i), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
815
+ if (this.eat(21)) return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (n ? o || this.raise(E.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(E.InexactInsideNonObject, this.state.lastTokStartLoc), i && this.raise(E.InexactVariance, i), null) : (n || this.raise(E.UnexpectedSpreadType, this.state.lastTokStartLoc), r != null && this.unexpected(r), i && this.raise(E.SpreadVariance, i), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
870
816
  {
871
817
  e.key = this.flowParseObjectPropertyKey(), e.static = s, e.proto = r != null, e.kind = a;
872
818
  let p = !1;
@@ -899,8 +845,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
899
845
  }
900
846
  flowParseTupleType() {
901
847
  let e = this.startNode();
902
- for (e.types = [], this.expect(0); this.state.pos < this.length && !this.match(3) && (e.types.push(this.flowParseType()), !this.match(3)); )
903
- this.expect(12);
848
+ for (e.types = [], this.expect(0); this.state.pos < this.length && !this.match(3) && (e.types.push(this.flowParseType()), !this.match(3)); ) this.expect(12);
904
849
  return this.expect(3), this.finishNode(e, "TupleTypeAnnotation");
905
850
  }
906
851
  flowParseFunctionTypeParam(e) {
@@ -913,8 +858,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
913
858
  }
914
859
  flowParseFunctionTypeParams(e = []) {
915
860
  let s = null, r = null;
916
- for (this.match(78) && (r = this.flowParseFunctionTypeParam(!0), r.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21); )
917
- e.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
861
+ for (this.match(78) && (r = this.flowParseFunctionTypeParam(!0), r.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21); ) e.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
918
862
  return this.eat(21) && (s = this.flowParseFunctionTypeParam(!1)), { params: e, rest: s, _this: r };
919
863
  }
920
864
  flowIdentToTypeAnnotation(e, s, r) {
@@ -953,15 +897,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
953
897
  }
954
898
  case 10: {
955
899
  let o = this.startNode();
956
- if (this.next(), !this.match(11) && !this.match(21))
957
- if (F(this.state.type) || this.match(78)) {
958
- let p = this.lookahead().type;
959
- a = p !== 17 && p !== 14;
960
- } else
961
- a = !0;
900
+ if (this.next(), !this.match(11) && !this.match(21)) if (F(this.state.type) || this.match(78)) {
901
+ let p = this.lookahead().type;
902
+ a = p !== 17 && p !== 14;
903
+ } else a = !0;
962
904
  if (a) {
963
- if (this.state.noAnonFunctionType = !1, i = this.flowParseType(), this.state.noAnonFunctionType = n, this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19))
964
- return this.expect(11), i;
905
+ if (this.state.noAnonFunctionType = !1, i = this.flowParseType(), this.state.noAnonFunctionType = n, this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) return this.expect(11), i;
965
906
  this.eat(12);
966
907
  }
967
908
  return i ? r = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]) : r = this.flowParseFunctionTypeParams(), o.params = r.params, o.rest = r.rest, o.this = r._this, this.expect(11), this.expect(19), o.returnType = this.flowParseType(), o.typeParameters = null, this.finishNode(o, "FunctionTypeAnnotation");
@@ -973,10 +914,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
973
914
  return s.value = this.match(85), this.next(), this.finishNode(s, "BooleanLiteralTypeAnnotation");
974
915
  case 53:
975
916
  if (this.state.value === "-") {
976
- if (this.next(), this.match(135))
977
- return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", s);
978
- if (this.match(136))
979
- return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", s);
917
+ if (this.next(), this.match(135)) return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", s);
918
+ if (this.match(136)) return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", s);
980
919
  throw this.raise(E.UnexpectedSubtractionOperand, this.state.startLoc);
981
920
  }
982
921
  this.unexpected();
@@ -999,8 +938,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
999
938
  if (Ue(this.state.type)) {
1000
939
  let o = Y(this.state.type);
1001
940
  return this.next(), super.createIdentifier(s, o);
1002
- } else if (F(this.state.type))
1003
- return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(e, s, this.parseIdentifier());
941
+ } else if (F(this.state.type)) return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(e, s, this.parseIdentifier());
1004
942
  }
1005
943
  this.unexpected();
1006
944
  }
@@ -1028,16 +966,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1028
966
  let e = this.startNode();
1029
967
  this.eat(45);
1030
968
  let s = this.flowParseAnonFunctionWithoutParens();
1031
- for (e.types = [s]; this.eat(45); )
1032
- e.types.push(this.flowParseAnonFunctionWithoutParens());
969
+ for (e.types = [s]; this.eat(45); ) e.types.push(this.flowParseAnonFunctionWithoutParens());
1033
970
  return e.types.length === 1 ? s : this.finishNode(e, "IntersectionTypeAnnotation");
1034
971
  }
1035
972
  flowParseUnionType() {
1036
973
  let e = this.startNode();
1037
974
  this.eat(43);
1038
975
  let s = this.flowParseIntersectionType();
1039
- for (e.types = [s]; this.eat(43); )
1040
- e.types.push(this.flowParseIntersectionType());
976
+ for (e.types = [s]; this.eat(43); ) e.types.push(this.flowParseIntersectionType());
1041
977
  return e.types.length === 1 ? s : this.finishNode(e, "UnionTypeAnnotation");
1042
978
  }
1043
979
  flowParseType() {
@@ -1050,8 +986,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1050
986
  if (this.state.type === 132 && this.state.value === "_") {
1051
987
  let e = this.state.startLoc, s = this.parseIdentifier();
1052
988
  return this.flowParseGenericType(e, s);
1053
- } else
1054
- return this.flowParseType();
989
+ } else return this.flowParseType();
1055
990
  }
1056
991
  flowParseTypeAnnotation() {
1057
992
  let e = this.startNode();
@@ -1099,15 +1034,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1099
1034
  parseExpressionStatement(e, s, r) {
1100
1035
  if (s.type === "Identifier") {
1101
1036
  if (s.name === "declare") {
1102
- if (this.match(80) || F(this.state.type) || this.match(68) || this.match(74) || this.match(82))
1103
- return this.flowParseDeclare(e);
1037
+ if (this.match(80) || F(this.state.type) || this.match(68) || this.match(74) || this.match(82)) return this.flowParseDeclare(e);
1104
1038
  } else if (F(this.state.type)) {
1105
- if (s.name === "interface")
1106
- return this.flowParseInterface(e);
1107
- if (s.name === "type")
1108
- return this.flowParseTypeAlias(e);
1109
- if (s.name === "opaque")
1110
- return this.flowParseOpaqueType(e, !1);
1039
+ if (s.name === "interface") return this.flowParseInterface(e);
1040
+ if (s.name === "type") return this.flowParseTypeAlias(e);
1041
+ if (s.name === "opaque") return this.flowParseOpaqueType(e, !1);
1111
1042
  }
1112
1043
  }
1113
1044
  return super.parseExpressionStatement(e, s, r);
@@ -1128,12 +1059,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1128
1059
  return super.parseExportDefaultExpression();
1129
1060
  }
1130
1061
  parseConditional(e, s, r) {
1131
- if (!this.match(17))
1132
- return e;
1062
+ if (!this.match(17)) return e;
1133
1063
  if (this.state.maybeInArrowParameters) {
1134
1064
  let y = this.lookaheadCharCode();
1135
- if (y === 44 || y === 61 || y === 58 || y === 41)
1136
- return this.setOptionalParametersError(r), e;
1065
+ if (y === 44 || y === 61 || y === 58 || y === 41) return this.setOptionalParametersError(r), e;
1137
1066
  }
1138
1067
  this.expect(17);
1139
1068
  let i = this.state.clone(), a = this.state.noArrowAt, n = this.startNodeAt(s), { consequent: o, failed: p } = this.tryParseConditionalConsequent(), [l, d] = this.getArrowLikeExpressions(o);
@@ -1141,8 +1070,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1141
1070
  let y = [...a];
1142
1071
  if (d.length > 0) {
1143
1072
  this.state = i, this.state.noArrowAt = y;
1144
- for (let A = 0; A < d.length; A++)
1145
- y.push(d[A].start);
1073
+ for (let A = 0; A < d.length; A++) y.push(d[A].start);
1146
1074
  ({ consequent: o, failed: p } = this.tryParseConditionalConsequent()), [l, d] = this.getArrowLikeExpressions(o);
1147
1075
  }
1148
1076
  p && l.length > 1 && this.raise(E.AmbiguousConditionalArrow, i.startLoc), p && l.length === 1 && (this.state = i, y.push(l[0].start), this.state.noArrowAt = y, { consequent: o, failed: p } = this.tryParseConditionalConsequent());
@@ -1198,8 +1126,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1198
1126
  e.exportKind = "value";
1199
1127
  let s = this.startNode();
1200
1128
  return this.next(), this.flowParseEnumDeclaration(s);
1201
- } else
1202
- return super.parseExportDeclaration(e);
1129
+ } else return super.parseExportDeclaration(e);
1203
1130
  }
1204
1131
  eatExportStar(e) {
1205
1132
  return super.eatExportStar(e) ? !0 : this.isContextual(130) && this.lookahead().type === 55 ? (e.exportKind = "type", this.next(), this.next(), !0) : !1;
@@ -1214,8 +1141,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1214
1141
  parseClassMember(e, s, r) {
1215
1142
  let { startLoc: i } = this.state;
1216
1143
  if (this.isContextual(125)) {
1217
- if (super.parseClassMemberFromModifier(e, s))
1218
- return;
1144
+ if (super.parseClassMemberFromModifier(e, s)) return;
1219
1145
  s.declare = !0;
1220
1146
  }
1221
1147
  super.parseClassMember(e, s, r), s.declare && (s.type !== "ClassProperty" && s.type !== "ClassPrivateProperty" && s.type !== "PropertyDefinition" ? this.raise(E.DeclareClassElement, i) : s.value && this.raise(E.DeclareClassFieldInitializer, s.value));
@@ -1328,11 +1254,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1328
1254
  s.local = xt(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(s, r));
1329
1255
  }
1330
1256
  isPotentialImportPhase(e) {
1331
- if (super.isPotentialImportPhase(e))
1332
- return !0;
1257
+ if (super.isPotentialImportPhase(e)) return !0;
1333
1258
  if (this.isContextual(130)) {
1334
- if (!e)
1335
- return !0;
1259
+ if (!e) return !0;
1336
1260
  let s = this.lookaheadCharCode();
1337
1261
  return s === 123 || s === 42;
1338
1262
  }
@@ -1340,11 +1264,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1340
1264
  }
1341
1265
  applyImportPhase(e, s, r, i) {
1342
1266
  if (super.applyImportPhase(e, s, r, i), s) {
1343
- if (!r && this.match(65))
1344
- return;
1267
+ if (!r && this.match(65)) return;
1345
1268
  e.exportKind = r === "type" ? r : "value";
1346
- } else
1347
- r === "type" && this.match(55) && this.unexpected(), e.importKind = r === "type" || r === "typeof" ? r : "value";
1269
+ } else r === "type" && this.match(55) && this.unexpected(), e.importKind = r === "type" || r === "typeof" ? r : "value";
1348
1270
  }
1349
1271
  parseImportSpecifier(e, s, r, i, a) {
1350
1272
  let n = e.imported, o = null;
@@ -1354,11 +1276,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1354
1276
  let d = this.parseIdentifier(!0);
1355
1277
  o !== null && !V(this.state.type) ? (e.imported = d, e.importKind = o, e.local = this.cloneIdentifier(d)) : (e.imported = n, e.importKind = null, e.local = this.parseIdentifier());
1356
1278
  } else {
1357
- if (o !== null && V(this.state.type))
1358
- e.imported = this.parseIdentifier(!0), e.importKind = o;
1279
+ if (o !== null && V(this.state.type)) e.imported = this.parseIdentifier(!0), e.importKind = o;
1359
1280
  else {
1360
- if (s)
1361
- throw this.raise(u.ImportBindingIsString, e, { importName: n.value });
1281
+ if (s) throw this.raise(u.ImportBindingIsString, e, { importName: n.value });
1362
1282
  e.imported = n, e.importKind = null;
1363
1283
  }
1364
1284
  this.eatContextual(93) ? e.local = this.parseIdentifier() : (p = !0, e.local = this.cloneIdentifier(e.imported));
@@ -1367,12 +1287,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1367
1287
  return r && l && this.raise(E.ImportTypeShorthandOnlyInPureImport, e), (r || l) && this.checkReservedType(e.local.name, e.local.loc.start, !0), p && !r && !l && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
1368
1288
  }
1369
1289
  parseBindingAtom() {
1370
- switch (this.state.type) {
1371
- case 78:
1372
- return this.parseIdentifier(!0);
1373
- default:
1374
- return super.parseBindingAtom();
1375
- }
1290
+ return this.state.type === 78 ? this.parseIdentifier(!0) : super.parseBindingAtom();
1376
1291
  }
1377
1292
  parseFunctionParams(e, s) {
1378
1293
  let r = e.kind;
@@ -1395,8 +1310,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1395
1310
  var r;
1396
1311
  let i = null, a;
1397
1312
  if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
1398
- if (i = this.state.clone(), a = this.tryParse(() => super.parseMaybeAssign(e, s), i), !a.error)
1399
- return a.node;
1313
+ if (i = this.state.clone(), a = this.tryParse(() => super.parseMaybeAssign(e, s), i), !a.error) return a.node;
1400
1314
  let { context: p } = this.state, l = p[p.length - 1];
1401
1315
  (l === D.j_oTag || l === D.j_expr) && p.pop();
1402
1316
  }
@@ -1415,14 +1329,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1415
1329
  return N.type !== "ArrowFunctionExpression" && y(), N.typeParameters = p, this.resetStartLocationFromNode(N, p), T;
1416
1330
  }, i), d = null;
1417
1331
  if (l.node && this.maybeUnwrapTypeCastExpression(l.node).type === "ArrowFunctionExpression") {
1418
- if (!l.error && !l.aborted)
1419
- return l.node.async && this.raise(E.UnexpectedTypeParameterBeforeAsyncArrowFunction, p), l.node;
1332
+ if (!l.error && !l.aborted) return l.node.async && this.raise(E.UnexpectedTypeParameterBeforeAsyncArrowFunction, p), l.node;
1420
1333
  d = l.node;
1421
1334
  }
1422
- if ((n = a) != null && n.node)
1423
- return this.state = a.failState, a.node;
1424
- if (d)
1425
- return this.state = l.failState, d;
1335
+ if ((n = a) != null && n.node) return this.state = a.failState, a.node;
1336
+ if (d) return this.state = l.failState, d;
1426
1337
  throw (o = a) != null && o.thrown ? a.error : l.thrown ? l.error : this.raise(E.UnexpectedTokenAfterTypeParameter, p);
1427
1338
  }
1428
1339
  return super.parseMaybeAssign(e, s);
@@ -1435,8 +1346,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1435
1346
  let i = this.startNode();
1436
1347
  return [i.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), this.state.noAnonFunctionType = r, this.canInsertSemicolon() && this.unexpected(), this.match(19) || this.unexpected(), i;
1437
1348
  });
1438
- if (s.thrown)
1439
- return null;
1349
+ if (s.thrown) return null;
1440
1350
  s.error && (this.state = s.failState), e.returnType = s.node.typeAnnotation ? this.finishNode(s.node, "TypeAnnotation") : null;
1441
1351
  }
1442
1352
  return super.parseArrow(e);
@@ -1449,8 +1359,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1449
1359
  }
1450
1360
  checkParams(e, s, r, i = !0) {
1451
1361
  if (!(r && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))) {
1452
- for (let a = 0; a < e.params.length; a++)
1453
- this.isThisParam(e.params[a]) && a > 0 && this.raise(E.ThisParamMustBeFirst, e.params[a]);
1362
+ for (let a = 0; a < e.params.length; a++) this.isThisParam(e.params[a]) && a > 0 && this.raise(E.ThisParamMustBeFirst, e.params[a]);
1454
1363
  super.checkParams(e, s, r, i);
1455
1364
  }
1456
1365
  }
@@ -1464,23 +1373,18 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1464
1373
  i.callee = e, i.arguments = super.parseCallExpressionArguments(11), e = this.finishNode(i, "CallExpression");
1465
1374
  } else if (e.type === "Identifier" && e.name === "async" && this.match(47)) {
1466
1375
  let i = this.state.clone(), a = this.tryParse((o) => this.parseAsyncArrowWithTypeParameters(s) || o(), i);
1467
- if (!a.error && !a.aborted)
1468
- return a.node;
1376
+ if (!a.error && !a.aborted) return a.node;
1469
1377
  let n = this.tryParse(() => super.parseSubscripts(e, s, r), i);
1470
- if (n.node && !n.error)
1471
- return n.node;
1472
- if (a.node)
1473
- return this.state = a.failState, a.node;
1474
- if (n.node)
1475
- return this.state = n.failState, n.node;
1378
+ if (n.node && !n.error) return n.node;
1379
+ if (a.node) return this.state = a.failState, a.node;
1380
+ if (n.node) return this.state = n.failState, n.node;
1476
1381
  throw a.error || n.error;
1477
1382
  }
1478
1383
  return super.parseSubscripts(e, s, r);
1479
1384
  }
1480
1385
  parseSubscript(e, s, r, i) {
1481
1386
  if (this.match(18) && this.isLookaheadToken_lt()) {
1482
- if (i.optionalChainMember = !0, r)
1483
- return i.stop = !0, e;
1387
+ if (i.optionalChainMember = !0, r) return i.stop = !0, e;
1484
1388
  this.next();
1485
1389
  let a = this.startNodeAt(s);
1486
1390
  return a.callee = e, a.typeArguments = this.flowParseTypeParameterInstantiationInExpression(), this.expect(10), a.arguments = this.parseCallExpressionArguments(11), a.optional = !0, this.finishCallExpression(a, !0);
@@ -1488,8 +1392,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1488
1392
  let a = this.startNodeAt(s);
1489
1393
  a.callee = e;
1490
1394
  let n = this.tryParse(() => (a.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(), this.expect(10), a.arguments = super.parseCallExpressionArguments(11), i.optionalChainMember && (a.optional = !1), this.finishCallExpression(a, i.optionalChainMember)));
1491
- if (n.node)
1492
- return n.error && (this.state = n.failState), n.node;
1395
+ if (n.node) return n.error && (this.state = n.failState), n.node;
1493
1396
  }
1494
1397
  return super.parseSubscript(e, s, r, i);
1495
1398
  }
@@ -1500,8 +1403,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1500
1403
  }
1501
1404
  parseAsyncArrowWithTypeParameters(e) {
1502
1405
  let s = this.startNodeAt(e);
1503
- if (this.parseFunctionParams(s, !1), !!this.parseArrow(s))
1504
- return super.parseArrowExpression(s, void 0, !0);
1406
+ if (this.parseFunctionParams(s, !1), !!this.parseArrow(s)) return super.parseArrowExpression(s, void 0, !0);
1505
1407
  }
1506
1408
  readToken_mult_modulo(e) {
1507
1409
  let s = this.input.charCodeAt(this.state.pos + 1);
@@ -1525,8 +1427,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1525
1427
  }
1526
1428
  skipBlockComment() {
1527
1429
  if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
1528
- if (this.state.hasFlowComment)
1529
- throw this.raise(E.NestedFlowComment, this.state.startLoc);
1430
+ if (this.state.hasFlowComment) throw this.raise(E.NestedFlowComment, this.state.startLoc);
1530
1431
  this.hasFlowCommentCompletion();
1531
1432
  let e = this.skipFlowComment();
1532
1433
  e && (this.state.pos += e, this.state.hasFlowComment = !0);
@@ -1536,14 +1437,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1536
1437
  }
1537
1438
  skipFlowComment() {
1538
1439
  let { pos: e } = this.state, s = 2;
1539
- for (; [32, 9].includes(this.input.charCodeAt(e + s)); )
1540
- s++;
1440
+ for (; [32, 9].includes(this.input.charCodeAt(e + s)); ) s++;
1541
1441
  let r = this.input.charCodeAt(s + e), i = this.input.charCodeAt(s + e + 1);
1542
1442
  return r === 58 && i === 58 ? s + 2 : this.input.slice(s + e, s + e + 12) === "flow-include" ? s + 12 : r === 58 && i !== 58 ? s : !1;
1543
1443
  }
1544
1444
  hasFlowCommentCompletion() {
1545
- if (this.input.indexOf("*/", this.state.pos) === -1)
1546
- throw this.raise(u.UnterminatedComment, this.state.curPosition());
1445
+ if (this.input.indexOf("*/", this.state.pos) === -1) throw this.raise(u.UnterminatedComment, this.state.curPosition());
1547
1446
  }
1548
1447
  flowEnumErrorBooleanMemberNotInitialized(e, { enumName: s, memberName: r }) {
1549
1448
  this.raise(E.EnumBooleanMemberNotInitialized, e, { memberName: r, enumName: s });
@@ -1593,8 +1492,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1593
1492
  break;
1594
1493
  }
1595
1494
  let n = this.startNode(), { id: o, init: p } = this.flowEnumMemberRaw(), l = o.name;
1596
- if (l === "")
1597
- continue;
1495
+ if (l === "") continue;
1598
1496
  /^[a-z]/.test(l) && this.raise(E.EnumInvalidMemberName, o, { memberName: l, suggestion: l[0].toUpperCase() + l.slice(1), enumName: e }), r.has(l) && this.raise(E.EnumDuplicateMemberName, o, { memberName: l, enumName: e }), r.add(l);
1599
1497
  let d = { enumName: e, explicitType: s, memberName: l };
1600
1498
  switch (n.id = o, p.type) {
@@ -1629,25 +1527,19 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1629
1527
  return { members: i, hasUnknownMembers: a };
1630
1528
  }
1631
1529
  flowEnumStringMembers(e, s, { enumName: r }) {
1632
- if (e.length === 0)
1633
- return s;
1634
- if (s.length === 0)
1635
- return e;
1530
+ if (e.length === 0) return s;
1531
+ if (s.length === 0) return e;
1636
1532
  if (s.length > e.length) {
1637
- for (let i of e)
1638
- this.flowEnumErrorStringMemberInconsistentlyInitialized(i, { enumName: r });
1533
+ for (let i of e) this.flowEnumErrorStringMemberInconsistentlyInitialized(i, { enumName: r });
1639
1534
  return s;
1640
1535
  } else {
1641
- for (let i of s)
1642
- this.flowEnumErrorStringMemberInconsistentlyInitialized(i, { enumName: r });
1536
+ for (let i of s) this.flowEnumErrorStringMemberInconsistentlyInitialized(i, { enumName: r });
1643
1537
  return e;
1644
1538
  }
1645
1539
  }
1646
1540
  flowEnumParseExplicitType({ enumName: e }) {
1647
- if (!this.eatContextual(102))
1648
- return null;
1649
- if (!F(this.state.type))
1650
- throw this.raise(E.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { enumName: e });
1541
+ if (!this.eatContextual(102)) return null;
1542
+ if (!F(this.state.type)) throw this.raise(E.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { enumName: e });
1651
1543
  let { value: s } = this.state;
1652
1544
  return this.next(), s !== "boolean" && s !== "number" && s !== "string" && s !== "symbol" && this.raise(E.EnumInvalidExplicitType, this.state.startLoc, { enumName: e, invalidEnumType: s }), s;
1653
1545
  }
@@ -1668,20 +1560,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1668
1560
  let p = () => (e.members = [], this.expect(8), this.finishNode(e, "EnumStringBody"));
1669
1561
  e.explicitType = !1;
1670
1562
  let l = n.booleanMembers.length, d = n.numberMembers.length, y = n.stringMembers.length, A = n.defaultedMembers.length;
1671
- if (!l && !d && !y && !A)
1672
- return p();
1673
- if (!l && !d)
1674
- return e.members = this.flowEnumStringMembers(n.stringMembers, n.defaultedMembers, { enumName: r }), this.expect(8), this.finishNode(e, "EnumStringBody");
1563
+ if (!l && !d && !y && !A) return p();
1564
+ if (!l && !d) return e.members = this.flowEnumStringMembers(n.stringMembers, n.defaultedMembers, { enumName: r }), this.expect(8), this.finishNode(e, "EnumStringBody");
1675
1565
  if (!d && !y && l >= A) {
1676
- for (let T of n.defaultedMembers)
1677
- this.flowEnumErrorBooleanMemberNotInitialized(T.loc.start, { enumName: r, memberName: T.id.name });
1566
+ for (let T of n.defaultedMembers) this.flowEnumErrorBooleanMemberNotInitialized(T.loc.start, { enumName: r, memberName: T.id.name });
1678
1567
  return e.members = n.booleanMembers, this.expect(8), this.finishNode(e, "EnumBooleanBody");
1679
1568
  } else if (!l && !y && d >= A) {
1680
- for (let T of n.defaultedMembers)
1681
- this.flowEnumErrorNumberMemberNotInitialized(T.loc.start, { enumName: r, memberName: T.id.name });
1569
+ for (let T of n.defaultedMembers) this.flowEnumErrorNumberMemberNotInitialized(T.loc.start, { enumName: r, memberName: T.id.name });
1682
1570
  return e.members = n.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody");
1683
- } else
1684
- return this.raise(E.EnumInconsistentMemberValues, i, { enumName: r }), p();
1571
+ } else return this.raise(E.EnumInconsistentMemberValues, i, { enumName: r }), p();
1685
1572
  }
1686
1573
  }
1687
1574
  }
@@ -1724,9 +1611,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1724
1611
  }
1725
1612
  }
1726
1613
  function Pt(t, e, s) {
1727
- for (let r = e; r < s; r++)
1728
- if (ne(t.charCodeAt(r)))
1729
- return !0;
1614
+ for (let r = e; r < s; r++) if (ne(t.charCodeAt(r))) return !0;
1730
1615
  return !1;
1731
1616
  }
1732
1617
  var $e = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, qe = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
@@ -1763,20 +1648,16 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1763
1648
  return t ? t.type === "JSXOpeningFragment" || t.type === "JSXClosingFragment" : !1;
1764
1649
  }
1765
1650
  function oe(t) {
1766
- if (t.type === "JSXIdentifier")
1767
- return t.name;
1768
- if (t.type === "JSXNamespacedName")
1769
- return t.namespace.name + ":" + t.name.name;
1770
- if (t.type === "JSXMemberExpression")
1771
- return oe(t.object) + "." + oe(t.property);
1651
+ if (t.type === "JSXIdentifier") return t.name;
1652
+ if (t.type === "JSXNamespacedName") return t.namespace.name + ":" + t.name.name;
1653
+ if (t.type === "JSXMemberExpression") return oe(t.object) + "." + oe(t.property);
1772
1654
  throw new Error("Node had unexpected type: " + t.type);
1773
1655
  }
1774
1656
  var Zs = (t) => class extends t {
1775
1657
  jsxReadToken() {
1776
1658
  let e = "", s = this.state.pos;
1777
1659
  for (; ; ) {
1778
- if (this.state.pos >= this.length)
1779
- throw this.raise(se.UnterminatedJsxContent, this.state.startLoc);
1660
+ if (this.state.pos >= this.length) throw this.raise(se.UnterminatedJsxContent, this.state.startLoc);
1780
1661
  let r = this.input.charCodeAt(this.state.pos);
1781
1662
  switch (r) {
1782
1663
  case 60:
@@ -1790,8 +1671,6 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1790
1671
  case 38:
1791
1672
  e += this.input.slice(s, this.state.pos), e += this.jsxReadEntity(), s = this.state.pos;
1792
1673
  break;
1793
- case 62:
1794
- case 125:
1795
1674
  default:
1796
1675
  ne(r) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(!0), s = this.state.pos) : ++this.state.pos;
1797
1676
  }
@@ -1806,11 +1685,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1806
1685
  jsxReadString(e) {
1807
1686
  let s = "", r = ++this.state.pos;
1808
1687
  for (; ; ) {
1809
- if (this.state.pos >= this.length)
1810
- throw this.raise(u.UnterminatedString, this.state.startLoc);
1688
+ if (this.state.pos >= this.length) throw this.raise(u.UnterminatedString, this.state.startLoc);
1811
1689
  let i = this.input.charCodeAt(this.state.pos);
1812
- if (i === e)
1813
- break;
1690
+ if (i === e) break;
1814
1691
  i === 38 ? (s += this.input.slice(r, this.state.pos), s += this.jsxReadEntity(), r = this.state.pos) : ne(i) ? (s += this.input.slice(r, this.state.pos), s += this.jsxReadNewLine(!1), r = this.state.pos) : ++this.state.pos;
1815
1692
  }
1816
1693
  s += this.input.slice(r, this.state.pos++), this.finishToken(134, s);
@@ -1822,12 +1699,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1822
1699
  let s = 10;
1823
1700
  this.codePointAtPos(this.state.pos) === 120 && (s = 16, ++this.state.pos);
1824
1701
  let r = this.readInt(s, void 0, !1, "bail");
1825
- if (r !== null && this.codePointAtPos(this.state.pos) === 59)
1826
- return ++this.state.pos, String.fromCodePoint(r);
1702
+ if (r !== null && this.codePointAtPos(this.state.pos) === 59) return ++this.state.pos, String.fromCodePoint(r);
1827
1703
  } else {
1828
1704
  let s = 0, r = !1;
1829
- for (; s++ < 10 && this.state.pos < this.length && !(r = this.codePointAtPos(this.state.pos) === 59); )
1830
- ++this.state.pos;
1705
+ for (; s++ < 10 && this.state.pos < this.length && !(r = this.codePointAtPos(this.state.pos) === 59); ) ++this.state.pos;
1831
1706
  if (r) {
1832
1707
  this.input.slice(e, this.state.pos);
1833
1708
  let i;
@@ -1849,15 +1724,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1849
1724
  }
1850
1725
  jsxParseNamespacedName() {
1851
1726
  let e = this.state.startLoc, s = this.jsxParseIdentifier();
1852
- if (!this.eat(14))
1853
- return s;
1727
+ if (!this.eat(14)) return s;
1854
1728
  let r = this.startNodeAt(e);
1855
1729
  return r.namespace = s, r.name = this.jsxParseIdentifier(), this.finishNode(r, "JSXNamespacedName");
1856
1730
  }
1857
1731
  jsxParseElementName() {
1858
1732
  let e = this.state.startLoc, s = this.jsxParseNamespacedName();
1859
- if (s.type === "JSXNamespacedName")
1860
- return s;
1733
+ if (s.type === "JSXNamespacedName") return s;
1861
1734
  for (; this.eat(16); ) {
1862
1735
  let r = this.startNodeAt(e);
1863
1736
  r.object = s, r.property = this.jsxParseIdentifier(), s = this.finishNode(r, "JSXMemberExpression");
@@ -1884,8 +1757,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1884
1757
  return this.next(), e.expression = this.parseExpression(), this.setContext(D.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(e, "JSXSpreadChild");
1885
1758
  }
1886
1759
  jsxParseExpressionContainer(e, s) {
1887
- if (this.match(8))
1888
- e.expression = this.jsxParseEmptyExpression();
1760
+ if (this.match(8)) e.expression = this.jsxParseEmptyExpression();
1889
1761
  else {
1890
1762
  let r = this.parseExpression();
1891
1763
  e.expression = r;
@@ -1902,8 +1774,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1902
1774
  }
1903
1775
  jsxParseOpeningElementAfterName(e) {
1904
1776
  let s = [];
1905
- for (; !this.match(56) && !this.match(144); )
1906
- s.push(this.jsxParseAttribute());
1777
+ for (; !this.match(56) && !this.match(144); ) s.push(this.jsxParseAttribute());
1907
1778
  return e.attributes = s, e.selfClosing = this.eat(56), this.expect(144), this.finishNode(e, "JSXOpeningElement");
1908
1779
  }
1909
1780
  jsxParseClosingElementAt(e) {
@@ -1913,31 +1784,28 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1913
1784
  jsxParseElementAt(e) {
1914
1785
  let s = this.startNodeAt(e), r = [], i = this.jsxParseOpeningElementAt(e), a = null;
1915
1786
  if (!i.selfClosing) {
1916
- e:
1917
- for (; ; )
1918
- switch (this.state.type) {
1919
- case 143:
1920
- if (e = this.state.startLoc, this.next(), this.eat(56)) {
1921
- a = this.jsxParseClosingElementAt(e);
1922
- break e;
1923
- }
1924
- r.push(this.jsxParseElementAt(e));
1925
- break;
1926
- case 142:
1927
- r.push(this.parseLiteral(this.state.value, "JSXText"));
1928
- break;
1929
- case 5: {
1930
- let n = this.startNode();
1931
- this.setContext(D.brace), this.next(), this.match(21) ? r.push(this.jsxParseSpreadChild(n)) : r.push(this.jsxParseExpressionContainer(n, D.j_expr));
1932
- break;
1933
- }
1934
- default:
1935
- this.unexpected();
1787
+ e: for (; ; ) switch (this.state.type) {
1788
+ case 143:
1789
+ if (e = this.state.startLoc, this.next(), this.eat(56)) {
1790
+ a = this.jsxParseClosingElementAt(e);
1791
+ break e;
1936
1792
  }
1793
+ r.push(this.jsxParseElementAt(e));
1794
+ break;
1795
+ case 142:
1796
+ r.push(this.parseLiteral(this.state.value, "JSXText"));
1797
+ break;
1798
+ case 5: {
1799
+ let n = this.startNode();
1800
+ this.setContext(D.brace), this.next(), this.match(21) ? r.push(this.jsxParseSpreadChild(n)) : r.push(this.jsxParseExpressionContainer(n, D.j_expr));
1801
+ break;
1802
+ }
1803
+ default:
1804
+ this.unexpected();
1805
+ }
1937
1806
  Q(i) && !Q(a) && a !== null ? this.raise(se.MissingClosingTagFragment, a) : !Q(i) && Q(a) ? this.raise(se.MissingClosingTagElement, a, { openingTagName: oe(i.name) }) : !Q(i) && !Q(a) && oe(a.name) !== oe(i.name) && this.raise(se.MissingClosingTagElement, a, { openingTagName: oe(i.name) });
1938
1807
  }
1939
- if (Q(i) ? (s.openingFragment = i, s.closingFragment = a) : (s.openingElement = i, s.closingElement = a), s.children = r, this.match(47))
1940
- throw this.raise(se.UnwrappedAdjacentJSXElements, this.state.startLoc);
1808
+ if (Q(i) ? (s.openingFragment = i, s.closingFragment = a) : (s.openingElement = i, s.closingElement = a), s.children = r, this.match(47)) throw this.raise(se.UnwrappedAdjacentJSXElements, this.state.startLoc);
1941
1809
  return Q(i) ? this.finishNode(s, "JSXFragment") : this.finishNode(s, "JSXElement");
1942
1810
  }
1943
1811
  jsxParseElement() {
@@ -1982,15 +1850,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
1982
1850
  }
1983
1851
  updateContext(e) {
1984
1852
  let { context: s, type: r } = this.state;
1985
- if (r === 56 && e === 143)
1986
- s.splice(-2, 2, D.j_cTag), this.state.canStartJSXElement = !1;
1987
- else if (r === 143)
1988
- s.push(D.j_oTag);
1853
+ if (r === 56 && e === 143) s.splice(-2, 2, D.j_cTag), this.state.canStartJSXElement = !1;
1854
+ else if (r === 143) s.push(D.j_oTag);
1989
1855
  else if (r === 144) {
1990
1856
  let i = s[s.length - 1];
1991
1857
  i === D.j_oTag && e === 56 || i === D.j_cTag ? (s.pop(), this.state.canStartJSXElement = s[s.length - 1] === D.j_expr) : (this.setContext(D.j_expr), this.state.canStartJSXElement = !0);
1992
- } else
1993
- this.state.canStartJSXElement = Cs(r);
1858
+ } else this.state.canStartJSXElement = Cs(r);
1994
1859
  }
1995
1860
  }, er = class extends ze {
1996
1861
  constructor(...t) {
@@ -2012,12 +1877,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2012
1877
  }
2013
1878
  hasImport(t, e) {
2014
1879
  let s = this.importsStack.length;
2015
- if (this.importsStack[s - 1].has(t))
2016
- return !0;
1880
+ if (this.importsStack[s - 1].has(t)) return !0;
2017
1881
  if (!e && s > 1) {
2018
- for (let r = 0; r < s - 1; r++)
2019
- if (this.importsStack[r].has(t))
2020
- return !0;
1882
+ for (let r = 0; r < s - 1; r++) if (this.importsStack[r].has(t)) return !0;
2021
1883
  }
2022
1884
  return !1;
2023
1885
  }
@@ -2046,13 +1908,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2046
1908
  }
2047
1909
  checkLocalExport(t) {
2048
1910
  let { name: e } = t;
2049
- if (this.hasImport(e))
2050
- return;
1911
+ if (this.hasImport(e)) return;
2051
1912
  let s = this.scopeStack.length;
2052
1913
  for (let r = s - 1; r >= 0; r--) {
2053
1914
  let i = this.scopeStack[r].tsNames.get(e);
2054
- if ((i & 1) > 0 || (i & 16) > 0)
2055
- return;
1915
+ if ((i & 1) > 0 || (i & 16) > 0) return;
2056
1916
  }
2057
1917
  super.checkLocalExport(t);
2058
1918
  }
@@ -2096,16 +1956,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2096
1956
  return t - this.startIndex;
2097
1957
  }
2098
1958
  hasPlugin(t) {
2099
- if (typeof t == "string")
2100
- return this.plugins.has(t);
1959
+ if (typeof t == "string") return this.plugins.has(t);
2101
1960
  {
2102
1961
  let [e, s] = t;
2103
- if (!this.hasPlugin(e))
2104
- return !1;
1962
+ if (!this.hasPlugin(e)) return !1;
2105
1963
  let r = this.plugins.get(e);
2106
- for (let i of Object.keys(s))
2107
- if (r?.[i] !== s[i])
2108
- return !1;
1964
+ for (let i of Object.keys(s)) if (r?.[i] !== s[i]) return !1;
2109
1965
  return !0;
2110
1966
  }
2111
1967
  }
@@ -2125,8 +1981,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2125
1981
  }
2126
1982
  function Z(t, e, s) {
2127
1983
  let r = null, i = e.length;
2128
- for (; r === null && i > 0; )
2129
- r = e[--i];
1984
+ for (; r === null && i > 0; ) r = e[--i];
2130
1985
  r === null || r.start > s.start ? fe(t, s.comments) : At(r, s.comments);
2131
1986
  }
2132
1987
  var ar = class extends rr {
@@ -2137,15 +1992,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2137
1992
  }
2138
1993
  processComment(t) {
2139
1994
  let { commentStack: e } = this.state, s = e.length;
2140
- if (s === 0)
2141
- return;
1995
+ if (s === 0) return;
2142
1996
  let r = s - 1, i = e[r];
2143
1997
  i.start === t.end && (i.leadingNode = t, r--);
2144
1998
  let { start: a } = t;
2145
1999
  for (; r >= 0; r--) {
2146
2000
  let n = e[r], o = n.end;
2147
- if (o > a)
2148
- n.containingNode = t, this.finalizeComment(n), e.splice(r, 1);
2001
+ if (o > a) n.containingNode = t, this.finalizeComment(n), e.splice(r, 1);
2149
2002
  else {
2150
2003
  o === a && (n.trailingNode = t);
2151
2004
  break;
@@ -2155,80 +2008,71 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2155
2008
  finalizeComment(t) {
2156
2009
  var e;
2157
2010
  let { comments: s } = t;
2158
- if (t.leadingNode !== null || t.trailingNode !== null)
2159
- t.leadingNode !== null && At(t.leadingNode, s), t.trailingNode !== null && ir(t.trailingNode, s);
2011
+ if (t.leadingNode !== null || t.trailingNode !== null) t.leadingNode !== null && At(t.leadingNode, s), t.trailingNode !== null && ir(t.trailingNode, s);
2160
2012
  else {
2161
2013
  let { containingNode: r, start: i } = t;
2162
- if (this.input.charCodeAt(this.offsetToSourcePos(i) - 1) === 44)
2163
- switch (r.type) {
2164
- case "ObjectExpression":
2165
- case "ObjectPattern":
2166
- case "RecordExpression":
2167
- Z(r, r.properties, t);
2168
- break;
2169
- case "CallExpression":
2170
- case "OptionalCallExpression":
2171
- Z(r, r.arguments, t);
2172
- break;
2173
- case "ImportExpression":
2174
- Z(r, [r.source, (e = r.options) != null ? e : null], t);
2175
- break;
2176
- case "FunctionDeclaration":
2177
- case "FunctionExpression":
2178
- case "ArrowFunctionExpression":
2179
- case "ObjectMethod":
2180
- case "ClassMethod":
2181
- case "ClassPrivateMethod":
2182
- Z(r, r.params, t);
2183
- break;
2184
- case "ArrayExpression":
2185
- case "ArrayPattern":
2186
- case "TupleExpression":
2187
- Z(r, r.elements, t);
2188
- break;
2189
- case "ExportNamedDeclaration":
2190
- case "ImportDeclaration":
2191
- Z(r, r.specifiers, t);
2192
- break;
2193
- case "TSEnumDeclaration":
2194
- Z(r, r.members, t);
2195
- break;
2196
- case "TSEnumBody":
2197
- Z(r, r.members, t);
2198
- break;
2199
- default:
2200
- fe(r, s);
2201
- }
2202
- else
2203
- fe(r, s);
2014
+ if (this.input.charCodeAt(this.offsetToSourcePos(i) - 1) === 44) switch (r.type) {
2015
+ case "ObjectExpression":
2016
+ case "ObjectPattern":
2017
+ case "RecordExpression":
2018
+ Z(r, r.properties, t);
2019
+ break;
2020
+ case "CallExpression":
2021
+ case "OptionalCallExpression":
2022
+ Z(r, r.arguments, t);
2023
+ break;
2024
+ case "ImportExpression":
2025
+ Z(r, [r.source, (e = r.options) != null ? e : null], t);
2026
+ break;
2027
+ case "FunctionDeclaration":
2028
+ case "FunctionExpression":
2029
+ case "ArrowFunctionExpression":
2030
+ case "ObjectMethod":
2031
+ case "ClassMethod":
2032
+ case "ClassPrivateMethod":
2033
+ Z(r, r.params, t);
2034
+ break;
2035
+ case "ArrayExpression":
2036
+ case "ArrayPattern":
2037
+ case "TupleExpression":
2038
+ Z(r, r.elements, t);
2039
+ break;
2040
+ case "ExportNamedDeclaration":
2041
+ case "ImportDeclaration":
2042
+ Z(r, r.specifiers, t);
2043
+ break;
2044
+ case "TSEnumDeclaration":
2045
+ Z(r, r.members, t);
2046
+ break;
2047
+ case "TSEnumBody":
2048
+ Z(r, r.members, t);
2049
+ break;
2050
+ default:
2051
+ fe(r, s);
2052
+ }
2053
+ else fe(r, s);
2204
2054
  }
2205
2055
  }
2206
2056
  finalizeRemainingComments() {
2207
2057
  let { commentStack: t } = this.state;
2208
- for (let e = t.length - 1; e >= 0; e--)
2209
- this.finalizeComment(t[e]);
2058
+ for (let e = t.length - 1; e >= 0; e--) this.finalizeComment(t[e]);
2210
2059
  this.state.commentStack = [];
2211
2060
  }
2212
2061
  resetPreviousNodeTrailingComments(t) {
2213
2062
  let { commentStack: e } = this.state, { length: s } = e;
2214
- if (s === 0)
2215
- return;
2063
+ if (s === 0) return;
2216
2064
  let r = e[s - 1];
2217
2065
  r.leadingNode === t && (r.leadingNode = null);
2218
2066
  }
2219
2067
  takeSurroundingComments(t, e, s) {
2220
2068
  let { commentStack: r } = this.state, i = r.length;
2221
- if (i === 0)
2222
- return;
2069
+ if (i === 0) return;
2223
2070
  let a = i - 1;
2224
2071
  for (; a >= 0; a--) {
2225
2072
  let n = r[a], o = n.end;
2226
- if (n.start === s)
2227
- n.leadingNode = t;
2228
- else if (o === e)
2229
- n.trailingNode = t;
2230
- else if (o < e)
2231
- break;
2073
+ if (n.start === s) n.leadingNode = t;
2074
+ else if (o === e) n.trailingNode = t;
2075
+ else if (o < e) break;
2232
2076
  }
2233
2077
  }
2234
2078
  }, nr = class Yt {
@@ -2342,8 +2186,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2342
2186
  l += e.slice(y, s);
2343
2187
  let N = hr(e, s, r, i, t === "template", a);
2344
2188
  N.ch === null && !d ? d = { pos: s, lineStart: r, curLine: i } : l += N.ch, { pos: s, lineStart: r, curLine: i } = N, y = s;
2345
- } else
2346
- T === 8232 || T === 8233 ? (++s, ++i, r = s) : T === 10 || T === 13 ? t === "template" ? (l += e.slice(y, s) + `
2189
+ } else T === 8232 || T === 8233 ? (++s, ++i, r = s) : T === 10 || T === 13 ? t === "template" ? (l += e.slice(y, s) + `
2347
2190
  `, ++s, T === 13 && e.charCodeAt(s) === 10 && ++s, ++i, y = r = s) : a.unterminated(n, o, p) : ++s;
2348
2191
  }
2349
2192
  return { pos: s, str: l, firstInvalidLoc: d, lineStart: r, curLine: i, containsInvalid: !!d };
@@ -2386,8 +2229,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2386
2229
  return o("");
2387
2230
  case 56:
2388
2231
  case 57:
2389
- if (i)
2390
- return o(null);
2232
+ if (i) return o(null);
2391
2233
  a.strictNumericEscape(e - 1, s, r);
2392
2234
  default:
2393
2235
  if (p >= 48 && p <= 55) {
@@ -2395,8 +2237,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2395
2237
  y > 255 && (d = d.slice(0, -1), y = parseInt(d, 8)), e += d.length - 1;
2396
2238
  let A = t.charCodeAt(e);
2397
2239
  if (d !== "0" || A === 56 || A === 57) {
2398
- if (i)
2399
- return o(null);
2240
+ if (i) return o(null);
2400
2241
  a.strictNumericEscape(l, s, r);
2401
2242
  }
2402
2243
  return o(String.fromCharCode(y));
@@ -2416,27 +2257,21 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2416
2257
  let Ge = t.charCodeAt(e - 1), Ye = t.charCodeAt(e + 1);
2417
2258
  if (o) {
2418
2259
  if (Number.isNaN(Ye) || !A(Ye) || y.has(Ge) || y.has(Ye)) {
2419
- if (l)
2420
- return { n: null, pos: e };
2260
+ if (l) return { n: null, pos: e };
2421
2261
  p.unexpectedNumericSeparator(e, s, r);
2422
2262
  }
2423
2263
  } else {
2424
- if (l)
2425
- return { n: null, pos: e };
2264
+ if (l) return { n: null, pos: e };
2426
2265
  p.numericSeparatorInEscapeSequence(e, s, r);
2427
2266
  }
2428
2267
  ++e;
2429
2268
  continue;
2430
2269
  }
2431
2270
  if (U >= 97 ? H = U - 97 + 10 : U >= 65 ? H = U - 65 + 10 : or(U) ? H = U - 48 : H = 1 / 0, H >= i) {
2432
- if (H <= 9 && l)
2433
- return { n: null, pos: e };
2434
- if (H <= 9 && p.invalidDigit(e, s, r, i))
2435
- H = 0;
2436
- else if (n)
2437
- H = 0, T = !0;
2438
- else
2439
- break;
2271
+ if (H <= 9 && l) return { n: null, pos: e };
2272
+ if (H <= 9 && p.invalidDigit(e, s, r, i)) H = 0;
2273
+ else if (n) H = 0, T = !0;
2274
+ else break;
2440
2275
  }
2441
2276
  ++e, N = N * i + H;
2442
2277
  }
@@ -2445,13 +2280,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2445
2280
  function Et(t, e, s, r, i, a) {
2446
2281
  let n = t.charCodeAt(e), o;
2447
2282
  if (n === 123) {
2448
- if (++e, { code: o, pos: e } = Ke(t, e, s, r, t.indexOf("}", e) - e, !0, i, a), ++e, o !== null && o > 1114111)
2449
- if (i)
2450
- a.invalidCodePoint(e, s, r);
2451
- else
2452
- return { code: null, pos: e };
2453
- } else
2454
- ({ code: o, pos: e } = Ke(t, e, s, r, 4, !1, i, a));
2283
+ if (++e, { code: o, pos: e } = Ke(t, e, s, r, t.indexOf("}", e) - e, !0, i, a), ++e, o !== null && o > 1114111) if (i) a.invalidCodePoint(e, s, r);
2284
+ else return { code: null, pos: e };
2285
+ } else ({ code: o, pos: e } = Ke(t, e, s, r, 4, !1, i, a));
2455
2286
  return { code: o, pos: e };
2456
2287
  }
2457
2288
  function ye(t, e, s) {
@@ -2539,12 +2370,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2539
2370
  let e;
2540
2371
  this.isLookahead || (e = this.state.curPosition());
2541
2372
  let s = this.state.pos, r = this.input.indexOf(t, s + 2);
2542
- if (r === -1)
2543
- throw this.raise(u.UnterminatedComment, this.state.curPosition());
2544
- for (this.state.pos = r + t.length, Ee.lastIndex = s + 2; Ee.test(this.input) && Ee.lastIndex <= r; )
2545
- ++this.state.curLine, this.state.lineStart = Ee.lastIndex;
2546
- if (this.isLookahead)
2547
- return;
2373
+ if (r === -1) throw this.raise(u.UnterminatedComment, this.state.curPosition());
2374
+ for (this.state.pos = r + t.length, Ee.lastIndex = s + 2; Ee.test(this.input) && Ee.lastIndex <= r; ) ++this.state.curLine, this.state.lineStart = Ee.lastIndex;
2375
+ if (this.isLookahead) return;
2548
2376
  let i = { type: "CommentBlock", value: this.input.slice(s + 2, r), start: this.sourceToOffsetPos(s), end: this.sourceToOffsetPos(r + t.length), loc: new f(e, this.state.curPosition()) };
2549
2377
  return this.optionFlags & 256 && this.pushToken(i), i;
2550
2378
  }
@@ -2552,69 +2380,61 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2552
2380
  let e = this.state.pos, s;
2553
2381
  this.isLookahead || (s = this.state.curPosition());
2554
2382
  let r = this.input.charCodeAt(this.state.pos += t);
2555
- if (this.state.pos < this.length)
2556
- for (; !ne(r) && ++this.state.pos < this.length; )
2557
- r = this.input.charCodeAt(this.state.pos);
2558
- if (this.isLookahead)
2559
- return;
2383
+ if (this.state.pos < this.length) for (; !ne(r) && ++this.state.pos < this.length; ) r = this.input.charCodeAt(this.state.pos);
2384
+ if (this.isLookahead) return;
2560
2385
  let i = this.state.pos, a = { type: "CommentLine", value: this.input.slice(e + t, i), start: this.sourceToOffsetPos(e), end: this.sourceToOffsetPos(i), loc: new f(s, this.state.curPosition()) };
2561
2386
  return this.optionFlags & 256 && this.pushToken(a), a;
2562
2387
  }
2563
2388
  skipSpace() {
2564
2389
  let t = this.state.pos, e = this.optionFlags & 4096 ? [] : null;
2565
- e:
2566
- for (; this.state.pos < this.length; ) {
2567
- let s = this.input.charCodeAt(this.state.pos);
2568
- switch (s) {
2569
- case 32:
2570
- case 160:
2571
- case 9:
2572
- ++this.state.pos;
2573
- break;
2574
- case 13:
2575
- this.input.charCodeAt(this.state.pos + 1) === 10 && ++this.state.pos;
2576
- case 10:
2577
- case 8232:
2578
- case 8233:
2579
- ++this.state.pos, ++this.state.curLine, this.state.lineStart = this.state.pos;
2580
- break;
2581
- case 47:
2582
- switch (this.input.charCodeAt(this.state.pos + 1)) {
2583
- case 42: {
2584
- let r = this.skipBlockComment("*/");
2585
- r !== void 0 && (this.addComment(r), e?.push(r));
2586
- break;
2587
- }
2588
- case 47: {
2589
- let r = this.skipLineComment(2);
2590
- r !== void 0 && (this.addComment(r), e?.push(r));
2591
- break;
2592
- }
2593
- default:
2594
- break e;
2390
+ e: for (; this.state.pos < this.length; ) {
2391
+ let s = this.input.charCodeAt(this.state.pos);
2392
+ switch (s) {
2393
+ case 32:
2394
+ case 160:
2395
+ case 9:
2396
+ ++this.state.pos;
2397
+ break;
2398
+ case 13:
2399
+ this.input.charCodeAt(this.state.pos + 1) === 10 && ++this.state.pos;
2400
+ case 10:
2401
+ case 8232:
2402
+ case 8233:
2403
+ ++this.state.pos, ++this.state.curLine, this.state.lineStart = this.state.pos;
2404
+ break;
2405
+ case 47:
2406
+ switch (this.input.charCodeAt(this.state.pos + 1)) {
2407
+ case 42: {
2408
+ let r = this.skipBlockComment("*/");
2409
+ r !== void 0 && (this.addComment(r), e?.push(r));
2410
+ break;
2595
2411
  }
2596
- break;
2597
- default:
2598
- if (Qs(s))
2599
- ++this.state.pos;
2600
- else if (s === 45 && !this.inModule && this.optionFlags & 8192) {
2601
- let r = this.state.pos;
2602
- if (this.input.charCodeAt(r + 1) === 45 && this.input.charCodeAt(r + 2) === 62 && (t === 0 || this.state.lineStart > t)) {
2603
- let i = this.skipLineComment(3);
2604
- i !== void 0 && (this.addComment(i), e?.push(i));
2605
- } else
2606
- break e;
2607
- } else if (s === 60 && !this.inModule && this.optionFlags & 8192) {
2608
- let r = this.state.pos;
2609
- if (this.input.charCodeAt(r + 1) === 33 && this.input.charCodeAt(r + 2) === 45 && this.input.charCodeAt(r + 3) === 45) {
2610
- let i = this.skipLineComment(4);
2611
- i !== void 0 && (this.addComment(i), e?.push(i));
2612
- } else
2613
- break e;
2614
- } else
2412
+ case 47: {
2413
+ let r = this.skipLineComment(2);
2414
+ r !== void 0 && (this.addComment(r), e?.push(r));
2415
+ break;
2416
+ }
2417
+ default:
2615
2418
  break e;
2616
- }
2419
+ }
2420
+ break;
2421
+ default:
2422
+ if (Qs(s)) ++this.state.pos;
2423
+ else if (s === 45 && !this.inModule && this.optionFlags & 8192) {
2424
+ let r = this.state.pos;
2425
+ if (this.input.charCodeAt(r + 1) === 45 && this.input.charCodeAt(r + 2) === 62 && (t === 0 || this.state.lineStart > t)) {
2426
+ let i = this.skipLineComment(3);
2427
+ i !== void 0 && (this.addComment(i), e?.push(i));
2428
+ } else break e;
2429
+ } else if (s === 60 && !this.inModule && this.optionFlags & 8192) {
2430
+ let r = this.state.pos;
2431
+ if (this.input.charCodeAt(r + 1) === 33 && this.input.charCodeAt(r + 2) === 45 && this.input.charCodeAt(r + 3) === 45) {
2432
+ let i = this.skipLineComment(4);
2433
+ i !== void 0 && (this.addComment(i), e?.push(i));
2434
+ } else break e;
2435
+ } else break e;
2617
2436
  }
2437
+ }
2618
2438
  if (e?.length > 0) {
2619
2439
  let s = this.state.pos, r = { start: this.sourceToOffsetPos(t), end: this.sourceToOffsetPos(s), comments: e, leadingNode: null, trailingNode: null, containingNode: null };
2620
2440
  this.state.commentStack.push(r);
@@ -2629,17 +2449,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2629
2449
  this.state.type = t, this.updateContext();
2630
2450
  }
2631
2451
  readToken_numberSign() {
2632
- if (this.state.pos === 0 && this.readToken_interpreter())
2633
- return;
2452
+ if (this.state.pos === 0 && this.readToken_interpreter()) return;
2634
2453
  let t = this.state.pos + 1, e = this.codePointAtPos(t);
2635
- if (e >= 48 && e <= 57)
2636
- throw this.raise(u.UnexpectedDigitAfterHash, this.state.curPosition());
2454
+ if (e >= 48 && e <= 57) throw this.raise(u.UnexpectedDigitAfterHash, this.state.curPosition());
2637
2455
  if (e === 123 || e === 91 && this.hasPlugin("recordAndTuple")) {
2638
- if (this.expectPlugin("recordAndTuple"), this.getPluginOption("recordAndTuple", "syntaxType") === "bar")
2639
- throw this.raise(e === 123 ? u.RecordExpressionHashIncorrectStartSyntaxType : u.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition());
2456
+ if (this.expectPlugin("recordAndTuple"), this.getPluginOption("recordAndTuple", "syntaxType") === "bar") throw this.raise(e === 123 ? u.RecordExpressionHashIncorrectStartSyntaxType : u.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition());
2640
2457
  this.state.pos += 2, e === 123 ? this.finishToken(7) : this.finishToken(1);
2641
- } else
2642
- J(e) ? (++this.state.pos, this.finishToken(139, this.readWord1(e))) : e === 92 ? (++this.state.pos, this.finishToken(139, this.readWord1())) : this.finishOp(27, 1);
2458
+ } else J(e) ? (++this.state.pos, this.finishToken(139, this.readWord1(e))) : e === 92 ? (++this.state.pos, this.finishToken(139, this.readWord1())) : this.finishOp(27, 1);
2643
2459
  }
2644
2460
  readToken_dot() {
2645
2461
  let t = this.input.charCodeAt(this.state.pos + 1);
@@ -2653,14 +2469,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2653
2469
  this.input.charCodeAt(this.state.pos + 1) === 61 ? this.finishOp(31, 2) : this.finishOp(56, 1);
2654
2470
  }
2655
2471
  readToken_interpreter() {
2656
- if (this.state.pos !== 0 || this.length < 2)
2657
- return !1;
2472
+ if (this.state.pos !== 0 || this.length < 2) return !1;
2658
2473
  let t = this.input.charCodeAt(this.state.pos + 1);
2659
- if (t !== 33)
2660
- return !1;
2474
+ if (t !== 33) return !1;
2661
2475
  let e = this.state.pos;
2662
- for (this.state.pos += 1; !ne(t) && ++this.state.pos < this.length; )
2663
- t = this.input.charCodeAt(this.state.pos);
2476
+ for (this.state.pos += 1; !ne(t) && ++this.state.pos < this.length; ) t = this.input.charCodeAt(this.state.pos);
2664
2477
  let s = this.input.slice(e + 2, this.state.pos);
2665
2478
  return this.finishToken(28, s), !0;
2666
2479
  }
@@ -2680,14 +2493,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2680
2493
  return;
2681
2494
  }
2682
2495
  if (this.hasPlugin("recordAndTuple") && e === 125) {
2683
- if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
2684
- throw this.raise(u.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
2496
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") throw this.raise(u.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
2685
2497
  this.state.pos += 2, this.finishToken(9);
2686
2498
  return;
2687
2499
  }
2688
2500
  if (this.hasPlugin("recordAndTuple") && e === 93) {
2689
- if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
2690
- throw this.raise(u.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
2501
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") throw this.raise(u.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
2691
2502
  this.state.pos += 2, this.finishToken(4);
2692
2503
  return;
2693
2504
  }
@@ -2781,22 +2592,18 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2781
2592
  return;
2782
2593
  case 91:
2783
2594
  if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
2784
- if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
2785
- throw this.raise(u.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
2595
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") throw this.raise(u.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
2786
2596
  this.state.pos += 2, this.finishToken(2);
2787
- } else
2788
- ++this.state.pos, this.finishToken(0);
2597
+ } else ++this.state.pos, this.finishToken(0);
2789
2598
  return;
2790
2599
  case 93:
2791
2600
  ++this.state.pos, this.finishToken(3);
2792
2601
  return;
2793
2602
  case 123:
2794
2603
  if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
2795
- if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
2796
- throw this.raise(u.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
2604
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") throw this.raise(u.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
2797
2605
  this.state.pos += 2, this.finishToken(6);
2798
- } else
2799
- ++this.state.pos, this.finishToken(5);
2606
+ } else ++this.state.pos, this.finishToken(5);
2800
2607
  return;
2801
2608
  case 125:
2802
2609
  ++this.state.pos, this.finishToken(8);
@@ -2895,20 +2702,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2895
2702
  readRegexp() {
2896
2703
  let t = this.state.startLoc, e = this.state.start + 1, s, r, { pos: i } = this.state;
2897
2704
  for (; ; ++i) {
2898
- if (i >= this.length)
2899
- throw this.raise(u.UnterminatedRegExp, x(t, 1));
2705
+ if (i >= this.length) throw this.raise(u.UnterminatedRegExp, x(t, 1));
2900
2706
  let p = this.input.charCodeAt(i);
2901
- if (ne(p))
2902
- throw this.raise(u.UnterminatedRegExp, x(t, 1));
2903
- if (s)
2904
- s = !1;
2707
+ if (ne(p)) throw this.raise(u.UnterminatedRegExp, x(t, 1));
2708
+ if (s) s = !1;
2905
2709
  else {
2906
- if (p === 91)
2907
- r = !0;
2908
- else if (p === 93 && r)
2909
- r = !1;
2910
- else if (p === 47 && !r)
2911
- break;
2710
+ if (p === 91) r = !0;
2711
+ else if (p === 93 && r) r = !1;
2712
+ else if (p === 47 && !r) break;
2912
2713
  s = p === 92;
2913
2714
  }
2914
2715
  }
@@ -2917,12 +2718,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2917
2718
  let n = "", o = () => x(t, i + 2 - e);
2918
2719
  for (; i < this.length; ) {
2919
2720
  let p = this.codePointAtPos(i), l = String.fromCharCode(p);
2920
- if (pr.has(p))
2921
- p === 118 ? n.includes("u") && this.raise(u.IncompatibleRegExpUVFlags, o()) : p === 117 && n.includes("v") && this.raise(u.IncompatibleRegExpUVFlags, o()), n.includes(l) && this.raise(u.DuplicateRegExpFlags, o());
2922
- else if (ae(p) || p === 92)
2923
- this.raise(u.MalformedRegExpFlags, o());
2924
- else
2925
- break;
2721
+ if (pr.has(p)) p === 118 ? n.includes("u") && this.raise(u.IncompatibleRegExpUVFlags, o()) : p === 117 && n.includes("v") && this.raise(u.IncompatibleRegExpUVFlags, o()), n.includes(l) && this.raise(u.DuplicateRegExpFlags, o());
2722
+ else if (ae(p) || p === 92) this.raise(u.MalformedRegExpFlags, o());
2723
+ else break;
2926
2724
  ++i, n += l;
2927
2725
  }
2928
2726
  this.state.pos = i, this.finishToken(138, { pattern: a, flags: n });
@@ -2937,12 +2735,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2937
2735
  let i = this.readInt(t);
2938
2736
  i == null && this.raise(u.InvalidDigit, x(s, 2), { radix: t });
2939
2737
  let a = this.input.charCodeAt(this.state.pos);
2940
- if (a === 110)
2941
- ++this.state.pos, r = !0;
2942
- else if (a === 109)
2943
- throw this.raise(u.InvalidDecimal, s);
2944
- if (J(this.codePointAtPos(this.state.pos)))
2945
- throw this.raise(u.NumberIdentifier, this.state.curPosition());
2738
+ if (a === 110) ++this.state.pos, r = !0;
2739
+ else if (a === 109) throw this.raise(u.InvalidDecimal, s);
2740
+ if (J(this.codePointAtPos(this.state.pos))) throw this.raise(u.NumberIdentifier, this.state.curPosition());
2946
2741
  if (r) {
2947
2742
  let n = this.input.slice(e, this.state.pos).replace(/[_n]/g, "");
2948
2743
  this.finishToken(136, n);
@@ -2967,8 +2762,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
2967
2762
  this.expectPlugin("decimal", this.state.curPosition()), (a || o) && this.raise(u.InvalidDecimal, s), ++this.state.pos;
2968
2763
  var l = !0;
2969
2764
  }
2970
- if (J(this.codePointAtPos(this.state.pos)))
2971
- throw this.raise(u.NumberIdentifier, this.state.curPosition());
2765
+ if (J(this.codePointAtPos(this.state.pos))) throw this.raise(u.NumberIdentifier, this.state.curPosition());
2972
2766
  let d = this.input.slice(e, this.state.pos).replace(/[_mn]/g, "");
2973
2767
  if (i) {
2974
2768
  this.finishToken(136, d);
@@ -3005,8 +2799,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3005
2799
  let e = "", s = this.state.pos, r = this.state.pos;
3006
2800
  for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length; ) {
3007
2801
  let i = this.codePointAtPos(this.state.pos);
3008
- if (ae(i))
3009
- this.state.pos += i <= 65535 ? 1 : 2;
2802
+ if (ae(i)) this.state.pos += i <= 65535 ? 1 : 2;
3010
2803
  else if (i === 92) {
3011
2804
  this.state.containsEsc = !0, e += this.input.slice(r, this.state.pos);
3012
2805
  let a = this.state.curPosition(), n = this.state.pos === s ? J : ae;
@@ -3017,8 +2810,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3017
2810
  ++this.state.pos;
3018
2811
  let o = this.readCodePoint(!0);
3019
2812
  o !== null && (n(o) || this.raise(u.EscapedCharNotAnIdentifier, a), e += String.fromCodePoint(o)), r = this.state.pos;
3020
- } else
3021
- break;
2813
+ } else break;
3022
2814
  }
3023
2815
  return e + this.input.slice(r, this.state.pos);
3024
2816
  }
@@ -3032,18 +2824,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3032
2824
  }
3033
2825
  raise(t, e, s = {}) {
3034
2826
  let r = e instanceof m ? e : e.loc.start, i = t(r, s);
3035
- if (!(this.optionFlags & 2048))
3036
- throw i;
2827
+ if (!(this.optionFlags & 2048)) throw i;
3037
2828
  return this.isLookahead || this.state.errors.push(i), i;
3038
2829
  }
3039
2830
  raiseOverwrite(t, e, s = {}) {
3040
2831
  let r = e instanceof m ? e : e.loc.start, i = r.index, a = this.state.errors;
3041
2832
  for (let n = a.length - 1; n >= 0; n--) {
3042
2833
  let o = a[n];
3043
- if (o.loc.index === i)
3044
- return a[n] = t(r, s);
3045
- if (o.loc.index < i)
3046
- break;
2834
+ if (o.loc.index === i) return a[n] = t(r, s);
2835
+ if (o.loc.index < i) break;
3047
2836
  }
3048
2837
  return this.raise(t, e, s);
3049
2838
  }
@@ -3053,13 +2842,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3053
2842
  throw this.raise(u.UnexpectedToken, t ?? this.state.startLoc, { expected: e ? Y(e) : null });
3054
2843
  }
3055
2844
  expectPlugin(t, e) {
3056
- if (this.hasPlugin(t))
3057
- return !0;
2845
+ if (this.hasPlugin(t)) return !0;
3058
2846
  throw this.raise(u.MissingPlugin, e ?? this.state.startLoc, { missingPlugin: [t] });
3059
2847
  }
3060
2848
  expectOnePlugin(t) {
3061
- if (!t.some((e) => this.hasPlugin(e)))
3062
- throw this.raise(u.MissingOneOfPlugins, this.state.startLoc, { missingPlugin: t });
2849
+ if (!t.some((e) => this.hasPlugin(e))) throw this.raise(u.MissingOneOfPlugins, this.state.startLoc, { missingPlugin: t });
3063
2850
  }
3064
2851
  errorBuilder(t) {
3065
2852
  return (e, s, r) => {
@@ -3082,8 +2869,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3082
2869
  }
3083
2870
  exit() {
3084
2871
  let t = this.stack.pop(), e = this.current();
3085
- for (let [s, r] of Array.from(t.undefinedPrivateNames))
3086
- e ? e.undefinedPrivateNames.has(s) || e.undefinedPrivateNames.set(s, r) : this.parser.raise(u.InvalidPrivateFieldResolution, r, { identifierName: s });
2872
+ for (let [s, r] of Array.from(t.undefinedPrivateNames)) e ? e.undefinedPrivateNames.has(s) || e.undefinedPrivateNames.set(s, r) : this.parser.raise(u.InvalidPrivateFieldResolution, r, { identifierName: s });
3087
2873
  }
3088
2874
  declarePrivateName(t, e, s) {
3089
2875
  let { privateNames: r, loneAccessors: i, undefinedPrivateNames: a } = this.current(), n = r.has(t);
@@ -3092,16 +2878,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3092
2878
  if (o) {
3093
2879
  let p = o & 4, l = e & 4, d = o & 3, y = e & 3;
3094
2880
  n = d === y || p !== l, n || i.delete(t);
3095
- } else
3096
- n || i.set(t, e);
2881
+ } else n || i.set(t, e);
3097
2882
  }
3098
2883
  n && this.parser.raise(u.PrivateNameRedeclaration, s, { identifierName: t }), r.add(t), a.delete(t);
3099
2884
  }
3100
2885
  usePrivateName(t, e) {
3101
2886
  let s;
3102
- for (s of this.stack)
3103
- if (s.privateNames.has(t))
3104
- return;
2887
+ for (s of this.stack) if (s.privateNames.has(t)) return;
3105
2888
  s ? s.undefinedPrivateNames.set(t, e) : this.parser.raise(u.InvalidPrivateFieldResolution, e, { identifierName: t });
3106
2889
  }
3107
2890
  }, we = class {
@@ -3141,35 +2924,28 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3141
2924
  recordParameterInitializerError(t, e) {
3142
2925
  let s = e.loc.start, { stack: r } = this, i = r.length - 1, a = r[i];
3143
2926
  for (; !a.isCertainlyParameterDeclaration(); ) {
3144
- if (a.canBeArrowParameterDeclaration())
3145
- a.recordDeclarationError(t, s);
3146
- else
3147
- return;
2927
+ if (a.canBeArrowParameterDeclaration()) a.recordDeclarationError(t, s);
2928
+ else return;
3148
2929
  a = r[--i];
3149
2930
  }
3150
2931
  this.parser.raise(t, s);
3151
2932
  }
3152
2933
  recordArrowParameterBindingError(t, e) {
3153
2934
  let { stack: s } = this, r = s[s.length - 1], i = e.loc.start;
3154
- if (r.isCertainlyParameterDeclaration())
3155
- this.parser.raise(t, i);
3156
- else if (r.canBeArrowParameterDeclaration())
3157
- r.recordDeclarationError(t, i);
3158
- else
3159
- return;
2935
+ if (r.isCertainlyParameterDeclaration()) this.parser.raise(t, i);
2936
+ else if (r.canBeArrowParameterDeclaration()) r.recordDeclarationError(t, i);
2937
+ else return;
3160
2938
  }
3161
2939
  recordAsyncArrowParametersError(t) {
3162
2940
  let { stack: e } = this, s = e.length - 1, r = e[s];
3163
- for (; r.canBeArrowParameterDeclaration(); )
3164
- r.type === 2 && r.recordDeclarationError(u.AwaitBindingIdentifier, t), r = e[--s];
2941
+ for (; r.canBeArrowParameterDeclaration(); ) r.type === 2 && r.recordDeclarationError(u.AwaitBindingIdentifier, t), r = e[--s];
3165
2942
  }
3166
2943
  validateAsPattern() {
3167
2944
  let { stack: t } = this, e = t[t.length - 1];
3168
2945
  e.canBeArrowParameterDeclaration() && e.iterateErrors(([s, r]) => {
3169
2946
  this.parser.raise(s, r);
3170
2947
  let i = t.length - 2, a = t[i];
3171
- for (; a.canBeArrowParameterDeclaration(); )
3172
- a.clearDeclarationError(r.index), a = t[--i];
2948
+ for (; a.canBeArrowParameterDeclaration(); ) a.clearDeclarationError(r.index), a = t[--i];
3173
2949
  });
3174
2950
  }
3175
2951
  };
@@ -3187,8 +2963,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3187
2963
  }
3188
2964
  var Pr = class extends ur {
3189
2965
  addExtra(t, e, s, r = !0) {
3190
- if (!t)
3191
- return;
2966
+ if (!t) return;
3192
2967
  let { extra: i } = t;
3193
2968
  i == null && (i = {}, t.extra = i), r ? i[e] = s : Object.defineProperty(i, e, { enumerable: r, value: s });
3194
2969
  }
@@ -3211,8 +2986,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3211
2986
  }
3212
2987
  expectContextual(t, e) {
3213
2988
  if (!this.eatContextual(t)) {
3214
- if (e != null)
3215
- throw this.raise(e, this.state.startLoc);
2989
+ if (e != null) throw this.raise(e, this.state.startLoc);
3216
2990
  this.unexpected(null, t);
3217
2991
  }
3218
2992
  }
@@ -3247,19 +3021,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3247
3021
  return { node: r, error: null, thrown: !1, aborted: !1, failState: null };
3248
3022
  } catch (r) {
3249
3023
  let i = this.state;
3250
- if (this.state = e, r instanceof SyntaxError)
3251
- return { node: null, error: r, thrown: !0, aborted: !1, failState: i };
3252
- if (r === s)
3253
- return { node: s.node, error: null, thrown: !1, aborted: !0, failState: i };
3024
+ if (this.state = e, r instanceof SyntaxError) return { node: null, error: r, thrown: !0, aborted: !1, failState: i };
3025
+ if (r === s) return { node: s.node, error: null, thrown: !1, aborted: !0, failState: i };
3254
3026
  throw r;
3255
3027
  }
3256
3028
  }
3257
3029
  checkExpressionErrors(t, e) {
3258
- if (!t)
3259
- return !1;
3030
+ if (!t) return !1;
3260
3031
  let { shorthandAssignLoc: s, doubleProtoLoc: r, privateKeyLoc: i, optionalParametersLoc: a } = t, n = !!s || !!r || !!a || !!i;
3261
- if (!e)
3262
- return n;
3032
+ if (!e) return n;
3263
3033
  s != null && this.raise(u.InvalidCoverInitializedName, s), r != null && this.raise(u.DuplicateProto, r), i != null && this.raise(u.UnexpectedPrivateField, i), a != null && this.unexpected(a);
3264
3034
  }
3265
3035
  isLiteralPropertyName() {
@@ -3400,14 +3170,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3400
3170
  }
3401
3171
  }
3402
3172
  toAssignableObjectExpressionProp(t, e, s) {
3403
- if (t.type === "ObjectMethod")
3404
- this.raise(t.kind === "get" || t.kind === "set" ? u.PatternHasAccessor : u.PatternHasMethod, t.key);
3173
+ if (t.type === "ObjectMethod") this.raise(t.kind === "get" || t.kind === "set" ? u.PatternHasAccessor : u.PatternHasMethod, t.key);
3405
3174
  else if (t.type === "SpreadElement") {
3406
3175
  this.castNodeTo(t, "RestElement");
3407
3176
  let r = t.argument;
3408
3177
  this.checkToRestConversion(r, !1), this.toAssignable(r, s), e || this.raise(u.RestTrailingComma, t);
3409
- } else
3410
- this.toAssignable(t, s);
3178
+ } else this.toAssignable(t, s);
3411
3179
  }
3412
3180
  toAssignableList(t, e, s) {
3413
3181
  let r = t.length - 1;
@@ -3422,8 +3190,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3422
3190
  this.castNodeTo(r, "RestElement");
3423
3191
  let i = r.argument;
3424
3192
  this.checkToRestConversion(i, !0), this.toAssignable(i, s);
3425
- } else
3426
- this.toAssignable(r, s);
3193
+ } else this.toAssignable(r, s);
3427
3194
  }
3428
3195
  isAssignable(t, e) {
3429
3196
  switch (t.type) {
@@ -3459,8 +3226,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3459
3226
  }
3460
3227
  toReferencedListDeep(t, e) {
3461
3228
  this.toReferencedList(t, e);
3462
- for (let s of t)
3463
- s?.type === "ArrayExpression" && this.toReferencedListDeep(s.elements);
3229
+ for (let s of t) s?.type === "ArrayExpression" && this.toReferencedListDeep(s.elements);
3464
3230
  }
3465
3231
  parseSpread(t) {
3466
3232
  let e = this.startNode();
@@ -3483,26 +3249,21 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3483
3249
  }
3484
3250
  parseBindingList(t, e, s) {
3485
3251
  let r = s & 1, i = [], a = !0;
3486
- for (; !this.eat(t); )
3487
- if (a ? a = !1 : this.expect(12), r && this.match(12))
3488
- i.push(null);
3489
- else {
3490
- if (this.eat(t))
3252
+ for (; !this.eat(t); ) if (a ? a = !1 : this.expect(12), r && this.match(12)) i.push(null);
3253
+ else {
3254
+ if (this.eat(t)) break;
3255
+ if (this.match(21)) {
3256
+ let n = this.parseRestBinding();
3257
+ if ((this.hasPlugin("flow") || s & 2) && (n = this.parseFunctionParamType(n)), i.push(n), !this.checkCommaAfterRest(e)) {
3258
+ this.expect(t);
3491
3259
  break;
3492
- if (this.match(21)) {
3493
- let n = this.parseRestBinding();
3494
- if ((this.hasPlugin("flow") || s & 2) && (n = this.parseFunctionParamType(n)), i.push(n), !this.checkCommaAfterRest(e)) {
3495
- this.expect(t);
3496
- break;
3497
- }
3498
- } else {
3499
- let n = [];
3500
- if (s & 2)
3501
- for (this.match(26) && this.hasPlugin("decorators") && this.raise(u.UnsupportedParameterDecorator, this.state.startLoc); this.match(26); )
3502
- n.push(this.parseDecorator());
3503
- i.push(this.parseBindingElement(s, n));
3504
3260
  }
3261
+ } else {
3262
+ let n = [];
3263
+ if (s & 2) for (this.match(26) && this.hasPlugin("decorators") && this.raise(u.UnsupportedParameterDecorator, this.state.startLoc); this.match(26); ) n.push(this.parseDecorator());
3264
+ i.push(this.parseBindingElement(s, n));
3505
3265
  }
3266
+ }
3506
3267
  return i;
3507
3268
  }
3508
3269
  parseBindingRestProperty(t) {
@@ -3510,8 +3271,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3510
3271
  }
3511
3272
  parseBindingProperty() {
3512
3273
  let { type: t, startLoc: e } = this.state;
3513
- if (t === 21)
3514
- return this.parseBindingRestProperty(this.startNode());
3274
+ if (t === 21) return this.parseBindingRestProperty(this.startNode());
3515
3275
  let s = this.startNode();
3516
3276
  return t === 139 ? (this.expectPlugin("destructuringPrivate", e), this.classScope.usePrivateName(this.state.value, e), s.key = this.parsePrivateName()) : this.parsePropertyName(s), s.method = !1, this.parseObjPropValue(s, e, !1, !1, !0, !1);
3517
3277
  }
@@ -3523,8 +3283,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3523
3283
  return t;
3524
3284
  }
3525
3285
  parseMaybeDefault(t, e) {
3526
- if (t ?? (t = this.state.startLoc), e = e ?? this.parseBindingAtom(), !this.eat(29))
3527
- return e;
3286
+ if (t ?? (t = this.state.startLoc), e = e ?? this.parseBindingAtom(), !this.eat(29)) return e;
3528
3287
  let s = this.startNodeAt(t);
3529
3288
  return s.left = e, s.right = this.parseMaybeAssignAllowIn(), this.finishNode(s, "AssignmentPattern");
3530
3289
  }
@@ -3551,8 +3310,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3551
3310
  checkLVal(t, e, s = 64, r = !1, i = !1, a = !1) {
3552
3311
  var n;
3553
3312
  let o = t.type;
3554
- if (this.isObjectMethod(t))
3555
- return;
3313
+ if (this.isObjectMethod(t)) return;
3556
3314
  let p = this.isOptionalMemberExpression(t);
3557
3315
  if (p || o === "MemberExpression") {
3558
3316
  p && (this.expectPlugin("optionalChainingAssign", t.loc.start), e.type !== "AssignmentExpression" && this.raise(u.InvalidLhsOptionalChaining, t, { ancestor: e })), s !== 64 && this.raise(u.InvalidPropertyBindingPattern, t);
@@ -3565,8 +3323,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3565
3323
  return;
3566
3324
  }
3567
3325
  let l = this.isValidLVal(o, !(a || (n = t.extra) != null && n.parenthesized) && e.type === "AssignmentExpression", s);
3568
- if (l === !0)
3569
- return;
3326
+ if (l === !0) return;
3570
3327
  if (l === !1) {
3571
3328
  let N = s === 64 ? u.InvalidLhs : u.InvalidLhsBinding;
3572
3329
  this.raise(N, t, { ancestor: e });
@@ -3575,11 +3332,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3575
3332
  let d, y;
3576
3333
  typeof l == "string" ? (d = l, y = o === "ParenthesizedExpression") : [d, y] = l;
3577
3334
  let A = o === "ArrayPattern" || o === "ObjectPattern" ? { type: o } : e, T = t[d];
3578
- if (Array.isArray(T))
3579
- for (let N of T)
3580
- N && this.checkLVal(N, A, s, r, i, y);
3581
- else
3582
- T && this.checkLVal(T, A, s, r, i, y);
3335
+ if (Array.isArray(T)) for (let N of T) N && this.checkLVal(N, A, s, r, i, y);
3336
+ else T && this.checkLVal(T, A, s, r, i, y);
3583
3337
  }
3584
3338
  checkIdentifier(t, e, s = !1) {
3585
3339
  this.state.strict && (s ? yt(t.name, this.inModule) : ft(t.name)) && (e === 64 ? this.raise(u.StrictEvalArguments, t, { referenceName: t.name }) : this.raise(u.StrictEvalArgumentsBinding, t, { bindingName: t.name })), e & 8192 && t.name === "let" && this.raise(u.LetInLexicalBinding, t), e & 64 || this.declareNameFromIdentifier(t, e);
@@ -3597,8 +3351,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3597
3351
  break;
3598
3352
  case "ArrayExpression":
3599
3353
  case "ObjectExpression":
3600
- if (e)
3601
- break;
3354
+ if (e) break;
3602
3355
  default:
3603
3356
  this.raise(u.InvalidRestAssignmentPattern, t);
3604
3357
  }
@@ -3608,13 +3361,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3608
3361
  }
3609
3362
  };
3610
3363
  function Tr(t) {
3611
- if (t == null)
3612
- throw new Error(`Unexpected ${t} value.`);
3364
+ if (t == null) throw new Error(`Unexpected ${t} value.`);
3613
3365
  return t;
3614
3366
  }
3615
3367
  function It(t) {
3616
- if (!t)
3617
- throw new Error("Assert fail");
3368
+ if (!t) throw new Error("Assert fail");
3618
3369
  }
3619
3370
  var g = $`typescript`({ AbstractMethodHasImplementation: ({ methodName: t }) => `Method '${t}' cannot have an implementation because it is marked abstract.`, AbstractPropertyHasInitializer: ({ propertyName: t }) => `Property '${t}' cannot have an initializer because it is marked abstract.`, AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", DeclareAccessor: ({ kind: t }) => `'declare' is not allowed in ${t}ters.`, DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", DuplicateAccessibilityModifier: ({ modifier: t }) => `Accessibility modifier already seen: '${t}'.`, DuplicateModifier: ({ modifier: t }) => `Duplicate modifier: '${t}'.`, EmptyHeritageClauseType: ({ token: t }) => `'${t}' list cannot be empty.`, EmptyTypeArguments: "Type argument list cannot be empty.", EmptyTypeParameters: "Type parameter list cannot be empty.", ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", ImportAliasHasImportType: "An import alias can not use 'import type'.", ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", IncompatibleModifiers: ({ modifiers: t }) => `'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`, IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", IndexSignatureHasAccessibility: ({ modifier: t }) => `Index signatures cannot have an accessibility modifier ('${t}').`, IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", InvalidHeritageClauseType: ({ token: t }) => `'${t}' list can only include identifiers or qualified-names with optional type arguments.`, InvalidModifierOnAwaitUsingDeclaration: (t) => `'${t}' modifier cannot appear on an await using declaration.`, InvalidModifierOnTypeMember: ({ modifier: t }) => `'${t}' modifier cannot appear on a type member.`, InvalidModifierOnTypeParameter: ({ modifier: t }) => `'${t}' modifier cannot appear on a type parameter.`, InvalidModifierOnTypeParameterPositions: ({ modifier: t }) => `'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`, InvalidModifierOnUsingDeclaration: (t) => `'${t}' modifier cannot appear on a using declaration.`, InvalidModifiersOrder: ({ orderedModifiers: t }) => `'${t[0]}' modifier must precede '${t[1]}' modifier.`, InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.", InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", MissingInterfaceName: "'interface' declarations must be followed by an identifier.", NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", NonClassMethodPropertyHasAbstractModifier: "'abstract' modifier can only appear on a class, method, or property declaration.", OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", PrivateElementHasAccessibility: ({ modifier: t }) => `Private elements cannot have an accessibility modifier ('${t}').`, ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.", ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", SingleTypeParameterWithoutTrailingComma: ({ typeParameterName: t }) => `Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: ({ type: t }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`, UsingDeclarationInAmbientContext: (t) => `'${t}' declarations are not allowed in ambient contexts.` });
3620
3371
  function br(t) {
@@ -3669,14 +3420,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3669
3420
  return this.match(106) ? (this.next(), this.tsTokenCanFollowModifier()) : this.tsNextTokenOnSameLineAndCanFollowModifier();
3670
3421
  }
3671
3422
  tsParseModifier(e, s, r) {
3672
- if (!F(this.state.type) && this.state.type !== 58 && this.state.type !== 75)
3673
- return;
3423
+ if (!F(this.state.type) && this.state.type !== 58 && this.state.type !== 75) return;
3674
3424
  let i = this.state.value;
3675
3425
  if (e.includes(i)) {
3676
- if (r && this.match(106) || s && this.tsIsStartOfStaticBlocks())
3677
- return;
3678
- if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))
3679
- return i;
3426
+ if (r && this.match(106) || s && this.tsIsStartOfStaticBlocks()) return;
3427
+ if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return i;
3680
3428
  }
3681
3429
  }
3682
3430
  tsParseModifiers({ allowedModifiers: e, disallowedModifiers: s, stopOnStartOfClassStaticBlock: r, errorTemplate: i = g.InvalidModifierOnTypeMember }, a) {
@@ -3687,8 +3435,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3687
3435
  };
3688
3436
  for (; ; ) {
3689
3437
  let { startLoc: p } = this.state, l = this.tsParseModifier(e.concat(s ?? []), r, a.static);
3690
- if (!l)
3691
- break;
3438
+ if (!l) break;
3692
3439
  Nt(l) ? a.accessibility ? this.raise(g.DuplicateAccessibilityModifier, p, { modifier: l }) : (n(p, l, l, "override"), n(p, l, l, "static"), n(p, l, l, "readonly"), a.accessibility = l) : Er(l) ? (a[l] && this.raise(g.DuplicateModifier, p, { modifier: l }), a[l] = !0, n(p, l, "in", "out")) : (hasOwnProperty.call(a, l) ? this.raise(g.DuplicateModifier, p, { modifier: l }) : (n(p, l, "static", "readonly"), n(p, l, "static", "override"), n(p, l, "override", "readonly"), n(p, l, "abstract", "override"), o(p, l, "declare", "override"), o(p, l, "static", "abstract")), a[l] = !0), s != null && s.includes(l) && this.raise(i, p, { modifier: l });
3693
3440
  }
3694
3441
  }
@@ -3707,8 +3454,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3707
3454
  }
3708
3455
  tsParseList(e, s) {
3709
3456
  let r = [];
3710
- for (; !this.tsIsListTerminator(e); )
3711
- r.push(s());
3457
+ for (; !this.tsIsListTerminator(e); ) r.push(s());
3712
3458
  return r;
3713
3459
  }
3714
3460
  tsParseDelimitedList(e, s, r) {
@@ -3719,14 +3465,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3719
3465
  for (; !this.tsIsListTerminator(e); ) {
3720
3466
  n = -1;
3721
3467
  let o = s();
3722
- if (o == null)
3723
- return;
3468
+ if (o == null) return;
3724
3469
  if (a.push(o), this.eat(12)) {
3725
3470
  n = this.state.lastTokStartLoc.index;
3726
3471
  continue;
3727
3472
  }
3728
- if (this.tsIsListTerminator(e))
3729
- break;
3473
+ if (this.tsIsListTerminator(e)) break;
3730
3474
  r && this.expect(12);
3731
3475
  return;
3732
3476
  }
@@ -3757,15 +3501,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3757
3501
  }
3758
3502
  tsParseEntityName(e) {
3759
3503
  let s;
3760
- if (e & 1 && this.match(78))
3761
- if (e & 2)
3762
- s = this.parseIdentifier(!0);
3763
- else {
3764
- let r = this.startNode();
3765
- this.next(), s = this.finishNode(r, "ThisExpression");
3766
- }
3767
- else
3768
- s = this.parseIdentifier(!!(e & 1));
3504
+ if (e & 1 && this.match(78)) if (e & 2) s = this.parseIdentifier(!0);
3505
+ else {
3506
+ let r = this.startNode();
3507
+ this.next(), s = this.finishNode(r, "ThisExpression");
3508
+ }
3509
+ else s = this.parseIdentifier(!!(e & 1));
3769
3510
  for (; this.eat(16); ) {
3770
3511
  let r = this.startNodeAtNode(s);
3771
3512
  r.left = s, r.right = this.parseIdentifier(!!(e & 1)), s = this.finishNode(r, "TSQualifiedName");
@@ -3794,8 +3535,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3794
3535
  return e(s), s.name = this.tsParseTypeParameterName(), s.constraint = this.tsEatThenParseType(81), s.default = this.tsEatThenParseType(29), this.finishNode(s, "TSTypeParameter");
3795
3536
  }
3796
3537
  tsTryParseTypeParameters(e) {
3797
- if (this.match(47))
3798
- return this.tsParseTypeParameters(e);
3538
+ if (this.match(47)) return this.tsParseTypeParameters(e);
3799
3539
  }
3800
3540
  tsParseTypeParameters(e) {
3801
3541
  let s = this.startNode();
@@ -3825,8 +3565,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3825
3565
  return this.next(), F(this.state.type) ? (this.next(), this.match(14)) : !1;
3826
3566
  }
3827
3567
  tsTryParseIndexSignature(e) {
3828
- if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))
3829
- return;
3568
+ if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) return;
3830
3569
  this.expect(0);
3831
3570
  let s = this.parseIdentifier();
3832
3571
  s.typeAnnotation = this.tsParseTypeAnnotation(), this.resetEndLocation(s), this.expect(3), e.parameters = [s];
@@ -3839,18 +3578,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3839
3578
  let r = e;
3840
3579
  r.kind && this.match(47) && this.raise(g.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, r), this.tsParseTypeMemberSemicolon();
3841
3580
  let i = "parameters", a = "typeAnnotation";
3842
- if (r.kind === "get")
3843
- r[i].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(r[i][0]) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()));
3581
+ if (r.kind === "get") r[i].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(r[i][0]) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()));
3844
3582
  else if (r.kind === "set") {
3845
- if (r[i].length !== 1)
3846
- this.raise(u.BadSetterArity, this.state.curPosition());
3583
+ if (r[i].length !== 1) this.raise(u.BadSetterArity, this.state.curPosition());
3847
3584
  else {
3848
3585
  let n = r[i][0];
3849
3586
  this.isThisParam(n) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()), n.type === "Identifier" && n.optional && this.raise(g.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), n.type === "RestElement" && this.raise(g.SetAccessorCannotHaveRestParameter, this.state.curPosition());
3850
3587
  }
3851
3588
  r[a] && this.raise(g.SetAccessorCannotHaveReturnType, r[a]);
3852
- } else
3853
- r.kind = "method";
3589
+ } else r.kind = "method";
3854
3590
  return this.finishNode(r, "TSMethodSignature");
3855
3591
  } else {
3856
3592
  let r = e;
@@ -3861,8 +3597,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3861
3597
  }
3862
3598
  tsParseTypeMember() {
3863
3599
  let e = this.startNode();
3864
- if (this.match(10) || this.match(47))
3865
- return this.tsParseSignatureMember("TSCallSignatureDeclaration", e);
3600
+ if (this.match(10) || this.match(47)) return this.tsParseSignatureMember("TSCallSignatureDeclaration", e);
3866
3601
  if (this.match(77)) {
3867
3602
  let r = this.startNode();
3868
3603
  return this.next(), this.match(10) || this.match(47) ? this.tsParseSignatureMember("TSConstructSignatureDeclaration", e) : (e.key = this.createIdentifier(r, "new"), this.tsParsePropertyOrMethodSignature(e, !1));
@@ -3901,14 +3636,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
3901
3636
  }
3902
3637
  tsParseTupleElementType() {
3903
3638
  let e = this.state.startLoc, s = this.eat(21), { startLoc: r } = this.state, i, a, n, o, p = V(this.state.type) ? this.lookaheadCharCode() : null;
3904
- if (p === 58)
3905
- i = !0, n = !1, a = this.parseIdentifier(!0), this.expect(14), o = this.tsParseType();
3639
+ if (p === 58) i = !0, n = !1, a = this.parseIdentifier(!0), this.expect(14), o = this.tsParseType();
3906
3640
  else if (p === 63) {
3907
3641
  n = !0;
3908
3642
  let l = this.state.value, d = this.tsParseNonArrayType();
3909
3643
  this.lookaheadCharCode() === 58 ? (i = !0, a = this.createIdentifier(this.startNodeAt(r), l), this.expect(17), this.expect(14), o = this.tsParseType()) : (i = !1, o = d, this.expect(17));
3910
- } else
3911
- o = this.tsParseType(), n = this.eat(17), i = this.eat(14);
3644
+ } else o = this.tsParseType(), n = this.eat(17), i = this.eat(14);
3912
3645
  if (i) {
3913
3646
  let l;
3914
3647
  a ? (l = this.startNodeAt(r), l.optional = n, l.label = a, l.elementType = o, this.eat(17) && (l.optional = !0, this.raise(g.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (l = this.startNodeAt(r), l.optional = n, this.raise(g.InvalidTupleMemberLabel, o), l.label = o, l.elementType = this.tsParseType()), o = this.finishNode(l, "TSNamedTupleMember");
@@ -4003,14 +3736,13 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4003
3736
  }
4004
3737
  tsParseArrayTypeOrHigher() {
4005
3738
  let { startLoc: e } = this.state, s = this.tsParseNonArrayType();
4006
- for (; !this.hasPrecedingLineBreak() && this.eat(0); )
4007
- if (this.match(3)) {
4008
- let r = this.startNodeAt(e);
4009
- r.elementType = s, this.expect(3), s = this.finishNode(r, "TSArrayType");
4010
- } else {
4011
- let r = this.startNodeAt(e);
4012
- r.objectType = s, r.indexType = this.tsParseType(), this.expect(3), s = this.finishNode(r, "TSIndexedAccessType");
4013
- }
3739
+ for (; !this.hasPrecedingLineBreak() && this.eat(0); ) if (this.match(3)) {
3740
+ let r = this.startNodeAt(e);
3741
+ r.elementType = s, this.expect(3), s = this.finishNode(r, "TSArrayType");
3742
+ } else {
3743
+ let r = this.startNodeAt(e);
3744
+ r.objectType = s, r.indexType = this.tsParseType(), this.expect(3), s = this.finishNode(r, "TSIndexedAccessType");
3745
+ }
4014
3746
  return s;
4015
3747
  }
4016
3748
  tsParseTypeOperator() {
@@ -4035,8 +3767,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4035
3767
  tsParseConstraintForInferType() {
4036
3768
  if (this.eat(81)) {
4037
3769
  let e = this.tsInDisallowConditionalTypesContext(() => this.tsParseType());
4038
- if (this.state.inDisallowConditionalTypesContext || !this.match(17))
4039
- return e;
3770
+ if (this.state.inDisallowConditionalTypesContext || !this.match(17)) return e;
4040
3771
  }
4041
3772
  }
4042
3773
  tsParseTypeOperatorOrHigher() {
@@ -4059,8 +3790,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4059
3790
  return this.match(47) ? !0 : this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
4060
3791
  }
4061
3792
  tsSkipParameterStart() {
4062
- if (F(this.state.type) || this.match(78))
4063
- return this.next(), !0;
3793
+ if (F(this.state.type) || this.match(78)) return this.next(), !0;
4064
3794
  if (this.match(5)) {
4065
3795
  let { errors: e } = this.state, s = e.length;
4066
3796
  try {
@@ -4093,31 +3823,26 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4093
3823
  return o.type === "TSThisType" ? (r.parameterName = o, r.asserts = !0, r.typeAnnotation = null, o = this.finishNode(r, "TSTypePredicate")) : (this.resetStartLocationFromNode(o, r), o.asserts = !0), s.typeAnnotation = o, this.finishNode(s, "TSTypeAnnotation");
4094
3824
  }
4095
3825
  let a = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
4096
- if (!a)
4097
- return i ? (r.parameterName = this.parseIdentifier(), r.asserts = i, r.typeAnnotation = null, s.typeAnnotation = this.finishNode(r, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(!1, s);
3826
+ if (!a) return i ? (r.parameterName = this.parseIdentifier(), r.asserts = i, r.typeAnnotation = null, s.typeAnnotation = this.finishNode(r, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(!1, s);
4098
3827
  let n = this.tsParseTypeAnnotation(!1);
4099
3828
  return r.parameterName = a, r.typeAnnotation = n, r.asserts = i, s.typeAnnotation = this.finishNode(r, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation");
4100
3829
  });
4101
3830
  }
4102
3831
  tsTryParseTypeOrTypePredicateAnnotation() {
4103
- if (this.match(14))
4104
- return this.tsParseTypeOrTypePredicateAnnotation(14);
3832
+ if (this.match(14)) return this.tsParseTypeOrTypePredicateAnnotation(14);
4105
3833
  }
4106
3834
  tsTryParseTypeAnnotation() {
4107
- if (this.match(14))
4108
- return this.tsParseTypeAnnotation();
3835
+ if (this.match(14)) return this.tsParseTypeAnnotation();
4109
3836
  }
4110
3837
  tsTryParseType() {
4111
3838
  return this.tsEatThenParseType(14);
4112
3839
  }
4113
3840
  tsParseTypePredicatePrefix() {
4114
3841
  let e = this.parseIdentifier();
4115
- if (this.isContextual(116) && !this.hasPrecedingLineBreak())
4116
- return this.next(), e;
3842
+ if (this.isContextual(116) && !this.hasPrecedingLineBreak()) return this.next(), e;
4117
3843
  }
4118
3844
  tsParseTypePredicateAsserts() {
4119
- if (this.state.type !== 109)
4120
- return !1;
3845
+ if (this.state.type !== 109) return !1;
4121
3846
  let e = this.state.containsEsc;
4122
3847
  return this.next(), !F(this.state.type) && !this.match(78) ? !1 : (e && this.raise(u.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { reservedWord: "asserts" }), !0);
4123
3848
  }
@@ -4129,8 +3854,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4129
3854
  tsParseType() {
4130
3855
  It(this.state.inType);
4131
3856
  let e = this.tsParseNonConditionalType();
4132
- if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81))
4133
- return e;
3857
+ if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) return e;
4134
3858
  let s = this.startNodeAtNode(e);
4135
3859
  return s.checkType = e, s.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()), this.expect(17), s.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()), this.expect(14), s.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()), this.finishNode(s, "TSConditionalType");
4136
3860
  }
@@ -4155,8 +3879,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4155
3879
  return r.length || this.raise(g.EmptyHeritageClauseType, s, { token: e }), r;
4156
3880
  }
4157
3881
  tsParseInterfaceDeclaration(e, s = {}) {
4158
- if (this.hasFollowingLineBreak())
4159
- return null;
3882
+ if (this.hasFollowingLineBreak()) return null;
4160
3883
  this.expectContextual(129), s.declare && (e.declare = !0), F(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(g.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
4161
3884
  let r = this.startNode();
4162
3885
  return r.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(r, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
@@ -4179,8 +3902,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4179
3902
  } finally {
4180
3903
  this.state.context = s;
4181
3904
  }
4182
- } else
4183
- return e();
3905
+ } else return e();
4184
3906
  }
4185
3907
  tsInType(e) {
4186
3908
  let s = this.state.inType;
@@ -4210,8 +3932,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4210
3932
  }
4211
3933
  }
4212
3934
  tsEatThenParseType(e) {
4213
- if (this.match(e))
4214
- return this.tsNextThenParseType();
3935
+ if (this.match(e)) return this.tsNextThenParseType();
4215
3936
  }
4216
3937
  tsExpectThenParseType(e) {
4217
3938
  return this.tsInType(() => (this.expect(e), this.tsParseType()));
@@ -4238,8 +3959,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4238
3959
  if (e.id = this.parseIdentifier(), s || this.checkIdentifier(e.id, 1024), this.eat(16)) {
4239
3960
  let r = this.startNode();
4240
3961
  this.tsParseModuleOrNamespaceDeclaration(r, !0), e.body = r;
4241
- } else
4242
- this.scope.enter(1024), this.prodParam.enter(0), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit();
3962
+ } else this.scope.enter(1024), this.prodParam.enter(0), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit();
4243
3963
  return this.finishNode(e, "TSModuleDeclaration");
4244
3964
  }
4245
3965
  tsParseAmbientExternalModuleDeclaration(e) {
@@ -4266,18 +3986,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4266
3986
  }
4267
3987
  tsTryParseAndCatch(e) {
4268
3988
  let s = this.tryParse((r) => e() || r());
4269
- if (!(s.aborted || !s.node))
4270
- return s.error && (this.state = s.failState), s.node;
3989
+ if (!(s.aborted || !s.node)) return s.error && (this.state = s.failState), s.node;
4271
3990
  }
4272
3991
  tsTryParse(e) {
4273
3992
  let s = this.state.clone(), r = e();
4274
- if (r !== void 0 && r !== !1)
4275
- return r;
3993
+ if (r !== void 0 && r !== !1) return r;
4276
3994
  this.state = s;
4277
3995
  }
4278
3996
  tsTryParseDeclare(e) {
4279
- if (this.isLineTerminator())
4280
- return;
3997
+ if (this.isLineTerminator()) return;
4281
3998
  let s = this.state.type;
4282
3999
  return this.tsInAmbientContext(() => {
4283
4000
  switch (s) {
@@ -4290,27 +4007,22 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4290
4007
  case 112:
4291
4008
  return this.tsParseAmbientExternalModuleDeclaration(e);
4292
4009
  case 100:
4293
- if (this.state.containsEsc)
4294
- return;
4010
+ if (this.state.containsEsc) return;
4295
4011
  case 75:
4296
4012
  case 74:
4297
4013
  return !this.match(75) || !this.isLookaheadContextual("enum") ? (e.declare = !0, this.parseVarStatement(e, this.state.value, !0)) : (this.expect(75), this.tsParseEnumDeclaration(e, { const: !0, declare: !0 }));
4298
4014
  case 107:
4299
- if (this.hasPlugin("explicitResourceManagement") && this.isUsing())
4300
- return this.raise(g.InvalidModifierOnUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.parseVarStatement(e, "using", !0);
4015
+ if (this.hasPlugin("explicitResourceManagement") && this.isUsing()) return this.raise(g.InvalidModifierOnUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.parseVarStatement(e, "using", !0);
4301
4016
  break;
4302
4017
  case 96:
4303
- if (this.hasPlugin("explicitResourceManagement") && this.isAwaitUsing())
4304
- return this.raise(g.InvalidModifierOnAwaitUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.next(), this.parseVarStatement(e, "await using", !0);
4018
+ if (this.hasPlugin("explicitResourceManagement") && this.isAwaitUsing()) return this.raise(g.InvalidModifierOnAwaitUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.next(), this.parseVarStatement(e, "await using", !0);
4305
4019
  break;
4306
4020
  case 129: {
4307
4021
  let r = this.tsParseInterfaceDeclaration(e, { declare: !0 });
4308
- if (r)
4309
- return r;
4022
+ if (r) return r;
4310
4023
  }
4311
4024
  default:
4312
- if (F(s))
4313
- return this.tsParseDeclaration(e, this.state.value, !0, null);
4025
+ if (F(s)) return this.tsParseDeclaration(e, this.state.value, !0, null);
4314
4026
  }
4315
4027
  });
4316
4028
  }
@@ -4337,24 +4049,19 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4337
4049
  tsParseDeclaration(e, s, r, i) {
4338
4050
  switch (s) {
4339
4051
  case "abstract":
4340
- if (this.tsCheckLineTerminator(r) && (this.match(80) || F(this.state.type)))
4341
- return this.tsParseAbstractDeclaration(e, i);
4052
+ if (this.tsCheckLineTerminator(r) && (this.match(80) || F(this.state.type))) return this.tsParseAbstractDeclaration(e, i);
4342
4053
  break;
4343
4054
  case "module":
4344
4055
  if (this.tsCheckLineTerminator(r)) {
4345
- if (this.match(134))
4346
- return this.tsParseAmbientExternalModuleDeclaration(e);
4347
- if (F(this.state.type))
4348
- return e.kind = "module", this.tsParseModuleOrNamespaceDeclaration(e);
4056
+ if (this.match(134)) return this.tsParseAmbientExternalModuleDeclaration(e);
4057
+ if (F(this.state.type)) return e.kind = "module", this.tsParseModuleOrNamespaceDeclaration(e);
4349
4058
  }
4350
4059
  break;
4351
4060
  case "namespace":
4352
- if (this.tsCheckLineTerminator(r) && F(this.state.type))
4353
- return e.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(e);
4061
+ if (this.tsCheckLineTerminator(r) && F(this.state.type)) return e.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(e);
4354
4062
  break;
4355
4063
  case "type":
4356
- if (this.tsCheckLineTerminator(r) && F(this.state.type))
4357
- return this.tsParseTypeAliasDeclaration(e);
4064
+ if (this.tsCheckLineTerminator(r) && F(this.state.type)) return this.tsParseTypeAliasDeclaration(e);
4358
4065
  break;
4359
4066
  }
4360
4067
  }
@@ -4362,20 +4069,17 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4362
4069
  return e ? this.hasFollowingLineBreak() ? !1 : (this.next(), !0) : !this.isLineTerminator();
4363
4070
  }
4364
4071
  tsTryParseGenericAsyncArrowFunction(e) {
4365
- if (!this.match(47))
4366
- return;
4072
+ if (!this.match(47)) return;
4367
4073
  let s = this.state.maybeInArrowParameters;
4368
4074
  this.state.maybeInArrowParameters = !0;
4369
4075
  let r = this.tsTryParseAndCatch(() => {
4370
4076
  let i = this.startNodeAt(e);
4371
4077
  return i.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier), super.parseFunctionParams(i), i.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(), this.expect(19), i;
4372
4078
  });
4373
- if (this.state.maybeInArrowParameters = s, !!r)
4374
- return super.parseArrowExpression(r, null, !0);
4079
+ if (this.state.maybeInArrowParameters = s, !!r) return super.parseArrowExpression(r, null, !0);
4375
4080
  }
4376
4081
  tsParseTypeArgumentsInExpression() {
4377
- if (this.reScan_lt() === 47)
4378
- return this.tsParseTypeArguments();
4082
+ if (this.reScan_lt() === 47) return this.tsParseTypeArguments();
4379
4083
  }
4380
4084
  tsParseTypeArguments() {
4381
4085
  let e = this.startNode();
@@ -4405,8 +4109,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4405
4109
  return e.type === "TSParameterProperty" && super.isSimpleParameter(e.parameter) || super.isSimpleParameter(e);
4406
4110
  }
4407
4111
  tsDisallowOptionalPattern(e) {
4408
- for (let s of e.params)
4409
- s.type !== "Identifier" && s.optional && !this.state.isAmbientContext && this.raise(g.PatternIsOptional, s);
4112
+ for (let s of e.params) s.type !== "Identifier" && s.optional && !this.state.isAmbientContext && this.raise(g.PatternIsOptional, s);
4410
4113
  }
4411
4114
  setArrowFunctionParameters(e, s, r) {
4412
4115
  super.setArrowFunctionParameters(e, s, r), this.tsDisallowOptionalPattern(e);
@@ -4439,20 +4142,17 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4439
4142
  }
4440
4143
  let a = !1;
4441
4144
  if (this.match(18) && this.lookaheadCharCode() === 60) {
4442
- if (r)
4443
- return i.stop = !0, e;
4145
+ if (r) return i.stop = !0, e;
4444
4146
  i.optionalChainMember = a = !0, this.next();
4445
4147
  }
4446
4148
  if (this.match(47) || this.match(51)) {
4447
4149
  let n, o = this.tsTryParseAndCatch(() => {
4448
4150
  if (!r && this.atPossibleAsyncArrow(e)) {
4449
4151
  let y = this.tsTryParseGenericAsyncArrowFunction(s);
4450
- if (y)
4451
- return y;
4152
+ if (y) return y;
4452
4153
  }
4453
4154
  let p = this.tsParseTypeArgumentsInExpression();
4454
- if (!p)
4455
- return;
4155
+ if (!p) return;
4456
4156
  if (a && !this.match(10)) {
4457
4157
  n = this.state.curPosition();
4458
4158
  return;
@@ -4466,13 +4166,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4466
4166
  return y.callee = e, y.arguments = this.parseCallExpressionArguments(11), this.tsCheckForInvalidTypeCasts(y.arguments), y.typeParameters = p, i.optionalChainMember && (y.optional = a), this.finishCallExpression(y, i.optionalChainMember);
4467
4167
  }
4468
4168
  let l = this.state.type;
4469
- if (l === 48 || l === 52 || l !== 10 && me(l) && !this.hasPrecedingLineBreak())
4470
- return;
4169
+ if (l === 48 || l === 52 || l !== 10 && me(l) && !this.hasPrecedingLineBreak()) return;
4471
4170
  let d = this.startNodeAt(s);
4472
4171
  return d.expression = e, d.typeParameters = p, this.finishNode(d, "TSInstantiationExpression");
4473
4172
  });
4474
- if (n && this.unexpected(n, 10), o)
4475
- return o.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(g.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (o.expression = super.stopParseSubscript(e, i))), o;
4173
+ if (n && this.unexpected(n, 10), o) return o.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(g.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (o.expression = super.stopParseSubscript(e, i))), o;
4476
4174
  }
4477
4175
  return super.parseSubscript(e, s, r, i);
4478
4176
  }
@@ -4499,8 +4197,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4499
4197
  checkDuplicateExports() {
4500
4198
  }
4501
4199
  isPotentialImportPhase(e) {
4502
- if (super.isPotentialImportPhase(e))
4503
- return !0;
4200
+ if (super.isPotentialImportPhase(e)) return !0;
4504
4201
  if (this.isContextual(130)) {
4505
4202
  let s = this.lookaheadCharCode();
4506
4203
  return e ? s === 123 || s === 42 : s !== 61;
@@ -4511,18 +4208,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4511
4208
  super.applyImportPhase(e, s, r, i), s ? e.exportKind = r === "type" ? "type" : "value" : e.importKind = r === "type" || r === "typeof" ? r : "value";
4512
4209
  }
4513
4210
  parseImport(e) {
4514
- if (this.match(134))
4515
- return e.importKind = "value", super.parseImport(e);
4211
+ if (this.match(134)) return e.importKind = "value", super.parseImport(e);
4516
4212
  let s;
4517
- if (F(this.state.type) && this.lookaheadCharCode() === 61)
4518
- return e.importKind = "value", this.tsParseImportEqualsDeclaration(e);
4213
+ if (F(this.state.type) && this.lookaheadCharCode() === 61) return e.importKind = "value", this.tsParseImportEqualsDeclaration(e);
4519
4214
  if (this.isContextual(130)) {
4520
4215
  let r = this.parseMaybeImportPhase(e, !1);
4521
- if (this.lookaheadCharCode() === 61)
4522
- return this.tsParseImportEqualsDeclaration(e, r);
4216
+ if (this.lookaheadCharCode() === 61) return this.tsParseImportEqualsDeclaration(e, r);
4523
4217
  s = super.parseImportSpecifiersAndAfter(e, r);
4524
- } else
4525
- s = super.parseImport(e);
4218
+ } else s = super.parseImport(e);
4526
4219
  return s.importKind === "type" && s.specifiers.length > 1 && s.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(g.TypeImportCannotSpecifyDefaultAndNamed, s), s;
4527
4220
  }
4528
4221
  parseExport(e, s) {
@@ -4537,8 +4230,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4537
4230
  } else if (this.eatContextual(93)) {
4538
4231
  let r = e;
4539
4232
  return this.expectContextual(128), r.id = this.parseIdentifier(), this.semicolon(), this.finishNode(r, "TSNamespaceExportDeclaration");
4540
- } else
4541
- return super.parseExport(e, s);
4233
+ } else return super.parseExport(e, s);
4542
4234
  }
4543
4235
  isAbstractClass() {
4544
4236
  return this.isContextual(124) && this.isLookaheadContextual("class");
@@ -4550,19 +4242,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4550
4242
  }
4551
4243
  if (this.match(129)) {
4552
4244
  let e = this.tsParseInterfaceDeclaration(this.startNode());
4553
- if (e)
4554
- return e;
4245
+ if (e) return e;
4555
4246
  }
4556
4247
  return super.parseExportDefaultExpression();
4557
4248
  }
4558
4249
  parseVarStatement(e, s, r = !1) {
4559
4250
  let { isAmbientContext: i } = this.state, a = super.parseVarStatement(e, s, r || i);
4560
- if (!i)
4561
- return a;
4562
- if (!e.declare && (s === "using" || s === "await using"))
4563
- return this.raiseOverwrite(g.UsingDeclarationInAmbientContext, e, s), a;
4564
- for (let { id: n, init: o } of a.declarations)
4565
- o && (s === "var" || s === "let" || n.typeAnnotation ? this.raise(g.InitializerNotAllowedInAmbientContext, o) : wr(o, this.hasPlugin("estree")) || this.raise(g.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, o));
4251
+ if (!i) return a;
4252
+ if (!e.declare && (s === "using" || s === "await using")) return this.raiseOverwrite(g.UsingDeclarationInAmbientContext, e, s), a;
4253
+ for (let { id: n, init: o } of a.declarations) o && (s === "var" || s === "let" || n.typeAnnotation ? this.raise(g.InitializerNotAllowedInAmbientContext, o) : wr(o, this.hasPlugin("estree")) || this.raise(g.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, o));
4566
4254
  return a;
4567
4255
  }
4568
4256
  parseStatementContent(e, s) {
@@ -4570,12 +4258,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4570
4258
  let r = this.startNode();
4571
4259
  return this.expect(75), this.tsParseEnumDeclaration(r, { const: !0 });
4572
4260
  }
4573
- if (this.isContextual(126))
4574
- return this.tsParseEnumDeclaration(this.startNode());
4261
+ if (this.isContextual(126)) return this.tsParseEnumDeclaration(this.startNode());
4575
4262
  if (this.isContextual(129)) {
4576
4263
  let r = this.tsParseInterfaceDeclaration(this.startNode());
4577
- if (r)
4578
- return r;
4264
+ if (r) return r;
4579
4265
  }
4580
4266
  return super.parseStatementContent(e, s);
4581
4267
  }
@@ -4614,12 +4300,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4614
4300
  return this.tsIsDeclarationStart() ? !0 : super.shouldParseExportDeclaration();
4615
4301
  }
4616
4302
  parseConditional(e, s, r) {
4617
- if (!this.match(17))
4618
- return e;
4303
+ if (!this.match(17)) return e;
4619
4304
  if (this.state.maybeInArrowParameters) {
4620
4305
  let i = this.lookaheadCharCode();
4621
- if (i === 44 || i === 61 || i === 58 || i === 41)
4622
- return this.setOptionalParametersError(r), e;
4306
+ if (i === 44 || i === 61 || i === 58 || i === 41) return this.setOptionalParametersError(r), e;
4623
4307
  }
4624
4308
  return super.parseConditional(e, s, r);
4625
4309
  }
@@ -4632,17 +4316,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4632
4316
  return e;
4633
4317
  }
4634
4318
  parseExportDeclaration(e) {
4635
- if (!this.state.isAmbientContext && this.isContextual(125))
4636
- return this.tsInAmbientContext(() => this.parseExportDeclaration(e));
4319
+ if (!this.state.isAmbientContext && this.isContextual(125)) return this.tsInAmbientContext(() => this.parseExportDeclaration(e));
4637
4320
  let s = this.state.startLoc, r = this.eatContextual(125);
4638
- if (r && (this.isContextual(125) || !this.shouldParseExportDeclaration()))
4639
- throw this.raise(g.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
4321
+ if (r && (this.isContextual(125) || !this.shouldParseExportDeclaration())) throw this.raise(g.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
4640
4322
  let i = F(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e);
4641
4323
  return i ? ((i.type === "TSInterfaceDeclaration" || i.type === "TSTypeAliasDeclaration" || r) && (e.exportKind = "type"), r && i.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(i, s), i.declare = !0), i) : null;
4642
4324
  }
4643
4325
  parseClassId(e, s, r, i) {
4644
- if ((!s || r) && this.isContextual(113))
4645
- return;
4326
+ if ((!s || r) && this.isContextual(113)) return;
4646
4327
  super.parseClassId(e, s, r, e.declare ? 1024 : 8331);
4647
4328
  let a = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);
4648
4329
  a && (e.typeParameters = a);
@@ -4701,13 +4382,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4701
4382
  var r, i, a, n, o;
4702
4383
  let p, l, d;
4703
4384
  if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
4704
- if (p = this.state.clone(), l = this.tryParse(() => super.parseMaybeAssign(e, s), p), !l.error)
4705
- return l.node;
4385
+ if (p = this.state.clone(), l = this.tryParse(() => super.parseMaybeAssign(e, s), p), !l.error) return l.node;
4706
4386
  let { context: T } = this.state, N = T[T.length - 1];
4707
4387
  (N === D.j_oTag || N === D.j_expr) && T.pop();
4708
4388
  }
4709
- if (!((r = l) != null && r.error) && !this.match(47))
4710
- return super.parseMaybeAssign(e, s);
4389
+ if (!((r = l) != null && r.error) && !this.match(47)) return super.parseMaybeAssign(e, s);
4711
4390
  (!p || p === this.state) && (p = this.state.clone());
4712
4391
  let y, A = this.tryParse((T) => {
4713
4392
  var N, R;
@@ -4715,16 +4394,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4715
4394
  let L = super.parseMaybeAssign(e, s);
4716
4395
  return (L.type !== "ArrowFunctionExpression" || (N = L.extra) != null && N.parenthesized) && T(), ((R = y) == null ? void 0 : R.params.length) !== 0 && this.resetStartLocationFromNode(L, y), L.typeParameters = y, L;
4717
4396
  }, p);
4718
- if (!A.error && !A.aborted)
4719
- return y && this.reportReservedArrowTypeParam(y), A.node;
4720
- if (!l && (It(!this.hasPlugin("jsx")), d = this.tryParse(() => super.parseMaybeAssign(e, s), p), !d.error))
4721
- return d.node;
4722
- if ((i = l) != null && i.node)
4723
- return this.state = l.failState, l.node;
4724
- if (A.node)
4725
- return this.state = A.failState, y && this.reportReservedArrowTypeParam(y), A.node;
4726
- if ((a = d) != null && a.node)
4727
- return this.state = d.failState, d.node;
4397
+ if (!A.error && !A.aborted) return y && this.reportReservedArrowTypeParam(y), A.node;
4398
+ if (!l && (It(!this.hasPlugin("jsx")), d = this.tryParse(() => super.parseMaybeAssign(e, s), p), !d.error)) return d.node;
4399
+ if ((i = l) != null && i.node) return this.state = l.failState, l.node;
4400
+ if (A.node) return this.state = A.failState, y && this.reportReservedArrowTypeParam(y), A.node;
4401
+ if ((a = d) != null && a.node) return this.state = d.failState, d.node;
4728
4402
  throw ((n = l) == null ? void 0 : n.error) || A.error || ((o = d) == null ? void 0 : o.error);
4729
4403
  }
4730
4404
  reportReservedArrowTypeParam(e) {
@@ -4740,8 +4414,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4740
4414
  let i = this.tsParseTypeOrTypePredicateAnnotation(14);
4741
4415
  return (this.canInsertSemicolon() || !this.match(19)) && r(), i;
4742
4416
  });
4743
- if (s.aborted)
4744
- return;
4417
+ if (s.aborted) return;
4745
4418
  s.thrown || (s.error && (this.state = s.failState), e.returnType = s.node);
4746
4419
  }
4747
4420
  return super.parseArrow(e);
@@ -4917,13 +4590,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4917
4590
  }
4918
4591
  }
4919
4592
  tsParseAbstractDeclaration(e, s) {
4920
- if (this.match(80))
4921
- return e.abstract = !0, this.maybeTakeDecorators(s, this.parseClass(e, !0, !1));
4593
+ if (this.match(80)) return e.abstract = !0, this.maybeTakeDecorators(s, this.parseClass(e, !0, !1));
4922
4594
  if (this.isContextual(129)) {
4923
- if (!this.hasFollowingLineBreak())
4924
- return e.abstract = !0, this.raise(g.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
4925
- } else
4926
- this.unexpected(null, 80);
4595
+ if (!this.hasFollowingLineBreak()) return e.abstract = !0, this.raise(g.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
4596
+ } else this.unexpected(null, 80);
4927
4597
  }
4928
4598
  parseMethod(e, s, r, i, a, n, o) {
4929
4599
  let p = super.parseMethod(e, s, r, i, a, n, o);
@@ -4958,10 +4628,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
4958
4628
  if (this.isContextual(93)) {
4959
4629
  let T = this.parseIdentifier();
4960
4630
  V(this.state.type) ? (p = !0, n = A, o = s ? this.parseIdentifier() : this.parseModuleExportName(), l = !1) : (o = T, l = !1);
4961
- } else
4962
- V(this.state.type) ? (l = !1, o = s ? this.parseIdentifier() : this.parseModuleExportName()) : (p = !0, n = A);
4963
- } else
4964
- V(this.state.type) && (p = !0, s ? (n = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(n.name, n.loc.start, !0, !0)) : n = this.parseModuleExportName());
4631
+ } else V(this.state.type) ? (l = !1, o = s ? this.parseIdentifier() : this.parseModuleExportName()) : (p = !0, n = A);
4632
+ } else V(this.state.type) && (p = !0, s ? (n = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(n.name, n.loc.start, !0, !0)) : n = this.parseModuleExportName());
4965
4633
  p && r && this.raise(s ? g.TypeModifierIsUsedInTypeImports : g.TypeModifierIsUsedInTypeExports, d), e[i] = n, e[a] = o;
4966
4634
  let y = s ? "importKind" : "exportKind";
4967
4635
  e[y] = p ? "type" : "value", l && this.eatContextual(93) && (e[a] = s ? this.parseIdentifier() : this.parseModuleExportName()), e[a] || (e[a] = this.cloneIdentifier(e[i])), s && this.checkIdentifier(e[a], p ? 4098 : 4096);
@@ -5043,24 +4711,20 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5043
4711
  }
5044
4712
  };
5045
4713
  function Sr(t) {
5046
- if (t.type !== "MemberExpression")
5047
- return !1;
4714
+ if (t.type !== "MemberExpression") return !1;
5048
4715
  let { computed: e, property: s } = t;
5049
4716
  return e && s.type !== "StringLiteral" && (s.type !== "TemplateLiteral" || s.expressions.length > 0) ? !1 : kt(t.object);
5050
4717
  }
5051
4718
  function wr(t, e) {
5052
4719
  var s;
5053
4720
  let { type: r } = t;
5054
- if ((s = t.extra) != null && s.parenthesized)
5055
- return !1;
4721
+ if ((s = t.extra) != null && s.parenthesized) return !1;
5056
4722
  if (e) {
5057
4723
  if (r === "Literal") {
5058
4724
  let { value: i } = t;
5059
- if (typeof i == "string" || typeof i == "boolean")
5060
- return !0;
4725
+ if (typeof i == "string" || typeof i == "boolean") return !0;
5061
4726
  }
5062
- } else if (r === "StringLiteral" || r === "BooleanLiteral")
5063
- return !0;
4727
+ } else if (r === "StringLiteral" || r === "BooleanLiteral") return !0;
5064
4728
  return !!(vt(t, e) || Ir(t, e) || r === "TemplateLiteral" && t.expressions.length === 0 || Sr(t));
5065
4729
  }
5066
4730
  function vt(t, e) {
@@ -5069,8 +4733,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5069
4733
  function Ir(t, e) {
5070
4734
  if (t.type === "UnaryExpression") {
5071
4735
  let { operator: s, argument: r } = t;
5072
- if (s === "-" && vt(r, e))
5073
- return !0;
4736
+ if (s === "-" && vt(r, e)) return !0;
5074
4737
  }
5075
4738
  return !1;
5076
4739
  }
@@ -5117,8 +4780,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5117
4780
  e && e.type === "Placeholder" && e.expectedNode === "Expression" ? e.expectedNode = "Pattern" : super.toAssignable(e, s);
5118
4781
  }
5119
4782
  chStartsBindingIdentifier(e, s) {
5120
- if (super.chStartsBindingIdentifier(e, s))
5121
- return !0;
4783
+ if (super.chStartsBindingIdentifier(e, s)) return !0;
5122
4784
  let r = this.nextTokenStart();
5123
4785
  return this.input.charCodeAt(r) === 37 && this.input.charCodeAt(r + 1) === 37;
5124
4786
  }
@@ -5127,8 +4789,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5127
4789
  }
5128
4790
  parseExpressionStatement(e, s) {
5129
4791
  var r;
5130
- if (s.type !== "Placeholder" || (r = s.extra) != null && r.parenthesized)
5131
- return super.parseExpressionStatement(e, s);
4792
+ if (s.type !== "Placeholder" || (r = s.extra) != null && r.parenthesized) return super.parseExpressionStatement(e, s);
5132
4793
  if (this.match(14)) {
5133
4794
  let a = e;
5134
4795
  return a.label = this.finishPlaceholder(s, "Identifier"), this.next(), a.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(), this.finishNode(a, "LabeledStatement");
@@ -5147,25 +4808,19 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5147
4808
  let i = s ? "ClassDeclaration" : "ClassExpression";
5148
4809
  this.next();
5149
4810
  let a = this.state.strict, n = this.parsePlaceholder("Identifier");
5150
- if (n)
5151
- if (this.match(81) || this.match(133) || this.match(5))
5152
- e.id = n;
5153
- else {
5154
- if (r || !s)
5155
- return e.id = null, e.body = this.finishPlaceholder(n, "ClassBody"), this.finishNode(e, i);
5156
- throw this.raise(Dt.ClassNameIsRequired, this.state.startLoc);
5157
- }
5158
- else
5159
- this.parseClassId(e, s, r);
4811
+ if (n) if (this.match(81) || this.match(133) || this.match(5)) e.id = n;
4812
+ else {
4813
+ if (r || !s) return e.id = null, e.body = this.finishPlaceholder(n, "ClassBody"), this.finishNode(e, i);
4814
+ throw this.raise(Dt.ClassNameIsRequired, this.state.startLoc);
4815
+ }
4816
+ else this.parseClassId(e, s, r);
5160
4817
  return super.parseClassSuper(e), e.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!e.superClass, a), this.finishNode(e, i);
5161
4818
  }
5162
4819
  parseExport(e, s) {
5163
4820
  let r = this.parsePlaceholder("Identifier");
5164
- if (!r)
5165
- return super.parseExport(e, s);
4821
+ if (!r) return super.parseExport(e, s);
5166
4822
  let i = e;
5167
- if (!this.isContextual(98) && !this.match(12))
5168
- return i.specifiers = [], i.source = null, i.declaration = this.finishPlaceholder(r, "Declaration"), this.finishNode(i, "ExportNamedDeclaration");
4823
+ if (!this.isContextual(98) && !this.match(12)) return i.specifiers = [], i.source = null, i.declaration = this.finishPlaceholder(r, "Declaration"), this.finishNode(i, "ExportNamedDeclaration");
5169
4824
  this.expectPlugin("exportDefaultFrom");
5170
4825
  let a = this.startNode();
5171
4826
  return a.exported = r, i.specifiers = [this.finishNode(a, "ExportDefaultSpecifier")], super.parseExport(i, s);
@@ -5173,8 +4828,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5173
4828
  isExportDefaultSpecifier() {
5174
4829
  if (this.match(65)) {
5175
4830
  let e = this.nextTokenStart();
5176
- if (this.isUnparsedContextual(e, "from") && this.input.startsWith(Y(133), this.nextTokenStartSince(e + 4)))
5177
- return !0;
4831
+ if (this.isUnparsedContextual(e, "from") && this.input.startsWith(Y(133), this.nextTokenStartSince(e + 4))) return !0;
5178
4832
  }
5179
4833
  return super.isExportDefaultSpecifier();
5180
4834
  }
@@ -5188,10 +4842,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5188
4842
  }
5189
4843
  parseImport(e) {
5190
4844
  let s = this.parsePlaceholder("Identifier");
5191
- if (!s)
5192
- return super.parseImport(e);
5193
- if (e.specifiers = [], !this.isContextual(98) && !this.match(12))
5194
- return e.source = this.finishPlaceholder(s, "StringLiteral"), this.semicolon(), this.finishNode(e, "ImportDeclaration");
4845
+ if (!s) return super.parseImport(e);
4846
+ if (e.specifiers = [], !this.isContextual(98) && !this.match(12)) return e.source = this.finishPlaceholder(s, "StringLiteral"), this.semicolon(), this.finishNode(e, "ImportDeclaration");
5195
4847
  let r = this.startNodeAtNode(s);
5196
4848
  return r.local = s, e.specifiers.push(this.finishNode(r, "ImportDefaultSpecifier")), this.eat(12) && (this.maybeParseStarImportSpecifier(e) || this.parseNamedImportSpecifiers(e)), this.expectContextual(98), e.source = this.parseImportSource(), this.semicolon(), this.finishNode(e, "ImportDeclaration");
5197
4849
  }
@@ -5207,8 +4859,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5207
4859
  let e = this.state.startLoc, s = this.startNode();
5208
4860
  if (this.next(), F(this.state.type)) {
5209
4861
  let r = this.parseIdentifierName(), i = this.createIdentifier(s, r);
5210
- if (this.castNodeTo(i, "V8IntrinsicIdentifier"), this.match(10))
5211
- return i;
4862
+ if (this.castNodeTo(i, "V8IntrinsicIdentifier"), this.match(10)) return i;
5212
4863
  }
5213
4864
  this.unexpected(e);
5214
4865
  }
@@ -5219,19 +4870,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5219
4870
  }, Ft = ["minimal", "fsharp", "hack", "smart"], Lt = ["^^", "@@", "^", "%", "#"];
5220
4871
  function kr(t) {
5221
4872
  if (t.has("decorators")) {
5222
- if (t.has("decorators-legacy"))
5223
- throw new Error("Cannot use the decorators and decorators-legacy plugin together");
4873
+ if (t.has("decorators-legacy")) throw new Error("Cannot use the decorators and decorators-legacy plugin together");
5224
4874
  let r = t.get("decorators").decoratorsBeforeExport;
5225
- if (r != null && typeof r != "boolean")
5226
- throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");
4875
+ if (r != null && typeof r != "boolean") throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");
5227
4876
  let i = t.get("decorators").allowCallParenthesized;
5228
- if (i != null && typeof i != "boolean")
5229
- throw new Error("'allowCallParenthesized' must be a boolean.");
4877
+ if (i != null && typeof i != "boolean") throw new Error("'allowCallParenthesized' must be a boolean.");
5230
4878
  }
5231
- if (t.has("flow") && t.has("typescript"))
5232
- throw new Error("Cannot combine flow and typescript plugins.");
5233
- if (t.has("placeholders") && t.has("v8intrinsic"))
5234
- throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
4879
+ if (t.has("flow") && t.has("typescript")) throw new Error("Cannot combine flow and typescript plugins.");
4880
+ if (t.has("placeholders") && t.has("v8intrinsic")) throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
5235
4881
  if (t.has("pipelineOperator")) {
5236
4882
  var e;
5237
4883
  let r = t.get("pipelineOperator").proposal;
@@ -5240,10 +4886,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5240
4886
  throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`);
5241
4887
  }
5242
4888
  if (r === "hack") {
5243
- if (t.has("placeholders"))
5244
- throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
5245
- if (t.has("v8intrinsic"))
5246
- throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
4889
+ if (t.has("placeholders")) throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
4890
+ if (t.has("v8intrinsic")) throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
5247
4891
  let i = t.get("pipelineOperator").topicToken;
5248
4892
  if (!Lt.includes(i)) {
5249
4893
  let a = Lt.map((n) => `"${n}"`).join(", ");
@@ -5251,39 +4895,31 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5251
4895
  }
5252
4896
  {
5253
4897
  var s;
5254
- if (i === "#" && ((s = t.get("recordAndTuple")) == null ? void 0 : s.syntaxType) === "hash")
5255
- throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", t.get("recordAndTuple")])}\`.`);
4898
+ if (i === "#" && ((s = t.get("recordAndTuple")) == null ? void 0 : s.syntaxType) === "hash") throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", t.get("recordAndTuple")])}\`.`);
5256
4899
  }
5257
- } else if (r === "smart" && ((e = t.get("recordAndTuple")) == null ? void 0 : e.syntaxType) === "hash")
5258
- throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", t.get("recordAndTuple")])}\`.`);
4900
+ } else if (r === "smart" && ((e = t.get("recordAndTuple")) == null ? void 0 : e.syntaxType) === "hash") throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", t.get("recordAndTuple")])}\`.`);
5259
4901
  }
5260
4902
  if (t.has("moduleAttributes")) {
5261
- if (t.has("deprecatedImportAssert") || t.has("importAssertions"))
5262
- throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
5263
- if (t.get("moduleAttributes").version !== "may-2020")
5264
- throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
4903
+ if (t.has("deprecatedImportAssert") || t.has("importAssertions")) throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
4904
+ if (t.get("moduleAttributes").version !== "may-2020") throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
5265
4905
  }
5266
- if (t.has("importAssertions") && t.has("deprecatedImportAssert"))
5267
- throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
4906
+ if (t.has("importAssertions") && t.has("deprecatedImportAssert")) throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
5268
4907
  if (!t.has("deprecatedImportAssert") && t.has("importAttributes") && t.get("importAttributes").deprecatedAssertSyntax && t.set("deprecatedImportAssert", {}), t.has("recordAndTuple")) {
5269
4908
  let r = t.get("recordAndTuple").syntaxType;
5270
4909
  if (r != null) {
5271
4910
  let i = ["hash", "bar"];
5272
- if (!i.includes(r))
5273
- throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + i.map((a) => `'${a}'`).join(", "));
4911
+ if (!i.includes(r)) throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + i.map((a) => `'${a}'`).join(", "));
5274
4912
  }
5275
4913
  }
5276
4914
  if (t.has("asyncDoExpressions") && !t.has("doExpressions")) {
5277
4915
  let r = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
5278
4916
  throw r.missingPlugins = "doExpressions", r;
5279
4917
  }
5280
- if (t.has("optionalChainingAssign") && t.get("optionalChainingAssign").version !== "2023-07")
5281
- throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");
4918
+ if (t.has("optionalChainingAssign") && t.get("optionalChainingAssign").version !== "2023-07") throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");
5282
4919
  }
5283
4920
  var Mt = { estree: gs, jsx: Zs, flow: Gs, typescript: Cr, v8intrinsic: vr, placeholders: Nr }, Dr = Object.keys(Mt), Fr = class extends gr {
5284
4921
  checkProto(t, e, s, r) {
5285
- if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand)
5286
- return s;
4922
+ if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand) return s;
5287
4923
  let i = t.key;
5288
4924
  return (i.type === "Identifier" ? i.name : i.value) === "__proto__" ? e ? (this.raise(u.RecordNoProto, i), !0) : (s && (r ? r.doubleProtoLoc === null && (r.doubleProtoLoc = i.loc.start) : this.raise(u.DuplicateProto, i)), !0) : s;
5289
4925
  }
@@ -5291,11 +4927,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5291
4927
  return t.type === "ArrowFunctionExpression" && this.offsetToSourcePos(t.start) === e;
5292
4928
  }
5293
4929
  getExpression() {
5294
- if (this.enterInitialScopes(), this.nextToken(), this.match(140))
5295
- throw this.raise(u.ParseExpressionEmptyInput, this.state.startLoc);
4930
+ if (this.enterInitialScopes(), this.nextToken(), this.match(140)) throw this.raise(u.ParseExpressionEmptyInput, this.state.startLoc);
5296
4931
  let t = this.parseExpression();
5297
- if (!this.match(140))
5298
- throw this.raise(u.ParseExpressionExpectsEOF, this.state.startLoc, { unexpected: this.input.codePointAt(this.state.start) });
4932
+ if (!this.match(140)) throw this.raise(u.ParseExpressionExpectsEOF, this.state.startLoc, { unexpected: this.input.codePointAt(this.state.start) });
5299
4933
  return this.finalizeRemainingComments(), t.comments = this.comments, t.errors = this.state.errors, this.optionFlags & 256 && (t.tokens = this.tokens), t;
5300
4934
  }
5301
4935
  parseExpression(t, e) {
@@ -5305,8 +4939,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5305
4939
  let e = this.state.startLoc, s = this.parseMaybeAssign(t);
5306
4940
  if (this.match(12)) {
5307
4941
  let r = this.startNodeAt(e);
5308
- for (r.expressions = [s]; this.eat(12); )
5309
- r.expressions.push(this.parseMaybeAssign(t));
4942
+ for (r.expressions = [s]; this.eat(12); ) r.expressions.push(this.parseMaybeAssign(t));
5310
4943
  return this.toReferencedList(r.expressions), this.finishNode(r, "SequenceExpression");
5311
4944
  }
5312
4945
  return s;
@@ -5338,15 +4971,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5338
4971
  this.toAssignable(n, !0), o.left = n;
5339
4972
  let l = s.index;
5340
4973
  t.doubleProtoLoc != null && t.doubleProtoLoc.index >= l && (t.doubleProtoLoc = null), t.shorthandAssignLoc != null && t.shorthandAssignLoc.index >= l && (t.shorthandAssignLoc = null), t.privateKeyLoc != null && t.privateKeyLoc.index >= l && (this.checkDestructuringPrivate(t), t.privateKeyLoc = null);
5341
- } else
5342
- o.left = n;
4974
+ } else o.left = n;
5343
4975
  return this.next(), o.right = this.parseMaybeAssign(), this.checkLVal(n, this.finishNode(o, "AssignmentExpression")), o;
5344
- } else
5345
- i && this.checkExpressionErrors(t, !0);
4976
+ } else i && this.checkExpressionErrors(t, !0);
5346
4977
  if (r) {
5347
4978
  let { type: o } = this.state;
5348
- if ((this.hasPlugin("v8intrinsic") ? me(o) : me(o) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
5349
- return this.raiseOverwrite(u.YieldNotInGeneratorFunction, s), this.parseYield(s);
4979
+ if ((this.hasPlugin("v8intrinsic") ? me(o) : me(o) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(u.YieldNotInGeneratorFunction, s), this.parseYield(s);
5350
4980
  }
5351
4981
  return n;
5352
4982
  }
@@ -5378,19 +5008,16 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5378
5008
  let i = Te(r);
5379
5009
  if (i > s) {
5380
5010
  if (r === 39) {
5381
- if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody)
5382
- return t;
5011
+ if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody) return t;
5383
5012
  this.checkPipelineAtInfixOperator(t, e);
5384
5013
  }
5385
5014
  let a = this.startNodeAt(e);
5386
5015
  a.left = t, a.operator = this.state.value;
5387
5016
  let n = r === 41 || r === 42, o = r === 40;
5388
- if (o && (i = Te(42)), this.next(), r === 39 && this.hasPlugin(["pipelineOperator", { proposal: "minimal" }]) && this.state.type === 96 && this.prodParam.hasAwait)
5389
- throw this.raise(u.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
5017
+ if (o && (i = Te(42)), this.next(), r === 39 && this.hasPlugin(["pipelineOperator", { proposal: "minimal" }]) && this.state.type === 96 && this.prodParam.hasAwait) throw this.raise(u.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
5390
5018
  a.right = this.parseExprOpRightExpr(r, i);
5391
5019
  let p = this.finishNode(a, n || o ? "LogicalExpression" : "BinaryExpression"), l = this.state.type;
5392
- if (o && (l === 41 || l === 42) || n && l === 40)
5393
- throw this.raise(u.MixingCoalesceWithLogical, this.state.startLoc);
5020
+ if (o && (l === 41 || l === 42) || n && l === 40) throw this.raise(u.MixingCoalesceWithLogical, this.state.startLoc);
5394
5021
  return this.parseExprOp(p, e, s);
5395
5022
  }
5396
5023
  }
@@ -5406,12 +5033,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5406
5033
  case "fsharp":
5407
5034
  return this.withSoloAwaitPermittingContext(() => this.parseFSharpPipelineBody(e));
5408
5035
  }
5409
- if (this.getPluginOption("pipelineOperator", "proposal") === "smart")
5410
- return this.withTopicBindingContext(() => {
5411
- if (this.prodParam.hasYield && this.isContextual(108))
5412
- throw this.raise(u.PipeBodyIsTighter, this.state.startLoc);
5413
- return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t, e), s);
5414
- });
5036
+ if (this.getPluginOption("pipelineOperator", "proposal") === "smart") return this.withTopicBindingContext(() => {
5037
+ if (this.prodParam.hasYield && this.isContextual(108)) throw this.raise(u.PipeBodyIsTighter, this.state.startLoc);
5038
+ return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t, e), s);
5039
+ });
5415
5040
  default:
5416
5041
  return this.parseExprOpBaseRightExpr(t, e);
5417
5042
  }
@@ -5443,14 +5068,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5443
5068
  let p = a.argument;
5444
5069
  p.type === "Identifier" ? this.raise(u.StrictDelete, a) : this.hasPropertyAsPrivateName(p) && this.raise(u.DeletePrivateField, a);
5445
5070
  }
5446
- if (!i)
5447
- return e || this.checkExponentialAfterUnary(a), this.finishNode(a, "UnaryExpression");
5071
+ if (!i) return e || this.checkExponentialAfterUnary(a), this.finishNode(a, "UnaryExpression");
5448
5072
  }
5449
5073
  let n = this.parseUpdate(a, i, t);
5450
5074
  if (r) {
5451
5075
  let { type: o } = this.state;
5452
- if ((this.hasPlugin("v8intrinsic") ? me(o) : me(o) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
5453
- return this.raiseOverwrite(u.AwaitNotInAsyncContext, s), this.parseAwait(s);
5076
+ if ((this.hasPlugin("v8intrinsic") ? me(o) : me(o) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(u.AwaitNotInAsyncContext, s), this.parseAwait(s);
5454
5077
  }
5455
5078
  return n;
5456
5079
  }
@@ -5460,8 +5083,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5460
5083
  return this.checkLVal(a.argument, this.finishNode(a, "UpdateExpression")), t;
5461
5084
  }
5462
5085
  let r = this.state.startLoc, i = this.parseExprSubscripts(s);
5463
- if (this.checkExpressionErrors(s, !1))
5464
- return i;
5086
+ if (this.checkExpressionErrors(s, !1)) return i;
5465
5087
  for (; Ns(this.state.type) && !this.canInsertSemicolon(); ) {
5466
5088
  let a = this.startNodeAt(r);
5467
5089
  a.operator = this.state.value, a.prefix = !1, a.argument = i, this.next(), this.checkLVal(i, i = this.finishNode(a, "UpdateExpression"));
@@ -5481,18 +5103,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5481
5103
  }
5482
5104
  parseSubscript(t, e, s, r) {
5483
5105
  let { type: i } = this.state;
5484
- if (!s && i === 15)
5485
- return this.parseBind(t, e, s, r);
5486
- if (be(i))
5487
- return this.parseTaggedTemplateExpression(t, e, r);
5106
+ if (!s && i === 15) return this.parseBind(t, e, s, r);
5107
+ if (be(i)) return this.parseTaggedTemplateExpression(t, e, r);
5488
5108
  let a = !1;
5489
5109
  if (i === 18) {
5490
- if (s && (this.raise(u.OptionalChainingNoNew, this.state.startLoc), this.lookaheadCharCode() === 40))
5491
- return this.stopParseSubscript(t, r);
5110
+ if (s && (this.raise(u.OptionalChainingNoNew, this.state.startLoc), this.lookaheadCharCode() === 40)) return this.stopParseSubscript(t, r);
5492
5111
  r.optionalChainMember = a = !0, this.next();
5493
5112
  }
5494
- if (!s && this.match(10))
5495
- return this.parseCoverCallAndAsyncArrowHead(t, e, r, a);
5113
+ if (!s && this.match(10)) return this.parseCoverCallAndAsyncArrowHead(t, e, r, a);
5496
5114
  {
5497
5115
  let n = this.eat(0);
5498
5116
  return n || a || this.eat(16) ? this.parseMember(t, e, r, n, a) : this.stopParseSubscript(t, r);
@@ -5530,19 +5148,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5530
5148
  return t.type === "Identifier" && t.name === "async" && this.state.lastTokEndLoc.index === t.end && !this.canInsertSemicolon() && t.end - t.start === 5 && this.offsetToSourcePos(t.start) === this.state.potentialArrowAt;
5531
5149
  }
5532
5150
  finishCallExpression(t, e) {
5533
- if (t.callee.type === "Import")
5534
- if (t.arguments.length === 0 || t.arguments.length > 2)
5535
- this.raise(u.ImportCallArity, t);
5536
- else
5537
- for (let s of t.arguments)
5538
- s.type === "SpreadElement" && this.raise(u.ImportCallSpreadArgument, s);
5151
+ if (t.callee.type === "Import") if (t.arguments.length === 0 || t.arguments.length > 2) this.raise(u.ImportCallArity, t);
5152
+ else for (let s of t.arguments) s.type === "SpreadElement" && this.raise(u.ImportCallSpreadArgument, s);
5539
5153
  return this.finishNode(t, e ? "OptionalCallExpression" : "CallExpression");
5540
5154
  }
5541
5155
  parseCallExpressionArguments(t, e, s, r) {
5542
5156
  let i = [], a = !0, n = this.state.inFSharpPipelineDirectBody;
5543
5157
  for (this.state.inFSharpPipelineDirectBody = !1; !this.eat(t); ) {
5544
- if (a)
5545
- a = !1;
5158
+ if (a) a = !1;
5546
5159
  else if (this.expect(12), this.match(t)) {
5547
5160
  s && this.addTrailingCommaExtraToNode(s), this.next();
5548
5161
  break;
@@ -5610,8 +5223,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5610
5223
  case 15: {
5611
5224
  e = this.startNode(), this.next(), e.object = null;
5612
5225
  let i = e.callee = this.parseNoCallExpr();
5613
- if (i.type === "MemberExpression")
5614
- return this.finishNode(e, "BindExpression");
5226
+ if (i.type === "MemberExpression") return this.finishNode(e, "BindExpression");
5615
5227
  throw this.raise(u.UnsupportedBind, i);
5616
5228
  }
5617
5229
  case 139:
@@ -5627,8 +5239,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5627
5239
  case 54:
5628
5240
  case 27: {
5629
5241
  let i = this.getPluginOption("pipelineOperator", "proposal");
5630
- if (i)
5631
- return this.parseTopicReference(i);
5242
+ if (i) return this.parseTopicReference(i);
5632
5243
  this.unexpected();
5633
5244
  break;
5634
5245
  }
@@ -5639,35 +5250,26 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5639
5250
  }
5640
5251
  default:
5641
5252
  {
5642
- if (r === 137)
5643
- return this.parseDecimalLiteral(this.state.value);
5644
- if (r === 2 || r === 1)
5645
- return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !1, !0);
5646
- if (r === 6 || r === 7)
5647
- return this.parseObjectLike(this.state.type === 6 ? 9 : 8, !1, !0);
5253
+ if (r === 137) return this.parseDecimalLiteral(this.state.value);
5254
+ if (r === 2 || r === 1) return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !1, !0);
5255
+ if (r === 6 || r === 7) return this.parseObjectLike(this.state.type === 6 ? 9 : 8, !1, !0);
5648
5256
  }
5649
5257
  if (F(r)) {
5650
- if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123)
5651
- return this.parseModuleExpression();
5258
+ if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression();
5652
5259
  let i = this.state.potentialArrowAt === this.state.start, a = this.state.containsEsc, n = this.parseIdentifier();
5653
5260
  if (!a && n.name === "async" && !this.canInsertSemicolon()) {
5654
5261
  let { type: o } = this.state;
5655
- if (o === 68)
5656
- return this.resetPreviousNodeTrailingComments(n), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(n));
5657
- if (F(o))
5658
- return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)) : n;
5659
- if (o === 90)
5660
- return this.resetPreviousNodeTrailingComments(n), this.parseDo(this.startNodeAtNode(n), !0);
5262
+ if (o === 68) return this.resetPreviousNodeTrailingComments(n), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(n));
5263
+ if (F(o)) return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)) : n;
5264
+ if (o === 90) return this.resetPreviousNodeTrailingComments(n), this.parseDo(this.startNodeAtNode(n), !0);
5661
5265
  }
5662
5266
  return i && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(n), [n], !1)) : n;
5663
- } else
5664
- this.unexpected();
5267
+ } else this.unexpected();
5665
5268
  }
5666
5269
  }
5667
5270
  parseTopicReferenceThenEqualsSign(t, e) {
5668
5271
  let s = this.getPluginOption("pipelineOperator", "proposal");
5669
- if (s)
5670
- return this.state.type = t, this.state.value = e, this.state.pos--, this.state.end--, this.state.endLoc = x(this.state.endLoc, -1), this.parseTopicReference(s);
5272
+ if (s) return this.state.type = t, this.state.value = e, this.state.pos--, this.state.end--, this.state.endLoc = x(this.state.endLoc, -1), this.parseTopicReference(s);
5671
5273
  this.unexpected();
5672
5274
  }
5673
5275
  parseTopicReference(t) {
@@ -5675,8 +5277,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5675
5277
  return this.next(), this.finishTopicReference(e, s, t, r);
5676
5278
  }
5677
5279
  finishTopicReference(t, e, s, r) {
5678
- if (this.testTopicReferenceConfiguration(s, e, r))
5679
- return s === "hack" ? (this.topicReferenceIsAllowedInCurrentContext() || this.raise(u.PipeTopicUnbound, e), this.registerTopicReference(), this.finishNode(t, "TopicReference")) : (this.topicReferenceIsAllowedInCurrentContext() || this.raise(u.PrimaryTopicNotAllowed, e), this.registerTopicReference(), this.finishNode(t, "PipelinePrimaryTopicReference"));
5280
+ if (this.testTopicReferenceConfiguration(s, e, r)) return s === "hack" ? (this.topicReferenceIsAllowedInCurrentContext() || this.raise(u.PipeTopicUnbound, e), this.registerTopicReference(), this.finishNode(t, "TopicReference")) : (this.topicReferenceIsAllowedInCurrentContext() || this.raise(u.PrimaryTopicNotAllowed, e), this.registerTopicReference(), this.finishNode(t, "PipelinePrimaryTopicReference"));
5680
5281
  throw this.raise(u.PipeTopicUnconfiguredToken, e, { token: Y(r) });
5681
5282
  }
5682
5283
  testTopicReferenceConfiguration(t, e, s) {
@@ -5767,18 +5368,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5767
5368
  this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
5768
5369
  let a = this.state.startLoc, n = [], o = new Ie(), p = !0, l, d;
5769
5370
  for (; !this.match(11); ) {
5770
- if (p)
5771
- p = !1;
5371
+ if (p) p = !1;
5772
5372
  else if (this.expect(12, o.optionalParametersLoc === null ? null : o.optionalParametersLoc), this.match(11)) {
5773
5373
  d = this.state.startLoc;
5774
5374
  break;
5775
5375
  }
5776
5376
  if (this.match(21)) {
5777
5377
  let T = this.state.startLoc;
5778
- if (l = this.state.startLoc, n.push(this.parseParenItem(this.parseRestBinding(), T)), !this.checkCommaAfterRest(41))
5779
- break;
5780
- } else
5781
- n.push(this.parseMaybeAssignAllowIn(o, this.parseParenItem));
5378
+ if (l = this.state.startLoc, n.push(this.parseParenItem(this.parseRestBinding(), T)), !this.checkCommaAfterRest(41)) break;
5379
+ } else n.push(this.parseMaybeAssignAllowIn(o, this.parseParenItem));
5782
5380
  }
5783
5381
  let y = this.state.lastTokEndLoc;
5784
5382
  this.expect(11), this.state.maybeInArrowParameters = r, this.state.inFSharpPipelineDirectBody = i;
@@ -5786,8 +5384,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5786
5384
  return t && this.shouldParseArrow(n) && (A = this.parseArrow(A)) ? (this.checkDestructuringPrivate(o), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), this.parseArrowExpression(A, n, !1), A) : (this.expressionScope.exit(), n.length || this.unexpected(this.state.lastTokStartLoc), d && this.unexpected(d), l && this.unexpected(l), this.checkExpressionErrors(o, !0), this.toReferencedListDeep(n, !0), n.length > 1 ? (s = this.startNodeAt(a), s.expressions = n, this.finishNode(s, "SequenceExpression"), this.resetEndLocation(s, y)) : s = n[0], this.wrapParenthesis(e, s));
5787
5385
  }
5788
5386
  wrapParenthesis(t, e) {
5789
- if (!(this.optionFlags & 1024))
5790
- return this.addExtra(e, "parenthesized", !0), this.addExtra(e, "parenStart", t.index), this.takeSurroundingComments(e, t.index, this.state.lastTokEndLoc.index), e;
5387
+ if (!(this.optionFlags & 1024)) return this.addExtra(e, "parenthesized", !0), this.addExtra(e, "parenStart", t.index), this.takeSurroundingComments(e, t.index, this.state.lastTokEndLoc.index), e;
5791
5388
  let s = this.startNodeAt(t);
5792
5389
  return s.expression = e, this.finishNode(s, "ParenthesizedExpression");
5793
5390
  }
@@ -5795,8 +5392,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5795
5392
  return !this.canInsertSemicolon();
5796
5393
  }
5797
5394
  parseArrow(t) {
5798
- if (this.eat(19))
5799
- return t;
5395
+ if (this.eat(19)) return t;
5800
5396
  }
5801
5397
  parseParenItem(t, e) {
5802
5398
  return t;
@@ -5815,8 +5411,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5815
5411
  if (this.parseNewCallee(t), this.eat(10)) {
5816
5412
  let e = this.parseExprList(11);
5817
5413
  this.toReferencedList(e), t.arguments = e;
5818
- } else
5819
- t.arguments = [];
5414
+ } else t.arguments = [];
5820
5415
  return this.finishNode(t, "NewExpression");
5821
5416
  }
5822
5417
  parseNewCallee(t) {
@@ -5834,8 +5429,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5834
5429
  }
5835
5430
  parseTemplate(t) {
5836
5431
  let e = this.startNode(), s = this.parseTemplateElement(t), r = [s], i = [];
5837
- for (; !s.tail; )
5838
- i.push(this.parseTemplateSubstitution()), this.readTemplateContinuation(), r.push(s = this.parseTemplateElement(t));
5432
+ for (; !s.tail; ) i.push(this.parseTemplateSubstitution()), this.readTemplateContinuation(), r.push(s = this.parseTemplateElement(t));
5839
5433
  return e.expressions = i, e.quasis = r, this.finishNode(e, "TemplateLiteral");
5840
5434
  }
5841
5435
  parseTemplateSubstitution() {
@@ -5847,8 +5441,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5847
5441
  this.state.inFSharpPipelineDirectBody = !1;
5848
5442
  let a = !1, n = !0, o = this.startNode();
5849
5443
  for (o.properties = [], this.next(); !this.match(t); ) {
5850
- if (n)
5851
- n = !1;
5444
+ if (n) n = !1;
5852
5445
  else if (this.expect(12), this.match(t)) {
5853
5446
  this.addTrailingCommaExtraToNode(o);
5854
5447
  break;
@@ -5868,12 +5461,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5868
5461
  }
5869
5462
  parsePropertyDefinition(t) {
5870
5463
  let e = [];
5871
- if (this.match(26))
5872
- for (this.hasPlugin("decorators") && this.raise(u.UnsupportedPropertyDecorator, this.state.startLoc); this.match(26); )
5873
- e.push(this.parseDecorator());
5464
+ if (this.match(26)) for (this.hasPlugin("decorators") && this.raise(u.UnsupportedPropertyDecorator, this.state.startLoc); this.match(26); ) e.push(this.parseDecorator());
5874
5465
  let s = this.startNode(), r = !1, i = !1, a;
5875
- if (this.match(21))
5876
- return e.length && this.unexpected(), this.parseSpread();
5466
+ if (this.match(21)) return e.length && this.unexpected(), this.parseSpread();
5877
5467
  e.length && (s.decorators = e, e = []), s.method = !1, t && (a = this.state.startLoc);
5878
5468
  let n = this.eat(55);
5879
5469
  this.parsePropertyNamePrefixOperator(s);
@@ -5900,20 +5490,16 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5900
5490
  let a = this.parseMethod(t, e, !1, !1, !1, "ObjectMethod");
5901
5491
  return this.checkGetterSetterParams(a), a;
5902
5492
  }
5903
- if (s || e || this.match(10))
5904
- return r && this.unexpected(), t.kind = "method", t.method = !0, this.parseMethod(t, e, s, !1, !1, "ObjectMethod");
5493
+ if (s || e || this.match(10)) return r && this.unexpected(), t.kind = "method", t.method = !0, this.parseMethod(t, e, s, !1, !1, "ObjectMethod");
5905
5494
  }
5906
5495
  parseObjectProperty(t, e, s, r) {
5907
- if (t.shorthand = !1, this.eat(14))
5908
- return t.value = s ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(r), this.finishObjectProperty(t);
5496
+ if (t.shorthand = !1, this.eat(14)) return t.value = s ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(r), this.finishObjectProperty(t);
5909
5497
  if (!t.computed && t.key.type === "Identifier") {
5910
- if (this.checkReservedWord(t.key.name, t.key.loc.start, !0, !1), s)
5911
- t.value = this.parseMaybeDefault(e, this.cloneIdentifier(t.key));
5498
+ if (this.checkReservedWord(t.key.name, t.key.loc.start, !0, !1), s) t.value = this.parseMaybeDefault(e, this.cloneIdentifier(t.key));
5912
5499
  else if (this.match(29)) {
5913
5500
  let i = this.state.startLoc;
5914
5501
  r != null ? r.shorthandAssignLoc === null && (r.shorthandAssignLoc = i) : this.raise(u.InvalidCoverInitializedName, i), t.value = this.parseMaybeDefault(e, this.cloneIdentifier(t.key));
5915
- } else
5916
- t.value = this.cloneIdentifier(t.key);
5502
+ } else t.value = this.cloneIdentifier(t.key);
5917
5503
  return t.shorthand = !0, this.finishObjectProperty(t);
5918
5504
  }
5919
5505
  }
@@ -5925,35 +5511,32 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5925
5511
  return o || this.unexpected(), o;
5926
5512
  }
5927
5513
  parsePropertyName(t, e) {
5928
- if (this.eat(0))
5929
- t.computed = !0, t.key = this.parseMaybeAssignAllowIn(), this.expect(3);
5514
+ if (this.eat(0)) t.computed = !0, t.key = this.parseMaybeAssignAllowIn(), this.expect(3);
5930
5515
  else {
5931
5516
  let { type: s, value: r } = this.state, i;
5932
- if (V(s))
5933
- i = this.parseIdentifier(!0);
5934
- else
5935
- switch (s) {
5936
- case 135:
5937
- i = this.parseNumericLiteral(r);
5938
- break;
5939
- case 134:
5940
- i = this.parseStringLiteral(r);
5941
- break;
5942
- case 136:
5943
- i = this.parseBigIntLiteral(r);
5944
- break;
5945
- case 139: {
5946
- let a = this.state.startLoc;
5947
- e != null ? e.privateKeyLoc === null && (e.privateKeyLoc = a) : this.raise(u.UnexpectedPrivateField, a), i = this.parsePrivateName();
5517
+ if (V(s)) i = this.parseIdentifier(!0);
5518
+ else switch (s) {
5519
+ case 135:
5520
+ i = this.parseNumericLiteral(r);
5521
+ break;
5522
+ case 134:
5523
+ i = this.parseStringLiteral(r);
5524
+ break;
5525
+ case 136:
5526
+ i = this.parseBigIntLiteral(r);
5527
+ break;
5528
+ case 139: {
5529
+ let a = this.state.startLoc;
5530
+ e != null ? e.privateKeyLoc === null && (e.privateKeyLoc = a) : this.raise(u.UnexpectedPrivateField, a), i = this.parsePrivateName();
5531
+ break;
5532
+ }
5533
+ default:
5534
+ if (s === 137) {
5535
+ i = this.parseDecimalLiteral(r);
5948
5536
  break;
5949
5537
  }
5950
- default:
5951
- if (s === 137) {
5952
- i = this.parseDecimalLiteral(r);
5953
- break;
5954
- }
5955
- this.unexpected();
5956
- }
5538
+ this.unexpected();
5539
+ }
5957
5540
  t.key = i, s !== 139 && (t.computed = !1);
5958
5541
  }
5959
5542
  }
@@ -5987,8 +5570,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
5987
5570
  }
5988
5571
  parseFunctionBody(t, e, s = !1) {
5989
5572
  let r = e && !this.match(5);
5990
- if (this.expressionScope.enter(St()), r)
5991
- t.body = this.parseMaybeAssign(), this.checkParams(t, !1, e, !1);
5573
+ if (this.expressionScope.enter(St()), r) t.body = this.parseMaybeAssign(), this.checkParams(t, !1, e, !1);
5992
5574
  else {
5993
5575
  let i = this.state.strict, a = this.state.labels;
5994
5576
  this.state.labels = [], this.prodParam.enter(this.prodParam.currentFlags() | 4), t.body = this.parseBlock(!0, !1, (n) => {
@@ -6004,21 +5586,17 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6004
5586
  return t.type === "Identifier";
6005
5587
  }
6006
5588
  isSimpleParamList(t) {
6007
- for (let e = 0, s = t.length; e < s; e++)
6008
- if (!this.isSimpleParameter(t[e]))
6009
- return !1;
5589
+ for (let e = 0, s = t.length; e < s; e++) if (!this.isSimpleParameter(t[e])) return !1;
6010
5590
  return !0;
6011
5591
  }
6012
5592
  checkParams(t, e, s, r = !0) {
6013
5593
  let i = !e && /* @__PURE__ */ new Set(), a = { type: "FormalParameters" };
6014
- for (let n of t.params)
6015
- this.checkLVal(n, a, 5, i, r);
5594
+ for (let n of t.params) this.checkLVal(n, a, 5, i, r);
6016
5595
  }
6017
5596
  parseExprList(t, e, s, r) {
6018
5597
  let i = [], a = !0;
6019
5598
  for (; !this.eat(t); ) {
6020
- if (a)
6021
- a = !1;
5599
+ if (a) a = !1;
6022
5600
  else if (this.expect(12), this.match(t)) {
6023
5601
  r && this.addTrailingCommaExtraToNode(r), this.next();
6024
5602
  break;
@@ -6029,8 +5607,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6029
5607
  }
6030
5608
  parseExprListItem(t, e, s) {
6031
5609
  let r;
6032
- if (this.match(12))
6033
- t || this.raise(u.UnexpectedToken, this.state.curPosition(), { unexpected: "," }), r = null;
5610
+ if (this.match(12)) t || this.raise(u.UnexpectedToken, this.state.curPosition(), { unexpected: "," }), r = null;
6034
5611
  else if (this.match(21)) {
6035
5612
  let i = this.state.startLoc;
6036
5613
  r = this.parseParenItem(this.parseSpread(e), i);
@@ -6038,8 +5615,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6038
5615
  this.expectPlugin("partialApplication"), s || this.raise(u.UnexpectedArgumentPlaceholder, this.state.startLoc);
6039
5616
  let i = this.startNode();
6040
5617
  this.next(), r = this.finishNode(i, "ArgumentPlaceholder");
6041
- } else
6042
- r = this.parseMaybeAssignAllowIn(e, this.parseParenItem);
5618
+ } else r = this.parseMaybeAssignAllowIn(e, this.parseParenItem);
6043
5619
  return r;
6044
5620
  }
6045
5621
  parseIdentifier(t) {
@@ -6097,8 +5673,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6097
5673
  return this.expressionScope.recordParameterInitializerError(u.AwaitExpressionFormalParameter, e), this.eat(55) && this.raise(u.ObsoleteAwaitStar, e), !this.scope.inFunction && !(this.optionFlags & 1) && (this.isAmbiguousPrefixOrIdentifier() ? this.ambiguousScriptDifferentAst = !0 : this.sawUnambiguousESM = !0), this.state.soloAwait || (e.argument = this.parseMaybeUnary(null, !0)), this.finishNode(e, "AwaitExpression");
6098
5674
  }
6099
5675
  isAmbiguousPrefixOrIdentifier() {
6100
- if (this.hasPrecedingLineBreak())
6101
- return !0;
5676
+ if (this.hasPrecedingLineBreak()) return !0;
6102
5677
  let { type: t } = this.state;
6103
5678
  return t === 53 || t === 10 || t === 0 || be(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
6104
5679
  }
@@ -6106,27 +5681,24 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6106
5681
  let e = this.startNodeAt(t);
6107
5682
  this.expressionScope.recordParameterInitializerError(u.YieldInParameter, e);
6108
5683
  let s = !1, r = null;
6109
- if (!this.hasPrecedingLineBreak())
6110
- switch (s = this.eat(55), this.state.type) {
6111
- case 13:
6112
- case 140:
6113
- case 8:
6114
- case 11:
6115
- case 3:
6116
- case 9:
6117
- case 14:
6118
- case 12:
6119
- if (!s)
6120
- break;
6121
- default:
6122
- r = this.parseMaybeAssign();
6123
- }
5684
+ if (!this.hasPrecedingLineBreak()) switch (s = this.eat(55), this.state.type) {
5685
+ case 13:
5686
+ case 140:
5687
+ case 8:
5688
+ case 11:
5689
+ case 3:
5690
+ case 9:
5691
+ case 14:
5692
+ case 12:
5693
+ if (!s) break;
5694
+ default:
5695
+ r = this.parseMaybeAssign();
5696
+ }
6124
5697
  return e.delegate = s, e.argument = r, this.finishNode(e, "YieldExpression");
6125
5698
  }
6126
5699
  parseImportCall(t) {
6127
5700
  if (this.next(), t.source = this.parseMaybeAssignAllowIn(), t.options = null, this.eat(12)) {
6128
- if (this.match(11))
6129
- this.addTrailingCommaExtraToNode(t.source);
5701
+ if (this.match(11)) this.addTrailingCommaExtraToNode(t.source);
6130
5702
  else if (t.options = this.parseMaybeAssignAllowIn(), this.eat(12) && (this.addTrailingCommaExtraToNode(t.options), !this.match(11))) {
6131
5703
  do
6132
5704
  this.parseMaybeAssignAllowIn();
@@ -6159,8 +5731,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6159
5731
  }
6160
5732
  }
6161
5733
  checkSmartPipeTopicBodyEarlyErrors(t) {
6162
- if (this.match(19))
6163
- throw this.raise(u.PipelineBodyNoArrow, this.state.startLoc);
5734
+ if (this.match(19)) throw this.raise(u.PipelineBodyNoArrow, this.state.startLoc);
6164
5735
  this.topicReferenceWasUsedInCurrentContext() || this.raise(u.PipelineTopicUnused, t);
6165
5736
  }
6166
5737
  withTopicBindingContext(t) {
@@ -6181,8 +5752,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6181
5752
  } finally {
6182
5753
  this.state.topicContext = e;
6183
5754
  }
6184
- } else
6185
- return t();
5755
+ } else return t();
6186
5756
  }
6187
5757
  withSoloAwaitPermittingContext(t) {
6188
5758
  let e = this.state.soloAwait;
@@ -6281,9 +5851,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6281
5851
  }
6282
5852
  parseProgram(t, e = 140, s = this.options.sourceType) {
6283
5853
  if (t.sourceType = s, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, !0, !0, e), this.inModule) {
6284
- if (!(this.optionFlags & 64) && this.scope.undefinedExports.size > 0)
6285
- for (let [i, a] of Array.from(this.scope.undefinedExports))
6286
- this.raise(u.ModuleExportUndefined, a, { localName: i });
5854
+ if (!(this.optionFlags & 64) && this.scope.undefinedExports.size > 0) for (let [i, a] of Array.from(this.scope.undefinedExports)) this.raise(u.ModuleExportUndefined, a, { localName: i });
6287
5855
  this.addExtra(t, "topLevelAwait", this.state.hasTopLevelAwait);
6288
5856
  }
6289
5857
  let r;
@@ -6294,8 +5862,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6294
5862
  return this.addExtra(s, "raw", i), this.addExtra(s, "rawValue", a), this.addExtra(s, "expressionValue", r), e.value = s, delete t.expression, e;
6295
5863
  }
6296
5864
  parseInterpreterDirective() {
6297
- if (!this.match(28))
6298
- return null;
5865
+ if (!this.match(28)) return null;
6299
5866
  let t = this.startNode();
6300
5867
  return t.value = this.state.value, this.next(), this.finishNode(t, "InterpreterDirective");
6301
5868
  }
@@ -6303,31 +5870,26 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6303
5870
  return this.isContextual(100) ? this.hasFollowingBindingAtom() : !1;
6304
5871
  }
6305
5872
  isUsing() {
6306
- if (!this.isContextual(107))
6307
- return !1;
5873
+ if (!this.isContextual(107)) return !1;
6308
5874
  let t = this.nextTokenInLineStart(), e = this.codePointAtPos(t);
6309
5875
  return this.chStartsBindingIdentifier(e, t);
6310
5876
  }
6311
5877
  isForUsing() {
6312
- if (!this.isContextual(107))
6313
- return !1;
5878
+ if (!this.isContextual(107)) return !1;
6314
5879
  let t = this.nextTokenInLineStart(), e = this.codePointAtPos(t);
6315
5880
  if (this.isUnparsedContextual(t, "of")) {
6316
5881
  let s = this.lookaheadCharCodeSince(t + 2);
6317
- if (s !== 61 && s !== 58 && s !== 59)
6318
- return !1;
5882
+ if (s !== 61 && s !== 58 && s !== 59) return !1;
6319
5883
  }
6320
5884
  return this.chStartsBindingIdentifier(e, t) ? (this.expectPlugin("explicitResourceManagement"), !0) : !1;
6321
5885
  }
6322
5886
  isAwaitUsing() {
6323
- if (!this.isContextual(96))
6324
- return !1;
5887
+ if (!this.isContextual(96)) return !1;
6325
5888
  let t = this.nextTokenInLineStart();
6326
5889
  if (this.isUnparsedContextual(t, "using")) {
6327
5890
  t = this.nextTokenInLineStartSince(t + 5);
6328
5891
  let e = this.codePointAtPos(t);
6329
- if (this.chStartsBindingIdentifier(e, t))
6330
- return this.expectPlugin("explicitResourceManagement"), !0;
5892
+ if (this.chStartsBindingIdentifier(e, t)) return this.expectPlugin("explicitResourceManagement"), !0;
6331
5893
  }
6332
5894
  return !1;
6333
5895
  }
@@ -6335,12 +5897,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6335
5897
  if (J(t)) {
6336
5898
  if (Xe.lastIndex = e, Xe.test(this.input)) {
6337
5899
  let s = this.codePointAtPos(Xe.lastIndex);
6338
- if (!ae(s) && s !== 92)
6339
- return !1;
5900
+ if (!ae(s) && s !== 92) return !1;
6340
5901
  }
6341
5902
  return !0;
6342
- } else
6343
- return t === 92;
5903
+ } else return t === 92;
6344
5904
  }
6345
5905
  chStartsBindingPattern(t) {
6346
5906
  return t === 91 || t === 123;
@@ -6387,8 +5947,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6387
5947
  case 91:
6388
5948
  return this.parseForStatement(r);
6389
5949
  case 68:
6390
- if (this.lookaheadCharCode() === 46)
6391
- break;
5950
+ if (this.lookaheadCharCode() === 46) break;
6392
5951
  return a || this.raise(this.state.strict ? u.StrictFunction : this.options.annexB ? u.SloppyFunctionAnnexB : u.SloppyFunction, this.state.startLoc), this.parseFunctionStatement(r, !1, !i && a);
6393
5952
  case 80:
6394
5953
  return i || this.unexpected(), this.parseClass(this.maybeTakeDecorators(e, r), !0);
@@ -6403,19 +5962,15 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6403
5962
  case 73:
6404
5963
  return this.parseTryStatement(r);
6405
5964
  case 96:
6406
- if (this.isAwaitUsing())
6407
- return this.allowsUsing() ? i ? this.recordAwaitIfAllowed() || this.raise(u.AwaitUsingNotInAsyncContext, r) : this.raise(u.UnexpectedLexicalDeclaration, r) : this.raise(u.UnexpectedUsingDeclaration, r), this.next(), this.parseVarStatement(r, "await using");
5965
+ if (this.isAwaitUsing()) return this.allowsUsing() ? i ? this.recordAwaitIfAllowed() || this.raise(u.AwaitUsingNotInAsyncContext, r) : this.raise(u.UnexpectedLexicalDeclaration, r) : this.raise(u.UnexpectedUsingDeclaration, r), this.next(), this.parseVarStatement(r, "await using");
6408
5966
  break;
6409
5967
  case 107:
6410
- if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace())
6411
- break;
5968
+ if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) break;
6412
5969
  return this.expectPlugin("explicitResourceManagement"), this.allowsUsing() ? i || this.raise(u.UnexpectedLexicalDeclaration, this.state.startLoc) : this.raise(u.UnexpectedUsingDeclaration, this.state.startLoc), this.parseVarStatement(r, "using");
6413
5970
  case 100: {
6414
- if (this.state.containsEsc)
6415
- break;
5971
+ if (this.state.containsEsc) break;
6416
5972
  let l = this.nextTokenStart(), d = this.codePointAtPos(l);
6417
- if (d !== 91 && (!i && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(d, l) && d !== 123))
6418
- break;
5973
+ if (d !== 91 && (!i && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(d, l) && d !== 123)) break;
6419
5974
  }
6420
5975
  case 75:
6421
5976
  i || this.raise(u.UnexpectedLexicalDeclaration, this.state.startLoc);
@@ -6433,8 +5988,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6433
5988
  return this.parseEmptyStatement(r);
6434
5989
  case 83: {
6435
5990
  let l = this.lookaheadCharCode();
6436
- if (l === 40 || l === 46)
6437
- break;
5991
+ if (l === 40 || l === 46) break;
6438
5992
  }
6439
5993
  case 82: {
6440
5994
  !(this.optionFlags & 8) && !n && this.raise(u.UnexpectedImportExport, this.state.startLoc), this.next();
@@ -6442,8 +5996,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6442
5996
  return s === 83 ? l = this.parseImport(r) : l = this.parseExport(r, e), this.assertModuleNodeAllowed(l), l;
6443
5997
  }
6444
5998
  default:
6445
- if (this.isAsyncFunction())
6446
- return i || this.raise(u.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(r, !0, !i && a);
5999
+ if (this.isAsyncFunction()) return i || this.raise(u.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(r, !0, !i && a);
6447
6000
  }
6448
6001
  let o = this.state.value, p = this.parseExpression();
6449
6002
  return F(s) && p.type === "Identifier" && this.eat(14) ? this.parseLabeledStatement(r, o, p, t) : this.parseExpressionStatement(r, p, e);
@@ -6469,10 +6022,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6469
6022
  do
6470
6023
  e.push(this.parseDecorator());
6471
6024
  while (this.match(26));
6472
- if (this.match(82))
6473
- t || this.unexpected(), this.decoratorsEnabledBeforeExport() || this.raise(u.DecoratorExportClass, this.state.startLoc);
6474
- else if (!this.canHaveLeadingDecorator())
6475
- throw this.raise(u.UnexpectedLeadingDecorator, this.state.startLoc);
6025
+ if (this.match(82)) t || this.unexpected(), this.decoratorsEnabledBeforeExport() || this.raise(u.DecoratorExportClass, this.state.startLoc);
6026
+ else if (!this.canHaveLeadingDecorator()) throw this.raise(u.UnexpectedLeadingDecorator, this.state.startLoc);
6476
6027
  return e;
6477
6028
  }
6478
6029
  parseDecorator() {
@@ -6492,8 +6043,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6492
6043
  }
6493
6044
  t.expression = this.parseMaybeDecoratorArguments(s, e);
6494
6045
  }
6495
- } else
6496
- t.expression = this.parseExprSubscripts();
6046
+ } else t.expression = this.parseExprSubscripts();
6497
6047
  return this.finishNode(t, "Decorator");
6498
6048
  }
6499
6049
  parseMaybeDecoratorArguments(t, e) {
@@ -6510,8 +6060,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6510
6060
  let s;
6511
6061
  for (s = 0; s < this.state.labels.length; ++s) {
6512
6062
  let r = this.state.labels[s];
6513
- if ((t.label == null || r.name === t.label.name) && (r.kind != null && (e || r.kind === 1) || t.label && e))
6514
- break;
6063
+ if ((t.label == null || r.name === t.label.name) && (r.kind != null && (e || r.kind === 1) || t.label && e)) break;
6515
6064
  }
6516
6065
  if (s === this.state.labels.length) {
6517
6066
  let r = e ? "BreakStatement" : "ContinueStatement";
@@ -6532,8 +6081,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6532
6081
  parseForStatement(t) {
6533
6082
  this.next(), this.state.labels.push(We);
6534
6083
  let e = null;
6535
- if (this.isContextual(96) && this.recordAwaitIfAllowed() && (e = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13))
6536
- return e !== null && this.unexpected(e), this.parseFor(t, null);
6084
+ if (this.isContextual(96) && this.recordAwaitIfAllowed() && (e = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13)) return e !== null && this.unexpected(e), this.parseFor(t, null);
6537
6085
  let s = this.isContextual(100);
6538
6086
  {
6539
6087
  let o = this.isAwaitUsing(), p = o || this.isForUsing(), l = s && this.hasFollowingBindingAtom() || p;
@@ -6549,8 +6097,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6549
6097
  this.checkDestructuringPrivate(i), this.toAssignable(a, !0);
6550
6098
  let o = n ? "ForOfStatement" : "ForInStatement";
6551
6099
  return this.checkLVal(a, { type: o }), this.parseForIn(t, a, e);
6552
- } else
6553
- this.checkExpressionErrors(i, !0);
6100
+ } else this.checkExpressionErrors(i, !0);
6554
6101
  return e !== null && this.unexpected(e), this.parseFor(t, a);
6555
6102
  }
6556
6103
  parseFunctionStatement(t, e, s) {
@@ -6567,12 +6114,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6567
6114
  let e = t.cases = [];
6568
6115
  this.expect(5), this.state.labels.push(Lr), this.scope.enter(256);
6569
6116
  let s;
6570
- for (let r; !this.match(8); )
6571
- if (this.match(61) || this.match(65)) {
6572
- let i = this.match(61);
6573
- s && this.finishNode(s, "SwitchCase"), e.push(s = this.startNode()), s.consequent = [], this.next(), i ? s.test = this.parseExpression() : (r && this.raise(u.MultipleDefaultsInSwitch, this.state.lastTokStartLoc), r = !0, s.test = null), this.expect(14);
6574
- } else
6575
- s ? s.consequent.push(this.parseStatementListItem()) : this.unexpected();
6117
+ for (let r; !this.match(8); ) if (this.match(61) || this.match(65)) {
6118
+ let i = this.match(61);
6119
+ s && this.finishNode(s, "SwitchCase"), e.push(s = this.startNode()), s.consequent = [], this.next(), i ? s.test = this.parseExpression() : (r && this.raise(u.MultipleDefaultsInSwitch, this.state.lastTokStartLoc), r = !0, s.test = null), this.expect(14);
6120
+ } else s ? s.consequent.push(this.parseStatementListItem()) : this.unexpected();
6576
6121
  return this.scope.exit(), s && this.finishNode(s, "SwitchCase"), this.next(), this.state.labels.pop(), this.finishNode(t, "SwitchStatement");
6577
6122
  }
6578
6123
  parseThrowStatement(t) {
@@ -6602,15 +6147,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6602
6147
  return this.next(), this.finishNode(t, "EmptyStatement");
6603
6148
  }
6604
6149
  parseLabeledStatement(t, e, s, r) {
6605
- for (let a of this.state.labels)
6606
- a.name === e && this.raise(u.LabelRedeclaration, s, { labelName: e });
6150
+ for (let a of this.state.labels) a.name === e && this.raise(u.LabelRedeclaration, s, { labelName: e });
6607
6151
  let i = ws(this.state.type) ? 1 : this.match(71) ? 2 : null;
6608
6152
  for (let a = this.state.labels.length - 1; a >= 0; a--) {
6609
6153
  let n = this.state.labels[a];
6610
- if (n.statementStart === t.start)
6611
- n.statementStart = this.sourceToOffsetPos(this.state.start), n.kind = i;
6612
- else
6613
- break;
6154
+ if (n.statementStart === t.start) n.statementStart = this.sourceToOffsetPos(this.state.start), n.kind = i;
6155
+ else break;
6614
6156
  }
6615
6157
  return this.state.labels.push({ name: e, kind: i, statementStart: this.sourceToOffsetPos(this.state.start) }), t.body = r & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0) : this.parseStatement(), this.state.labels.pop(), t.label = s, this.finishNode(t, "LabeledStatement");
6616
6158
  }
@@ -6655,8 +6197,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6655
6197
  let i = t.declarations = [];
6656
6198
  for (t.kind = s; ; ) {
6657
6199
  let a = this.startNode();
6658
- if (this.parseVarId(a, s), a.init = this.eat(29) ? e ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn() : null, a.init === null && !r && (a.id.type !== "Identifier" && !(e && (this.match(58) || this.isContextual(102))) ? this.raise(u.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: "destructuring" }) : (s === "const" || s === "using" || s === "await using") && !(this.match(58) || this.isContextual(102)) && this.raise(u.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: s })), i.push(this.finishNode(a, "VariableDeclarator")), !this.eat(12))
6659
- break;
6200
+ if (this.parseVarId(a, s), a.init = this.eat(29) ? e ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn() : null, a.init === null && !r && (a.id.type !== "Identifier" && !(e && (this.match(58) || this.isContextual(102))) ? this.raise(u.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: "destructuring" }) : (s === "const" || s === "using" || s === "await using") && !(this.match(58) || this.isContextual(102)) && this.raise(u.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: s })), i.push(this.finishNode(a, "VariableDeclarator")), !this.eat(12)) break;
6660
6201
  }
6661
6202
  return t;
6662
6203
  }
@@ -6707,8 +6248,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6707
6248
  if (i.body = [], this.expect(5), this.withSmartMixTopicForbiddingContext(() => {
6708
6249
  for (; !this.match(8); ) {
6709
6250
  if (this.eat(13)) {
6710
- if (r.length > 0)
6711
- throw this.raise(u.DecoratorSemicolon, this.state.lastTokEndLoc);
6251
+ if (r.length > 0) throw this.raise(u.DecoratorSemicolon, this.state.lastTokEndLoc);
6712
6252
  continue;
6713
6253
  }
6714
6254
  if (this.match(26)) {
@@ -6718,8 +6258,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6718
6258
  let a = this.startNode();
6719
6259
  r.length && (a.decorators = r, this.resetStartLocationFromNode(a, r[0]), r = []), this.parseClassMember(i, a, s), a.kind === "constructor" && a.decorators && a.decorators.length > 0 && this.raise(u.DecoratorConstructor, a);
6720
6260
  }
6721
- }), this.state.strict = e, this.next(), r.length)
6722
- throw this.raise(u.TrailingDecorator, this.state.startLoc);
6261
+ }), this.state.strict = e, this.next(), r.length) throw this.raise(u.TrailingDecorator, this.state.startLoc);
6723
6262
  return this.classScope.exit(), this.finishNode(i, "ClassBody");
6724
6263
  }
6725
6264
  parseClassMemberFromModifier(t, e) {
@@ -6736,8 +6275,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6736
6275
  parseClassMember(t, e, s) {
6737
6276
  let r = this.isContextual(106);
6738
6277
  if (r) {
6739
- if (this.parseClassMemberFromModifier(t, e))
6740
- return;
6278
+ if (this.parseClassMemberFromModifier(t, e)) return;
6741
6279
  if (this.eat(5)) {
6742
6280
  this.parseClassStaticBlock(t, e);
6743
6281
  return;
@@ -6765,8 +6303,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6765
6303
  }
6766
6304
  let L = this.isNonstaticConstructor(i), U = !1;
6767
6305
  L && (i.kind = "constructor", s.hadConstructor && !this.hasPlugin("typescript") && this.raise(u.DuplicateConstructor, A), L && this.hasPlugin("typescript") && e.override && this.raise(u.OverrideOnConstructor, A), s.hadConstructor = !0, U = s.hadSuperClass), this.pushClassMethod(t, i, !1, !1, L, U);
6768
- } else if (this.isClassProperty())
6769
- N ? this.pushClassPrivateProperty(t, o) : this.pushClassProperty(t, n);
6306
+ } else if (this.isClassProperty()) N ? this.pushClassPrivateProperty(t, o) : this.pushClassProperty(t, n);
6770
6307
  else if (T === "async" && !this.isLineTerminator()) {
6771
6308
  this.resetPreviousNodeTrailingComments(A);
6772
6309
  let L = this.eat(55);
@@ -6781,8 +6318,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6781
6318
  this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(A);
6782
6319
  let L = this.match(139);
6783
6320
  this.parseClassElementName(n), this.pushClassAccessorProperty(t, p, L);
6784
- } else
6785
- this.isLineTerminator() ? N ? this.pushClassPrivateProperty(t, o) : this.pushClassProperty(t, n) : this.unexpected();
6321
+ } else this.isLineTerminator() ? N ? this.pushClassPrivateProperty(t, o) : this.pushClassProperty(t, n) : this.unexpected();
6786
6322
  }
6787
6323
  parseClassElementName(t) {
6788
6324
  let { type: e, value: s } = this.state;
@@ -6840,12 +6376,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6840
6376
  this.scope.enter(592), this.expressionScope.enter(St()), this.prodParam.enter(0), t.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null, this.expressionScope.exit(), this.prodParam.exit(), this.scope.exit();
6841
6377
  }
6842
6378
  parseClassId(t, e, s, r = 8331) {
6843
- if (F(this.state.type))
6844
- t.id = this.parseIdentifier(), e && this.declareNameFromIdentifier(t.id, r);
6845
- else if (s || !e)
6846
- t.id = null;
6847
- else
6848
- throw this.raise(u.MissingClassName, this.state.startLoc);
6379
+ if (F(this.state.type)) t.id = this.parseIdentifier(), e && this.declareNameFromIdentifier(t.id, r);
6380
+ else if (s || !e) t.id = null;
6381
+ else throw this.raise(u.MissingClassName, this.state.startLoc);
6849
6382
  }
6850
6383
  parseClassSuper(t) {
6851
6384
  t.superClass = this.eat(81) ? this.parseExprSubscripts() : null;
@@ -6853,34 +6386,27 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6853
6386
  parseExport(t, e) {
6854
6387
  let s = this.parseMaybeImportPhase(t, !0), r = this.maybeParseExportDefaultSpecifier(t, s), i = !r || this.eat(12), a = i && this.eatExportStar(t), n = a && this.maybeParseExportNamespaceSpecifier(t), o = i && (!n || this.eat(12)), p = r || a;
6855
6388
  if (a && !n) {
6856
- if (r && this.unexpected(), e)
6857
- throw this.raise(u.UnsupportedDecoratorExport, t);
6389
+ if (r && this.unexpected(), e) throw this.raise(u.UnsupportedDecoratorExport, t);
6858
6390
  return this.parseExportFrom(t, !0), this.sawUnambiguousESM = !0, this.finishNode(t, "ExportAllDeclaration");
6859
6391
  }
6860
6392
  let l = this.maybeParseExportNamedSpecifiers(t);
6861
6393
  r && i && !a && !l && this.unexpected(null, 5), n && o && this.unexpected(null, 98);
6862
6394
  let d;
6863
6395
  if (p || l) {
6864
- if (d = !1, e)
6865
- throw this.raise(u.UnsupportedDecoratorExport, t);
6396
+ if (d = !1, e) throw this.raise(u.UnsupportedDecoratorExport, t);
6866
6397
  this.parseExportFrom(t, p);
6867
- } else
6868
- d = this.maybeParseExportDeclaration(t);
6398
+ } else d = this.maybeParseExportDeclaration(t);
6869
6399
  if (p || l || d) {
6870
6400
  var y;
6871
6401
  let A = t;
6872
- if (this.checkExport(A, !0, !1, !!A.source), ((y = A.declaration) == null ? void 0 : y.type) === "ClassDeclaration")
6873
- this.maybeTakeDecorators(e, A.declaration, A);
6874
- else if (e)
6875
- throw this.raise(u.UnsupportedDecoratorExport, t);
6402
+ if (this.checkExport(A, !0, !1, !!A.source), ((y = A.declaration) == null ? void 0 : y.type) === "ClassDeclaration") this.maybeTakeDecorators(e, A.declaration, A);
6403
+ else if (e) throw this.raise(u.UnsupportedDecoratorExport, t);
6876
6404
  return this.sawUnambiguousESM = !0, this.finishNode(A, "ExportNamedDeclaration");
6877
6405
  }
6878
6406
  if (this.eat(65)) {
6879
6407
  let A = t, T = this.parseExportDefaultExpression();
6880
- if (A.declaration = T, T.type === "ClassDeclaration")
6881
- this.maybeTakeDecorators(e, T, A);
6882
- else if (e)
6883
- throw this.raise(u.UnsupportedDecoratorExport, t);
6408
+ if (A.declaration = T, T.type === "ClassDeclaration") this.maybeTakeDecorators(e, T, A);
6409
+ else if (e) throw this.raise(u.UnsupportedDecoratorExport, t);
6884
6410
  return this.checkExport(A, !0, !0), this.sawUnambiguousESM = !0, this.finishNode(A, "ExportDefaultDeclaration");
6885
6411
  }
6886
6412
  this.unexpected(null, 5);
@@ -6918,23 +6444,17 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6918
6444
  return this.shouldParseExportDeclaration() ? (t.specifiers = [], t.source = null, this.hasPlugin("importAssertions") ? t.assertions = [] : t.attributes = [], t.declaration = this.parseExportDeclaration(t), !0) : !1;
6919
6445
  }
6920
6446
  isAsyncFunction() {
6921
- if (!this.isContextual(95))
6922
- return !1;
6447
+ if (!this.isContextual(95)) return !1;
6923
6448
  let t = this.nextTokenInLineStart();
6924
6449
  return this.isUnparsedContextual(t, "function");
6925
6450
  }
6926
6451
  parseExportDefaultExpression() {
6927
6452
  let t = this.startNode();
6928
- if (this.match(68))
6929
- return this.next(), this.parseFunction(t, 5);
6930
- if (this.isAsyncFunction())
6931
- return this.next(), this.next(), this.parseFunction(t, 13);
6932
- if (this.match(80))
6933
- return this.parseClass(t, !0, !0);
6934
- if (this.match(26))
6935
- return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(u.DecoratorBeforeExport, this.state.startLoc), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1), this.startNode()), !0, !0);
6936
- if (this.match(75) || this.match(74) || this.isLet() || this.hasPlugin("explicitResourceManagement") && (this.isUsing() || this.isAwaitUsing()))
6937
- throw this.raise(u.UnsupportedDefaultExport, this.state.startLoc);
6453
+ if (this.match(68)) return this.next(), this.parseFunction(t, 5);
6454
+ if (this.isAsyncFunction()) return this.next(), this.next(), this.parseFunction(t, 13);
6455
+ if (this.match(80)) return this.parseClass(t, !0, !0);
6456
+ if (this.match(26)) return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(u.DecoratorBeforeExport, this.state.startLoc), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1), this.startNode()), !0, !0);
6457
+ if (this.match(75) || this.match(74) || this.isLet() || this.hasPlugin("explicitResourceManagement") && (this.isUsing() || this.isAwaitUsing())) throw this.raise(u.UnsupportedDefaultExport, this.state.startLoc);
6938
6458
  let e = this.parseMaybeAssignAllowIn();
6939
6459
  return this.semicolon(), e;
6940
6460
  }
@@ -6944,18 +6464,14 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6944
6464
  isExportDefaultSpecifier() {
6945
6465
  let { type: t } = this.state;
6946
6466
  if (F(t)) {
6947
- if (t === 95 && !this.state.containsEsc || t === 100)
6948
- return !1;
6467
+ if (t === 95 && !this.state.containsEsc || t === 100) return !1;
6949
6468
  if ((t === 130 || t === 129) && !this.state.containsEsc) {
6950
6469
  let r = this.nextTokenStart(), i = this.input.charCodeAt(r);
6951
- if (i === 123 || this.chStartsBindingIdentifier(i, r) && !this.input.startsWith("from", r))
6952
- return this.expectOnePlugin(["flow", "typescript"]), !1;
6470
+ if (i === 123 || this.chStartsBindingIdentifier(i, r) && !this.input.startsWith("from", r)) return this.expectOnePlugin(["flow", "typescript"]), !1;
6953
6471
  }
6954
- } else if (!this.match(65))
6955
- return !1;
6472
+ } else if (!this.match(65)) return !1;
6956
6473
  let e = this.nextTokenStart(), s = this.isUnparsedContextual(e, "from");
6957
- if (this.input.charCodeAt(e) === 44 || F(this.state.type) && s)
6958
- return !0;
6474
+ if (this.input.charCodeAt(e) === 44 || F(this.state.type) && s) return !0;
6959
6475
  if (this.match(65) && s) {
6960
6476
  let r = this.input.charCodeAt(this.nextTokenStartSince(e + 4));
6961
6477
  return r === 34 || r === 39;
@@ -6967,13 +6483,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6967
6483
  }
6968
6484
  shouldParseExportDeclaration() {
6969
6485
  let { type: t } = this.state;
6970
- if (t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators")))
6971
- return this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(u.DecoratorBeforeExport, this.state.startLoc), !0;
6486
+ if (t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators"))) return this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(u.DecoratorBeforeExport, this.state.startLoc), !0;
6972
6487
  if (this.hasPlugin("explicitResourceManagement")) {
6973
- if (this.isUsing())
6974
- return this.raise(u.UsingDeclarationExport, this.state.startLoc), !0;
6975
- if (this.isAwaitUsing())
6976
- return this.raise(u.UsingDeclarationExport, this.state.startLoc), !0;
6488
+ if (this.isUsing()) return this.raise(u.UsingDeclarationExport, this.state.startLoc), !0;
6489
+ if (this.isAwaitUsing()) return this.raise(u.UsingDeclarationExport, this.state.startLoc), !0;
6977
6490
  }
6978
6491
  return t === 74 || t === 75 || t === 68 || t === 80 || this.isLet() || this.isAsyncFunction();
6979
6492
  }
@@ -6986,38 +6499,28 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
6986
6499
  let n = t.declaration;
6987
6500
  n.type === "Identifier" && n.name === "from" && n.end - n.start === 4 && !((a = n.extra) != null && a.parenthesized) && this.raise(u.ExportDefaultFromAsIdentifier, n);
6988
6501
  }
6989
- } else if ((i = t.specifiers) != null && i.length)
6990
- for (let n of t.specifiers) {
6991
- let { exported: o } = n, p = o.type === "Identifier" ? o.name : o.value;
6992
- if (this.checkDuplicateExports(n, p), !r && n.local) {
6993
- let { local: l } = n;
6994
- l.type !== "Identifier" ? this.raise(u.ExportBindingIsString, n, { localName: l.value, exportName: p }) : (this.checkReservedWord(l.name, l.loc.start, !0, !1), this.scope.checkLocalExport(l));
6995
- }
6502
+ } else if ((i = t.specifiers) != null && i.length) for (let n of t.specifiers) {
6503
+ let { exported: o } = n, p = o.type === "Identifier" ? o.name : o.value;
6504
+ if (this.checkDuplicateExports(n, p), !r && n.local) {
6505
+ let { local: l } = n;
6506
+ l.type !== "Identifier" ? this.raise(u.ExportBindingIsString, n, { localName: l.value, exportName: p }) : (this.checkReservedWord(l.name, l.loc.start, !0, !1), this.scope.checkLocalExport(l));
6996
6507
  }
6508
+ }
6997
6509
  else if (t.declaration) {
6998
6510
  let n = t.declaration;
6999
6511
  if (n.type === "FunctionDeclaration" || n.type === "ClassDeclaration") {
7000
6512
  let { id: o } = n;
7001
- if (!o)
7002
- throw new Error("Assertion failure");
6513
+ if (!o) throw new Error("Assertion failure");
7003
6514
  this.checkDuplicateExports(t, o.name);
7004
- } else if (n.type === "VariableDeclaration")
7005
- for (let o of n.declarations)
7006
- this.checkDeclaration(o.id);
6515
+ } else if (n.type === "VariableDeclaration") for (let o of n.declarations) this.checkDeclaration(o.id);
7007
6516
  }
7008
6517
  }
7009
6518
  }
7010
6519
  checkDeclaration(t) {
7011
- if (t.type === "Identifier")
7012
- this.checkDuplicateExports(t, t.name);
7013
- else if (t.type === "ObjectPattern")
7014
- for (let e of t.properties)
7015
- this.checkDeclaration(e);
7016
- else if (t.type === "ArrayPattern")
7017
- for (let e of t.elements)
7018
- e && this.checkDeclaration(e);
7019
- else
7020
- t.type === "ObjectProperty" ? this.checkDeclaration(t.value) : t.type === "RestElement" ? this.checkDeclaration(t.argument) : t.type === "AssignmentPattern" && this.checkDeclaration(t.left);
6520
+ if (t.type === "Identifier") this.checkDuplicateExports(t, t.name);
6521
+ else if (t.type === "ObjectPattern") for (let e of t.properties) this.checkDeclaration(e);
6522
+ else if (t.type === "ArrayPattern") for (let e of t.elements) e && this.checkDeclaration(e);
6523
+ else t.type === "ObjectProperty" ? this.checkDeclaration(t.value) : t.type === "RestElement" ? this.checkDeclaration(t.argument) : t.type === "AssignmentPattern" && this.checkDeclaration(t.left);
7021
6524
  }
7022
6525
  checkDuplicateExports(t, e) {
7023
6526
  this.exportedIdentifiers.has(e) && (e === "default" ? this.raise(u.DuplicateDefaultExport, t) : this.raise(u.DuplicateExport, t, { exportName: e })), this.exportedIdentifiers.add(e);
@@ -7025,10 +6528,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7025
6528
  parseExportSpecifiers(t) {
7026
6529
  let e = [], s = !0;
7027
6530
  for (this.expect(5); !this.eat(8); ) {
7028
- if (s)
7029
- s = !1;
7030
- else if (this.expect(12), this.eat(8))
7031
- break;
6531
+ if (s) s = !1;
6532
+ else if (this.expect(12), this.eat(8)) break;
7032
6533
  let r = this.isContextual(130), i = this.match(134), a = this.startNode();
7033
6534
  a.local = this.parseModuleExportName(), e.push(this.parseExportSpecifier(a, i, t, r));
7034
6535
  }
@@ -7049,10 +6550,8 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7049
6550
  }
7050
6551
  checkImportReflection(t) {
7051
6552
  let { specifiers: e } = t, s = e.length === 1 ? e[0].type : null;
7052
- if (t.phase === "source")
7053
- s !== "ImportDefaultSpecifier" && this.raise(u.SourcePhaseImportRequiresDefault, e[0].loc.start);
7054
- else if (t.phase === "defer")
7055
- s !== "ImportNamespaceSpecifier" && this.raise(u.DeferImportRequiresNamespace, e[0].loc.start);
6553
+ if (t.phase === "source") s !== "ImportDefaultSpecifier" && this.raise(u.SourcePhaseImportRequiresDefault, e[0].loc.start);
6554
+ else if (t.phase === "defer") s !== "ImportNamespaceSpecifier" && this.raise(u.DeferImportRequiresNamespace, e[0].loc.start);
7056
6555
  else if (t.module) {
7057
6556
  var r;
7058
6557
  s !== "ImportDefaultSpecifier" && this.raise(u.ImportReflectionNotBinding, e[0].loc.start), ((r = t.assertions) == null ? void 0 : r.length) > 0 && this.raise(u.ImportReflectionHasAssertion, e[0].loc.start);
@@ -7064,8 +6563,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7064
6563
  if (e != null) {
7065
6564
  let s = e.find((r) => {
7066
6565
  let i;
7067
- if (r.type === "ExportSpecifier" ? i = r.local : r.type === "ImportSpecifier" && (i = r.imported), i !== void 0)
7068
- return i.type === "Identifier" ? i.name !== "default" : i.value !== "default";
6566
+ if (r.type === "ExportSpecifier" ? i = r.local : r.type === "ImportSpecifier" && (i = r.imported), i !== void 0) return i.type === "Identifier" ? i.name !== "default" : i.value !== "default";
7069
6567
  });
7070
6568
  s !== void 0 && this.raise(u.ImportJSONBindingNotDefault, s.loc.start);
7071
6569
  }
@@ -7078,8 +6576,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7078
6576
  e || (s === "module" ? (this.expectPlugin("importReflection", r), t.module = !0) : this.hasPlugin("importReflection") && (t.module = !1), s === "source" ? (this.expectPlugin("sourcePhaseImports", r), t.phase = "source") : s === "defer" ? (this.expectPlugin("deferredImportEvaluation", r), t.phase = "defer") : this.hasPlugin("sourcePhaseImports") && (t.phase = null));
7079
6577
  }
7080
6578
  parseMaybeImportPhase(t, e) {
7081
- if (!this.isPotentialImportPhase(e))
7082
- return this.applyImportPhase(t, e, null), null;
6579
+ if (!this.isPotentialImportPhase(e)) return this.applyImportPhase(t, e, null), null;
7083
6580
  let s = this.startNode(), r = this.parseIdentifierName(!0), { type: i } = this.state;
7084
6581
  return (V(i) ? i !== 98 || this.lookaheadCharCode() === 102 : i !== 12) ? (this.applyImportPhase(t, e, r, s.loc.start), null) : (this.applyImportPhase(t, e, null), this.createIdentifier(s, r));
7085
6582
  }
@@ -7111,11 +6608,9 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7111
6608
  this.expect(5);
7112
6609
  let t = [], e = /* @__PURE__ */ new Set();
7113
6610
  do {
7114
- if (this.match(8))
7115
- break;
6611
+ if (this.match(8)) break;
7116
6612
  let s = this.startNode(), r = this.state.value;
7117
- if (e.has(r) && this.raise(u.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { key: r }), e.add(r), this.match(134) ? s.key = this.parseStringLiteral(r) : s.key = this.parseIdentifier(!0), this.expect(14), !this.match(134))
7118
- throw this.raise(u.ModuleAttributeInvalidValue, this.state.startLoc);
6613
+ if (e.has(r) && this.raise(u.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { key: r }), e.add(r), this.match(134) ? s.key = this.parseStringLiteral(r) : s.key = this.parseIdentifier(!0), this.expect(14), !this.match(134)) throw this.raise(u.ModuleAttributeInvalidValue, this.state.startLoc);
7119
6614
  s.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(s, "ImportAttribute"));
7120
6615
  } while (this.eat(12));
7121
6616
  return this.expect(8), t;
@@ -7124,8 +6619,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7124
6619
  let t = [], e = /* @__PURE__ */ new Set();
7125
6620
  do {
7126
6621
  let s = this.startNode();
7127
- if (s.key = this.parseIdentifier(!0), s.key.name !== "type" && this.raise(u.ModuleAttributeDifferentFromType, s.key), e.has(s.key.name) && this.raise(u.ModuleAttributesWithDuplicateKeys, s.key, { key: s.key.name }), e.add(s.key.name), this.expect(14), !this.match(134))
7128
- throw this.raise(u.ModuleAttributeInvalidValue, this.state.startLoc);
6622
+ if (s.key = this.parseIdentifier(!0), s.key.name !== "type" && this.raise(u.ModuleAttributeDifferentFromType, s.key), e.has(s.key.name) && this.raise(u.ModuleAttributesWithDuplicateKeys, s.key, { key: s.key.name }), e.add(s.key.name), this.expect(14), !this.match(134)) throw this.raise(u.ModuleAttributeInvalidValue, this.state.startLoc);
7129
6623
  s.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(s, "ImportAttribute"));
7130
6624
  } while (this.eat(12));
7131
6625
  return t;
@@ -7134,19 +6628,16 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7134
6628
  let e;
7135
6629
  var s = !1;
7136
6630
  if (this.match(76)) {
7137
- if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40)
7138
- return;
6631
+ if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) return;
7139
6632
  this.next(), this.hasPlugin("moduleAttributes") ? (e = this.parseModuleAttributes(), this.addExtra(t, "deprecatedWithLegacySyntax", !0)) : e = this.parseImportAttributes(), s = !0;
7140
- } else
7141
- this.isContextual(94) && !this.hasPrecedingLineBreak() ? (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions") && this.raise(u.ImportAttributesUseAssert, this.state.startLoc), this.hasPlugin("importAssertions") || this.addExtra(t, "deprecatedAssertSyntax", !0), this.next(), e = this.parseImportAttributes()) : e = [];
6633
+ } else this.isContextual(94) && !this.hasPrecedingLineBreak() ? (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions") && this.raise(u.ImportAttributesUseAssert, this.state.startLoc), this.hasPlugin("importAssertions") || this.addExtra(t, "deprecatedAssertSyntax", !0), this.next(), e = this.parseImportAttributes()) : e = [];
7142
6634
  !s && this.hasPlugin("importAssertions") ? t.assertions = e : t.attributes = e;
7143
6635
  }
7144
6636
  maybeParseDefaultImportSpecifier(t, e) {
7145
6637
  if (e) {
7146
6638
  let s = this.startNodeAtNode(e);
7147
6639
  return s.local = e, t.specifiers.push(this.finishImportSpecifier(s, "ImportDefaultSpecifier")), !0;
7148
- } else if (V(this.state.type))
7149
- return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"), !0;
6640
+ } else if (V(this.state.type)) return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"), !0;
7150
6641
  return !1;
7151
6642
  }
7152
6643
  maybeParseStarImportSpecifier(t) {
@@ -7159,13 +6650,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7159
6650
  parseNamedImportSpecifiers(t) {
7160
6651
  let e = !0;
7161
6652
  for (this.expect(5); !this.eat(8); ) {
7162
- if (e)
7163
- e = !1;
6653
+ if (e) e = !1;
7164
6654
  else {
7165
- if (this.eat(14))
7166
- throw this.raise(u.DestructureNamedImport, this.state.startLoc);
7167
- if (this.expect(12), this.eat(8))
7168
- break;
6655
+ if (this.eat(14)) throw this.raise(u.DestructureNamedImport, this.state.startLoc);
6656
+ if (this.expect(12), this.eat(8)) break;
7169
6657
  }
7170
6658
  let s = this.startNode(), r = this.match(134), i = this.isContextual(130);
7171
6659
  s.imported = this.parseModuleExportName();
@@ -7174,12 +6662,10 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7174
6662
  }
7175
6663
  }
7176
6664
  parseImportSpecifier(t, e, s, r, i) {
7177
- if (this.eatContextual(93))
7178
- t.local = this.parseIdentifier();
6665
+ if (this.eatContextual(93)) t.local = this.parseIdentifier();
7179
6666
  else {
7180
6667
  let { imported: a } = t;
7181
- if (e)
7182
- throw this.raise(u.ImportBindingIsString, t, { importName: a.value });
6668
+ if (e) throw this.raise(u.ImportBindingIsString, t, { importName: a.value });
7183
6669
  this.checkReservedWord(a.name, t.loc.start, !0, !0), t.local || (t.local = this.cloneIdentifier(a));
7184
6670
  }
7185
6671
  return this.finishImportSpecifier(t, "ImportSpecifier", i);
@@ -7209,15 +6695,12 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7209
6695
  try {
7210
6696
  e.sourceType = "module";
7211
6697
  let r = xe(e, t), i = r.parse();
7212
- if (r.sawUnambiguousESM)
7213
- return i;
7214
- if (r.ambiguousScriptDifferentAst)
7215
- try {
7216
- return e.sourceType = "script", xe(e, t).parse();
7217
- } catch {
7218
- }
7219
- else
7220
- i.program.sourceType = "script";
6698
+ if (r.sawUnambiguousESM) return i;
6699
+ if (r.ambiguousScriptDifferentAst) try {
6700
+ return e.sourceType = "script", xe(e, t).parse();
6701
+ } catch {
6702
+ }
6703
+ else i.program.sourceType = "script";
7221
6704
  return i;
7222
6705
  } catch (r) {
7223
6706
  try {
@@ -7226,8 +6709,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7226
6709
  }
7227
6710
  throw r;
7228
6711
  }
7229
- } else
7230
- return xe(e, t).parse();
6712
+ } else return xe(e, t).parse();
7231
6713
  }
7232
6714
  function Ur(t, e) {
7233
6715
  let s = xe(e, t);
@@ -7235,8 +6717,7 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7235
6717
  }
7236
6718
  function jr(t) {
7237
6719
  let e = {};
7238
- for (let s of Object.keys(t))
7239
- e[s] = K(t[s]);
6720
+ for (let s of Object.keys(t)) e[s] = K(t[s]);
7240
6721
  return e;
7241
6722
  }
7242
6723
  var _r = jr(bs);
@@ -7254,13 +6735,11 @@ var zr = Object.create, st = Object.defineProperty, Vr = Object.getOwnPropertyDe
7254
6735
  var Ot = /* @__PURE__ */ new Map();
7255
6736
  function Hr(t) {
7256
6737
  let e = [];
7257
- for (let i of Dr)
7258
- t.has(i) && e.push(i);
6738
+ for (let i of Dr) t.has(i) && e.push(i);
7259
6739
  let s = e.join("|"), r = Ot.get(s);
7260
6740
  if (!r) {
7261
6741
  r = Bt;
7262
- for (let i of e)
7263
- r = Mt[i](r);
6742
+ for (let i of e) r = Mt[i](r);
7264
6743
  Ot.set(s, r);
7265
6744
  }
7266
6745
  return r;
@@ -7274,16 +6753,13 @@ var Rt = Xt(Gt());
7274
6753
  function es(h) {
7275
6754
  return (c, m, f) => {
7276
6755
  let x = !!(f != null && f.backwards);
7277
- if (m === !1)
7278
- return !1;
6756
+ if (m === !1) return !1;
7279
6757
  let { length: C } = c, k = m;
7280
6758
  for (; k >= 0 && k < C; ) {
7281
6759
  let O = c.charAt(k);
7282
6760
  if (h instanceof RegExp) {
7283
- if (!h.test(O))
7284
- return k;
7285
- } else if (!h.includes(O))
7286
- return k;
6761
+ if (!h.test(O)) return k;
6762
+ } else if (!h.includes(O)) return k;
7287
6763
  x ? k-- : k++;
7288
6764
  }
7289
6765
  return k === -1 || k === C ? k : !1;
@@ -7291,35 +6767,27 @@ function es(h) {
7291
6767
  }
7292
6768
  var Xr = es(" "), Gr = es(/[^\n\r]/u);
7293
6769
  function Yr(h, c) {
7294
- if (c === !1)
7295
- return !1;
6770
+ if (c === !1) return !1;
7296
6771
  if (h.charAt(c) === "/" && h.charAt(c + 1) === "*") {
7297
- for (let m = c + 2; m < h.length; ++m)
7298
- if (h.charAt(m) === "*" && h.charAt(m + 1) === "/")
7299
- return m + 2;
6772
+ for (let m = c + 2; m < h.length; ++m) if (h.charAt(m) === "*" && h.charAt(m + 1) === "/") return m + 2;
7300
6773
  }
7301
6774
  return c;
7302
6775
  }
7303
6776
  var Qr = Yr;
7304
6777
  function Zr(h, c, m) {
7305
6778
  let f = !!(m != null && m.backwards);
7306
- if (c === !1)
7307
- return !1;
6779
+ if (c === !1) return !1;
7308
6780
  let x = h.charAt(c);
7309
6781
  if (f) {
7310
6782
  if (h.charAt(c - 1) === "\r" && x === `
7311
- `)
7312
- return c - 2;
6783
+ `) return c - 2;
7313
6784
  if (x === `
7314
- ` || x === "\r" || x === "\u2028" || x === "\u2029")
7315
- return c - 1;
6785
+ ` || x === "\r" || x === "\u2028" || x === "\u2029") return c - 1;
7316
6786
  } else {
7317
6787
  if (x === "\r" && h.charAt(c + 1) === `
7318
- `)
7319
- return c + 2;
6788
+ `) return c + 2;
7320
6789
  if (x === `
7321
- ` || x === "\r" || x === "\u2028" || x === "\u2029")
7322
- return c + 1;
6790
+ ` || x === "\r" || x === "\u2028" || x === "\u2029") return c + 1;
7323
6791
  }
7324
6792
  return c;
7325
6793
  }
@@ -7330,42 +6798,36 @@ function ti(h, c) {
7330
6798
  var si = ti;
7331
6799
  function ri(h, c) {
7332
6800
  let m = null, f = c;
7333
- for (; f !== m; )
7334
- m = f, f = Xr(h, f), f = Qr(h, f), f = si(h, f), f = ei(h, f);
6801
+ for (; f !== m; ) m = f, f = Xr(h, f), f = Qr(h, f), f = si(h, f), f = ei(h, f);
7335
6802
  return f;
7336
6803
  }
7337
6804
  var ii = ri;
7338
6805
  function ai(h) {
7339
6806
  let c = [];
7340
- for (let m of h)
7341
- try {
7342
- return m();
7343
- } catch (f) {
7344
- c.push(f);
7345
- }
6807
+ for (let m of h) try {
6808
+ return m();
6809
+ } catch (f) {
6810
+ c.push(f);
6811
+ }
7346
6812
  throw Object.assign(new Error("All combinations failed"), { errors: c });
7347
6813
  }
7348
6814
  var ni = ai;
7349
6815
  function oi(h) {
7350
- if (!h.startsWith("#!"))
7351
- return "";
6816
+ if (!h.startsWith("#!")) return "";
7352
6817
  let c = h.indexOf(`
7353
6818
  `);
7354
6819
  return c === -1 ? h : h.slice(0, c);
7355
6820
  }
7356
6821
  var ts = oi, li = (h, c, m) => {
7357
6822
  if (!(h && c == null)) {
7358
- if (c.findLast)
7359
- return c.findLast(m);
6823
+ if (c.findLast) return c.findLast(m);
7360
6824
  for (let f = c.length - 1; f >= 0; f--) {
7361
6825
  let x = c[f];
7362
- if (m(x, f, c))
7363
- return x;
6826
+ if (m(x, f, c)) return x;
7364
6827
  }
7365
6828
  }
7366
6829
  }, hi = li, pi = (h, c, m) => {
7367
- if (!(h && c == null))
7368
- return Array.isArray(c) || typeof c == "string" ? c[m < 0 ? c.length + m : m] : c.at(m);
6830
+ if (!(h && c == null)) return Array.isArray(c) || typeof c == "string" ? c[m < 0 ? c.length + m : m] : c.at(m);
7369
6831
  }, ui = pi, ci = new Proxy(() => {
7370
6832
  }, { get: () => ci });
7371
6833
  function z(h) {
@@ -7384,13 +6846,11 @@ function di(h) {
7384
6846
  var it = di;
7385
6847
  function mi(h, c, m) {
7386
6848
  let f = h.originalText.slice(c, m);
7387
- for (let x of h[Symbol.for("comments")]) {
6849
+ for (let x of h[/* @__PURE__ */ Symbol.for("comments")]) {
7388
6850
  let C = z(x);
7389
- if (C > m)
7390
- break;
6851
+ if (C > m) break;
7391
6852
  let k = _(x);
7392
- if (k < c)
7393
- continue;
6853
+ if (k < c) continue;
7394
6854
  let O = k - C;
7395
6855
  f = f.slice(0, C - c) + " ".repeat(O) + f.slice(k - c);
7396
6856
  }
@@ -7402,8 +6862,7 @@ function Ai(h) {
7402
6862
  }
7403
6863
  var gi = Ai;
7404
6864
  function Ti(h) {
7405
- if (!at(h))
7406
- return !1;
6865
+ if (!at(h)) return !1;
7407
6866
  let c = `*${h.value}*`.split(`
7408
6867
  `);
7409
6868
  return c.length > 1 && c.every((m) => m.trimStart()[0] === "*");
@@ -7414,13 +6873,11 @@ function bi(h) {
7414
6873
  }
7415
6874
  var Ut = bi;
7416
6875
  function Ei(h) {
7417
- if (h.length < 2)
7418
- return;
6876
+ if (h.length < 2) return;
7419
6877
  let c;
7420
6878
  for (let m = h.length - 1; m >= 0; m--) {
7421
6879
  let f = h[m];
7422
- if (c && _(f) === z(c) && Ut(f) && Ut(c) && (h.splice(m + 1, 1), f.value += "*//*" + c.value, f.range = [z(f), _(c)]), !Pi(f) && !at(f))
7423
- throw new TypeError(`Unknown comment type: "${f.type}".`);
6880
+ if (c && _(f) === z(c) && Ut(f) && Ut(c) && (h.splice(m + 1, 1), f.value += "*//*" + c.value, f.range = [z(f), _(c)]), !Pi(f) && !at(f)) throw new TypeError(`Unknown comment type: "${f.type}".`);
7424
6881
  c = f;
7425
6882
  }
7426
6883
  }
@@ -7433,8 +6890,7 @@ function Ae(h) {
7433
6890
  return Pe = Ae.prototype = h ?? /* @__PURE__ */ Object.create(null), new Ae();
7434
6891
  }
7435
6892
  var Si = 10;
7436
- for (let h = 0; h <= Si; h++)
7437
- Ae();
6893
+ for (let h = 0; h <= Si; h++) Ae();
7438
6894
  function wi(h) {
7439
6895
  return Ae(h);
7440
6896
  }
@@ -7442,24 +6898,20 @@ function Ii(h, c = "type") {
7442
6898
  wi(h);
7443
6899
  function m(f) {
7444
6900
  let x = f[c], C = h[x];
7445
- if (!Array.isArray(C))
7446
- throw Object.assign(new Error(`Missing visitor keys for '${x}'.`), { node: f });
6901
+ if (!Array.isArray(C)) throw Object.assign(new Error(`Missing visitor keys for '${x}'.`), { node: f });
7447
6902
  return C;
7448
6903
  }
7449
6904
  return m;
7450
6905
  }
7451
6906
  var Ni = Ii, vi = { ArrayExpression: ["elements"], AssignmentExpression: ["left", "right"], BinaryExpression: ["left", "right"], InterpreterDirective: [], Directive: ["value"], DirectiveLiteral: [], BlockStatement: ["directives", "body"], BreakStatement: ["label"], CallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], CatchClause: ["param", "body"], ConditionalExpression: ["test", "consequent", "alternate"], ContinueStatement: ["label"], DebuggerStatement: [], DoWhileStatement: ["body", "test"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "typeParameters", "params", "predicate", "returnType", "body"], FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"], Identifier: ["typeAnnotation", "decorators"], IfStatement: ["test", "consequent", "alternate"], LabeledStatement: ["label", "body"], StringLiteral: [], NumericLiteral: [], NullLiteral: [], BooleanLiteral: [], RegExpLiteral: [], LogicalExpression: ["left", "right"], MemberExpression: ["object", "property"], NewExpression: ["callee", "typeParameters", "typeArguments", "arguments"], Program: ["directives", "body"], ObjectExpression: ["properties"], ObjectMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectProperty: ["decorators", "key", "value"], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: ["argument"], SequenceExpression: ["expressions"], ParenthesizedExpression: ["expression"], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], ThisExpression: [], ThrowStatement: ["argument"], TryStatement: ["block", "handler", "finalizer"], UnaryExpression: ["argument"], UpdateExpression: ["argument"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id", "init"], WhileStatement: ["test", "body"], WithStatement: ["object", "body"], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], ClassBody: ["body"], ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportNamedDeclaration: ["declaration", "specifiers", "source", "attributes"], ExportSpecifier: ["local", "exported"], ForOfStatement: ["left", "right", "body"], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportSpecifier: ["imported", "local"], ImportExpression: ["source", "options"], MetaProperty: ["meta", "property"], ClassMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectPattern: ["decorators", "properties", "typeAnnotation"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "typeParameters", "quasi", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], ClassProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassAccessorProperty: ["decorators", "key", "typeAnnotation", "value"], ClassPrivateProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassPrivateMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], PrivateName: ["id"], StaticBlock: ["body"], ImportAttribute: ["key", "value"], AnyTypeAnnotation: [], ArrayTypeAnnotation: ["elementType"], BooleanTypeAnnotation: [], BooleanLiteralTypeAnnotation: [], NullLiteralTypeAnnotation: [], ClassImplements: ["id", "typeParameters"], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareFunction: ["id", "predicate"], DeclareInterface: ["id", "typeParameters", "extends", "body"], DeclareModule: ["id", "body"], DeclareModuleExports: ["typeAnnotation"], DeclareTypeAlias: ["id", "typeParameters", "right"], DeclareOpaqueType: ["id", "typeParameters", "supertype"], DeclareVariable: ["id"], DeclareExportDeclaration: ["declaration", "specifiers", "source", "attributes"], DeclareExportAllDeclaration: ["source", "attributes"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: ["name", "typeAnnotation"], GenericTypeAnnotation: ["id", "typeParameters"], InferredPredicate: [], InterfaceExtends: ["id", "typeParameters"], InterfaceDeclaration: ["id", "typeParameters", "extends", "body"], InterfaceTypeAnnotation: ["extends", "body"], IntersectionTypeAnnotation: ["types"], MixedTypeAnnotation: [], EmptyTypeAnnotation: [], NullableTypeAnnotation: ["typeAnnotation"], NumberLiteralTypeAnnotation: [], NumberTypeAnnotation: [], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeCallProperty: ["value"], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["qualification", "id"], StringLiteralTypeAnnotation: [], StringTypeAnnotation: [], SymbolTypeAnnotation: [], ThisTypeAnnotation: [], TupleTypeAnnotation: ["types", "elementTypes"], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeAlias: ["id", "typeParameters", "right"], TypeAnnotation: ["typeAnnotation"], TypeCastExpression: ["expression", "typeAnnotation"], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: ["params"], TypeParameterInstantiation: ["params"], UnionTypeAnnotation: ["types"], Variance: [], VoidTypeAnnotation: [], EnumDeclaration: ["id", "body"], EnumBooleanBody: ["members"], EnumNumberBody: ["members"], EnumStringBody: ["members"], EnumSymbolBody: ["members"], EnumBooleanMember: ["id", "init"], EnumNumberMember: ["id", "init"], EnumStringMember: ["id", "init"], EnumDefaultedMember: ["id"], IndexedAccessType: ["objectType", "indexType"], OptionalIndexedAccessType: ["objectType", "indexType"], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: [], JSXExpressionContainer: ["expression"], JSXSpreadChild: ["expression"], JSXIdentifier: [], JSXMemberExpression: ["object", "property"], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeParameters", "typeArguments", "attributes"], JSXSpreadAttribute: ["argument"], JSXText: [], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXOpeningFragment: [], JSXClosingFragment: [], Noop: [], Placeholder: [], V8IntrinsicIdentifier: [], ArgumentPlaceholder: [], BindExpression: ["object", "callee"], Decorator: ["expression"], DoExpression: ["body"], ExportDefaultSpecifier: ["exported"], ModuleExpression: ["body"], TopicReference: [], PipelineTopicExpression: ["expression"], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: [], TSParameterProperty: ["parameter", "decorators"], TSDeclareFunction: ["id", "typeParameters", "params", "returnType", "body"], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSQualifiedName: ["left", "right"], TSCallSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSPropertySignature: ["key", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSIndexSignature: ["parameters", "typeAnnotation"], TSAnyKeyword: [], TSBooleanKeyword: [], TSBigIntKeyword: [], TSIntrinsicKeyword: [], TSNeverKeyword: [], TSNullKeyword: [], TSNumberKeyword: [], TSObjectKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], TSUndefinedKeyword: [], TSUnknownKeyword: [], TSVoidKeyword: [], TSThisType: [], TSFunctionType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructorType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSTypeReference: ["typeName", "typeParameters", "typeArguments"], TSTypePredicate: ["parameterName", "typeAnnotation"], TSTypeQuery: ["exprName", "typeParameters", "typeArguments"], TSTypeLiteral: ["members"], TSArrayType: ["elementType"], TSTupleType: ["elementTypes"], TSOptionalType: ["typeAnnotation"], TSRestType: ["typeAnnotation"], TSNamedTupleMember: ["label", "elementType"], TSUnionType: ["types"], TSIntersectionType: ["types"], TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"], TSInferType: ["typeParameter"], TSParenthesizedType: ["typeAnnotation"], TSTypeOperator: ["typeAnnotation"], TSIndexedAccessType: ["objectType", "indexType"], TSMappedType: ["nameType", "typeAnnotation", "key", "constraint"], TSTemplateLiteralType: ["quasis", "types"], TSLiteralType: ["literal"], TSExpressionWithTypeArguments: ["expression", "typeParameters"], TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"], TSInterfaceBody: ["body"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSInstantiationExpression: ["expression", "typeParameters", "typeArguments"], TSAsExpression: ["expression", "typeAnnotation"], TSSatisfiesExpression: ["expression", "typeAnnotation"], TSTypeAssertion: ["typeAnnotation", "expression"], TSEnumBody: ["members"], TSEnumDeclaration: ["id", "body"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "options", "qualifier", "typeParameters", "typeArguments"], TSImportEqualsDeclaration: ["id", "moduleReference"], TSExternalModuleReference: ["expression"], TSNonNullExpression: ["expression"], TSExportAssignment: ["expression"], TSNamespaceExportDeclaration: ["id"], TSTypeAnnotation: ["typeAnnotation"], TSTypeParameterInstantiation: ["params"], TSTypeParameterDeclaration: ["params"], TSTypeParameter: ["constraint", "default", "name"], ChainExpression: ["expression"], ExperimentalRestProperty: ["argument"], ExperimentalSpreadProperty: ["argument"], Literal: [], MethodDefinition: ["decorators", "key", "value"], PrivateIdentifier: [], Property: ["key", "value"], PropertyDefinition: ["decorators", "key", "typeAnnotation", "value", "variance"], AccessorProperty: ["decorators", "key", "typeAnnotation", "value"], TSAbstractAccessorProperty: ["decorators", "key", "typeAnnotation"], TSAbstractKeyword: [], TSAbstractMethodDefinition: ["key", "value"], TSAbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"], TSAsyncKeyword: [], TSClassImplements: ["expression", "typeArguments", "typeParameters"], TSDeclareKeyword: [], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], AsConstExpression: ["expression"], AsExpression: ["expression", "typeAnnotation"], BigIntLiteralTypeAnnotation: [], BigIntTypeAnnotation: [], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: ["name", "typeAnnotation"], ConditionalTypeAnnotation: ["checkType", "extendsType", "trueType", "falseType"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclareEnum: ["id", "body"], DeclareHook: ["id"], DeclareNamespace: ["id", "body"], EnumBigIntBody: ["members"], EnumBigIntMember: ["id", "init"], HookDeclaration: ["id", "params", "body", "typeParameters", "returnType"], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], InferTypeAnnotation: ["typeParameter"], KeyofTypeAnnotation: ["argument"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], QualifiedTypeofIdentifier: ["qualification", "id"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeOperator: ["typeAnnotation"], TypePredicate: ["parameterName", "typeAnnotation", "asserts"], NGChainedExpression: ["expressions"], NGEmptyExpression: [], NGPipeExpression: ["left", "right", "arguments"], NGMicrosyntax: ["body"], NGMicrosyntaxAs: ["key", "alias"], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKey: [], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: ["key", "value"], NGRoot: ["node"], JsExpressionRoot: ["node"], JsonRoot: ["node"], TSJSDocAllType: [], TSJSDocUnknownType: [], TSJSDocNullableType: ["typeAnnotation"], TSJSDocNonNullableType: ["typeAnnotation"], NeverTypeAnnotation: [], SatisfiesExpression: ["expression", "typeAnnotation"], UndefinedTypeAnnotation: [], UnknownTypeAnnotation: [] }, ki = Ni(vi), Di = ki;
7452
6907
  function et(h, c) {
7453
- if (!(h !== null && typeof h == "object"))
7454
- return h;
6908
+ if (!(h !== null && typeof h == "object")) return h;
7455
6909
  if (Array.isArray(h)) {
7456
- for (let f = 0; f < h.length; f++)
7457
- h[f] = et(h[f], c);
6910
+ for (let f = 0; f < h.length; f++) h[f] = et(h[f], c);
7458
6911
  return h;
7459
6912
  }
7460
6913
  let m = Di(h);
7461
- for (let f = 0; f < m.length; f++)
7462
- h[m[f]] = et(h[m[f]], c);
6914
+ for (let f = 0; f < m.length; f++) h[m[f]] = et(h[m[f]], c);
7463
6915
  return c(h) || h;
7464
6916
  }
7465
6917
  var Fi = et;
@@ -7472,29 +6924,24 @@ function Li(h, c) {
7472
6924
  switch (S.type) {
7473
6925
  case "ParenthesizedExpression": {
7474
6926
  let { expression: M } = S, B = z(S);
7475
- if (M.type === "TypeCastExpression")
7476
- return M.range = [B, _(S)], M;
6927
+ if (M.type === "TypeCastExpression") return M.range = [B, _(S)], M;
7477
6928
  let X = !1;
7478
6929
  if (!C) {
7479
6930
  if (!k) {
7480
6931
  k = [];
7481
- for (let ie of x)
7482
- gi(ie) && k.push(_(ie));
6932
+ for (let ie of x) gi(ie) && k.push(_(ie));
7483
6933
  }
7484
6934
  let re = hi(!1, k, (ie) => ie <= B);
7485
6935
  X = re && f.slice(re, B).trim().length === 0;
7486
6936
  }
7487
- if (!X)
7488
- return M.extra = { ...M.extra, parenthesized: !0 }, M;
6937
+ if (!X) return M.extra = { ...M.extra, parenthesized: !0 }, M;
7489
6938
  break;
7490
6939
  }
7491
6940
  case "LogicalExpression":
7492
- if (ss(S))
7493
- return tt(S);
6941
+ if (ss(S)) return tt(S);
7494
6942
  break;
7495
6943
  case "TemplateLiteral":
7496
- if (S.expressions.length !== S.quasis.length - 1)
7497
- throw new Error("Malformed template literal.");
6944
+ if (S.expressions.length !== S.quasis.length - 1) throw new Error("Malformed template literal.");
7498
6945
  break;
7499
6946
  case "TemplateElement":
7500
6947
  if (m === "flow" || m === "hermes" || m === "espree" || m === "typescript" || C) {
@@ -7517,8 +6964,7 @@ function Li(h, c) {
7517
6964
  break;
7518
6965
  case "TSUnionType":
7519
6966
  case "TSIntersectionType":
7520
- if (S.types.length === 1)
7521
- return S.types[0];
6967
+ if (S.types.length === 1) return S.types[0];
7522
6968
  break;
7523
6969
  case "TSMappedType":
7524
6970
  if (!S.constraint && !S.key) {
@@ -7528,7 +6974,7 @@ function Li(h, c) {
7528
6974
  break;
7529
6975
  case "TSEnumDeclaration":
7530
6976
  if (!S.body) {
7531
- let M = _(S.id), { members: B } = S, X = fi({ originalText: f, [Symbol.for("comments")]: x }, M, B[0] ? z(B[0]) : _(S)), re = M + X.indexOf("{");
6977
+ let M = _(S.id), { members: B } = S, X = fi({ originalText: f, [/* @__PURE__ */ Symbol.for("comments")]: x }, M, B[0] ? z(B[0]) : _(S)), re = M + X.indexOf("{");
7532
6978
  S.body = { type: "TSEnumBody", members: B, range: [re, _(S)] }, delete S.members;
7533
6979
  }
7534
6980
  break;
@@ -7561,16 +7007,14 @@ function Bi(h, c) {
7561
7007
  var rs = Bi, _t = "Unexpected parseExpression() input: ";
7562
7008
  function Oi(h) {
7563
7009
  let { message: c, loc: m, reasonCode: f } = h;
7564
- if (!m)
7565
- return h;
7010
+ if (!m) return h;
7566
7011
  let { line: x, column: C } = m, k = h;
7567
7012
  (f === "MissingPlugin" || f === "MissingOneOfPlugins") && (c = "Unexpected token.", k = void 0);
7568
7013
  let O = ` (${x}:${C})`;
7569
7014
  return c.endsWith(O) && (c = c.slice(0, -O.length)), c.startsWith(_t) && (c = c.slice(_t.length)), rs(c, { loc: { start: { line: x, column: C + 1 } }, cause: k });
7570
7015
  }
7571
7016
  var is = Oi, Ri = (h, c, m, f) => {
7572
- if (!(h && c == null))
7573
- return c.replaceAll ? c.replaceAll(m, f) : m.global ? c.replace(m, f) : c.split(m).join(f);
7017
+ if (!(h && c == null)) return c.replaceAll ? c.replaceAll(m, f) : m.global ? c.replace(m, f) : c.split(m).join(f);
7574
7018
  }, ve = Ri, Ui = /\*\/$/, ji = /^\/\*\*?/, _i = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, Hi = /(^|\s+)\/\/([^\n\r]*)/g, Ht = /^(\r?\n)+/, zi = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, zt = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, Vi = /(\r?\n|^) *\* ?/g, $i = [];
7575
7019
  function qi(h) {
7576
7020
  let c = h.match(_i);
@@ -7581,8 +7025,7 @@ function Ki(h) {
7581
7025
  `;
7582
7026
  h = ve(!1, h.replace(ji, "").replace(Ui, ""), Vi, "$1");
7583
7027
  let m = "";
7584
- for (; m !== h; )
7585
- m = h, h = ve(!1, h, zi, `${c}$1 $2${c}`);
7028
+ for (; m !== h; ) m = h, h = ve(!1, h, zi, `${c}$1 $2${c}`);
7586
7029
  h = h.replace(Ht, "").trimEnd();
7587
7030
  let f = /* @__PURE__ */ Object.create(null), x = ve(!1, h, zt, "").replace(Ht, "").trimEnd(), C;
7588
7031
  for (; C = zt.exec(h); ) {
@@ -7590,8 +7033,7 @@ function Ki(h) {
7590
7033
  if (typeof f[C[1]] == "string" || Array.isArray(f[C[1]])) {
7591
7034
  let O = f[C[1]];
7592
7035
  f[C[1]] = [...$i, ...Array.isArray(O) ? O : [O], k];
7593
- } else
7594
- f[C[1]] = k;
7036
+ } else f[C[1]] = k;
7595
7037
  }
7596
7038
  return { comments: x, pragmas: f };
7597
7039
  }
@@ -7616,10 +7058,8 @@ function Yi(h) {
7616
7058
  var ge = Yi, ns = "module", os = "script";
7617
7059
  function Qi(h) {
7618
7060
  if (typeof h == "string") {
7619
- if (h = h.toLowerCase(), /\.(?:mjs|mts)$/iu.test(h))
7620
- return ns;
7621
- if (/\.(?:cjs|cts)$/iu.test(h))
7622
- return os;
7061
+ if (h = h.toLowerCase(), /\.(?:mjs|mts)$/iu.test(h)) return ns;
7062
+ if (/\.(?:cjs|cts)$/iu.test(h)) return os;
7623
7063
  }
7624
7064
  }
7625
7065
  function Zi(h, c) {
@@ -7628,8 +7068,7 @@ function Zi(h, c) {
7628
7068
  }
7629
7069
  var ls = Zi, he = (h) => ge(ia(h)), ea = { sourceType: ns, allowImportExportEverywhere: !0, allowReturnOutsideFunction: !0, allowNewTargetOutsideFunction: !0, allowSuperOutsideMethod: !0, allowUndeclaredExports: !0, errorRecovery: !0, createParenthesizedExpressions: !0, createImportExpressions: !0, attachComment: !1, plugins: ["doExpressions", "exportDefaultFrom", "functionBind", "functionSent", "throwExpressions", "partialApplication", "decorators", "moduleBlocks", "asyncDoExpressions", "destructuringPrivate", "decoratorAutoAccessors", "explicitResourceManagement", "sourcePhaseImports", "deferredImportEvaluation", ["optionalChainingAssign", { version: "2023-07" }]], tokens: !1, ranges: !1 }, Vt = "v8intrinsic", $t = [["pipelineOperator", { proposal: "hack", topicToken: "%" }], ["pipelineOperator", { proposal: "fsharp" }]], W = (h, c = ea) => ({ ...c, plugins: [...c.plugins, ...h] }), ta = /@(?:no)?flow\b/u;
7630
7070
  function sa(h, c) {
7631
- if (c != null && c.endsWith(".js.flow"))
7632
- return !0;
7071
+ if (c != null && c.endsWith(".js.flow")) return !0;
7633
7072
  let m = ts(h);
7634
7073
  m && (h = h.slice(m.length));
7635
7074
  let f = ii(h, 0);
@@ -7637,15 +7076,13 @@ function sa(h, c) {
7637
7076
  }
7638
7077
  function ra(h, c, m) {
7639
7078
  let f = h(c, m), x = f.errors.find((C) => !aa.has(C.reasonCode));
7640
- if (x)
7641
- throw x;
7079
+ if (x) throw x;
7642
7080
  return f;
7643
7081
  }
7644
7082
  function ia({ isExpression: h = !1, optionsCombinations: c }) {
7645
7083
  return (m, f = {}) => {
7646
7084
  let { filepath: x } = f;
7647
- if (typeof x != "string" && (x = void 0), (f.parser === "babel" || f.parser === "__babel_estree") && sa(m, x))
7648
- return f.parser = "babel-flow", ps.parse(m, f);
7085
+ if (typeof x != "string" && (x = void 0), (f.parser === "babel" || f.parser === "__babel_estree") && sa(m, x)) return f.parser = "babel-flow", ps.parse(m, f);
7649
7086
  let C = c, k = f.__babelSourceType ?? Qi(x);
7650
7087
  k === os && (C = C.map((B) => ({ ...B, sourceType: k })));
7651
7088
  let O = /%[A-Z]/u.test(m);
@@ -7668,24 +7105,20 @@ function oa(h) {
7668
7105
  var ds = oa, ms = { tokens: !1, ranges: !1, attachComment: !1, createParenthesizedExpressions: !0 };
7669
7106
  function la(h) {
7670
7107
  let c = (0, cs.parse)(h, ms), { program: m } = c;
7671
- if (m.body.length === 0 && m.directives.length === 0 && !m.interpreter)
7672
- return c;
7108
+ if (m.body.length === 0 && m.directives.length === 0 && !m.interpreter) return c;
7673
7109
  }
7674
7110
  function ke(h, c = {}) {
7675
7111
  let { allowComments: m = !0, allowEmpty: f = !1 } = c, x;
7676
7112
  try {
7677
7113
  x = (0, cs.parseExpression)(h, ms);
7678
7114
  } catch (C) {
7679
- if (f && C.code === "BABEL_PARSER_SYNTAX_ERROR" && C.reasonCode === "ParseExpressionEmptyInput")
7680
- try {
7681
- x = la(h);
7682
- } catch {
7683
- }
7684
- if (!x)
7685
- throw is(C);
7115
+ if (f && C.code === "BABEL_PARSER_SYNTAX_ERROR" && C.reasonCode === "ParseExpressionEmptyInput") try {
7116
+ x = la(h);
7117
+ } catch {
7118
+ }
7119
+ if (!x) throw is(C);
7686
7120
  }
7687
- if (!m && ds(x.comments))
7688
- throw te(x.comments[0], "Comment");
7121
+ if (!m && ds(x.comments)) throw te(x.comments[0], "Comment");
7689
7122
  return x = ls(x, { type: "JsonRoot", text: h }), x.node.type === "File" ? delete x.node : le(x.node), x;
7690
7123
  }
7691
7124
  function te(h, c) {
@@ -7695,37 +7128,28 @@ function te(h, c) {
7695
7128
  function le(h) {
7696
7129
  switch (h.type) {
7697
7130
  case "ArrayExpression":
7698
- for (let c of h.elements)
7699
- c !== null && le(c);
7131
+ for (let c of h.elements) c !== null && le(c);
7700
7132
  return;
7701
7133
  case "ObjectExpression":
7702
- for (let c of h.properties)
7703
- le(c);
7134
+ for (let c of h.properties) le(c);
7704
7135
  return;
7705
7136
  case "ObjectProperty":
7706
- if (h.computed)
7707
- throw te(h.key, "Computed key");
7708
- if (h.shorthand)
7709
- throw te(h.key, "Shorthand property");
7137
+ if (h.computed) throw te(h.key, "Computed key");
7138
+ if (h.shorthand) throw te(h.key, "Shorthand property");
7710
7139
  h.key.type !== "Identifier" && le(h.key), le(h.value);
7711
7140
  return;
7712
7141
  case "UnaryExpression": {
7713
7142
  let { operator: c, argument: m } = h;
7714
- if (c !== "+" && c !== "-")
7715
- throw te(h, `Operator '${h.operator}'`);
7716
- if (m.type === "NumericLiteral" || m.type === "Identifier" && (m.name === "Infinity" || m.name === "NaN"))
7717
- return;
7143
+ if (c !== "+" && c !== "-") throw te(h, `Operator '${h.operator}'`);
7144
+ if (m.type === "NumericLiteral" || m.type === "Identifier" && (m.name === "Infinity" || m.name === "NaN")) return;
7718
7145
  throw te(m, `Operator '${c}' before '${m.type}'`);
7719
7146
  }
7720
7147
  case "Identifier":
7721
- if (h.name !== "Infinity" && h.name !== "NaN" && h.name !== "undefined")
7722
- throw te(h, `Identifier '${h.name}'`);
7148
+ if (h.name !== "Infinity" && h.name !== "NaN" && h.name !== "undefined") throw te(h, `Identifier '${h.name}'`);
7723
7149
  return;
7724
7150
  case "TemplateLiteral":
7725
- if (ds(h.expressions))
7726
- throw te(h.expressions[0], "'TemplateLiteral' with expression");
7727
- for (let c of h.quasis)
7728
- le(c);
7151
+ if (ds(h.expressions)) throw te(h.expressions[0], "'TemplateLiteral' with expression");
7152
+ for (let c of h.quasis) le(c);
7729
7153
  return;
7730
7154
  case "NullLiteral":
7731
7155
  case "BooleanLiteral":