(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c52986d"],{1861:function(e,t,i){"use strict";function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var r,a,n,o,h;function l(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=m(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var s=0,r=function(){};return{s:r,n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,n=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return n=e.done,e},e:function(e){o=!0,a=e},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw a}}}}function c(e){return d(e)||u(e)||m(e)||p()}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return v(e)}function f(e,t){return P(e)||x(e,t)||m(e,t)||y()}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){if(e){if("string"===typeof e)return v(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i=0||(r[i]=e[i]);return r}Object.defineProperty(t,"__esModule",{value:!0});var B=L((function e(t,i,s){D(this,e),this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=i,this.index=s})),R=L((function e(t,i){D(this,e),this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=i}));function j(e,t){var i=e.line,s=e.column,r=e.index;return new B(i,s+t,r+t)}var U="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",_={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:U},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:U}},z={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},H=function(e){var t=e.type,i=e.prefix;return"UpdateExpression"===t?z.UpdateExpression[String(i)]:z[t]},V={AccessorIsGenerator:function(e){var t=e.kind;return"A ".concat(t,"ter cannot be a generator.")},ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:function(e){var t=e.kind;return"Missing initializer in ".concat(t," declaration.")},DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:function(e){var t=e.exportName;return"`".concat(t,"` has already been exported. Exported identifiers must be unique.")},DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:function(e){var t=e.phase;return"'import.".concat(t,"(...)' can only be parsed when using the 'createImportExpressions' option.")},ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:function(e){var t=e.localName,i=e.exportName;return"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '".concat(t,"' as '").concat(i,"' } from 'some-module'`?")},ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:function(e){var t=e.type;return"'".concat("ForInStatement"===t?"for-in":"for-of","' loop variable declaration may not have an initializer.")},ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:function(e){var t=e.type;return"Unsyntactic ".concat("BreakStatement"===t?"break":"continue",".")},IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:function(e){var t=e.importName;return'A string literal cannot be used as an imported binding.\n- Did you mean `import { "'.concat(t,'" as foo }`?')},ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:function(e){var t=e.maxArgumentCount;return"`import()` requires exactly ".concat(1===t?"one argument":"one or two arguments",".")},ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:function(e){var t=e.radix;return"Expected number in radix ".concat(t,".")},InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:function(e){var t=e.reservedWord;return"Escape sequence in keyword ".concat(t,".")},InvalidIdentifier:function(e){var t=e.identifierName;return"Invalid identifier ".concat(t,".")},InvalidLhs:function(e){var t=e.ancestor;return"Invalid left-hand side in ".concat(H(t),".")},InvalidLhsBinding:function(e){var t=e.ancestor;return"Binding invalid left-hand side in ".concat(H(t),".")},InvalidLhsOptionalChaining:function(e){var t=e.ancestor;return"Invalid optional chaining in the left-hand side of ".concat(H(t),".")},InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:function(e){var t=e.unexpected;return"Unexpected character '".concat(t,"'.")},InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:function(e){var t=e.identifierName;return"Private name #".concat(t," is not defined.")},InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:function(e){var t=e.labelName;return"Label '".concat(t,"' is already declared.")},LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:function(e){var t=e.missingPlugin;return"This experimental syntax requires enabling the parser plugin: ".concat(t.map((function(e){return JSON.stringify(e)})).join(", "),".")},MissingOneOfPlugins:function(e){var t=e.missingPlugin;return"This experimental syntax requires enabling one of the following parser plugin(s): ".concat(t.map((function(e){return JSON.stringify(e)})).join(", "),".")},MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:function(e){var t=e.key;return'Duplicate key "'.concat(t,'" is not allowed in module attributes.')},ModuleExportNameHasLoneSurrogate:function(e){var t=e.surrogateCharCode;return"An export name cannot include a lone surrogate, found '\\u".concat(t.toString(16),"'.")},ModuleExportUndefined:function(e){var t=e.localName;return"Export '".concat(t,"' is not defined.")},MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:function(e){var t=e.identifierName;return"Private names are only allowed in property accesses (`obj.#".concat(t,"`) or in `in` expressions (`#").concat(t," in obj`).")},PrivateNameRedeclaration:function(e){var t=e.identifierName;return"Duplicate private name #".concat(t,".")},RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:function(e){var t=e.keyword;return"Unexpected keyword '".concat(t,"'.")},UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:function(e){var t=e.reservedWord;return"Unexpected reserved word '".concat(t,"'.")},UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:function(e){var t=e.expected,i=e.unexpected;return"Unexpected token".concat(i?" '".concat(i,"'."):"").concat(t?', expected "'.concat(t,'"'):"")},UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:function(e){var t=e.target,i=e.onlyValidPropertyName;return"The only valid meta property for ".concat(t," is ").concat(t,".").concat(i,".")},UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:function(e){var t=e.identifierName;return"Identifier '".concat(t,"' has already been declared.")},YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},q={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:function(e){var t=e.referenceName;return"Assigning to '".concat(t,"' in strict mode.")},StrictEvalArgumentsBinding:function(e){var t=e.bindingName;return"Binding '".concat(t,"' in strict mode.")},StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},K=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),J={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:function(e){var t=e.token;return"Invalid topic token ".concat(t,". In order to use ").concat(t,' as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "').concat(t,'" }.')},PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:function(e){var t=e.type;return"Hack-style pipe body cannot be an unparenthesized ".concat(H({type:t}),"; please wrap it in parentheses.")},PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},W=["toMessage"],X=["message"];function G(e,t,i){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:i})}function Y(e){var t=e.toMessage,i=F(e,W);return function e(s){var r=s.loc,a=s.details,n=new SyntaxError;return Object.assign(n,i,{loc:r,pos:r.index}),"missingPlugin"in a&&Object.assign(n,{missingPlugin:a.missingPlugin}),G(n,"clone",(function(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=null!=(t=i.loc)?t:r,n=s.line,o=s.column,h=s.index;return e({loc:new B(n,o,h),details:Object.assign({},a,i.details)})})),G(n,"details",a),Object.defineProperty(n,"message",{configurable:!0,get:function(){var e="".concat(t(a)," (").concat(r.line,":").concat(r.column,")");return this.message=e,e},set:function(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),n}}function $(e,t){if(Array.isArray(e))return function(t){return $(t,e[0])};for(var i={},s=function(){var s=a[r],n=e[s],o="string"===typeof n?{message:function(){return n}}:"function"===typeof n?{message:n}:n,h=o.message,l=F(o,X),c="string"===typeof h?function(){return h}:h;i[s]=Y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:c},t?{syntaxPlugin:t}:{},l))},r=0,a=Object.keys(e);r2&&void 0!==arguments[2]&&arguments[2];g(C(i.prototype),"parseFunctionBody",this).call(this,e,t,s),e.expression="BlockStatement"!==e.body.type}},{key:"parseMethod",value:function(e,t,s,r,a,n){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],h=this.startNode();return h.kind=e.kind,h=g(C(i.prototype),"parseMethod",this).call(this,h,t,s,r,a,n,o),h.type="FunctionExpression",delete h.kind,e.value=h,"ClassPrivateMethod"===n&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}},{key:"parseClassProperty",value:function(){for(var e,t=arguments.length,s=new Array(t),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(null!=e&&this.isObjectProperty(e)){var s=e.key,r=e.value;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(r,t)}else g(C(i.prototype),"toAssignable",this).call(this,e,t)}},{key:"toAssignableObjectExpressionProp",value:function(e,t,s){"get"===e.kind||"set"===e.kind?this.raise(Q.PatternHasAccessor,{at:e.key}):e.method?this.raise(Q.PatternHasMethod,{at:e.key}):g(C(i.prototype),"toAssignableObjectExpressionProp",this).call(this,e,t,s)}},{key:"finishCallExpression",value:function(e,t){var s=g(C(i.prototype),"finishCallExpression",this).call(this,e,t);if("Import"===s.callee.type){var r,a;if(s.type="ImportExpression",s.source=s.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))s.options=null!=(r=s.arguments[1])?r:null,s.attributes=null!=(a=s.arguments[1])?a:null;delete s.arguments,delete s.callee}return s}},{key:"toReferencedArguments",value:function(e){"ImportExpression"!==e.type&&g(C(i.prototype),"toReferencedArguments",this).call(this,e)}},{key:"parseExport",value:function(e,t){var s=this.state.lastTokStartLoc,r=g(C(i.prototype),"parseExport",this).call(this,e,t);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":1===r.specifiers.length&&"ExportNamespaceSpecifier"===r.specifiers[0].type&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":var a,n=r.declaration;"ClassDeclaration"===(null==n?void 0:n.type)&&(null==(a=n.decorators)?void 0:a.length)>0&&n.start===r.start&&this.resetStartLocation(r,s);break}return r}},{key:"parseSubscript",value:function(e,t,s,r){var a=g(C(i.prototype),"parseSubscript",this).call(this,e,t,s,r);if(r.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),r.stop){var n=this.startNodeAtNode(a);return n.expression=a,this.finishNode(n,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}},{key:"isOptionalMemberExpression",value:function(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:g(C(i.prototype),"isOptionalMemberExpression",this).call(this,e)}},{key:"hasPropertyAsPrivateName",value:function(e){return"ChainExpression"===e.type&&(e=e.expression),g(C(i.prototype),"hasPropertyAsPrivateName",this).call(this,e)}},{key:"isObjectProperty",value:function(e){return"Property"===e.type&&"init"===e.kind&&!e.method}},{key:"isObjectMethod",value:function(e){return e.method||"get"===e.kind||"set"===e.kind}},{key:"finishNodeAt",value:function(e,t,s){return te(g(C(i.prototype),"finishNodeAt",this).call(this,e,t,s))}},{key:"resetStartLocation",value:function(e,t){g(C(i.prototype),"resetStartLocation",this).call(this,e,t),te(e)}},{key:"resetEndLocation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.lastTokEndLoc;g(C(i.prototype),"resetEndLocation",this).call(this,e,t),te(e)}}]),i}(e)},se=L((function e(t,i){D(this,e),this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!i})),re={brace:new se("{"),j_oTag:new se("...",!0)};re.template=new se("`",!0);var ae=!0,ne=!0,oe=!0,he=!0,le=!0,ce=!0,pe=L((function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.rightAssociative=!!i.rightAssociative,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=null!=i.binop?i.binop:null,this.updateContext=null})),ue=new Map;function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.keyword=e;var i=be(e,t);return ue.set(e,i),i}function fe(e,t){return be(e,{beforeExpr:ae,binop:t})}var ye=-1,me=[],ve=[],xe=[],Pe=[],ge=[],ke=[];function be(e){var t,i,s,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return++ye,ve.push(e),xe.push(null!=(t=a.binop)?t:-1),Pe.push(null!=(i=a.beforeExpr)&&i),ge.push(null!=(s=a.startsExpr)&&s),ke.push(null!=(r=a.prefix)&&r),me.push(new pe(e,a)),ye}function Te(e){var t,i,s,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return++ye,ue.set(e,ye),ve.push(e),xe.push(null!=(t=a.binop)?t:-1),Pe.push(null!=(i=a.beforeExpr)&&i),ge.push(null!=(s=a.startsExpr)&&s),ke.push(null!=(r=a.prefix)&&r),me.push(new pe("name",a)),ye}var Ae={bracketL:be("[",{beforeExpr:ae,startsExpr:ne}),bracketHashL:be("#[",{beforeExpr:ae,startsExpr:ne}),bracketBarL:be("[|",{beforeExpr:ae,startsExpr:ne}),bracketR:be("]"),bracketBarR:be("|]"),braceL:be("{",{beforeExpr:ae,startsExpr:ne}),braceBarL:be("{|",{beforeExpr:ae,startsExpr:ne}),braceHashL:be("#{",{beforeExpr:ae,startsExpr:ne}),braceR:be("}"),braceBarR:be("|}"),parenL:be("(",{beforeExpr:ae,startsExpr:ne}),parenR:be(")"),comma:be(",",{beforeExpr:ae}),semi:be(";",{beforeExpr:ae}),colon:be(":",{beforeExpr:ae}),doubleColon:be("::",{beforeExpr:ae}),dot:be("."),question:be("?",{beforeExpr:ae}),questionDot:be("?."),arrow:be("=>",{beforeExpr:ae}),template:be("template"),ellipsis:be("...",{beforeExpr:ae}),backQuote:be("`",{startsExpr:ne}),dollarBraceL:be("${",{beforeExpr:ae,startsExpr:ne}),templateTail:be("...`",{startsExpr:ne}),templateNonTail:be("...${",{beforeExpr:ae,startsExpr:ne}),at:be("@"),hash:be("#",{startsExpr:ne}),interpreterDirective:be("#!..."),eq:be("=",{beforeExpr:ae,isAssign:he}),assign:be("_=",{beforeExpr:ae,isAssign:he}),slashAssign:be("_=",{beforeExpr:ae,isAssign:he}),xorAssign:be("_=",{beforeExpr:ae,isAssign:he}),moduloAssign:be("_=",{beforeExpr:ae,isAssign:he}),incDec:be("++/--",{prefix:le,postfix:ce,startsExpr:ne}),bang:be("!",{beforeExpr:ae,prefix:le,startsExpr:ne}),tilde:be("~",{beforeExpr:ae,prefix:le,startsExpr:ne}),doubleCaret:be("^^",{startsExpr:ne}),doubleAt:be("@@",{startsExpr:ne}),pipeline:fe("|>",0),nullishCoalescing:fe("??",1),logicalOR:fe("||",1),logicalAND:fe("&&",2),bitwiseOR:fe("|",3),bitwiseXOR:fe("^",4),bitwiseAND:fe("&",5),equality:fe("==/!=/===/!==",6),lt:fe("/<=/>=",7),gt:fe("/<=/>=",7),relational:fe("/<=/>=",7),bitShift:fe("<>/>>>",8),bitShiftL:fe("<>/>>>",8),bitShiftR:fe("<>/>>>",8),plusMin:be("+/-",{beforeExpr:ae,binop:9,prefix:le,startsExpr:ne}),modulo:be("%",{binop:10,startsExpr:ne}),star:be("*",{binop:10}),slash:fe("/",10),exponent:be("**",{beforeExpr:ae,binop:11,rightAssociative:!0}),_in:de("in",{beforeExpr:ae,binop:7}),_instanceof:de("instanceof",{beforeExpr:ae,binop:7}),_break:de("break"),_case:de("case",{beforeExpr:ae}),_catch:de("catch"),_continue:de("continue"),_debugger:de("debugger"),_default:de("default",{beforeExpr:ae}),_else:de("else",{beforeExpr:ae}),_finally:de("finally"),_function:de("function",{startsExpr:ne}),_if:de("if"),_return:de("return",{beforeExpr:ae}),_switch:de("switch"),_throw:de("throw",{beforeExpr:ae,prefix:le,startsExpr:ne}),_try:de("try"),_var:de("var"),_const:de("const"),_with:de("with"),_new:de("new",{beforeExpr:ae,startsExpr:ne}),_this:de("this",{startsExpr:ne}),_super:de("super",{startsExpr:ne}),_class:de("class",{startsExpr:ne}),_extends:de("extends",{beforeExpr:ae}),_export:de("export"),_import:de("import",{startsExpr:ne}),_null:de("null",{startsExpr:ne}),_true:de("true",{startsExpr:ne}),_false:de("false",{startsExpr:ne}),_typeof:de("typeof",{beforeExpr:ae,prefix:le,startsExpr:ne}),_void:de("void",{beforeExpr:ae,prefix:le,startsExpr:ne}),_delete:de("delete",{beforeExpr:ae,prefix:le,startsExpr:ne}),_do:de("do",{isLoop:oe,beforeExpr:ae}),_for:de("for",{isLoop:oe}),_while:de("while",{isLoop:oe}),_as:Te("as",{startsExpr:ne}),_assert:Te("assert",{startsExpr:ne}),_async:Te("async",{startsExpr:ne}),_await:Te("await",{startsExpr:ne}),_defer:Te("defer",{startsExpr:ne}),_from:Te("from",{startsExpr:ne}),_get:Te("get",{startsExpr:ne}),_let:Te("let",{startsExpr:ne}),_meta:Te("meta",{startsExpr:ne}),_of:Te("of",{startsExpr:ne}),_sent:Te("sent",{startsExpr:ne}),_set:Te("set",{startsExpr:ne}),_source:Te("source",{startsExpr:ne}),_static:Te("static",{startsExpr:ne}),_using:Te("using",{startsExpr:ne}),_yield:Te("yield",{startsExpr:ne}),_asserts:Te("asserts",{startsExpr:ne}),_checks:Te("checks",{startsExpr:ne}),_exports:Te("exports",{startsExpr:ne}),_global:Te("global",{startsExpr:ne}),_implements:Te("implements",{startsExpr:ne}),_intrinsic:Te("intrinsic",{startsExpr:ne}),_infer:Te("infer",{startsExpr:ne}),_is:Te("is",{startsExpr:ne}),_mixins:Te("mixins",{startsExpr:ne}),_proto:Te("proto",{startsExpr:ne}),_require:Te("require",{startsExpr:ne}),_satisfies:Te("satisfies",{startsExpr:ne}),_keyof:Te("keyof",{startsExpr:ne}),_readonly:Te("readonly",{startsExpr:ne}),_unique:Te("unique",{startsExpr:ne}),_abstract:Te("abstract",{startsExpr:ne}),_declare:Te("declare",{startsExpr:ne}),_enum:Te("enum",{startsExpr:ne}),_module:Te("module",{startsExpr:ne}),_namespace:Te("namespace",{startsExpr:ne}),_interface:Te("interface",{startsExpr:ne}),_type:Te("type",{startsExpr:ne}),_opaque:Te("opaque",{startsExpr:ne}),name:be("name",{startsExpr:ne}),string:be("string",{startsExpr:ne}),num:be("num",{startsExpr:ne}),bigint:be("bigint",{startsExpr:ne}),decimal:be("decimal",{startsExpr:ne}),regexp:be("regexp",{startsExpr:ne}),privateName:be("#name",{startsExpr:ne}),eof:be("eof"),jsxName:be("jsxName"),jsxText:be("jsxText",{beforeExpr:!0}),jsxTagStart:be("jsxTagStart",{startsExpr:!0}),jsxTagEnd:be("jsxTagEnd"),placeholder:be("%%",{startsExpr:!0})};function we(e){return e>=93&&e<=132}function Ee(e){return e<=92}function Se(e){return e>=58&&e<=132}function Ce(e){return e>=58&&e<=136}function Ie(e){return Pe[e]}function Ne(e){return ge[e]}function Le(e){return e>=29&&e<=33}function Me(e){return e>=129&&e<=131}function Oe(e){return e>=90&&e<=92}function De(e){return e>=58&&e<=92}function Fe(e){return e>=39&&e<=59}function Be(e){return 34===e}function Re(e){return ke[e]}function je(e){return e>=121&&e<=123}function Ue(e){return e>=124&&e<=130}function _e(e){return ve[e]}function ze(e){return xe[e]}function He(e){return 57===e}function Ve(e){return e>=24&&e<=25}function qe(e){return me[e]}me[8].updateContext=function(e){e.pop()},me[5].updateContext=me[7].updateContext=me[23].updateContext=function(e){e.push(re.brace)},me[22].updateContext=function(e){e[e.length-1]===re.template?e.pop():e.push(re.template)},me[142].updateContext=function(e){e.push(re.j_expr,re.j_oTag)};var Ke="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Je="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",We=new RegExp("["+Ke+"]"),Xe=new RegExp("["+Ke+Je+"]");Ke=Je=null;var Ge=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ye=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function $e(e,t){for(var i=65536,s=0,r=t.length;se)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function Qe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&We.test(String.fromCharCode(e)):$e(e,Ge)))}function Ze(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Xe.test(String.fromCharCode(e)):$e(e,Ge)||$e(e,Ye))))}var et={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},tt=new Set(et.keyword),it=new Set(et.strict),st=new Set(et.strictBind);function rt(e,t){return t&&"await"===e||"enum"===e}function at(e,t){return rt(e,t)||it.has(e)}function nt(e){return st.has(e)}function ot(e,t){return at(e,t)||nt(e)}function ht(e){return tt.has(e)}function lt(e,t,i){return 64===e&&64===t&&Qe(i)}var ct=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function pt(e){return ct.has(e)}var ut=L((function e(t){D(this,e),this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t})),dt=function(){function e(t,i){D(this,e),this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=i}return L(e,[{key:"inTopLevel",get:function(){return(1&this.currentScope().flags)>0}},{key:"inFunction",get:function(){return(2&this.currentVarScopeFlags())>0}},{key:"allowSuper",get:function(){return(16&this.currentThisScopeFlags())>0}},{key:"allowDirectSuper",get:function(){return(32&this.currentThisScopeFlags())>0}},{key:"inClass",get:function(){return(64&this.currentThisScopeFlags())>0}},{key:"inClassAndNotInNonArrowFunction",get:function(){var e=this.currentThisScopeFlags();return(64&e)>0&&0===(2&e)}},{key:"inStaticBlock",get:function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e].flags;if(128&t)return!0;if(451&t)return!1}}},{key:"inNonArrowFunction",get:function(){return(2&this.currentThisScopeFlags())>0}},{key:"treatFunctionsAsVar",get:function(){return this.treatFunctionsAsVarInScope(this.currentScope())}},{key:"createScope",value:function(e){return new ut(e)}},{key:"enter",value:function(e){this.scopeStack.push(this.createScope(e))}},{key:"exit",value:function(){var e=this.scopeStack.pop();return e.flags}},{key:"treatFunctionsAsVarInScope",value:function(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}},{key:"declareName",value:function(e,t,i){var s=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(s,e,t,i),16&t?s.functions.add(e):s.lexical.add(e),8&t&&this.maybeExportDefined(s,e);else if(4&t)for(var r=this.scopeStack.length-1;r>=0;--r)if(s=this.scopeStack[r],this.checkRedeclarationInScope(s,e,t,i),s.var.add(e),this.maybeExportDefined(s,e),387&s.flags)break;this.parser.inModule&&1&s.flags&&this.undefinedExports.delete(e)}},{key:"maybeExportDefined",value:function(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}},{key:"checkRedeclarationInScope",value:function(e,t,i,s){this.isRedeclaredInScope(e,t,i)&&this.parser.raise(Q.VarRedeclaration,{at:s,identifierName:t})}},{key:"isRedeclaredInScope",value:function(e,t,i){return!!(1&i)&&(8&i?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&i?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}},{key:"checkLocalExport",value:function(e){var t=e.name,i=this.scopeStack[0];i.lexical.has(t)||i.var.has(t)||i.functions.has(t)||this.undefinedExports.set(t,e.loc.start)}},{key:"currentScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"currentVarScopeFlags",value:function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e].flags;if(387&t)return t}}},{key:"currentThisScopeFlags",value:function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e].flags;if(451&t&&!(4&t))return t}}}]),e}(),ft=function(e){b(i,e);var t=A(i);function i(){var e;D(this,i);for(var s=arguments.length,r=new Array(s),a=0;a0)s=t[--r];null===s||s.start>i.start?Pt(e,i.comments):vt(s,i.comments)}var kt=function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"addComment",value:function(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}},{key:"processComment",value:function(e){var t=this.state.commentStack,i=t.length;if(0!==i){var s=i-1,r=t[s];r.start===e.end&&(r.leadingNode=e,s--);for(var a=e.start;s>=0;s--){var n=t[s],o=n.end;if(!(o>a)){o===a&&(n.trailingNode=e);break}n.containingNode=e,this.finalizeComment(n),t.splice(s,1)}}}},{key:"finalizeComment",value:function(e){var t=e.comments;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&vt(e.leadingNode,t),null!==e.trailingNode&&xt(e.trailingNode,t);else{var i=e.containingNode,s=e.start;if(44===this.input.charCodeAt(s-1))switch(i.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":gt(i,i.properties,e);break;case"CallExpression":case"OptionalCallExpression":gt(i,i.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":gt(i,i.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":gt(i,i.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":gt(i,i.specifiers,e);break;default:Pt(i,t)}else Pt(i,t)}}},{key:"finalizeRemainingComments",value:function(){for(var e=this.state.commentStack,t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}},{key:"resetPreviousNodeTrailingComments",value:function(e){var t=this.state.commentStack,i=t.length;if(0!==i){var s=t[i-1];s.leadingNode===e&&(s.leadingNode=null)}}},{key:"resetPreviousIdentifierLeadingComments",value:function(e){var t=this.state.commentStack,i=t.length;0!==i&&(t[i-1].trailingNode===e?t[i-1].trailingNode=null:i>=2&&t[i-2].trailingNode===e&&(t[i-2].trailingNode=null))}},{key:"takeSurroundingComments",value:function(e,t,i){var s=this.state.commentStack,r=s.length;if(0!==r)for(var a=r-1;a>=0;a--){var n=s[a],o=n.end,h=n.start;if(h===i)n.leadingNode=e;else if(o===t)n.trailingNode=e;else if(o=48&&e<=57},Lt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Mt={bin:function(e){return 48===e||49===e},oct:function(e){return e>=48&&e<=55},dec:function(e){return e>=48&&e<=57},hex:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}};function Ot(e,t,i,s,r,a){for(var n=i,o=s,h=r,l="",c=null,p=i,u=t.length;;){if(i>=u){a.unterminated(n,o,h),l+=t.slice(p,i);break}var d=t.charCodeAt(i);if(Dt(e,d,t,i)){l+=t.slice(p,i);break}if(92===d){l+=t.slice(p,i);var f=Ft(t,i,s,r,"template"===e,a);null!==f.ch||c?l+=f.ch:c={pos:i,lineStart:s,curLine:r},i=f.pos,s=f.lineStart,r=f.curLine,p=i}else 8232===d||8233===d?(++i,++r,s=i):10===d||13===d?"template"===e?(l+=t.slice(p,i)+"\n",++i,13===d&&10===t.charCodeAt(i)&&++i,++r,p=s=i):a.unterminated(n,o,h):++i}return{pos:i,str:l,firstInvalidLoc:c,lineStart:s,curLine:r,containsInvalid:!!c}}function Dt(e,t,i,s){return"template"===e?96===t||36===t&&123===i.charCodeAt(s+1):t===("double"===e?34:39)}function Ft(e,t,i,s,r,a){var n=!r;t++;var o=function(e){return{pos:t,ch:e,lineStart:i,curLine:s}},h=e.charCodeAt(t++);switch(h){case 110:return o("\n");case 114:return o("\r");case 120:var l,c=Bt(e,t,i,s,2,!1,n,a);return l=c.code,t=c.pos,o(null===l?null:String.fromCharCode(l));case 117:var p,u=jt(e,t,i,s,n,a);return p=u.code,t=u.pos,o(null===p?null:String.fromCodePoint(p));case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:i=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(t-1,i,s);default:if(h>=48&&h<=55){var d=t-1,f=e.slice(d,t+2).match(/^[0-7]+/),y=f[0],m=parseInt(y,8);m>255&&(y=y.slice(0,-1),m=parseInt(y,8)),t+=y.length-1;var v=e.charCodeAt(t);if("0"!==y||56===v||57===v){if(r)return o(null);a.strictNumericEscape(d,i,s)}return o(String.fromCharCode(m))}return o(String.fromCharCode(h))}}function Bt(e,t,i,s,r,a,n,o){var h,l=t,c=Rt(e,t,i,s,16,r,a,!1,o,!n);return h=c.n,t=c.pos,null===h&&(n?o.invalidEscapeSequence(l,i,s):t=l-1),{code:h,pos:t}}function Rt(e,t,i,s,r,a,n,o,h,l){for(var c=t,p=16===r?Lt.hex:Lt.decBinOct,u=16===r?Mt.hex:10===r?Mt.dec:8===r?Mt.oct:Mt.bin,d=!1,f=0,y=0,m=null==a?1/0:a;y=97?v-97+10:v>=65?v-65+10:Nt(v)?v-48:1/0,x>=r){if(x<=9&&l)return{n:null,pos:t};if(x<=9&&h.invalidDigit(t,i,s,r))x=0;else{if(!n)break;x=0,d=!0}}++t,f=f*r+x}else{var P=e.charCodeAt(t-1),g=e.charCodeAt(t+1);if(o){if(Number.isNaN(g)||!u(g)||p.has(P)||p.has(g)){if(l)return{n:null,pos:t};h.unexpectedNumericSeparator(t,i,s)}}else{if(l)return{n:null,pos:t};h.numericSeparatorInEscapeSequence(t,i,s)}++t}}return t===c||null!=a&&t-c!==a||d?{n:null,pos:t}:{n:f,pos:t}}function jt(e,t,i,s,r,a){var n,o=e.charCodeAt(t);if(123===o){++t;var h=Bt(e,t,i,s,e.indexOf("}",t)-t,!0,r,a);if(n=h.code,t=h.pos,++t,null!==n&&n>1114111){if(!r)return{code:null,pos:t};a.invalidCodePoint(t,i,s)}}else{var l=Bt(e,t,i,s,4,!1,r,a);n=l.code,t=l.pos}return{code:n,pos:t}}var Ut=["at"],_t=["at"];function zt(e,t,i){return new B(i,e-t,e)}var Ht=new Set([103,109,115,105,121,117,100,118]),Vt=L((function e(t){D(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new R(t.startLoc,t.endLoc)})),qt=function(e){b(i,e);var t=A(i);function i(e,s){var r;return D(this,i),r=t.call(this),r.isLookahead=void 0,r.tokens=[],r.errorHandlers_readInt={invalidDigit:function(e,t,i,s){return!!r.options.errorRecovery&&(r.raise(Q.InvalidDigit,{at:zt(e,t,i),radix:s}),!0)},numericSeparatorInEscapeSequence:r.errorBuilder(Q.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:r.errorBuilder(Q.UnexpectedNumericSeparator)},r.errorHandlers_readCodePoint=Object.assign({},r.errorHandlers_readInt,{invalidEscapeSequence:r.errorBuilder(Q.InvalidEscapeSequence),invalidCodePoint:r.errorBuilder(Q.InvalidCodePoint)}),r.errorHandlers_readStringContents_string=Object.assign({},r.errorHandlers_readCodePoint,{strictNumericEscape:function(e,t,i){r.recordStrictModeErrors(Q.StrictNumericEscape,{at:zt(e,t,i)})},unterminated:function(e,t,i){throw r.raise(Q.UnterminatedString,{at:zt(e-1,t,i)})}}),r.errorHandlers_readStringContents_template=Object.assign({},r.errorHandlers_readCodePoint,{strictNumericEscape:r.errorBuilder(Q.StrictNumericEscape),unterminated:function(e,t,i){throw r.raise(Q.UnterminatedTemplate,{at:zt(e,t,i)})}}),r.state=new It,r.state.init(e),r.input=s,r.length=s.length,r.isLookahead=!1,r}return L(i,[{key:"pushToken",value:function(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}},{key:"next",value:function(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Vt(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}},{key:"eat",value:function(e){return!!this.match(e)&&(this.next(),!0)}},{key:"match",value:function(e){return this.state.type===e}},{key:"createLookaheadState",value:function(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}},{key:"lookahead",value:function(){var e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;var t=this.state;return this.state=e,t}},{key:"nextTokenStart",value:function(){return this.nextTokenStartSince(this.state.pos)}},{key:"nextTokenStartSince",value:function(e){return wt.lastIndex=e,wt.test(this.input)?wt.lastIndex:e}},{key:"lookaheadCharCode",value:function(){return this.input.charCodeAt(this.nextTokenStart())}},{key:"nextTokenInLineStart",value:function(){return this.nextTokenInLineStartSince(this.state.pos)}},{key:"nextTokenInLineStartSince",value:function(e){return Et.lastIndex=e,Et.test(this.input)?Et.lastIndex:e}},{key:"lookaheadInLineCharCode",value:function(){return this.input.charCodeAt(this.nextTokenInLineStart())}},{key:"codePointAtPos",value:function(e){var t=this.input.charCodeAt(e);if(55296===(64512&t)&&++e=this.length?this.finishToken(139):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}},{key:"skipBlockComment",value:function(e){var t;this.isLookahead||(t=this.state.curPosition());var i=this.state.pos,s=this.input.indexOf(e,i+2);if(-1===s)throw this.raise(Q.UnterminatedComment,{at:this.state.curPosition()});this.state.pos=s+e.length,Tt.lastIndex=i+2;while(Tt.test(this.input)&&Tt.lastIndex<=s)++this.state.curLine,this.state.lineStart=Tt.lastIndex;if(!this.isLookahead){var r={type:"CommentBlock",value:this.input.slice(i+2,s),start:i,end:s+e.length,loc:new R(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}}},{key:"skipLineComment",value:function(e){var t,i=this.state.pos;this.isLookahead||(t=this.state.curPosition());var s=this.input.charCodeAt(this.state.pos+=e);if(this.state.pose))break e;var n=this.skipLineComment(3);void 0!==n&&(this.addComment(n),this.options.attachComment&&t.push(n))}else{if(60!==i||this.inModule||!this.options.annexB)break e;var o=this.state.pos;if(33!==this.input.charCodeAt(o+1)||45!==this.input.charCodeAt(o+2)||45!==this.input.charCodeAt(o+3))break e;var h=this.skipLineComment(4);void 0!==h&&(this.addComment(h),this.options.attachComment&&t.push(h))}}}if(t.length>0){var l=this.state.pos,c={start:e,end:l,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(c)}}},{key:"finishToken",value:function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var i=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(i)}},{key:"replaceToken",value:function(e){this.state.type=e,this.updateContext()}},{key:"readToken_numberSign",value:function(){if(0!==this.state.pos||!this.readToken_interpreter()){var e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(Q.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?Q.RecordExpressionHashIncorrectStartSyntaxType:Q.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else Qe(t)?(++this.state.pos,this.finishToken(138,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}},{key:"readToken_slash",value:function(){var e=this.input.charCodeAt(this.state.pos+1);61===e?this.finishOp(31,2):this.finishOp(56,1)}},{key:"readToken_interpreter",value:function(){if(0!==this.state.pos||this.length<2)return!1;var e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;var t=this.state.pos;this.state.pos+=1;while(!At(e)&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}},{key:"getTokenFromCode",value:function(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(Q.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(Q.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(Qe(e))return void this.readWord(e)}throw this.raise(Q.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}},{key:"finishOp",value:function(e,t){var i=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,i)}},{key:"readRegexp",value:function(){for(var e,t,i=this.state.startLoc,s=this.state.start+1,r=this.state.pos;;++r){if(r>=this.length)throw this.raise(Q.UnterminatedRegExp,{at:j(i,1)});var a=this.input.charCodeAt(r);if(At(a))throw this.raise(Q.UnterminatedRegExp,{at:j(i,1)});if(e)e=!1;else{if(91===a)t=!0;else if(93===a&&t)t=!1;else if(47===a&&!t)break;e=92===a}}var n=this.input.slice(s,r);++r;var o="",h=function(){return j(i,r+2-s)};while(r2&&void 0!==arguments[2]&&arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=Rt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,i,s,this.errorHandlers_readInt,!1),a=r.n,n=r.pos;return this.state.pos=n,a}},{key:"readRadixNumber",value:function(e){var t=this.state.curPosition(),i=!1;this.state.pos+=2;var s=this.readInt(e);null==s&&this.raise(Q.InvalidDigit,{at:j(t,2),radix:e});var r=this.input.charCodeAt(this.state.pos);if(110===r)++this.state.pos,i=!0;else if(109===r)throw this.raise(Q.InvalidDecimal,{at:t});if(Qe(this.codePointAtPos(this.state.pos)))throw this.raise(Q.NumberIdentifier,{at:this.state.curPosition()});if(i){var a=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,a)}else this.finishToken(134,s)}},{key:"readNumber",value:function(e){var t=this.state.pos,i=this.state.curPosition(),s=!1,r=!1,a=!1,n=!1,o=!1;e||null!==this.readInt(10)||this.raise(Q.InvalidNumber,{at:this.state.curPosition()});var h=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(h){var l=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(Q.StrictOctalLiteral,{at:i}),!this.state.strict){var c=l.indexOf("_");c>0&&this.raise(Q.ZeroDigitNumericSeparator,{at:j(i,c)})}o=h&&!/[89]/.test(l)}var p=this.input.charCodeAt(this.state.pos);if(46!==p||o||(++this.state.pos,this.readInt(10),s=!0,p=this.input.charCodeAt(this.state.pos)),69!==p&&101!==p||o||(p=this.input.charCodeAt(++this.state.pos),43!==p&&45!==p||++this.state.pos,null===this.readInt(10)&&this.raise(Q.InvalidOrMissingExponent,{at:i}),s=!0,n=!0,p=this.input.charCodeAt(this.state.pos)),110===p&&((s||h)&&this.raise(Q.InvalidBigIntLiteral,{at:i}),++this.state.pos,r=!0),109===p&&(this.expectPlugin("decimal",this.state.curPosition()),(n||h)&&this.raise(Q.InvalidDecimal,{at:i}),++this.state.pos,a=!0),Qe(this.codePointAtPos(this.state.pos)))throw this.raise(Q.NumberIdentifier,{at:this.state.curPosition()});var u=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(r)this.finishToken(135,u);else if(a)this.finishToken(136,u);else{var d=o?parseInt(u,8):parseFloat(u);this.finishToken(134,d)}}},{key:"readCodePoint",value:function(e){var t=jt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint),i=t.code,s=t.pos;return this.state.pos=s,i}},{key:"readString",value:function(e){var t=Ot(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string),i=t.str,s=t.pos,r=t.curLine,a=t.lineStart;this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=r,this.finishToken(133,i)}},{key:"readTemplateContinuation",value:function(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}},{key:"readTemplateToken",value:function(){var e=this.input[this.state.pos],t=Ot("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template),i=t.str,s=t.firstInvalidLoc,r=t.pos,a=t.curLine,n=t.lineStart;this.state.pos=r+1,this.state.lineStart=n,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new B(s.curLine,s.pos-s.lineStart,s.pos)),96===this.input.codePointAt(r)?this.finishToken(24,s?null:e+i+"`"):(this.state.pos++,this.finishToken(25,s?null:e+i+"${"))}},{key:"recordStrictModeErrors",value:function(e,t){var i=t.at,s=i.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,{at:i}):this.state.strictErrors.set(s,[e,i])}},{key:"readWord1",value:function(e){this.state.containsEsc=!1;var t="",i=this.state.pos,s=this.state.pos;void 0!==e&&(this.state.pos+=e<=65535?1:2);while(this.state.pos=0;o--){var h=n[o];if(h.loc.index===a)return n[o]=e({loc:r,details:s});if(h.loc.index0&&void 0!==arguments[0]?arguments[0]:0;D(this,e),this.type=t}return L(e,[{key:"canBeArrowParameterDeclaration",value:function(){return 2===this.type||1===this.type}},{key:"isCertainlyParameterDeclaration",value:function(){return 3===this.type}}]),e}(),Xt=function(e){b(i,e);var t=A(i);function i(e){var s;return D(this,i),s=t.call(this,e),s.declarationErrors=new Map,s}return L(i,[{key:"recordDeclarationError",value:function(e,t){var i=t.at,s=i.index;this.declarationErrors.set(s,[e,i])}},{key:"clearDeclarationError",value:function(e){this.declarationErrors.delete(e)}},{key:"iterateErrors",value:function(e){this.declarationErrors.forEach(e)}}]),i}(Wt),Gt=function(){function e(t){D(this,e),this.parser=void 0,this.stack=[new Wt],this.parser=t}return L(e,[{key:"enter",value:function(e){this.stack.push(e)}},{key:"exit",value:function(){this.stack.pop()}},{key:"recordParameterInitializerError",value:function(e,t){var i=t.at,s={at:i.loc.start},r=this.stack,a=r.length-1,n=r[a];while(!n.isCertainlyParameterDeclaration()){if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,s),n=r[--a]}this.parser.raise(e,s)}},{key:"recordArrowParameterBindingError",value:function(e,t){var i=t.at,s=this.stack,r=s[s.length-1],a={at:i.loc.start};if(r.isCertainlyParameterDeclaration())this.parser.raise(e,a);else{if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(e,a)}}},{key:"recordAsyncArrowParametersError",value:function(e){var t=e.at,i=this.stack,s=i.length-1,r=i[s];while(r.canBeArrowParameterDeclaration())2===r.type&&r.recordDeclarationError(Q.AwaitBindingIdentifier,{at:t}),r=i[--s]}},{key:"validateAsPattern",value:function(){var e=this,t=this.stack,i=t[t.length-1];i.canBeArrowParameterDeclaration()&&i.iterateErrors((function(i){var s=f(i,2),r=s[0],a=s[1];e.parser.raise(r,{at:a});var n=t.length-2,o=t[n];while(o.canBeArrowParameterDeclaration())o.clearDeclarationError(a.index),o=t[--n]}))}}]),e}();function Yt(){return new Wt(3)}function $t(){return new Xt(1)}function Qt(){return new Xt(2)}function Zt(){return new Wt}var ei=function(){function e(){D(this,e),this.stacks=[]}return L(e,[{key:"enter",value:function(e){this.stacks.push(e)}},{key:"exit",value:function(){this.stacks.pop()}},{key:"currentFlags",value:function(){return this.stacks[this.stacks.length-1]}},{key:"hasAwait",get:function(){return(2&this.currentFlags())>0}},{key:"hasYield",get:function(){return(1&this.currentFlags())>0}},{key:"hasReturn",get:function(){return(4&this.currentFlags())>0}},{key:"hasIn",get:function(){return(8&this.currentFlags())>0}}]),e}();function ti(e,t){return(e?2:0)|(t?1:0)}var ii=function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"addExtra",value:function(e,t,i){var s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e){var r=e.extra=e.extra||{};s?r[t]=i:Object.defineProperty(r,t,{enumerable:s,value:i})}}},{key:"isContextual",value:function(e){return this.state.type===e&&!this.state.containsEsc}},{key:"isUnparsedContextual",value:function(e,t){var i=e+t.length;if(this.input.slice(e,i)===t){var s=this.input.charCodeAt(i);return!(Ze(s)||55296===(64512&s))}return!1}},{key:"isLookaheadContextual",value:function(e){var t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}},{key:"eatContextual",value:function(e){return!!this.isContextual(e)&&(this.next(),!0)}},{key:"expectContextual",value:function(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}},{key:"canInsertSemicolon",value:function(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}},{key:"hasPrecedingLineBreak",value:function(){return bt.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}},{key:"hasFollowingLineBreak",value:function(){return St.lastIndex=this.state.end,St.test(this.input)}},{key:"isLineTerminator",value:function(){return this.eat(13)||this.canInsertSemicolon()}},{key:"semicolon",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(e?this.isLineTerminator():this.eat(13))||this.raise(Q.MissingSemicolon,{at:this.state.lastTokEndLoc})}},{key:"expect",value:function(e,t){this.eat(e)||this.unexpected(t,e)}},{key:"tryParse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.clone(),i={node:null};try{var s=e((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;throw i.node=e,i}));if(this.state.errors.length>t.errors.length){var r=this.state;return this.state=t,this.state.tokensLength=r.tokensLength,{node:s,error:r.errors[t.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(n){var a=this.state;if(this.state=t,n instanceof SyntaxError)return{node:null,error:n,thrown:!0,aborted:!1,failState:a};if(n===i)return{node:i.node,error:null,thrown:!1,aborted:!0,failState:a};throw n}}},{key:"checkExpressionErrors",value:function(e,t){if(!e)return!1;var i=e.shorthandAssignLoc,s=e.doubleProtoLoc,r=e.privateKeyLoc,a=e.optionalParametersLoc,n=!!i||!!s||!!a||!!r;if(!t)return n;null!=i&&this.raise(Q.InvalidCoverInitializedName,{at:i}),null!=s&&this.raise(Q.DuplicateProto,{at:s}),null!=r&&this.raise(Q.UnexpectedPrivateField,{at:r}),null!=a&&this.unexpected(a)}},{key:"isLiteralPropertyName",value:function(){return Ce(this.state.type)}},{key:"isPrivateName",value:function(e){return"PrivateName"===e.type}},{key:"getPrivateNameSV",value:function(e){return e.id.name}},{key:"hasPropertyAsPrivateName",value:function(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}},{key:"isObjectProperty",value:function(e){return"ObjectProperty"===e.type}},{key:"isObjectMethod",value:function(e){return"ObjectMethod"===e.type}},{key:"initializeScopes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"module"===this.options.sourceType,i=this.state.labels;this.state.labels=[];var s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;var r=this.inModule;this.inModule=t;var a=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);var o=this.prodParam;this.prodParam=new ei;var h=this.classScope;this.classScope=new Jt(this);var l=this.expressionScope;return this.expressionScope=new Gt(this),function(){e.state.labels=i,e.exportedIdentifiers=s,e.inModule=r,e.scope=a,e.prodParam=o,e.classScope=h,e.expressionScope=l}}},{key:"enterInitialScopes",value:function(){var e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}},{key:"checkDestructuringPrivate",value:function(e){var t=e.privateKeyLoc;null!==t&&this.expectPlugin("destructuringPrivate",t)}}]),i}(qt),si=L((function e(){D(this,e),this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null})),ri=L((function e(t,i,s){D(this,e),this.type="",this.start=i,this.end=0,this.loc=new R(s),null!=t&&t.options.ranges&&(this.range=[i,0]),null!=t&&t.filename&&(this.loc.filename=t.filename)})),ai=ri.prototype;function ni(e){return oi(e)}function oi(e){var t=e.type,i=e.start,s=e.end,r=e.loc,a=e.range,n=e.extra,o=e.name,h=Object.create(ai);return h.type=t,h.start=i,h.end=s,h.loc=r,h.range=a,h.extra=n,h.name=o,"Placeholder"===t&&(h.expectedNode=e.expectedNode),h}function hi(e){var t=e.type,i=e.start,s=e.end,r=e.loc,a=e.range,n=e.extra;if("Placeholder"===t)return ni(e);var o=Object.create(ai);return o.type=t,o.start=i,o.end=s,o.loc=r,o.range=a,void 0!==e.raw?o.raw=e.raw:o.extra=n,o.value=e.value,o}ai.__clone=function(){for(var e=new ri(void 0,this.start,this.loc.start),t=Object.keys(this),i=0,s=t.length;i1&&void 0!==arguments[1]?arguments[1]:this.state.lastTokEndLoc;e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}},{key:"resetStartLocationFromNode",value:function(e,t){this.resetStartLocation(e,t.loc.start)}}]),i}(ii),ci=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),pi=$(a||(a=I(["flow"])))({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:function(e){var t=e.reservedType;return"Cannot overwrite reserved type ".concat(t,".")},DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:function(e){var t=e.memberName,i=e.enumName;return"Boolean enum members need to be initialized. Use either `".concat(t," = true,` or `").concat(t," = false,` in enum `").concat(i,"`.")},EnumDuplicateMemberName:function(e){var t=e.memberName,i=e.enumName;return"Enum member names need to be unique, but the name `".concat(t,"` has already been used before in enum `").concat(i,"`.")},EnumInconsistentMemberValues:function(e){var t=e.enumName;return"Enum `".concat(t,"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.")},EnumInvalidExplicitType:function(e){var t=e.invalidEnumType,i=e.enumName;return"Enum type `".concat(t,"` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `").concat(i,"`.")},EnumInvalidExplicitTypeUnknownSupplied:function(e){var t=e.enumName;return"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `".concat(t,"`.")},EnumInvalidMemberInitializerPrimaryType:function(e){var t=e.enumName,i=e.memberName,s=e.explicitType;return"Enum `".concat(t,"` has type `").concat(s,"`, so the initializer of `").concat(i,"` needs to be a ").concat(s," literal.")},EnumInvalidMemberInitializerSymbolType:function(e){var t=e.enumName,i=e.memberName;return"Symbol enum members cannot be initialized. Use `".concat(i,",` in enum `").concat(t,"`.")},EnumInvalidMemberInitializerUnknownType:function(e){var t=e.enumName,i=e.memberName;return"The enum member initializer for `".concat(i,"` needs to be a literal (either a boolean, number, or string) in enum `").concat(t,"`.")},EnumInvalidMemberName:function(e){var t=e.enumName,i=e.memberName,s=e.suggestion;return"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `".concat(i,"`, consider using `").concat(s,"`, in enum `").concat(t,"`.")},EnumNumberMemberNotInitialized:function(e){var t=e.enumName,i=e.memberName;return"Number enum members need to be initialized, e.g. `".concat(i," = 1` in enum `").concat(t,"`.")},EnumStringMemberInconsistentlyInitialized:function(e){var t=e.enumName;return"String enum members need to consistently either all use initializers, or use no initializers, in enum `".concat(t,"`.")},GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:function(e){var t=e.reservedType;return"Unexpected reserved type ".concat(t,".")},UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:function(e){var t=e.unsupportedExportKind,i=e.suggestion;return"`declare export ".concat(t,"` is not supported. Use `").concat(i,"` instead.")},UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function ui(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}function di(e){return"type"===e.importKind||"typeof"===e.importKind}var fi={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function yi(e,t){for(var i=[],s=[],r=0;rt.index+1&&this.raise(pi.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=g(C(i.prototype),"parseExpression",this).call(this),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}},{key:"flowParseTypeAndPredicateInitialiser",value:function(){var e=this.state.inType;this.state.inType=!0,this.expect(14);var t=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[t,i]}},{key:"flowParseDeclareClass",value:function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}},{key:"flowParseDeclareFunction",value:function(e){this.next();var t=e.id=this.parseIdentifier(),i=this.startNode(),s=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);var r=this.flowParseFunctionTypeParams();i.params=r.params,i.rest=r.rest,i.this=r._this,this.expect(11);var a=this.flowParseTypeAndPredicateInitialiser(),n=f(a,2);return i.returnType=n[0],e.predicate=n[1],s.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}},{key:"flowParseDeclare",value:function(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(127)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(pi.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(130)?this.flowParseDeclareTypeAlias(e):this.isContextual(131)?this.flowParseDeclareOpaqueType(e):this.isContextual(129)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}},{key:"flowParseDeclareVariable",value:function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}},{key:"flowParseDeclareModule",value:function(e){var t=this;this.scope.enter(0),this.match(133)?e.id=g(C(i.prototype),"parseExprAtom",this).call(this):e.id=this.parseIdentifier();var s=e.body=this.startNode(),r=s.body=[];this.expect(5);while(!this.match(8)){var a=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(pi.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),g(C(i.prototype),"parseImport",this).call(this,a)):(this.expectContextual(125,pi.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),r.push(a)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");var n=null,o=!1;return r.forEach((function(e){ui(e)?("CommonJS"===n&&t.raise(pi.AmbiguousDeclareModuleKind,{at:e}),n="ES"):"DeclareModuleExports"===e.type&&(o&&t.raise(pi.DuplicateDeclareModuleExports,{at:e}),"ES"===n&&t.raise(pi.AmbiguousDeclareModuleKind,{at:e}),n="CommonJS",o=!0)})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}},{key:"flowParseDeclareExportDeclaration",value:function(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){var i=this.state.value;throw this.raise(pi.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:i,suggestion:fi[i]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(131)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131)?(e=this.parseExport(e,null),"ExportNamedDeclaration"===e.type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}},{key:"flowParseDeclareModuleExports",value:function(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}},{key:"flowParseDeclareTypeAlias",value:function(e){this.next();var t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}},{key:"flowParseDeclareOpaqueType",value:function(e){this.next();var t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}},{key:"flowParseDeclareInterface",value:function(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}},{key:"flowParseInterfaceish",value:function(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}},{key:"flowParseInterfaceExtends",value:function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}},{key:"flowParseInterface",value:function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}},{key:"checkNotUnderscore",value:function(e){"_"===e&&this.raise(pi.UnexpectedReservedUnderscore,{at:this.state.startLoc})}},{key:"checkReservedType",value:function(e,t,i){ci.has(e)&&this.raise(i?pi.AssignReservedType:pi.UnexpectedReservedType,{at:t,reservedType:e})}},{key:"flowParseRestrictedIdentifier",value:function(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}},{key:"flowParseTypeAlias",value:function(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}},{key:"flowParseOpaqueType",value:function(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}},{key:"flowParseTypeParameter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state.startLoc,i=this.startNode(),s=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return i.name=r.name,i.variance=s,i.bound=r.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(pi.MissingTypeParamDefault,{at:t}),this.finishNode(i,"TypeParameter")}},{key:"flowParseTypeParameterDeclaration",value:function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();var i=!1;do{var s=this.flowParseTypeParameter(i);t.params.push(s),s.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}},{key:"flowParseTypeParameterInstantiation",value:function(){var e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!1;while(!this.match(48))e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}},{key:"flowParseTypeParameterInstantiationCallOrNew",value:function(){var e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);while(!this.match(48))e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}},{key:"flowParseInterfaceType",value:function(){var e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}},{key:"flowParseObjectPropertyKey",value:function(){return this.match(134)||this.match(133)?g(C(i.prototype),"parseExprAtom",this).call(this):this.parseIdentifier(!0)}},{key:"flowParseObjectTypeIndexer",value:function(e,t,i){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}},{key:"flowParseObjectTypeInternalSlot",value:function(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}},{key:"flowParseObjectTypeMethodish",value:function(e){e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));while(!this.match(11)&&!this.match(21))e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}},{key:"flowParseObjectTypeCallProperty",value:function(e,t){var i=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}},{key:"flowParseObjectType",value:function(e){var t=e.allowStatic,i=e.allowExact,s=e.allowSpread,r=e.allowProto,a=e.allowInexact,n=this.state.inType;this.state.inType=!0;var o,h,l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];var c=!1;i&&this.match(6)?(this.expect(6),o=9,h=!0):(this.expect(5),o=8,h=!1),l.exact=h;while(!this.match(o)){var p=!1,u=null,d=null,f=this.startNode();if(r&&this.isContextual(118)){var y=this.lookahead();14!==y.type&&17!==y.type&&(this.next(),u=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){var m=this.lookahead();14!==m.type&&17!==m.type&&(this.next(),p=!0)}var v=this.flowParseVariance();if(this.eat(0))null!=u&&this.unexpected(u),this.eat(0)?(v&&this.unexpected(v.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(f,p))):l.indexers.push(this.flowParseObjectTypeIndexer(f,p,v));else if(this.match(10)||this.match(47))null!=u&&this.unexpected(u),v&&this.unexpected(v.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(f,p));else{var x="init";if(this.isContextual(99)||this.isContextual(104)){var P=this.lookahead();Ce(P.type)&&(x=this.state.value,this.next())}var g=this.flowParseObjectTypeProperty(f,p,u,v,x,s,null!=a?a:!h);null===g?(c=!0,d=this.state.lastTokStartLoc):l.properties.push(g)}this.flowObjectTypeSemicolon(),!d||this.match(8)||this.match(9)||this.raise(pi.UnexpectedExplicitInexactInObject,{at:d})}this.expect(o),s&&(l.inexact=c);var k=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=n,k}},{key:"flowParseObjectTypeProperty",value:function(e,t,i,s,r,a,n){if(this.eat(21)){var o=this.match(12)||this.match(13)||this.match(8)||this.match(9);return o?(a?n||this.raise(pi.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(pi.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),s&&this.raise(pi.InexactVariance,{at:s}),null):(a||this.raise(pi.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=i&&this.unexpected(i),s&&this.raise(pi.SpreadVariance,{at:s}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=i,e.kind=r;var h=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=i&&this.unexpected(i),s&&this.unexpected(s.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(e),!a&&"constructor"===e.key.name&&e.value.this&&this.raise(pi.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==r&&this.unexpected(),e.method=!1,this.eat(17)&&(h=!0),e.value=this.flowParseTypeInitialiser(),e.variance=s),e.optional=h,this.finishNode(e,"ObjectTypeProperty")}},{key:"flowCheckGetterSetterParams",value:function(e){var t="get"===e.kind?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?pi.GetterMayNotHaveThisParam:pi.SetterMayNotHaveThisParam,{at:e.value.this}),i!==t&&this.raise("get"===e.kind?Q.BadGetterArity:Q.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(Q.BadSetterRestParameter,{at:e})}},{key:"flowObjectTypeSemicolon",value:function(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}},{key:"flowParseQualifiedTypeIdentifier",value:function(e,t){null!=e||(e=this.state.startLoc);var i=t||this.flowParseRestrictedIdentifier(!0);while(this.eat(16)){var s=this.startNodeAt(e);s.qualification=i,s.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(s,"QualifiedTypeIdentifier")}return i}},{key:"flowParseGenericType",value:function(e,t){var i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}},{key:"flowParseTypeofType",value:function(){var e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}},{key:"flowParseTupleType",value:function(){var e=this.startNode();e.types=[],this.expect(0);while(this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],t=null,i=null;this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));while(!this.match(11)&&!this.match(21))e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:i}}},{key:"flowIdentToTypeAnnotation",value:function(e,t,i){switch(i.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(e,i)}}},{key:"flowParsePrimaryType",value:function(){var e,t,s=this.state.startLoc,r=this.startNode(),a=!1,n=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,t=this.flowParseTupleType(),this.state.noAnonFunctionType=n,t;case 47:return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),e=this.flowParseFunctionTypeParams(),r.params=e.params,r.rest=e.rest,r.this=e._this,this.expect(11),this.expect(19),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(we(this.state.type)||this.match(78)){var o=this.lookahead().type;a=17!==o&&14!==o}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),t;this.eat(12)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),r.params=e.params,r.rest=e.rest,r.this=e._this,this.expect(11),this.expect(19),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return r.value=this.match(85),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",r);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",r);throw this.raise(pi.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(r,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(De(this.state.type)){var h=_e(this.state.type);return this.next(),g(C(i.prototype),"createIdentifier",this).call(this,r,h)}if(we(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(s,r,this.parseIdentifier())}this.unexpected()}},{key:"flowParsePostfixType",value:function(){var e=this.state.startLoc,t=this.flowParsePrimaryType(),i=!1;while((this.match(0)||this.match(18))&&!this.canInsertSemicolon()){var s=this.startNodeAt(e),r=this.eat(18);i=i||r,this.expect(0),!r&&this.match(3)?(s.elementType=t,this.next(),t=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=t,s.indexType=this.flowParseType(),this.expect(3),i?(s.optional=r,t=this.finishNode(s,"OptionalIndexedAccessType")):t=this.finishNode(s,"IndexedAccessType"))}return t}},{key:"flowParsePrefixType",value:function(){var e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}},{key:"flowParseAnonFunctionWithoutParens",value:function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){var t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}},{key:"flowParseIntersectionType",value:function(){var e=this.startNode();this.eat(45);var t=this.flowParseAnonFunctionWithoutParens();e.types=[t];while(this.eat(45))e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}},{key:"flowParseUnionType",value:function(){var e=this.startNode();this.eat(43);var t=this.flowParseIntersectionType();e.types=[t];while(this.eat(43))e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}},{key:"flowParseType",value:function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t}},{key:"flowParseTypeOrImplicitInstantiation",value:function(){if(132===this.state.type&&"_"===this.state.value){var e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}},{key:"flowParseTypeAnnotation",value:function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}},{key:"flowParseTypeAnnotatableIdentifier",value:function(e){var t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}},{key:"typeCastToParameter",value:function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}},{key:"flowParseVariance",value:function(){var e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}},{key:"parseFunctionBody",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t?this.forwardNoArrowParamsConversionAt(e,(function(){return g(C(i.prototype),"parseFunctionBody",s).call(s,e,!0,r)})):g(C(i.prototype),"parseFunctionBody",this).call(this,e,!1,r)}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.match(14)){var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser(),n=f(a,2);r.typeAnnotation=n[0],e.predicate=n[1],e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return g(C(i.prototype),"parseFunctionBodyAndFinish",this).call(this,e,t,s)}},{key:"parseStatementLike",value:function(e){if(this.state.strict&&this.isContextual(129)){var t=this.lookahead();if(Se(t.type)){var s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.shouldParseEnums()&&this.isContextual(126)){var r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}var a=g(C(i.prototype),"parseStatementLike",this).call(this,e);return void 0!==this.flowPragma||this.isValidDirective(a)||(this.flowPragma=null),a}},{key:"parseExpressionStatement",value:function(e,t,s){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||we(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(we(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return g(C(i.prototype),"parseExpressionStatement",this).call(this,e,t,s)}},{key:"shouldParseExportDeclaration",value:function(){var e=this.state.type;return Me(e)||this.shouldParseEnums()&&126===e?!this.state.containsEsc:g(C(i.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"isExportDefaultSpecifier",value:function(){var e=this.state.type;return Me(e)||this.shouldParseEnums()&&126===e?this.state.containsEsc:g(C(i.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseExportDefaultExpression",value:function(){if(this.shouldParseEnums()&&this.isContextual(126)){var e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return g(C(i.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseConditional",value:function(e,t,i){var s=this;if(!this.match(17))return e;if(this.state.maybeInArrowParameters){var r=this.lookaheadCharCode();if(44===r||61===r||58===r||41===r)return this.setOptionalParametersError(i),e}this.expect(17);var a=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(t),h=this.tryParseConditionalConsequent(),l=h.consequent,p=h.failed,u=this.getArrowLikeExpressions(l),d=f(u,2),y=d[0],m=d[1];if(p||m.length>0){var v=c(n);if(m.length>0){this.state=a,this.state.noArrowAt=v;for(var x=0;x1&&this.raise(pi.AmbiguousConditionalArrow,{at:a.startLoc}),p&&1===y.length){this.state=a,v.push(y[0].start),this.state.noArrowAt=v;var b=this.tryParseConditionalConsequent();l=b.consequent,p=b.failed}}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,(function(){return s.parseMaybeAssign(void 0,void 0)})),this.finishNode(o,"ConditionalExpression")}},{key:"tryParseConditionalConsequent",value:function(){this.state.noArrowParamsConversionAt.push(this.state.start);var e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}},{key:"getArrowLikeExpressions",value:function(e,t){var i=this,s=[e],r=[];while(0!==s.length){var a=s.pop();"ArrowFunctionExpression"===a.type?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):r.push(a),s.push(a.body)):"ConditionalExpression"===a.type&&(s.push(a.consequent),s.push(a.alternate))}return t?(r.forEach((function(e){return i.finishArrowValidation(e)})),[r,[]]):yi(r,(function(e){return e.params.every((function(e){return i.isAssignable(e,!0)}))}))}},{key:"finishArrowValidation",value:function(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),g(C(i.prototype),"checkParams",this).call(this,e,!1,!0),this.scope.exit()}},{key:"forwardNoArrowParamsConversionAt",value:function(e,t){var i;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),i=t(),this.state.noArrowParamsConversionAt.pop()):i=t(),i}},{key:"parseParenItem",value:function(e,t){if(e=g(C(i.prototype),"parseParenItem",this).call(this,e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){var s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return e}},{key:"assertModuleNodeAllowed",value:function(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||g(C(i.prototype),"assertModuleNodeAllowed",this).call(this,e)}},{key:"parseExportDeclaration",value:function(e){if(this.isContextual(130)){e.exportKind="type";var t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),g(C(i.prototype),"parseExportFrom",this).call(this,e),null):this.flowParseTypeAlias(t)}if(this.isContextual(131)){e.exportKind="type";var s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}if(this.isContextual(129)){e.exportKind="type";var r=this.startNode();return this.next(),this.flowParseInterface(r)}if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";var a=this.startNode();return this.next(),this.flowParseEnumDeclaration(a)}return g(C(i.prototype),"parseExportDeclaration",this).call(this,e)}},{key:"eatExportStar",value:function(e){return!!g(C(i.prototype),"eatExportStar",this).call(this,e)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}},{key:"maybeParseExportNamespaceSpecifier",value:function(e){var t=this.state.startLoc,s=g(C(i.prototype),"maybeParseExportNamespaceSpecifier",this).call(this,e);return s&&"type"===e.exportKind&&this.unexpected(t),s}},{key:"parseClassId",value:function(e,t,s){g(C(i.prototype),"parseClassId",this).call(this,e,t,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}},{key:"parseClassMember",value:function(e,t,s){var r=this.state.startLoc;if(this.isContextual(125)){if(g(C(i.prototype),"parseClassMemberFromModifier",this).call(this,e,t))return;t.declare=!0}g(C(i.prototype),"parseClassMember",this).call(this,e,t,s),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(pi.DeclareClassElement,{at:r}):t.value&&this.raise(pi.DeclareClassFieldInitializer,{at:t.value}))}},{key:"isIterator",value:function(e){return"iterator"===e||"asyncIterator"===e}},{key:"readIterator",value:function(){var e=g(C(i.prototype),"readWord1",this).call(this),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(Q.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(132,t)}},{key:"getTokenFromCode",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):lt(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):g(C(i.prototype),"getTokenFromCode",this).call(this,e):this.finishOp(62===e?48:47,1)}},{key:"isAssignable",value:function(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):g(C(i.prototype),"isAssignable",this).call(this,e,t)}},{key:"toAssignable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),g(C(i.prototype),"toAssignable",this).call(this,e,t)}},{key:"toAssignableList",value:function(e,t,s){for(var r=0;r1)&&t||this.raise(pi.TypeCastInPattern,{at:r.typeAnnotation})}return e}},{key:"parseArrayLike",value:function(e,t,s,r){var a=g(C(i.prototype),"parseArrayLike",this).call(this,e,t,s,r);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}},{key:"isValidLVal",value:function(e,t,s){return"TypeCastExpression"===e||g(C(i.prototype),"isValidLVal",this).call(this,e,t,s)}},{key:"parseClassProperty",value:function(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),g(C(i.prototype),"parseClassProperty",this).call(this,e)}},{key:"parseClassPrivateProperty",value:function(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),g(C(i.prototype),"parseClassPrivateProperty",this).call(this,e)}},{key:"isClassMethod",value:function(){return this.match(47)||g(C(i.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(14)||g(C(i.prototype),"isClassProperty",this).call(this)}},{key:"isNonstaticConstructor",value:function(e){return!this.match(14)&&g(C(i.prototype),"isNonstaticConstructor",this).call(this,e)}},{key:"pushClassMethod",value:function(e,t,s,r,a,n){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),g(C(i.prototype),"pushClassMethod",this).call(this,e,t,s,r,a,n),t.params&&a){var o=t.params;o.length>0&&this.isThisParam(o[0])&&this.raise(pi.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&a&&t.value.params){var h=t.value.params;h.length>0&&this.isThisParam(h[0])&&this.raise(pi.ThisParamBannedInConstructor,{at:t})}}},{key:"pushClassPrivateMethod",value:function(e,t,s,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),g(C(i.prototype),"pushClassPrivateMethod",this).call(this,e,t,s,r)}},{key:"parseClassSuper",value:function(e){if(g(C(i.prototype),"parseClassSuper",this).call(this,e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();var t=e.implements=[];do{var s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,t.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}},{key:"checkGetterSetterParams",value:function(e){g(C(i.prototype),"checkGetterSetterParams",this).call(this,e);var t=this.getObjectOrClassMethodParams(e);if(t.length>0){var s=t[0];this.isThisParam(s)&&"get"===e.kind?this.raise(pi.GetterMayNotHaveThisParam,{at:s}):this.isThisParam(s)&&this.raise(pi.SetterMayNotHaveThisParam,{at:s})}}},{key:"parsePropertyNamePrefixOperator",value:function(e){e.variance=this.flowParseVariance()}},{key:"parseObjPropValue",value:function(e,t,s,r,a,n,o){var h;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!n&&(h=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());var l=g(C(i.prototype),"parseObjPropValue",this).call(this,e,t,s,r,a,n,o);return h&&((l.value||l).typeParameters=h),l}},{key:"parseAssignableListItemTypes",value:function(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(pi.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(pi.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(pi.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(pi.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}},{key:"parseMaybeDefault",value:function(e,t){var s=g(C(i.prototype),"parseMaybeDefault",this).call(this,e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start3&&void 0!==arguments[3])||arguments[3];if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(var a=0;a0&&this.raise(pi.ThisParamMustBeFirst,{at:e.params[a]});g(C(i.prototype),"checkParams",this).call(this,e,t,s,r)}}},{key:"parseParenAndDistinguishExpression",value:function(e){return g(C(i.prototype),"parseParenAndDistinguishExpression",this).call(this,e&&-1===this.state.noArrowAt.indexOf(this.state.start))}},{key:"parseSubscripts",value:function(e,t,s){var r=this;if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();var a=this.startNodeAt(t);a.callee=e,a.arguments=g(C(i.prototype),"parseCallExpressionArguments",this).call(this,11,!1),e=this.finishNode(a,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){var n=this.state.clone(),o=this.tryParse((function(e){return r.parseAsyncArrowWithTypeParameters(t)||e()}),n);if(!o.error&&!o.aborted)return o.node;var h=this.tryParse((function(){return g(C(i.prototype),"parseSubscripts",r).call(r,e,t,s)}),n);if(h.node&&!h.error)return h.node;if(o.node)return this.state=o.failState,o.node;if(h.node)return this.state=h.failState,h.node;throw o.error||h.error}return g(C(i.prototype),"parseSubscripts",this).call(this,e,t,s)}},{key:"parseSubscript",value:function(e,t,s,r){var a=this;if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,s)return r.stop=!0,e;this.next();var n=this.startNodeAt(t);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}if(!s&&this.shouldParseTypes()&&this.match(47)){var o=this.startNodeAt(t);o.callee=e;var h=this.tryParse((function(){return o.typeArguments=a.flowParseTypeParameterInstantiationCallOrNew(),a.expect(10),o.arguments=g(C(i.prototype),"parseCallExpressionArguments",a).call(a,11,!1),r.optionalChainMember&&(o.optional=!1),a.finishCallExpression(o,r.optionalChainMember)}));if(h.node)return h.error&&(this.state=h.failState),h.node}return g(C(i.prototype),"parseSubscript",this).call(this,e,t,s,r)}},{key:"parseNewCallee",value:function(e){var t=this;g(C(i.prototype),"parseNewCallee",this).call(this,e);var s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse((function(){return t.flowParseTypeParameterInstantiationCallOrNew()})).node),e.typeArguments=s}},{key:"parseAsyncArrowWithTypeParameters",value:function(e){var t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return g(C(i.prototype),"parseArrowExpression",this).call(this,t,void 0,!0)}},{key:"readToken_mult_modulo",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();g(C(i.prototype),"readToken_mult_modulo",this).call(this,e)}},{key:"readToken_pipe_amp",value:function(e){var t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?g(C(i.prototype),"readToken_pipe_amp",this).call(this,e):this.finishOp(9,2)}},{key:"parseTopLevel",value:function(e,t){var s=g(C(i.prototype),"parseTopLevel",this).call(this,e,t);return this.state.hasFlowComment&&this.raise(pi.UnterminatedFlowComment,{at:this.state.curPosition()}),s}},{key:"skipBlockComment",value:function(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return g(C(i.prototype),"skipBlockComment",this).call(this,this.state.hasFlowComment?"*-/":"*/");if(this.state.hasFlowComment)throw this.raise(pi.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();var e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}},{key:"skipFlowComment",value:function(){var e=this.state.pos,t=2;while([32,9].includes(this.input.charCodeAt(e+t)))t++;var i=this.input.charCodeAt(t+e),s=this.input.charCodeAt(t+e+1);return 58===i&&58===s?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===i&&58!==s&&t}},{key:"hasFlowCommentCompletion",value:function(){var e=this.input.indexOf("*/",this.state.pos);if(-1===e)throw this.raise(Q.UnterminatedComment,{at:this.state.curPosition()})}},{key:"flowEnumErrorBooleanMemberNotInitialized",value:function(e,t){var i=t.enumName,s=t.memberName;this.raise(pi.EnumBooleanMemberNotInitialized,{at:e,memberName:s,enumName:i})}},{key:"flowEnumErrorInvalidMemberInitializer",value:function(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?pi.EnumInvalidMemberInitializerSymbolType:pi.EnumInvalidMemberInitializerPrimaryType:pi.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}},{key:"flowEnumErrorNumberMemberNotInitialized",value:function(e,t){var i=t.enumName,s=t.memberName;this.raise(pi.EnumNumberMemberNotInitialized,{at:e,enumName:i,memberName:s})}},{key:"flowEnumErrorStringMemberInconsistentlyInitialized",value:function(e,t){var i=t.enumName;this.raise(pi.EnumStringMemberInconsistentlyInitialized,{at:e,enumName:i})}},{key:"flowEnumMemberInit",value:function(){var e=this,t=this.state.startLoc,i=function(){return e.match(12)||e.match(8)};switch(this.state.type){case 134:var s=this.parseNumericLiteral(this.state.value);return i()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:t};case 133:var r=this.parseStringLiteral(this.state.value);return i()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:t};case 85:case 86:var a=this.parseBooleanLiteral(this.match(85));return i()?{type:"boolean",loc:a.loc.start,value:a}:{type:"invalid",loc:t};default:return{type:"invalid",loc:t}}}},{key:"flowEnumMemberRaw",value:function(){var e=this.state.startLoc,t=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:i}}},{key:"flowEnumCheckExplicitTypeMismatch",value:function(e,t,i){var s=t.explicitType;null!==s&&s!==i&&this.flowEnumErrorInvalidMemberInitializer(e,t)}},{key:"flowEnumMembers",value:function(e){var t=e.enumName,i=e.explicitType,s=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;while(!this.match(8)){if(this.eat(21)){a=!0;break}var n=this.startNode(),o=this.flowEnumMemberRaw(),h=o.id,l=o.init,c=h.name;if(""!==c){/^[a-z]/.test(c)&&this.raise(pi.EnumInvalidMemberName,{at:h,memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:t}),s.has(c)&&this.raise(pi.EnumDuplicateMemberName,{at:h,memberName:c,enumName:t}),s.add(c);var p={enumName:t,explicitType:i,memberName:c};switch(n.id=h,l.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"boolean"),n.init=l.value,r.booleanMembers.push(this.finishNode(n,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"number"),n.init=l.value,r.numberMembers.push(this.finishNode(n,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"string"),n.init=l.value,r.stringMembers.push(this.finishNode(n,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,p);case"none":switch(i){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,p);break;default:r.defaultedMembers.push(this.finishNode(n,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}}return{members:r,hasUnknownMembers:a}}},{key:"flowEnumStringMembers",value:function(e,t,i){var s=i.enumName;if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){var r,a=l(e);try{for(a.s();!(r=a.n()).done;){var n=r.value;this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:s})}}catch(p){a.e(p)}finally{a.f()}return t}var o,h=l(t);try{for(h.s();!(o=h.n()).done;){var c=o.value;this.flowEnumErrorStringMemberInconsistentlyInitialized(c,{enumName:s})}}catch(p){h.e(p)}finally{h.f()}return e}},{key:"flowEnumParseExplicitType",value:function(e){var t=e.enumName;if(!this.eatContextual(102))return null;if(!we(this.state.type))throw this.raise(pi.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:t});var i=this.state.value;return this.next(),"boolean"!==i&&"number"!==i&&"string"!==i&&"symbol"!==i&&this.raise(pi.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:t,invalidEnumType:i}),i}},{key:"flowEnumBody",value:function(e,t){var i=this,s=t.name,r=t.loc.start,a=this.flowEnumParseExplicitType({enumName:s});this.expect(5);var n=this.flowEnumMembers({enumName:s,explicitType:a}),o=n.members,h=n.hasUnknownMembers;switch(e.hasUnknownMembers=h,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:var c=function(){return e.members=[],i.expect(8),i.finishNode(e,"EnumStringBody")};e.explicitType=!1;var p=o.booleanMembers.length,u=o.numberMembers.length,d=o.stringMembers.length,f=o.defaultedMembers.length;if(p||u||d||f){if(p||u){if(!u&&!d&&p>=f){var y,m=l(o.defaultedMembers);try{for(m.s();!(y=m.n()).done;){var v=y.value;this.flowEnumErrorBooleanMemberNotInitialized(v.loc.start,{enumName:s,memberName:v.id.name})}}catch(k){m.e(k)}finally{m.f()}return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!p&&!d&&u>=f){var x,P=l(o.defaultedMembers);try{for(P.s();!(x=P.n()).done;){var g=x.value;this.flowEnumErrorNumberMemberNotInitialized(g.loc.start,{enumName:s,memberName:g.id.name})}}catch(k){P.e(k)}finally{P.f()}return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(pi.EnumInconsistentMemberValues,{at:r,enumName:s}),c()}return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody")}return c()}}},{key:"flowParseEnumDeclaration",value:function(e){var t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}},{key:"isLookaheadToken_lt",value:function(){var e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){var t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}},{key:"maybeUnwrapTypeCastExpression",value:function(e){return"TypeCastExpression"===e.type?e.expression:e}}]),i}(e)},xi={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Pi=$(n||(n=I(["jsx"])))({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:function(e){var t=e.openingTagName;return"Expected corresponding JSX closing tag for <".concat(t,">.")},MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:function(e){var t=e.unexpected,i=e.HTMLEntity;return"Unexpected token `".concat(t,"`. Did you mean `").concat(i,"` or `{'").concat(t,"'}`?")},UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function gi(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function ki(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return ki(e.object)+"."+ki(e.property);throw new Error("Node had unexpected type: "+e.type)}var bi=function(e){return function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"jsxReadToken",value:function(){for(var e="",t=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(Pi.UnterminatedJsxContent,{at:this.state.startLoc});var s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?void(60===s&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):g(C(i.prototype),"getTokenFromCode",this).call(this,s)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(141,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:At(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}},{key:"jsxReadNewLine",value:function(e){var t,i=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===i&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(i),++this.state.curLine,this.state.lineStart=this.state.pos,t}},{key:"jsxReadString",value:function(e){for(var t="",i=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(Q.UnterminatedString,{at:this.state.startLoc});var s=this.input.charCodeAt(this.state.pos);if(s===e)break;38===s?(t+=this.input.slice(i,this.state.pos),t+=this.jsxReadEntity(),i=this.state.pos):At(s)?(t+=this.input.slice(i,this.state.pos),t+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}t+=this.input.slice(i,this.state.pos++),this.finishToken(133,t)}},{key:"jsxReadEntity",value:function(){var e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;var t=10;120===this.codePointAtPos(this.state.pos)&&(t=16,++this.state.pos);var i=this.readInt(t,void 0,!1,"bail");if(null!==i&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(i)}else{var s=0,r=!1;while(s++<10&&this.state.pos1)for(var s=0;s=0;r--){var a=this.scopeStack[r];if(a.types.has(t)||a.exportOnlyBindings.has(t))return}g(C(i.prototype),"checkLocalExport",this).call(this,e)}}}]),i}(dt),wi=function(e,t){return Object.hasOwnProperty.call(e,t)&&e[t]},Ei=function e(t){return"ParenthesizedExpression"===t.type?e(t.expression):t},Si=function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"toAssignable",value:function(e){var t,i,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=void 0;switch(("ParenthesizedExpression"===e.type||null!=(t=e.extra)&&t.parenthesized)&&(r=Ei(e),s?"Identifier"===r.type?this.expressionScope.recordArrowParameterBindingError(Q.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"===r.type||this.isOptionalMemberExpression(r)||this.raise(Q.InvalidParenthesizedAssignment,{at:e}):this.raise(Q.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(var a=0,n=e.properties.length,o=n-1;a2&&void 0!==arguments[2]&&arguments[2];this.state.strict&&(i?ot(e.name,this.inModule):nt(e.name))&&(64===t?this.raise(Q.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(Q.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(Q.LetInLexicalBinding,{at:e}),64&t||this.declareNameFromIdentifier(e,t)}},{key:"declareNameFromIdentifier",value:function(e,t){this.scope.declareName(e.name,t,e.loc.start)}},{key:"checkToRestConversion",value:function(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(Q.InvalidRestAssignmentPattern,{at:e})}}},{key:"checkCommaAfterRest",value:function(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?Q.RestTrailingComma:Q.ElementAfterRest,{at:this.state.startLoc}),!0)}}]),i}(li),Ci=function(e,t){return Object.hasOwnProperty.call(e,t)&&e[t]};function Ii(e){if(null==e)throw new Error("Unexpected ".concat(e," value."));return e}function Ni(e){if(!e)throw new Error("Assert fail")}var Li=$(o||(o=I(["typescript"])))({AbstractMethodHasImplementation:function(e){var t=e.methodName;return"Method '".concat(t,"' cannot have an implementation because it is marked abstract.")},AbstractPropertyHasInitializer:function(e){var t=e.propertyName;return"Property '".concat(t,"' cannot have an initializer because it is marked abstract.")},AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:function(e){var t=e.kind;return"'declare' is not allowed in ".concat(t,"ters.")},DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:function(e){e.modifier;return"Accessibility modifier already seen."},DuplicateModifier:function(e){var t=e.modifier;return"Duplicate modifier: '".concat(t,"'.")},EmptyHeritageClauseType:function(e){var t=e.token;return"'".concat(t,"' list cannot be empty.")},EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:function(e){var t=e.modifiers;return"'".concat(t[0],"' modifier cannot be used with '").concat(t[1],"' modifier.")},IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:function(e){var t=e.modifier;return"Index signatures cannot have an accessibility modifier ('".concat(t,"').")},IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:function(e){var t=e.modifier;return"'".concat(t,"' modifier cannot appear on a type member.")},InvalidModifierOnTypeParameter:function(e){var t=e.modifier;return"'".concat(t,"' modifier cannot appear on a type parameter.")},InvalidModifierOnTypeParameterPositions:function(e){var t=e.modifier;return"'".concat(t,"' modifier can only appear on a type parameter of a class, interface or type alias.")},InvalidModifiersOrder:function(e){var t=e.orderedModifiers;return"'".concat(t[0],"' modifier must precede '").concat(t[1],"' modifier.")},InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:function(e){var t=e.modifier;return"Private elements cannot have an accessibility modifier ('".concat(t,"').")},ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:function(e){var t=e.typeParameterName;return"Single type parameter ".concat(t," should have a trailing comma. Example usage: <").concat(t,",>.")},StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:function(e){var t=e.type;return"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ".concat(t,".")}});function Mi(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Oi(e){return"private"===e||"public"===e||"protected"===e}function Di(e){return"in"===e||"out"===e}var Fi=function(e){return function(e){b(i,e);var t=A(i);function i(){var e;D(this,i);for(var s=arguments.length,r=new Array(s),a=0;a0&&void 0!==arguments[0])||arguments[0],t=this.parseIdentifier(e);while(this.eat(16)){var i=this.startNodeAtNode(t);i.left=t,i.right=this.parseIdentifier(e),t=this.finishNode(i,"TSQualifiedName")}return t}},{key:"tsParseTypeReference",value:function(){var e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}},{key:"tsParseThisTypePredicate",value:function(e){this.next();var t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}},{key:"tsParseThisTypeNode",value:function(){var e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}},{key:"tsParseTypeQuery",value:function(){var e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}},{key:"tsParseTypeParameter",value:function(e){var t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}},{key:"tsTryParseTypeParameters",value:function(e){if(this.match(47))return this.tsParseTypeParameters(e)}},{key:"tsParseTypeParameters",value:function(e){var t=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();var i={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),0===t.params.length&&this.raise(Li.EmptyTypeParameters,{at:t}),-1!==i.value&&this.addExtra(t,"trailingComma",i.value),this.finishNode(t,"TSTypeParameterDeclaration")}},{key:"tsFillSignature",value:function(e,t){var i=19===e,s="parameters",r="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[s]=this.tsParseBindingListForSignature(),(i||this.match(e))&&(t[r]=this.tsParseTypeOrTypePredicateAnnotation(e))}},{key:"tsParseBindingListForSignature",value:function(){var e,t=g(C(i.prototype),"parseBindingList",this).call(this,11,41,2),s=l(t);try{for(s.s();!(e=s.n()).done;){var r=e.value,a=r.type;"AssignmentPattern"!==a&&"TSParameterProperty"!==a||this.raise(Li.UnsupportedSignatureParameterKind,{at:r,type:a})}}catch(n){s.e(n)}finally{s.f()}return t}},{key:"tsParseTypeMemberSemicolon",value:function(){this.eat(12)||this.isLineTerminator()||this.expect(13)}},{key:"tsParseSignatureMember",value:function(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}},{key:"tsIsUnambiguouslyIndexSignature",value:function(){return this.next(),!!we(this.state.type)&&(this.next(),this.match(14))}},{key:"tsTryParseIndexSignature",value:function(e){if(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(0);var t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];var i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}}},{key:"tsParsePropertyOrMethodSignature",value:function(e,t){this.eat(17)&&(e.optional=!0);var i=e;if(this.match(10)||this.match(47)){t&&this.raise(Li.ReadonlyForMethodSignature,{at:e});var s=i;s.kind&&this.match(47)&&this.raise(Li.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();var r="parameters",a="typeAnnotation";if("get"===s.kind)s[r].length>0&&(this.raise(Q.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(s[r][0])&&this.raise(Li.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===s.kind){if(1!==s[r].length)this.raise(Q.BadSetterArity,{at:this.state.curPosition()});else{var n=s[r][0];this.isThisParam(n)&&this.raise(Li.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===n.type&&n.optional&&this.raise(Li.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===n.type&&this.raise(Li.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}s[a]&&this.raise(Li.SetAccesorCannotHaveReturnType,{at:s[a]})}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}var o=i;t&&(o.readonly=!0);var h=this.tsTryParseTypeAnnotation();return h&&(o.typeAnnotation=h),this.tsParseTypeMemberSemicolon(),this.finishNode(o,"TSPropertySignature")}},{key:"tsParseTypeMember",value:function(){var e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){var t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);var s=this.tsTryParseIndexSignature(e);return s||(g(C(i.prototype),"parsePropertyName",this).call(this,e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,g(C(i.prototype),"parsePropertyName",this).call(this,e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}},{key:"tsParseTypeLiteral",value:function(){var e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}},{key:"tsParseObjectTypeMembers",value:function(){this.expect(5);var e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}},{key:"tsIsStartOfMappedType",value:function(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}},{key:"tsParseMappedTypeParameter",value:function(){var e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}},{key:"tsParseMappedType",value:function(){var e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}},{key:"tsParseTupleType",value:function(){var e=this,t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var i=!1;return t.elementTypes.forEach((function(t){var s=t.type;!i||"TSRestType"===s||"TSOptionalType"===s||"TSNamedTupleMember"===s&&t.optional||e.raise(Li.OptionalTypeBeforeRequired,{at:t}),i||(i="TSNamedTupleMember"===s&&t.optional||"TSOptionalType"===s)})),this.finishNode(t,"TSTupleType")}},{key:"tsParseTupleElementType",value:function(){var e,t,i,s,r,a=this.state.startLoc,n=this.eat(21),o=Se(this.state.type),h=o?this.lookaheadCharCode():null;if(58===h)e=!0,i=!1,t=this.parseIdentifier(!0),this.expect(14),s=this.tsParseType();else if(63===h){i=!0;var l=this.state.startLoc,c=this.state.value,p=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(e=!0,t=this.createIdentifier(this.startNodeAt(l),c),this.expect(17),this.expect(14),s=this.tsParseType()):(e=!1,s=p,this.expect(17))}else s=this.tsParseType(),i=this.eat(17),e=this.eat(14);if(e)t?(r=this.startNodeAtNode(t),r.optional=i,r.label=t,r.elementType=s,this.eat(17)&&(r.optional=!0,this.raise(Li.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(r=this.startNodeAtNode(s),r.optional=i,this.raise(Li.InvalidTupleMemberLabel,{at:s}),r.label=s,r.elementType=this.tsParseType()),s=this.finishNode(r,"TSNamedTupleMember");else if(i){var u=this.startNodeAtNode(s);u.typeAnnotation=s,s=this.finishNode(u,"TSOptionalType")}if(n){var d=this.startNodeAt(a);d.typeAnnotation=s,s=this.finishNode(d,"TSRestType")}return s}},{key:"tsParseParenthesizedType",value:function(){var e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}},{key:"tsParseFunctionOrConstructorType",value:function(e,t){var i=this,s=this.startNode();return"TSConstructorType"===e&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((function(){return i.tsFillSignature(19,s)})),this.finishNode(s,e)}},{key:"tsParseLiteralTypeNode",value:function(){var e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=g(C(i.prototype),"parseExprAtom",this).call(this);break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}},{key:"tsParseTemplateLiteralType",value:function(){var e=this.startNode();return e.literal=g(C(i.prototype),"parseTemplate",this).call(this,!1),this.finishNode(e,"TSLiteralType")}},{key:"parseTemplateSubstitution",value:function(){return this.state.inType?this.tsParseType():g(C(i.prototype),"parseTemplateSubstitution",this).call(this)}},{key:"tsParseThisTypeOrThisTypePredicate",value:function(){var e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}},{key:"tsParseNonArrayType",value:function(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){var e=this.startNode(),t=this.lookahead();return 134!==t.type&&135!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:var i=this.state.type;if(we(i)||88===i||84===i){var s=88===i?"TSVoidKeyword":84===i?"TSNullKeyword":Mi(this.state.value);if(void 0!==s&&46!==this.lookaheadCharCode()){var r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}this.unexpected()}},{key:"tsParseArrayTypeOrHigher",value:function(){var e=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(0))if(this.match(3)){var t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{var i=this.startNodeAtNode(e);i.objectType=e,i.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(i,"TSIndexedAccessType")}return e}},{key:"tsParseTypeOperator",value:function(){var e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}},{key:"tsCheckTypeAnnotationForReadOnly",value:function(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Li.UnexpectedReadonly,{at:e})}}},{key:"tsParseInferType",value:function(){var e=this,t=this.startNode();this.expectContextual(115);var i=this.startNode();return i.name=this.tsParseTypeParameterName(),i.constraint=this.tsTryParse((function(){return e.tsParseConstraintForInferType()})),t.typeParameter=this.finishNode(i,"TSTypeParameter"),this.finishNode(t,"TSInferType")}},{key:"tsParseConstraintForInferType",value:function(){var e=this;if(this.eat(81)){var t=this.tsInDisallowConditionalTypesContext((function(){return e.tsParseType()}));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}},{key:"tsParseTypeOperatorOrHigher",value:function(){var e=this,t=je(this.state.type)&&!this.state.containsEsc;return t?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((function(){return e.tsParseArrayTypeOrHigher()}))}},{key:"tsParseUnionOrIntersectionType",value:function(e,t,i){var s=this.startNode(),r=this.eat(i),a=[];do{a.push(t())}while(this.eat(i));return 1!==a.length||r?(s.types=a,this.finishNode(s,e)):a[0]}},{key:"tsParseIntersectionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}},{key:"tsParseUnionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}},{key:"tsIsStartOfFunctionType",value:function(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}},{key:"tsSkipParameterStart",value:function(){if(we(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){var e=this.state.errors,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch(a){return!1}}if(this.match(0)){this.next();var s=this.state.errors,r=s.length;try{return g(C(i.prototype),"parseBindingList",this).call(this,3,93,1),s.length===r}catch(n){return!1}}return!1}},{key:"tsIsUnambiguouslyStartOfFunctionType",value:function(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}},{key:"tsParseTypeOrTypePredicateAnnotation",value:function(e){var t=this;return this.tsInType((function(){var i=t.startNode();t.expect(e);var s=t.startNode(),r=!!t.tsTryParse(t.tsParseTypePredicateAsserts.bind(t));if(r&&t.match(78)){var a=t.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===a.type?(s.parameterName=a,s.asserts=!0,s.typeAnnotation=null,a=t.finishNode(s,"TSTypePredicate")):(t.resetStartLocationFromNode(a,s),a.asserts=!0),i.typeAnnotation=a,t.finishNode(i,"TSTypeAnnotation")}var n=t.tsIsIdentifier()&&t.tsTryParse(t.tsParseTypePredicatePrefix.bind(t));if(!n)return r?(s.parameterName=t.parseIdentifier(),s.asserts=r,s.typeAnnotation=null,i.typeAnnotation=t.finishNode(s,"TSTypePredicate"),t.finishNode(i,"TSTypeAnnotation")):t.tsParseTypeAnnotation(!1,i);var o=t.tsParseTypeAnnotation(!1);return s.parameterName=n,s.typeAnnotation=o,s.asserts=r,i.typeAnnotation=t.finishNode(s,"TSTypePredicate"),t.finishNode(i,"TSTypeAnnotation")}))}},{key:"tsTryParseTypeOrTypePredicateAnnotation",value:function(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}},{key:"tsTryParseTypeAnnotation",value:function(){if(this.match(14))return this.tsParseTypeAnnotation()}},{key:"tsTryParseType",value:function(){return this.tsEatThenParseType(14)}},{key:"tsParseTypePredicatePrefix",value:function(){var e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}},{key:"tsParseTypePredicateAsserts",value:function(){if(109!==this.state.type)return!1;var e=this.state.containsEsc;return this.next(),!(!we(this.state.type)&&!this.match(78))&&(e&&this.raise(Q.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}},{key:"tsParseTypeAnnotation",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.startNode();return this.tsInType((function(){t&&e.expect(14),i.typeAnnotation=e.tsParseType()})),this.finishNode(i,"TSTypeAnnotation")}},{key:"tsParseType",value:function(){var e=this;Ni(this.state.inType);var t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;var i=this.startNodeAtNode(t);return i.checkType=t,i.extendsType=this.tsInDisallowConditionalTypesContext((function(){return e.tsParseNonConditionalType()})),this.expect(17),i.trueType=this.tsInAllowConditionalTypesContext((function(){return e.tsParseType()})),this.expect(14),i.falseType=this.tsInAllowConditionalTypesContext((function(){return e.tsParseType()})),this.finishNode(i,"TSConditionalType")}},{key:"isAbstractConstructorSignature",value:function(){return this.isContextual(124)&&77===this.lookahead().type}},{key:"tsParseNonConditionalType",value:function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}},{key:"tsParseTypeAssertion",value:function(){var e=this;this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Li.ReservedTypeAssertion,{at:this.state.startLoc});var t=this.startNode();return t.typeAnnotation=this.tsInType((function(){return e.next(),e.match(75)?e.tsParseTypeReference():e.tsParseType()})),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}},{key:"tsParseHeritageClause",value:function(e){var t=this,i=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",(function(){var e=t.startNode();return e.expression=t.tsParseEntityName(),t.match(47)&&(e.typeParameters=t.tsParseTypeArguments()),t.finishNode(e,"TSExpressionWithTypeArguments")}));return s.length||this.raise(Li.EmptyHeritageClauseType,{at:i,token:e}),s}},{key:"tsParseInterfaceDeclaration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),we(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(Li.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));var i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}},{key:"tsParseTypeAliasDeclaration",value:function(e){var t=this;return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((function(){if(e.typeParameters=t.tsTryParseTypeParameters(t.tsParseInOutModifiers),t.expect(29),t.isContextual(114)&&16!==t.lookahead().type){var i=t.startNode();return t.next(),t.finishNode(i,"TSIntrinsicKeyword")}return t.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}},{key:"tsInNoContext",value:function(e){var t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}},{key:"tsInType",value:function(e){var t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}},{key:"tsInDisallowConditionalTypesContext",value:function(e){var t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}},{key:"tsInAllowConditionalTypesContext",value:function(e){var t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}},{key:"tsEatThenParseType",value:function(e){if(this.match(e))return this.tsNextThenParseType()}},{key:"tsExpectThenParseType",value:function(e){var t=this;return this.tsInType((function(){return t.expect(e),t.tsParseType()}))}},{key:"tsNextThenParseType",value:function(){var e=this;return this.tsInType((function(){return e.next(),e.tsParseType()}))}},{key:"tsParseEnumMember",value:function(){var e=this.startNode();return e.id=this.match(133)?g(C(i.prototype),"parseStringLiteral",this).call(this,this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=g(C(i.prototype),"parseMaybeAssignAllowIn",this).call(this)),this.finishNode(e,"TSEnumMember")}},{key:"tsParseEnumDeclaration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}},{key:"tsParseModuleBlock",value:function(){var e=this.startNode();return this.scope.enter(0),this.expect(5),g(C(i.prototype),"parseBlockOrModuleBlockBody",this).call(this,e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}},{key:"tsParseModuleOrNamespaceDeclaration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){var i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}},{key:"tsParseAmbientExternalModuleDeclaration",value:function(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=g(C(i.prototype),"parseStringLiteral",this).call(this,this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}},{key:"tsParseImportEqualsDeclaration",value:function(e,t,i){e.isExport=i||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);var s=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(Li.ImportAliasHasImportType,{at:s}),e.moduleReference=s,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}},{key:"tsIsExternalModuleReference",value:function(){return this.isContextual(119)&&40===this.lookaheadCharCode()}},{key:"tsParseModuleReference",value:function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}},{key:"tsParseExternalModuleReference",value:function(){var e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=g(C(i.prototype),"parseExprAtom",this).call(this),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}},{key:"tsLookAhead",value:function(e){var t=this.state.clone(),i=e();return this.state=t,i}},{key:"tsTryParseAndCatch",value:function(e){var t=this.tryParse((function(t){return e()||t()}));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}},{key:"tsTryParse",value:function(e){var t=this.state.clone(),i=e();if(void 0!==i&&!1!==i)return i;this.state=t}},{key:"tsTryParseDeclare",value:function(e){var t=this;if(!this.isLineTerminator()){var s,r=this.state.type;return this.isContextual(100)&&(r=74,s="let"),this.tsInAmbientContext((function(){switch(r){case 68:return e.declare=!0,g(C(i.prototype),"parseFunctionStatement",t).call(t,e,!1,!1);case 80:return e.declare=!0,t.parseClass(e,!0,!1);case 126:return t.tsParseEnumDeclaration(e,{declare:!0});case 112:return t.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return t.match(75)&&t.isLookaheadContextual("enum")?(t.expect(75),t.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,t.parseVarStatement(e,s||t.state.value,!0));case 129:var a=t.tsParseInterfaceDeclaration(e,{declare:!0});if(a)return a;default:if(we(r))return t.tsParseDeclaration(e,t.state.value,!0,null)}}))}}},{key:"tsTryParseExportDeclaration",value:function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}},{key:"tsParseExpressionStatement",value:function(e,t,i){switch(t.name){case"declare":var s=this.tsTryParseDeclare(e);return s&&(s.declare=!0),s;case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);var r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,i)}}},{key:"tsParseDeclaration",value:function(e,t,i,s){switch(t){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||we(this.state.type)))return this.tsParseAbstractDeclaration(e,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(we(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&we(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&we(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}},{key:"tsCheckLineTerminator",value:function(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}},{key:"tsTryParseGenericAsyncArrowFunction",value:function(e){var t=this;if(this.match(47)){var s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;var r=this.tsTryParseAndCatch((function(){var s=t.startNodeAt(e);return s.typeParameters=t.tsParseTypeParameters(t.tsParseConstModifier),g(C(i.prototype),"parseFunctionParams",t).call(t,s),s.returnType=t.tsTryParseTypeOrTypePredicateAnnotation(),t.expect(19),s}));if(this.state.maybeInArrowParameters=s,r)return g(C(i.prototype),"parseArrowExpression",this).call(this,r,null,!0)}}},{key:"tsParseTypeArgumentsInExpression",value:function(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}},{key:"tsParseTypeArguments",value:function(){var e=this,t=this.startNode();return t.params=this.tsInType((function(){return e.tsInNoContext((function(){return e.expect(47),e.tsParseDelimitedList("TypeParametersOrArguments",e.tsParseType.bind(e))}))})),0===t.params.length?this.raise(Li.EmptyTypeArguments,{at:t}):this.state.inType||this.curContext()!==re.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}},{key:"tsIsDeclarationStart",value:function(){return Ue(this.state.type)}},{key:"isExportDefaultSpecifier",value:function(){return!this.tsIsDeclarationStart()&&g(C(i.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseAssignableListItem",value:function(e,t){var i=this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);var r=s.accessibility,a=s.override,n=s.readonly;4&e||!(r||n||a)||this.raise(Li.UnexpectedParameterModifier,{at:i});var o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);var h=this.parseMaybeDefault(o.loc.start,o);if(r||n||a){var l=this.startNodeAt(i);return t.length&&(l.decorators=t),r&&(l.accessibility=r),n&&(l.readonly=n),a&&(l.override=a),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(Li.UnsupportedParameterPropertyKind,{at:l}),l.parameter=h,this.finishNode(l,"TSParameterProperty")}return t.length&&(o.decorators=t),h}},{key:"isSimpleParameter",value:function(e){return"TSParameterProperty"===e.type&&g(C(i.prototype),"isSimpleParameter",this).call(this,e.parameter)||g(C(i.prototype),"isSimpleParameter",this).call(this,e)}},{key:"tsDisallowOptionalPattern",value:function(e){var t,i=l(e.params);try{for(i.s();!(t=i.n()).done;){var s=t.value;"Identifier"!==s.type&&s.optional&&!this.state.isAmbientContext&&this.raise(Li.PatternIsOptional,{at:s})}}catch(r){i.e(r)}finally{i.f()}}},{key:"setArrowFunctionParameters",value:function(e,t,s){g(C(i.prototype),"setArrowFunctionParameters",this).call(this,e,t,s),this.tsDisallowOptionalPattern(e)}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));var r="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):"TSDeclareFunction"===r&&this.state.isAmbientContext&&(this.raise(Li.DeclareFunctionHasImplementation,{at:e}),e.declare)?g(C(i.prototype),"parseFunctionBodyAndFinish",this).call(this,e,r,s):(this.tsDisallowOptionalPattern(e),g(C(i.prototype),"parseFunctionBodyAndFinish",this).call(this,e,t,s))}},{key:"registerFunctionStatementId",value:function(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):g(C(i.prototype),"registerFunctionStatementId",this).call(this,e)}},{key:"tsCheckForInvalidTypeCasts",value:function(e){var t=this;e.forEach((function(e){"TSTypeCastExpression"===(null==e?void 0:e.type)&&t.raise(Li.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}},{key:"toReferencedList",value:function(e,t){return this.tsCheckForInvalidTypeCasts(e),e}},{key:"parseArrayLike",value:function(e,t,s,r){var a=g(C(i.prototype),"parseArrayLike",this).call(this,e,t,s,r);return"ArrayExpression"===a.type&&this.tsCheckForInvalidTypeCasts(a.elements),a}},{key:"parseSubscript",value:function(e,t,s,r){var a=this;if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();var n=this.startNodeAt(t);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}var o=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(s)return r.stop=!0,e;r.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){var h,l=this.tsTryParseAndCatch((function(){if(!s&&a.atPossibleAsyncArrow(e)){var n=a.tsTryParseGenericAsyncArrowFunction(t);if(n)return n}var l=a.tsParseTypeArgumentsInExpression();if(l)if(!o||a.match(10)){if(Ve(a.state.type)){var c=g(C(i.prototype),"parseTaggedTemplateExpression",a).call(a,e,t,r);return c.typeParameters=l,c}if(!s&&a.eat(10)){var p=a.startNodeAt(t);return p.callee=e,p.arguments=a.parseCallExpressionArguments(11,!1),a.tsCheckForInvalidTypeCasts(p.arguments),p.typeParameters=l,r.optionalChainMember&&(p.optional=o),a.finishCallExpression(p,r.optionalChainMember)}var u=a.state.type;if(48!==u&&52!==u&&(10===u||!Ne(u)||a.hasPrecedingLineBreak())){var d=a.startNodeAt(t);return d.expression=e,d.typeParameters=l,a.finishNode(d,"TSInstantiationExpression")}}else h=a.state.curPosition()}));if(h&&this.unexpected(h,10),l)return"TSInstantiationExpression"===l.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(Li.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),l}return g(C(i.prototype),"parseSubscript",this).call(this,e,t,s,r)}},{key:"parseNewCallee",value:function(e){var t;g(C(i.prototype),"parseNewCallee",this).call(this,e);var s=e.callee;"TSInstantiationExpression"!==s.type||null!=(t=s.extra)&&t.parenthesized||(e.typeParameters=s.typeParameters,e.callee=s.expression)}},{key:"parseExprOp",value:function(e,t,s){var r,a=this;if(ze(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){var n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.tsInType((function(){return a.next(),a.match(75)?(r&&a.raise(Q.UnexpectedKeyword,{at:a.state.startLoc,keyword:"const"}),a.tsParseTypeReference()):a.tsParseType()})),this.finishNode(n,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,t,s)}return g(C(i.prototype),"parseExprOp",this).call(this,e,t,s)}},{key:"checkReservedWord",value:function(e,t,s,r){this.state.isAmbientContext||g(C(i.prototype),"checkReservedWord",this).call(this,e,t,s,r)}},{key:"checkImportReflection",value:function(e){g(C(i.prototype),"checkImportReflection",this).call(this,e),e.module&&"value"!==e.importKind&&this.raise(Li.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}},{key:"checkDuplicateExports",value:function(){}},{key:"isPotentialImportPhase",value:function(e){if(g(C(i.prototype),"isPotentialImportPhase",this).call(this,e))return!0;if(this.isContextual(130)){var t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}},{key:"applyImportPhase",value:function(e,t,s,r){g(C(i.prototype),"applyImportPhase",this).call(this,e,t,s,r),t?e.exportKind="type"===s?"type":"value":e.importKind="type"===s||"typeof"===s?s:"value"}},{key:"parseImport",value:function(e){if(this.match(133))return e.importKind="value",g(C(i.prototype),"parseImport",this).call(this,e);var t;if(we(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){var s=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,s);t=g(C(i.prototype),"parseImportSpecifiersAndAfter",this).call(this,e,s)}else t=g(C(i.prototype),"parseImport",this).call(this,e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(Li.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}},{key:"parseExport",value:function(e,t){if(this.match(83)){this.next();var s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,s,!0)}if(this.eat(29)){var r=e;return r.expression=g(C(i.prototype),"parseExpression",this).call(this),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}if(this.eatContextual(93)){var a=e;return this.expectContextual(128),a.id=this.parseIdentifier(),this.semicolon(),this.finishNode(a,"TSNamespaceExportDeclaration")}return g(C(i.prototype),"parseExport",this).call(this,e,t)}},{key:"isAbstractClass",value:function(){return this.isContextual(124)&&80===this.lookahead().type}},{key:"parseExportDefaultExpression",value:function(){if(this.isAbstractClass()){var e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){var t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return g(C(i.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseVarStatement",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.state.isAmbientContext,a=g(C(i.prototype),"parseVarStatement",this).call(this,e,t,s||r);if(!r)return a;var n,o=l(a.declarations);try{for(o.s();!(n=o.n()).done;){var h=n.value,c=h.id,p=h.init;p&&("const"!==t||c.typeAnnotation?this.raise(Li.InitializerNotAllowedInAmbientContext,{at:p}):Ri(p,this.hasPlugin("estree"))||this.raise(Li.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:p}))}}catch(u){o.e(u)}finally{o.f()}return a}},{key:"parseStatementContent",value:function(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){var s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){var r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return g(C(i.prototype),"parseStatementContent",this).call(this,e,t)}},{key:"parseAccessModifier",value:function(){return this.tsParseModifier(["public","protected","private"])}},{key:"tsHasSomeModifiers",value:function(e,t){return t.some((function(t){return Oi(t)?e.accessibility===t:!!e[t]}))}},{key:"tsIsStartOfStaticBlocks",value:function(){return this.isContextual(106)&&123===this.lookaheadCharCode()}},{key:"parseClassMember",value:function(e,t,s){var r=this,a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Li.InvalidModifierOnTypeParameterPositions},t);var n=function(){r.tsIsStartOfStaticBlocks()?(r.next(),r.next(),r.tsHasSomeModifiers(t,a)&&r.raise(Li.StaticBlockCannotHaveModifier,{at:r.state.curPosition()}),g(C(i.prototype),"parseClassStaticBlock",r).call(r,e,t)):r.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(n):n()}},{key:"parseClassMemberWithIsStatic",value:function(e,t,s,r){var a=this.tsTryParseIndexSignature(t);if(a)return e.body.push(a),t.abstract&&this.raise(Li.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(Li.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(Li.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(Li.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(Li.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(s.hadSuperClass||this.raise(Li.OverrideNotInSubClass,{at:t})),g(C(i.prototype),"parseClassMemberWithIsStatic",this).call(this,e,t,s,r)}},{key:"parsePostMemberNameModifiers",value:function(e){var t=this.eat(17);t&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(Li.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(Li.ClassMethodHasDeclare,{at:e})}},{key:"parseExpressionStatement",value:function(e,t,s){var r="Identifier"===t.type?this.tsParseExpressionStatement(e,t,s):void 0;return r||g(C(i.prototype),"parseExpressionStatement",this).call(this,e,t,s)}},{key:"shouldParseExportDeclaration",value:function(){return!!this.tsIsDeclarationStart()||g(C(i.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"parseConditional",value:function(e,t,s){var r=this;if(!this.state.maybeInArrowParameters||!this.match(17))return g(C(i.prototype),"parseConditional",this).call(this,e,t,s);var a=this.tryParse((function(){return g(C(i.prototype),"parseConditional",r).call(r,e,t)}));return a.node?(a.error&&(this.state=a.failState),a.node):(a.error&&g(C(i.prototype),"setOptionalParametersError",this).call(this,s,a.error),e)}},{key:"parseParenItem",value:function(e,t){if(e=g(C(i.prototype),"parseParenItem",this).call(this,e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){var s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}},{key:"parseExportDeclaration",value:function(e){var t=this;if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext((function(){return t.parseExportDeclaration(e)}));var s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Li.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});var a=we(this.state.type),n=a&&this.tsTryParseExportDeclaration()||g(C(i.prototype),"parseExportDeclaration",this).call(this,e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,s),n.declare=!0),n):null}},{key:"parseClassId",value:function(e,t,s,r){if(t&&!s||!this.isContextual(113)){g(C(i.prototype),"parseClassId",this).call(this,e,t,s,e.declare?1024:8331);var a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}}},{key:"parseClassPropertyAnnotation",value:function(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));var t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}},{key:"parseClassProperty",value:function(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(29)&&this.raise(Li.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){var t=e.key;this.raise(Li.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?"[".concat(this.input.slice(t.start,t.end),"]"):t.name})}return g(C(i.prototype),"parseClassProperty",this).call(this,e)}},{key:"parseClassPrivateProperty",value:function(e){return e.abstract&&this.raise(Li.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(Li.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),g(C(i.prototype),"parseClassPrivateProperty",this).call(this,e)}},{key:"parseClassAccessorProperty",value:function(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(Li.AccessorCannotBeOptional,{at:e}),g(C(i.prototype),"parseClassAccessorProperty",this).call(this,e)}},{key:"pushClassMethod",value:function(e,t,s,r,a,n){var o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&a&&this.raise(Li.ConstructorHasTypeParameters,{at:o});var h=t.declare,l=void 0!==h&&h,c=t.kind;!l||"get"!==c&&"set"!==c||this.raise(Li.DeclareAccessor,{at:t,kind:c}),o&&(t.typeParameters=o),g(C(i.prototype),"pushClassMethod",this).call(this,e,t,s,r,a,n)}},{key:"pushClassPrivateMethod",value:function(e,t,s,r){var a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),g(C(i.prototype),"pushClassPrivateMethod",this).call(this,e,t,s,r)}},{key:"declareClassPrivateMethodInScope",value:function(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"!==e.type||e.value.body)&&g(C(i.prototype),"declareClassPrivateMethodInScope",this).call(this,e,t)}},{key:"parseClassSuper",value:function(e){g(C(i.prototype),"parseClassSuper",this).call(this,e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}},{key:"parseObjPropValue",value:function(e,t,s,r,a,n,o){var h=this.tsTryParseTypeParameters(this.tsParseConstModifier);return h&&(e.typeParameters=h),g(C(i.prototype),"parseObjPropValue",this).call(this,e,t,s,r,a,n,o)}},{key:"parseFunctionParams",value:function(e,t){var s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),g(C(i.prototype),"parseFunctionParams",this).call(this,e,t)}},{key:"parseVarId",value:function(e,t){g(C(i.prototype),"parseVarId",this).call(this,e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);var s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}},{key:"parseAsyncArrowFromCallExpression",value:function(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),g(C(i.prototype),"parseAsyncArrowFromCallExpression",this).call(this,e,t)}},{key:"parseMaybeAssign",value:function(e,t){var s,r,a,n,o,h,l,c,p,u=this;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(h=this.state.clone(),l=this.tryParse((function(){return g(C(i.prototype),"parseMaybeAssign",u).call(u,e,t)}),h),!l.error)return l.node;var d=this.state.context,f=d[d.length-1];f!==re.j_oTag&&f!==re.j_expr||d.pop()}if((null==(s=l)||!s.error)&&!this.match(47))return g(C(i.prototype),"parseMaybeAssign",this).call(this,e,t);h&&h!==this.state||(h=this.state.clone());var y=this.tryParse((function(s){var r,a;p=u.tsParseTypeParameters(u.tsParseConstModifier);var n=g(C(i.prototype),"parseMaybeAssign",u).call(u,e,t);return("ArrowFunctionExpression"!==n.type||null!=(r=n.extra)&&r.parenthesized)&&s(),0!==(null==(a=p)?void 0:a.params.length)&&u.resetStartLocationFromNode(n,p),n.typeParameters=p,n}),h);if(!y.error&&!y.aborted)return p&&this.reportReservedArrowTypeParam(p),y.node;if(!l&&(Ni(!this.hasPlugin("jsx")),c=this.tryParse((function(){return g(C(i.prototype),"parseMaybeAssign",u).call(u,e,t)}),h),!c.error))return c.node;if(null!=(r=l)&&r.node)return this.state=l.failState,l.node;if(y.node)return this.state=y.failState,p&&this.reportReservedArrowTypeParam(p),y.node;if(null!=(a=c)&&a.node)return this.state=c.failState,c.node;throw(null==(n=l)?void 0:n.error)||y.error||(null==(o=c)?void 0:o.error)}},{key:"reportReservedArrowTypeParam",value:function(e){var t;1!==e.params.length||e.params[0].constraint||null!=(t=e.extra)&&t.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(Li.ReservedArrowTypeParam,{at:e})}},{key:"parseMaybeUnary",value:function(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():g(C(i.prototype),"parseMaybeUnary",this).call(this,e,t)}},{key:"parseArrow",value:function(e){var t=this;if(this.match(14)){var s=this.tryParse((function(e){var i=t.tsParseTypeOrTypePredicateAnnotation(14);return!t.canInsertSemicolon()&&t.match(19)||e(),i}));if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return g(C(i.prototype),"parseArrow",this).call(this,e)}},{key:"parseAssignableListItemTypes",value:function(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);var i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.resetEndLocation(e),e}},{key:"isAssignable",value:function(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return g(C(i.prototype),"isAssignable",this).call(this,e,t)}}},{key:"toAssignable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(Li.UnexpectedTypeCastInParameter,{at:e}):this.raise(Li.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left));default:g(C(i.prototype),"toAssignable",this).call(this,e,t)}}},{key:"toAssignableParenthesizedExpression",value:function(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:g(C(i.prototype),"toAssignable",this).call(this,e,t)}}},{key:"checkToRestConversion",value:function(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:g(C(i.prototype),"checkToRestConversion",this).call(this,e,t)}}},{key:"isValidLVal",value:function(e,t,s){return Ci({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(64!==s||!t)&&["expression",!0],TSSatisfiesExpression:(64!==s||!t)&&["expression",!0],TSTypeAssertion:(64!==s||!t)&&["expression",!0]},e)||g(C(i.prototype),"isValidLVal",this).call(this,e,t,s)}},{key:"parseBindingAtom",value:function(){return 78===this.state.type?this.parseIdentifier(!0):g(C(i.prototype),"parseBindingAtom",this).call(this)}},{key:"parseMaybeDecoratorArguments",value:function(e){if(this.match(47)||this.match(51)){var t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){var s=g(C(i.prototype),"parseMaybeDecoratorArguments",this).call(this,e);return s.typeParameters=t,s}this.unexpected(null,10)}return g(C(i.prototype),"parseMaybeDecoratorArguments",this).call(this,e)}},{key:"checkCommaAfterRest",value:function(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):g(C(i.prototype),"checkCommaAfterRest",this).call(this,e)}},{key:"isClassMethod",value:function(){return this.match(47)||g(C(i.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(35)||this.match(14)||g(C(i.prototype),"isClassProperty",this).call(this)}},{key:"parseMaybeDefault",value:function(e,t){var s=g(C(i.prototype),"parseMaybeDefault",this).call(this,e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start0))&&_i(e.object)}function Ri(e,t){var i,s=e.type;if(null!=(i=e.extra)&&i.parenthesized)return!1;if(t){if("Literal"===s){var r=e.value;if("string"===typeof r||"boolean"===typeof r)return!0}}else if("StringLiteral"===s||"BooleanLiteral"===s)return!0;return!(!ji(e,t)&&!Ui(e,t))||("TemplateLiteral"===s&&0===e.expressions.length||!!Bi(e))}function ji(e,t){return t?"Literal"===e.type&&("number"===typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Ui(e,t){if("UnaryExpression"===e.type){var i=e.operator,s=e.argument;if("-"===i&&ji(s,t))return!0}return!1}function _i(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&_i(e.object)}var zi=$(h||(h=I(["placeholders"])))({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Hi=function(e){return function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"parsePlaceholder",value:function(e){if(this.match(144)){var t=this.startNode();return this.next(),this.assertNoSpace(),t.name=g(C(i.prototype),"parseIdentifier",this).call(this,!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(t,e)}}},{key:"finishPlaceholder",value:function(e,t){var i=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,i?e:this.finishNode(e,"Placeholder")}},{key:"getTokenFromCode",value:function(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(144,2):g(C(i.prototype),"getTokenFromCode",this).call(this,e)}},{key:"parseExprAtom",value:function(e){return this.parsePlaceholder("Expression")||g(C(i.prototype),"parseExprAtom",this).call(this,e)}},{key:"parseIdentifier",value:function(e){return this.parsePlaceholder("Identifier")||g(C(i.prototype),"parseIdentifier",this).call(this,e)}},{key:"checkReservedWord",value:function(e,t,s,r){void 0!==e&&g(C(i.prototype),"checkReservedWord",this).call(this,e,t,s,r)}},{key:"parseBindingAtom",value:function(){return this.parsePlaceholder("Pattern")||g(C(i.prototype),"parseBindingAtom",this).call(this)}},{key:"isValidLVal",value:function(e,t,s){return"Placeholder"===e||g(C(i.prototype),"isValidLVal",this).call(this,e,t,s)}},{key:"toAssignable",value:function(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":g(C(i.prototype),"toAssignable",this).call(this,e,t)}},{key:"chStartsBindingIdentifier",value:function(e,t){if(g(C(i.prototype),"chStartsBindingIdentifier",this).call(this,e,t))return!0;var s=this.lookahead();return 144===s.type}},{key:"verifyBreakContinue",value:function(e,t){e.label&&"Placeholder"===e.label.type||g(C(i.prototype),"verifyBreakContinue",this).call(this,e,t)}},{key:"parseExpressionStatement",value:function(e,t){var s;if("Placeholder"!==t.type||null!=(s=t.extra)&&s.parenthesized)return g(C(i.prototype),"parseExpressionStatement",this).call(this,e,t);if(this.match(14)){var r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=g(C(i.prototype),"parseStatementOrSloppyAnnexBFunctionDeclaration",this).call(this),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}},{key:"parseBlock",value:function(e,t,s){return this.parsePlaceholder("BlockStatement")||g(C(i.prototype),"parseBlock",this).call(this,e,t,s)}},{key:"parseFunctionId",value:function(e){return this.parsePlaceholder("Identifier")||g(C(i.prototype),"parseFunctionId",this).call(this,e)}},{key:"parseClass",value:function(e,t,s){var r=t?"ClassDeclaration":"ClassExpression";this.next();var a=this.state.strict,n=this.parsePlaceholder("Identifier");if(n){if(!(this.match(81)||this.match(144)||this.match(5))){if(s||!t)return e.id=null,e.body=this.finishPlaceholder(n,"ClassBody"),this.finishNode(e,r);throw this.raise(zi.ClassNameIsRequired,{at:this.state.startLoc})}e.id=n}else this.parseClassId(e,t,s);return g(C(i.prototype),"parseClassSuper",this).call(this,e),e.body=this.parsePlaceholder("ClassBody")||g(C(i.prototype),"parseClassBody",this).call(this,!!e.superClass,a),this.finishNode(e,r)}},{key:"parseExport",value:function(e,t){var s=this.parsePlaceholder("Identifier");if(!s)return g(C(i.prototype),"parseExport",this).call(this,e,t);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");var r=this.startNode();return r.exported=s,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],g(C(i.prototype),"parseExport",this).call(this,e,t)}},{key:"isExportDefaultSpecifier",value:function(){if(this.match(65)){var e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(_e(144),this.nextTokenStartSince(e+4)))return!0}return g(C(i.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"maybeParseExportDefaultSpecifier",value:function(e,t){var s;return!(null==(s=e.specifiers)||!s.length)||g(C(i.prototype),"maybeParseExportDefaultSpecifier",this).call(this,e,t)}},{key:"checkExport",value:function(e){var t=e.specifiers;null!=t&&t.length&&(e.specifiers=t.filter((function(e){return"Placeholder"===e.exported.type}))),g(C(i.prototype),"checkExport",this).call(this,e),e.specifiers=t}},{key:"parseImport",value:function(e){var t=this.parsePlaceholder("Identifier");if(!t)return g(C(i.prototype),"parseImport",this).call(this,e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");var s=this.startNodeAtNode(t);if(s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)){var r=this.maybeParseStarImportSpecifier(e);r||this.parseNamedImportSpecifiers(e)}return this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.parsePlaceholder("StringLiteral")||g(C(i.prototype),"parseImportSource",this).call(this)}},{key:"assertNoSpace",value:function(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(zi.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}]),i}(e)},Vi=function(e){return function(e){b(i,e);var t=A(i);function i(){return D(this,i),t.apply(this,arguments)}return L(i,[{key:"parseV8Intrinsic",value:function(){if(this.match(54)){var e=this.state.startLoc,t=this.startNode();if(this.next(),we(this.state.type)){var i=this.parseIdentifierName(),s=this.createIdentifier(t,i);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(e)}}},{key:"parseExprAtom",value:function(e){return this.parseV8Intrinsic()||g(C(i.prototype),"parseExprAtom",this).call(this,e)}}]),i}(e)};function qi(e,t){var i="string"===typeof t?[t,{}]:t,s=f(i,2),r=s[0],a=s[1],n=Object.keys(a),o=0===n.length;return e.some((function(e){if("string"===typeof e)return o&&e===r;var t=f(e,2),i=t[0],s=t[1];if(i!==r)return!1;for(var h=0,l=n;h1?s[1][i]:null}var Ji=["minimal","fsharp","hack","smart"],Wi=["^^","@@","^","%","#"],Xi=["hash","bar"];function Gi(e){if(qi(e,"decorators")){if(qi(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var t=Ki(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!==typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");var i=Ki(e,"decorators","allowCallParenthesized");if(null!=i&&"boolean"!==typeof i)throw new Error("'allowCallParenthesized' must be a boolean.")}if(qi(e,"flow")&&qi(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(qi(e,"placeholders")&&qi(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(qi(e,"pipelineOperator")){var s=Ki(e,"pipelineOperator","proposal");if(!Ji.includes(s)){var r=Ji.map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error('"pipelineOperator" requires "proposal" option whose value must be one of: '.concat(r,"."))}var a=qi(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===s){if(qi(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(qi(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");var n=Ki(e,"pipelineOperator","topicToken");if(!Wi.includes(n)){var o=Wi.map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error('"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: '.concat(o,"."))}if("#"===n&&a)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===s&&a)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(qi(e,"moduleAttributes")){if(qi(e,"importAssertions")||qi(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");var h=Ki(e,"moduleAttributes","version");if("may-2020"!==h)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(qi(e,"importAssertions")&&qi(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(qi(e,"recordAndTuple")&&null!=Ki(e,"recordAndTuple","syntaxType")&&!Xi.includes(Ki(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Xi.map((function(e){return"'".concat(e,"'")})).join(", "));if(qi(e,"asyncDoExpressions")&&!qi(e,"doExpressions")){var l=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw l.missingPlugins="doExpressions",l}if(qi(e,"optionalChainingAssign")&&"2023-07"!==Ki(e,"optionalChainingAssign","version"))throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Yi={estree:ie,jsx:bi,flow:vi,typescript:Fi,v8intrinsic:Vi,placeholders:Hi},$i=Object.keys(Yi),Qi={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Zi(e){if(null==e)return Object.assign({},Qi);if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(var t={},i=0,s=Object.keys(Qi);i=l&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=l&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}return i&&this.checkExpressionErrors(e,!0),n}},{key:"parseMaybeConditional",value:function(e){var t=this.state.startLoc,i=this.state.potentialArrowAt,s=this.parseExprOps(e);return this.shouldExitDescending(s,i)?s:this.parseConditional(s,t,e)}},{key:"parseConditional",value:function(e,t,i){if(this.eat(17)){var s=this.startNodeAt(t);return s.test=e,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return e}},{key:"parseMaybeUnaryOrPrivate",value:function(e){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(e)}},{key:"parseExprOps",value:function(e){var t=this.state.startLoc,i=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(s,i)?s:this.parseExprOp(s,t,-1)}},{key:"parseExprOp",value:function(e,t,i){if(this.isPrivateName(e)){var s=this.getPrivateNameSV(e);(i>=ze(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(Q.PrivateInExpectedIn,{at:e,identifierName:s}),this.classScope.usePrivateName(s,e.loc.start)}var r=this.state.type;if(Fe(r)&&(this.prodParam.hasIn||!this.match(58))){var a=ze(r);if(a>i){if(39===r){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}var n=this.startNodeAt(t);n.left=e,n.operator=this.state.value;var o=41===r||42===r,h=40===r;if(h&&(a=ze(42)),this.next(),39===r&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(Q.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});n.right=this.parseExprOpRightExpr(r,a);var l=this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(h&&(41===c||42===c)||o&&40===c)throw this.raise(Q.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(l,t,i)}}return e}},{key:"parseExprOpRightExpr",value:function(e,t){var i=this,s=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((function(){return i.parseHackPipeBody()}));case"smart":return this.withTopicBindingContext((function(){if(i.prodParam.hasYield&&i.isContextual(108))throw i.raise(Q.PipeBodyIsTighter,{at:i.state.startLoc});return i.parseSmartPipelineBodyInStyle(i.parseExprOpBaseRightExpr(e,t),s)}));case"fsharp":return this.withSoloAwaitPermittingContext((function(){return i.parseFSharpPipelineBody(t)}))}default:return this.parseExprOpBaseRightExpr(e,t)}}},{key:"parseExprOpBaseRightExpr",value:function(e,t){var i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),i,He(e)?t-1:t)}},{key:"parseHackPipeBody",value:function(){var e,t=this.state.startLoc,i=this.parseMaybeAssign(),s=K.has(i.type);return!s||null!=(e=i.extra)&&e.parenthesized||this.raise(Q.PipeUnparenthesizedBody,{at:t,type:i.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(Q.PipeTopicUnused,{at:t}),i}},{key:"checkExponentialAfterUnary",value:function(e){this.match(57)&&this.raise(Q.UnexpectedTokenUnaryExponentiation,{at:e.argument})}},{key:"parseMaybeUnary",value:function(e,t){var i=this.state.startLoc,s=this.isContextual(96);if(s&&this.isAwaitAllowed()){this.next();var r=this.parseAwait(i);return t||this.checkExponentialAfterUnary(r),r}var a=this.match(34),n=this.startNode();if(Re(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");var o=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&o){var h=n.argument;"Identifier"===h.type?this.raise(Q.StrictDelete,{at:n}):this.hasPropertyAsPrivateName(h)&&this.raise(Q.DeletePrivateField,{at:n})}if(!a)return t||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}var l=this.parseUpdate(n,a,e);if(s){var c=this.state.type,p=this.hasPlugin("v8intrinsic")?Ne(c):Ne(c)&&!this.match(54);if(p&&!this.isAmbiguousAwait())return this.raiseOverwrite(Q.AwaitNotInAsyncContext,{at:i}),this.parseAwait(i)}return l}},{key:"parseUpdate",value:function(e,t,i){if(t){var s=e;return this.checkLVal(s.argument,{in:this.finishNode(s,"UpdateExpression")}),e}var r=this.state.startLoc,a=this.parseExprSubscripts(i);if(this.checkExpressionErrors(i,!1))return a;while(Be(this.state.type)&&!this.canInsertSemicolon()){var n=this.startNodeAt(r);n.operator=this.state.value,n.prefix=!1,n.argument=a,this.next(),this.checkLVal(a,{in:a=this.finishNode(n,"UpdateExpression")})}return a}},{key:"parseExprSubscripts",value:function(e){var t=this.state.startLoc,i=this.state.potentialArrowAt,s=this.parseExprAtom(e);return this.shouldExitDescending(s,i)?s:this.parseSubscripts(s,t)}},{key:"parseSubscripts",value:function(e,t,i){var s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,i,s),s.maybeAsyncArrow=!1}while(!s.stop);return e}},{key:"parseSubscript",value:function(e,t,i,s){var r=this.state.type;if(!i&&15===r)return this.parseBind(e,t,i,s);if(Ve(r))return this.parseTaggedTemplateExpression(e,t,s);var a=!1;if(18===r){if(i&&(this.raise(Q.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return s.stop=!0,e;s.optionalChainMember=a=!0,this.next()}if(!i&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,s,a);var n=this.eat(0);return n||a||this.eat(16)?this.parseMember(e,t,s,n,a):(s.stop=!0,e)}},{key:"parseMember",value:function(e,t,i,s,r){var a=this.startNodeAt(t);return a.object=e,a.computed=s,s?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?("Super"===e.type&&this.raise(Q.SuperPrivateField,{at:t}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),i.optionalChainMember?(a.optional=r,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}},{key:"parseBind",value:function(e,t,i,s){var r=this.startNodeAt(t);return r.object=e,this.next(),r.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),t,i)}},{key:"parseCoverCallAndAsyncArrowHead",value:function(e,t,i,s){var r=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();var n=this.startNodeAt(t);n.callee=e;var o=i.maybeAsyncArrow,h=i.optionalChainMember;o&&(this.expressionScope.enter(Qt()),a=new si),h&&(n.optional=s),n.arguments=s?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,n,a);var l=this.finishCallExpression(n,h);return o&&this.shouldParseAsyncArrow()&&!s?(i.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=r,l}},{key:"toReferencedArguments",value:function(e,t){this.toReferencedListDeep(e.arguments,t)}},{key:"parseTaggedTemplateExpression",value:function(e,t,i){var s=this.startNodeAt(t);return s.tag=e,s.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(Q.OptionalChainingNoTemplate,{at:t}),this.finishNode(s,"TaggedTemplateExpression")}},{key:"atPossibleAsyncArrow",value:function(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.state.potentialArrowAt}},{key:"expectImportAttributesPlugin",value:function(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}},{key:"finishCallExpression",value:function(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),0===e.arguments.length||e.arguments.length>2)this.raise(Q.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else{var i,s=l(e.arguments);try{for(s.s();!(i=s.n()).done;){var r=i.value;"SpreadElement"===r.type&&this.raise(Q.ImportCallSpreadArgument,{at:r})}}catch(a){s.e(a)}finally{s.f()}}return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}},{key:"parseCallExpressionArguments",value:function(e,t,i,s,r){var a=[],n=!0,o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;while(!this.eat(e)){if(n)n=!1;else if(this.expect(12),this.match(e)){!t||this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(Q.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,r,i))}return this.state.inFSharpPipelineDirectBody=o,a}},{key:"shouldParseAsyncArrow",value:function(){return this.match(19)&&!this.canInsertSemicolon()}},{key:"parseAsyncArrowFromCallExpression",value:function(e,t){var i;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(i=t.extra)?void 0:i.trailingCommaLoc),t.innerComments&&Pt(e,t.innerComments),t.callee.trailingComments&&Pt(e,t.callee.trailingComments),e}},{key:"parseNoCallExpr",value:function(){var e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}},{key:"parseExprAtom",value:function(e){var t,i=null,s=this.state.type;switch(s){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):this.match(10)?this.options.createImportExpressions?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(Q.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:var r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r);case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:i=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(i,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:t=this.startNode(),this.next(),t.object=null;var a=t.callee=this.parseNoCallExpr();if("MemberExpression"===a.type)return this.finishNode(t,"BindExpression");throw this.raise(Q.UnsupportedBind,{at:a});case 138:return this.raise(Q.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:var n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break;case 47:var o=this.input.codePointAt(this.nextTokenStart());Qe(o)||62===o?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break;default:if(we(s)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();var h=this.state.potentialArrowAt===this.state.start,l=this.state.containsEsc,c=this.parseIdentifier();if(!l&&"async"===c.name&&!this.canInsertSemicolon()){var p=this.state.type;if(68===p)return this.resetPreviousNodeTrailingComments(c),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(c));if(we(p))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(c)):c;if(90===p)return this.resetPreviousNodeTrailingComments(c),this.parseDo(this.startNodeAtNode(c),!0)}return h&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(c),[c],!1)):c}this.unexpected()}}},{key:"parseTopicReferenceThenEqualsSign",value:function(e,t){var i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=j(this.state.endLoc,-1),this.parseTopicReference(i);this.unexpected()}},{key:"parseTopicReference",value:function(e){var t=this.startNode(),i=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(t,i,e,s)}},{key:"finishTopicReference",value:function(e,t,i,s){if(this.testTopicReferenceConfiguration(i,t,s)){var r="smart"===i?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===i?Q.PrimaryTopicNotAllowed:Q.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,r)}throw this.raise(Q.PipeTopicUnconfiguredToken,{at:t,token:_e(s)})}},{key:"testTopicReferenceConfiguration",value:function(e,t,i){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:_e(i)}]);case"smart":return 27===i;default:throw this.raise(Q.PipeTopicRequiresHackPipes,{at:t})}}},{key:"parseAsyncArrowUnaryFunction",value:function(e){this.prodParam.enter(ti(!0,this.prodParam.hasYield));var t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(Q.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}},{key:"parseDo",value:function(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();var i=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=i,this.finishNode(e,"DoExpression")}},{key:"parseSuper",value:function(){var e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(Q.UnexpectedSuper,{at:e}):this.raise(Q.SuperNotAllowed,{at:e}),this.match(10)||this.match(0)||this.match(16)||this.raise(Q.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}},{key:"parsePrivateName",value:function(){var e=this.startNode(),t=this.startNodeAt(j(this.state.startLoc,1)),i=this.state.value;return this.next(),e.id=this.createIdentifier(t,i),this.finishNode(e,"PrivateName")}},{key:"parseFunctionOrFunctionSent",value:function(){var e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){var t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}},{key:"parseMetaProperty",value:function(e,t,i){e.meta=t;var s=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==i||s)&&this.raise(Q.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:i}),this.finishNode(e,"MetaProperty")}},{key:"parseImportMetaProperty",value:function(e){var t=this.createIdentifier(this.startNodeAtNode(e),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(Q.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){var i=this.isContextual(105);if(i||this.unexpected(),this.expectPlugin(i?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(Q.DynamicImportPhaseRequiresImportExpressions,{at:this.state.startLoc,phase:this.state.value});return this.next(),e.phase=i?"source":"defer",this.parseImportCall(e)}return this.parseMetaProperty(e,t,"meta")}},{key:"parseLiteralAtNode",value:function(e,t,i){return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(i.start,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)}},{key:"parseLiteral",value:function(e,t){var i=this.startNode();return this.parseLiteralAtNode(e,t,i)}},{key:"parseStringLiteral",value:function(e){return this.parseLiteral(e,"StringLiteral")}},{key:"parseNumericLiteral",value:function(e){return this.parseLiteral(e,"NumericLiteral")}},{key:"parseBigIntLiteral",value:function(e){return this.parseLiteral(e,"BigIntLiteral")}},{key:"parseDecimalLiteral",value:function(e){return this.parseLiteral(e,"DecimalLiteral")}},{key:"parseRegExpLiteral",value:function(e){var t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}},{key:"parseBooleanLiteral",value:function(e){var t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}},{key:"parseNullLiteral",value:function(){var e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}},{key:"parseParenAndDistinguishExpression",value:function(e){var t,i=this.state.startLoc;this.next(),this.expressionScope.enter($t());var s=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;var a,n,o=this.state.startLoc,h=[],l=new si,c=!0;while(!this.match(11)){if(c)c=!1;else if(this.expect(12,null===l.optionalParametersLoc?null:l.optionalParametersLoc),this.match(11)){n=this.state.startLoc;break}if(this.match(21)){var p=this.state.startLoc;if(a=this.state.startLoc,h.push(this.parseParenItem(this.parseRestBinding(),p)),!this.checkCommaAfterRest(41))break}else h.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}var u=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=r;var d=this.startNodeAt(i);return e&&this.shouldParseArrow(h)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,h,!1),d):(this.expressionScope.exit(),h.length||this.unexpected(this.state.lastTokStartLoc),n&&this.unexpected(n),a&&this.unexpected(a),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(h,!0),h.length>1?(t=this.startNodeAt(o),t.expressions=h,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,u)):t=h[0],this.wrapParenthesis(i,t))}},{key:"wrapParenthesis",value:function(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;var i=this.startNodeAt(e);return i.expression=t,this.finishNode(i,"ParenthesizedExpression")}},{key:"shouldParseArrow",value:function(e){return!this.canInsertSemicolon()}},{key:"parseArrow",value:function(e){if(this.eat(19))return e}},{key:"parseParenItem",value:function(e,t){return e}},{key:"parseNewOrNewTarget",value:function(){var e=this.startNode();if(this.next(),this.match(16)){var t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();var i=this.parseMetaProperty(e,t,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.options.allowNewTargetOutsideFunction||this.raise(Q.UnexpectedNewTarget,{at:i}),i}return this.parseNew(e)}},{key:"parseNew",value:function(e){if(this.parseNewCallee(e),this.eat(10)){var t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}},{key:"parseNewCallee",value:function(e){var t=this.match(83),i=this.parseNoCallExpr();e.callee=i,!t||"Import"!==i.type&&"ImportExpression"!==i.type||this.raise(Q.ImportCallNotNewExpression,{at:i})}},{key:"parseTemplateElement",value:function(e){var t=this.state,i=t.start,s=t.startLoc,r=t.end,a=t.value,n=i+1,o=this.startNodeAt(j(s,1));null===a&&(e||this.raise(Q.InvalidEscapeSequenceTemplate,{at:j(this.state.firstInvalidTemplateEscapePos,1)}));var h=this.match(24),l=h?-1:-2,c=r+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,"\n"),cooked:null===a?null:a.slice(1,l)},o.tail=h,this.next();var p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,j(this.state.lastTokEndLoc,l)),p}},{key:"parseTemplate",value:function(e){var t=this.startNode();t.expressions=[];var i=this.parseTemplateElement(e);t.quasis=[i];while(!i.tail)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(i=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}},{key:"parseTemplateSubstitution",value:function(){return this.parseExpression()}},{key:"parseObjectLike",value:function(e,t,i,s){i&&this.expectPlugin("recordAndTuple");var r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var a=Object.create(null),n=!0,o=this.startNode();o.properties=[],this.next();while(!this.match(e)){if(n)n=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}var h=void 0;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),this.checkProto(h,i,a,s)),i&&!this.isObjectProperty(h)&&"SpreadElement"!==h.type&&this.raise(Q.InvalidRecordProperty,{at:h}),h.shorthand&&this.addExtra(h,"shorthand",!0),o.properties.push(h)}this.next(),this.state.inFSharpPipelineDirectBody=r;var l="ObjectExpression";return t?l="ObjectPattern":i&&(l="RecordExpression"),this.finishNode(o,l)}},{key:"addTrailingCommaExtraToNode",value:function(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}},{key:"maybeAsyncOrAccessorProp",value:function(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}},{key:"parsePropertyDefinition",value:function(e){var t=[];if(this.match(26)){this.hasPlugin("decorators")&&this.raise(Q.UnsupportedPropertyDecorator,{at:this.state.startLoc});while(this.match(26))t.push(this.parseDecorator())}var i,s=this.startNode(),r=!1,a=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t,t=[]),s.method=!1,e&&(i=this.state.startLoc);var n=this.eat(55);this.parsePropertyNamePrefixOperator(s);var o=this.state.containsEsc,h=this.parsePropertyName(s,e);if(!n&&!o&&this.maybeAsyncOrAccessorProp(s)){var l=h.name;"async"!==l||this.hasPrecedingLineBreak()||(r=!0,this.resetPreviousNodeTrailingComments(h),n=this.eat(55),this.parsePropertyName(s)),"get"!==l&&"set"!==l||(a=!0,this.resetPreviousNodeTrailingComments(h),s.kind=l,this.match(55)&&(n=!0,this.raise(Q.AccessorIsGenerator,{at:this.state.curPosition(),kind:l}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,i,n,r,!1,a,e)}},{key:"getGetterSetterExpectedParamCount",value:function(e){return"get"===e.kind?0:1}},{key:"getObjectOrClassMethodParams",value:function(e){return e.params}},{key:"checkGetterSetterParams",value:function(e){var t,i=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==i&&this.raise("get"===e.kind?Q.BadGetterArity:Q.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=s[s.length-1])?void 0:t.type)&&this.raise(Q.BadSetterRestParameter,{at:e})}},{key:"parseObjectMethod",value:function(e,t,i,s,r){if(r){var a=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(i||t||this.match(10))return s&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,i,!1,!1,"ObjectMethod")}},{key:"parseObjectProperty",value:function(e,t,i,s){if(e.shorthand=!1,this.eat(14))return e.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),i)e.value=this.parseMaybeDefault(t,oi(e.key));else if(this.match(29)){var r=this.state.startLoc;null!=s?null===s.shorthandAssignLoc&&(s.shorthandAssignLoc=r):this.raise(Q.InvalidCoverInitializedName,{at:r}),e.value=this.parseMaybeDefault(t,oi(e.key))}else e.value=oi(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}},{key:"parseObjPropValue",value:function(e,t,i,s,r,a,n){var o=this.parseObjectMethod(e,i,s,r,a)||this.parseObjectProperty(e,t,r,n);return o||this.unexpected(),o}},{key:"parsePropertyName",value:function(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{var i,s=this.state,r=s.type,a=s.value;if(Se(r))i=this.parseIdentifier(!0);else switch(r){case 134:i=this.parseNumericLiteral(a);break;case 133:i=this.parseStringLiteral(a);break;case 135:i=this.parseBigIntLiteral(a);break;case 136:i=this.parseDecimalLiteral(a);break;case 138:var n=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=n):this.raise(Q.UnexpectedPrivateField,{at:n}),i=this.parsePrivateName();break;default:this.unexpected()}e.key=i,138!==r&&(e.computed=!1)}return e.key}},{key:"initFunction",value:function(e,t){e.id=null,e.generator=!1,e.async=t}},{key:"parseMethod",value:function(e,t,i,s,r,a){var n=arguments.length>6&&void 0!==arguments[6]&&arguments[6];this.initFunction(e,i),e.generator=t,this.scope.enter(18|(n?64:0)|(r?32:0)),this.prodParam.enter(ti(i,e.generator)),this.parseFunctionParams(e,s);var o=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),o}},{key:"parseArrayLike",value:function(e,t,i,s){i&&this.expectPlugin("recordAndTuple");var r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!i,s,a),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,i?"TupleExpression":"ArrayExpression")}},{key:"parseArrowExpression",value:function(e,t,i,s){this.scope.enter(6);var r=ti(i,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(e,i);var a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,"ArrowFunctionExpression")}},{key:"setArrowFunctionParameters",value:function(e,t,i){this.toAssignableList(t,i,!1),e.params=t}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.parseFunctionBody(e,!1,i),this.finishNode(e,t)}},{key:"parseFunctionBody",value:function(e,t){var i=this,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t&&!this.match(5);if(this.expressionScope.enter(Zt()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{var a=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(function(r){var n=!i.isSimpleParamList(e.params);r&&n&&i.raise(Q.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});var o=!a&&i.state.strict;i.checkParams(e,!i.state.strict&&!t&&!s&&!n,t,o),i.state.strict&&e.id&&i.checkIdentifier(e.id,65,o)})),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}},{key:"isSimpleParameter",value:function(e){return"Identifier"===e.type}},{key:"isSimpleParamList",value:function(e){for(var t=0,i=e.length;t3&&void 0!==arguments[3])||arguments[3],a=!t&&new Set,n={type:"FormalParameters"},o=l(e.params);try{for(o.s();!(s=o.n()).done;){var h=s.value;this.checkLVal(h,{in:n,binding:5,checkClashes:a,strictModeChanged:r})}}catch(c){o.e(c)}finally{o.f()}}},{key:"parseExprList",value:function(e,t,i,s){var r=[],a=!0;while(!this.eat(e)){if(a)a=!1;else if(this.expect(12),this.match(e)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}r.push(this.parseExprListItem(t,i))}return r}},{key:"parseExprListItem",value:function(e,t,i){var s;if(this.match(12))e||this.raise(Q.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),s=null;else if(this.match(21)){var r=this.state.startLoc;s=this.parseParenItem(this.parseSpread(t),r)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(Q.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});var a=this.startNode();this.next(),s=this.finishNode(a,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return s}},{key:"parseIdentifier",value:function(e){var t=this.startNode(),i=this.parseIdentifierName(e);return this.createIdentifier(t,i)}},{key:"createIdentifier",value:function(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}},{key:"parseIdentifierName",value:function(e){var t,i=this.state,s=i.startLoc,r=i.type;Se(r)?t=this.state.value:this.unexpected();var a=Ee(r);return e?a&&this.replaceToken(132):this.checkReservedWord(t,s,a,!1),this.next(),t}},{key:"checkReservedWord",value:function(e,t,i,s){if(!(e.length>10)&&pt(e))if(i&&ht(e))this.raise(Q.UnexpectedKeyword,{at:t,keyword:e});else{var r=this.state.strict?s?ot:at:rt;if(r(e,this.inModule))this.raise(Q.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(Q.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(Q.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(Q.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(Q.ArgumentsInClass,{at:t})}}},{key:"isAwaitAllowed",value:function(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}},{key:"parseAwait",value:function(e){var t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(Q.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(Q.ObsoleteAwaitStar,{at:t}),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}},{key:"isAmbiguousAwait",value:function(){if(this.hasPrecedingLineBreak())return!0;var e=this.state.type;return 53===e||10===e||0===e||Ve(e)||102===e&&!this.state.containsEsc||137===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}},{key:"parseYield",value:function(){var e=this.startNode();this.expressionScope.recordParameterInitializerError(Q.YieldInParameter,{at:e}),this.next();var t=!1,i=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:i=this.parseMaybeAssign()}return e.delegate=t,e.argument=i,this.finishNode(e,"YieldExpression")}},{key:"parseImportCall",value:function(e){return this.next(),e.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(e.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(e,"ImportExpression")}},{key:"checkPipelineAtInfixOperator",value:function(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(Q.PipelineHeadSequenceExpression,{at:t})}},{key:"parseSmartPipelineBodyInStyle",value:function(e,t){if(this.isSimpleReference(e)){var i=this.startNodeAt(t);return i.callee=e,this.finishNode(i,"PipelineBareFunction")}var s=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),s.expression=e,this.finishNode(s,"PipelineTopicExpression")}},{key:"isSimpleReference",value:function(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}},{key:"checkSmartPipeTopicBodyEarlyErrors",value:function(e){if(this.match(19))throw this.raise(Q.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(Q.PipelineTopicUnused,{at:e})}},{key:"withTopicBindingContext",value:function(e){var t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}},{key:"withSmartMixTopicForbiddingContext",value:function(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();var t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}},{key:"withSoloAwaitPermittingContext",value:function(e){var t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}},{key:"allowInAnd",value:function(e){var t=this.prodParam.currentFlags(),i=8&~t;if(i){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}},{key:"disallowInAnd",value:function(e){var t=this.prodParam.currentFlags(),i=8&t;if(i){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}},{key:"registerTopicReference",value:function(){this.state.topicContext.maxTopicIndex=0}},{key:"topicReferenceIsAllowedInCurrentContext",value:function(){return this.state.topicContext.maxNumOfResolvableTopics>=1}},{key:"topicReferenceWasUsedInCurrentContext",value:function(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}},{key:"parseFSharpPipelineBody",value:function(e){var t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=i,s}},{key:"parseModuleExpression",value:function(){this.expectPlugin("moduleBlocks");var e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);var t=this.startNodeAt(this.state.endLoc);this.next();var i=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{i()}return this.finishNode(e,"ModuleExpression")}},{key:"parsePropertyNamePrefixOperator",value:function(e){}}]),i}(Si),ts={kind:"loop"},is={kind:"switch"},ss=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,rs=new RegExp("in(?:stanceof)?","y");function as(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:139,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.options.sourceType;if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,i),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(var r=0,a=Array.from(this.scope.undefinedExports);r0&&void 0!==arguments[0]&&arguments[0],t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}},{key:"parseStatement",value:function(){return this.parseStatementLike(0)}},{key:"parseStatementLike",value:function(e){var t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}},{key:"parseStatementContent",value:function(e,t){var i=this.state.type,s=this.startNode(),r=!!(2&e),a=!!(4&e),n=1&e;switch(i){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(46===this.lookaheadCharCode())break;return a||this.raise(this.state.strict?Q.StrictFunction:this.options.annexB?Q.SloppyFunctionAnnexB:Q.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(s,!1,!r&&a);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?r||this.raise(Q.UnexpectedLexicalDeclaration,{at:s}):this.raise(Q.AwaitUsingNotInAsyncContext,{at:s}),this.next(),this.parseVarStatement(s,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(Q.UnexpectedUsingDeclaration,{at:this.state.startLoc}):r||this.raise(Q.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(s,"using");case 100:if(this.state.containsEsc)break;var o=this.nextTokenStart(),h=this.codePointAtPos(o);if(91!==h){if(!r&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(h,o)&&123!==h)break}case 75:r||this.raise(Q.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:var l=this.state.value;return this.parseVarStatement(s,l);case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:var c=this.lookaheadCharCode();if(40===c||46===c)break;case 82:var p;return this.options.allowImportExportEverywhere||n||this.raise(Q.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===i?(p=this.parseImport(s),"ImportDeclaration"!==p.type||p.importKind&&"value"!==p.importKind||(this.sawUnambiguousESM=!0)):(p=this.parseExport(s,t),("ExportNamedDeclaration"!==p.type||p.exportKind&&"value"!==p.exportKind)&&("ExportAllDeclaration"!==p.type||p.exportKind&&"value"!==p.exportKind)&&"ExportDefaultDeclaration"!==p.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(p),p;default:if(this.isAsyncFunction())return r||this.raise(Q.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(s,!0,!r&&a)}var u=this.state.value,d=this.parseExpression();return we(i)&&"Identifier"===d.type&&this.eat(14)?this.parseLabeledStatement(s,u,d,e):this.parseExpressionStatement(s,d,t)}},{key:"assertModuleNodeAllowed",value:function(e){this.options.allowImportExportEverywhere||this.inModule||this.raise(Q.ImportOutsideModule,{at:e})}},{key:"decoratorsEnabledBeforeExport",value:function(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}},{key:"maybeTakeDecorators",value:function(e,t,i){if(e){var s;if(t.decorators&&t.decorators.length>0)"boolean"!==typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Q.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),(s=t.decorators).unshift.apply(s,c(e));else t.decorators=e;this.resetStartLocationFromNode(t,e[0]),i&&this.resetStartLocationFromNode(i,t)}return t}},{key:"canHaveLeadingDecorator",value:function(){return this.match(80)}},{key:"parseDecorators",value:function(e){var t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(Q.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(Q.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}},{key:"parseDecorator",value:function(){this.expectOnePlugin(["decorators","decorators-legacy"]);var e=this.startNode();if(this.next(),this.hasPlugin("decorators")){var t,i=this.state.startLoc;if(this.match(10)){var s=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(s,t);var r=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==t&&this.raise(Q.DecoratorArgumentsOutsideParentheses,{at:r})}else{t=this.parseIdentifier(!1);while(this.eat(16)){var a=this.startNodeAt(i);a.object=t,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),a.computed=!1,t=this.finishNode(a,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}},{key:"parseMaybeDecoratorArguments",value:function(e){if(this.eat(10)){var t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}},{key:"parseBreakContinueStatement",value:function(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}},{key:"verifyBreakContinue",value:function(e,t){var i;for(i=0;i2&&void 0!==arguments[2]&&arguments[2];return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")}},{key:"parseWhileStatement",value:function(e){var t=this;return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(ts),e.body=this.withSmartMixTopicForbiddingContext((function(){return t.parseStatement()})),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}},{key:"parseWithStatement",value:function(e){var t=this;return this.state.strict&&this.raise(Q.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((function(){return t.parseStatement()})),this.finishNode(e,"WithStatement")}},{key:"parseEmptyStatement",value:function(e){return this.next(),this.finishNode(e,"EmptyStatement")}},{key:"parseLabeledStatement",value:function(e,t,i,s){var r,a=l(this.state.labels);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.name===t&&this.raise(Q.LabelRedeclaration,{at:i,labelName:t})}}catch(p){a.e(p)}finally{a.f()}for(var o=Oe(this.state.type)?"loop":this.match(71)?"switch":null,h=this.state.labels.length-1;h>=0;h--){var c=this.state.labels[h];if(c.statementStart!==e.start)break;c.statementStart=this.state.start,c.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=8&s?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")}},{key:"parseExpressionStatement",value:function(e,t,i){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}},{key:"parseBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,s=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(s,e,!1,8,i),t&&this.scope.exit(),this.finishNode(s,"BlockStatement")}},{key:"isValidDirective",value:function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}},{key:"parseBlockBody",value:function(e,t,i,s,r){var a=e.body=[],n=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?n:void 0,i,s,r)}},{key:"parseBlockOrModuleBlockBody",value:function(e,t,i,s,r){var a=this.state.strict,n=!1,o=!1;while(!this.match(s)){var h=i?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(h)){var l=this.stmtToDirective(h);t.push(l),n||"use strict"!==l.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(h)}null==r||r.call(this,n),a||this.setStrict(!1),this.next()}},{key:"parseFor",value:function(e,t){var i=this;return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((function(){return i.parseStatement()})),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}},{key:"parseForIn",value:function(e,t,i){var s=this,r=this.match(58);return this.next(),r?null!==i&&this.unexpected(i):e.await=null!==i,"VariableDeclaration"!==t.type||null==t.declarations[0].init||r&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(Q.ForInOfLoopInitializer,{at:t,type:r?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(Q.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((function(){return s.parseStatement()})),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}},{key:"parseVar",value:function(e,t,i){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=e.declarations=[];for(e.kind=i;;){var a=this.startNode();if(this.parseVarId(a,i),a.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==a.init||s||("Identifier"===a.id.type||t&&(this.match(58)||this.isContextual(102))?"const"!==i||this.match(58)||this.isContextual(102)||this.raise(Q.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(Q.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),r.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return e}},{key:"parseVarId",value:function(e,t){var i=this.parseBindingAtom();this.checkLVal(i,{in:{type:"VariableDeclarator"},binding:"var"===t?5:8201}),e.id=i}},{key:"parseAsyncFunctionExpression",value:function(e){return this.parseFunction(e,8)}},{key:"parseFunction",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=2&i,r=!!(1&i),a=r&&!(4&i),n=!!(8&i);this.initFunction(e,n),this.match(55)&&(s&&this.raise(Q.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(a));var o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ti(n,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((function(){t.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}},{key:"parseFunctionId",value:function(e){return e||we(this.state.type)?this.parseIdentifier():null}},{key:"parseFunctionParams",value:function(e,t){this.expect(10),this.expressionScope.enter(Yt()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}},{key:"registerFunctionStatementId",value:function(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}},{key:"parseClass",value:function(e,t,i){this.next();var s=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,i),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,s),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}},{key:"isClassProperty",value:function(){return this.match(29)||this.match(13)||this.match(8)}},{key:"isClassMethod",value:function(){return this.match(10)}},{key:"isNonstaticConstructor",value:function(e){return!e.computed&&!e.static&&("constructor"===e.key.name||"constructor"===e.key.value)}},{key:"parseClassBody",value:function(e,t){var i=this;this.classScope.enter();var s={hadConstructor:!1,hadSuperClass:e},r=[],a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((function(){while(!i.match(8))if(i.eat(13)){if(r.length>0)throw i.raise(Q.DecoratorSemicolon,{at:i.state.lastTokEndLoc})}else if(i.match(26))r.push(i.parseDecorator());else{var e=i.startNode();r.length&&(e.decorators=r,i.resetStartLocationFromNode(e,r[0]),r=[]),i.parseClassMember(a,e,s),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&i.raise(Q.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),r.length)throw this.raise(Q.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(a,"ClassBody")}},{key:"parseClassMemberFromModifier",value:function(e,t){var i=this.parseIdentifier(!0);if(this.isClassMethod()){var s=t;return s.kind="method",s.computed=!1,s.key=i,s.static=!1,this.pushClassMethod(e,s,!1,!1,!1,!1),!0}if(this.isClassProperty()){var r=t;return r.computed=!1,r.key=i,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(i),!1}},{key:"parseClassMember",value:function(e,t,i){var s=this.isContextual(106);if(s){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,i,s)}},{key:"parseClassMemberWithIsStatic",value:function(e,t,i,s){var r=t,a=t,n=t,o=t,h=t,l=r,c=r;if(t.static=s,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";var p=this.match(138);return this.parseClassElementName(l),p?void this.pushClassPrivateMethod(e,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(Q.ConstructorIsGenerator,{at:r.key}),void this.pushClassMethod(e,r,!0,!1,!1,!1))}var u=we(this.state.type)&&!this.state.containsEsc,d=this.match(138),f=this.parseClassElementName(t),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,a,!1,!1);var m=this.isNonstaticConstructor(r),v=!1;m&&(r.kind="constructor",i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(Q.DuplicateConstructor,{at:f}),m&&this.hasPlugin("typescript")&&t.override&&this.raise(Q.OverrideOnConstructor,{at:f}),i.hadConstructor=!0,v=i.hadSuperClass),this.pushClassMethod(e,r,!1,!1,m,v)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n);else if(u&&"async"===f.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);var x=this.eat(55);c.optional&&this.unexpected(y),l.kind="method";var P=this.match(138);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),P?this.pushClassPrivateMethod(e,a,x,!0):(this.isNonstaticConstructor(r)&&this.raise(Q.ConstructorIsAsync,{at:r.key}),this.pushClassMethod(e,r,x,!0,!1,!1))}else if(!u||"get"!==f.name&&"set"!==f.name||this.match(55)&&this.isLineTerminator())if(u&&"accessor"===f.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(f);var g=this.match(138);this.parseClassElementName(n),this.pushClassAccessorProperty(e,h,g)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n):this.unexpected();else{this.resetPreviousNodeTrailingComments(f),l.kind=f.name;var k=this.match(138);this.parseClassElementName(r),k?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(Q.ConstructorIsAccessor,{at:r.key}),this.pushClassMethod(e,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}}},{key:"parseClassElementName",value:function(e){var t=this.state,i=t.type,s=t.value;if(132!==i&&133!==i||!e.static||"prototype"!==s||this.raise(Q.StaticPrototype,{at:this.state.startLoc}),138===i){"constructor"===s&&this.raise(Q.ConstructorClassPrivateField,{at:this.state.startLoc});var r=this.parsePrivateName();return e.key=r,r}return this.parsePropertyName(e)}},{key:"parseClassStaticBlock",value:function(e,t){var i;this.scope.enter(208);var s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);var r=t.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,e.body.push(this.finishNode(t,"StaticBlock")),null!=(i=t.decorators)&&i.length&&this.raise(Q.DecoratorStaticBlock,{at:t})}},{key:"pushClassProperty",value:function(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(Q.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}},{key:"pushClassPrivateProperty",value:function(e,t){var i=this.parseClassPrivateProperty(t);e.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}},{key:"pushClassAccessorProperty",value:function(e,t,i){if(!i&&!t.computed){var s=t.key;"constructor"!==s.name&&"constructor"!==s.value||this.raise(Q.ConstructorClassField,{at:s})}var r=this.parseClassAccessorProperty(t);e.body.push(r),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}},{key:"pushClassMethod",value:function(e,t,i,s,r,a){e.body.push(this.parseMethod(t,i,s,r,a,"ClassMethod",!0))}},{key:"pushClassPrivateMethod",value:function(e,t,i,s){var r=this.parseMethod(t,i,s,!1,!1,"ClassPrivateMethod",!0);e.body.push(r);var a="get"===r.kind?r.static?6:2:"set"===r.kind?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,a)}},{key:"declareClassPrivateMethodInScope",value:function(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}},{key:"parsePostMemberNameModifiers",value:function(e){}},{key:"parseClassPrivateProperty",value:function(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}},{key:"parseClassProperty",value:function(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}},{key:"parseClassAccessorProperty",value:function(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}},{key:"parseInitializer",value:function(e){this.scope.enter(80),this.expressionScope.enter(Zt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}},{key:"parseClassId",value:function(e,t,i){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8331;if(we(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,s);else{if(!i&&t)throw this.raise(Q.MissingClassName,{at:this.state.startLoc});e.id=null}}},{key:"parseClassSuper",value:function(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}},{key:"parseExport",value:function(e,t){var i=this.parseMaybeImportPhase(e,!0),s=this.maybeParseExportDefaultSpecifier(e,i),r=!s||this.eat(12),a=r&&this.eatExportStar(e),n=a&&this.maybeParseExportNamespaceSpecifier(e),o=r&&(!n||this.eat(12)),h=s||a;if(a&&!n){if(s&&this.unexpected(),t)throw this.raise(Q.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}var l,c=this.maybeParseExportNamedSpecifiers(e);if(s&&r&&!a&&!c&&this.unexpected(null,5),n&&o&&this.unexpected(null,98),h||c){if(l=!1,t)throw this.raise(Q.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,h)}else l=this.maybeParseExportDeclaration(e);if(h||c||l){var p,u=e;if(this.checkExport(u,!0,!1,!!u.source),"ClassDeclaration"===(null==(p=u.declaration)?void 0:p.type))this.maybeTakeDecorators(t,u.declaration,u);else if(t)throw this.raise(Q.UnsupportedDecoratorExport,{at:e});return this.finishNode(u,"ExportNamedDeclaration")}if(this.eat(65)){var d=e,f=this.parseExportDefaultExpression();if(d.declaration=f,"ClassDeclaration"===f.type)this.maybeTakeDecorators(t,f,d);else if(t)throw this.raise(Q.UnsupportedDecoratorExport,{at:e});return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}},{key:"eatExportStar",value:function(e){return this.eat(55)}},{key:"maybeParseExportDefaultSpecifier",value:function(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);var i=t||this.parseIdentifier(!0),s=this.startNodeAtNode(i);return s.exported=i,e.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],!0}return!1}},{key:"maybeParseExportNamespaceSpecifier",value:function(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);var t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}},{key:"maybeParseExportNamedSpecifiers",value:function(e){if(this.match(5)){var t;e.specifiers||(e.specifiers=[]);var i="type"===e.exportKind;return(t=e.specifiers).push.apply(t,c(this.parseExportSpecifiers(i))),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}},{key:"maybeParseExportDeclaration",value:function(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}},{key:"isAsyncFunction",value:function(){if(!this.isContextual(95))return!1;var e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}},{key:"parseExportDefaultExpression",value:function(){var e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Q.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(Q.UnsupportedDefaultExport,{at:this.state.startLoc});var t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}},{key:"parseExportDeclaration",value:function(e){if(this.match(80)){var t=this.parseClass(this.startNode(),!0,!1);return t}return this.parseStatementListItem()}},{key:"isExportDefaultSpecifier",value:function(){var e=this.state.type;if(we(e)){if(95===e&&!this.state.containsEsc||100===e)return!1;if((130===e||129===e)&&!this.state.containsEsc){var t=this.lookahead(),i=t.type;if(we(i)&&98!==i||5===i)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;var s=this.nextTokenStart(),r=this.isUnparsedContextual(s,"from");if(44===this.input.charCodeAt(s)||we(this.state.type)&&r)return!0;if(this.match(65)&&r){var a=this.input.charCodeAt(this.nextTokenStartSince(s+4));return 34===a||39===a}return!1}},{key:"parseExportFrom",value:function(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}},{key:"shouldParseExportDeclaration",value:function(){var e=this.state.type;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Q.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}},{key:"checkExport",value:function(e,t,i,s){var r;if(t)if(i){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var a,n=e.declaration;"Identifier"!==n.type||"from"!==n.name||n.end-n.start!==4||null!=(a=n.extra)&&a.parenthesized||this.raise(Q.ExportDefaultFromAsIdentifier,{at:n})}}else if(null!=(r=e.specifiers)&&r.length){var o,h=l(e.specifiers);try{for(h.s();!(o=h.n()).done;){var c=o.value,p=c.exported,u="Identifier"===p.type?p.name:p.value;if(this.checkDuplicateExports(c,u),!s&&c.local){var d=c.local;"Identifier"!==d.type?this.raise(Q.ExportBindingIsString,{at:c,localName:d.value,exportName:u}):(this.checkReservedWord(d.name,d.loc.start,!0,!1),this.scope.checkLocalExport(d))}}}catch(x){h.e(x)}finally{h.f()}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){var f=e.declaration.id;if(!f)throw new Error("Assertion failure");this.checkDuplicateExports(e,f.name)}else if("VariableDeclaration"===e.declaration.type){var y,m=l(e.declaration.declarations);try{for(m.s();!(y=m.n()).done;){var v=y.value;this.checkDeclaration(v.id)}}catch(x){m.e(x)}finally{m.f()}}}},{key:"checkDeclaration",value:function(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type){var t,i=l(e.properties);try{for(i.s();!(t=i.n()).done;){var s=t.value;this.checkDeclaration(s)}}catch(o){i.e(o)}finally{i.f()}}else if("ArrayPattern"===e.type){var r,a=l(e.elements);try{for(a.s();!(r=a.n()).done;){var n=r.value;n&&this.checkDeclaration(n)}}catch(o){a.e(o)}finally{a.f()}}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}},{key:"checkDuplicateExports",value:function(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(Q.DuplicateDefaultExport,{at:e}):this.raise(Q.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}},{key:"parseExportSpecifiers",value:function(e){var t=[],i=!0;this.expect(5);while(!this.eat(8)){if(i)i=!1;else if(this.expect(12),this.eat(8))break;var s=this.isContextual(130),r=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,r,e,s))}return t}},{key:"parseExportSpecifier",value:function(e,t,i,s){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=hi(e.local):e.exported||(e.exported=oi(e.local)),this.finishNode(e,"ExportSpecifier")}},{key:"parseModuleExportName",value:function(){if(this.match(133)){var e=this.parseStringLiteral(this.state.value),t=e.value.match(ss);return t&&this.raise(Q.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}},{key:"isJSONModuleImport",value:function(e){return null!=e.assertions&&e.assertions.some((function(e){var t=e.key,i=e.value;return"json"===i.value&&("Identifier"===t.type?"type"===t.name:"type"===t.value)}))}},{key:"checkImportReflection",value:function(e){var t=e.specifiers,i=1===t.length?t[0].type:null;if("source"===e.phase)"ImportDefaultSpecifier"!==i&&this.raise(Q.SourcePhaseImportRequiresDefault,{at:t[0].loc.start});else if("defer"===e.phase)"ImportNamespaceSpecifier"!==i&&this.raise(Q.DeferImportRequiresNamespace,{at:t[0].loc.start});else if(e.module){var s;"ImportDefaultSpecifier"!==i&&this.raise(Q.ImportReflectionNotBinding,{at:t[0].loc.start}),(null==(s=e.assertions)?void 0:s.length)>0&&this.raise(Q.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start})}}},{key:"checkJSONModuleImport",value:function(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){var t=e.specifiers;if(null!=t){var i=t.find((function(e){var t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==i&&this.raise(Q.ImportJSONBindingNotDefault,{at:i.loc.start})}}}},{key:"isPotentialImportPhase",value:function(e){return!e&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}},{key:"applyImportPhase",value:function(e,t,i,s){t||("module"===i?(this.expectPlugin("importReflection",s),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),"source"===i?(this.expectPlugin("sourcePhaseImports",s),e.phase="source"):"defer"===i?(this.expectPlugin("deferredImportEvaluation",s),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}},{key:"parseMaybeImportPhase",value:function(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;var i=this.parseIdentifier(!0),s=this.state.type,r=Se(s)?98!==s||102===this.lookaheadCharCode():12!==s;return r?(this.resetPreviousIdentifierLeadingComments(i),this.applyImportPhase(e,t,i.name,i.loc.start),null):(this.applyImportPhase(e,t,null),i)}},{key:"isPrecedingIdImportPhase",value:function(e){var t=this.state.type;return we(t)?98!==t||102===this.lookaheadCharCode():12!==t}},{key:"parseImport",value:function(e){return this.match(133)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}},{key:"parseImportSpecifiersAndAfter",value:function(e,t){e.specifiers=[];var i=this.maybeParseDefaultImportSpecifier(e,t),s=!i||this.eat(12),r=s&&this.maybeParseStarImportSpecifier(e);return s&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}},{key:"parseImportSourceAndAttributes",value:function(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.match(133)||this.unexpected(),this.parseExprAtom()}},{key:"parseImportSpecifierLocal",value:function(e,t,i){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,i))}},{key:"finishImportSpecifier",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8201;return this.checkLVal(e.local,{in:{type:t},binding:i}),this.finishNode(e,t)}},{key:"parseImportAttributes",value:function(){this.expect(5);var e=[],t=new Set;do{if(this.match(8))break;var i=this.startNode(),s=this.state.value;if(t.has(s)&&this.raise(Q.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:s}),t.add(s),this.match(133)?i.key=this.parseStringLiteral(s):i.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(Q.ModuleAttributeInvalidValue,{at:this.state.startLoc});i.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}},{key:"parseModuleAttributes",value:function(){var e=[],t=new Set;do{var i=this.startNode();if(i.key=this.parseIdentifier(!0),"type"!==i.key.name&&this.raise(Q.ModuleAttributeDifferentFromType,{at:i.key}),t.has(i.key.name)&&this.raise(Q.ModuleAttributesWithDuplicateKeys,{at:i.key,key:i.key.name}),t.add(i.key.name),this.expect(14),!this.match(133))throw this.raise(Q.ModuleAttributeInvalidValue,{at:this.state.startLoc});i.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return e}},{key:"maybeParseImportAttributes",value:function(e){var t,i=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),t=this.parseImportAttributes()),i=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(!0!==this.getPluginOption("importAttributes","deprecatedAssertSyntax")&&this.raise(Q.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),t=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))t=[];else{if(!this.hasPlugin("moduleAttributes"))return;t=[]}!i&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}},{key:"maybeParseDefaultImportSpecifier",value:function(e,t){if(t){var i=this.startNodeAtNode(t);return i.local=t,e.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}return!!Se(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}},{key:"maybeParseStarImportSpecifier",value:function(e){if(this.match(55)){var t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}},{key:"parseNamedImportSpecifiers",value:function(e){var t=!0;this.expect(5);while(!this.eat(8)){if(t)t=!1;else{if(this.eat(14))throw this.raise(Q.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}var i=this.startNode(),s=this.match(133),r=this.isContextual(130);i.imported=this.parseModuleExportName();var a=this.parseImportSpecifier(i,s,"type"===e.importKind||"typeof"===e.importKind,r,void 0);e.specifiers.push(a)}}},{key:"parseImportSpecifier",value:function(e,t,i,s,r){if(this.eatContextual(93))e.local=this.parseIdentifier();else{var a=e.imported;if(t)throw this.raise(Q.ImportBindingIsString,{at:e,importName:a.value});this.checkReservedWord(a.name,e.loc.start,!0,!0),e.local||(e.local=oi(a))}return this.finishImportSpecifier(e,"ImportSpecifier",r)}},{key:"isThisParam",value:function(e){return"Identifier"===e.type&&"this"===e.name}}]),i}(es),os=function(e){b(i,e);var t=A(i);function i(e,s){var r;return D(this,i),e=Zi(e),r=t.call(this,e,s),r.options=e,r.initializeScopes(),r.plugins=hs(r.options.plugins),r.filename=e.sourceFilename,r}return L(i,[{key:"getScopeHandler",value:function(){return dt}},{key:"parse",value:function(){this.enterInitialScopes();var e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}}]),i}(ns);function hs(e){var t,i=new Map,s=l(e);try{for(s.s();!(t=s.n()).done;){var r=t.value,a=Array.isArray(r)?r:[r,{}],n=f(a,2),o=n[0],h=n[1];i.has(o)||i.set(o,h||{})}}catch(c){s.e(c)}finally{s.f()}return i}function ls(e,t){var i;if("unambiguous"!==(null==(i=t)?void 0:i.sourceType))return ds(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";var s=ds(t,e),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",ds(t,e).parse()}catch(a){}else r.program.sourceType="script";return r}catch(n){try{return t.sourceType="script",ds(t,e).parse()}catch(o){}throw n}}function cs(e,t){var i=ds(t,e);return i.options.strictMode&&(i.state.strict=!0),i.getExpression()}function ps(e){for(var t={},i=0,s=Object.keys(e);i=a)return e;switch(e){case"%s":return String(s[i++]);case"%d":return Number(s[i++]);case"%j":try{return JSON.stringify(s[i++])}catch(t){return"[Circular]"}default:return e}})),h=s[i];i=3&&(s.depth=arguments[2]),arguments.length>=4&&(s.colors=arguments[3]),x(i)?s.showHidden=i:i&&t._extend(s,i),A(s.showHidden)&&(s.showHidden=!1),A(s.depth)&&(s.depth=2),A(s.colors)&&(s.colors=!1),A(s.customInspect)&&(s.customInspect=!0),s.colors&&(s.stylize=h),p(s,e,s.depth)}function h(e,t){var i=o.styles[t];return i?"["+o.colors[i][0]+"m"+e+"["+o.colors[i][1]+"m":e}function l(e,t){return e}function c(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}function p(e,i,s){if(e.customInspect&&i&&I(i.inspect)&&i.inspect!==t.inspect&&(!i.constructor||i.constructor.prototype!==i)){var r=i.inspect(s,e);return b(r)||(r=p(e,r,s)),r}var a=u(e,i);if(a)return a;var n=Object.keys(i),o=c(n);if(e.showHidden&&(n=Object.getOwnPropertyNames(i)),C(i)&&(n.indexOf("message")>=0||n.indexOf("description")>=0))return d(i);if(0===n.length){if(I(i)){var h=i.name?": "+i.name:"";return e.stylize("[Function"+h+"]","special")}if(w(i))return e.stylize(RegExp.prototype.toString.call(i),"regexp");if(S(i))return e.stylize(Date.prototype.toString.call(i),"date");if(C(i))return d(i)}var l,x="",P=!1,g=["{","}"];if(v(i)&&(P=!0,g=["[","]"]),I(i)){var k=i.name?": "+i.name:"";x=" [Function"+k+"]"}return w(i)&&(x=" "+RegExp.prototype.toString.call(i)),S(i)&&(x=" "+Date.prototype.toUTCString.call(i)),C(i)&&(x=" "+d(i)),0!==n.length||P&&0!=i.length?s<0?w(i)?e.stylize(RegExp.prototype.toString.call(i),"regexp"):e.stylize("[Object]","special"):(e.seen.push(i),l=P?f(e,i,s,o,n):n.map((function(t){return y(e,i,s,o,t,P)})),e.seen.pop(),m(l,x,g)):g[0]+x+g[1]}function u(e,t){if(A(t))return e.stylize("undefined","undefined");if(b(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}return k(t)?e.stylize(""+t,"number"):x(t)?e.stylize(""+t,"boolean"):P(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,i,s,r){for(var a=[],n=0,o=t.length;n-1&&(o=a?o.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+o.split("\n").map((function(e){return" "+e})).join("\n"))):o=e.stylize("[Circular]","special")),A(n)){if(a&&r.match(/^\d+$/))return o;n=JSON.stringify(""+r),n.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(n=n.substr(1,n.length-2),n=e.stylize(n,"name")):(n=n.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),n=e.stylize(n,"string"))}return n+": "+o}function m(e,t,i){var s=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return s>60?i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}function v(e){return Array.isArray(e)}function x(e){return"boolean"===typeof e}function P(e){return null===e}function g(e){return null==e}function k(e){return"number"===typeof e}function b(e){return"string"===typeof e}function T(e){return"symbol"===typeof e}function A(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===L(e)}function E(e){return"object"===typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===L(e)}function C(e){return E(e)&&("[object Error]"===L(e)||e instanceof Error)}function I(e){return"function"===typeof e}function N(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function L(e){return Object.prototype.toString.call(e)}function M(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(i){if(A(a)&&(a=Object({VUE_APP_BASE_API:"",NODE_ENV:"production",BASE_URL:"/"}).NODE_DEBUG||""),i=i.toUpperCase(),!n[i])if(new RegExp("\\b"+i+"\\b","i").test(a)){var s=e.pid;n[i]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",i,s,e)}}else n[i]=function(){};return n[i]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=v,t.isBoolean=x,t.isNull=P,t.isNullOrUndefined=g,t.isNumber=k,t.isString=b,t.isSymbol=T,t.isUndefined=A,t.isRegExp=w,t.isObject=E,t.isDate=S,t.isError=C,t.isFunction=I,t.isPrimitive=N,t.isBuffer=i("d60a");var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var e=new Date,t=[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",D(),t.format.apply(t,arguments))},t.inherits=i("28a0"),t._extend=function(e,t){if(!t||!E(t))return e;var i=Object.keys(t),s=i.length;while(s--)e[i[s]]=t[i[s]];return e};var B="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var i=new Error("Promise was rejected with a falsy value");i.reason=e,e=i}return t(e)}function j(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function i(){for(var i=[],s=0;se?d():!0!==t&&(r=setTimeout(s?f:d,void 0===s?e-u:e)))}return"boolean"!==typeof t&&(s=i,i=t,t=void 0),l.cancel=h,l}function i(e,i,s){return void 0===s?t(e,i,!1):t(e,s,!1!==i)}e.debounce=i,e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}))},d60a:function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}}}]);