@edgeone/nuxt-pages 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -364,18 +364,16 @@ var require_lib = __commonJS({
364
364
  syntaxPlugin
365
365
  }) {
366
366
  const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins";
367
- {
368
- const oldReasonCodes = {
369
- AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
370
- AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
371
- ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",
372
- SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
373
- SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
374
- SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
375
- };
376
- if (oldReasonCodes[reasonCode]) {
377
- reasonCode = oldReasonCodes[reasonCode];
378
- }
367
+ const oldReasonCodes = {
368
+ AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
369
+ AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
370
+ ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",
371
+ SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
372
+ SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
373
+ SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
374
+ };
375
+ if (oldReasonCodes[reasonCode]) {
376
+ reasonCode = oldReasonCodes[reasonCode];
379
377
  }
380
378
  return function constructor(loc, details) {
381
379
  const error = new SyntaxError();
@@ -455,7 +453,7 @@ var require_lib = __commonJS({
455
453
  allowUndeclaredExports: false,
456
454
  allowYieldOutsideFunction: false,
457
455
  plugins: [],
458
- strictMode: null,
456
+ strictMode: void 0,
459
457
  ranges: false,
460
458
  tokens: false,
461
459
  createImportExpressions: false,
@@ -636,33 +634,26 @@ var require_lib = __commonJS({
636
634
  }
637
635
  parsePrivateName() {
638
636
  const node = super.parsePrivateName();
639
- {
640
- if (!this.getPluginOption("estree", "classFeatures")) {
641
- return node;
642
- }
637
+ if (!this.getPluginOption("estree", "classFeatures")) {
638
+ return node;
643
639
  }
644
640
  return this.convertPrivateNameToPrivateIdentifier(node);
645
641
  }
646
642
  convertPrivateNameToPrivateIdentifier(node) {
647
643
  const name = super.getPrivateNameSV(node);
648
- node = node;
649
644
  delete node.id;
650
645
  node.name = name;
651
646
  return this.castNodeTo(node, "PrivateIdentifier");
652
647
  }
653
648
  isPrivateName(node) {
654
- {
655
- if (!this.getPluginOption("estree", "classFeatures")) {
656
- return super.isPrivateName(node);
657
- }
649
+ if (!this.getPluginOption("estree", "classFeatures")) {
650
+ return super.isPrivateName(node);
658
651
  }
659
652
  return node.type === "PrivateIdentifier";
660
653
  }
661
654
  getPrivateNameSV(node) {
662
- {
663
- if (!this.getPluginOption("estree", "classFeatures")) {
664
- return super.getPrivateNameSV(node);
665
- }
655
+ if (!this.getPluginOption("estree", "classFeatures")) {
656
+ return super.getPrivateNameSV(node);
666
657
  }
667
658
  return node.name;
668
659
  }
@@ -710,35 +701,25 @@ var require_lib = __commonJS({
710
701
  }
711
702
  parseClassProperty(...args) {
712
703
  const propertyNode = super.parseClassProperty(...args);
713
- {
714
- if (!this.getPluginOption("estree", "classFeatures")) {
715
- return propertyNode;
716
- }
717
- }
718
- {
719
- this.castNodeTo(propertyNode, "PropertyDefinition");
704
+ if (!this.getPluginOption("estree", "classFeatures")) {
705
+ return propertyNode;
720
706
  }
707
+ this.castNodeTo(propertyNode, "PropertyDefinition");
721
708
  return propertyNode;
722
709
  }
723
710
  parseClassPrivateProperty(...args) {
724
711
  const propertyNode = super.parseClassPrivateProperty(...args);
725
- {
726
- if (!this.getPluginOption("estree", "classFeatures")) {
727
- return propertyNode;
728
- }
729
- }
730
- {
731
- this.castNodeTo(propertyNode, "PropertyDefinition");
712
+ if (!this.getPluginOption("estree", "classFeatures")) {
713
+ return propertyNode;
732
714
  }
715
+ this.castNodeTo(propertyNode, "PropertyDefinition");
733
716
  propertyNode.computed = false;
734
717
  return propertyNode;
735
718
  }
736
719
  parseClassAccessorProperty(node) {
737
720
  const accessorPropertyNode = super.parseClassAccessorProperty(node);
738
- {
739
- if (!this.getPluginOption("estree", "classFeatures")) {
740
- return accessorPropertyNode;
741
- }
721
+ if (!this.getPluginOption("estree", "classFeatures")) {
722
+ return accessorPropertyNode;
742
723
  }
743
724
  if (accessorPropertyNode.abstract && this.hasPlugin("typescript")) {
744
725
  delete accessorPropertyNode.abstract;
@@ -760,8 +741,8 @@ var require_lib = __commonJS({
760
741
  node.kind = "init";
761
742
  return this.finishNode(node, "Property");
762
743
  }
763
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
764
- return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
744
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
745
+ return type === "Property" ? "value" : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
765
746
  }
766
747
  isAssignable(node, isBinding) {
767
748
  if (node != null && this.isObjectProperty(node)) {
@@ -795,14 +776,11 @@ var require_lib = __commonJS({
795
776
  finishCallExpression(unfinished, optional) {
796
777
  const node = super.finishCallExpression(unfinished, optional);
797
778
  if (node.callee.type === "Import") {
798
- var _ref;
779
+ var _ref, _ref2;
799
780
  this.castNodeTo(node, "ImportExpression");
800
781
  node.source = node.arguments[0];
801
782
  node.options = (_ref = node.arguments[1]) != null ? _ref : null;
802
- {
803
- var _ref2;
804
- node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
805
- }
783
+ node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
806
784
  delete node.arguments;
807
785
  delete node.callee;
808
786
  } else if (node.type === "OptionalCallExpression") {
@@ -926,9 +904,7 @@ var require_lib = __commonJS({
926
904
  j_cTag: new TokContext("</tag"),
927
905
  j_expr: new TokContext("<tag>...</tag>", true)
928
906
  };
929
- {
930
- types.template = new TokContext("`", true);
931
- }
907
+ types.template = new TokContext("`", true);
932
908
  var beforeExpr = true;
933
909
  var startsExpr = true;
934
910
  var isLoop = true;
@@ -957,9 +933,7 @@ var require_lib = __commonJS({
957
933
  this.prefix = !!conf.prefix;
958
934
  this.postfix = !!conf.postfix;
959
935
  this.binop = conf.binop != null ? conf.binop : null;
960
- {
961
- this.updateContext = null;
962
- }
936
+ this.updateContext = null;
963
937
  }
964
938
  };
965
939
  var keywords$1 = /* @__PURE__ */ new Map();
@@ -1460,31 +1434,29 @@ var require_lib = __commonJS({
1460
1434
  function getExportedToken(token) {
1461
1435
  return tokenTypes[token];
1462
1436
  }
1463
- {
1464
- tokenTypes[8].updateContext = (context) => {
1437
+ tokenTypes[8].updateContext = (context) => {
1438
+ context.pop();
1439
+ };
1440
+ tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
1441
+ context.push(types.brace);
1442
+ };
1443
+ tokenTypes[22].updateContext = (context) => {
1444
+ if (context[context.length - 1] === types.template) {
1465
1445
  context.pop();
1466
- };
1467
- tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
1468
- context.push(types.brace);
1469
- };
1470
- tokenTypes[22].updateContext = (context) => {
1471
- if (context[context.length - 1] === types.template) {
1472
- context.pop();
1473
- } else {
1474
- context.push(types.template);
1475
- }
1476
- };
1477
- tokenTypes[143].updateContext = (context) => {
1478
- context.push(types.j_expr, types.j_oTag);
1479
- };
1480
- }
1481
- var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
1482
- var nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
1446
+ } else {
1447
+ context.push(types.template);
1448
+ }
1449
+ };
1450
+ tokenTypes[143].updateContext = (context) => {
1451
+ context.push(types.j_expr, types.j_oTag);
1452
+ };
1453
+ var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
1454
+ var nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
1483
1455
  var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
1484
1456
  var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
1485
1457
  nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
1486
- var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
1487
- var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
1458
+ var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
1459
+ var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
1488
1460
  function isInAstralSet(code2, set) {
1489
1461
  let pos = 65536;
1490
1462
  for (let i = 0, length = set.length; i < length; i += 2) {
@@ -1668,7 +1640,7 @@ var require_lib = __commonJS({
1668
1640
  if (bindingType & 8) {
1669
1641
  return scope.names.has(name);
1670
1642
  }
1671
- const type = scope.names.get(name);
1643
+ const type = scope.names.get(name) || 0;
1672
1644
  if (bindingType & 16) {
1673
1645
  return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0;
1674
1646
  }
@@ -1984,13 +1956,12 @@ var require_lib = __commonJS({
1984
1956
  return this.flowParseDeclareInterface(node);
1985
1957
  } else if (this.match(82)) {
1986
1958
  return this.flowParseDeclareExportDeclaration(node, insideModule);
1987
- } else {
1988
- this.unexpected();
1989
1959
  }
1960
+ throw this.unexpected();
1990
1961
  }
1991
1962
  flowParseDeclareVariable(node) {
1992
1963
  this.next();
1993
- node.id = this.flowParseTypeAnnotatableIdentifier(true);
1964
+ node.id = this.flowParseTypeAnnotatableIdentifier();
1994
1965
  this.scope.declareName(node.id.name, 5, node.id.loc.start);
1995
1966
  this.semicolon();
1996
1967
  return this.finishNode(node, "DeclareVariable");
@@ -2006,18 +1977,17 @@ var require_lib = __commonJS({
2006
1977
  const body = bodyNode.body = [];
2007
1978
  this.expect(5);
2008
1979
  while (!this.match(8)) {
2009
- let bodyNode2 = this.startNode();
1980
+ const bodyNode2 = this.startNode();
2010
1981
  if (this.match(83)) {
2011
1982
  this.next();
2012
1983
  if (!this.isContextual(130) && !this.match(87)) {
2013
1984
  this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc);
2014
1985
  }
2015
- super.parseImport(bodyNode2);
1986
+ body.push(super.parseImport(bodyNode2));
2016
1987
  } else {
2017
1988
  this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule);
2018
- bodyNode2 = this.flowParseDeclare(bodyNode2, true);
1989
+ body.push(this.flowParseDeclare(bodyNode2, true));
2019
1990
  }
2020
- body.push(bodyNode2);
2021
1991
  }
2022
1992
  this.scope.exit();
2023
1993
  this.expect(8);
@@ -2078,7 +2048,7 @@ var require_lib = __commonJS({
2078
2048
  }
2079
2049
  }
2080
2050
  }
2081
- this.unexpected();
2051
+ throw this.unexpected();
2082
2052
  }
2083
2053
  flowParseDeclareModuleExports(node) {
2084
2054
  this.next();
@@ -2165,9 +2135,14 @@ var require_lib = __commonJS({
2165
2135
  reservedType: word
2166
2136
  });
2167
2137
  }
2168
- flowParseRestrictedIdentifier(liberal, declaration) {
2138
+ flowParseRestrictedIdentifierName(liberal, declaration) {
2169
2139
  this.checkReservedType(this.state.value, this.state.startLoc, declaration);
2170
- return this.parseIdentifier(liberal);
2140
+ return this.parseIdentifierName(liberal);
2141
+ }
2142
+ flowParseRestrictedIdentifier(liberal, declaration) {
2143
+ const node = this.startNode();
2144
+ const name = this.flowParseRestrictedIdentifierName(liberal, declaration);
2145
+ return this.createIdentifier(node, name);
2171
2146
  }
2172
2147
  flowParseTypeAlias(node) {
2173
2148
  node.id = this.flowParseRestrictedIdentifier(false, true);
@@ -2201,14 +2176,21 @@ var require_lib = __commonJS({
2201
2176
  this.semicolon();
2202
2177
  return this.finishNode(node, "OpaqueType");
2203
2178
  }
2179
+ flowParseTypeParameterBound() {
2180
+ if (this.match(14) || this.isContextual(81)) {
2181
+ const node = this.startNode();
2182
+ this.next();
2183
+ node.typeAnnotation = this.flowParseType();
2184
+ return this.finishNode(node, "TypeAnnotation");
2185
+ }
2186
+ }
2204
2187
  flowParseTypeParameter(requireDefault = false) {
2205
2188
  const nodeStartLoc = this.state.startLoc;
2206
2189
  const node = this.startNode();
2207
2190
  const variance = this.flowParseVariance();
2208
- const ident = this.flowParseTypeAnnotatableIdentifier();
2209
- node.name = ident.name;
2191
+ node.name = this.flowParseRestrictedIdentifierName();
2210
2192
  node.variance = variance;
2211
- node.bound = ident.typeAnnotation;
2193
+ node.bound = this.flowParseTypeParameterBound();
2212
2194
  if (this.match(29)) {
2213
2195
  this.eat(29);
2214
2196
  node.default = this.flowParseType();
@@ -2286,7 +2268,7 @@ var require_lib = __commonJS({
2286
2268
  return this.finishNode(node, "TypeParameterInstantiation");
2287
2269
  }
2288
2270
  flowParseTypeParameterInstantiationCallOrNew() {
2289
- if (this.reScan_lt() !== 47) return;
2271
+ if (this.reScan_lt() !== 47) return null;
2290
2272
  const node = this.startNode();
2291
2273
  const oldInType = this.state.inType;
2292
2274
  node.params = [];
@@ -2780,8 +2762,7 @@ var require_lib = __commonJS({
2780
2762
  }
2781
2763
  throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
2782
2764
  }
2783
- this.unexpected();
2784
- return;
2765
+ throw this.unexpected();
2785
2766
  case 135:
2786
2767
  return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
2787
2768
  case 136:
@@ -2812,7 +2793,7 @@ var require_lib = __commonJS({
2812
2793
  return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier());
2813
2794
  }
2814
2795
  }
2815
- this.unexpected();
2796
+ throw this.unexpected();
2816
2797
  }
2817
2798
  flowParsePostfixType() {
2818
2799
  const startLoc = this.state.startLoc;
@@ -2904,13 +2885,13 @@ var require_lib = __commonJS({
2904
2885
  node.typeAnnotation = this.flowParseTypeInitialiser();
2905
2886
  return this.finishNode(node, "TypeAnnotation");
2906
2887
  }
2907
- flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
2908
- const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
2888
+ flowParseTypeAnnotatableIdentifier() {
2889
+ const node = this.startNode();
2890
+ const name = this.parseIdentifierName();
2909
2891
  if (this.match(14)) {
2910
- ident.typeAnnotation = this.flowParseTypeAnnotation();
2911
- this.resetEndLocation(ident);
2892
+ node.typeAnnotation = this.flowParseTypeAnnotation();
2912
2893
  }
2913
- return ident;
2894
+ return this.createIdentifier(node, name);
2914
2895
  }
2915
2896
  typeCastToParameter(node) {
2916
2897
  node.expression.typeAnnotation = node.typeAnnotation;
@@ -3273,15 +3254,15 @@ var require_lib = __commonJS({
3273
3254
  }
3274
3255
  return exprList;
3275
3256
  }
3276
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
3277
- const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
3278
- if (canBePattern && !this.state.maybeInArrowParameters) {
3257
+ parseArrayLike(close, isTuple, refExpressionErrors) {
3258
+ const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
3259
+ if (refExpressionErrors != null && !this.state.maybeInArrowParameters) {
3279
3260
  this.toReferencedList(node.elements);
3280
3261
  }
3281
3262
  return node;
3282
3263
  }
3283
- isValidLVal(type, isParenthesized, binding) {
3284
- return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding);
3264
+ isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
3265
+ return type === "TypeCastExpression" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
3285
3266
  }
3286
3267
  parseClassProperty(node) {
3287
3268
  if (this.match(14)) {
@@ -3338,9 +3319,7 @@ var require_lib = __commonJS({
3338
3319
  parseClassSuper(node) {
3339
3320
  super.parseClassSuper(node);
3340
3321
  if (node.superClass && (this.match(47) || this.match(51))) {
3341
- {
3342
- node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
3343
- }
3322
+ node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
3344
3323
  }
3345
3324
  if (this.isContextual(113)) {
3346
3325
  this.next();
@@ -5120,18 +5099,16 @@ var require_lib = __commonJS({
5120
5099
  setLeadingComments(commentWS.trailingNode, comments);
5121
5100
  }
5122
5101
  } else {
5123
- const {
5124
- containingNode: node,
5125
- start: commentStart
5126
- } = commentWS;
5102
+ const node = commentWS.containingNode;
5103
+ const commentStart = commentWS.start;
5127
5104
  if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
5128
5105
  switch (node.type) {
5129
5106
  case "ObjectExpression":
5130
5107
  case "ObjectPattern":
5131
- case "RecordExpression":
5132
5108
  adjustInnerComments(node, node.properties, commentWS);
5133
5109
  break;
5134
5110
  case "CallExpression":
5111
+ case "NewExpression":
5135
5112
  case "OptionalCallExpression":
5136
5113
  adjustInnerComments(node, node.arguments, commentWS);
5137
5114
  break;
@@ -5144,11 +5121,11 @@ var require_lib = __commonJS({
5144
5121
  case "ObjectMethod":
5145
5122
  case "ClassMethod":
5146
5123
  case "ClassPrivateMethod":
5124
+ case "TSTypeParameterDeclaration":
5147
5125
  adjustInnerComments(node, node.params, commentWS);
5148
5126
  break;
5149
5127
  case "ArrayExpression":
5150
5128
  case "ArrayPattern":
5151
- case "TupleExpression":
5152
5129
  adjustInnerComments(node, node.elements, commentWS);
5153
5130
  break;
5154
5131
  case "ExportNamedDeclaration":
@@ -5156,14 +5133,23 @@ var require_lib = __commonJS({
5156
5133
  adjustInnerComments(node, node.specifiers, commentWS);
5157
5134
  break;
5158
5135
  case "TSEnumDeclaration":
5159
- {
5160
- adjustInnerComments(node, node.members, commentWS);
5161
- }
5136
+ adjustInnerComments(node, node.members, commentWS);
5162
5137
  break;
5163
5138
  case "TSEnumBody":
5164
5139
  adjustInnerComments(node, node.members, commentWS);
5165
5140
  break;
5141
+ case "TSInterfaceBody":
5142
+ adjustInnerComments(node, node.body, commentWS);
5143
+ break;
5166
5144
  default: {
5145
+ if (node.type === "RecordExpression") {
5146
+ adjustInnerComments(node, node.properties, commentWS);
5147
+ break;
5148
+ }
5149
+ if (node.type === "TupleExpression") {
5150
+ adjustInnerComments(node, node.elements, commentWS);
5151
+ break;
5152
+ }
5167
5153
  setInnerComments(node, comments);
5168
5154
  }
5169
5155
  }
@@ -7114,19 +7100,17 @@ var require_lib = __commonJS({
7114
7100
  }
7115
7101
  };
7116
7102
  var NodePrototype = Node.prototype;
7117
- {
7118
- NodePrototype.__clone = function() {
7119
- const newNode = new Node(void 0, this.start, this.loc.start);
7120
- const keys = Object.keys(this);
7121
- for (let i = 0, length = keys.length; i < length; i++) {
7122
- const key = keys[i];
7123
- if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
7124
- newNode[key] = this[key];
7125
- }
7103
+ NodePrototype.__clone = function() {
7104
+ const newNode = new Node(void 0, this.start, this.loc.start);
7105
+ const keys = Object.keys(this);
7106
+ for (let i = 0, length = keys.length; i < length; i++) {
7107
+ const key = keys[i];
7108
+ if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
7109
+ newNode[key] = this[key];
7126
7110
  }
7127
- return newNode;
7128
- };
7129
- }
7111
+ }
7112
+ return newNode;
7113
+ };
7130
7114
  var NodeUtils = class extends UtilParser {
7131
7115
  startNode() {
7132
7116
  const loc = this.state.startLoc;
@@ -7219,7 +7203,7 @@ var require_lib = __commonJS({
7219
7203
  if (isLHS) {
7220
7204
  if (parenthesized.type === "Identifier") {
7221
7205
  this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node);
7222
- } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
7206
+ } else if (parenthesized.type !== "CallExpression" && parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
7223
7207
  this.raise(Errors.InvalidParenthesizedAssignment, node);
7224
7208
  }
7225
7209
  } else {
@@ -7491,7 +7475,7 @@ var require_lib = __commonJS({
7491
7475
  node.right = this.parseMaybeAssignAllowIn();
7492
7476
  return this.finishNode(node, "AssignmentPattern");
7493
7477
  }
7494
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
7478
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
7495
7479
  switch (type) {
7496
7480
  case "AssignmentPattern":
7497
7481
  return "left";
@@ -7507,13 +7491,17 @@ var require_lib = __commonJS({
7507
7491
  return "properties";
7508
7492
  case "VoidPattern":
7509
7493
  return true;
7494
+ case "CallExpression":
7495
+ if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192) {
7496
+ return true;
7497
+ }
7510
7498
  }
7511
7499
  return false;
7512
7500
  }
7513
7501
  isOptionalMemberExpression(expression) {
7514
7502
  return expression.type === "OptionalMemberExpression";
7515
7503
  }
7516
- checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) {
7504
+ checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false, disallowCallExpression = false) {
7517
7505
  var _expression$extra;
7518
7506
  const type = expression.type;
7519
7507
  if (this.isObjectMethod(expression)) return;
@@ -7548,7 +7536,9 @@ var require_lib = __commonJS({
7548
7536
  } else if (type === "VoidPattern" && ancestor.type === "CatchClause") {
7549
7537
  this.raise(Errors.VoidPatternCatchClauseParam, expression);
7550
7538
  }
7551
- const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
7539
+ const unwrappedExpression = unwrapParenthesizedExpression(expression);
7540
+ disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super"));
7541
+ const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
7552
7542
  if (validity === true) return;
7553
7543
  if (validity === false) {
7554
7544
  const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
@@ -7571,11 +7561,11 @@ var require_lib = __commonJS({
7571
7561
  if (Array.isArray(val)) {
7572
7562
  for (const child of val) {
7573
7563
  if (child) {
7574
- this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
7564
+ this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, true);
7575
7565
  }
7576
7566
  }
7577
7567
  } else if (val) {
7578
- this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
7568
+ this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, disallowCallExpression);
7579
7569
  }
7580
7570
  }
7581
7571
  checkIdentifier(at, bindingType, strictModeChanged = false) {
@@ -7623,6 +7613,7 @@ var require_lib = __commonJS({
7623
7613
  return true;
7624
7614
  }
7625
7615
  };
7616
+ var keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
7626
7617
  function nonNull(x) {
7627
7618
  if (x == null) {
7628
7619
  throw new Error(`Unexpected ${x} value.`);
@@ -7967,13 +7958,9 @@ var require_lib = __commonJS({
7967
7958
  this.expect(10);
7968
7959
  if (!this.match(134)) {
7969
7960
  this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
7970
- {
7971
- node.argument = super.parseExprAtom();
7972
- }
7961
+ node.argument = super.parseExprAtom();
7973
7962
  } else {
7974
- {
7975
- node.argument = this.parseStringLiteral(this.state.value);
7976
- }
7963
+ node.argument = this.parseStringLiteral(this.state.value);
7977
7964
  }
7978
7965
  if (this.eat(12)) {
7979
7966
  node.options = this.tsParseImportTypeOptions();
@@ -7985,9 +7972,7 @@ var require_lib = __commonJS({
7985
7972
  node.qualifier = this.tsParseEntityName(1 | 2);
7986
7973
  }
7987
7974
  if (this.match(47)) {
7988
- {
7989
- node.typeParameters = this.tsParseTypeArguments();
7990
- }
7975
+ node.typeParameters = this.tsParseTypeArguments();
7991
7976
  }
7992
7977
  return this.finishNode(node, "TSImportType");
7993
7978
  }
@@ -8052,9 +8037,7 @@ var require_lib = __commonJS({
8052
8037
  const node = this.startNode();
8053
8038
  node.typeName = this.tsParseEntityName(1);
8054
8039
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
8055
- {
8056
- node.typeParameters = this.tsParseTypeArguments();
8057
- }
8040
+ node.typeParameters = this.tsParseTypeArguments();
8058
8041
  }
8059
8042
  return this.finishNode(node, "TSTypeReference");
8060
8043
  }
@@ -8077,14 +8060,10 @@ var require_lib = __commonJS({
8077
8060
  if (this.match(83)) {
8078
8061
  node.exprName = this.tsParseImportType();
8079
8062
  } else {
8080
- {
8081
- node.exprName = this.tsParseEntityName(1 | 2);
8082
- }
8063
+ node.exprName = this.tsParseEntityName(1 | 2);
8083
8064
  }
8084
8065
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
8085
- {
8086
- node.typeParameters = this.tsParseTypeArguments();
8087
- }
8066
+ node.typeParameters = this.tsParseTypeArguments();
8088
8067
  }
8089
8068
  return this.finishNode(node, "TSTypeQuery");
8090
8069
  }
@@ -8305,12 +8284,10 @@ var require_lib = __commonJS({
8305
8284
  node.readonly = true;
8306
8285
  }
8307
8286
  this.expect(0);
8308
- {
8309
- const typeParameter = this.startNode();
8310
- typeParameter.name = this.tsParseTypeParameterName();
8311
- typeParameter.constraint = this.tsExpectThenParseType(58);
8312
- node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
8313
- }
8287
+ const typeParameter = this.startNode();
8288
+ typeParameter.name = this.tsParseTypeParameterName();
8289
+ typeParameter.constraint = this.tsExpectThenParseType(58);
8290
+ node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
8314
8291
  node.nameType = this.eatContextual(93) ? this.tsParseType() : null;
8315
8292
  this.expect(3);
8316
8293
  if (this.match(53)) {
@@ -8442,11 +8419,9 @@ var require_lib = __commonJS({
8442
8419
  return this.finishNode(node, "TSLiteralType");
8443
8420
  }
8444
8421
  tsParseTemplateLiteralType() {
8445
- {
8446
- const node = this.startNode();
8447
- node.literal = super.parseTemplate(false);
8448
- return this.finishNode(node, "TSLiteralType");
8449
- }
8422
+ const node = this.startNode();
8423
+ node.literal = super.parseTemplate(false);
8424
+ return this.finishNode(node, "TSLiteralType");
8450
8425
  }
8451
8426
  parseTemplateSubstitution() {
8452
8427
  if (this.state.inType) return this.tsParseType();
@@ -8509,7 +8484,7 @@ var require_lib = __commonJS({
8509
8484
  }
8510
8485
  }
8511
8486
  }
8512
- this.unexpected();
8487
+ throw this.unexpected();
8513
8488
  }
8514
8489
  tsParseArrayTypeOrHigher() {
8515
8490
  const {
@@ -8775,14 +8750,12 @@ var require_lib = __commonJS({
8775
8750
  tsParseHeritageClause(token) {
8776
8751
  const originalStartLoc = this.state.startLoc;
8777
8752
  const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
8778
- {
8779
- const node = this.startNode();
8780
- node.expression = this.tsParseEntityName(1 | 2);
8781
- if (this.match(47)) {
8782
- node.typeParameters = this.tsParseTypeArguments();
8783
- }
8784
- return this.finishNode(node, "TSExpressionWithTypeArguments");
8753
+ const node = this.startNode();
8754
+ node.expression = this.tsParseEntityName(1 | 2);
8755
+ if (this.match(47)) {
8756
+ node.typeParameters = this.tsParseTypeArguments();
8785
8757
  }
8758
+ return this.finishNode(node, "TSExpressionWithTypeArguments");
8786
8759
  });
8787
8760
  if (!delimitedList.length) {
8788
8761
  this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, {
@@ -8898,11 +8871,9 @@ var require_lib = __commonJS({
8898
8871
  this.expectContextual(126);
8899
8872
  node.id = this.parseIdentifier();
8900
8873
  this.checkIdentifier(node.id, node.const ? 8971 : 8459);
8901
- {
8902
- this.expect(5);
8903
- node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
8904
- this.expect(8);
8905
- }
8874
+ this.expect(5);
8875
+ node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
8876
+ this.expect(8);
8906
8877
  return this.finishNode(node, "TSEnumDeclaration");
8907
8878
  }
8908
8879
  tsParseEnumBody() {
@@ -8941,9 +8912,7 @@ var require_lib = __commonJS({
8941
8912
  tsParseAmbientExternalModuleDeclaration(node) {
8942
8913
  if (this.isContextual(112)) {
8943
8914
  node.kind = "global";
8944
- {
8945
- node.global = true;
8946
- }
8915
+ node.global = true;
8947
8916
  node.id = this.parseIdentifier();
8948
8917
  } else if (this.match(134)) {
8949
8918
  node.kind = "module";
@@ -8963,9 +8932,7 @@ var require_lib = __commonJS({
8963
8932
  return this.finishNode(node, "TSModuleDeclaration");
8964
8933
  }
8965
8934
  tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) {
8966
- {
8967
- node.isExport = isExport || false;
8968
- }
8935
+ node.isExport = isExport || false;
8969
8936
  node.id = maybeDefaultIdentifier || this.parseIdentifier();
8970
8937
  this.checkIdentifier(node.id, 4096);
8971
8938
  this.expect(29);
@@ -9072,51 +9039,22 @@ var require_lib = __commonJS({
9072
9039
  }
9073
9040
  default:
9074
9041
  if (tokenIsIdentifier(startType)) {
9075
- return this.tsParseDeclaration(node, this.state.value, true, null);
9042
+ return this.tsParseDeclaration(node, this.state.type, true, null);
9076
9043
  }
9077
9044
  }
9078
9045
  });
9079
9046
  }
9080
9047
  tsTryParseExportDeclaration() {
9081
- return this.tsParseDeclaration(this.startNode(), this.state.value, true, null);
9082
- }
9083
- tsParseExpressionStatement(node, expr, decorators) {
9084
- switch (expr.name) {
9085
- case "declare": {
9086
- const declaration = this.tsTryParseDeclare(node);
9087
- if (declaration) {
9088
- declaration.declare = true;
9089
- }
9090
- return declaration;
9091
- }
9092
- case "global":
9093
- if (this.match(5)) {
9094
- this.scope.enter(1024);
9095
- this.prodParam.enter(0);
9096
- const mod = node;
9097
- mod.kind = "global";
9098
- {
9099
- node.global = true;
9100
- }
9101
- mod.id = expr;
9102
- mod.body = this.tsParseModuleBlock();
9103
- this.scope.exit();
9104
- this.prodParam.exit();
9105
- return this.finishNode(mod, "TSModuleDeclaration");
9106
- }
9107
- break;
9108
- default:
9109
- return this.tsParseDeclaration(node, expr.name, false, decorators);
9110
- }
9048
+ return this.tsParseDeclaration(this.startNode(), this.state.type, true, null);
9111
9049
  }
9112
- tsParseDeclaration(node, value, next, decorators) {
9113
- switch (value) {
9114
- case "abstract":
9050
+ tsParseDeclaration(node, type, next, decorators) {
9051
+ switch (type) {
9052
+ case 124:
9115
9053
  if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
9116
9054
  return this.tsParseAbstractDeclaration(node, decorators);
9117
9055
  }
9118
9056
  break;
9119
- case "module":
9057
+ case 127:
9120
9058
  if (this.tsCheckLineTerminator(next)) {
9121
9059
  if (this.match(134)) {
9122
9060
  return this.tsParseAmbientExternalModuleDeclaration(node);
@@ -9126,13 +9064,13 @@ var require_lib = __commonJS({
9126
9064
  }
9127
9065
  }
9128
9066
  break;
9129
- case "namespace":
9067
+ case 128:
9130
9068
  if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
9131
9069
  node.kind = "namespace";
9132
9070
  return this.tsParseModuleOrNamespaceDeclaration(node);
9133
9071
  }
9134
9072
  break;
9135
- case "type":
9073
+ case 130:
9136
9074
  if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
9137
9075
  return this.tsParseTypeAliasDeclaration(node);
9138
9076
  }
@@ -9273,8 +9211,8 @@ var require_lib = __commonJS({
9273
9211
  this.tsCheckForInvalidTypeCasts(exprList);
9274
9212
  return exprList;
9275
9213
  }
9276
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
9277
- const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
9214
+ parseArrayLike(close, isTuple, refExpressionErrors) {
9215
+ const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
9278
9216
  if (node.type === "ArrayExpression") {
9279
9217
  this.tsCheckForInvalidTypeCasts(node.elements);
9280
9218
  }
@@ -9315,9 +9253,7 @@ var require_lib = __commonJS({
9315
9253
  }
9316
9254
  if (tokenIsTemplate(this.state.type)) {
9317
9255
  const result2 = super.parseTaggedTemplateExpression(base, startLoc, state);
9318
- {
9319
- result2.typeParameters = typeArguments;
9320
- }
9256
+ result2.typeParameters = typeArguments;
9321
9257
  return result2;
9322
9258
  }
9323
9259
  if (!noCalls && this.eat(10)) {
@@ -9325,23 +9261,19 @@ var require_lib = __commonJS({
9325
9261
  node2.callee = base;
9326
9262
  node2.arguments = this.parseCallExpressionArguments();
9327
9263
  this.tsCheckForInvalidTypeCasts(node2.arguments);
9328
- {
9329
- node2.typeParameters = typeArguments;
9330
- }
9264
+ node2.typeParameters = typeArguments;
9331
9265
  if (state.optionalChainMember) {
9332
9266
  node2.optional = isOptionalCall;
9333
9267
  }
9334
9268
  return this.finishCallExpression(node2, state.optionalChainMember);
9335
9269
  }
9336
9270
  const tokenType = this.state.type;
9337
- if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
9271
+ if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenType !== 93 && tokenType !== 120 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
9338
9272
  return;
9339
9273
  }
9340
9274
  const node = this.startNodeAt(startLoc);
9341
9275
  node.expression = base;
9342
- {
9343
- node.typeParameters = typeArguments;
9344
- }
9276
+ node.typeParameters = typeArguments;
9345
9277
  return this.finishNode(node, "TSInstantiationExpression");
9346
9278
  });
9347
9279
  if (missingParenErrorLoc) {
@@ -9368,9 +9300,7 @@ var require_lib = __commonJS({
9368
9300
  callee
9369
9301
  } = node;
9370
9302
  if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) {
9371
- {
9372
- node.typeParameters = callee.typeParameters;
9373
- }
9303
+ node.typeParameters = callee.typeParameters;
9374
9304
  node.callee = callee.expression;
9375
9305
  }
9376
9306
  }
@@ -9461,9 +9391,7 @@ var require_lib = __commonJS({
9461
9391
  nodeImportEquals.importKind = "value";
9462
9392
  }
9463
9393
  const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
9464
- {
9465
- return declaration;
9466
- }
9394
+ return declaration;
9467
9395
  } else if (this.eat(29)) {
9468
9396
  const assign = node;
9469
9397
  assign.expression = super.parseExpression();
@@ -9520,19 +9448,78 @@ var require_lib = __commonJS({
9520
9448
  return declaration;
9521
9449
  }
9522
9450
  parseStatementContent(flags, decorators) {
9523
- if (this.match(75) && this.isLookaheadContextual("enum")) {
9524
- const node = this.startNode();
9525
- this.expect(75);
9526
- return this.tsParseEnumDeclaration(node, {
9527
- const: true
9528
- });
9529
- }
9530
- if (this.isContextual(126)) {
9531
- return this.tsParseEnumDeclaration(this.startNode());
9532
- }
9533
- if (this.isContextual(129)) {
9534
- const result = this.tsParseInterfaceDeclaration(this.startNode());
9535
- if (result) return result;
9451
+ if (!this.state.containsEsc) {
9452
+ switch (this.state.type) {
9453
+ case 75: {
9454
+ if (this.isLookaheadContextual("enum")) {
9455
+ const node = this.startNode();
9456
+ this.expect(75);
9457
+ return this.tsParseEnumDeclaration(node, {
9458
+ const: true
9459
+ });
9460
+ }
9461
+ break;
9462
+ }
9463
+ case 124:
9464
+ case 125: {
9465
+ if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
9466
+ const token = this.state.type;
9467
+ const node = this.startNode();
9468
+ this.next();
9469
+ const declaration = token === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
9470
+ if (declaration) {
9471
+ if (token === 125) {
9472
+ declaration.declare = true;
9473
+ }
9474
+ return declaration;
9475
+ } else {
9476
+ node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token === 125 ? "declare" : "abstract");
9477
+ this.semicolon(false);
9478
+ return this.finishNode(node, "ExpressionStatement");
9479
+ }
9480
+ }
9481
+ break;
9482
+ }
9483
+ case 126:
9484
+ return this.tsParseEnumDeclaration(this.startNode());
9485
+ case 112: {
9486
+ const nextCh = this.lookaheadCharCode();
9487
+ if (nextCh === 123) {
9488
+ const node = this.startNode();
9489
+ return this.tsParseAmbientExternalModuleDeclaration(node);
9490
+ }
9491
+ break;
9492
+ }
9493
+ case 129: {
9494
+ const result = this.tsParseInterfaceDeclaration(this.startNode());
9495
+ if (result) return result;
9496
+ break;
9497
+ }
9498
+ case 127: {
9499
+ if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
9500
+ const node = this.startNode();
9501
+ this.next();
9502
+ return this.tsParseDeclaration(node, 127, false, decorators);
9503
+ }
9504
+ break;
9505
+ }
9506
+ case 128: {
9507
+ if (this.nextTokenIsIdentifierOnSameLine()) {
9508
+ const node = this.startNode();
9509
+ this.next();
9510
+ return this.tsParseDeclaration(node, 128, false, decorators);
9511
+ }
9512
+ break;
9513
+ }
9514
+ case 130: {
9515
+ if (this.nextTokenIsIdentifierOnSameLine()) {
9516
+ const node = this.startNode();
9517
+ this.next();
9518
+ return this.tsParseTypeAliasDeclaration(node);
9519
+ }
9520
+ break;
9521
+ }
9522
+ }
9536
9523
  }
9537
9524
  return super.parseStatementContent(flags, decorators);
9538
9525
  }
@@ -9616,10 +9603,6 @@ var require_lib = __commonJS({
9616
9603
  this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp);
9617
9604
  }
9618
9605
  }
9619
- parseExpressionStatement(node, expr, decorators) {
9620
- const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : void 0;
9621
- return decl || super.parseExpressionStatement(node, expr, decorators);
9622
- }
9623
9606
  shouldParseExportDeclaration() {
9624
9607
  if (this.tsIsDeclarationStart()) return true;
9625
9608
  return super.shouldParseExportDeclaration();
@@ -9754,8 +9737,16 @@ var require_lib = __commonJS({
9754
9737
  }
9755
9738
  parseClassSuper(node) {
9756
9739
  super.parseClassSuper(node);
9757
- if (node.superClass && (this.match(47) || this.match(51))) {
9758
- {
9740
+ if (node.superClass) {
9741
+ if (node.superClass.type === "TSInstantiationExpression") {
9742
+ const tsInstantiationExpression = node.superClass;
9743
+ const superClass2 = tsInstantiationExpression.expression;
9744
+ this.takeSurroundingComments(superClass2, superClass2.start, superClass2.end);
9745
+ const superTypeArguments = tsInstantiationExpression.typeParameters;
9746
+ this.takeSurroundingComments(superTypeArguments, superTypeArguments.start, superTypeArguments.end);
9747
+ node.superClass = superClass2;
9748
+ node.superTypeParameters = superTypeArguments;
9749
+ } else if (this.match(47) || this.match(51)) {
9759
9750
  node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
9760
9751
  }
9761
9752
  }
@@ -9944,7 +9935,7 @@ var require_lib = __commonJS({
9944
9935
  super.checkToRestConversion(node, allowPattern);
9945
9936
  }
9946
9937
  }
9947
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
9938
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
9948
9939
  switch (type) {
9949
9940
  case "TSTypeCastExpression":
9950
9941
  return true;
@@ -9957,7 +9948,7 @@ var require_lib = __commonJS({
9957
9948
  case "TSTypeAssertion":
9958
9949
  return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true];
9959
9950
  default:
9960
- return super.isValidLVal(type, isUnparenthesizedInAssign, binding);
9951
+ return super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
9961
9952
  }
9962
9953
  }
9963
9954
  parseBindingAtom() {
@@ -9971,9 +9962,7 @@ var require_lib = __commonJS({
9971
9962
  const typeArguments = this.tsParseTypeArgumentsInExpression();
9972
9963
  if (this.match(10)) {
9973
9964
  const call = super.parseMaybeDecoratorArguments(expr, startLoc);
9974
- {
9975
- call.typeParameters = typeArguments;
9976
- }
9965
+ call.typeParameters = typeArguments;
9977
9966
  return call;
9978
9967
  }
9979
9968
  this.unexpected(null, 10);
@@ -10064,9 +10053,7 @@ var require_lib = __commonJS({
10064
10053
  if (this.match(47) || this.match(51)) {
10065
10054
  const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
10066
10055
  if (typeArguments) {
10067
- {
10068
- node.typeParameters = typeArguments;
10069
- }
10056
+ node.typeParameters = typeArguments;
10070
10057
  }
10071
10058
  }
10072
10059
  return super.jsxParseOpeningElementAfterName(node);
@@ -10119,10 +10106,11 @@ var require_lib = __commonJS({
10119
10106
  node.abstract = true;
10120
10107
  this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
10121
10108
  return this.tsParseInterfaceDeclaration(node);
10109
+ } else {
10110
+ return null;
10122
10111
  }
10123
- } else {
10124
- this.unexpected(null, 80);
10125
10112
  }
10113
+ throw this.unexpected(null, 80);
10126
10114
  }
10127
10115
  parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
10128
10116
  const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
@@ -10338,6 +10326,32 @@ var require_lib = __commonJS({
10338
10326
  return;
10339
10327
  }
10340
10328
  }
10329
+ chStartsBindingIdentifierAndNotRelationalOperator(ch, pos) {
10330
+ if (isIdentifierStart(ch)) {
10331
+ keywordAndTSRelationalOperator.lastIndex = pos;
10332
+ if (keywordAndTSRelationalOperator.test(this.input)) {
10333
+ const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
10334
+ if (!isIdentifierChar(endCh) && endCh !== 92) {
10335
+ return false;
10336
+ }
10337
+ }
10338
+ return true;
10339
+ } else if (ch === 92) {
10340
+ return true;
10341
+ } else {
10342
+ return false;
10343
+ }
10344
+ }
10345
+ nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
10346
+ const next = this.nextTokenInLineStart();
10347
+ const nextCh = this.codePointAtPos(next);
10348
+ return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
10349
+ }
10350
+ nextTokenIsIdentifierOrStringLiteralOnSameLine() {
10351
+ const next = this.nextTokenInLineStart();
10352
+ const nextCh = this.codePointAtPos(next);
10353
+ return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
10354
+ }
10341
10355
  };
10342
10356
  function isPossiblyLiteralEnum(expression) {
10343
10357
  if (expression.type !== "MemberExpression") return false;
@@ -10466,8 +10480,8 @@ var require_lib = __commonJS({
10466
10480
  parseBindingAtom() {
10467
10481
  return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
10468
10482
  }
10469
- isValidLVal(type, isParenthesized, binding) {
10470
- return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding);
10483
+ isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
10484
+ return type === "Placeholder" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
10471
10485
  }
10472
10486
  toAssignable(node, isLHS) {
10473
10487
  if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
@@ -10487,7 +10501,8 @@ var require_lib = __commonJS({
10487
10501
  return false;
10488
10502
  }
10489
10503
  verifyBreakContinue(node, isBreak) {
10490
- if (node.label && node.label.type === "Placeholder") return;
10504
+ var _node$label;
10505
+ if (((_node$label = node.label) == null ? void 0 : _node$label.type) === "Placeholder") return;
10491
10506
  super.verifyBreakContinue(node, isBreak);
10492
10507
  }
10493
10508
  parseExpressionStatement(node, expr) {
@@ -10660,6 +10675,7 @@ var require_lib = __commonJS({
10660
10675
  throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
10661
10676
  }
10662
10677
  if (proposal === "hack") {
10678
+ var _pluginsMap$get;
10663
10679
  if (pluginsMap.has("placeholders")) {
10664
10680
  throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
10665
10681
  }
@@ -10671,25 +10687,20 @@ var require_lib = __commonJS({
10671
10687
  const tokenList = TOPIC_TOKENS.map((t) => `"${t}"`).join(", ");
10672
10688
  throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
10673
10689
  }
10674
- {
10675
- var _pluginsMap$get;
10676
- if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
10677
- throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
10678
- }
10690
+ if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
10691
+ throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
10679
10692
  }
10680
10693
  } else if (proposal === "smart" && ((_pluginsMap$get2 = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get2.syntaxType) === "hash") {
10681
10694
  throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
10682
10695
  }
10683
10696
  }
10684
10697
  if (pluginsMap.has("moduleAttributes")) {
10685
- {
10686
- if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) {
10687
- throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
10688
- }
10689
- const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version;
10690
- if (moduleAttributesVersionPluginOption !== "may-2020") {
10691
- throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
10692
- }
10698
+ if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) {
10699
+ throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
10700
+ }
10701
+ const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version;
10702
+ if (moduleAttributesVersionPluginOption !== "may-2020") {
10703
+ throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
10693
10704
  }
10694
10705
  }
10695
10706
  if (pluginsMap.has("importAssertions")) {
@@ -10697,19 +10708,16 @@ var require_lib = __commonJS({
10697
10708
  throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
10698
10709
  }
10699
10710
  }
10700
- if (!pluginsMap.has("deprecatedImportAssert") && pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) {
10701
- {
10702
- pluginsMap.set("deprecatedImportAssert", {});
10703
- }
10711
+ if (pluginsMap.has("deprecatedImportAssert")) ;
10712
+ else if (pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) {
10713
+ pluginsMap.set("deprecatedImportAssert", {});
10704
10714
  }
10705
10715
  if (pluginsMap.has("recordAndTuple")) {
10706
- {
10707
- const syntaxType = pluginsMap.get("recordAndTuple").syntaxType;
10708
- if (syntaxType != null) {
10709
- const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
10710
- if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {
10711
- throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
10712
- }
10716
+ const syntaxType = pluginsMap.get("recordAndTuple").syntaxType;
10717
+ if (syntaxType != null) {
10718
+ const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
10719
+ if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {
10720
+ throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
10713
10721
  }
10714
10722
  }
10715
10723
  }
@@ -10867,7 +10875,7 @@ var require_lib = __commonJS({
10867
10875
  }
10868
10876
  this.next();
10869
10877
  node.right = this.parseMaybeAssign();
10870
- this.checkLVal(left, this.finishNode(node, "AssignmentExpression"));
10878
+ this.checkLVal(left, this.finishNode(node, "AssignmentExpression"), void 0, void 0, void 0, void 0, operator === "||=" || operator === "&&=" || operator === "??=");
10871
10879
  return node;
10872
10880
  } else if (ownExpressionErrors) {
10873
10881
  this.checkExpressionErrors(refExpressionErrors, true);
@@ -11337,7 +11345,7 @@ var require_lib = __commonJS({
11337
11345
  return this.parseParenAndDistinguishExpression(canBeArrow);
11338
11346
  }
11339
11347
  case 0: {
11340
- return this.parseArrayLike(3, true, false, refExpressionErrors);
11348
+ return this.parseArrayLike(3, false, refExpressionErrors);
11341
11349
  }
11342
11350
  case 5: {
11343
11351
  return this.parseObjectLike(8, false, false, refExpressionErrors);
@@ -11387,27 +11395,22 @@ var require_lib = __commonJS({
11387
11395
  if (pipeProposal) {
11388
11396
  return this.parseTopicReference(pipeProposal);
11389
11397
  }
11390
- this.unexpected();
11391
- break;
11398
+ throw this.unexpected();
11392
11399
  }
11393
11400
  case 47: {
11394
11401
  const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
11395
11402
  if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
11396
- this.expectOnePlugin(["jsx", "flow", "typescript"]);
11397
- } else {
11398
- this.unexpected();
11403
+ throw this.expectOnePlugin(["jsx", "flow", "typescript"]);
11399
11404
  }
11400
- break;
11405
+ throw this.unexpected();
11401
11406
  }
11402
11407
  default:
11403
- {
11404
- if (type === 137) {
11405
- return this.parseDecimalLiteral(this.state.value);
11406
- } else if (type === 2 || type === 1) {
11407
- return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
11408
- } else if (type === 6 || type === 7) {
11409
- return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
11410
- }
11408
+ if (type === 137) {
11409
+ return this.parseDecimalLiteral(this.state.value);
11410
+ } else if (type === 2 || type === 1) {
11411
+ return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
11412
+ } else if (type === 6 || type === 7) {
11413
+ return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
11411
11414
  }
11412
11415
  if (tokenIsIdentifier(type)) {
11413
11416
  if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) {
@@ -11425,7 +11428,7 @@ var require_lib = __commonJS({
11425
11428
  this.next();
11426
11429
  return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
11427
11430
  } else if (tokenIsIdentifier(type2)) {
11428
- if (this.lookaheadCharCode() === 61) {
11431
+ if (canBeArrow && this.lookaheadCharCode() === 61) {
11429
11432
  return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
11430
11433
  } else {
11431
11434
  return id;
@@ -11441,7 +11444,7 @@ var require_lib = __commonJS({
11441
11444
  }
11442
11445
  return id;
11443
11446
  } else {
11444
- this.unexpected();
11447
+ throw this.unexpected();
11445
11448
  }
11446
11449
  }
11447
11450
  }
@@ -11454,9 +11457,8 @@ var require_lib = __commonJS({
11454
11457
  this.state.end--;
11455
11458
  this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
11456
11459
  return this.parseTopicReference(pipeProposal);
11457
- } else {
11458
- this.unexpected();
11459
11460
  }
11461
+ throw this.unexpected();
11460
11462
  }
11461
11463
  parseTopicReference(pipeProposal) {
11462
11464
  const node = this.startNode();
@@ -11531,10 +11533,14 @@ var require_lib = __commonJS({
11531
11533
  parseSuper() {
11532
11534
  const node = this.startNode();
11533
11535
  this.next();
11534
- if (this.match(10) && !this.scope.allowDirectSuper && !(this.optionFlags & 16)) {
11535
- this.raise(Errors.SuperNotAllowed, node);
11536
- } else if (!this.scope.allowSuper && !(this.optionFlags & 16)) {
11537
- this.raise(Errors.UnexpectedSuper, node);
11536
+ if (this.match(10) && !this.scope.allowDirectSuper) {
11537
+ if (!(this.optionFlags & 16)) {
11538
+ this.raise(Errors.SuperNotAllowed, node);
11539
+ }
11540
+ } else if (!this.scope.allowSuper) {
11541
+ if (!(this.optionFlags & 16)) {
11542
+ this.raise(Errors.UnexpectedSuper, node);
11543
+ }
11538
11544
  }
11539
11545
  if (!this.match(10) && !this.match(0) && !this.match(16)) {
11540
11546
  this.raise(Errors.UnsupportedSuper, node);
@@ -11613,9 +11619,7 @@ var require_lib = __commonJS({
11613
11619
  return this.parseLiteral(value, "NumericLiteral");
11614
11620
  }
11615
11621
  parseBigIntLiteral(value) {
11616
- {
11617
- return this.parseLiteral(value, "BigIntLiteral");
11618
- }
11622
+ return this.parseLiteral(value, "BigIntLiteral");
11619
11623
  }
11620
11624
  parseDecimalLiteral(value) {
11621
11625
  return this.parseLiteral(value, "DecimalLiteral");
@@ -11835,10 +11839,8 @@ var require_lib = __commonJS({
11835
11839
  if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
11836
11840
  this.raise(Errors.InvalidRecordProperty, prop);
11837
11841
  }
11838
- {
11839
- if (prop.shorthand) {
11840
- this.addExtra(prop, "shorthand", true);
11841
- }
11842
+ if (prop.shorthand) {
11843
+ this.addExtra(prop, "shorthand", true);
11842
11844
  }
11843
11845
  node.properties.push(prop);
11844
11846
  }
@@ -12047,7 +12049,7 @@ var require_lib = __commonJS({
12047
12049
  this.scope.exit();
12048
12050
  return finishedNode;
12049
12051
  }
12050
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
12052
+ parseArrayLike(close, isTuple, refExpressionErrors) {
12051
12053
  if (isTuple) {
12052
12054
  this.expectPlugin("recordAndTuple");
12053
12055
  }
@@ -12511,100 +12513,98 @@ var require_lib = __commonJS({
12511
12513
  type
12512
12514
  } = token;
12513
12515
  if (typeof type === "number") {
12514
- {
12515
- if (type === 139) {
12516
- const {
12517
- loc,
12516
+ if (type === 139) {
12517
+ const {
12518
+ loc,
12519
+ start,
12520
+ value,
12521
+ end
12522
+ } = token;
12523
+ const hashEndPos = start + 1;
12524
+ const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
12525
+ tokens.splice(i, 1, new Token({
12526
+ type: getExportedToken(27),
12527
+ value: "#",
12528
+ start,
12529
+ end: hashEndPos,
12530
+ startLoc: loc.start,
12531
+ endLoc: hashEndLoc
12532
+ }), new Token({
12533
+ type: getExportedToken(132),
12534
+ value,
12535
+ start: hashEndPos,
12536
+ end,
12537
+ startLoc: hashEndLoc,
12538
+ endLoc: loc.end
12539
+ }));
12540
+ i++;
12541
+ continue;
12542
+ }
12543
+ if (tokenIsTemplate(type)) {
12544
+ const {
12545
+ loc,
12546
+ start,
12547
+ value,
12548
+ end
12549
+ } = token;
12550
+ const backquoteEnd = start + 1;
12551
+ const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
12552
+ let startToken;
12553
+ if (input.charCodeAt(start - startIndex) === 96) {
12554
+ startToken = new Token({
12555
+ type: getExportedToken(22),
12556
+ value: "`",
12518
12557
  start,
12519
- value,
12520
- end
12521
- } = token;
12522
- const hashEndPos = start + 1;
12523
- const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
12524
- tokens.splice(i, 1, new Token({
12525
- type: getExportedToken(27),
12526
- value: "#",
12558
+ end: backquoteEnd,
12559
+ startLoc: loc.start,
12560
+ endLoc: backquoteEndLoc
12561
+ });
12562
+ } else {
12563
+ startToken = new Token({
12564
+ type: getExportedToken(8),
12565
+ value: "}",
12527
12566
  start,
12528
- end: hashEndPos,
12567
+ end: backquoteEnd,
12529
12568
  startLoc: loc.start,
12530
- endLoc: hashEndLoc
12531
- }), new Token({
12532
- type: getExportedToken(132),
12533
- value,
12534
- start: hashEndPos,
12569
+ endLoc: backquoteEndLoc
12570
+ });
12571
+ }
12572
+ let templateValue, templateElementEnd, templateElementEndLoc, endToken;
12573
+ if (type === 24) {
12574
+ templateElementEnd = end - 1;
12575
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
12576
+ templateValue = value === null ? null : value.slice(1, -1);
12577
+ endToken = new Token({
12578
+ type: getExportedToken(22),
12579
+ value: "`",
12580
+ start: templateElementEnd,
12535
12581
  end,
12536
- startLoc: hashEndLoc,
12582
+ startLoc: templateElementEndLoc,
12537
12583
  endLoc: loc.end
12538
- }));
12539
- i++;
12540
- continue;
12541
- }
12542
- if (tokenIsTemplate(type)) {
12543
- const {
12544
- loc,
12545
- start,
12546
- value,
12547
- end
12548
- } = token;
12549
- const backquoteEnd = start + 1;
12550
- const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
12551
- let startToken;
12552
- if (input.charCodeAt(start - startIndex) === 96) {
12553
- startToken = new Token({
12554
- type: getExportedToken(22),
12555
- value: "`",
12556
- start,
12557
- end: backquoteEnd,
12558
- startLoc: loc.start,
12559
- endLoc: backquoteEndLoc
12560
- });
12561
- } else {
12562
- startToken = new Token({
12563
- type: getExportedToken(8),
12564
- value: "}",
12565
- start,
12566
- end: backquoteEnd,
12567
- startLoc: loc.start,
12568
- endLoc: backquoteEndLoc
12569
- });
12570
- }
12571
- let templateValue, templateElementEnd, templateElementEndLoc, endToken;
12572
- if (type === 24) {
12573
- templateElementEnd = end - 1;
12574
- templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
12575
- templateValue = value === null ? null : value.slice(1, -1);
12576
- endToken = new Token({
12577
- type: getExportedToken(22),
12578
- value: "`",
12579
- start: templateElementEnd,
12580
- end,
12581
- startLoc: templateElementEndLoc,
12582
- endLoc: loc.end
12583
- });
12584
- } else {
12585
- templateElementEnd = end - 2;
12586
- templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
12587
- templateValue = value === null ? null : value.slice(1, -2);
12588
- endToken = new Token({
12589
- type: getExportedToken(23),
12590
- value: "${",
12591
- start: templateElementEnd,
12592
- end,
12593
- startLoc: templateElementEndLoc,
12594
- endLoc: loc.end
12595
- });
12596
- }
12597
- tokens.splice(i, 1, startToken, new Token({
12598
- type: getExportedToken(20),
12599
- value: templateValue,
12600
- start: backquoteEnd,
12601
- end: templateElementEnd,
12602
- startLoc: backquoteEndLoc,
12603
- endLoc: templateElementEndLoc
12604
- }), endToken);
12605
- i += 2;
12606
- continue;
12584
+ });
12585
+ } else {
12586
+ templateElementEnd = end - 2;
12587
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
12588
+ templateValue = value === null ? null : value.slice(1, -2);
12589
+ endToken = new Token({
12590
+ type: getExportedToken(23),
12591
+ value: "${",
12592
+ start: templateElementEnd,
12593
+ end,
12594
+ startLoc: templateElementEndLoc,
12595
+ endLoc: loc.end
12596
+ });
12607
12597
  }
12598
+ tokens.splice(i, 1, startToken, new Token({
12599
+ type: getExportedToken(20),
12600
+ value: templateValue,
12601
+ start: backquoteEnd,
12602
+ end: templateElementEnd,
12603
+ startLoc: backquoteEndLoc,
12604
+ endLoc: templateElementEndLoc
12605
+ }), endToken);
12606
+ i += 2;
12607
+ continue;
12608
12608
  }
12609
12609
  token.type = getExportedToken(type);
12610
12610
  }
@@ -12674,9 +12674,7 @@ var require_lib = __commonJS({
12674
12674
  if (!this.isContextual(107)) {
12675
12675
  return false;
12676
12676
  }
12677
- const next = this.nextTokenInLineStart();
12678
- const nextCh = this.codePointAtPos(next);
12679
- return this.chStartsBindingIdentifier(nextCh, next);
12677
+ return this.nextTokenIsIdentifierOnSameLine();
12680
12678
  }
12681
12679
  isForUsing() {
12682
12680
  if (!this.isContextual(107)) {
@@ -12695,6 +12693,11 @@ var require_lib = __commonJS({
12695
12693
  }
12696
12694
  return false;
12697
12695
  }
12696
+ nextTokenIsIdentifierOnSameLine() {
12697
+ const next = this.nextTokenInLineStart();
12698
+ const nextCh = this.codePointAtPos(next);
12699
+ return this.chStartsBindingIdentifier(nextCh, next);
12700
+ }
12698
12701
  isAwaitUsing() {
12699
12702
  if (!this.isContextual(96)) {
12700
12703
  return false;
@@ -13832,7 +13835,7 @@ var require_lib = __commonJS({
13832
13835
  this.sawUnambiguousESM = true;
13833
13836
  return this.finishNode(node2, "ExportDefaultDeclaration");
13834
13837
  }
13835
- this.unexpected(null, 5);
13838
+ throw this.unexpected(null, 5);
13836
13839
  }
13837
13840
  eatExportStar(node) {
13838
13841
  return this.eat(55);
@@ -14321,9 +14324,7 @@ var require_lib = __commonJS({
14321
14324
  }
14322
14325
  maybeParseImportAttributes(node) {
14323
14326
  let attributes;
14324
- {
14325
- var useWith = false;
14326
- }
14327
+ var useWith = false;
14327
14328
  if (this.match(76)) {
14328
14329
  if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) {
14329
14330
  return;
@@ -14335,9 +14336,7 @@ var require_lib = __commonJS({
14335
14336
  } else {
14336
14337
  attributes = this.parseImportAttributes();
14337
14338
  }
14338
- {
14339
- useWith = true;
14340
- }
14339
+ useWith = true;
14341
14340
  } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) {
14342
14341
  if (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions")) {
14343
14342
  this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc);
@@ -14424,54 +14423,54 @@ var require_lib = __commonJS({
14424
14423
  };
14425
14424
  var Parser = class extends StatementParser {
14426
14425
  constructor(options, input, pluginsMap) {
14427
- options = getOptions(options);
14428
- super(options, input);
14429
- this.options = options;
14426
+ const normalizedOptions = getOptions(options);
14427
+ super(normalizedOptions, input);
14428
+ this.options = normalizedOptions;
14430
14429
  this.initializeScopes();
14431
14430
  this.plugins = pluginsMap;
14432
- this.filename = options.sourceFilename;
14433
- this.startIndex = options.startIndex;
14431
+ this.filename = normalizedOptions.sourceFilename;
14432
+ this.startIndex = normalizedOptions.startIndex;
14434
14433
  let optionFlags = 0;
14435
- if (options.allowAwaitOutsideFunction) {
14434
+ if (normalizedOptions.allowAwaitOutsideFunction) {
14436
14435
  optionFlags |= 1;
14437
14436
  }
14438
- if (options.allowReturnOutsideFunction) {
14437
+ if (normalizedOptions.allowReturnOutsideFunction) {
14439
14438
  optionFlags |= 2;
14440
14439
  }
14441
- if (options.allowImportExportEverywhere) {
14440
+ if (normalizedOptions.allowImportExportEverywhere) {
14442
14441
  optionFlags |= 8;
14443
14442
  }
14444
- if (options.allowSuperOutsideMethod) {
14443
+ if (normalizedOptions.allowSuperOutsideMethod) {
14445
14444
  optionFlags |= 16;
14446
14445
  }
14447
- if (options.allowUndeclaredExports) {
14446
+ if (normalizedOptions.allowUndeclaredExports) {
14448
14447
  optionFlags |= 64;
14449
14448
  }
14450
- if (options.allowNewTargetOutsideFunction) {
14449
+ if (normalizedOptions.allowNewTargetOutsideFunction) {
14451
14450
  optionFlags |= 4;
14452
14451
  }
14453
- if (options.allowYieldOutsideFunction) {
14452
+ if (normalizedOptions.allowYieldOutsideFunction) {
14454
14453
  optionFlags |= 32;
14455
14454
  }
14456
- if (options.ranges) {
14455
+ if (normalizedOptions.ranges) {
14457
14456
  optionFlags |= 128;
14458
14457
  }
14459
- if (options.tokens) {
14458
+ if (normalizedOptions.tokens) {
14460
14459
  optionFlags |= 256;
14461
14460
  }
14462
- if (options.createImportExpressions) {
14461
+ if (normalizedOptions.createImportExpressions) {
14463
14462
  optionFlags |= 512;
14464
14463
  }
14465
- if (options.createParenthesizedExpressions) {
14464
+ if (normalizedOptions.createParenthesizedExpressions) {
14466
14465
  optionFlags |= 1024;
14467
14466
  }
14468
- if (options.errorRecovery) {
14467
+ if (normalizedOptions.errorRecovery) {
14469
14468
  optionFlags |= 2048;
14470
14469
  }
14471
- if (options.attachComment) {
14470
+ if (normalizedOptions.attachComment) {
14472
14471
  optionFlags |= 4096;
14473
14472
  }
14474
- if (options.annexB) {
14473
+ if (normalizedOptions.annexB) {
14475
14474
  optionFlags |= 8192;
14476
14475
  }
14477
14476
  this.optionFlags = optionFlags;
@@ -14485,10 +14484,10 @@ var require_lib = __commonJS({
14485
14484
  const program = this.startNode();
14486
14485
  this.nextToken();
14487
14486
  file.errors = null;
14488
- this.parseTopLevel(file, program);
14489
- file.errors = this.state.errors;
14490
- file.comments.length = this.state.commentsLen;
14491
- return file;
14487
+ const result = this.parseTopLevel(file, program);
14488
+ result.errors = this.state.errors;
14489
+ result.comments.length = this.state.commentsLen;
14490
+ return result;
14492
14491
  }
14493
14492
  };
14494
14493
  function parse(input, options) {