prettier 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/node_modules/prettier/LICENSE +53 -124
- data/node_modules/prettier/doc.js +5 -5
- data/node_modules/prettier/index.cjs +1 -1
- data/node_modules/prettier/index.d.ts +5 -7
- data/node_modules/prettier/index.mjs +7854 -7334
- data/node_modules/prettier/internal/cli.mjs +18 -19
- data/node_modules/prettier/package.json +1 -2
- data/node_modules/prettier/plugins/acorn.js +1 -1
- data/node_modules/prettier/plugins/acorn.mjs +1 -1
- data/node_modules/prettier/plugins/angular.js +1 -2
- data/node_modules/prettier/plugins/angular.mjs +1 -2
- data/node_modules/prettier/plugins/babel.js +1 -1
- data/node_modules/prettier/plugins/babel.mjs +1 -1
- data/node_modules/prettier/plugins/estree.js +26 -26
- data/node_modules/prettier/plugins/estree.mjs +26 -26
- data/node_modules/prettier/plugins/flow.js +17 -17
- data/node_modules/prettier/plugins/flow.mjs +16 -16
- data/node_modules/prettier/plugins/glimmer.js +20 -20
- data/node_modules/prettier/plugins/glimmer.mjs +20 -20
- data/node_modules/prettier/plugins/markdown.js +40 -40
- data/node_modules/prettier/plugins/markdown.mjs +40 -40
- data/node_modules/prettier/plugins/meriyah.js +5 -5
- data/node_modules/prettier/plugins/meriyah.mjs +5 -5
- data/node_modules/prettier/plugins/postcss.js +1 -1
- data/node_modules/prettier/plugins/postcss.mjs +1 -1
- data/node_modules/prettier/plugins/typescript.js +20 -20
- data/node_modules/prettier/plugins/typescript.mjs +20 -20
- data/node_modules/prettier/standalone.d.ts +1 -1
- data/node_modules/prettier/standalone.js +15 -18
- data/node_modules/prettier/standalone.mjs +16 -19
- data/package.json +1 -1
- data/src/plugin.js +7 -4
- metadata +2 -3
- data/node_modules/prettier/internal/internal.mjs +0 -712
@@ -1371,23 +1371,19 @@ var require_src = __commonJS({
|
|
1371
1371
|
return void 0;
|
1372
1372
|
}
|
1373
1373
|
if (isArray) {
|
1374
|
-
|
1375
|
-
for (let row of data) {
|
1374
|
+
return data.map((row, index) => {
|
1376
1375
|
if (typeof row === "string") {
|
1377
1376
|
row = this.opts.deserialize(row);
|
1378
1377
|
}
|
1379
1378
|
if (row === void 0 || row === null) {
|
1380
|
-
|
1381
|
-
continue;
|
1379
|
+
return void 0;
|
1382
1380
|
}
|
1383
1381
|
if (typeof row.expires === "number" && Date.now() > row.expires) {
|
1384
|
-
this.delete(key).then(() => void 0);
|
1385
|
-
|
1386
|
-
} else {
|
1387
|
-
result.push(options && options.raw ? row : row.value);
|
1382
|
+
this.delete(key[index]).then(() => void 0);
|
1383
|
+
return void 0;
|
1388
1384
|
}
|
1389
|
-
|
1390
|
-
|
1385
|
+
return options && options.raw ? row : row.value;
|
1386
|
+
});
|
1391
1387
|
}
|
1392
1388
|
if (typeof data.expires === "number" && Date.now() > data.expires) {
|
1393
1389
|
return this.delete(key).then(() => void 0);
|
@@ -5408,7 +5404,8 @@ var {
|
|
5408
5404
|
getSupportInfoWithoutPlugins,
|
5409
5405
|
normalizeOptionSettings,
|
5410
5406
|
vnopts,
|
5411
|
-
fastGlob
|
5407
|
+
fastGlob,
|
5408
|
+
mockable
|
5412
5409
|
} = sharedWithCli;
|
5413
5410
|
|
5414
5411
|
// src/cli/cli-options.evaluate.js
|
@@ -6197,7 +6194,6 @@ import fs5 from "fs/promises";
|
|
6197
6194
|
import path8 from "path";
|
6198
6195
|
var import_diff = __toESM(require_create(), 1);
|
6199
6196
|
import * as prettier from "../index.mjs";
|
6200
|
-
import mockable2 from "./internal.mjs";
|
6201
6197
|
|
6202
6198
|
// src/cli/expand-patterns.js
|
6203
6199
|
import path2 from "path";
|
@@ -6252,9 +6248,13 @@ async function* expandPatternsInternal(context) {
|
|
6252
6248
|
const stat = await lstatSafe(absolutePath);
|
6253
6249
|
if (stat) {
|
6254
6250
|
if (stat.isSymbolicLink()) {
|
6255
|
-
|
6256
|
-
|
6257
|
-
|
6251
|
+
if (context.argv.errorOnUnmatchedPattern !== false) {
|
6252
|
+
yield {
|
6253
|
+
error: `Explicitly specified pattern "${pattern}" is a symbolic link.`
|
6254
|
+
};
|
6255
|
+
} else {
|
6256
|
+
context.logger.debug(`Skipping pattern "${pattern}", as it is a symbolic link.`);
|
6257
|
+
}
|
6258
6258
|
} else if (stat.isFile()) {
|
6259
6259
|
entries.push({
|
6260
6260
|
type: "file",
|
@@ -6418,7 +6418,7 @@ async function getOptionsOrDie(context, filePath) {
|
|
6418
6418
|
return options;
|
6419
6419
|
} catch (error) {
|
6420
6420
|
context.logger.error(
|
6421
|
-
`Invalid configuration for file "${filePath}":
|
6421
|
+
`Invalid configuration${filePath ? ` for file "${filePath}"` : ""}:
|
6422
6422
|
` + error.message
|
6423
6423
|
);
|
6424
6424
|
process.exit(2);
|
@@ -6465,7 +6465,6 @@ async function getOptionsForFile(context, filepath) {
|
|
6465
6465
|
var get_options_for_file_default = getOptionsForFile;
|
6466
6466
|
|
6467
6467
|
// src/cli/is-tty.js
|
6468
|
-
import mockable from "./internal.mjs";
|
6469
6468
|
function isTTY() {
|
6470
6469
|
return process.stdout.isTTY && !mockable.isCI();
|
6471
6470
|
}
|
@@ -6784,7 +6783,7 @@ _fileEntryCache = new WeakMap();
|
|
6784
6783
|
var format_results_cache_default = FormatResultsCache;
|
6785
6784
|
|
6786
6785
|
// src/cli/format.js
|
6787
|
-
var { getStdin, writeFormattedFile } =
|
6786
|
+
var { getStdin, writeFormattedFile } = mockable;
|
6788
6787
|
function diff(a, b) {
|
6789
6788
|
return (0, import_diff.createTwoFilesPatch)("", "", a, b, "", "", { context: 2 });
|
6790
6789
|
}
|
@@ -6980,7 +6979,7 @@ async function formatStdin(context) {
|
|
6980
6979
|
}
|
6981
6980
|
const options = await get_options_for_file_default(
|
6982
6981
|
context,
|
6983
|
-
filepath ? path8.resolve(
|
6982
|
+
filepath ? path8.resolve(filepath) : void 0
|
6984
6983
|
);
|
6985
6984
|
if (await listDifferent(context, input, options, "(stdin)")) {
|
6986
6985
|
return;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "prettier",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.1",
|
4
4
|
"description": "Prettier is an opinionated code formatter",
|
5
5
|
"bin": "./bin/prettier.cjs",
|
6
6
|
"repository": "prettier/prettier",
|
@@ -150,7 +150,6 @@
|
|
150
150
|
"index.d.ts",
|
151
151
|
"index.mjs",
|
152
152
|
"internal/cli.mjs",
|
153
|
-
"internal/internal.mjs",
|
154
153
|
"package.json",
|
155
154
|
"plugins/acorn.d.ts",
|
156
155
|
"plugins/acorn.js",
|
@@ -9,5 +9,5 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
9
9
|
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};v.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
10
10
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return K(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(H(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?U:H)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=K(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};v.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Be[e]),this.finishToken(t,e)};var ss="8.11.2";T.acorn={Parser:T,version:ss,defaultOptions:Re,Position:te,SourceLocation:xe,getLineInfo:lt,Node:ge,TokenType:S,tokTypes:a,keywordTypes:Be,TokContext:D,tokContexts:C,isIdentifierChar:H,isIdentifierStart:U,Token:Je,isNewLine:Q,lineBreak:R,lineBreakG:Pi,nonASCIIwhitespace:pt};var hi=Pe(Ke(),1);function hs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var be=hs;function ps(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Se=ps;var Z=Pe(Zt(),1);function bs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
11
11
|
`);return t===-1?e:e.slice(0,t)}var ei=bs;function Ss(e){let t=ei(e);t&&(e=e.slice(t.length+1));let i=(0,Z.extract)(e),{pragmas:s,comments:r}=(0,Z.parseWithComments)(i);return{shebang:t,text:e,pragmas:s,comments:r}}function ti(e){let{pragmas:t}=Ss(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function _s(e){return Array.isArray(e)&&e.length>0}var _e=_s;function P(e){var s;let t=e.range?e.range[0]:e.start,i=((s=e.declaration)==null?void 0:s.decorators)??e.decorators;return _e(i)?Math.min(P(i[0]),t):t}function j(e){return e.range?e.range[1]:e.end}function Cs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:ti,locStart:P,locEnd:j,...e}}var Ce=Cs;var Ts=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},We=Ts;function ks(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var ii=ks;var ws=ii(["Block","CommentBlock","MultiLine"]),oe=ws;function Es(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var si=Es;function As(e){let t=`*${e.value}*`.split(`
|
12
|
-
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],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:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],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"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],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","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],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","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],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:["typeParameter","typeAnnotation","nameType"],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"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","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:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],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"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=He(e[s],t);return e}let i=ni(e);for(let s=0;s<i.length;s++)e[i[s]]=He(e[i[s]],t);return t(e)||e}var Te=He;function Vs(e,t){let{parser:i,text:s}=t;if(e.type==="File"&&e.program.interpreter){let{program:{interpreter:n},comments:o}=e;delete e.program.interpreter,o.unshift(n)}if(i==="babel"){let n=new Set;e=Te(e,o=>{var u;(u=o.leadingComments)!=null&&u.some(si)&&n.add(P(o))}),e=Te(e,o=>{if(o.type==="ParenthesizedExpression"){let{expression:u}=o;if(u.type==="TypeCastExpression")return u.range=o.range,u;let h=P(o);if(!n.has(h))return u.extra={...u.extra,parenthesized:!0},u}})}if(e=Te(e,n=>{switch(n.type){case"LogicalExpression":if(oi(n))return Qe(n);break;case"VariableDeclaration":{let o=We(!1,n.declarations,-1);o!=null&&o.init&&r(n,o);break}case"TSParenthesizedType":return n.typeAnnotation;case"TSTypeParameter":if(typeof n.name=="string"){let o=P(n);n.name={type:"Identifier",name:n.name,range:[o,o+n.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:o}=n;if(i==="meriyah"&&(o==null?void 0:o.type)==="Identifier"){let u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(n.exported={...n.exported,type:"Literal",value:n.exported.name,raw:u})}break}case"TSUnionType":case"TSIntersectionType":if(n.types.length===1)return n.types[0];break}}),_e(e.comments)){let n=We(!1,e.comments,-1);for(let o=e.comments.length-2;o>=0;o--){let u=e.comments[o];j(u)===P(n)&&oe(u)&&oe(n)&&Xe(u)&&Xe(n)&&(e.comments.splice(o+1,1),u.value+="*//*"+n.value,u.range=[P(u),j(n)]),n=u}}return e.type==="Program"&&(e.range=[0,s.length]),e;function r(n,o){s[j(o)]!==";"&&(n.range=[P(n),j(o)])}}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var ke=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var we=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return be(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=we(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=Se(s)}catch({errors:[n]}){throw Os(n)}return ke(r,{text:e})}var pi=Ce(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
12
|
+
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],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:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","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:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],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"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],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","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],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","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],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:["typeParameter","typeAnnotation","nameType"],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"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","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:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],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"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=He(e[s],t);return e}let i=ni(e);for(let s=0;s<i.length;s++)e[i[s]]=He(e[i[s]],t);return t(e)||e}var Te=He;function Vs(e,t){let{parser:i,text:s}=t;if(e.type==="File"&&e.program.interpreter){let{program:{interpreter:r},comments:n}=e;delete e.program.interpreter,n.unshift(r)}if(i==="babel"){let r=new Set;e=Te(e,n=>{var o;(o=n.leadingComments)!=null&&o.some(si)&&r.add(P(n))}),e=Te(e,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=[...n.range],o;let u=P(n);if(!r.has(u))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=Te(e,r=>{var n;switch(r.type){case"LogicalExpression":if(oi(r))return Qe(r);break;case"VariableDeclaration":{let o=We(!1,r.declarations,-1);o!=null&&o.init&&s[j(o)]!==";"&&(r.range=[P(r),j(o)]);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let o=P(r);r.name={type:"Identifier",name:r.name,range:[o,o+r.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(i==="meriyah"&&((n=r.exported)==null?void 0:n.type)==="Identifier"){let{exported:o}=r,u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:u})}break;case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),_e(e.comments)){let r=We(!1,e.comments,-1);for(let n=e.comments.length-2;n>=0;n--){let o=e.comments[n];j(o)===P(r)&&oe(o)&&oe(r)&&Xe(o)&&Xe(r)&&(e.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[P(o),j(r)]),r=o}}return e.type==="Program"&&(e.range=[0,s.length]),e}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var ke=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var we=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return be(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=we(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=Se(s)}catch({errors:[n]}){throw Os(n)}return ke(r,{text:e})}var pi=Ce(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
13
13
|
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[Ze](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(et())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),et())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:be(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=we(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=Se(s)}catch({errors:[n]}){throw Ws(n)}return ke(r,{text:e})}var mi=Ce(Xs);var zs={acorn:pi,espree:mi};return _i(Hs);});
|
@@ -9,5 +9,5 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
9
9
|
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};v.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
10
10
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return K(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(H(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?U:H)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=K(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};v.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Be[e]),this.finishToken(t,e)};var ss="8.11.2";T.acorn={Parser:T,version:ss,defaultOptions:Re,Position:te,SourceLocation:me,getLineInfo:lt,Node:ye,TokenType:S,tokTypes:a,keywordTypes:Be,TokContext:D,tokContexts:C,isIdentifierChar:H,isIdentifierStart:U,Token:Je,isNewLine:Q,lineBreak:R,lineBreakG:Pi,nonASCIIwhitespace:pt};var hi=Pe(Ke(),1);function hs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var ve=hs;function ps(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var be=ps;var Z=Pe(Zt(),1);function bs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
11
11
|
`);return t===-1?e:e.slice(0,t)}var ei=bs;function Ss(e){let t=ei(e);t&&(e=e.slice(t.length+1));let i=(0,Z.extract)(e),{pragmas:s,comments:r}=(0,Z.parseWithComments)(i);return{shebang:t,text:e,pragmas:s,comments:r}}function ti(e){let{pragmas:t}=Ss(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function _s(e){return Array.isArray(e)&&e.length>0}var Se=_s;function P(e){var s;let t=e.range?e.range[0]:e.start,i=((s=e.declaration)==null?void 0:s.decorators)??e.decorators;return Se(i)?Math.min(P(i[0]),t):t}function j(e){return e.range?e.range[1]:e.end}function Cs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:ti,locStart:P,locEnd:j,...e}}var _e=Cs;var Ts=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},We=Ts;function ks(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var ii=ks;var ws=ii(["Block","CommentBlock","MultiLine"]),oe=ws;function Es(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var si=Es;function As(e){let t=`*${e.value}*`.split(`
|
12
|
-
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],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:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],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"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],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","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],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","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],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:["typeParameter","typeAnnotation","nameType"],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"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","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:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],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"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=He(e[s],t);return e}let i=ni(e);for(let s=0;s<i.length;s++)e[i[s]]=He(e[i[s]],t);return t(e)||e}var Ce=He;function Vs(e,t){let{parser:i,text:s}=t;if(e.type==="File"&&e.program.interpreter){let{program:{interpreter:n},comments:o}=e;delete e.program.interpreter,o.unshift(n)}if(i==="babel"){let n=new Set;e=Ce(e,o=>{var u;(u=o.leadingComments)!=null&&u.some(si)&&n.add(P(o))}),e=Ce(e,o=>{if(o.type==="ParenthesizedExpression"){let{expression:u}=o;if(u.type==="TypeCastExpression")return u.range=o.range,u;let h=P(o);if(!n.has(h))return u.extra={...u.extra,parenthesized:!0},u}})}if(e=Ce(e,n=>{switch(n.type){case"LogicalExpression":if(oi(n))return Qe(n);break;case"VariableDeclaration":{let o=We(!1,n.declarations,-1);o!=null&&o.init&&r(n,o);break}case"TSParenthesizedType":return n.typeAnnotation;case"TSTypeParameter":if(typeof n.name=="string"){let o=P(n);n.name={type:"Identifier",name:n.name,range:[o,o+n.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:o}=n;if(i==="meriyah"&&(o==null?void 0:o.type)==="Identifier"){let u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(n.exported={...n.exported,type:"Literal",value:n.exported.name,raw:u})}break}case"TSUnionType":case"TSIntersectionType":if(n.types.length===1)return n.types[0];break}}),Se(e.comments)){let n=We(!1,e.comments,-1);for(let o=e.comments.length-2;o>=0;o--){let u=e.comments[o];j(u)===P(n)&&oe(u)&&oe(n)&&Xe(u)&&Xe(n)&&(e.comments.splice(o+1,1),u.value+="*//*"+n.value,u.range=[P(u),j(n)]),n=u}}return e.type==="Program"&&(e.range=[0,s.length]),e;function r(n,o){s[j(o)]!==";"&&(n.range=[P(n),j(o)])}}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var Te=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var ke=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return ve(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=be(s)}catch({errors:[n]}){throw Os(n)}return Te(r,{text:e})}var pi=_e(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
12
|
+
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],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:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","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:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],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"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],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","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],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","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],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:["typeParameter","typeAnnotation","nameType"],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"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","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:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],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"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=He(e[s],t);return e}let i=ni(e);for(let s=0;s<i.length;s++)e[i[s]]=He(e[i[s]],t);return t(e)||e}var Ce=He;function Vs(e,t){let{parser:i,text:s}=t;if(e.type==="File"&&e.program.interpreter){let{program:{interpreter:r},comments:n}=e;delete e.program.interpreter,n.unshift(r)}if(i==="babel"){let r=new Set;e=Ce(e,n=>{var o;(o=n.leadingComments)!=null&&o.some(si)&&r.add(P(n))}),e=Ce(e,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=[...n.range],o;let u=P(n);if(!r.has(u))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=Ce(e,r=>{var n;switch(r.type){case"LogicalExpression":if(oi(r))return Qe(r);break;case"VariableDeclaration":{let o=We(!1,r.declarations,-1);o!=null&&o.init&&s[j(o)]!==";"&&(r.range=[P(r),j(o)]);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let o=P(r);r.name={type:"Identifier",name:r.name,range:[o,o+r.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(i==="meriyah"&&((n=r.exported)==null?void 0:n.type)==="Identifier"){let{exported:o}=r,u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:u})}break;case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),Se(e.comments)){let r=We(!1,e.comments,-1);for(let n=e.comments.length-2;n>=0;n--){let o=e.comments[n];j(o)===P(r)&&oe(o)&&oe(r)&&Xe(o)&&Xe(r)&&(e.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[P(o),j(r)]),r=o}}return e.type==="Program"&&(e.range=[0,s.length]),e}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var Te=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var ke=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return ve(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=be(s)}catch({errors:[n]}){throw Os(n)}return Te(r,{text:e})}var pi=_e(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
13
13
|
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[Ze](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(et())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),et())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:ve(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=be(s)}catch({errors:[n]}){throw Ws(n)}return Te(r,{text:e})}var mi=_e(Xs);var zs={acorn:pi,espree:mi};var ga=tt;export{ga as default,zs as parsers};
|